/* Learning Portal — sign-in, magic link, password reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: linear-gradient(165deg, var(--bg) 0%, #e8edf5 100%);
  min-height: 100vh;
  padding: 32px 16px;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.shell { max-width: 420px; margin: 0 auto; }
.brand { text-align: center; margin-bottom: 24px; }
.brand strong {
  display: block;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand span { font-size: 12px; color: var(--muted); }
.card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
h1 {
  font-family: var(--font-h);
  font-size: 24px;
  margin-bottom: 8px;
  font-weight: 400;
  color: var(--heading);
}
.lead {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.65;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--heading);
}
input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  margin-bottom: 16px;
}
input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}
.btn {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  box-shadow: 0 8px 24px rgba(163, 35, 142, 0.22);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn:hover {
  background: linear-gradient(135deg, #b52a9e, var(--purple-deep));
  box-shadow: 0 12px 28px rgba(163, 35, 142, 0.28);
  transform: translateY(-1px);
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font);
  margin-bottom: 16px;
  color: var(--heading);
  text-decoration: none;
  cursor: pointer;
}
.btn-google:hover { border-color: var(--gold); }
.portal-or {
  text-align: center;
  color: var(--soft);
  font-size: 13px;
  margin: 0 0 16px;
}
.note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.65;
}
.note a { color: var(--purple); font-weight: 600; text-decoration: none; }
.note a:hover { text-decoration: underline; }
.alert {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.5;
}
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.hidden { display: none !important; }
.captcha-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
}
.captcha-image { border-radius: 8px; border: 1px solid var(--line); }
.captcha-refresh {
  width: 42px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--heading);
  font-size: 17px;
  cursor: pointer;
}
.captcha-input { flex: 1; min-width: 0; margin: 0 !important; }
.footer {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--soft);
}
.footer a { color: var(--purple); text-decoration: none; font-weight: 600; }
.login-report-issue {
  margin-top: 10px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  text-decoration: underline;
}
.login-report-issue:hover { color: var(--purple-deep); }

body.magic-page {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
}
body.magic-page .card { max-width: 420px; width: 100%; text-align: center; }
body.magic-page .btn { width: auto; display: inline-block; text-decoration: none; }
body.magic-page .note { font-size: 12px; color: var(--soft); margin-top: 18px; }
.btn:disabled { opacity: 0.65; cursor: wait; }
