* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2563eb; --primary-dark: #1d4ed8; --bg: #f1f5f9;
  --card: #ffffff; --text: #0f172a; --muted: #64748b; --border: #e2e8f0;
  --green: #16a34a; --red: #dc2626; --orange: #d97706;
}
body { font-family: 'Segoe UI', 'Malgun Gothic', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* 헤더 */
header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.nav { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; height: 60px; gap: 24px; }
.nav .logo { font-size: 20px; font-weight: 700; color: var(--primary); text-decoration: none; }
.nav a { color: var(--text); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--primary); }
.nav .spacer { flex: 1; }
.nav .user-email { color: var(--muted); font-size: 13px; }

main { max-width: 1100px; margin: 0 auto; padding: 32px 20px 80px; }
h1 { font-size: 26px; margin-bottom: 8px; }
h2 { font-size: 19px; margin: 28px 0 12px; }
.sub { color: var(--muted); margin-bottom: 24px; }

/* 카드 */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

/* 버튼/폼 */
.btn { display: inline-block; background: var(--primary); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 18px; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--primary-dark); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn.danger { background: var(--red); }
.btn.gray { background: var(--muted); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; margin-bottom: 12px; background: #fff; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #334155; }
.form-narrow { max-width: 420px; margin: 0 auto; }

/* 테이블 */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { background: #f8fafc; font-size: 12px; color: var(--muted); text-transform: uppercase; }
tr:hover td { background: #f8fafc; }

/* 배지 */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.green { background: #dcfce7; color: var(--green); }
.badge.red { background: #fee2e2; color: var(--red); }
.badge.orange { background: #fef3c7; color: var(--orange); }
.badge.blue { background: #dbeafe; color: var(--primary); }
.badge.gray { background: #f1f5f9; color: var(--muted); }

/* 요금제 선택 */
.plan-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.plan-opt { flex: 1; min-width: 90px; border: 2px solid var(--border); border-radius: 10px; padding: 10px;
  text-align: center; cursor: pointer; }
.plan-opt.selected { border-color: var(--primary); background: #eff6ff; }
.plan-opt .months { font-weight: 700; }
.plan-opt .price { font-size: 13px; color: var(--muted); }

/* 탭 */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 10px 16px; font-size: 14px; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; font-weight: 600; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

/* 통계 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.stat .num { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat .lbl { font-size: 13px; color: var(--muted); }

/* 기타 */
.msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; display: none; }
.msg.error { background: #fee2e2; color: var(--red); display: block; }
.msg.success { background: #dcfce7; color: var(--green); display: block; }
.serial { font-family: Consolas, monospace; background: #f1f5f9; padding: 3px 8px; border-radius: 6px; font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.type-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.type-toggle button { flex: 1; padding: 12px; border: 2px solid var(--border); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; }
.type-toggle button.selected { border-color: var(--primary); background: #eff6ff; color: var(--primary); }

/* ---- 홈페이지(랜딩) ---- */
.hero { text-align: center; padding: 90px 20px 80px; color: #fff;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%); }
.hero h1 { font-size: 40px; line-height: 1.3; }
.hero p { color: #dbeafe; margin: 16px 0 32px; font-size: 17px; line-height: 1.7; }
.hero .btn.big { padding: 14px 32px; font-size: 16px; background: #fff; color: var(--primary); font-weight: 700; }
.hero .btn.big:hover { background: #eff6ff; }
.hero .btn.ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6);
  padding: 14px 32px; font-size: 16px; margin-left: 8px; }
.hero .btn.ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.section { padding: 70px 20px; }
.section.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section h2.title { font-size: 28px; text-align: center; margin: 0 0 8px; }
.section p.desc { text-align: center; color: var(--muted); margin-bottom: 40px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 28px 24px; }
.feature .icon { width: 48px; height: 48px; border-radius: 12px; background: #eff6ff; display: flex;
  align-items: center; justify-content: center; font-size: 24px; margin-bottom: 14px; }
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--muted); line-height: 1.6; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step { text-align: center; padding: 24px 16px; }
.step .no { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff;
  font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.step h3 { font-size: 15px; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--muted); line-height: 1.6; }

.cta { text-align: center; padding: 70px 20px; color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.cta h2 { font-size: 26px; margin-bottom: 10px; }
.cta p { color: #dbeafe; margin-bottom: 24px; }
.cta .btn { background: #fff; color: var(--primary); font-weight: 700; padding: 13px 30px; font-size: 15px; }

footer { background: #0f172a; color: #94a3b8; padding: 40px 20px; font-size: 13px; }
footer .inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 20px; }
footer .brand { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
footer a { color: #94a3b8; text-decoration: none; margin-right: 16px; }
footer a:hover { color: #fff; }

main.full { max-width: none; padding: 0; }
@media (max-width: 640px) {
  .nav { gap: 12px; } table { font-size: 12px; } th, td { padding: 6px; }
  .hero h1 { font-size: 28px; } .hero { padding: 60px 16px; }
}
