:root {
  --navy:    #0D1B2A;
  --blue:    #1A5276;
  --mid:     #2471A3;
  --sky:     #3498DB;
  --light:   #EBF5FB;
  --green:   #16A34A;
  --green-l: #DCFCE7;
  --red:     #DC2626;
  --red-l:   #FEE2E2;
  --amber:   #D97706;
  --amber-l: #FEF3C7;
  --gray-l:  #F7F9FC;
  --gray-1:  #F1F4F8;
  --gray-2:  #E2E8F0;
  --gray-3:  #CBD5E1;
  --gray-4:  #94A3B8;
  --gray-5:  #64748B;
  --gray-7:  #334155;
  --white:   #FFFFFF;
  --font-d:  'Gmarket Sans', 'Noto Sans KR', sans-serif;
  --font-b:  'Noto Sans KR', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-b);
  background: var(--gray-l);
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

/* ─── 왼쪽 브랜드 패널 ─── */
.brand-panel {
  width: 420px;
  min-width: 420px;
  background: linear-gradient(160deg, var(--navy) 0%, #1a3a5c 50%, #1e4d7a 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.brand-panel::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52,152,219,.18) 0%, transparent 70%);
}

.brand-panel::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72,201,176,.1) 0%, transparent 70%);
}

.bp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.bp-logo-box {
  width: 40px;
  height: 40px;
  background: var(--blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.bp-logo-text {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.bp-mid { position: relative; z-index: 1; }

.bp-title {
  font-family: var(--font-d);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 16px;
}

.bp-title span {
  background: linear-gradient(90deg, #7EC8E3, #48C9B0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bp-sub {
  font-size: 16px;
  color: rgba(255,255,255,.6);
  line-height: 1.8;
}

.bp-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.bp-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 12px 16px;
}

.bp-feat-icon { font-size: 20px; }

.bp-feat-text {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  font-weight: 500;
}

.bp-bottom {
  font-size: 13px;
  color: rgba(255,255,255,.35);
  position: relative;
  z-index: 1;
}

/* ─── 오른쪽 폼 패널 ─── */
.form-panel {
  flex: 1;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
}

.form-wrap {
  width: 100%;
  max-width: 520px;
}

/* 스텝 인디케이터 */
.step-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.sb-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all .3s;
  flex-shrink: 0;
}

.sb-circle.done { background: var(--blue); color: #fff; }
.sb-circle.active { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(26,82,118,.15); }
.sb-circle.wait { background: var(--gray-2); color: var(--gray-4); }

.sb-label { font-size: 12px; font-weight: 700; color: var(--gray-4); }
.sb-circle.active + .sb-label, .sb-circle.done + .sb-label { color: var(--blue); }

.sb-line { flex: 1; height: 2px; background: var(--gray-2); margin: 0 8px; }
.sb-line.done { background: var(--blue); }

.form-title {
  font-family: var(--font-d);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-sub {
  font-size: 14px;
  color: var(--gray-5);
  margin-bottom: 28px;
}

/* 역할 선택 */
.role-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.role-card {
  border: 2px solid var(--gray-2);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all .2s;
  background: var(--white);
  text-align: center;
}

.role-card:hover { border-color: var(--sky); }
.role-card.selected { border-color: var(--blue); background: var(--light); }

.role-icon { font-size: 32px; margin-bottom: 8px; }
.role-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.role-desc { font-size: 12px; color: var(--gray-5); margin-top: 4px; line-height: 1.5; }

/* 소셜 로그인 */
.social-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px;
  border-radius: 12px;
  border: 1.5px solid var(--gray-2);
  background: var(--white);
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  color: var(--gray-7);
}

.social-btn:hover { background: var(--gray-l); border-color: var(--gray-3); }

.social-btn.kakao { background: #FEE500; border-color: #FEE500; color: #3A1D1D; }
.social-btn.kakao:hover { background: #F5DC00; }

.social-btn.naver { background: #03C75A; border-color: #03C75A; color: #fff; }
.social-btn.naver:hover { background: #02B351; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

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

.divider span { font-size: 12px; color: var(--gray-4); font-weight: 600; }

/* 폼 필드 */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin-bottom: 16px; }

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-7);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.field-label .req { color: var(--red); font-size: 12px; }

.field-input-wrap { position: relative; }

.field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--gray-4);
}

.field-input {
  width: 100%;
  padding: 11px 12px 11px 38px;
  border: 1.5px solid var(--gray-2);
  border-radius: 11px;
  font-family: var(--font-b);
  font-size: 14px;
  color: var(--navy);
  background: var(--gray-l);
  transition: border-color .18s, background .18s;
}

.field-input.no-icon { padding-left: 12px; }
.field-input:focus { outline: none; border-color: var(--sky); background: var(--white); }
.field-input.error { border-color: var(--red); }
.field-input.success { border-color: var(--green); }

.field-hint { font-size: 12px; color: var(--gray-4); margin-top: 5px; }
.field-error { font-size: 12px; color: var(--red); margin-top: 5px; display: none; }
.field-input.error ~ .field-error { display: block; }

.field-input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.verify-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--light);
  border: none;
  border-radius: 7px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
}

/* 약관 */
.terms-wrap {
  background: var(--gray-l);
  border: 1px solid var(--gray-2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
}

.terms-all {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-2);
  margin-bottom: 10px;
}

.terms-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-7);
  cursor: pointer;
  margin-bottom: 8px;
}

.terms-item:last-child { margin: 0; }

.terms-link {
  font-size: 12px;
  color: var(--sky);
  margin-left: auto;
  font-weight: 600;
}

input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  flex-shrink: 0;
  cursor: pointer;
}

/* 버튼 */
.submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 13px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-b);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.submit-btn:hover {
  background: var(--mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,82,118,.3);
}

.submit-btn:disabled {
  background: var(--gray-2);
  color: var(--gray-4);
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

.login-link { text-align: center; font-size: 14px; color: var(--gray-5); }
.login-link a { color: var(--blue); font-weight: 700; text-decoration: none; }
.login-link a:hover { text-decoration: underline; }

/* 단계 컨테이너 */
.step-content { display: none; }
.step-content.active { display: block; }

/* 비밀번호 강도 */
.pw-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--gray-2);
  margin-top: 6px;
  overflow: hidden;
}

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

.pw-label { font-size: 11px; margin-top: 4px; }

/* 토스트 */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  transform: translateY(70px);
  opacity: 0;
  transition: all .32s cubic-bezier(.34,1.56,.64,1);
  z-index: 600;
}

.toast.show { transform: translateY(0); opacity: 1; }

@media(max-width: 860px) {
  .brand-panel { display: none; }
  .form-panel { padding: 28px 16px; }
}

@keyframes fadeInSignUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.step-content.active { animation: fadeInSignUp .3s ease; }
