/* ============================================================
   유어아이티(YourIT) - 공통 스타일
   ============================================================ */
:root {
  --blue: #3182f6;
  --blue-dark: #1b64da;
  --blue-light: #e8f3ff;
  --text: #191f28;
  --text-sub: #4e5968;
  --text-mute: #8b95a1;
  --line: #e5e8eb;
  --bg: #f2f4f6;
  --white: #fff;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Malgun Gothic", "맑은 고딕", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

/* ── 헤더 ─────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
}
.logo .mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 900;
}
.logo .blue { color: var(--blue); }
.logo-svg { display: block; height: 36px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--text-sub); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); }
.nav .user-email { color: var(--text-mute); font-size: 14px; }

/* ── 컨테이너 ─────────────────────────────── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 520px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }

/* ── 버튼 ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 20px;
  transition: background 0.15s, opacity 0.15s;
  width: 100%;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { background: #d1d6db; color: #fff; cursor: not-allowed; }
.btn-ghost { background: var(--blue-light); color: var(--blue); }
.btn-ghost:hover { background: #d8eafe; }
.btn-line { background: #fff; color: var(--text-sub); border: 1px solid var(--line); }
.btn-sm { width: auto; padding: 10px 16px; font-size: 14px; border-radius: 10px; }

/* ── 히어로 ───────────────────────────────── */
.hero {
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  padding: 72px 0 56px;
  text-align: center;
}
.hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 16px;
}
.hero h1 .blue { color: var(--blue); }
.hero p { font-size: 18px; color: var(--text-sub); margin-bottom: 28px; }
.hero .btns { display: flex; gap: 10px; justify-content: center; }
.hero .btns .btn { width: auto; padding: 14px 28px; }

