/* ============================================================
   MyCPNS — Kartu Auth Geser (Login <-> Daftar)
   Pasangan: sliding-auth.js
   Membutuhkan juga: password-strength.css (indikator password
   di form Daftar + class .btn-gradient untuk tombol).
   Panel: gradasi flat Ungu #8b5cf6 -> Biru #2e6be6 (pilihan Danzen).
   Font: "Plus Jakarta Sans" (pilihan Danzen) — muat dulu font-nya
   (Google Fonts wght 400;600;700;800 atau @font-face lokal), fallback sistem.
   Di layar <= 680px panel disembunyikan dan diganti tab Masuk|Daftar.
   ============================================================ */

.auth-card {
  position: relative;
  width: 740px;
  max-width: 100%;
  height: 660px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e3e9f2;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(18, 46, 87, 0.12);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #16345f;
}

/* Tab pengganti panel — hanya tampil di layar kecil */
.auth-tabs {
  display: none;
}

/* --- Form (di bawah panel) --- */
.auth-card .form-side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  padding: 34px 32px 26px;
  overflow-y: auto;
  transition: transform 0.65s ease-in-out, opacity 0.65s ease-in-out, visibility 0.65s;
}
.auth-card .form-side h2 {
  font-size: 23px;
  font-weight: 800;
  color: #122e57;
  margin: 0 0 4px;
}
.auth-card .form-side .sub {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 20px;
  line-height: 1.55;
}
.auth-card .form-login {
  left: 0;
}
.auth-card .form-register {
  left: 50%;
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
}
.auth-card.register .form-login {
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
}
.auth-card.register .form-register {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.auth-card .field {
  margin-bottom: 14px;
}
.auth-card .field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #16345f;
  margin-bottom: 7px;
}
.auth-card .input-wrap {
  position: relative;
}
.auth-card .input-wrap .ic-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: #7d90b2;
  pointer-events: none;
}
.auth-card .input-wrap input {
  width: 100%;
  height: 48px;
  background: #edf2fa;
  border: 1px solid #d7e1f0;
  border-radius: 12px;
  padding: 0 44px 0 44px;
  font: 400 14px "Plus Jakarta Sans", system-ui, sans-serif;
  color: #16345f;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-sizing: border-box;
}
.auth-card .input-wrap input::placeholder {
  color: #8fa1bd;
}
.auth-card .input-wrap input:focus {
  background: #fff;
  border-color: #2e6be6;
  box-shadow: 0 0 0 3px rgba(46, 107, 230, 0.15);
}
.auth-card .eye {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #7d90b2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.auth-card .eye svg {
  width: 19px;
  height: 19px;
}
.auth-card .eye .ic-off {
  display: none;
}
.auth-card .eye.show .ic-on {
  display: none;
}
.auth-card .eye.show .ic-off {
  display: block;
}

.auth-card .row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2px 0 16px;
  font-size: 12.5px;
}
.auth-card .check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #57606a;
  cursor: pointer;
  user-select: none;
}
.auth-card .check-row input {
  width: 15px;
  height: 15px;
  accent-color: #2e6be6;
  cursor: pointer;
}
.auth-card .row-between a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.auth-card .info-box {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #e7effc;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.3px;
  line-height: 1.5;
  color: #2f5aa8;
  margin-bottom: 14px;
}
.auth-card .info-box svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}

.auth-card .btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: #2e6be6;
  color: #fff;
  font: 700 15px "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: filter 0.25s ease, transform 0.15s ease;
  text-decoration: none;
  box-sizing: border-box;
}
.auth-card .btn:hover {
  filter: brightness(1.07);
}
.auth-card .btn:active {
  transform: scale(0.99);
}
/* Gradasi tombol — aturan ini wajib ada SETELAH aturan dasar .auth-card .btn
   dan berlaku seragam untuk tombol form utama maupun tombol Google. */
