/* ============================================================
   Donkey 계정 페이지 — 메인(Dimension) 회색 톤 통일 (Phase3 웹개편)
   core/assets/css/main.css 위에 얹는 오버레이. 카드/헤더/버튼 variant만 정의.
   ============================================================ */

/* ===== 레이아웃: 화면 중앙 정렬 ===== */
body.auth-page {
  overflow-y: auto;
}
.auth-page #wrapper.auth-wrapper {
  position: relative;
  z-index: 3;  /* Dimension #bg(z-index:1) 위로 — 콘텐츠 가림 방지 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 3rem 1.25rem;
  box-sizing: border-box;
}

/* is-preload 페이드 인 (Dimension 톤) */
.auth-page.is-preload .auth-header,
.auth-page.is-preload .auth-main { opacity: 0; }
.auth-page .auth-header,
.auth-page .auth-main {
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* ===== 헤더(다이아 로고 + 타이틀) ===== */
.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 100%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  margin-bottom: 1.1rem;
}
.auth-logo .icon:before {
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1;
}
.auth-title {
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.2rem;
  margin: 0 0 0.4rem;
  line-height: 1.2;
}
.auth-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  letter-spacing: 0.05rem;
  margin: 0;
}

/* ===== 카드(반투명 다크 패널 — Dimension article 톤) ===== */
.auth-main { width: 100%; }
.auth-card {
  width: 100%;
  max-width: 30rem;
  min-width: 0;            /* 좁은 뷰포트에서 콘텐츠 최소폭 무시하고 축소 허용 */
  margin: 0 auto;          /* flex 대신 margin auto로 중앙 정렬(오버플로 방지) */
  background: rgba(27, 31, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.125);
  border-radius: 18px;
  padding: 1.9rem 1.9rem 1.7rem;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}
.auth-card, .auth-card * { box-sizing: border-box; }

/* ===== 폼: 컨테이너 폭에 따라 자동으로 단이 접히는 반응형 2열 =====
   Dimension .fields 는 네거티브마진 그리드(width:calc(100%+1.5rem)+.field padding-left)라
   width/padding까지 리셋해야 카드 밖으로 삐져나오지 않는다. */
