button[disabled],
button:disabled,
#submitBtn[disabled] {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background-color: #9CA3AF !important;
}

button[disabled]:hover,
button:disabled:hover,
#submitBtn[disabled]:hover {
  transform: none !important;
  box-shadow: none !important;
  background-color: #9CA3AF !important;
}

.policy-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease;
}

.policy-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.policy-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

.policy-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.policy-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.policy-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6B7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.policy-modal-close:hover {
  background: #F3F4F6;
  color: #111827;
}

.policy-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #374151;
}

.policy-modal-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 24px 0 12px;
}

.policy-modal-body h3:first-child {
  margin-top: 0;
}

.policy-modal-body p {
  margin: 12px 0;
}

.policy-modal-body ul,
.policy-modal-body ol {
  margin: 12px 0;
  padding-left: 24px;
}

.policy-modal-body li {
  margin: 8px 0;
}

.policy-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .policy-modal-content {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .policy-modal-header,
  .policy-modal-body,
  .policy-modal-footer {
    padding: 16px;
  }
}
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  background: linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 100%);
}

/* 뒤로가기·탭은 흰 카드 밖에 두고, 셸이 셋의 폭을 함께 잡는다. */
.auth-shell {
  width: 100%;
  max-width: 460px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  text-decoration: none;
  transition: color var(--transition);
}

.auth-back:hover {
  color: var(--primary);
}

.auth-back svg {
  width: 18px;
  height: 18px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: none;
  width: 100%;
  max-width: 460px;
  overflow: hidden;
}

/* 탭 영역 */
/* 로그인 화면과 같은 규칙 — 바깥 좌우만 둥근 파란 테두리 하나로 두 탭을 묶고,
   가운데는 라운드 없는 직선 구분선으로 가른다. */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;
  background: var(--primary-light);
  border: 1px solid var(--pri);
  border-radius: 24px;
  overflow: hidden;
}

.auth-tab {
  padding: 18px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
}

/* 가운데 구분선 — 좌우 끝 테두리와 같은 파랑, 라운드 없음 */
.auth-tab + .auth-tab {
  border-left: 1px solid var(--pri);
}

/* 모바일 — 세로 여백과 탭 높이를 줄여 첫 화면에 입력칸까지 들어오게 한다. */
@media (max-width: 480px) {
  .auth-wrap {
    padding: 24px 16px 32px;
    align-items: flex-start;
  }

  .auth-tab {
    padding: 14px 8px;
    font-size: 0.9rem;
  }

  .auth-tabs {
    margin-bottom: 12px;
  }

  .auth-back {
    margin-bottom: 10px;
  }

  .auth-body {
    padding: 24px 20px;
  }

  .auth-footer {
    padding: 18px 20px;
  }
}

/* 선택된 탭만 흰 배경으로 띄운다 — 띠(연파랑) 위에서 눌린 쪽이 바로 보인다. */
.auth-tab.active {
  color: var(--primary);
  background: var(--white);
}

.auth-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.45);
  color: var(--gray-700);
}

/* 본문 */
.auth-body {
  padding: 32px;
}

.auth-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.auth-desc {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 28px;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 0.8rem;
  color: var(--gray-400);
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.kakao-icon {
  width: 22px;
  height: 22px;
  background: #3C1E1E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #FEE500;
  font-weight: 900;
}

.terms-box {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.terms-all {
  font-weight: 700;
  color: var(--gray-800);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 12px;
}

.pw-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
  margin-top: 6px;
  overflow: hidden;
}

.pw-strength-bar {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 0.3s, background 0.3s;
}

/* 푸터 */
.auth-footer {
  text-align: center;
  padding: 20px 32px;
  border-top: 1px solid var(--gray-100);
  font-size: 0.875rem;
  color: var(--gray-500);
  background: var(--gray-50);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}


@media (max-width: 450px) {
  .policy-modal-content {
    padding-top: 1.6rem;
    padding-bottom: 1.6rem;
  }
}