/* Login (/auth/login.php): split layout — brand panel left, form right.
   Uses the app.css v2 tokens; everything is scoped to .lg-* classes. */

.lg-body { min-height: 100vh; margin: 0; background: var(--sx-stage); }
.lg-shell { display: grid; grid-template-columns: minmax(360px, 44%) minmax(0, 1fr); min-height: 100vh; }

/* ---- Brand panel ---- */
.lg-brand {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 40px clamp(32px, 4vw, 56px);
  color: var(--sx-espresso-ink);
  /* One controlled gradient: espresso deepening downward, a faint warm light top-right. */
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(236, 90, 27, .22) 0%, rgba(236, 90, 27, 0) 55%),
    linear-gradient(180deg, var(--sx-espresso-2) 0%, var(--sx-espresso) 62%, #261812 100%);
}
.lg-oauth-sep{display:flex;align-items:center;gap:12px;margin:18px 0;color:#818896;font-size:.82rem}.lg-oauth-sep:before,.lg-oauth-sep:after{content:"";height:1px;background:#e2e5e9;flex:1}.lg-google{width:100%;display:flex;align-items:center;justify-content:center;gap:9px;border:1px solid #d8dde3;background:#fff}.lg-google:hover{background:#f8f9fa;border-color:#c8ced6}
.lg-brand-top { display: flex; align-items: center; gap: 12px; }
.lg-mark { width: 40px; height: 40px; display: grid; place-items: center; flex: none; color: var(--sx-espresso); background: var(--sx-espresso-ink); border-radius: 12px; font-size: 1.05rem; }
.lg-wordmark { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.02em; }
.lg-brand-copy { max-width: 460px; }
.lg-eyebrow { margin: 0 0 12px; color: var(--sx-espresso-accent); font-size: var(--sx-fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.lg-brand-copy h1 { margin: 0; color: #fff; font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }
.lg-points { display: flex; flex-direction: column; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--sx-espresso-muted); font-size: var(--sx-fs-sm); }
.lg-points li { display: flex; align-items: center; gap: 10px; }
.lg-points .bi { width: 22px; height: 22px; display: grid; place-items: center; flex: none; color: var(--sx-espresso-ink); background: rgba(255,255,255,.08); border-radius: 50%; font-size: .8rem; }
.lg-brand-links { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-brand-links a {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 0 14px;
  color: var(--sx-espresso-ink); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--sx-r-pill);
  font-size: var(--sx-fs-xs); font-weight: 500;
  transition: background var(--sx-dur-1) ease, border-color var(--sx-dur-1) ease;
}
.lg-brand-links a:hover { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.26); }
.lg-brand-links a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 138, 80, .45); }

/* ---- Form side ---- */
.lg-main { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; padding: 40px 24px 0; }
.lg-panel { width: 100%; max-width: 400px; margin: auto 0; }
.lg-mobile-brand { display: none; }
.lg-title { margin: 0; color: var(--sx-ink); font-size: var(--sx-fs-2xl); font-weight: 600; letter-spacing: -.03em; }
.lg-lead { margin: 6px 0 28px; color: var(--sx-muted); font-size: var(--sx-fs-sm); }
.lg-alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 12px 14px; color: var(--sx-danger); background: var(--sx-danger-bg); border: 1px solid var(--sx-danger-line); border-radius: 12px; font-size: var(--sx-fs-sm); line-height: 1.45; }
.lg-alert .bi { margin-top: 1px; }
.lg-form { display: flex; flex-direction: column; gap: 18px; }
.lg-field .form-label { margin-bottom: 6px; color: var(--sx-ink-2); font-size: var(--sx-fs-sm); font-weight: 500; }
.lg-field .form-control { min-height: 46px; padding: 0 14px; color: var(--sx-ink); background: #fff; border: 1px solid var(--sx-line); border-radius: 12px; font-size: var(--sx-fs-base); box-shadow: none; transition: border-color var(--sx-dur-1) ease, box-shadow var(--sx-dur-2) ease; }
.lg-field .form-control:hover { border-color: var(--sx-line-strong); }
.lg-field .form-control:focus { border-color: var(--sx-accent-200); box-shadow: var(--sx-focus-ring); }
.lg-field .form-control.is-invalid, .lg-field .form-control[aria-invalid="true"] { border-color: var(--sx-danger-line); background-image: none; }
.lg-pw { position: relative; }
.lg-pw .form-control { padding-right: 50px; }
.lg-pw-toggle { position: absolute; top: 50%; right: 5px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; color: var(--sx-muted); background: transparent; border: 0; border-radius: 10px; transform: translateY(-50%); }
.lg-pw-toggle:hover { color: var(--sx-ink); background: var(--sx-stage); }
.lg-pw-toggle:focus-visible { outline: none; box-shadow: var(--sx-focus-ring); }
.lg-field-error { margin-top: 6px; color: var(--sx-danger); font-size: var(--sx-fs-xs); }
.lg-hint { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--sx-warning); font-size: var(--sx-fs-xs); }
.lg-field-error[hidden], .lg-hint[hidden] { display: none; }
.lg-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin-top: 4px; border-radius: 12px; font-size: var(--sx-fs-base); }
.lg-submit .bi { transition: transform var(--sx-dur-2) var(--sx-ease); }
.lg-submit:hover .bi { transform: translateX(2px); }
.lg-submit.is-loading { opacity: .85; cursor: progress; }
.lg-submit.is-loading .bi { display: none; }

