/**
 * 마이페이지 — 회원정보 수정 (member/mypage_edit.php)
 * auth.css 폼 레이아웃과 동일하게 맞춤, 이 파일은 보조 스타일만 담당
 */

@media (max-width: 768px) {
  .mypage-edit .auth-form-section__head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mypage-edit .auth-form-section__head .mypage-edit-head-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.mypage-edit .mypage-edit-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mypage-edit .mypage-edit-actions {
  margin-top: 48px;
}

.mypage-edit .mypage-edit-actions .auth-btn {
  flex: 1;
  min-width: 0;
}

.mypage-edit .mypage-edit-actions .auth-btn--primary {
  margin-bottom: 0;
}

/* 주소 확인 상태 */
.addr-status {
  font-size: 13px;
  font-weight: 600;
}

.addr-status--ok {
  color: #16a34a;
}

.addr-status--warn {
  color: #e62e2e;
}

.addr-confirm-btn {
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.addr-confirm-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* 안내 문구 */
.myedit-notice {
  margin: 16px 0;
  padding: 14px 18px;
  background: #eff6ff;
  border-radius: 8px;
  font-size: 14px;
  color: #1e3a8a;
  font-weight: 500;
}

/* 생년월일 잠금 시 사무국 안내 */
.mypage-edit .mypage-edit-birth-hint {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #6b7280;
}

.mypage-edit .mypage-edit-birth-hint[hidden] {
  display: none !important;
}

/* ── field-box (registration 참고) ── */
.mypage-edit .field-box {
  margin-bottom: 24px;
}

.mypage-edit .field-box:last-child {
  margin-bottom: 0;
}

.mypage-edit .field-label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #202020;
  margin-bottom: 12px;
}

.mypage-edit .field-label.require::after {
  content: " *";
  color: #e62e2e;
}

.mypage-edit .input-box {
  width: 100%;
}

.mypage-edit .input-box input[type="text"],
.mypage-edit .input-box input[type="email"],
.mypage-edit .input-box input[type="tel"] {
  display: block;
  width: 100%;
  height: 60px;
  padding: 0 24px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s;
  background: #fff;
}

@media (max-width: 768px) {
  .mypage-edit .input-box input[type="text"],
  .mypage-edit .input-box input[type="email"],
  .mypage-edit .input-box input[type="tel"] {
    height: 52px;
    font-size: 14px;
    padding: 0 16px;
  }
}

.mypage-edit .input-box input::placeholder {
  font-weight: 400;
  color: #bbb;
}

.mypage-edit .input-box input:focus {
  border-color: #1B1735;
}

.mypage-edit .input-box input[readonly] {
  background: #f9f9f9;
  color: #8a8a8a;
  cursor: default;
}

/* ── 버튼 ── */
.myedit-actions {
  display: flex;
  gap: 16px;
  margin-top: 48px;
}

.myedit-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border: none;
}

@media (max-width: 768px) {
  .myedit-btn {
    height: 52px;
    font-size: 16px;
  }
}

.myedit-btn--cancel {
  background: #fff;
  border: 1px solid #e6e6e6;
  color: #202020;
}

.myedit-btn--cancel:hover {
  background: #f9f9f9;
  opacity: 1;
}

.myedit-btn--submit {
  background: #1B1735;
  color: #fff;
}

.myedit-btn--submit:hover {
  background: #1a1f2e;
  opacity: 1;
}

.myedit-btn--submit:disabled {
  background: #b8b8b8;
  cursor: not-allowed;
}

/* ══════════════════════════════════════
   학술대회 참가이력 / 관심 강의 (mypage_history, mypage_favorites)
   ══════════════════════════════════════ */
.wrap-content .sub-content.mypage-history,
.wrap-content .sub-content.mypage-favorites-page {
  padding-top: 32px;
  padding-bottom: 100px;
}

@media (max-width: 768px) {
  .wrap-content .sub-content.mypage-history,
  .wrap-content .sub-content.mypage-favorites-page {
    padding-top: 30px;
    padding-bottom: 60px;
  }
}

.mypage-history .history-list {
  display: block;
}

