/* ============================================================
   WAGE — 인증 화면 (로그인 / 회원가입)
   ------------------------------------------------------------
   좌: 브랜드 패널 (다크) / 우: 폼
   portal.css + wage-ui.css 뒤에 로드한다.
   ============================================================ */

.wa {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--w-surface);
}

/* ── 좌: 브랜드 패널 ─────────────────────────────────────── */
.wa-brand {
  position: relative;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(110% 150% at 85% 5%, rgba(6, 182, 212, .30) 0%, transparent 55%),
    radial-gradient(95% 130% at 5% 100%, rgba(37, 99, 235, .42) 0%, transparent 58%),
    linear-gradient(150deg, #101F3B 0%, #0A1220 100%);
}
.wa-brand::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 75% 10%, #000 0%, transparent 70%);
  pointer-events: none;
}
.wa-brand > * { position: relative; z-index: 1; }

.wa-logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 800; letter-spacing: -.02em;
}
.wa-logo i {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #3B82F6, #06B6D4);
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 16px; font-weight: 800;
  box-shadow: 0 8px 20px -6px rgba(59, 130, 246, .7);
}
.wa-logo small {
  display: block;
  font-size: 10px; font-weight: 700; letter-spacing: .18em;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
}

.wa-copy { margin-top: auto; padding-top: 48px; }
.wa-copy h1 {
  font-size: 40px; font-weight: 800;
  letter-spacing: -.035em; line-height: 1.16;
  margin: 0 0 18px;
}
.wa-copy h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #60A5FA, #22D3EE);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wa-copy p {
  font-size: 14.5px; line-height: 1.75;
  color: rgba(255,255,255,.62);
  margin: 0; max-width: 44ch;
}

.wa-feats {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 26px;
}
.wa-feat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13);
  font-size: 12.5px; font-weight: 600;
  color: rgba(255,255,255,.86);
}
.wa-feat svg { width: 14px; height: 14px; opacity: .8; }