.lg-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; width: 100%; max-width: 640px; margin-top: 40px; padding: 16px 0 20px; color: var(--sx-subtle); border-top: 1px solid var(--sx-line-soft); font-size: var(--sx-fs-xs); }
.lg-footer p { margin: 0; }

/* ---- Tablet: narrower brand panel ---- */
@media (max-width: 991.98px) {
  .lg-shell { grid-template-columns: minmax(300px, 40%) minmax(0, 1fr); }
  .lg-points { display: none; }
}
/* ---- Mobile: brand becomes a compact band; the form follows immediately ---- */
@media (max-width: 767.98px) {
  .lg-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .lg-brand { gap: 14px; padding: 18px 20px 20px; }
  .lg-brand-copy, .lg-points { display: none; }
  .lg-brand { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: space-between; }
  .lg-mark { width: 34px; height: 34px; border-radius: 10px; font-size: .95rem; }
  .lg-wordmark { font-size: 1.0625rem; }
  .lg-brand-links a { min-height: 30px; padding: 0 12px; }
  .lg-main { justify-content: flex-start; padding: 28px 20px 0; }
  .lg-panel { margin: 0; }
  .lg-lead { margin-bottom: 22px; }
  .lg-footer { flex-direction: column; margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-brand-links a, .lg-field .form-control, .lg-submit .bi { transition: none; }
}

/* Teacher sign-in view + the switch link under the form */
.lg-mode { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 4px 10px; color: var(--sx-accent-text); background: var(--sx-accent-50); border-radius: var(--sx-r-pill); font-size: var(--sx-fs-xs); font-weight: 600; }
.lg-switch { margin: 18px 0 0; text-align: center; font-size: var(--sx-fs-sm); }
.lg-switch a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; color: var(--sx-muted); border-radius: 8px; font-weight: 500; }
.lg-switch a:hover { color: var(--sx-accent-text); }
.lg-switch a:focus-visible { outline: none; box-shadow: var(--sx-focus-ring); }

/* Official ClasVora logo (image asset; never stretched: height drives the size, width follows the artwork). */
.lg-logo { display: block; width: auto; height: 38px; max-width: 100%; object-fit: contain; }
@media (max-width: 991.98px) { .lg-logo { height: 32px; } }
@media (max-width: 767.98px) { .lg-logo { height: 28px; } }

/* Notices on the signed-out screens (session ended, link sent, password updated). */
.lg-alert-success { color: var(--sx-success); background: var(--sx-success-bg); border-color: transparent; }
.lg-alert-info { color: var(--sx-ink-2); background: var(--sx-sunken); border-color: var(--sx-line-soft); }
.lg-alert-info .bi { color: var(--sx-accent-text); }
/* "Forgot password?" sits on the password label row. */
.lg-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lg-label-row .form-label { margin-bottom: 6px; }
.lg-label-row a { color: var(--sx-accent-text); font-size: var(--sx-fs-xs); font-weight: 500; border-radius: 6px; }
.lg-label-row a:hover { text-decoration: underline; }
.lg-label-row a:focus-visible, .lg-text-link:focus-visible { outline: none; box-shadow: var(--sx-focus-ring); }
.lg-help { margin: 6px 0 0; color: var(--sx-muted); font-size: var(--sx-fs-xs); }
.lg-sent { display: flex; flex-direction: column; gap: 14px; color: var(--sx-ink-2); font-size: var(--sx-fs-sm); line-height: 1.55; }
.lg-sent p { margin: 0; }
