/* School ERP auth — login / signup (aligned with KYDSAFE chrome) */

.lp-auth {
  --lp-ink: #162447;
  --lp-ink-soft: #1e3260;
  --lp-gold: #162447;
  --lp-amber: #e8c21a;
  --lp-mark: #e8c21a;
  --lp-paper: #eef3fb;
  --lp-muted: #475569;
  --lp-hint: #64748b;
  --lp-line: rgba(22, 36, 71, 0.12);
  --lp-display: "Manrope", system-ui, sans-serif;
  --lp-sans: "Manrope", system-ui, sans-serif;
  --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--lp-ink);
  background: var(--lp-paper);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.lp-auth,
.lp-auth * {
  font-family: var(--lp-sans);
  box-sizing: border-box;
}

.lp-auth .lp-display {
  font-family: var(--lp-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.lp-auth__visual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  min-height: 100vh;
  min-height: 100dvh;
}

.lp-auth__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--lp-ink);
  background-image: var(--lp-hero-image);
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.04);
  animation: lp-auth-kenburns 28s var(--lp-ease) infinite alternate;
}

.lp-auth__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(12, 20, 40, 0.5) 0%, rgba(12, 20, 40, 0.35) 40%, rgba(12, 20, 40, 0.92) 100%),
    linear-gradient(90deg, rgba(12, 20, 40, 0.4) 0%, transparent 70%);
}

.lp-auth__logo {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  text-decoration: none;
  width: fit-content;
}

.lp-auth__logo:hover { color: #fff; }

.lp-auth__logo-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--lp-mark), #c9a512);
  color: var(--lp-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.lp-auth__logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.lp-auth__logo-text span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe08a;
  opacity: 0.95;
}

.lp-auth__visual-inner {
  position: relative;
  z-index: 2;
  max-width: 28rem;
  padding: 1.35rem 1.4rem 1.45rem;
  border-radius: 16px;
  background: rgba(12, 20, 40, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: lp-auth-rise 0.85s var(--lp-ease) both;
}

.lp-auth__kicker {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffe08a;
}

.lp-auth__tagline {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.65rem;
  color: #fff;
}

.lp-auth__lede {
  margin: 0;
  color: #e8eef8;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
}

.lp-auth__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  background: #fff;
  animation: lp-auth-rise 0.85s var(--lp-ease) 0.1s both;
}

.lp-auth__panel-inner {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}

.lp-auth--signup .lp-auth__panel-inner {
  max-width: 30rem;
}

.lp-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  color: var(--lp-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.lp-auth__back:hover { color: var(--lp-ink); }

.lp-auth__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lp-ink-soft);
  margin: 0 0 0.65rem;
}

.lp-auth__title {
  font-size: clamp(1.65rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.45rem;
  color: var(--lp-ink);
  line-height: 1.15;
}

.lp-auth__subtitle {
  margin: 0 0 1.5rem;
  color: var(--lp-muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}

/* Critical: display:flex must not override [hidden] */
.lp-auth__alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid transparent;
}

.lp-auth__alert[hidden] {
  display: none !important;
}

.lp-auth__alert--error,
.lp-auth__alert--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.lp-auth__form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.lp-auth__field {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lp-auth__field label,
.lp-auth__form .form-label {
  display: block;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--lp-ink);
}

.lp-auth__hint {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--lp-hint);
}

.lp-auth__form .form-control,
.lp-auth__form input,
.lp-auth__form select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #d0d8e4;
  border-radius: 10px;
  background: #fff;
  color: var(--lp-ink);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lp-auth__password-wrap {
  position: relative;
}

.lp-auth__password-wrap .form-control {
  padding-right: 2.75rem;
}

.lp-auth__password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--lp-hint);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lp-auth__password-toggle:hover {
  background: var(--lp-paper);
  color: var(--lp-ink);
}

.lp-auth__form .form-control:focus,
.lp-auth__form input:focus,
.lp-auth__form select:focus {
  outline: none;
  border-color: var(--lp-ink);
  box-shadow: 0 0 0 3px rgba(22, 36, 71, 0.12);
  background: #fff;
}

.lp-auth__form .form-control:-webkit-autofill,
.lp-auth__form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--lp-ink);
  transition: background-color 9999s ease-out;
}

.lp-auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -0.25rem 0 0;
}

.lp-auth__remember {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--lp-muted);
  cursor: pointer;
}

.lp-auth__remember input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--lp-ink);
}

.lp-auth__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.1rem;
  margin-top: 0.35rem;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: var(--lp-ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(22, 36, 71, 0.22);
  transition: background 0.2s ease, transform 0.2s var(--lp-ease), box-shadow 0.2s ease;
}

.lp-auth__submit:hover {
  background: var(--lp-ink-soft);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(22, 36, 71, 0.28);
}

.lp-auth__submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.lp-auth__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
}

.lp-auth__trust li {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--lp-paper);
  color: var(--lp-ink-soft);
  font-size: 0.75rem;
  font-weight: 650;
}

.lp-auth__footer {
  margin-top: 1.65rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--lp-line);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--lp-muted);
  text-align: center;
}

.lp-auth__footer a {
  color: var(--lp-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lp-auth__footer a:hover { color: var(--lp-ink-soft); }

@keyframes lp-auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes lp-auth-kenburns {
  from { transform: scale(1.04); }
  to { transform: scale(1.1) translate3d(-1%, -1%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .lp-auth__media { animation: none; transform: scale(1.03); }
  .lp-auth__visual-inner,
  .lp-auth__panel { animation: none; }
}

@media (max-width: 900px) {
  .lp-auth { grid-template-columns: 1fr; }

  .lp-auth__visual {
    min-height: 32vh;
    padding: 1.25rem 1.25rem 1.5rem;
    justify-content: flex-end;
    gap: 1.25rem;
  }

  .lp-auth__logo {
    position: absolute;
    top: 1.1rem;
    left: 1.25rem;
  }

  .lp-auth__panel { padding: 1.65rem 1.2rem 2.25rem; }
}