.wa-stats {
  display: flex; gap: 42px;
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.wa-stats .k {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.wa-stats .v {
  font-size: 26px; font-weight: 800;
  letter-spacing: -.02em; margin-top: 7px;
  font-variant-numeric: tabular-nums;
}

/* ── 우: 폼 ──────────────────────────────────────────────── */
.wa-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
}
.wa-form { width: 100%; max-width: 384px; }

.wa-form-head { margin-bottom: 30px; }
.wa-form-head h2 {
  font-size: 25px; font-weight: 780;
  letter-spacing: -.025em; color: var(--w-ink);
  margin: 0 0 8px;
}
.wa-form-head p { font-size: 13.5px; color: var(--w-ink-3); margin: 0; }

.wa-field { margin-bottom: 16px; }
.wa-field label {
  display: block;
  font-size: 12.5px; font-weight: 650;
  color: var(--w-ink-2);
  margin-bottom: 7px;
}
/* 라디오·체크박스는 제외 — 포함하면 세그먼트/약관의 입력이 46px 박스로 늘어난다 */
.wa-field input:not([type="radio"]):not([type="checkbox"]),
.wa-field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--w-border);
  border-radius: var(--w-r-sm);
  background: var(--w-surface);
  font-size: 14px;
  color: var(--w-ink);
  transition: border-color var(--w-t), box-shadow var(--w-t);
}
.wa-field input::placeholder { color: var(--w-ink-4); }
.wa-field input:not([type="radio"]):not([type="checkbox"]):focus,
.wa-field select:focus {
  outline: 0;
  border-color: var(--w-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
.wa-field .hint { font-size: 11.5px; color: var(--w-ink-4); margin-top: 6px; }

/* 폼 섹션 구분 */
.wa-sec-title {
  font-size: 11px; font-weight: 750;
  letter-spacing: .11em; text-transform: uppercase;
  color: var(--w-ink-4);
  padding-bottom: 9px;
  margin: 26px 0 15px;
  border-bottom: 1px solid var(--w-border);
}
.wa-form form > .wa-sec-title:first-child { margin-top: 0; }
.wa-field label b { color: #DC2626; font-weight: 700; }

/* 후원 라인 세그먼트 */
.wa-seg { display: flex; gap: 9px; }
.wa-seg-item {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 46px;
  border: 1px solid var(--w-border);
  border-radius: var(--w-r-sm);
  font-size: 13.5px; font-weight: 650;
  color: var(--w-ink-3);
  cursor: pointer;
  transition: all var(--w-t);
}
.wa-seg-item input {
  width: 15px; height: 15px; flex: 0 0 15px;
  accent-color: var(--w-brand); cursor: pointer; margin: 0;
}
.wa-seg-item:hover { border-color: var(--w-ink-4); }
.wa-seg-item.is-on {
  border-color: var(--w-brand);
  background: var(--w-brand-soft);
  color: var(--w-brand-700);
}

/* 약관 동의 */
.wa-agree {
  margin: 22px 0;
  padding: 15px 16px;
  border-radius: var(--w-r-sm);
  background: var(--w-bg);
  border: 1px solid var(--w-border);
  display: flex; flex-direction: column; gap: 11px;
}
.wa-agree .wa-check { font-size: 13px; align-items: flex-start; }
.wa-agree a { color: var(--w-brand); font-weight: 650; cursor: pointer; }
.wa-agree a:hover { text-decoration: underline; }

/* 추천인 사이트 선택 (다중 사이트일 때만 노출) */
.ref-pick {
  margin-top: 10px; padding: 12px 14px;
  background: var(--w-brand-soft);
  border: 1px solid #DBE5FA;
  border-radius: var(--w-r-sm);
  font-size: 12px; color: var(--w-brand-700);
}
.ref-pick .pickrow { display: flex; gap: 8px; margin-top: 9px; }

.wa-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 0 22px;
  font-size: 13px;
}
.wa-check { display: inline-flex; align-items: center; gap: 8px; color: var(--w-ink-2); cursor: pointer; }
.wa-check input { width: 16px; height: 16px; accent-color: var(--w-brand); cursor: pointer; }

.wa-submit {
  width: 100%; height: 48px;
  border: 0; border-radius: var(--w-r-sm);
  background: var(--w-brand);
  color: #fff;
  font-size: 14.5px; font-weight: 700;
  cursor: pointer;
  transition: background var(--w-t), transform var(--w-t), box-shadow var(--w-t);
  box-shadow: 0 8px 20px -10px rgba(37, 99, 235, .8);
}
.wa-submit:hover:not(:disabled) { background: var(--w-brand-600); transform: translateY(-1px); }
.wa-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.wa-sep {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--w-ink-4);
}
.wa-sep::before, .wa-sep::after {
  content: ''; flex: 1; height: 1px; background: var(--w-border);
}

.wa-alt {
  display: block; text-align: center;
  height: 46px; line-height: 44px;
  border: 1px solid var(--w-border);
  border-radius: var(--w-r-sm);
  font-size: 14px; font-weight: 650;
  color: var(--w-ink-2);
  transition: border-color var(--w-t), background var(--w-t);
}
.wa-alt:hover { border-color: var(--w-brand); color: var(--w-brand); background: var(--w-brand-soft); }

.wa-err {
  padding: 12px 14px;
  border-radius: var(--w-r-sm);
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  font-size: 13px; font-weight: 550;
  margin-bottom: 18px;
}

.wa-foot {
  margin-top: 30px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 12px; color: var(--w-ink-4);
}
.wa-foot a { color: var(--w-ink-3); }
.wa-foot a:hover { color: var(--w-brand); }

/* PWA 설치 버튼 — 기존 초록색이 브랜드와 충돌해서 톤다운 */
#pwaInstallSlot { margin-top: 12px; }
#pwaInstallSlot .btn,
#pwaInstallSlot button {
  width: 100%; height: 44px;
  background: var(--w-bg) !important;
  color: var(--w-ink-2) !important;
  border: 1px solid var(--w-border) !important;
  border-radius: var(--w-r-sm);
  font-size: 13px; font-weight: 650;
}

/* 언어 전환 — 폼 상단 우측 */
.wa-lang { display: flex; gap: 5px; justify-content: flex-end; margin-bottom: 26px; }
.wa-lang .lang-btn {
  min-width: 32px; height: 26px;
  padding: 0 8px;
  border: 1px solid var(--w-border);
  border-radius: 7px;
  background: var(--w-surface);
  font-size: 11px; font-weight: 700;
  color: var(--w-ink-4);
  cursor: pointer;
  transition: color var(--w-t), border-color var(--w-t), background var(--w-t);
}
.wa-lang .lang-btn:hover { color: var(--w-ink-2); border-color: var(--w-ink-4); }
.wa-lang .lang-btn.active {
  color: var(--w-brand-700);
  border-color: var(--w-brand);
  background: var(--w-brand-soft);
}

@media (max-width: 1000px) {
  .wa { grid-template-columns: 1fr; }
  .wa-brand { padding: 40px 32px 44px; }
  .wa-copy { padding-top: 30px; }
  .wa-copy h1 { font-size: 30px; }
  .wa-stats { gap: 28px; margin-top: 30px; }
  .wa-panel { padding: 40px 24px 56px; }
}
@media (max-width: 560px) {
  .wa-brand { padding: 30px 22px 34px; }
  .wa-copy h1 { font-size: 25px; }
  .wa-feats { display: none; }
  .wa-stats .v { font-size: 21px; }
}
