:root {
  --ink: #152233;
  --muted: #667788;
  --line: #d5dde6;
  --head: #eef3f7;
  --row: #ffffff;
  --row-alt: #f7fafc;
  --accent: #0b6e75;
  --accent-soft: #e6f3f4;
  --2d: #8a6a2f;
  --2d-soft: #f5edd9;
  --paper: #eef2f6;
  --font: "Pretendard", "Noto Sans KR", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background: var(--paper);
  min-height: 100vh;
}

.wrap {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.top h1 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.top p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.toolbar input,
.toolbar select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}

.toolbar input {
  flex: 1 1 220px;
  min-width: 180px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  background: #fff;
}

table.cutlist {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.cutlist th,
.cutlist td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
  line-height: 1.45;
  word-break: keep-all;
}

.cutlist th:last-child,
.cutlist td:last-child {
  border-right: 0;
}

.cutlist thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--head);
  color: #334455;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
}

.cutlist tbody tr:nth-child(even) td {
  background: var(--row-alt);
}

.cutlist tbody tr:nth-child(odd) td {
  background: var(--row);
}

.cutlist tbody tr.is-hidden {
  display: none;
}

.cutlist tbody tr.part-start td {
  border-top: 2px solid #b7c4d1;
}

.col-n { width: 48px; text-align: center; font-family: var(--mono); color: var(--muted); }
.col-part { width: 88px; text-align: center; font-weight: 700; color: var(--accent); }
.col-size { width: 100px; text-align: center; }
.col-cut { width: 34%; }
.col-script { width: 34%; color: #3a4a5c; }
.col-crew { width: 88px; text-align: center; }
.col-dept { width: 110px; text-align: center; }

.size {
  display: inline-block;
  min-width: 52px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.size.is-2d {
  background: var(--2d-soft);
  color: var(--2d);
}

.size.is-empty {
  background: #eef1f4;
  color: var(--muted);
}

.cut-cont {
  color: var(--muted);
}

.part-cell {
  background: #f2f8f8 !important;
}

.empty {
  margin-top: 16px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  background: #fff;
  display: none;
}

.foot {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .col-cut, .col-script { width: auto; }
}
