/* ============================================================
   auth.css — 로그인·인증 페이지 전용 스타일
   ============================================================
   layout.html / sidebar / header 미사용 — 독립형 레이아웃.
   app.css 를 통해 tokens, base, buttons, forms 상속.
   ============================================================ */

/* ── 전체 페이지 배경 ───────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #101c2a 0%, #1e3a5f 50%, #101c2a 100%);
  padding: 24px 16px;
}

/* ── 격자패턴 BG 레이어 — 다크 배경 대응 ───────────────────── */
.auth-page .db-bg-grid {
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.1) 1px, transparent 1px);
  opacity: 0.85;
}

/* ── 로그인 카드 ────────────────────────────────────────────── */
.auth-card {
  border-radius: var(--wd-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

/* 카피라이트도 그리드 위에 표시 */
.auth-copyright {
  position: relative;
  z-index: 1;
}

/* ── 카드 헤더 (브랜드) ─────────────────────────────────────── */
.auth-brand {
  background: linear-gradient(to right, #101c2a, #1e3a5f);
  border-radius: var(--wd-radius-lg) var(--wd-radius-lg) 0 0;
  padding: 32px 40px 28px;
  text-align: center;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(101, 117, 245, 0.2);
  border: 2px solid rgba(101, 117, 245, 0.4);
  border-radius: var(--wd-radius-md);
  margin-bottom: 14px;
  color: #7fb3f5;
}

.auth-brand-name {
  display: block;
  font-size: var(--wd-text-brand);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1;
}

.auth-brand-name span {
  color: #5ba3f5;
}

.auth-brand-sub {
  display: block;
  font-size: var(--wd-text-sm);
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
}

/* ── 카드 본문 (폼) ─────────────────────────────────────────── */
.auth-body {
  background: var(--wd-card-bg);
  padding: 32px 40px 28px;
}

.auth-title {
  font-size: var(--wd-text-2xl);
  font-weight: 700;
  color: var(--wd-text-dark);
  margin: 0 0 4px;
}

.auth-desc {
  font-size: var(--wd-text-sm);
  color: var(--wd-text-muted);
  margin: 0 0 28px;
}

/* 입력 필드 간격 */
.auth-body .form-group {
  margin-bottom: 18px;
}

/* 비밀번호 입력 + 토글 래퍼 */
.input-password-wrap {
  position: relative;
}

.input-password-wrap .form-control {
  padding-right: 44px;
}

.btn-pw-toggle {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 42px;
  border: none;
  background: transparent;
  color: var(--wd-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 var(--wd-radius-sm) var(--wd-radius-sm) 0;
  transition: color 0.15s;
}
.btn-pw-toggle:hover { color: var(--wd-primary); }

/* 기억·찾기 행 */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: var(--wd-text-sm);
}

.auth-options .form-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  cursor: pointer;
  color: var(--wd-text-muted);
}

.auth-options .form-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--wd-primary);
  cursor: pointer;
}

.auth-link {
  color: var(--wd-primary);
  text-decoration: none;
  font-weight: 500;
}
.auth-link:hover { text-decoration: underline; }

/* 로그인 버튼 — 전체 너비 */
.auth-body .btn-login {
  width: 100%;
  padding: 11px;
  font-size: var(--wd-text-base);
  font-weight: 600;
}

/* ── 카드 푸터 ──────────────────────────────────────────────── */
.auth-footer {
  background: var(--wd-card-bg);
  border-radius: 0 0 var(--wd-radius-lg) var(--wd-radius-lg);
  padding: 0 40px 24px;
  text-align: center;
  font-size: var(--wd-text-xs);
  color: var(--wd-text-muted);
}

.auth-footer a {
  color: var(--wd-text-muted);
  text-decoration: underline;
}
.auth-footer a:hover { color: var(--wd-primary); }

/* ── 페이지 하단 카피라이트 ─────────────────────────────────── */
.auth-copyright {
  text-align: center;
  margin-top: 20px;
  font-size: var(--wd-text-xs);
  color: rgba(255, 255, 255, 0.3);
}

/* ── 알림 메시지 (로그인 오류) ──────────────────────────────── */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--wd-radius-sm);
  font-size: var(--wd-text-sm);
  margin-bottom: 20px;
  background: #fff2f2;
  border: 1px solid #ffc5c5;
  color: #c0392b;
}

.auth-alert.is-hidden { display: none; }

/* ── 반응형 ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-brand  { padding: 24px 24px 20px; }
  .auth-body   { padding: 24px 24px 20px; }
  .auth-footer { padding: 0 24px 20px; }
}
