/*
 * SEUMANGAT — halaman masuk.
 *
 * Struktur mengikuti pola LiteDapuPOS: dua kolom di layar lebar, dan di
 * ponsel panel hero disembunyikan sementara kolom form mengambil alih
 * latar bergradasi dengan kartu putih mengambang di atasnya.
 *
 * Palet tetap memakai turunan logo Kemenkes, bukan biru POS, agar
 * konsisten dengan seluruh aplikasi.
 *
 * Font memakai system stack. Google Fonts sengaja tidak dipakai karena
 * permintaan ke CDN pihak ketiga mengirim IP pengguna keluar, dan itu
 * bermasalah untuk aplikasi yang menangani data kesehatan.
 */

body.sm-body--login {
  margin: 0;
  min-height: 100vh;
  background: #f4f7f6;
  overflow-x: hidden;
}

#wpadminbar {
  display: none !important;
}

html {
  margin-top: 0 !important;
}

.sml {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ------------------------------------------------------------------ */
/* Kolom kiri: hero                                                    */
/* ------------------------------------------------------------------ */

.sml__aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 44px 42px;
  min-height: 100vh;
  color: #ffffff;
  background:
    var(--sml-bg-image, none),
    linear-gradient(150deg, var(--sm-teal-500) 0%, var(--sm-teal-700) 55%, var(--sm-teal-800) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Overlay agar teks tetap terbaca di atas foto apa pun. */
.sml__aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(0, 60, 55, 0.28) 0%, rgba(0, 40, 36, 0.62) 100%);
  pointer-events: none;
}

/* Dekorasi mengambang. */
.sml__aside::after {
  content: "";
  position: absolute;
  top: -18%;
  right: -14%;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 217, 46, 0.22) 0%, transparent 70%);
  pointer-events: none;
  animation: sml-float 9s ease-in-out infinite;
}

@keyframes sml-float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-22px, 30px); }
}

@media (prefers-reduced-motion: reduce) {
  .sml__aside::after {
    animation: none;
  }
}

.sml__herotext {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.sml__tagline {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sm-lime-500);
}

.sml__headline {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.6px;
  color: #ffffff;
}

.sml__lede {
  margin: 0 0 30px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 420px;
}

.sml__points {
  position: relative;
  z-index: 1;
}

.sml__point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}

.sml__point:last-child {
  margin-bottom: 0;
}

.sml__pointicon {
  min-width: 32px;
  height: 32px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.sml__pointtext {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.sml__pointtext strong {
  display: block;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1px;
}

/* ------------------------------------------------------------------ */
/* Kolom kanan: form                                                   */
/* ------------------------------------------------------------------ */

.sml__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  background: #ffffff;
  min-height: 100vh;
}

.sml__card {
  width: 100%;
  max-width: 400px;
}

.sml__cardinner {
  background: transparent;
  text-align: center;
}

/* Hero versi ponsel, disembunyikan di layar lebar. */
.sml__mobilehero {
  display: none;
}

.sml__logo {
  text-align: center;
  margin-bottom: 30px;
}

.sml__logoimg {
  height: 96px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.sml__logofallback {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--sm-teal-600), var(--sm-teal-800));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sm-lime-500);
  box-shadow: 0 4px 16px rgba(0, 121, 107, 0.3);
}

.sml__logoname {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sm-ink-muted);
}

.sml__brandsub {
  text-align: center;
  margin: -18px 0 26px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--sm-teal-700);
}

.sml__welcome {
  text-align: center;
  margin-bottom: 22px;
}

.sml__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--sm-ink);
}

.sml__subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--sm-ink-muted);
}

.sml__alert {
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  text-align: left;
}

.sml__alert--error {
  background: var(--sm-danger-bg);
  border: 1px solid rgba(185, 28, 28, 0.25);
  color: var(--sm-danger);
}

.sml__alert--info {
  background: var(--sm-teal-50);
  border: 1px solid var(--sm-teal-100);
  color: var(--sm-teal-800);
}

.sml__field {
  display: block;
  margin-bottom: 17px;
  text-align: left;
}

.sml__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--sm-ink-muted);
  margin-bottom: 7px;
}

