/* ==========================================
   RESET & DASAR
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, button, input, textarea {
  touch-action: manipulation;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Arial, Helvetica, sans-serif;

  background-color: #0a3cff;
  background-image: url(../assets/background.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================
   KONTAINER FORM (flex kolom, tanpa grid-row)
   ========================================== */
.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(340px, 92vw);
  padding: 20px;
  text-align: center;
}

/* ==========================================
   LOGO & LABEL
   ========================================== */
.Logo {
  width: 220px;
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
}

.username,
.password {
  display: block;
  width: 100%;
  font-size: x-large;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 8px;
}

.password {
  margin-top: 16px;
}

/* ==========================================
   INPUT
   ========================================== */
.text-field1,
.text-field2 {
  width: 100%;
  height: 46px;
  padding: 10px 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: large;
  border: 2px solid #4272f5;
  border-radius: 10px;
  outline: none;
  background-color: #ffffff;
}

.text-field1:focus,
.text-field2:focus {
  border-color: #0a19a0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* Pembungkus input password + ikon mata */
.password-wrap {
  position: relative;
  width: 100%;
}

.password-wrap .text-field2 {
  padding-right: 44px;
}

.password-wrap .toggle-icon {
  position: absolute;
  right: 14px;            /* makin kecil = makin ke kanan */
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #556070;
  cursor: pointer;
  z-index: 2;
}

.password-wrap .toggle-icon:hover {
  color: #0a19a0;
}

/* ==========================================
   TOMBOL LOGIN
   ========================================== */
.btn-wrap {
  width: 100%;
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.btn-login {
  width: 200px;
  max-width: 100%;
  height: 44px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  color: #020202;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.1s ease;
}

.btn-login:hover {
  background-color: #0a19a0;
  color: #ffffff;
}

.btn-login:active {
  transform: scale(0.98);
}

.btn-login:disabled {
  background-color: #a0b9f8;
  color: #ffffff;
  cursor: not-allowed;
}

/* ==========================================
   SPINNER LOADING
   ========================================== */
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================
   LAYAR KECIL (HP)
   ========================================== */
@media (max-width: 480px) {
  .Logo { width: 180px; }

  .username,
  .password { font-size: large; }
}

/* Sembunyikan tombol mata bawaan browser (Edge/IE) */
input::-ms-reveal,
input::-ms-clear {
  display: none;
}

/* Sembunyikan tombol bawaan di Chrome/Safari untuk input tertentu */
input::-webkit-credentials-auto-fill-button,
input::-webkit-textfield-decoration-container {
  visibility: hidden;
  pointer-events: none;
}