:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e3e6ea;
  --text: #1c1e21;
  --muted: #6b7280;
  --brand: #03c75a;         /* 네이버 그린 */
  --brand-dark: #02a94c;
  --accent: #ff8a3d;
  --danger: #e5484d;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }

.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 28px; background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  flex-wrap: wrap;
}
.brand { font-weight: 800; font-size: 18px; }
.topbar nav { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.topbar nav a { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.topbar nav a:hover { background: var(--bg); color: var(--text); }
.btn-gen { background: var(--brand) !important; color: #fff !important; }
.btn-gen:hover { background: var(--brand-dark) !important; }

main { max-width: 1200px; margin: 28px auto; padding: 0 20px; }

.flash {
  background: #e7f9ef; border: 1px solid #b6ecce; color: #067a3e;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 600;
}

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 16px; }
.sub { color: var(--muted); margin: 0 0 22px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: 13px; }
label .hint { color: var(--muted); font-weight: 400; font-size: 12px; }
input, select, textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
textarea { min-height: 70px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-weight: 700; cursor: pointer; font-size: 14px; color: var(--text);
}
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--danger); border-color: #f3c7c8; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.actions { display: flex; gap: 10px; margin-top: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #fafbfc; color: var(--muted); font-weight: 700; }
tr:hover td { background: #fafcff; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef1f4; }
.tag.on { background: #e7f9ef; color: #067a3e; }
.tag.off { background: #f1f2f4; color: #98a1ac; }
.table-wrap { overflow-x: auto; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-weight: 400; font-size: 12px; }

/* 말머리(상품명 앞머리) */
.pfx { color: var(--accent); }
.pname.over { text-decoration: underline wavy var(--danger); }
.pfx-tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: #fff1e6; color: #b45309;
}
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat .n { font-size: 30px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 4px; }

.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .no { background: var(--brand); color: #fff; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; font-size: 13px; }

@media (max-width: 720px) {
  .grid, .stat-row { grid-template-columns: 1fr; }
}
