/*
 * Halaman login LMS IIFLL dengan design system situs IIFLL: panel hero biru baja dengan medan huruf yang bergerak
 * dan judul yang "terurai", menyatu ke sisi formulir tanpa sambungan keras. Dimuat lewat additionalhtmlhead.
 */
body.pagelayout-login {
  --iifll-deep: #142a44;
  --iifll-navy: #0e1b2c;
  --iifll-blue: #2c5680;
  --iifll-blue-d: #1d3f62;
  --iifll-steel-light: #86aacb;
  --iifll-ink: #1b2230;
  --iifll-text: #2a2f37;
  --iifll-muted: #545d6b;
  --iifll-rule: rgba(27, 34, 48, 0.16);
  --iifll-on-dark-muted: #d5dbe3;
  --iifll-grad-hero: radial-gradient(70% 90% at 85% 15%, rgba(134, 170, 203, 0.22), transparent 60%),
    linear-gradient(160deg, #0e1b2c 0%, #142a44 45%, #23466b 85%, #2c5680 100%);
  background: #fff;
  color: var(--iifll-text);
}

body.pagelayout-login #page-content {
  position: relative;
  isolation: isolate;
}

/* Medan huruf: satu kanvas untuk seluruh halaman, di belakang kedua panel. */
body.pagelayout-login .iifll-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Panel kiri: gradien hero situs, menggantikan foto bawaan Moodle. */
body.pagelayout-login #page .login-layout-left {
  position: relative;
  background: var(--iifll-grad-hero) !important;
  color: #fff;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}
body.pagelayout-login #page .login-layout-left::after {
  content: none !important;
}
body.pagelayout-login .login-layout-left-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 42rem;
  padding: 4rem clamp(2rem, 4vw, 4.5rem);
  margin: 0;
  text-align: left;
  background: none;
  box-shadow: none;
  color: #fff;
}
body.pagelayout-login .login-layout-left-content > div {
  margin: 0 !important;
}

body.pagelayout-login .iifll-eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--iifll-steel-light);
  margin: 0 0 1.75rem;
}
body.pagelayout-login .iifll-decode {
  position: relative;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(1.75rem, 2.35vw, 3rem);
  line-height: 1.12;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 1.75rem;
}
body.pagelayout-login .iifll-decode .line {
  display: block;
}
body.pagelayout-login .iifll-decode .word {
  white-space: nowrap;
}
body.pagelayout-login .iifll-decode .ch {
  position: relative;
  display: inline-block;
}
/* Huruf akhir menahan lebar; huruf acak ditumpuk di atasnya sehingga tata letak tidak bergeser. */
body.pagelayout-login .iifll-decode .ch.scramble > .final {
  visibility: hidden;
}
body.pagelayout-login .iifll-decode .ch > .glyph {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--iifll-steel-light);
}
body.pagelayout-login .iifll-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
body.pagelayout-login .iifll-lede {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--iifll-on-dark-muted);
  max-width: 30rem;
  margin: 0;
}

/* Panel kanan: transparan agar huruf yang meluber dari panel hero terlihat memudar di sisi formulir. */
body.pagelayout-login #page .login-layout-right {
  position: relative;
  z-index: 2;
  background: transparent;
}
body.pagelayout-login .login-container {
  max-width: 25rem;
  margin-inline: auto;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border-radius: 6px;
  box-shadow: none;
}
body.pagelayout-login .loginform #loginlogo img {
  max-height: 96px;
  width: auto;
}
body.pagelayout-login .iifll-form-eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--iifll-blue);
  margin: 0 0 0.5rem;
}
body.pagelayout-login .loginform h1 {
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--iifll-ink);
}
body.pagelayout-login .loginform .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--iifll-ink);
}
body.pagelayout-login .loginform .form-control {
  min-height: 3rem;
  border-radius: 4px;
  border-color: var(--iifll-rule);
  background-color: #fff;
}
body.pagelayout-login .loginform .form-control:focus {
  border-color: var(--iifll-blue);
  box-shadow: 0 0 0 3px rgba(44, 86, 128, 0.25);
}
body.pagelayout-login .loginform .toggle-sensitive-btn {
  border-color: var(--iifll-rule);
  border-radius: 0 4px 4px 0;
}
body.pagelayout-login #loginbtn {
  min-height: 3rem;
  border-radius: 4px;
  border: 0;
  background: var(--iifll-deep);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background-color 0.2s ease;
}
body.pagelayout-login #loginbtn:hover,
body.pagelayout-login #loginbtn:focus-visible {
  background: var(--iifll-blue);
}
body.pagelayout-login .loginform a {
  color: var(--iifll-blue);
}
body.pagelayout-login .loginform a:hover {
  color: var(--iifll-blue-d);
}

/* Layar kecil: panel hero tampil sebagai pita di atas formulir (Moodle menyembunyikannya). */
@media (max-width: 991.98px) {
  body.pagelayout-login #page .login-layout-left {
    display: flex !important;
    position: relative;
    height: auto;
    min-height: 0;
    padding: 0;
  }
  body.pagelayout-login #page .login-layout-right {
    min-height: 0;
    padding: 1.75rem 1rem 3rem;
  }
  body.pagelayout-login .login-layout-left-content {
    padding: 2.25rem 1.5rem 2rem;
  }
  body.pagelayout-login .iifll-eyebrow {
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
  }
  body.pagelayout-login .iifll-decode {
    font-size: clamp(1.4rem, 0.9rem + 3.4vw, 2rem);
    margin-bottom: 0.75rem;
  }
  body.pagelayout-login .iifll-lede {
    font-size: 0.9375rem;
    margin-bottom: 0;
  }
    /* Petunjuk yang sama sudah tampil di pita hero. */
  body.pagelayout-login .loginform .d-lg-none.small {
    display: none !important;
  }
  body.pagelayout-login .loginform #loginlogo {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.pagelayout-login #loginbtn {
    transition: none;
  }
}

/* Link to registration on the main IIFLL site (accounts are created after registration). */
body.pagelayout-login .iifll-login-site {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}
body.pagelayout-login .iifll-login-site a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Participants: sign in with the IIFLL site account (local/iifll/sso.php via the site's /lms). */
body.pagelayout-login .iifll-login-sso {
  margin: 1.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
body.pagelayout-login .iifll-login-sso__btn {
  align-self: flex-start;
  display: inline-block;
  padding: 0.8rem 1.25rem;
  background: #fff;
  color: #142a44;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
body.pagelayout-login .iifll-login-sso__btn:hover,
body.pagelayout-login .iifll-login-sso__btn:focus {
  background: #e8eef5;
  color: #142a44;
}
body.pagelayout-login .iifll-login-sso span {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.72);
}
