/* ==== BACKGROUND ==== */
body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #1e3a8a, #2563eb, #0ea5e9);
  background-size: 300% 300%;
  animation: bgAnimate 16s ease infinite;
}

@keyframes bgAnimate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==== LOGIN CARD ==== */
.login-box {
  width: 410px;
  padding: 38px 36px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  color: #fff;
  animation: cardAppear 0.65s ease forwards;
  transform: translateY(40px);
  opacity: 0;
}
@keyframes cardAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==== LOGO ==== */
.logo-box {
  width: 100px;
  margin: 0 auto 14px;
}
.logo-box img {
  width: 100%;
  filter: drop-shadow(0 5px 12px rgba(0,0,0,0.45));
}

/* ==== TEXT ==== */
h2 {
  margin-top: 8px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
}
.sub {
  text-align: center;
  opacity: .85;
  margin-bottom: 25px;
}

/* ==== ERROR MESSAGE ==== */
.msg {
  text-align: center;
  color: #ffdada;
  background: rgba(255, 70, 70, 0.25);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-weight: 600;
}

/* ==== LABEL ==== */
label {
  display: block;
  margin-top: 14px;
  font-weight: 600;
}

/* ==== INPUT & SELECT ==== */
select,
input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 15px;
  margin-top: 7px;
  transition: .25s;
}

/* Perbaikan SELECT agar tidak melebar */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-position: right 16px center;
  background-repeat: no-repeat;
}

/* Gunakan wrapper agar dropdown tidak melebihi box */
select option {
  color: #000;
}

input::placeholder {
  color: #e8e8e8;
  opacity: 0.8;
}

select:focus,
input:focus {
  outline: none;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 0 14px rgba(255, 255, 255, .45);
}

/* ==== PASSWORD INPUT WRAPPER ==== */

.pw-wrap {
  position: relative;
}

.pw-wrap input {
    width: 100%;
    padding-right: 46px;
    box-sizing: border-box;   /* Wajib, agar tidak melebar */
}

.pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.pw-toggle img {
  width: 22px;
  opacity: 0.8;
  transition: .25s ease;
}

.pw-toggle:hover img {
  opacity: 1;
  transform: scale(1.18);
}

/* ==== BUTTON ==== */
.submit {
  margin-top: 30px;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: #ffffff;
  color: #2563eb;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  transition: .25s;
}
.submit:hover {
  background: #e7ecff;
  box-shadow: 0 12px 26px rgba(255, 255, 255, .55);
  transform: translateY(-3px);
}
.submit:active {
  transform: scale(.95);
}

/* ==== PAGE LOADER ==== */
.page-loader {
  position: fixed;
  height: 100%;
  width: 100%;
  background: rgba(10, 10, 25, 0.75);
  backdrop-filter: blur(4px);
  top: 0;
  left: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.page-loader.show {
  display: flex;
}
.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ffffff40;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
