/* ============================================================
   BIZLOAN HUB — 사업자대출 매칭 플랫폼
   공통 디자인 시스템
   ============================================================ */
:root {
  --navy: #0b1b34;
  --navy-2: #12294d;
  --blue: #1b5cff;
  --blue-dark: #0f3fc4;
  --blue-soft: #eaf0ff;
  --green: #0aa66e;
  --amber: #f5a524;
  --red: #e5484d;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #98a2b3;
  --line: #e4e7ec;
  --bg: #f6f8fb;
  --white: #fff;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --max: 1180px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --font-num: "Pretendard Variable", Pretendard, ui-monospace, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-feature-settings: "tnum" 1, "case" 1;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.02em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.tc { text-align: center; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12px; }
.sm { font-size: 13px; }

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-in { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.03em; color: var(--navy); }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), #6a3bff);
  display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 900;
}
.hdr-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hdr-cta {
  background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 700; border: 0;
}
.hdr-nav a.sign-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--blue-dark); background: var(--blue-soft);
  padding: 8px 13px; border-radius: 999px; font-weight: 700;
}
.hdr-nav a.sign-link:hover { background: #dbe6ff; }
@media (max-width: 760px) {
  .hdr-nav a { display: none; }
  .hdr-nav a.sign-link { display: inline-flex; font-size: 13px; padding: 7px 11px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r); padding: 14px 22px;
  font-size: 15px; font-weight: 700; transition: .15s; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(27,92,255,.28); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f9fafb; }
.btn-danger { background: #fef3f2; color: var(--red); border: 1px solid #fecdca; }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 28px; font-size: 17px; border-radius: 14px; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ---------- Cards / forms ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.pad { padding: 24px; }
.field { margin-bottom: 18px; }
.label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.label .req { color: var(--red); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%; padding: 13px 14px; border: 1px solid #d0d5dd; border-radius: 10px;
  background: #fff; color: var(--ink); outline: none; transition: .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.input.err, .select.err { border-color: var(--red); box-shadow: 0 0 0 4px #fef3f2; }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.err-msg { font-size: 12.5px; color: var(--red); margin-top: 6px; display: none; }
.err-msg.on { display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

/* 선택형 칩 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 11px 16px; border: 1px solid #d0d5dd; border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 600; color: var(--ink-2); transition: .15s;
}
.chip.on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }

/* 체크박스 */
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; }
.check input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--blue); flex: none; }
.check label { font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check .strong { color: var(--ink); font-weight: 600; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.b-new { background: #eff8ff; color: #175cd3; }
.b-signed { background: #ecfdf3; color: #067647; }
.b-contacted { background: #fffaeb; color: #b54708; }
.b-matched { background: #f4f3ff; color: #5925dc; }
.b-sold { background: #ecfdf3; color: #067647; }
.b-rejected { background: #fef3f2; color: #b42318; }
.b-grade-A { background: #ecfdf3; color: #067647; }
.b-grade-B { background: #eff8ff; color: #175cd3; }
.b-grade-C { background: #fffaeb; color: #b54708; }
.b-grade-D { background: #f2f4f7; color: #475467; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--navy); color: #fff; padding: 13px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 999; max-width: 90vw;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--red); }

/* ---------- Loader ---------- */
.spin {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- Progress steps ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 26px; }
.step-bar { flex: 1; height: 5px; border-radius: 99px; background: var(--line); }
.step-bar.on { background: var(--blue); }

/* ---------- Footer ---------- */
.ftr { background: var(--navy); color: #94a3b8; padding: 40px 0 60px; margin-top: 60px; font-size: 13px; }
.ftr .logo { color: #fff; margin-bottom: 14px; }
.ftr-legal { line-height: 1.9; }
.ftr a { color: #cbd5e1; text-decoration: underline; }
