/* ==========================================================================
   K12 PDTracker — Login (Option A: full-bleed split brand panel)
   Scoped to the /index login page only (linked from views/index.ejs).
   Brand: Primary #6e3dae · Deep #4d1979 · Ink #221f20 · Gray #a3a9ac
   ========================================================================== */

html,
body {
  height: 100%;
}

/* This stylesheet loads only on the login page, so overriding body here is safe.
   The shared auth layout centers/pads the body; the split fills edge to edge. */
body {
  margin: 0;
  padding: 0;
  background: #fff;
}

.k12-auth {
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  color: #221f20;
  font-family: "Gotham Book", "Gotham", Arial, Helvetica, sans-serif;
}

/* --------------------------------------------------------------------------
   Brand panel (left)
   -------------------------------------------------------------------------- */
.k12-auth__brand {
  flex: 0 0 42%;
  max-width: 520px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(130% 110% at 20% 0%, #7d47c4 0%, #6e3dae 45%, #4d1979 100%);
}

/* soft light bloom, bottom-right */
.k12-auth__brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 40% at 90% 100%, rgba(255, 255, 255, 0.14), transparent 60%);
  pointer-events: none;
}

.k12-auth__brand-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.k12-auth__logo {
  width: auto;
  height: 56px;
  align-self: flex-start;
}

.k12-auth__tagline {
  margin: 0;
  max-width: 15ch;
  font-family: "Gotham Bold", "Gotham Medium", "Gotham", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.k12-auth__trust {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.k12-auth__trust li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
}

.k12-auth__trust i {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.85);
}

/* --------------------------------------------------------------------------
   Form panel (right)
   -------------------------------------------------------------------------- */
.k12-auth__panel {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: #fff;
}

.k12-auth__panel-inner {
  width: 100%;
  max-width: 380px;
}

.k12-auth__title {
  margin: 0;
  font-family: "Gotham Bold", "Gotham Medium", "Gotham", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: #221f20;
}

.k12-auth__subtitle {
  margin: 0.35rem 0 1.6rem;
  font-size: 0.95rem;
  color: #6b6570;
}

/* fields ------------------------------------------------------------------- */
.k12-field {
  margin-bottom: 1rem;
}

.k12-field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6570;
}

.k12-auth .input-group {
  overflow: hidden;
  border: 1.5px solid #ded8e8;
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.k12-auth .input-group:focus-within {
  border-color: #6e3dae;
  box-shadow: 0 0 0 3px rgba(110, 61, 174, 0.16);
}

.k12-auth .input-group-text {
  padding-left: 0.95rem;
  border: 0;
  background: transparent;
  color: #6e3dae;
}

.k12-auth .input-group .form-control {
  border: 0;
  box-shadow: none;
  padding: 0.7rem 0.85rem 0.7rem 0.25rem;
  font-size: 0.98rem;
}

.k12-auth .input-group .form-control:focus {
  box-shadow: none;
}

/* show/hide password eye */
.k12-eye {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.9rem;
  border: 0;
  background: transparent;
  color: #a3a9ac;
  cursor: pointer;
  transition: color 0.15s;
}

.k12-eye:hover {
  color: #6e3dae;
}

/* remember / forgot row ---------------------------------------------------- */
.k12-auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.k12-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.9rem;
  color: #4a4551;
  cursor: pointer;
}

.k12-check .form-check-input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  cursor: pointer;
}

.k12-check .form-check-input:checked {
  background-color: #6e3dae;
  border-color: #6e3dae;
}

.k12-link {
  color: #6e3dae;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.k12-link:hover {
  text-decoration: underline;
}

/* turnstile + submit ------------------------------------------------------- */
.k12-auth__turnstile {
  margin: 1.1rem 0;
}

.k12-auth__submit {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 11px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #6e3dae, #4d1979);
  box-shadow: 0 8px 20px -8px rgba(77, 25, 121, 0.7);
  transition: transform 0.12s, box-shadow 0.16s, opacity 0.16s;
}

.k12-auth__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(77, 25, 121, 0.85);
}

.k12-auth__submit:active:not(:disabled) {
  transform: translateY(0);
}

.k12-auth__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* alternate sign-in -------------------------------------------------------- */
.k12-auth__alt {
  margin-top: 1.6rem;
}

.k12-auth__divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
  color: #a3a9ac;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.k12-auth__divider::before,
.k12-auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e6e1ee;
}

.g_id_signin {
  display: flex;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   MFA challenge
   -------------------------------------------------------------------------- */
.k12-auth__methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.k12-mpill {
  padding: 0.5rem 0.9rem;
  border: 1.5px solid #ded8e8;
  border-radius: 999px;
  background: #fff;
  color: #4a4551;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.k12-mpill:hover {
  border-color: #d9cdeb;
}

.k12-mpill.is-on {
  background: #6e3dae;
  border-color: #6e3dae;
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(110, 61, 174, 0.6);
}

.k12-linkbtn {
  margin-bottom: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6e3dae;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.k12-linkbtn:hover {
  text-decoration: underline;
}

.k12-otp {
  display: flex;
  gap: 0.5rem;
}

.k12-otp__box {
  flex: 1 1 0;
  min-width: 0;
  max-width: 3.25rem;
  aspect-ratio: 1 / 1;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #221f20;
  border: 1.5px solid #ded8e8;
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.k12-otp__box:focus {
  outline: 0;
  border-color: #6e3dae;
  box-shadow: 0 0 0 3px rgba(110, 61, 174, 0.16);
}

.k12-auth__mfa-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.k12-auth__mfa-actions .k12-auth__submit {
  flex: 1;
  width: auto;
}

/* --------------------------------------------------------------------------
   Responsive: stack the brand band above the form on small screens
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .k12-auth {
    flex-direction: column;
  }

  .k12-auth__brand {
    flex: none;
    max-width: none;
  }

  .k12-auth__brand-inner {
    min-height: 190px;
    padding: 1.75rem;
    gap: 1.25rem;
  }

  .k12-auth__logo {
    height: 46px;
  }

  /* keep the mobile viewport focused on the form */
  .k12-auth__trust {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .k12-auth__submit,
  .k12-mpill,
  .k12-eye,
  .k12-otp__box,
  .k12-auth .input-group {
    transition: none;
  }
}
