/* The sign-in pages (sign in, forgot password, reset). Loaded by layouts/auth.php on top of
   app.css. The brand panel is drawn from the school's own --primary, so every school still
   sees its colours, and the design's own typeface still applies. Motion only for those who
   have not asked for less. */

.au2 {
  --au-ink: 228 45% 11%;
  --au-violet: 262 80% 60%;
  --au-sky: 199 92% 52%;
  --au-sun: 38 100% 55%;
  --au-mint: 158 70% 42%;
  --au-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --au-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
.au2 body { background: hsl(var(--background)); }
html.au2 .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

/* ---- The brand panel ---- */
html.au2 .auth-side {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  margin: 0.75rem; padding: clamp(1.5rem, 4vw, 3rem); border: 0; border-radius: 2rem; color: #fff;
  background: linear-gradient(150deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.92) 45%, hsl(var(--au-ink)) 130%);
  box-shadow: 0 30px 60px -30px hsl(var(--primary) / 0.6);
}
html.au2 .auth-side > * { position: relative; }
.au2-mesh { position: absolute !important; inset: -140px; z-index: -1; pointer-events: none; }
.au2-mesh i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; }
.au2-mesh i:nth-child(1) { width: 26rem; height: 26rem; top: 6%; right: 2%; background: hsl(var(--au-sky) / 0.6); }
.au2-mesh i:nth-child(2) { width: 22rem; height: 22rem; bottom: 4%; left: 6%; background: hsl(var(--au-violet) / 0.6); }
.au2-mesh i:nth-child(3) { width: 16rem; height: 16rem; top: 40%; left: 40%; background: hsl(var(--secondary, var(--au-sun)) / 0.45); }
.au2-grid { position: absolute !important; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.07) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 20%, transparent 75%); }
.au2-side-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.au2-logo { display: inline-grid; place-items: center; padding: 0.55rem; border-radius: 1.1rem; background: rgb(255 255 255 / 0.95); box-shadow: 0 12px 28px -12px rgb(0 0 0 / 0.5); transition: transform 0.5s var(--au-spring); }
.au2-logo:hover { transform: rotate(-6deg) scale(1.05); }
.au2-logo img { display: block; width: auto; max-width: 10rem; height: 44px; padding: 0; border-radius: 0.5rem; background: none; }
.au2-powered { padding: 0.35rem 0.8rem; border-radius: 9999px; background: rgb(255 255 255 / 0.14); border: 1px solid rgb(255 255 255 / 0.2); font-size: 0.78rem; }
.au2-side-body h1 { margin: 0; color: #fff; font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.au2-side-body > p { margin: 0.9rem 0 0; max-width: 28rem; color: rgb(255 255 255 / 0.85); font-size: 1.05rem; line-height: 1.55; }
.au2-inside { display: flex; flex-direction: column; gap: 0.65rem; max-width: 22rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.au2-inside li { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 0.9rem; border: 1px solid rgb(255 255 255 / 0.2); border-radius: 1.1rem; background: rgb(255 255 255 / 0.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.au2-inside li:nth-child(2) { margin-left: 1.75rem; }
.au2-inside li:nth-child(3) { margin-left: 0.75rem; }
.au2-inside li > span { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 0.8rem; background: #fff; color: hsl(var(--primary)); }
.au2-inside .icon { width: 1.15rem; height: 1.15rem; }
.au2-inside b { display: block; font-size: 0.92rem; }
.au2-inside small { color: rgb(255 255 255 / 0.75); font-size: 0.78rem; }
.au2-side-foot { display: flex; align-items: center; gap: 0.45rem; margin: 0; color: rgb(255 255 255 / 0.75); font-size: 0.82rem; }
.au2-side-foot .icon { flex: none; width: 1rem; height: 1rem; }

/* ---- The form side ---- */
html.au2 .auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 1.5rem 1.25rem; background: hsl(var(--background)); }
.au2-topbar { position: absolute; top: 1.25rem; left: 1.5rem; right: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
html.au2 .auth-back { margin: 0; padding: 0.4rem 0.8rem 0.4rem 0.6rem; border-radius: 9999px; text-decoration: none; font-weight: 600; transition: background 0.2s, color 0.2s; }
html.au2 .auth-back:hover { background: hsl(var(--muted)); text-decoration: none; }
html.au2 .auth-back .icon { transition: transform 0.3s var(--au-spring); }
html.au2 .auth-back:hover .icon { transform: translateX(-3px); }
.au2-theme { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border: 0; border-radius: 50%; background: none; color: hsl(var(--muted-foreground)); cursor: pointer; transition: background 0.2s, transform 0.4s var(--au-spring); }
.au2-theme:hover { background: hsl(var(--muted)); transform: rotate(20deg); }
.au2-theme .icon { width: 1.1rem; height: 1.1rem; }
html.au2 .auth-card { width: 100%; max-width: 25rem; margin-top: 2.5rem; padding: 0; border: 0; background: none; box-shadow: none; }
.au2-head h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; }
.au2-head p { margin: 0.4rem 0 1.6rem; }
.au2-error { display: flex; align-items: flex-start; gap: 0.5rem; border-radius: 0.9rem; }
.au2-error .icon { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.1rem; }
.au2-form { gap: 1.1rem; }
.au2-field > span:first-child { font-weight: 600; }
.au2-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.au2-label-row a { font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.au2-label-row a:hover { text-decoration: underline; }
.au2-input { position: relative; display: flex; align-items: center; }
.au2-input > .icon { position: absolute; left: 0.95rem; width: 1.1rem; height: 1.1rem; color: hsl(var(--muted-foreground)); pointer-events: none; transition: color 0.2s; }
html.au2 .au2-input input, html.au2 .auth-card .field input {
  width: 100%; padding: 0.85rem 0.95rem; border: 1.5px solid hsl(var(--input)); border-radius: 0.95rem; background: hsl(var(--card));
  font-size: 1rem; transition: border-color 0.2s, box-shadow 0.25s;
}
html.au2 .au2-input input { padding-left: 2.8rem; }
html.au2 .au2-input input[data-au-password] { padding-right: 3rem; }
html.au2 .au2-input input:hover, html.au2 .auth-card .field input:hover { border-color: hsl(var(--primary) / 0.45); }
html.au2 .au2-input input:focus, html.au2 .auth-card .field input:focus { outline: none; border-color: hsl(var(--primary)); box-shadow: 0 0 0 4px hsl(var(--primary) / 0.16); }
.au2-input:focus-within > .icon { color: hsl(var(--primary-text)); }
.au2-peek { position: absolute; right: 0.45rem; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border: 0; border-radius: 0.7rem; background: none; color: hsl(var(--muted-foreground)); cursor: pointer; }
.au2-peek:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.au2-peek .icon { width: 1.1rem; height: 1.1rem; }
.au2-peek .au2-eye-off, .au2-peek[aria-pressed="true"] .au2-eye { display: none; }
.au2-peek[aria-pressed="true"] .au2-eye-off { display: block; }
.au2-caps { display: inline-flex; align-items: center; gap: 0.3rem; color: hsl(var(--warning-text)); font-weight: 600; }
.au2-caps .icon { width: 0.95rem; height: 0.95rem; }
.au2 [hidden] { display: none !important; }

html.au2 .auth-card .btn { position: relative; padding: 0.9rem 1.2rem; border-radius: 0.95rem; font-size: 1rem; font-weight: 700; background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary) / 0.82)); box-shadow: 0 1px 0 rgb(255 255 255 / 0.2) inset, 0 12px 26px -12px hsl(var(--primary)); transition: transform 0.3s var(--au-spring), box-shadow 0.3s, filter 0.2s; }
html.au2 .auth-card .btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
html.au2 .auth-card .btn:active { transform: translateY(0) scale(0.98); }
html.au2 .auth-card .btn .icon { width: 1.05rem; height: 1.05rem; transition: transform 0.3s var(--au-spring); }
html.au2 .auth-card .btn:hover .icon { transform: translateX(3px); }
.au2-spinner { display: none; width: 1.1rem; height: 1.1rem; border: 2.5px solid rgb(255 255 255 / 0.35); border-top-color: #fff; border-radius: 50%; }
.au2-submit.is-busy { pointer-events: none; filter: saturate(0.85); }
.au2-submit.is-busy > .icon { display: none; }
.au2-submit.is-busy .au2-spinner { display: block; animation: au2-spin 0.7s linear infinite; }
.au2-alt { margin-top: 1.2rem; }

.au2-divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.8rem 0 1rem; color: hsl(var(--muted-foreground)); font-size: 0.82rem; font-weight: 600; }
.au2-divider::before, .au2-divider::after { content: ""; flex: 1; height: 1px; background: hsl(var(--border)); }
.au2-paths { display: flex; flex-direction: column; gap: 0.5rem; }
.au2-paths a { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.85rem; border: 1px solid hsl(var(--border)); border-radius: 1rem; background: hsl(var(--card)); color: inherit; text-decoration: none; transition: transform 0.3s var(--au-ease), border-color 0.25s, box-shadow 0.3s; }
.au2-paths a:hover { transform: translateX(4px); border-color: hsl(var(--primary) / 0.4); box-shadow: 0 10px 24px -14px hsl(var(--primary) / 0.5); }
.au2-paths a > span:nth-child(2) { flex: 1; }
.au2-paths b { display: block; font-size: 0.92rem; }
.au2-paths small { color: hsl(var(--muted-foreground)); font-size: 0.78rem; }
.au2-paths a > .icon { width: 1rem; height: 1rem; color: hsl(var(--muted-foreground)); transition: transform 0.3s var(--au-spring); }
.au2-paths a:hover > .icon { transform: translateX(3px); color: hsl(var(--primary-text)); }
.au2-path-icon { display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; border-radius: 0.75rem; color: #fff; background: hsl(var(--primary)); }
.au2-path-icon .icon { width: 1.1rem; height: 1.1rem; }
.au2-path-sun { background: linear-gradient(135deg, hsl(var(--au-sun)), hsl(21 88% 54%)); }
.au2-path-mint { background: linear-gradient(135deg, hsl(var(--au-mint)), hsl(var(--au-sky))); }
.au2-legal { margin: 0; color: hsl(var(--muted-foreground)); font-size: 0.78rem; }
.au2-legal a { color: inherit; }

/* ---- Phones: the panel becomes a short banner ---- */
@media (max-width: 54rem) {
  html.au2 .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  html.au2 .auth-side { gap: 1rem; margin: 0.6rem 0.6rem 0; padding: 1.25rem 1.25rem 1.4rem; border-radius: 1.5rem; }
  .au2-inside, .au2-side-foot { display: none; }
  .au2-side-body h1 { font-size: 1.7rem; }
  .au2-side-body > p { margin-top: 0.4rem; font-size: 0.95rem; }
  .au2-topbar { position: static; width: 100%; max-width: 25rem; }
  html.au2 .auth-card { margin-top: 0; }
  html.au2 .auth-main { justify-content: flex-start; gap: 1rem; padding-top: 1rem; }
}

/* ---- Motion ---- */
@keyframes au2-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  .au2-mesh i:nth-child(1) { animation: au2-blob 16s ease-in-out infinite alternate; }
  .au2-mesh i:nth-child(2) { animation: au2-blob 20s ease-in-out infinite alternate-reverse; }
  .au2-mesh i:nth-child(3) { animation: au2-blob 24s ease-in-out infinite alternate; }
  .au2-side-body h1, .au2-side-body > p { animation: au2-rise 0.9s var(--au-ease) both; }
  .au2-side-body > p { animation-delay: 0.1s; }
  .au2-inside li { animation: au2-rise 0.8s var(--au-ease) both, au2-bob 6s ease-in-out infinite; animation-delay: calc(0.25s + var(--i) * 0.12s), calc(1s + var(--i) * -2s); }
  html.au2 .auth-card { animation: au2-rise 0.8s var(--au-ease) 0.1s both; }
  .au2-error { animation: au2-shake 0.5s; }
  .au2-logo { animation: au2-pop 0.7s var(--au-spring) both; }
}
@keyframes au2-blob { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(3rem, 2rem) scale(1.12); } 100% { transform: translate(-2rem, 3rem) scale(0.95); } }
@keyframes au2-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes au2-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes au2-pop { from { opacity: 0; transform: scale(0.6) rotate(-10deg); } to { opacity: 1; transform: none; } }
@keyframes au2-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
html.au2 .auth-card .au2-input input { padding-left: 2.8rem; }
html.au2 .auth-card .au2-input input[data-au-password] { padding-right: 3rem; }
html.au2 .auth-card > h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; }
