/* ═══════════════════════════════════════════════════════════
   PitStop — CSS Login Halaman Split-Screen
   ═══════════════════════════════════════════════════════════ */

/* ── Layout Split Screen Halaman Login ── */
.auth-page {
  background-color: #EBF1FF;
  min-height: 100vh;
}

@media (min-width: 769px) {
  .auth-page {
    height: 100vh;
    overflow: hidden;
  }
}

.auth-split {
  display: grid;
  grid-template-columns: 40% 1fr;
  /* Membagi layar: kiri 40%, kanan 60% */
  height: 100vh;
}

/* ── Panel Kiri (Gambar) ── */
.auth-left {
  position: relative;
  overflow: hidden;
  animation: loginFadeInLeft 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.login-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Mencegah gambar gepeng/distorsi */
  display: block;
}

/* ── Panel Kanan (Formulir) ── */
.auth-right {
  display: flex;
  align-items: center;
  /* Formulir berada di tengah secara vertikal */
  justify-content: center;
  /* Formulir berada di tengah secara horizontal */
  padding: 3rem 2rem;
  background-color: #EBF1FF;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 420px;
  /* Membatasi lebar formulir agar pas di layar lebar */
  animation: loginFadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Header Form */
.auth-header {
  margin-bottom: 2rem;
  text-align: center;
}

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.auth-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Elemen Formulir */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--white);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-dark);
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

/* Input Password dengan Tombol Eye */
.input-password {
  position: relative;
  /* Wajib relatif agar tombol mata bisa diletakkan secara absolut */
}

.input-password input {
  padding-right: 3rem;
  /* Memberi ruang di kanan agar teks password tidak tertutup tombol mata */
}

.btn-toggle-pass {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  /* Menjaga posisi tombol di tengah secara vertikal */
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.btn-toggle-pass:hover {
  color: var(--primary);
}

/* Info Tambahan & Checkbox */
.form-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-body);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  display: none;
  /* Sembunyikan checkbox bawaan browser */
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}

/* Efek ketika Checkbox terpilih */
.checkbox-label input:checked+.checkbox-custom {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input:checked+.checkbox-custom::after {
  content: '';
  width: 4px;
  height: 8px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

/* Link Biru */
.link-bluue {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.link-bluue:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Pesan Error Kolom */
.input-error {
  font-size: 0.78rem;
  color: #ef4444;
  min-height: 1rem;
}

/* Tombol Submit Login */
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.9rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.35);
}

.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

.btn-submit:active {
  transform: translateY(0);
}

/* Footer / Switch Halaman & Tombol Kembali */
.auth-switch {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.25rem;
}

.auth-switch a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}


.btn-back-home {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition);
  text-decoration: none;
}

.btn-back-home:hover {
  color: var(--text-dark);
  text-decoration: underline;
}

/* ── Responsif Layar Kecil (Mobile) ── */
@media (max-width: 768px) {
  .auth-split {
    grid-template-columns: 1fr;
    /* Menumpuk satu kolom penuh */
  }

  .auth-left {
    display: none;
    /* Sembunyikan panel gambar kiri di mobile */
  }

  .auth-right {
    padding: 2.5rem 1.5rem;
  }
}

/* ── Efek Animasi Masuk Halaman Login ── */
@keyframes loginFadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes loginFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}