@charset "utf-8";

/* =========================================================
   여주 도심형 공유창고 - 회원 페이지 (가입/로그인/마이페이지)
   style.css 의 변수·버튼을 그대로 사용한다.
   ========================================================= */

.auth-body { background: var(--bg-soft); }

.auth-main {
  min-height: calc(100vh - var(--header-h) - 200px);
  padding: calc(var(--header-h) + 56px) 0 80px;
}

.header__cta .auth-link {
  padding: 10px 14px; border-radius: 10px;
  font-size: 15.5px; font-weight: 700; color: #38445c;
  transition: color .15s ease, background-color .15s ease;
}
.header__cta .auth-link:hover { color: var(--navy-800); background: var(--navy-100); }

.auth-wrap {
  width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px;
}
.auth-wrap--wide { max-width: 720px; }

/* ---------- 상단 타이틀 ---------- */
.auth-head { text-align: center; margin-bottom: 32px; }
.auth-head h1 {
  font-size: clamp(28px, 4.5vw, 36px); font-weight: 800;
  color: var(--navy-900); line-height: 1.35; margin-top: 12px;
}
.auth-head p { margin-top: 12px; font-size: 15.5px; color: var(--text-sub); }

/* ---------- 알림 ---------- */
.alert {
  padding: 16px 20px; border-radius: 12px; margin-bottom: 22px;
  font-size: 15.5px; font-weight: 700; line-height: 1.6;
}
.alert--error { background: #fff1f0; color: #c0392b; border: 1px solid #ffd3ce; }
.alert--ok { background: #eefaf2; color: #157347; border: 1px solid #c6efd6; }

/* ---------- 폼 ---------- */
.auth-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 30px; box-shadow: var(--shadow);
}

.form-block { border: 0; margin-bottom: 30px; }
.form-block:last-of-type { margin-bottom: 24px; }
.form-block legend {
  font-size: 17px; font-weight: 800; color: var(--navy-900);
  padding-bottom: 12px; margin-bottom: 18px;
  border-bottom: 2px solid var(--navy-100); width: 100%;
}
.form-block legend .opt {
  font-size: 13px; font-weight: 700; color: var(--text-sub);
  background: var(--bg-soft); padding: 3px 10px; border-radius: 999px; margin-left: 6px;
}
.block-desc { margin: -8px 0 16px; font-size: 14px; color: var(--text-sub); }

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block; font-size: 14.5px; font-weight: 800;
  color: var(--navy-900); margin-bottom: 8px;
}
.field .req {
  font-size: 12px; font-weight: 800; color: var(--orange);
  background: var(--orange-100); padding: 2px 8px; border-radius: 999px; margin-left: 4px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 16px; color: var(--text); background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6577' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
  padding-right: 42px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-700);
  box-shadow: 0 0 0 4px rgba(26, 58, 128, .1);
}
.field input:disabled {
  background: var(--bg-soft); color: var(--text-sub); cursor: not-allowed;
}
.field.is-error input, .field.is-error select, .field.is-error textarea { border-color: #e05c4b; }
.field.is-error input:focus { box-shadow: 0 0 0 4px rgba(224, 92, 75, .12); }

.field .help { margin-top: 7px; font-size: 13.5px; color: var(--text-sub); }
.field .err, .err--block { margin-top: 7px; font-size: 13.5px; font-weight: 700; color: #c0392b; }
.err--block { margin-bottom: 8px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.field-row .field { margin-bottom: 0; }

/* ---------- 체크박스 / 약관 ---------- */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; }
.check input[type="checkbox"] {
  width: 20px; height: 20px; flex: none; margin-top: 2px;
  accent-color: var(--orange); cursor: pointer;
}
.check span { font-size: 15px; color: var(--text); line-height: 1.55; }
.check--all {
  padding: 16px 18px; border-radius: 12px;
  background: var(--navy-100); margin-bottom: 14px;
}
.check--all span { font-size: 16px; color: var(--navy-900); }

.check-list { display: grid; gap: 4px; }
.check-item { position: relative; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.check-item:last-child { border-bottom: 0; }
.check-item.is-error .check span { color: #c0392b; }

.terms-toggle {
  position: absolute; top: 10px; right: 0;
  font-size: 13px; font-weight: 700; color: var(--text-sub);
  text-decoration: underline; padding: 4px;
}
.terms-toggle:hover { color: var(--navy-800); }

.terms-box {
  display: none;
  margin: 10px 0 6px; padding: 16px 18px;
  max-height: 190px; overflow-y: auto;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  font-size: 13.5px; color: var(--text-sub); line-height: 1.75;
}
.terms-box.is-open { display: block; }
.terms-box p { margin-bottom: 12px; }
.terms-box p:last-child { margin-bottom: 0; }
.terms-box b { color: var(--navy-900); }

/* ---------- 버튼 ---------- */
.btn--full { width: 100%; height: 58px; font-size: 18px; }

.auth-foot {
  margin-top: 22px; text-align: center;
  font-size: 15px; color: var(--text-sub); line-height: 1.9;
}
.auth-foot a { font-weight: 800; color: var(--navy-800); text-decoration: underline; }
.auth-foot a:hover { color: var(--orange); }
.auth-foot__sub { font-size: 13.5px; }

/* ---------- 마이페이지 ---------- */
.mypage-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px; margin-bottom: 22px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-radius: var(--radius); color: #fff;
}
.mypage-cta b { display: block; font-size: 17px; font-weight: 800; }
.mypage-cta span { font-size: 14.5px; color: rgba(255, 255, 255, .78); }

/* ---------- 반응형 ---------- */
@media (max-width: 640px) {
  .auth-main { padding: calc(var(--header-h) + 32px) 0 60px; }
  .auth-form { padding: 26px 20px; border-radius: var(--radius); }
  .field-row { grid-template-columns: 1fr; gap: 20px; }
  /* 회원 페이지에서는 햄버거 대신 로그인/마이페이지 링크를 노출 */
  .auth-body .header__cta { display: flex !important; gap: 2px; }
  .auth-body .header__cta .header__tel { display: none; }
  .auth-body .header__cta .auth-link { font-size: 14.5px; padding: 8px 10px; }
  .mypage-cta { flex-direction: column; align-items: flex-start; }
  .mypage-cta .btn { width: 100%; }
}

/* 메인 페이지 모바일 메뉴 안의 로그인/회원가입 */
.gnb .gnb__auth { color: var(--navy-800); font-weight: 800; }
.gnb .gnb__auth:first-of-type { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 16px; }
@media (min-width: 1041px) { .gnb .gnb__auth { display: none; } }
