/* ===== Auth modal — Template2 (layout like template1) ===== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 4, 24, .72);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.auth-overlay[hidden] {
  display: none !important;
}

.auth-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  display: flex !important;
}

.auth-modal {
  width: min(420px, 100%);
  background: linear-gradient(180deg, #3a1a6b 0%, #1e0c3d 100%);
  border: 1px solid rgba(245, 197, 24, .35);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
  padding: 22px 22px 20px;
  position: relative;
  color: #fff;
  transform: translateY(10px) scale(.98);
  transition: transform .2s ease;
  max-height: min(92vh, 900px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 197, 24, .45) transparent;
}
.auth-modal::-webkit-scrollbar {
  width: 4px;
}
.auth-modal::-webkit-scrollbar-track {
  background: transparent;
}
.auth-modal::-webkit-scrollbar-thumb {
  background: rgba(245, 197, 24, .4);
  border-radius: 999px;
}
.auth-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 197, 24, .65);
}

.auth-modal.auth-modal-register {
  width: min(720px, 100%);
  padding: 24px 24px 22px;
}

.auth-overlay.is-open .auth-modal {
  transform: translateY(0) scale(1);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 2;
}

.auth-close:hover {
  background: rgba(255, 255, 255, .18);
}

.auth-title {
  margin: 4px 0 8px;
  text-align: center;
  font-family: "Fredoka", "Baloo 2", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #f5c518;
  letter-spacing: .3px;
}

.auth-modal-register .auth-title {
  font-size: clamp(22px, 3.5vw, 30px);
  letter-spacing: .6px;
}

.auth-subtitle {
  margin: 0 0 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(244, 239, 255, .72);
  line-height: 1.4;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-grid .auth-field {
  margin-bottom: 0;
}

.auth-field-full {
  grid-column: 1 / -1;
}

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  font-size: 13px;
  color: #ffe566;
}

.auth-req {
  color: #ff6b9d;
  margin-left: 2px;
}

.auth-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, .28);
  border: 1.5px solid rgba(245, 197, 24, .45);
  border-radius: 10px;
  padding: 0 12px;
  min-height: 46px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}

.auth-input:focus-within {
  border-color: #f5c518;
  box-shadow: 0 0 0 3px rgba(245, 197, 24, .22);
}

.auth-input i {
  color: rgba(244, 239, 255, .55);
  width: 18px;
  text-align: center;
  flex: 0 0 auto;
}

.auth-input input,
.auth-input select {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  padding: 12px 0;
  appearance: none;
}

.auth-input select {
  cursor: pointer;
  width: 100%;
  padding: 12px 8px 12px 2px;
  line-height: 1.35;
}

.auth-input select option {
  background: #1e0c3d;
  color: #fff;
}

.auth-input input::placeholder {
  color: rgba(244, 239, 255, .42);
  font-weight: 600;
}

.auth-select-wrap {
  position: relative;
  width: 100%;
}

.auth-select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(244, 239, 255, .55);
  border-bottom: 2px solid rgba(244, 239, 255, .55);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.auth-select-wrap .auth-input {
  min-height: 48px;
  padding: 0 42px 0 14px;
  gap: 0;
}

.auth-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(255, 255, 255, .12);
  margin: 10px 0 6px;
}

.auth-terms {
  margin: 16px 0 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(244, 239, 255, .7);
  line-height: 1.45;
}

.auth-terms a {
  color: #f5c518;
  font-weight: 800;
  text-decoration: none;
}

.auth-terms a:hover {
  text-decoration: underline;
}

.auth-toggle-pass {
  border: 0;
  background: transparent;
  color: rgba(244, 239, 255, .55);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-toggle-pass:hover {
  color: #f5c518;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
  user-select: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: rgba(244, 239, 255, .85);
}

.auth-remember input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid rgba(245, 197, 24, .55);
  background: rgba(0, 0, 0, .28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: transparent;
  font-size: 11px;
}

.auth-remember input:checked + .auth-check {
  background: linear-gradient(180deg, #ffe566, #f5c518);
  color: #3a1a00;
  border-color: #e89a12;
}

.auth-submit {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 16px;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .4px;
  color: #3a1a00;
  background: linear-gradient(180deg, #ffe566 0%, #f5c518 100%);
  box-shadow: 0 4px 0 #b8860b;
  cursor: pointer;
}

.auth-submit:hover {
  filter: brightness(1.04);
}

.auth-submit:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #b8860b;
}

.auth-forgot,
.auth-switch {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-weight: 700;
  font-size: 13px;
  color: #f5c518;
  text-decoration: none;
}

.auth-forgot:hover,
.auth-switch a:hover {
  text-decoration: underline;
}

.auth-switch {
  color: rgba(244, 239, 255, .7);
  margin-top: 10px;
}

.auth-switch a {
  color: #f5c518;
  font-weight: 800;
  text-decoration: none;
}

body.auth-open {
  overflow: hidden;
}

/* Full-page register (not modal) */
.auth-page {
  width: min(920px, 100%);
  margin: 18px auto 40px;
  padding: 0 12px;
}

.auth-page .auth-panel {
  background: linear-gradient(180deg, #3a1a6b 0%, #1e0c3d 100%);
  border: 1px solid rgba(245, 197, 24, .35);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .45);
  padding: 28px 28px 24px;
  color: #fff;
}

.auth-page .auth-title {
  font-size: clamp(24px, 3.5vw, 32px);
  color: #f5c518;
}

a.btn-register,
a.btn-promo-daftar {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
}

@media (max-width: 640px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-modal.auth-modal-register {
    padding: 18px 14px 16px;
  }
}

@media (max-width: 480px) {
  .auth-modal {
    padding: 18px 16px 16px;
  }

  .auth-title {
    font-size: 24px;
  }
}
