/* 로그인 화면 전용 디자인 (로그인 전에는 /app 의 디자인 파일을 받을 수 없어서 따로 둔다) */
:root {
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --bg: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #b91c1c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 55%, #f1f5f9 55%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.login-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: calc(48px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.login-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.login-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.5px; }
.login-sub { color: var(--muted); font-size: 0.88rem; margin: 4px 0 18px; }

.label { display: block; font-size: 0.82rem; font-weight: 700; color: #334155; margin: 12px 0 6px; }

.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;               /* 아이폰 확대 방지 */
  font-family: inherit;
  background: #ffffff;
  color: var(--text);
}

.input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); }
.input.code { font-size: 1.4rem; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }

.btn {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn:disabled { opacity: 0.6; cursor: wait; }

.link-btn {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.alert ul { padding-left: 18px; }

.guide { font-size: 0.9rem; color: #334155; margin-bottom: 8px; }
.rules { font-size: 0.8rem; color: var(--muted); padding-left: 18px; margin-bottom: 4px; }
.warn { font-size: 0.8rem; color: #92400e; background: #fffbeb; border-radius: 6px; padding: 8px 10px; margin-top: 10px; }

.qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 216px;
  margin: 12px 0 8px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.manual { font-size: 0.82rem; color: #334155; }
.manual summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.manual p { margin: 6px 0; }

.secret {
  display: block;
  word-break: break-all;
  font-size: 0.95rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  user-select: all;
}

.footnote { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 16px; }

.btn-passkey {
  margin-top: 0;
  background: #0f172a;
}

.or-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.or-line::before,
.or-line::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

.link-as-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
