/* ==========================================================================
   회원가입 / 로그인 / 마이페이지 - 공용 스타일
   style.css 의 색상/타이포 토큰을 그대로 사용해 본 사이트와 통일감을 유지한다.
   ========================================================================== */

.auth-header {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

.auth-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-logo img {
  height: 34px;
  width: auto;
}

.auth-back {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

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

.auth-main {
  min-height: calc(100vh - 76px);
  padding: 3.5rem 0 5rem;
  background: var(--bg-main);
}

.auth-card {
  max-width: 680px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.8rem 2.4rem;
}

.auth-card--wide {
  max-width: 800px;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 2.0rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  text-align: center;
  line-height: 1.35;
}

.auth-subtitle {
  font-size: 1.15rem;
  color: #475569;
  text-align: center;
  margin-bottom: 2.2rem;
  line-height: 1.65;
}

/* Form sections */
.auth-section {
  margin-bottom: 2.2rem;
}

.auth-section:last-of-type {
  margin-bottom: 1.6rem;
}

.auth-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-section-desc {
  font-size: 1.05rem;
  color: #475569;
  margin-bottom: 1.4rem;
  line-height: 1.65;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

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

.auth-field {
  margin-bottom: 1.4rem;
}

.auth-field label {
  display: block;
  font-size: 1.12rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.55rem;
}

.auth-field label .req {
  color: #dc2626;
  font-weight: 800;
  margin-left: 0.2rem;
}

.auth-field label .opt {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.92rem;
  margin-left: 0.4rem;
}

.auth-field input[type="text"],
.auth-field input[type="tel"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="date"],
.auth-field input[type="number"],
.auth-field select {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid #cbd5e1;
  background: var(--bg-subtle);
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.auth-field input:focus,
.auth-field select:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 122, 255, 0.2);
}

.auth-field input[disabled] {
  color: var(--text-muted);
  cursor: not-allowed;
}

.auth-radio-group {
  display: flex;
  gap: 1.6rem;
  padding: 0.8rem 0.2rem;
}

.auth-radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.auth-radio-group input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.auth-hint {
  font-size: 0.95rem;
  color: #64748b;
  margin-top: 0.45rem;
  line-height: 1.5;
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.2rem 1.3rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.8rem;
  cursor: pointer;
}

.auth-consent input {
  margin-top: 0.25rem;
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}

.auth-consent-text {
  font-size: 1.02rem;
  color: #334155;
  line-height: 1.7;
}

.auth-consent-text strong {
  color: #0f172a;
}

.auth-submit {
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), #4f5de8);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(108, 122, 255, 0.35);
  transition: var(--transition);
  cursor: pointer;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 122, 255, 0.45);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-error {
  display: none;
  background: #fef2f2;
  color: #b91c1c;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.6rem;
  line-height: 1.5;
}

.auth-error.show {
  display: block;
}

.auth-success {
  display: none;
  background: #ecfdf5;
  color: #047857;
  border: 1.5px solid #6ee7b7;
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.6rem;
  line-height: 1.5;
}

.auth-success.show {
  display: block;
}

.auth-footer-link {
  text-align: center;
  margin-top: 1.8rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.auth-footer-link a {
  color: var(--primary);
  font-weight: 800;
  margin-left: 0.3rem;
}

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

/* 마이페이지 프로필 표시 */
.auth-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.6rem;
  margin-bottom: 1.8rem;
}

.auth-profile-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-color);
}

.auth-profile-item .k {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.auth-profile-item .v {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.auth-welcome {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-welcome .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  background: var(--gold-light);
  color: var(--gold-dark);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.auth-logout-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.auth-logout-btn:hover {
  background: #e5e7eb;
  color: var(--text-main);
}

.auth-loading {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .auth-header .container {
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
    justify-content: center;
    align-items: center;
  }
  .auth-logo img {
    height: 42px;
  }
  .auth-card {
    padding: 1.8rem 1.3rem;
    border-radius: var(--radius-md);
  }
  .auth-row,
  .auth-row--3,
  .auth-profile-grid {
    grid-template-columns: 1fr;
  }
}
