/* PAROS B2B 무료 양식 — 인쇄용 공통 스타일 (A4 기준) */
:root {
  --paper: #fbf6ea;
  --paper-2: #fffdf8;
  --ink: #241f18;
  --muted: #6d6558;
  --line: #e2d6bd;
  --brass: #c99a3f;
  --brass-deep: #8f6516;
  --teal: #2f6f6b;
  --red: #b44a3a;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont,
    system-ui, sans-serif;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
a {
  color: var(--teal);
}

/* ── 상단 안내 바 (인쇄 시 숨김) ─────────────────────────── */
.docbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(251, 246, 234, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  color: var(--muted);
}
.docbar strong {
  color: var(--ink);
  font-weight: 700;
}
.docbar .grow {
  flex: 1 1 auto;
}
.docbar a,
.docbar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.docbar button.primary {
  background: var(--ink);
  color: #fdf7e9;
  border-color: transparent;
}
.docbar a:hover,
.docbar button:hover {
  border-color: var(--brass);
}

/* ── A4 용지 ───────────────────────────────────────────── */
.sheet {
  width: 210mm;
  max-width: 100%;
  margin: 18px auto 40px;
  padding: 16mm 15mm 14mm;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(43, 34, 20, 0.14);
}
.sheet + .sheet {
  margin-top: 0;
}

/* ── 문서 머리 ─────────────────────────────────────────── */
.doc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 13px;
}
.brand i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(201, 154, 63, 0.22);
  display: block;
}
.doc-tag {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--brass-deep);
  text-transform: uppercase;
  text-align: right;
  line-height: 1.5;
}
h1 {
  margin: 16px 0 0;
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.lede {
  margin: 8px 0 0;
  font-size: 13px;
  color: #4b4438;
  max-width: 60ch;
}
.meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.meta div {
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  font-size: 11.5px;
}
.meta div:last-child {
  border-right: 0;
}
.meta span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}
.meta b {
  font-size: 12.5px;
  font-weight: 700;
}

/* ── 섹션 ──────────────────────────────────────────────── */
section {
  margin-top: 18px;
}
section > h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
section > h2 em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--brass-deep);
  letter-spacing: 0.08em;
}
.fill {
  border-bottom: 1px solid #cdbfa2;
  display: inline-block;
  min-width: 42mm;
  height: 1.35em;
  vertical-align: bottom;
}
p {
  margin: 8px 0 0;
  font-size: 12.5px;
}

/* 체크 항목 */
ul.check {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
}
ul.check li {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  align-items: flex-start;
}
ul.check li::before {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border: 1.4px solid #b7a888;
  border-radius: 2px;
}

/* 표 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 12px;
}
th,
td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
th {
  background: #f4ebd8;
  font-weight: 700;
  font-size: 11.5px;
  color: #4a402d;
}
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td.blank {
  height: 22px;
}
tr.total td {
  background: #f8f1e1;
  font-weight: 700;
}
.cap {
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--muted);
}

/* 강조 박스 */
.callout {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--brass);
  background: #f8f1e1;
  font-size: 12.5px;
}
.callout b {
  font-weight: 750;
}

/* 서명 */
.sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.sign div {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px 14px;
  font-size: 11.5px;
  color: var(--muted);
  min-height: 74px;
}
.sign b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  margin-bottom: 30px;
}
.foot {
  margin-top: 16px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10.5px;
  color: var(--muted);
}

/* ── 인쇄 ──────────────────────────────────────────────── */
@page {
  size: A4;
  margin: 12mm 11mm;
}
@media print {
  body {
    background: #fff;
    font-size: 10.5pt;
  }
  .docbar {
    display: none !important;
  }
  .sheet {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    break-after: page;
  }
  .sheet:last-of-type {
    break-after: auto;
  }
  section,
  table,
  .sign {
    break-inside: avoid;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
}

@media (max-width: 720px) {
  .sheet {
    padding: 22px 16px;
    margin: 12px 8px 28px;
  }
  .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .meta div:nth-child(2n) {
    border-right: 0;
  }
  .meta div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  h1 {
    font-size: 21px;
  }
  .sign {
    grid-template-columns: minmax(0, 1fr);
  }
  table {
    font-size: 11px;
  }
}
