:root {
  --bg: #f6f7f9; --panel: #fff; --text: #1d2129; --muted: #6b7280; --line: #e5e7eb;
  --brand: #03c75a; --brand-dark: #02a64b; --warn: #f59e0b; --danger: #e5484d; --info: #3b82f6;
  --chip: #f1f3f5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
a { color: inherit; }
header { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.nav { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 4px; padding: 0 16px; height: 56px; }
.nav .logo { font-weight: 700; margin-right: 20px; display: flex; align-items: center; gap: 8px; }
.nav .logo span { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); display: inline-block; }
.nav a.tab { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav a.tab.on, .nav a.tab:hover { background: var(--chip); color: var(--text); }
.nav .job { margin-left: auto; font-size: 12px; color: var(--muted); }
main { max-width: 1280px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 28px 0 10px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.flash.ok { background: #e8f8ef; color: #0b6b37; }
.flash.error { background: #fdecec; color: #a02125; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-decoration: none; }
.tile .label { color: var(--muted); font-size: 13px; }
.tile .value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.tile.alert .value { color: var(--danger); }
.tile.warn .value { color: var(--warn); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
button, .btn { border: 1px solid var(--line); background: var(--panel); padding: 7px 12px; border-radius: 8px;
  cursor: pointer; font: inherit; text-decoration: none; display: inline-block; white-space: nowrap; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--brand-dark); }
button.danger { color: var(--danger); }
button.tiny { padding: 3px 8px; font-size: 12px; }
input[type=text], input[type=number], input[type=search], select {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; background: #fff; }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: var(--panel); }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #fafbfc; font-weight: 600; font-size: 12px; color: var(--muted); position: sticky; top: 0; }
tr:last-child td { border-bottom: none; }
td.num { text-align: right; white-space: nowrap; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--chip); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--chip); white-space: nowrap; }
.chip.SALE, .chip.판매중 { background: #e8f8ef; color: #0b6b37; }
.chip.OUTOFSTOCK, .chip.품절 { background: #fdecec; color: #a02125; }
.chip.SUSPENSION, .chip.일부품절 { background: #fff4e0; color: #8a5300; }
.chip.CLOSE { background: #eee; color: #666; }
.chip.PAYED { background: #e8f0fe; color: #1a56db; }
.chip.미발주 { background: #fdecec; color: #a02125; }
.chip.입금대기 { background: #fff4e0; color: #8a5300; }
.chip.발주완료 { background: #e8f8ef; color: #0b6b37; }
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; }
.subtabs a { text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.subtabs a.on { background: var(--text); color: #fff; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--muted); }
.copy:hover { color: var(--brand-dark); }
.group { margin-bottom: 24px; }
.group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.total { font-size: 18px; font-weight: 700; }
details summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.warnbox { background: #fff4e0; color: #8a5300; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
@media (max-width: 720px) {
  .nav { overflow-x: auto; }
  .nav .job { display: none; }
}