/* ── 카드 그리드 ─────────────────────────── */
.tier-head { text-align: center; margin-bottom: 36px; }
.tier-head h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.8px; }
.tier-head p { color: var(--text-sub); margin-top: 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

.plan-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #cfe0fb;
}
.plan-card .badge {
  position: absolute; top: 20px; right: 20px;
  background: var(--blue); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.plan-card .cat {
  font-size: 13px; font-weight: 700; color: var(--blue);
  margin-bottom: 6px;
}
.plan-card h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; }
.plan-card .desc { color: var(--text-sub); font-size: 14px; margin: 10px 0 18px; min-height: 40px; }
.plan-card .price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.plan-card .price .amt { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.plan-card .price .per { color: var(--text-mute); font-size: 15px; }
.plan-card .price-sub { color: var(--text-mute); font-size: 13px; margin-bottom: 20px; }
.plan-card ul { list-style: none; margin-bottom: 24px; flex: 1; }
.plan-card ul li {
  font-size: 14px; color: var(--text-sub);
  padding: 7px 0 7px 24px; position: relative;
}
.plan-card ul li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

/* ── 체크아웃 카드 ─────────────────────────── */
.checkout-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.checkout-top {
  background: #f7f9fa;
  padding: 28px 28px 24px;
  border-bottom: 1px solid var(--line);
}
.checkout-top .cat { font-size: 13px; font-weight: 700; color: var(--blue); }
.checkout-top h2 { font-size: 22px; font-weight: 800; margin: 4px 0 14px; }
.checkout-top .price { display: flex; align-items: baseline; gap: 6px; }
.checkout-top .price .amt { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.checkout-top .price .per { color: var(--text-sub); font-size: 16px; }
.checkout-top .note {
  margin-top: 14px; font-size: 13px; color: var(--text-sub);
  line-height: 1.6;
}
.checkout-body { padding: 24px 28px 28px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.field input {
  width: 100%; height: 52px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 0 16px; font-size: 16px; color: var(--text);
  background: #fff;
}
.field input:focus { outline: none; border-color: var(--blue); }

.divider { height: 1px; background: var(--line); margin: 22px 0; }

.agree-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
}
.agree-row input[type="checkbox"] {
  width: 22px; height: 22px; margin-top: 2px;
  accent-color: var(--blue); flex-shrink: 0; cursor: pointer;
}
.agree-row .a-text { flex: 1; }
.agree-row .a-text strong { font-size: 15px; font-weight: 700; display: block; }
.agree-row .a-text span { font-size: 13px; color: var(--text-mute); }
.agree-row .a-link { font-size: 13px; color: var(--text-mute); text-decoration: underline; align-self: center; }

/* ── 카드 등록 모달(스크린샷형) ───────────────── */
.cm {
  max-width: 560px; margin: 28px auto;
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
.cm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid #f0f2f4;
}
.cm-head .t { font-size: 17px; font-weight: 700; }
.cm-head .ic {
  width: 28px; height: 28px; display: grid; place-items: center;
  color: var(--text-sub); font-size: 18px; border-radius: 8px;
}
.cm-head .ic:hover { background: #f2f4f6; }
.cm-body { padding: 22px 24px 28px; }

.cm-product {
  background: #f4f6f8; border-radius: 12px;
  padding: 20px; margin-bottom: 26px;
}
.cm-product .cat { font-size: 13px; font-weight: 700; color: var(--blue); }
.cm-product .pname { font-size: 17px; font-weight: 800; margin: 2px 0 10px; }
.cm-product .price { display: flex; align-items: baseline; gap: 5px; }
.cm-product .price .amt { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.cm-product .price .per { color: var(--text-sub); font-size: 15px; }
.cm-product .pdesc { margin-top: 12px; font-size: 13px; color: var(--text-sub); line-height: 1.65; }

.cm-field { margin-bottom: 18px; }
.cm-field .lbl {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.cm-field .lbl label { font-size: 15px; font-weight: 700; }
.cm-field .brands { display: flex; gap: 5px; align-items: center; }
.cm-field .brands .b {
  font-size: 10px; font-weight: 800; color: #fff;
  padding: 3px 5px; border-radius: 4px; letter-spacing: 0.3px;
}
.cm-field .count { font-size: 12px; color: var(--text-mute); }
.cm-input {
  width: 100%; height: 54px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 0 16px; font-size: 16px; color: var(--text); background: #fff;
}
.cm-input:focus { outline: none; border-color: var(--blue); }
.cm-input::placeholder { color: #b0b8c1; }

.cm-info {
  display: flex; gap: 7px; align-items: flex-start;
  font-size: 13px; color: var(--blue); font-weight: 600;
  margin: -6px 0 18px; line-height: 1.5;
}
.cm-info .dot {
  width: 16px; height: 16px; border-radius: 50%; background: var(--blue);
  color: #fff; font-size: 11px; display: grid; place-items: center;
  flex-shrink: 0; margin-top: 1px;
}

.cm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.cm-agree {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 0;
}
.cm-agree input[type="checkbox"] {
  width: 22px; height: 22px; margin-top: 1px;
  accent-color: var(--blue); flex-shrink: 0; cursor: pointer;
}
.cm-agree .txt { flex: 1; }
.cm-agree .txt strong { display: block; font-size: 15px; font-weight: 700; }
.cm-agree .txt span { font-size: 13px; color: var(--text-mute); }
.cm-agree .lnk { font-size: 13px; color: var(--text-mute); text-decoration: underline; align-self: center; white-space: nowrap; }
.cm-divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ── 로그인 ───────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: grid; place-items: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: #fff; border-radius: 20px;
  box-shadow: var(--shadow); padding: 36px 32px;
}
.auth-card h1 { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--text-sub); font-size: 14px; margin-bottom: 26px; }
.auth-hint {
  background: var(--blue-light); color: var(--blue-dark);
  font-size: 13px; border-radius: 10px; padding: 12px 14px;
  margin-bottom: 20px; line-height: 1.6;
}

/* ── 알림/배너 ───────────────────────────── */
.banner {
  display: flex; gap: 10px; align-items: center;
  background: var(--blue-light); color: var(--blue-dark);
  border-radius: 12px; padding: 14px 16px; font-size: 14px;
  margin-bottom: 20px;
}

/* ── 마이페이지 ──────────────────────────── */
.sub-item {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.sub-item .meta .cat { font-size: 13px; color: var(--blue); font-weight: 700; }
.sub-item .meta h4 { font-size: 18px; font-weight: 800; margin: 2px 0 4px; }
.sub-item .meta p { font-size: 14px; color: var(--text-sub); }
.sub-item .right { text-align: right; }
.sub-item .right .amt { font-size: 18px; font-weight: 800; }
.sub-item .right .st { font-size: 13px; color: #22a06b; font-weight: 700; }

.empty {
  text-align: center; padding: 60px 20px; color: var(--text-mute);
}

/* ── 결과 페이지 ─────────────────────────── */
.result-card {
  background: #fff; border-radius: 20px; box-shadow: var(--shadow);
  padding: 44px 32px; text-align: center; max-width: 440px;
  margin: 60px auto;
}
.result-card .icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 20px;
  font-size: 38px;
}
.result-card .icon.ok { background: var(--blue-light); color: var(--blue); }
.result-card .icon.err { background: #fdecec; color: #f04452; }
.result-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.result-card p { color: var(--text-sub); font-size: 15px; margin-bottom: 8px; }
.result-card .kv {
  background: #f7f9fa; border-radius: 12px; padding: 16px;
  text-align: left; margin: 22px 0; font-size: 13px;
}
.result-card .kv div { display: flex; justify-content: space-between; padding: 5px 0; }
.result-card .kv span { color: var(--text-mute); }
.result-card .kv b { font-weight: 600; word-break: break-all; max-width: 60%; text-align: right; }

/* ── 푸터 ─────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 36px 0;
  margin-top: 40px;
}
.footer .container { color: var(--text-mute); font-size: 13px; line-height: 1.9; }
.footer b { color: var(--text-sub); font-weight: 700; }
.footer-links {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.footer-links a { color: var(--text-sub); font-size: 13px; }
.footer-links a:hover { color: var(--text); }

/* ── 약관 ─────────────────────────────────── */
.terms { background: #fff; border-radius: 16px; padding: 36px; box-shadow: var(--shadow); }
.terms h1 { font-size: 24px; margin-bottom: 20px; }
.terms h3 { font-size: 17px; margin: 24px 0 8px; }
.terms p, .terms li { color: var(--text-sub); font-size: 14px; line-height: 1.8; }
.terms ul { padding-left: 20px; }
