/* =====================================================
   Branch Login — 전용 CSS (모바일 우선 반응형)
   기존 사이트 CSS 건드리지 않음. 이 파일만 단독 로드.
   ===================================================== */

/* ── 기본 리셋 (Pretendard 기반, 사이트와 동일 베이스) */
*, *::before, *::after {
  margin: 0; padding: 0; border: 0;
  box-sizing: border-box;
  word-break: keep-all;
}

html {
  font-size: 16px;
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f7f8fa;
  color: #101010;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.03em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
button { cursor: pointer; font-family: inherit; }
input { font-family: inherit; }

/* ── 레이아웃 래퍼 */
.bl-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 48px;
  min-height: 100vh;
}

/* ── 로고 영역 */
.bl-logo {
  margin-bottom: 28px;
  text-align: center;
}

.bl-logo__img {
  height: 28px;
  width: auto;
  display: block;
  margin: 0 auto;
}

/* ── 카드 */
.bl-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

/* ── 제목 */
.bl-title {
  font-size: 19px;
  font-weight: 700;
  color: #101010;
  letter-spacing: -0.6px;
  line-height: 1.4;
  margin-bottom: 6px;
}

.bl-subtitle {
  font-size: 13px;
  color: #a4a4a4;
  letter-spacing: -0.3px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── 폼 */
.bl-form { display: flex; flex-direction: column; gap: 12px; }

.bl-field { display: flex; flex-direction: column; gap: 6px; }

.bl-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: -0.2px;
}

.bl-input {
  width: 100%;
  height: 50px;
  border: 1.5px solid #efefef;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 400;
  color: #101010;
  background: #fff;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  letter-spacing: -0.3px;
}

.bl-input::placeholder { color: #c8c8c8; }

.bl-input:focus {
  border-color: #42b649;
  box-shadow: 0 0 0 3px rgba(66, 182, 73, 0.10);
}

.bl-input.is-err {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.09);
}

/* ── 에러 메시지 */
.bl-error {
  display: none;
  align-items: center;
  gap: 6px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #dc2626;
  letter-spacing: -0.3px;
  line-height: 1.45;
}

.bl-error.is-show { display: flex; }

.bl-error__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background: #dc2626;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

/* ── 제출 버튼 */
.bl-btn {
  width: 100%;
  height: 50px;
  background: #42b649;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
  margin-top: 4px;
  border: none;
  transition: background 0.18s, transform 0.1s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bl-btn:hover  { background: #3aa342; }
.bl-btn:active { transform: scale(0.98); }
.bl-btn:disabled {
  background: #a3d9a7;
  cursor: not-allowed;
  transform: none;
}

/* 로딩 스피너 */
.bl-btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bl-spin 0.6s linear infinite;
}

.bl-btn.is-loading .bl-btn__spinner { display: block; }
.bl-btn.is-loading .bl-btn__text   { opacity: 0.7; }

@keyframes bl-spin {
  to { transform: rotate(360deg); }
}

/* ── 하단 안내 */
.bl-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #b0b0b0;
  letter-spacing: -0.2px;
  line-height: 1.6;
}

/* ── 반응형 */
@media (max-width: 400px) {
  .bl-card {
    border-radius: 16px;
    padding: 28px 20px 24px;
  }
  .bl-title    { font-size: 17px; }
  .bl-input    { height: 47px; }
  .bl-btn      { height: 47px; font-size: 15px; }
}

@media (min-width: 600px) {
  .bl-card { box-shadow: 0 8px 40px rgba(0, 0, 0, 0.09); }
}