.auth-card .fields { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 !important; width: 100% !important; }
.auth-card .fields .field,
.auth-card .field { margin: 0 !important; padding: 0 !important; flex: 1 1 100%; min-width: 0; }
/* half: 최소 10rem 확보하며 flex. 폭이 부족하면 자동으로 한 줄에 하나로 접힘(미디어쿼리 불필요) */
.auth-card .field.half { flex: 1 1 10rem; }
/* 입력 요소도 축소 허용(오버플로 방지) */
.auth-card input, .auth-card select, .auth-card textarea { min-width: 0; max-width: 100%; }
.auth-card .field label {
  display: block;
  margin-bottom: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  letter-spacing: 0.05rem;
}
/* 입력칸: 순백 테두리(튐) → 은은한 반투명 + 둥근 모서리 */
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"],
.auth-card input[type="tel"],
.auth-card textarea,
.auth-card select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
}
.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus,
.auth-card input[type="email"]:focus,
.auth-card input[type="tel"]:focus,
.auth-card textarea:focus,
.auth-card select:focus {
  border-color: rgba(150, 178, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(150, 178, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

/* 체크박스(로그인 유지) */
.auth-card .checkbox-field .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

/* 프로필 헤더(아바타 + 아이디) */
.auth-card .profile-header { text-align: center; margin-bottom: 1.25rem; }
.auth-card .profile-header img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.auth-card .profile-header h3 { color: #ffffff; margin: 0.6rem 0 0; letter-spacing: 0.1rem; }

/* ===== 액션 버튼 영역: 텍스트박스보다 좁게 + 중앙 정렬(세련) ===== */
.auth-card .actions {
  list-style: none; padding: 0; margin: 1.5rem 0 0 !important;
  display: flex !important; flex-direction: column; align-items: center; gap: 0.6rem;
}
/* li = 폭 컨트롤러(13rem 고정, 카드보다 좁으면 100%). 모든 버튼이 이 폭을 채워 항상 균일.
   Dimension의 ul.actions li 규칙을 이기기 위해 !important */
.auth-card .actions li { padding: 0; width: 13rem !important; max-width: 100% !important; flex: 0 0 auto !important; }
.auth-card .actions li::before { display: none; }  /* 불릿 제거 */
/* 버튼/서브밋/버튼형 링크 모두 li를 꽉 채워 폭·높이 균일 */
.auth-card .actions .button,
.auth-card .actions button,
.auth-card .actions input[type="submit"] {
  display: block;
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 1rem; padding-right: 1rem;
}

/* 버튼 공통: 둥근 모서리 + 은은한 테두리(순백 톤 완화) */
.auth-card .button,
.auth-card button[type="submit"],
.auth-card input[type="submit"] {
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  font-weight: 400;
}
.auth-card .button:hover,
.auth-card button[type="submit"]:hover { background-color: rgba(255, 255, 255, 0.08); }

/* 주요 버튼: 순백 채움 → 프로스티드 반투명(그라데이션과 조화) */
.auth-card .button.primary,
.auth-card button[type="submit"].primary,
.auth-card input[type="submit"].primary {
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  color: #ffffff !important;
  font-weight: 600;
}
.auth-card .button.primary:hover,
.auth-card button[type="submit"].primary:hover { background-color: rgba(255, 255, 255, 0.26); }

/* 시맨틱 버튼 variant — 메인 톤(모노+절제된 액센트) */
.auth-card .button.home,
.auth-card .button.logout,
.auth-card .button.secondary { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.auth-card .button.secondary.accent { box-shadow: inset 0 0 0 1px rgba(150, 178, 255, 0.6); color: #cdd9ff !important; }
.auth-card .button.secondary.accent:hover { background-color: rgba(150, 178, 255, 0.12); }
.auth-card .button.danger { box-shadow: inset 0 0 0 1px rgba(255, 120, 120, 0.65); color: #ff9d9d !important; }
.auth-card .button.danger:hover { background-color: rgba(255, 90, 90, 0.12); }
.auth-card .button.thin { height: 2.6rem; line-height: 2.6rem; }

/* ===== 메시지/에러 ===== */
.auth-card .flash-messages { margin-bottom: 1rem; }
.auth-card .flash,
.auth-card .msg {
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}
.auth-card .flash-success, .auth-card .msg.success { border-color: rgba(120, 220, 150, 0.45); }
.auth-card .flash-error, .auth-card .msg.error,
.auth-card .flash-danger { border-color: rgba(255, 120, 120, 0.5); }
.auth-card .error { color: #ff9d9d; font-size: 0.8rem; margin: 0.3rem 0 0; }

/* ===== 푸터 ===== */
.auth-footer { margin-top: 1.75rem; }
.auth-footer .copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0.05rem;
}

/* ===== 반응형 ===== */
@media screen and (max-width: 736px) {
  .auth-page #wrapper.auth-wrapper { padding: 2rem 1rem; }
  .auth-card { padding: 1.5rem 1.25rem; }
  .auth-card .field.half { flex-basis: 100%; }   /* 작은 화면: 무조건 단일 컬럼 */
  .auth-title { font-size: 1.35rem; }
}

/* ============================================================
   컴팩트 스케일 — 한눈에 들어오게 데스크톱 전반 축소
   Dimension 루트글꼴: >1680px=16pt(과대), 737~1680px=12pt.
   ① 초대형 화면의 16pt를 12pt로 캡, ② 요소 크기 전반 축소.
   ============================================================ */
@media screen and (min-width: 1681px) {
  html { font-size: 12pt !important; }   /* 16pt 과대 방지 */
}

/* 카드/헤더 */
.auth-card { max-width: 26rem; padding: 1.6rem 1.6rem 1.4rem; }
.auth-header { margin-bottom: 1.35rem; width: 100%; }
/* 다이아몬드: 원을 가로 중앙(margin auto) + 원 안에서 다이아 정중앙(양축 flex) */
.auth-logo { width: 4.25rem; height: 4.25rem; margin: 0 auto 0.9rem; display: flex; align-items: center; justify-content: center; }
.auth-logo .icon { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; line-height: 1; }
.auth-logo .icon:before { font-size: 2rem; line-height: 1; display: block; }
/* 헤더 문구 키움 */
.auth-title { font-size: 1.7rem; letter-spacing: 0.18rem; margin-bottom: 0.35rem; }
.auth-desc { font-size: 0.92rem; }

/* 라벨/입력 — 낮고 촘촘하게 */
.auth-card .fields { gap: 0.8rem; }
.auth-card .field label { font-size: 0.72rem; margin-bottom: 0.28rem; }
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"],
.auth-card input[type="tel"],
.auth-card select {
  height: 2.4rem;
  font-size: 0.88rem;
  padding: 0 0.85rem;
  border-radius: 9px;
}

/* 프로필 헤더 */
.auth-card .profile-header { margin-bottom: 1rem; }
.auth-card .profile-header h3 { font-size: 1rem; letter-spacing: 0.08rem; }
.auth-card .profile-header img { width: 80px; height: 80px; }

/* 액션 버튼 — 더 좁고 낮게 */
.auth-card .actions { margin-top: 1.2rem !important; gap: 0.5rem; }
/* 높이·글꼴·라운드 균일(폭은 li=13rem가 담당) */
.auth-card .actions .button,
.auth-card .actions button,
.auth-card .actions input[type="submit"] {
  height: 2.05rem;
  line-height: 2.05rem;
  font-size: 0.72rem;
  border-radius: 8px;
}
.auth-card .button.thin { height: 2.05rem; line-height: 2.05rem; }