.mypage-history__hint {
  margin: 0 0 22px;
  max-width: 52rem;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
}

.mypage-history__hint a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mypage-history__hint a:hover {
  color: #1d4ed8;
}

/* 마이페이지 본문 inner — 전역 inner-1520(40px)보다 살짝 좁게 */
.wrap-content .sub-content.mypage-history .inner-1520,
.wrap-content .sub-content.mypage-favorites-page .inner-1520 {
  max-width: 1250px;
  padding-left: 32px;
  padding-right: 32px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .wrap-content .sub-content.mypage-history .inner-1520,
  .wrap-content .sub-content.mypage-favorites-page .inner-1520 {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* 회원정보 수정 — 학회소개와 동일 상단 여백 + 공통 서브타이틀 */
.wrap-content .sub-content.auth-page.mypage-edit {
  padding-top: 32px;
  padding-bottom: 100px;
}

@media (max-width: 768px) {
  .wrap-content .sub-content.auth-page.mypage-edit {
    padding-top: 30px;
    padding-bottom: 60px;
  }
}

/* 관심 강의 (mypage_favorites) */
.fav-page__alert {
  max-width: 640px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.55;
  color: #78350f;
  text-align: center;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
}

.fav-page__alert[hidden] {
  display: none !important;
}

.fav-page__alert a {
  color: #1B1735;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fav-page__lead {
  text-align: center;
  margin: 0 auto 28px;
  max-width: 720px;
  font-size: 16px;
  color: #6b7280;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .fav-page__lead {
    margin-bottom: 22px;
    font-size: 15px;
    padding: 0 8px;
  }
}

.fav-page__panel .history-loading {
  text-align: center;
  padding: 40px 16px;
  font-size: 16px;
  color: #6b7280;
}

.reg-history-table.fav-table {
  min-width: 520px;
}

.reg-history--kaldat .reg-history-table.fav-table thead th.fav-table__th-state {
  text-align: center;
}

.fav-table__title {
  min-width: 0;
  max-width: 42%;
}

.fav-table__title .fav-table__link {
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
}

.fav-table__title .fav-table__link:hover {
  color: #1B1735;
}

.fav-table__conf {
  color: #4b5563;
  font-size: 15px;
}

.fav-table__state {
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

.fav-table__tr--muted .fav-table__gone {
  color: #9ca3af;
  font-size: 15px;
  text-align: center !important;
}

.wrap-content .sub-content.mypage-edit .auth-inner {
  max-width: 620px;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* 학술대회 신청내역 — 표 형식 (참고 레이아웃) */
.reg-history__count {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #111;
}

.reg-history--kaldat .reg-history__table-wrap {
  overflow-x: auto;
  border: none;
  background: #fff;
}

.reg-history-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: 16px;
  color: #202020;
}

.reg-history--kaldat .reg-history-table thead th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
  color: #111;
  background: #f0f0f0;
  border-top: 1px solid #b0b0b0;
  border-bottom: 1px solid #b0b0b0;
  white-space: nowrap;
}

.reg-history--kaldat .reg-history-table thead th.reg-history-table__num {
  text-align: right;
}

.reg-history--kaldat .reg-history-table thead th.reg-history-table__pay {
  text-align: left;
}

.reg-history--kaldat .reg-history-table thead th.reg-history-table__action {
  text-align: center;
}

.reg-history--kaldat .reg-history-table thead th.reg-history-table__edit {
  text-align: center;
}

.reg-history-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  color: #111;
  background: #f4f4f4;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
}

.reg-history-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid #e8e8e8;
  vertical-align: middle;
}

.reg-history--kaldat .reg-history-table tbody tr:last-child td {
  border-bottom: none;
}

.reg-history-table tbody tr:last-child td {
  border-bottom: none;
}

.reg-history-table__empty {
  text-align: center !important;
  padding: 48px 20px !important;
  color: #6b7280;
  font-size: 16px;
  font-weight: 400;
}

.reg-history-table__num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.reg-history-table__title {
  min-width: 0;
  max-width: 48%;
  vertical-align: middle;
}

.reg-history-table__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
}

