/* =========================================================
   MyJPN — Form Autentikasi (Login, Daftar, Lupa Password)
   Scope: #myModal.auth-modal, .auth-*
   ========================================================= */

#myModal.auth-modal .modal-dialog {
  width: calc(100% - 24px);
  max-width: 476px;
  margin: 1.75rem auto;
}

#myModal.auth-modal .modal-content {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(7, 36, 82, 0.32);
}

.auth-form {
  margin: 0;
}

/* Header */
.auth-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 24px 22px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(135deg, #081f44 0%, #0d3473 48%, #1d4ed8 100%);
}

.auth-header::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.auth-header-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
}

.auth-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.23);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 21px;
}

.auth-title {
  margin: 1px 0 0;
  color: #ffffff;
  font-family: "Poppins", "Open Sans", sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.25;
}

.auth-subtitle {
  margin: 5px 0 0;
  color: #d3e2ff;
  font-size: 11.5px;
  line-height: 1.55;
}

.auth-header .btn-close {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin: 2px 0 0;
  padding: 8px;
  opacity: 0.82;
  filter: invert(1) grayscale(1) brightness(2);
}

.auth-header .btn-close:hover {
  opacity: 1;
}

/* Body */
.auth-body {
  max-height: calc(100vh - 230px);
  overflow-y: auto;
  padding: 24px;
  border: 0;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.auth-body::-webkit-scrollbar {
  width: 5px;
}

.auth-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd8ea;
}

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

.auth-label {
  display: block;
  margin-bottom: 7px;
  color: #223452;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.auth-control {
  position: relative;
}

.auth-control > i {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 2;
  transform: translateY(-50%);
  color: #7c8da5;
  font-size: 16px;
  pointer-events: none;
}

.auth-input {
  height: 46px;
  padding: 10px 14px 10px 42px;
  border: 1px solid #cbd8e8;
  border-radius: 11px;
  background: #ffffff;
  color: #172b4d;
  font-size: 13.5px;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input::placeholder {
  color: #9aabc0;
}

.auth-input:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.11);
  outline: 0;
}

.auth-input.is-invalid {
  border-color: #dc2626;
}

.auth-input-password {
  padding-right: 48px;
}

.auth-eye {
  position: absolute;
  top: 50%;
  right: 7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7c8da5;
  font-size: 15px;
  cursor: pointer;
}

.auth-eye:hover {
  background: #edf4ff;
  color: #1d4ed8;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: -3px 0 14px;
}

.auth-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.auth-link:hover {
  color: #163f9f;
  text-decoration: underline;
}

/* Alerts */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
}

.auth-alert > i {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 16px;
}

.auth-alert-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.auth-alert-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.auth-alert-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

/* Google button */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 17px 0;
  color: #8a9bb1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e8f2;
}

.auth-google {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.auth-google-slot {
  display: none;
  width: 100%;
  min-height: 40px;
  justify-content: center;
}

.auth-google-slot.is-ready {
  display: flex;
}

.auth-google-slot > div,
.auth-google-slot iframe {
  max-width: 100% !important;
}

.auth-google-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #d5e0ee;
  border-radius: 11px;
  background: #ffffff;
  color: #223452;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-google-fallback:hover {
  border-color: #a9c5ee;
  background: #f8fbff;
  box-shadow: 0 5px 14px rgba(15, 43, 86, 0.07);
}

.auth-google-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #ffffff;
  color: #4285f4;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.auth-note {
  margin: 14px 0 0;
  color: #94a3b8;
  font-size: 10.5px;
  line-height: 1.55;
  text-align: center;
}

/* Footer */
.auth-footer {
  display: block;
  padding: 0 24px 24px;
  border: 0;
  background: #ffffff;
}

.auth-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid #1d4ed8;
  border-radius: 11px;
  background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.15px;
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.auth-btn-primary:hover {
  color: #ffffff;
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 13px 26px rgba(29, 78, 216, 0.28);
}

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

.auth-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #d5e0ee;
  border-radius: 11px;
  background: #ffffff;
  color: #223452;
  font-size: 12.5px;
  font-weight: 700;
}

.auth-btn-secondary:hover {
  border-color: #a9c5ee;
  background: #f8fbff;
  color: #1d4ed8;
}

.auth-switch {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.auth-switch .auth-link {
  font-size: 12px;
}

.auth-help {
  margin: 13px 0 0;
  color: #7c8da5;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

/* Two-column helper */
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

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

/* Mobile */
@media (max-width: 575.98px) {
  #myModal.auth-modal .modal-dialog {
    width: calc(100% - 16px);
    margin: 0.5rem auto;
  }

  #myModal.auth-modal .modal-content {
    border-radius: 18px;
  }

  .auth-header {
    padding: 20px 19px 18px;
  }

  .auth-icon {
    width: 41px;
    height: 41px;
    border-radius: 12px;
    font-size: 19px;
  }

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

  .auth-subtitle {
    font-size: 11px;
  }

  .auth-body {
    max-height: calc(100vh - 205px);
    padding: 20px 19px;
  }

  .auth-footer {
    padding: 0 19px 20px;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-grid .auth-field-full {
    grid-column: auto;
  }
}
