/* AUTH MODAL — ตรงกับหน้าแรก (landing) */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(8, 22, 38, 0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}

.auth-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.auth-box {
  background: #fff;
  border-radius: 0;
  width: 100%;
  max-width: 420px;
  padding: 32px 32px 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(8, 22, 38, 0.18), 0 2px 8px rgba(8, 22, 38, 0.06);
  transform: translateY(20px) scale(0.98);
  transition: 0.3s cubic-bezier(0.34, 1.36, 0.64, 1);
}

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

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 0;
  border: none;
  background: #f1f5f9;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #64748b;
  transition: 0.2s;
}

.auth-close:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

.auth-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.auth-head img {
  width: min(100%, 300px);
  height: auto;
  margin: 0 0 8px;
  display: block;
  filter: none;
}

.auth-head p {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 300;
  letter-spacing: 0.3px;
}

.auth-tabs {
  display: flex;
  background: #f8fafc;
  border-radius: 0;
  padding: 3px;
  margin-bottom: 18px;
  border: 1px solid #e2e8f0;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border-radius: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 300;
  color: #94a3b8;
  cursor: pointer;
  font-family: 'Prompt', sans-serif;
  transition: 0.2s;
}

.auth-tab.active {
  background: #fff;
  color: #0f172a;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.auth-form.active {
  display: flex;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-field label {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  letter-spacing: 0.2px;
}

.auth-field-wrap {
  position: relative;
}

.auth-field-wrap .field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #cbd5e1;
  font-size: 12px;
  pointer-events: none;
}

.auth-overlay .auth-field input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  font-size: 13px;
  font-family: 'Prompt', sans-serif;
  font-weight: 300;
  color: #0f172a;
  outline: none;
  transition: 0.2s;
  background: #fff;
}

.auth-overlay .auth-field input::placeholder {
  color: #cbd5e1;
}

.auth-overlay .auth-field input:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.15);
}

.auth-overlay .eye-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #cbd5e1;
  font-size: 12px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.auth-overlay .eye-toggle:hover {
  color: #94a3b8;
}

.auth-row {
  display: flex;
  gap: 10px;
}

.auth-row .auth-field {
  flex: 1;
}

.auth-hint {
  font-size: 10px;
  color: #cbd5e1;
  margin-top: 2px;
  font-weight: 300;
}

.auth-forgot {
  font-size: 11px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 300;
}

.auth-forgot:hover {
  color: #2d6a9f;
}

.auth-submit {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 0;
  background: #0f172a;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  font-family: 'Prompt', sans-serif;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.auth-submit:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 300;
}

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

.auth-social {
  display: flex;
  gap: 8px;
}

.auth-social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px;
  border-radius: 0;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 300;
  color: #475569;
  background: #fff;
  cursor: pointer;
  font-family: 'Prompt', sans-serif;
  transition: 0.2s;
}

.auth-social-btn:hover {
  border-color: #a5b4fc;
  background: #fafbff;
}

.auth-footer-text {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 300;
}

.auth-footer-text a {
  color: #2d6a9f;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
}

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

.auth-terms {
  font-size: 10px;
  color: #cbd5e1;
  text-align: center;
  line-height: 1.7;
  font-weight: 300;
}

.auth-terms a {
  color: #94a3b8;
}

.auth-terms a:hover {
  color: #2d6a9f;
}

.auth-strength {
  height: 2px;
  border-radius: 0;
  margin-top: 4px;
  background: #f1f5f9;
  overflow: hidden;
}

.auth-strength-bar {
  height: 100%;
  width: 0;
  border-radius: 0;
  transition: 0.3s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.auth-ref-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5f3ff, #fdf4ff);
  border: 1px solid #e9d5ff;
  font-size: 12px;
  color: #5b21b6;
  line-height: 1.4;
}

.auth-ref-banner i {
  font-size: 15px;
  flex-shrink: 0;
  color: #7c3aed;
}

.auth-ref-banner strong {
  font-weight: 600;
  letter-spacing: 0.5px;
}

@media (max-width: 500px) {
  .auth-box {
    padding: 24px 20px 22px;
  }

  .auth-row {
    flex-direction: column;
    gap: 10px;
  }
}