.reg-history-table__title-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 600;
  color: #111;
  line-height: 1.5;
}

.reg-history-table__title-wrap .reg-history__badge {
  flex-shrink: 0;
  margin: 0;
  white-space: nowrap;
}

.reg-history__badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 5px 12px;
}

.reg-history__badge--canceled {
  background: #b91c1c !important;
  color: #fff !important;
  border-radius: 4px;
}

.reg-history-table__cell-muted {
  text-align: center;
  color: #9ca3af;
  font-size: 16px;
}

.reg-history-table__dash {
  color: #c4c4c4;
}

.reg-history-table__date {
  white-space: nowrap;
}

.reg-history-table__pay {
  text-align: center;
  white-space: nowrap;
}

.reg-history-table__edit {
  text-align: center;
  white-space: nowrap;
  width: 1%;
}

a.reg-history-edit-link {
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a.reg-history-edit-link:hover {
  color: #1d4ed8;
}

.reg-history-table__id {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  max-width: 220px;
  color: #4b5563;
  line-height: 1.35;
}

.reg-history-table__action {
  white-space: nowrap;
  text-align: center;
  width: 1%;
}

.reg-history-table__tr--muted td {
  color: #6b7280;
}

.reg-history-table__tr--muted .reg-history-table__title-main {
  color: #374151;
}

.reg-history-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid #dc2626;
  border-radius: 6px;
  background: #fff;
  color: #b91c1c;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.reg-history-cancel:hover:not(:disabled) {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.reg-history-cancel:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* 마이페이지 신청내역·관심 강의 — 모바일 카드형 표 (768px 이하) */
@media (max-width: 768px) {
  .wrap-content .sub-content.mypage-history .reg-history__count {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .wrap-content .sub-content.mypage-history .reg-history--kaldat .reg-history__table-wrap,
  .wrap-content .sub-content.mypage-favorites-page .reg-history--kaldat .reg-history__table-wrap {
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
    background: transparent;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table,
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table.fav-table {
    min-width: 0 !important;
    width: 100%;
    font-size: 15px;
    border-collapse: separate;
    border-spacing: 0;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table thead,
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table.fav-table thead {
    display: none;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody tr,
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table.fav-table tbody tr {
    display: block;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody tr:last-child,
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table.fav-table tbody tr:last-child {
    margin-bottom: 0;
  }

  /* 빈 목록·오류·colspan 한 셀 */
  .wrap-content .sub-content.mypage-history .reg-history-table tbody tr:has(> td[colspan]),
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table tbody tr:has(> td[colspan]) {
    background: #fafafa;
    border-style: dashed;
    box-shadow: none;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody tr:has(> td[colspan]) td,
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table tbody tr:has(> td[colspan]) td {
    display: block;
    padding: 26px 16px !important;
    border-bottom: none !important;
    text-align: center !important;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody tr:has(> td[colspan]) td::before,
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table tbody tr:has(> td[colspan]) td::before {
    content: none !important;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody td[data-label],
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table.fav-table tbody td[data-label] {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 10px 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left !important;
    vertical-align: top;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody td[data-label]:last-child,
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table.fav-table tbody td[data-label]:last-child {
    border-bottom: none;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody td[data-label]::before,
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table.fav-table tbody td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 78px;
    width: 78px;
    font-weight: 700;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
    padding-top: 3px;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table__title {
    max-width: none;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody td.reg-history-table__title .reg-history-table__title-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody td.reg-history-table__title .reg-history-table__title-main {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: keep-all;
    line-height: 1.45;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody td.reg-history-table__title .reg-history__badge,
  .wrap-content .sub-content.mypage-history .reg-history-table tbody td.reg-history-table__title .history-badge {
    font-size: 12px;
    padding: 4px 10px;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody td.reg-history-table__action {
    align-items: center;
  }

  .wrap-content .sub-content.mypage-history .reg-history-table tbody td.reg-history-table__action .reg-history-cancel {
    flex: 1 0 auto;
    width: auto;
    min-width: auto;
    max-width: none;
    justify-content: center;
    padding: 10px 16px;
    font-size: 14px;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .wrap-content .sub-content.mypage-favorites-page .fav-table__title {
    max-width: none;
  }

  .wrap-content .sub-content.mypage-favorites-page .fav-table__link {
    display: inline;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.45;
  }

  .wrap-content .sub-content.mypage-favorites-page .fav-table__state .history-badge {
    font-size: 12px;
    padding: 4px 10px;
  }

  .wrap-content .sub-content.mypage-history .history-loading {
    padding: 36px 16px;
    font-size: 15px;
    border-radius: 12px;
  }

  .wrap-content .sub-content.mypage-favorites-page .fav-page__panel .history-loading {
    padding: 36px 14px;
    font-size: 15px;
  }

  .wrap-content .sub-content.mypage-favorites-page .fav-page__alert {
    margin-left: 0;
    margin-right: 0;
    font-size: 14px;
    padding: 11px 14px;
    text-align: left;
  }
}

@media (max-width: 380px) {
  .wrap-content .sub-content.mypage-history .reg-history-table tbody td[data-label]::before,
  .wrap-content .sub-content.mypage-favorites-page .reg-history-table.fav-table tbody td[data-label]::before {
    flex-basis: 70px;
    width: 70px;
    font-size: 12px;
  }
}

.reg-history__note {
  margin: 14px 0 0;
  font-size: 15px;
  color: #6b7280;
  line-height: 1.55;
}

.reg-history__note strong {
  color: #374151;
  font-weight: 600;
}

.history-loading,
.history-empty {
  text-align: center;
  padding: 48px 0;
  color: #8a8a8a;
  font-size: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.history-empty a {
  color: #1B1735;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.history-empty a:hover {
  color: #000;
}

/* 카드 */
.history-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.history-card--ended {
  opacity: 0.75;
  background: #fafafa;
}

.history-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px;
  gap: 16px;
}

@media (max-width: 600px) {
  .history-card__top {
    flex-direction: column;
    gap: 12px;
    padding: 18px 18px;
  }
}

.history-card__info {
  min-width: 0;
  flex: 1;
}

.history-card__title {
  margin: 8px 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
}

.history-card--ended .history-card__title {
  color: #6b7280;
}

.history-card__meta {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.history-card__cost {
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .history-card__cost {
    text-align: left;
  }
}

.history-card__price {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.history-card--ended .history-card__price {
  color: #6b7280;
}

.history-card__pay {
  margin: 4px 0 0;
  font-size: 13px;
  color: #9ca3af;
}

/* 신청 상세 (영수증·확인서 대체 참고 정보) */
.history-card__detail {
  padding: 14px 24px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}

@media (max-width: 600px) {
  .history-card__detail {
    padding: 12px 18px 14px;
  }
}

.history-detail__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.history-detail {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 13px;
}

@media (max-width: 520px) {
  .history-detail {
    grid-template-columns: 1fr;
  }
}

.history-detail__dt {
  margin: 0;
  font-weight: 600;
  color: #6b7280;
}

.history-detail__dd {
  margin: 0;
  color: #111827;
  word-break: break-word;
}

@media (max-width: 520px) {
  .history-detail__dt {
    margin-top: 6px;
  }

  .history-detail__dt:first-of-type {
    margin-top: 0;
  }

  .history-detail__dd {
    margin-top: 2px;
  }
}

.history-detail__title-note {
  font-weight: 500;
  color: #9ca3af;
}

.history-detail__note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

/* 뱃지 */
.history-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  color: #fff;
}

.history-badge--done {
  background: #1e40af;
}

.history-badge--pending {
  background: #f59e0b;
}

.history-badge--ended {
  background: #6b7280;
}

/* 하단 버튼 영역 */
.history-card__actions {
  display: flex;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

@media (max-width: 600px) {
  .history-card__actions {
    padding: 12px 18px;
    flex-wrap: wrap;
  }
}

.history-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.history-btn:hover {
  border-color: #9ca3af;
}

.history-btn--primary {
  background: #1B1735;
  border-color: #1B1735;
  color: #fff;
}

.history-btn--cancel {
  margin-left: auto;
  color: #9ca3af;
}