.sml__inputwrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sml__inputicon {
  position: absolute;
  left: 13px;
  color: var(--sm-ink-faint);
  pointer-events: none;
  display: flex;
}

.sml__input {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px 12px 41px;
  border: 1.5px solid var(--sm-line);
  border-radius: 11px;
  background: #fafbfb;
  color: var(--sm-ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.sml__input:focus {
  border-color: var(--sm-teal-600);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.12);
}

.sml__input::placeholder {
  color: var(--sm-ink-faint);
}

.sml__toggle {
  position: absolute;
  right: 8px;
  min-width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: var(--sm-ink-faint);
  cursor: pointer;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sml__toggle:hover {
  color: var(--sm-teal-700);
}

.sml__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.sml__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sm-ink-muted);
  cursor: pointer;
}

.sml__remember input {
  width: 17px;
  height: 17px;
  accent-color: var(--sm-teal-700);
}

.sml__forgot {
  font-size: 13px;
  color: var(--sm-teal-700);
  text-decoration: none;
  font-weight: 600;
}

.sml__forgot:hover {
  text-decoration: underline;
}

.sml__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 13px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--sm-teal-600), var(--sm-teal-800));
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: filter 0.15s, box-shadow 0.15s, transform 0.1s;
}

.sml__submit:hover {
  filter: brightness(1.06);
  box-shadow: 0 4px 14px rgba(0, 121, 107, 0.32);
}

.sml__submit:active {
  transform: translateY(1px);
}

.sml__submit:disabled {
  background: var(--sm-line-strong);
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

.sml__submit.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: sml-spin 0.7s linear infinite;
}

@keyframes sml-spin {
  to { transform: rotate(360deg); }
}

.sml__note {
  margin: 26px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--sm-ink-faint);
  text-align: center;
}

.sml__note a {
  color: var(--sm-teal-700);
  text-decoration: none;
  font-weight: 600;
}

.sml__note a:hover {
  text-decoration: underline;
}

.sml__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--sm-ink-faint);
  text-decoration: none;
}

.sml__back:hover {
  color: var(--sm-ink-muted);
}

/* ------------------------------------------------------------------ */
/* Tablet dan ponsel: hero jadi latar, form jadi kartu mengambang       */
/* ------------------------------------------------------------------ */

@media (max-width: 1023px) {
  .sml {
    grid-template-columns: 1fr;
  }

  .sml__aside {
    display: none;
  }

  .sml__main {
    position: relative;
    min-height: 100vh;
    padding: 30px 18px;
    align-items: flex-start;
    background:
      var(--sml-bg-overlay, linear-gradient(180deg, var(--sm-teal-600) 0%, var(--sm-teal-700) 34%, #ffffff 74%, #ffffff 100%)),
      var(--sml-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .sml__card {
    position: relative;
    z-index: 1;
    max-width: 440px;
    margin: 0 auto;
  }

  .sml__cardinner {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 60, 55, 0.14), 0 2px 6px rgba(0, 60, 55, 0.06);
    padding: 30px 22px 24px;
  }

  .sml__mobilehero {
    display: block;
    text-align: center;
    color: #ffffff;
    padding: 6px 4px 22px;
  }

  .sml__mobilehero .sml__tagline {
    font-size: 11px;
    letter-spacing: 1.8px;
    margin-bottom: 9px;
  }

  .sml__mobilehero .sml__headline {
    font-size: 25px;
    margin-bottom: 7px;
  }

  .sml__mobilehero .sml__lede {
    font-size: 13px;
    margin: 0 auto;
    max-width: 350px;
  }

  .sml__logo {
    margin-bottom: 20px;
  }

  .sml__welcome {
    margin-bottom: 20px;
  }

  .sml__note {
    margin-top: 20px;
    font-size: 11.5px;
  }
}

@media (max-width: 480px) {
  .sml__main {
    padding: 20px 12px 26px;
  }

  .sml__mobilehero {
    padding: 2px 4px 18px;
  }

  .sml__mobilehero .sml__headline {
    font-size: 21px;
  }

  .sml__mobilehero .sml__lede {
    font-size: 12.5px;
  }

  .sml__cardinner {
    padding: 26px 18px 20px;
  }

  .sml__title {
    font-size: 19px;
  }
}
