/* BASE CAMP 6 — latar halaman login (gambar lembah + animasi ringan).
   Dimuat SETELAH style.css; hanya mengatur halaman login. */

.login-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: #162a2c;
  color: #10241a;
  overflow-x: hidden;
}

/* ---------- Lapisan latar ---------- */
.login-scene {
  position: fixed;
  inset: -16px;                 /* sisa ruang untuk efek paralaks */
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.login-scene__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

/* Kabut lembah bergerak pelan */
.login-scene__mist {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(222, 233, 223, .55) 0%, rgba(222, 233, 223, .22) 45%, rgba(222, 233, 223, 0) 72%);
  filter: blur(18px);
}
.login-scene__mist--a { top: 52%; animation: login-mist-a 20s ease-in-out infinite; }
.login-scene__mist--b { top: 62%; height: 16%; animation: login-mist-b 15s ease-in-out infinite; }

@keyframes login-mist-a {
  0%, 100% { transform: translateX(-4%); opacity: .55; }
  50%      { transform: translateX(4%);  opacity: .8; }
}
@keyframes login-mist-b {
  0%, 100% { transform: translateX(5%);  opacity: .4; }
  50%      { transform: translateX(-5%); opacity: .65; }
}

/* Gelapkan sedikit agar kartu & teks tetap terbaca */
.login-scene__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 45%, rgba(8, 20, 16, .10), rgba(8, 20, 16, .45)),
    linear-gradient(180deg, rgba(8, 20, 16, .15) 0%, rgba(8, 20, 16, 0) 30%, rgba(8, 20, 16, .35) 100%);
}

.login-scene__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Kartu login ---------- */
.login-page .auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  background: none;
}

.login-page .auth-card {
  width: min(100%, 420px);
  padding: 28px 26px 22px;
  border-radius: 24px;
  background: rgba(255, 252, 244, .90);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 24px 60px rgba(4, 14, 10, .45), inset 0 1px 0 rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  animation: login-card-in .6s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes login-card-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.login-page .auth-brand { margin-bottom: 14px; }
.login-page .eyebrow { color: #2f6b4f; letter-spacing: .14em; }
.login-page h2 { margin: 4px 0 2px; color: #13281d; }
.login-page .muted { color: #4b5d53; }

.login-page .field input {
  min-height: 48px;
  font-size: 16px;               /* cegah zoom otomatis di iPhone */
  background: #fff;
  color: #13281d;                /* style.css lama memakai teks terang (tema gelap) */
  -webkit-text-fill-color: #13281d;
  caret-color: #23633d;
  border: 1.5px solid #c9d6cd;
  border-radius: 12px;
}
.login-page .field input::placeholder { color: #8a9a90; -webkit-text-fill-color: #8a9a90; }
/* Isian otomatis browser (Chrome/Android) tetap terbaca */
.login-page .field input:-webkit-autofill,
.login-page .field input:-webkit-autofill:hover,
.login-page .field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #13281d;
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  caret-color: #23633d;
  transition: background-color 9999s ease-out 0s;
}
.login-page .field input:focus-visible {
  outline: 3px solid #f2b705;
  outline-offset: 1px;
}

.login-page .btn.primary {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
  border-radius: 14px;
  margin-top: 6px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, #3a8a58 0%, #23633d 100%);
  box-shadow: 0 8px 18px rgba(20, 70, 40, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.login-page .btn.primary:hover { filter: brightness(1.06); }
.login-page .btn.primary:active { transform: translateY(1px); }
.login-page .auth-brand small { color: #5f7f6b; }
.login-page .alert.error {
  background: #fdecea;
  color: #8a2a1f;
  border: 1px solid #f3c2bb;
  border-radius: 12px;
}

.login-page .bc-remember-device {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-weight: 600;
}
.login-page .bc-remember-device input { width: 20px; height: 20px; }

.login-page .note { color: #55665c; }

/* Tombol tampil/sembunyikan password */
.login-pass { position: relative; }
.login-pass input { padding-right: 76px; }
.login-pass__toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #e8efe9;
  color: #234433;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.login-credit {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 248, 224, .85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
  pointer-events: none;
}

@media (max-width: 480px) {
  /* HP: pemandangan terlihat di atas, kartu di bawah */
  .login-page .auth-wrap { justify-content: flex-start; padding: max(7vh, 36px) 12px 14px; }
  .login-page .auth-card { padding: 20px 18px 16px; border-radius: 22px; }
  .login-page .auth-logo { width: 52px; height: 52px; }
  .login-page .auth-brand { margin-bottom: 8px; }
  .login-page h2 { font-size: 22px; }
  .login-page .auth-card > .note:last-child { font-size: 12px; }
  .login-scene__img { object-position: 22% 100%; }   /* tampilkan api unggun & tenda */
}
@media (max-width: 480px) and (min-height: 820px) {
  .login-page .auth-wrap { padding-top: 16vh; }   /* HP tinggi: beri ruang pemandangan di atas */
}
@media (max-width: 480px) and (max-height: 680px) {
  .login-page .auth-wrap { padding-top: 12px; }
  .login-page .auth-card > p.muted { display: none; }
}

/* Hormati pengaturan "kurangi gerakan" */
/* Mode gelap ARTAMA tidak boleh mengubah kartu login yang terang */
html[data-theme="dark"] .login-page .field input,
.dark .login-page .field input { background: #fff; color: #13281d; -webkit-text-fill-color: #13281d; }

@media (prefers-reduced-motion: reduce) {
  .login-scene, .login-scene__mist, .login-page .auth-card { animation: none !important; transition: none !important; }
}
