/* ============ Base ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
:root {
  --aurora-1: #35f2a8;
  --aurora-2: #46b8ff;
  --ink-1: #0a372d;
  --ink-2: #0d3028;
  --ink-3: #102a23; /* teks input */
  --muted: #6a8780; /* placeholder/label sekunder */
  --brand: #17b678;
  --brand-2: #14b882;
}

/* ============ Layout Split ============ */
.split {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Left (info) */
.left {
  flex: 1.25;
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  padding: 40px;
  background: radial-gradient(circle at 20% 40%, var(--aurora-1) 0%, transparent 50%), radial-gradient(circle at 80% 60%, var(--aurora-2) 0%, transparent 50%), linear-gradient(120deg, #0d2340, #0e3a2f 90%);
  background-size: 200% 200%;
  animation: auroraMove 12s ease-in-out infinite alternate;
}
@keyframes auroraMove {
  0% {
    background-position: 0% 0%, 100% 100%, 0% 0%;
  }
  100% {
    background-position: 100% 100%, 0% 0%, 100% 100%;
  }
}
.left .overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.08), transparent 70%);
}
.left .content {
  position: relative;
  max-width: 560px;
  animation: fadeUp 0.7s ease-out both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.left .logo {
  width: 140px;
  height: auto;
  margin-bottom: 22px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.28));
}
.left h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
}
.left .app-name {
  color: #aefcda;
}
.left .tagline {
  margin: 10px 0 16px;
  font-size: 18px;
  font-weight: 600;
  opacity: 0.95;
}
.left .desc {
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.88;
}

/* Right (form) — LEBIH CERAH & SOLID PUTIH */
.right {
  flex: 0.75;
  display: grid;
  place-items: center;
  /* solid putih dengan hint hijau sangat lembut */
  background: linear-gradient(135deg, #ffffff 0%, #fbfffd 55%, #f3fff8 100%);
  /* hilangkan efek blur supaya kontras tidak tercampur */
  backdrop-filter: none;
  position: relative;
  /* inner glow halus agar panel berasa terang */
  box-shadow: inset 0 0 60px rgba(23, 180, 110, 0.08);
}

/* Form */
.login-form {
  width: min(92%, 360px);
  background: #ffffff; /* FULL PUTIH biar kontras maksimal */
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
  animation: formIn 0.8s ease-out both;
}
@keyframes formIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.login-form h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--ink-1);
  font-weight: 800;
  font-size: 20px;
}

/* Fields */
.field {
  margin-bottom: 14px;
}
label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
input {
  width: 100%;
  background: #ffffff;
  color: var(--ink-3); /* TEKS LEBIH GELAP */
  border: 1px solid rgba(0, 0, 0, 0.22); /* BORDER LEBIH TEGAS */
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px; /* SEDIKIT LEBIH BESAR */
  outline: none;
  transition: 0.2s;
  caret-color: var(--brand-2);
}
input::placeholder {
  color: var(--muted); /* PLACEHOLDER KONTRAS JELAS */
  opacity: 1; /* jangan terlalu pudar */
}
input:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(20, 184, 130, 0.22);
}

/* Fix autofill (biar nggak kuning & teks tetap kontras) */
input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink-3) !important;
  transition: background-color 5000s ease-in-out 0s;
}
input:-webkit-autofill,
input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(20, 184, 130, 0.22);
  border-color: var(--brand-2);
}

/* Password eye */
.pw-wrap {
  position: relative;
}
.eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 2px;
}
.eye svg {
  fill: #166f58;
  opacity: 0.9;
}

/* Button */
.btn-login {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: #fff;
  background: linear-gradient(135deg, #1fd29a, var(--brand));
  box-shadow: 0 10px 24px rgba(24, 180, 110, 0.35);
  cursor: pointer;
  transition: transform 0.06s ease, filter 0.2s ease;
}
.btn-login:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.btn-login:active {
  transform: translateY(0);
}
.btn-login[aria-busy='true'] {
  filter: saturate(0.75) brightness(0.96);
  cursor: wait;
}

/* Footer */
.footer {
  margin-top: 16px;
  font-size: 12px;
  text-align: center;
  color: #2c5548;
  opacity: 0.85;
}

/* ============ Responsiveness ============ */
@media (max-width: 900px) {
  .split {
    flex-direction: column;
  }
  .left {
    padding: 28px 18px;
    height: 44vh;
  }
  .left .logo {
    width: 120px;
  }
  .left h1 {
    font-size: 32px;
  }
  .left .tagline {
    font-size: 16px;
  }
  .right {
    height: 56vh;
  }
}

/* Optional dark-mode tune */
@media (prefers-color-scheme: dark) {
  .right {
    background: linear-gradient(135deg, #1e1e1e, #2d2d2d);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.2);
  }
  .login-form {
    background: rgba(255, 255, 255, 0.92);
  }
  input {
    background: #fff;
    color: #0f1f1a;
  }
  input::placeholder {
    color: #5f6f6a;
  }
}

/* ======= Toast (notifikasi pojok kanan atas) ======= */
.toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #083026;
  background: #eafff5;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.success {
  background: #eafff5;
  color: #0a3a2e;
}
.toast.error {
  background: #fff0f0;
  color: #5a0e0e;
}
.toast.hide {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