.auth-card .btn.btn-gradient {
  background-image: linear-gradient(90deg, #1e40af 0%, #38bdf8 100%) !important;
  background-color: #1e40af !important;
  color: #ffffff !important;
}
.auth-card .g-chip {
  width: 25px;
  height: 25px;
  background: #fff;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.auth-card .g-chip svg {
  width: 15px;
  height: 15px;
}
.auth-card .divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
  color: #94a3b8;
  font-size: 12.5px;
}
.auth-card .divider::before,
.auth-card .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* --- Panel gradasi yang meluncur --- */
.auth-card .panel {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  width: calc(50% - 15px);
  border-radius: 20px;
  z-index: 2;
  overflow: hidden;
  background: linear-gradient(160deg, #8b5cf6 0%, #2e6be6 100%) !important;
  transform: translateX(calc(100% + 10px));
  transition: transform 0.65s ease-in-out;
}
.auth-card.register .panel {
  transform: translateX(0);
}
.auth-card .panel .wave {
  position: absolute;
  left: 0;
  width: 200%;
  height: 46%;
  bottom: -10%;
  opacity: 0.16;
  animation: auth-wave-slide 10s linear infinite;
}
.auth-card .panel .wave.w2 {
  opacity: 0.22;
  bottom: -18%;
  animation-duration: 14s;
}
.auth-card .panel .wave svg {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes auth-wave-slide {
  to {
    transform: translateX(-50%);
  }
}
.auth-card .panel .blob {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  top: -70px;
  right: -50px;
}
.auth-card .panel .blob.b2 {
  width: 120px;
  height: 120px;
  top: auto;
  bottom: 40px;
  left: -40px;
  right: auto;
  background: rgba(255, 255, 255, 0.07);
}

/* --- Teks sambutan yang menumpang di panel ---
   Netralkan aturan background dari .hero bawaan framework/app.css agar gradasi panel tidak tertutup */
.auth-card .hero {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 36px;
  color: #fff;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  transition: transform 0.65s ease-in-out, opacity 0.65s ease-in-out, visibility 0.65s;
}
.auth-card .hero h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 11px;
}
.auth-card .hero p {
  font-size: 13.5px;
  line-height: 1.55;
  opacity: 0.88;
  margin: 0 0 24px;
}
.auth-card .hero-login {
  left: 50%;
}
.auth-card .hero-register {
  left: 0;
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
}
.auth-card.register .hero-login {
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
}
.auth-card.register .hero-register {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}
.auth-card .btn-switch {
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  cursor: pointer;
  height: 45px;
  padding: 0 32px;
  border-radius: 999px;
  background: rgb(255 255 255 / 12%);
  color: #fff;
  font: 700 14px "Plus Jakarta Sans", system-ui, sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
}
.auth-card .btn-switch:hover {
  background: #fff;
  color: #1d4ed8;
}

/* --- Layar kecil (HP / WebView): panel hilang, diganti tab --- */
@media (max-width: 680px) {
  .auth-card {
    height: auto;
    border-radius: 20px;
  }
  .auth-card .panel,
  .auth-card .hero {
    display: none !important;
  }
  .auth-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 16px 0;
  }
  .auth-tabs button {
    flex: 1;
    height: 42px;
    border-radius: 999px;
    border: none;
    box-shadow: inset 0 0 0 1.5px #d7e1f0;
    background: #edf2fa;
    color: #16345f;
    font: 700 13.5px "Plus Jakarta Sans", system-ui, sans-serif;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
  }
  .auth-tabs button.active {
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
    background: linear-gradient(90deg, #1e40af 0%, #38bdf8 100%) no-repeat;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    color: #fff;
  }
  .auth-card .form-side {
    position: relative;
    width: 100%;
    left: auto;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible;
    padding: 24px 20px 26px;
  }
  .auth-card:not(.register) .form-register {
    display: none;
  }
  .auth-card.register .form-login {
    display: none;
  }
}
