* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  padding: 0;
}

/* PAGE */
.login-page {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
}

/* HEADER (DESKTOP TETAP) */
.header {
  background: rgba(255,255,255,0.95);
  padding: 3px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-small {
  height: 45px;
}

.logo-large {
  height: 40px;
}

.title {
  font-weight: bolder;
  color: #0b4ea2;
  font-size: 25px;
}

/* CARD (DESKTOP TETAP) */
.login-card {
  width: 360px;
  background: #fff;
  margin: auto;
  border-radius: 8px;
  padding: 20px 25px 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tab {
  display: flex;
  margin-bottom: 20px;
}

.tab button {
  flex: 1;
  padding: 10px;
  border: none;
  background: #e6e6e6;
  cursor: pointer;
  font-weight: bold;
}

.tab-active {
  background: #007bff !important;
  color: #fff !important;
}

form label {
  font-size: 13px;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

form input {
  width: 100%;
  padding: 9px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* BUTTON */
.btn-login {
  width: 100%;
  background: #007bff;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.btn-login:hover {
  background: #005ec4;
}

.forgot {
  margin-top: 10px;
  width: 100%;
  background: none;
  border: none;
  color: #007bff;
  font-size: 12px;
  cursor: pointer;
}

.forgot:hover {
  text-decoration: underline;
}

/* FIX CLICK */
.show, .forgot {
  pointer-events: auto;
  z-index: 10;
}

/* ================= PASSWORD WRAPPER FINAL ================= */
.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

.password-wrapper input {
  width: 100%;
  padding-right: 86px; /* ruang tombol */
  box-sizing: border-box;
  margin-bottom: 0;    /* biar tidak dobel margin */
}

.password-wrapper .toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  min-width: 68px;

  border: none;
  border-radius: 4px;
  background: #e9f2ff;
  color: #007bff;

  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.password-wrapper .toggle-btn:hover {
  background: #d0e4ff;
}

/* rapihin jarak antar tombol di reset */
#resetForm .btn-login {
  margin-top: 10px;
}

#resetForm .password-wrapper {
  margin-bottom: 12px;
}

/* =========================
   ✅ MOBILE ONLY (DESKTOP TIDAK BERUBAH)
========================= */
@media (max-width: 480px) {

  /* halaman tidak “nge-zoom” aneh */
  body {
    background: #f2f6ff;
  }

  /* header lebih ringkas & tetap terlihat */
  .header {
    padding: 10px 12px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
  }

  .logo-small { height: 34px; }
  .logo-large { height: 30px; }

  .title {
    font-size: 14px; /* biar tidak kepanjangan */
    line-height: 1.2;
  }

  /* card full dan proporsional */
  .login-card {
    width: calc(100% - 24px);
    margin: 12px auto 18px auto;
    border-radius: 12px;
    padding: 16px;
  }

  .tab button {
    padding: 10px 8px;
    font-size: 13px;
  }

  form label {
    font-size: 12px;
  }

  form input {
    padding: 10px;
    font-size: 14px;
  }

  .btn-login {
    padding: 11px;
    font-size: 14px;
    border-radius: 8px;
  }

  .forgot {
    font-size: 13px;
    padding: 10px 0 0 0;
  }

  .password-wrapper input {
    padding-right: 92px;
  }

  .password-wrapper .toggle-btn {
    height: 30px;
    min-width: 72px;
    font-size: 12px;
  }
}

/* =========================
   TOAST / INLINE ALERT (LOGIN)
   Tidak mengubah layout jika tidak ada error
========================= */
.toast{
  width: 100%;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.3;
  border: 1px solid transparent;
}

.toast strong{
  font-size: 13px;
}

.toast-error{
  background: #fff1f1;
  color: #9b1c1c;
  border-color: #ffd3d3;
}

/* optional: animasi halus */
#loginToast{
  animation: toastIn .18s ease-out both;
}

@keyframes toastIn{
  from{ opacity:0; transform: translateY(-4px); }
  to{ opacity:1; transform: translateY(0); }
}