/* ============================================================
   DEVART 견적 — 앱 UI
   ============================================================ */
:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-soft: #eef2ff;
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -14px rgba(15, 23, 42, .16);
  --ring: 0 0 0 4px rgba(79, 70, 229, .14);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 420px at 85% -120px, rgba(124, 58, 237, .07), transparent 70%),
    radial-gradient(900px 380px at -10% -80px, rgba(79, 70, 229, .07), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); margin: 0; }
h1 small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 8px; letter-spacing: 0; }
h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.card > h2::before, .section-head h2::before {
  content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--grad);
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* 상단바 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px -16px rgba(15, 23, 42, .6);
}
.topbar-inner {
  max-width: 1140px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark, .auth-mark, .empty-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 6px 16px -6px rgba(124, 58, 237, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand-text { font-weight: 800; letter-spacing: .04em; font-size: 15px; }
.brand-text em { font-style: normal; font-weight: 500; color: #a5b4fc; margin-left: 6px; letter-spacing: 0; }
.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav > a:not(.btn), .topbar button.link {
  color: #cbd5e1; padding: 7px 12px; border-radius: 8px; font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s;
}
.topbar nav > a:not(.btn):hover, .topbar button.link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.topbar nav > a.active { color: #fff; background: rgba(255, 255, 255, .12); }
.topbar .nav-cta { margin-left: 8px; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; }

/* 레이아웃 */
.container { max-width: 1140px; margin: 0 auto; padding: 28px 20px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.card {
  background: var(--surface); border: 1px solid rgba(226, 232, 240, .8); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}

/* 폼 */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
label input, label select { margin-top: 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: #a5b4c8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}
textarea { resize: vertical; line-height: 1.6; }
input[type=file] { padding: 8px; background: #f8fafc; cursor: pointer; }
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 7px 14px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--primary-soft); color: var(--primary); font: inherit; font-size: 13px; font-weight: 700;
}
input[type=file]::file-selector-button:hover { background: #e0e7ff; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: #fff; color: var(--text); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: #f8fafc; border-color: #a5b4c8; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px -10px rgba(79, 70, 229, .9), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn-primary:hover { background: var(--grad); color: #fff; border-color: transparent; filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, .7); }
.btn-danger { color: var(--danger); border-color: #fecaca; background: #fff; }
.btn-danger:hover { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 알림 */
.flash, .error, .notice {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; font-weight: 500;
}
.flash { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.flash::before { content: "\2713"; font-weight: 800; }
.error { display: block; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.notice { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.notice a { font-weight: 700; color: #b45309; }

/* 요약 카드 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid rgba(226, 232, 240, .8); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.stat-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat-label em { font-style: normal; font-weight: 500; color: var(--faint); font-size: 12px; margin-left: 4px; }
.stat strong {
  font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat strong small { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 2px; }
.stat-accent { background: var(--grad); border-color: transparent; box-shadow: 0 14px 30px -14px rgba(79, 70, 229, .7); }
.stat-accent .stat-label, .stat-accent strong, .stat-accent strong small { color: #fff; }
.stat-accent .stat-label { opacity: .85; }

/* 검색 */
.search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px; }
.search input[type=search] {
  flex: 1 1 260px; width: auto; padding-left: 38px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center;
}
.search select, .search input[type=date] { width: auto; }
.summary { margin: -6px 0 12px; font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; }
.empty p { margin: 14px 0 18px; }
.empty-mark { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; }

/* 테이블 */
.table-wrap { overflow-x: auto; }
.table-wrap.card { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: middle; }
th {
  font-size: 12px; font-weight: 700; color: var(--muted); background: #f8fafc;
  white-space: nowrap; letter-spacing: .02em; border-bottom-color: var(--line);
}
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list tbody tr { cursor: pointer; transition: background .12s; }
table.list tbody tr:hover { background: #f8f9ff; }
table.list td { white-space: nowrap; }
table.list td:nth-child(4) { white-space: normal; color: var(--muted); }
table.list .qno a { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
table.list tr:hover .qno a { color: var(--primary); }
table.list .client { font-weight: 600; color: var(--text); }
table.list .money-strong { font-weight: 700; color: var(--ink); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px;
  border-radius: 999px; font-size: 12px; font-weight: 700; vertical-align: middle; letter-spacing: 0;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-draft { background: #f1f5f9; color: #475569; }
.badge-sent { background: #eef2ff; color: #4338ca; }
.badge-accepted { background: #ecfdf5; color: #047857; }
.badge-rejected { background: #fef2f2; color: #b91c1c; }
h1 .badge { margin-left: 8px; transform: translateY(-3px); }

.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 20px; }
.pager a, .pager span {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.pager span { color: var(--muted); }

/* 작성 폼 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.grid .span-3 { grid-column: 1 / -1; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.inline-label { display: flex; align-items: center; gap: 10px; margin: 0; }
.inline-label select { width: auto; margin: 0; }

table.items { min-width: 840px; }
table.items th { padding: 10px 6px; background: #f8fafc; }
table.items td { padding: 6px; border-bottom: 1px solid #f1f5f9; }
table.items input { padding: 8px 10px; font-size: 14px; border-color: var(--line); }
table.items .c-qty { width: 84px; }
table.items .c-unit { width: 74px; }
table.items .c-price { width: 136px; }
table.items .c-amount { width: 124px; padding-right: 12px; font-weight: 700; color: var(--ink); }
table.items .c-drag, table.items .c-del { width: 36px; text-align: center; }
table.items .c-drag { white-space: nowrap; width: 56px; }
.icon {
  background: none; border: 0; color: var(--faint); cursor: pointer;
  width: 22px; height: 22px; border-radius: 6px; font-size: 10px; padding: 0;
}
.icon:hover { color: var(--primary); background: var(--primary-soft); }
.icon.del { font-size: 13px; }
.icon.del:hover { color: var(--danger); background: #fef2f2; }
#add-row {
  margin-top: 10px; width: 100%; border-style: dashed; color: var(--primary);
  background: #fafaff; box-shadow: none; border-color: #c7d2fe;
}
#add-row:hover { background: var(--primary-soft); border-color: var(--primary); }

.totals {
  display: grid; grid-template-columns: auto 170px; gap: 8px 0; justify-content: end;
  margin: 18px 0 0 auto; padding: 16px 20px; width: fit-content;
  background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.totals dt { color: var(--muted); text-align: right; font-size: 14px; padding-right: 24px; }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.totals .grand { font-weight: 800; font-size: 20px; color: var(--ink); border-top: 1px solid var(--line-strong); padding-top: 10px; margin-top: 2px; }
.totals dd.grand { color: var(--primary); }
.actions { display: flex; justify-content: flex-end; gap: 8px; }
.actions .btn { min-width: 96px; }

/* 로그인 / 설치 */
body.auth {
  background:
    radial-gradient(700px 420px at 15% 10%, rgba(124, 58, 237, .35), transparent 60%),
    radial-gradient(800px 500px at 90% 90%, rgba(79, 70, 229, .35), transparent 60%),
    #0b1020;
}
body.auth .topbar { background: transparent; box-shadow: none; position: static; }
.card.narrow {
  width: 100%; max-width: 400px; margin: 48px auto; padding: 32px;
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
}
.card.narrow h1 { font-size: 24px; margin: 16px 0 4px; }
.auth-mark { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
.auth-sub { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.card.narrow .btn-primary { width: 100%; padding: 12px; margin-top: 6px; font-size: 15px; }
body.auth .flash { max-width: 400px; margin: 24px auto -24px; }

/* 상세 보기 · 설정 */
.btn.check { gap: 8px; margin: 0; font-weight: 600; color: var(--muted); }
.btn.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); box-shadow: none; }
.stamp-setting { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.stamp-preview {
  width: 128px; height: 128px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex: none;
  background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}
.stamp-preview img { max-width: 100%; max-height: 100%; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.danger-zone p { margin: 0; font-size: 13px; }

/* ============================================================
   견적서 문서
   ============================================================ */
.sheet-wrap { overflow-x: auto; padding: 4px 0 16px; margin-bottom: 8px; }
.sheet {
  --s-ink: #0f172a;
  --s-text: #1e293b;
  --s-muted: #64748b;
  --s-line: #cbd5e1;
  --s-hair: #e2e8f0;
  --s-soft: #f1f5f9;
  --s-accent: #4f46e5;
  position: relative;
  width: 940px; margin: 0 auto; padding: 54px 56px 36px;
  background: #fff; color: var(--s-text); font-size: 14px; line-height: 1.5;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 24px 60px -24px rgba(15, 23, 42, .35);
}
.sheet::before {
  /* 본문 좌우 여백(padding)과 같은 폭 */
  content: ""; position: absolute; left: 56px; right: 56px; top: 30px; height: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed); border-radius: 4px;
}
.sheet table { border-collapse: collapse; width: 100%; }
.sheet th, .sheet td { letter-spacing: 0; }

.sh-top {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding-bottom: 22px; margin-bottom: 28px; border-bottom: 2px solid var(--s-ink);
}
.sh-kicker { font-size: 12px; font-weight: 800; letter-spacing: .4em; color: var(--s-accent); margin-bottom: 6px; }
.sheet-title { font-size: 36px; font-weight: 800; letter-spacing: .45em; color: var(--s-ink); margin: 0; line-height: 1.1; }
.sh-no { display: grid; grid-template-columns: auto auto; gap: 4px 18px; margin: 0; font-size: 13px; }
.sh-no dt { color: var(--s-muted); text-align: right; }
.sh-no dd { margin: 0; font-weight: 600; color: var(--s-ink); font-variant-numeric: tabular-nums; }

.sheet-head { display: grid; grid-template-columns: 1fr 470px; gap: 32px; margin-bottom: 28px; }
.sh-label {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .14em; color: var(--s-accent);
}
.sh-label::after { content: ""; flex: 1; height: 1px; background: var(--s-hair); }
.recipient .to { font-size: 23px; margin: 2px 0 10px; color: var(--s-ink); letter-spacing: -0.02em; }
.recipient .to strong { font-weight: 800; }
.recipient .to span { font-size: 16px; color: var(--s-muted); margin-left: 4px; }
.recipient .to-sub { margin: 3px 0; color: #475569; font-size: 13px; }
.sh-greet { margin: 20px 0 0; color: var(--s-muted); font-size: 13px; }

table.supplier { font-size: 13px; }
table.supplier th, table.supplier td { border: 1px solid var(--s-line); height: 40px; padding: 0 10px; }
table.supplier th {
  width: 70px; background: var(--s-soft); color: #475569; font-weight: 600; font-size: 12.5px;
  text-align: center; white-space: nowrap;
}
table.supplier td { color: var(--s-ink); background: #fff; }
table.supplier tbody tr:last-child th, table.supplier tbody tr:last-child td { border-bottom: 1px solid var(--s-line); }
table.supplier td.tight { font-size: 12.5px; letter-spacing: -0.02em; }
table.supplier td.ceo { position: relative; font-weight: 700; }
.sheet .stamp {
  position: absolute; left: 40px; top: 50%; transform: translateY(-50%);
  width: 144px; height: 144px; object-fit: contain; pointer-events: none; z-index: 2;
  mix-blend-mode: multiply;
}
.sheet.no-stamp .stamp { visibility: hidden; }
.sheet .seal-mark { margin-left: 10px; color: var(--s-muted); font-weight: 400; }

.sheet-amount {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  margin-bottom: 24px; padding: 18px 26px; border-radius: 10px;
  background: var(--s-ink); color: #fff;
}
.sh-amt-label { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; color: #a5b4fc; margin-bottom: 2px; }
.sh-amt-words { font-size: 15px; font-weight: 600; }
.sh-amt-words small { font-size: 12px; color: #94a3b8; font-weight: 500; margin-left: 6px; }
.sheet-amount strong { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

table.lines { font-size: 13.5px; border-bottom: 2px solid var(--s-ink); }
table.lines thead th {
  height: 40px; padding: 0 10px; text-align: center; white-space: nowrap;
  background: var(--s-soft); color: var(--s-ink); font-size: 12.5px; font-weight: 700;
  border-top: 2px solid var(--s-ink); border-bottom: 1px solid var(--s-line);
}
table.lines td { height: 40px; padding: 6px 10px; border-bottom: 1px solid var(--s-hair); color: var(--s-ink); }
table.lines tbody tr:last-child td { border-bottom: 0; }
table.lines .c-no { width: 46px; text-align: center; color: var(--s-muted); font-variant-numeric: tabular-nums; }
table.lines .c-qty { width: 11%; }
table.lines .c-price { width: 15%; }
table.lines .c-tax { width: 14%; }
table.lines .c-supply { width: 17%; }
table.lines td.name { font-weight: 600; }
table.lines .spec { font-size: 12.5px; font-weight: 400; color: var(--s-muted); }
table.lines .item-note { font-size: 12px; font-weight: 400; color: var(--s-muted); }
table.lines .shade { background: #fafbfd; }
table.lines td.supply { font-weight: 700; }

.sh-bottom { display: grid; grid-template-columns: 1fr 300px; gap: 36px; margin-top: 22px; align-items: start; }
.sheet-notes p { margin: 0; font-size: 13px; color: #334155; line-height: 1.7; }
.sh-totals { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 0; font-size: 14px; }
.sh-totals dt { padding-right: 16px; }
.sh-totals dt { color: var(--s-muted); }
.sh-totals dd { margin: 0; text-align: right; font-weight: 600; color: var(--s-ink); font-variant-numeric: tabular-nums; }
.sh-totals .grand { margin-top: 4px; padding-top: 12px; border-top: 2px solid var(--s-ink); font-size: 18px; font-weight: 800; color: var(--s-ink); }
.sh-totals dd.grand { color: var(--s-accent); }

.sh-foot {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--s-hair);
  font-size: 12px; color: #94a3b8;
}
.sh-foot strong { color: var(--s-muted); font-weight: 700; letter-spacing: .08em; }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 10px 16px; }
  .brand-text em { display: none; }
  .topbar nav > a:not(.btn), .topbar button.link { padding: 6px 8px; }
  .container { padding: 20px 16px 56px; }
  h1 { font-size: 22px; }
  .card { padding: 18px; }
  .stat strong { font-size: 19px; }
  .totals { grid-template-columns: auto 130px; width: 100%; }
  .page-head .btn-row { width: 100%; }
}

@page { size: A4; margin: 10mm; }
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .container { max-width: none; padding: 0; }
  .sheet-wrap { overflow: visible; padding: 0; margin: 0; }
  .sheet {
    width: 100%; padding: 30px 26px 16px; box-shadow: none; font-size: 12px; border-radius: 0;
    /* A4(297mm) - 위아래 여백 20mm: 한 장을 꽉 채워 푸터를 맨 아래로 */
    display: flex; flex-direction: column; min-height: 276mm;
  }
  .sheet .sh-foot { margin-top: auto; }
  .sheet .sh-bottom { margin-bottom: 26px; }
  .sheet::before { left: 26px; right: 26px; top: 10px; }
  .sh-top { padding-bottom: 16px; margin-bottom: 20px; }
  .sheet-title { font-size: 30px; }
  .sheet-head { grid-template-columns: 1fr 60%; gap: 22px; margin-bottom: 20px; }
  .recipient .to { font-size: 19px; }
  table.supplier { font-size: 11.5px; }
  table.supplier th, table.supplier td { height: 34px; padding: 0 7px; }
  table.supplier th { width: 60px; font-size: 11px; }
  table.supplier td.tight { font-size: 11px; }
  .sheet .stamp { width: 124px; height: 124px; }
  .sheet-amount { padding: 14px 20px; margin-bottom: 18px; }
  .sheet-amount strong { font-size: 24px; }
  table.lines { font-size: 12px; }
  table.lines thead th, table.lines td { height: 34px; }
  .sh-bottom { margin-top: 16px; }
  .sh-foot { margin-top: 26px; }
  .sheet, .sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
