:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dfe5ec;
  --line-strong: #cdd5df;
  --text: #18212f;
  --muted: #667386;
  --muted-2: #8b96a6;
  --primary: #315b96;
  --primary-strong: #254979;
  --primary-soft: #eef4fb;
  --success: #1f7a55;
  --success-soft: #ebf7f1;
  --warn: #9a6612;
  --warn-soft: #fff6df;
  --danger: #b33a3a;
  --danger-soft: #fff0f0;
  --shadow: 0 12px 36px rgba(25, 38, 58, .08);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px max(20px, calc((100vw - var(--max)) / 2));
  min-height: 72px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand-button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 18px;
}
.brand-button strong { display: block; font-size: 16px; letter-spacing: -.2px; }
.brand-button small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }
.top-actions { position: relative; display: flex; align-items: center; gap: 8px; }

.button, .icon-button {
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: .16s ease;
}
.button { min-height: 40px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.button.primary { background: var(--primary); color: white; }
.button.primary:hover { background: var(--primary-strong); }
.button.secondary { background: white; border-color: var(--line-strong); }
.button.secondary:hover { background: var(--surface-soft); border-color: #b8c2cf; }
.button.ghost { background: transparent; border-color: var(--line); }
.button.danger { background: white; border-color: #efc4c4; color: var(--danger); }
.button.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: white;
  border-color: var(--line-strong);
  font-weight: 800;
}
.icon-button:hover { background: var(--surface-soft); }
.popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
}
.popover button {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}
.popover button:hover { background: var(--surface-soft); }

.main { width: 100%; max-width: var(--max); margin: 0 auto; padding: 28px 20px 60px; flex: 1; }
.footer {
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 24px 20px 32px;
  color: var(--muted-2);
  font-size: 12px;
}
.footer .dot { color: #b6bec9; }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.hero h1 { margin: 3px 0 4px; font-size: clamp(24px, 3vw, 32px); line-height: 1.25; letter-spacing: -.7px; }
.hero p { margin: 0; color: var(--muted); }
.eyebrow { margin: 0 0 4px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.security-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }


.start-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.start-card { display:grid; grid-template-columns:34px minmax(0,1fr) 20px; gap:12px; align-items:center; min-height:112px; padding:17px 16px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); text-align:left; cursor:pointer; transition:.16s ease; }
.start-card:hover { border-color:#b8c7da; box-shadow:0 5px 18px rgba(25,38,58,.06); transform:translateY(-1px); }
.start-card.primary-start { border-color:#c8d8eb; background:linear-gradient(180deg,#fff 0%,#f7faff 100%); }
.start-step { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:var(--surface-soft); color:var(--primary); font-size:13px; font-weight:850; }
.primary-start .start-step { background:var(--primary); color:#fff; }
.start-copy { min-width:0; } .start-copy strong { display:block; margin-bottom:5px; font-size:15px; letter-spacing:-.15px; }
.start-copy small { display:block; color:var(--muted); font-size:12px; line-height:1.5; } .start-arrow { color:var(--muted-2); font-size:22px; line-height:1; }
.required-mark { margin-left:5px; color:var(--primary); font-size:10px; font-weight:800; }
.new-project-tip { display:flex; gap:7px; align-items:flex-start; margin-top:14px; padding-top:13px; border-top:1px dashed var(--line); color:var(--muted); font-size:12px; } .new-project-tip strong { flex:none; color:var(--text); }
.import-summary.four { grid-template-columns:repeat(4,1fr); } .import-result-note { margin:-4px 0 10px; color:var(--muted); font-size:12px; text-align:right; } .preview-badge.muted-badge { color:var(--muted-2); }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.summary-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.summary-card span { display: block; color: var(--muted); font-size: 13px; }
.summary-card strong { display: block; margin-top: 6px; font-size: 27px; letter-spacing: -.5px; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 8px rgba(20,32,50,.02); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-wrap { position: relative; min-width: 300px; }
.search-wrap input { width: 100%; padding-left: 36px; }
.search-wrap::before { content: "⌕"; position: absolute; left: 12px; top: 9px; color: var(--muted-2); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: white;
  color: var(--text);
  padding: 9px 11px;
  outline: none;
  transition: .15s ease;
}
input, select { min-height: 40px; }
textarea { resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus { border-color: #7191bd; box-shadow: 0 0 0 3px rgba(49,91,150,.10); }
.segmented { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: #eef1f5; }
.segmented button { border: 0; background: transparent; border-radius: 8px; padding: 7px 11px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; }
.segmented button.active { background: white; color: var(--text); box-shadow: 0 1px 4px rgba(25,38,58,.09); }

.project-list { overflow: hidden; }
.project-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.6fr) minmax(140px, .9fr) minmax(120px, .8fr) minmax(130px, .8fr) minmax(115px, .7fr) 26px;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid #edf0f4;
  cursor: pointer;
}
.project-row:last-child { border-bottom: 0; }
.project-row:hover { background: #fbfcfe; }
.project-title { min-width: 0; }
.project-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.project-title small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 12px; }
.cell-label { display: none; color: var(--muted-2); font-size: 11px; }
.cell-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.status-chip { display: inline-flex; align-items: center; max-width: 100%; border-radius: 99px; padding: 5px 9px; font-size: 12px; font-weight: 800; background: var(--primary-soft); color: var(--primary-strong); white-space: nowrap; }
.status-chip.done { background: var(--success-soft); color: var(--success); }
.status-chip.wait { background: var(--warn-soft); color: var(--warn); }
.missing { margin-top: 5px; color: var(--warn); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-arrow { color: var(--muted-2); font-size: 18px; }
.empty-state { padding: 64px 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 15px; background: var(--primary-soft); color: var(--primary); font-size: 24px; font-weight: 800; }
.empty-state h3 { margin: 0 0 7px; font-size: 18px; }
.empty-state p { max-width: 480px; margin: 0 auto 18px; color: var(--muted); font-size: 14px; }
.empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.detail-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  margin: 0 0 8px -7px;
  padding: 7px;
  border: 0;
  background: transparent;
  color: #4f5e72;
  cursor: pointer;
  font-weight: 760;
  font-size: 14px;
  line-height: 1.2;
  border-radius: 8px;
}
.back-button-icon { font-size: 19px; line-height: 1; transition: transform .16s ease; }
.back-button:hover { color: var(--primary-strong); background: transparent; }
.back-button:hover .back-button-icon { transform: translateX(-2px); }
.current-project h1 { margin: 0; font-size: 28px; letter-spacing: -.6px; }
.current-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; color: var(--muted); font-size: 13px; }
.save-state { display: flex; align-items: center; gap: 7px; min-width: 130px; justify-content: flex-end; color: var(--muted); font-size: 12px; }
.save-state .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 18px; align-items: start; }
.form-panel { overflow: hidden; }
.section { border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 18px 20px 10px; }
.section-head h2 { margin: 0; font-size: 16px; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 8px 20px 22px; }
.field { min-width: 0; }
.field.full { grid-column: auto; }
.field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; color: #445064; }
.field .hint { display: block; margin-top: 5px; color: var(--muted-2); font-size: 11px; }
.form-grid > .field { width: 100%; max-width: 680px; }
.date-input-wrap { position: relative; width: 100%; max-width: 680px; }
.date-text-input { padding-right: 48px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.date-picker-button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: #3d4b5e; cursor: pointer;
}
.date-picker-button:hover { background: var(--surface-soft); }
.date-picker-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.native-date-picker { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; right: 8px; bottom: 0; padding: 0; border: 0; min-height: 0; }
.date-input-wrap.date-invalid .date-text-input { border-color: #d26a6a; box-shadow: 0 0 0 3px rgba(179,58,58,.08); }
.date-error { display: block; margin-top: 5px; color: var(--danger); font-size: 11px; }
.date-error[hidden] { display: none; }
.money-korean { display: block; min-height: 18px; margin-top: 5px; color: var(--primary-strong); font-size: 12px; font-weight: 650; line-height: 1.45; }
.readonly { background: #f5f7f9; color: #5d6878; }
.side-stack { display: grid; gap: 12px; position: sticky; top: 92px; }
.side-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.side-card h3 { margin: 0 0 8px; font-size: 14px; }
.side-card p { margin: 0; color: var(--muted); font-size: 12px; }
.progress-list { display: grid; gap: 6px; margin-top: 12px; }
.progress-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.progress-item span:last-child { color: var(--muted-2); }
.missing-list { margin: 10px 0 0; padding-left: 18px; color: var(--warn); font-size: 12px; }
.doc-list { display: grid; gap: 8px; margin-top: 10px; }
.doc-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; background: var(--surface-soft); font-size: 12px; }
.doc-item em { color: var(--muted-2); font-style: normal; font-size: 11px; }
.danger-zone { border-color: #f1d7d7; }

.modal { width: min(700px, calc(100vw - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(18,28,45,.23); }
.modal::backdrop { background: rgba(18,28,45,.36); backdrop-filter: blur(2px); }
.modal-card { display: flex; flex-direction: column; max-height: calc(100vh - 40px); margin: 0; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 21px; }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.modal-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.modal-grid .full { grid-column: auto; }
.notice { padding: 12px 14px; border: 1px solid #d6e3f3; border-radius: 11px; background: var(--primary-soft); color: #36577f; font-size: 13px; }
.notice.warn { border-color: #f2ddb1; background: var(--warn-soft); color: #825817; }
.notice.danger { border-color: #efcaca; background: var(--danger-soft); color: #9b3434; }
.import-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.import-stat { padding: 12px; border-radius: 11px; background: var(--surface-soft); text-align: center; }
.import-stat strong { display: block; font-size: 20px; }
.import-stat span { display: block; color: var(--muted); font-size: 11px; }
.preview-list { display: grid; gap: 8px; max-height: 330px; overflow: auto; }
.preview-item { border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; }
.preview-top { display: flex; justify-content: space-between; gap: 8px; }
.preview-item strong { font-size: 13px; }
.preview-item p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.preview-badge { flex: none; font-size: 11px; font-weight: 800; color: var(--primary); }
.preview-badge.conflict { color: var(--warn); }
.conflict-box { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); display: grid; gap: 7px; }
.conflict-row { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 8px; font-size: 11px; align-items: center; }
.conflict-row label { font-weight: 800; }
.conflict-choice { border: 1px solid var(--line); border-radius: 8px; padding: 7px; cursor: pointer; }
.conflict-choice input { width: auto; min-height: 0; margin-right: 5px; }
.vendor-list { display: grid; gap: 8px; }
.vendor-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.vendor-row strong { display: block; font-size: 13px; }
.vendor-row small { display: block; color: var(--muted); margin-top: 2px; }
.vendor-row .actions { display: flex; gap: 6px; }

.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 360px; padding: 11px 14px; border-radius: 11px; background: #1f2937; color: white; box-shadow: var(--shadow); font-size: 13px; animation: toast-in .2s ease; }
.toast.warn { background: #7b561b; }
.toast.danger { background: #943838; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } }

.hidden { display: none !important; }
.muted { color: var(--muted); }

@media (max-width: 920px) {
  .start-grid { grid-template-columns: 1fr; }
  .start-card { min-height: 86px; }
  .project-row { grid-template-columns: minmax(230px, 1.5fr) minmax(120px, .8fr) minmax(120px, .8fr) minmax(110px, .7fr) 26px; }
  .project-row .project-method { display: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .side-stack { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .topbar { padding: 10px 14px; min-height: 64px; }
  .brand-button small { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .top-actions .secondary { display: none; }
  .desktop-only { display: none !important; }
  .main { padding: 20px 14px 48px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
  .start-card { padding: 14px; }
  .import-summary.four { grid-template-columns: 1fr 1fr; }
  .import-result-note { text-align: left; }
  .summary-card { padding: 13px; }
  .summary-card strong { font-size: 22px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-wrap { min-width: 0; flex: 1; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .project-row { grid-template-columns: 1fr 28px; gap: 9px; padding: 15px; }
  .project-row > div:not(.project-title):not(.row-arrow) { display: grid; grid-template-columns: 88px 1fr; gap: 8px; align-items: center; }
  .project-row .project-method { display: grid; }
  .cell-label { display: block; }
  .project-title { margin-bottom: 4px; }
  .row-arrow { grid-column: 2; grid-row: 1; align-self: start; }
  .project-row > div:not(.project-title):not(.row-arrow) { grid-column: 1 / -1; }
  .detail-head { flex-direction: column; }
  .save-state { justify-content: flex-start; }
  .form-grid, .modal-grid { grid-template-columns: 1fr; }
  .field.full, .modal-grid .full { grid-column: auto; }
  .side-stack { grid-template-columns: 1fr; }
  .modal { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
  .modal-card { max-height: calc(100vh - 18px); }
  .modal-head, .modal-body, .modal-actions { padding-left: 16px; padding-right: 16px; }
  .conflict-row { grid-template-columns: 1fr; }
}

/* v0.2.1 — 단계형 공사 상세 / 변경계약 */
.workflow-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.workflow-step {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: .15s ease;
}
.workflow-step:hover { border-color: #bdc9d7; transform: translateY(-1px); }
.workflow-step.active { border-color: #9eb8d8; background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(49,91,150,.05); }
.workflow-step.done { border-color: #cfe5da; background: #fbfefc; }
.workflow-step.future { color: var(--muted-2); background: #fafbfc; }
.workflow-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #edf1f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.workflow-step.active .workflow-icon { background: var(--primary); color: white; }
.workflow-step.done .workflow-icon { background: var(--success-soft); color: var(--success); }
.workflow-copy { min-width: 0; }
.workflow-copy strong { display: block; font-size: 13px; }
.workflow-copy small { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }

.workflow-section { scroll-margin-top: 96px; }
.workflow-section > summary { list-style: none; cursor: pointer; padding-bottom: 16px; }
.workflow-section > summary::-webkit-details-marker { display: none; }
.workflow-section > summary::after {
  content: '⌄';
  flex: none;
  margin-left: 4px;
  color: var(--muted-2);
  font-size: 18px;
  transition: transform .15s ease;
}
.workflow-section[open] > summary::after { transform: rotate(180deg); }
.workflow-section:not([open]) .form-grid { display: none; }
.workflow-section.active > summary { background: linear-gradient(90deg, var(--primary-soft), #fff 45%); }
.workflow-section.done > summary h2::before { content: '✓ '; color: var(--success); }
.section-state {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f2f5;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.section-state.active { background: var(--primary-soft); color: var(--primary-strong); }
.section-state.done { background: var(--success-soft); color: var(--success); }
.section-state.future { background: #f3f5f7; color: var(--muted-2); }
.next-action-card { border-color: #cddbeb; background: linear-gradient(180deg, #fff 0%, #f8fbff 100%); }
.next-action-card h3 { margin-top: 1px; font-size: 17px; }
.next-action-card .button { margin-top: 12px; }
.all-good { color: var(--success) !important; font-weight: 700; }

.subsection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
}
.subsection-head strong { display: block; font-size: 13px; }
.subsection-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.contract-change-block { margin-top: 6px; padding-top: 16px; border-top: 1px dashed var(--line); }
.contract-change-empty { margin-top: 10px; padding: 12px 13px; border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.contract-change-list { display: grid; gap: 8px; margin-top: 10px; }
.contract-change-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.change-index { padding-top: 2px; color: var(--primary); font-size: 11px; font-weight: 850; }
.change-copy strong, .change-copy span, .change-copy small { display: block; }
.change-copy strong { font-size: 12px; }
.change-copy span { margin-top: 2px; color: #465365; font-size: 11px; }
.change-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }

@media (max-width: 920px) {
  .workflow-strip { grid-template-columns: repeat(5, minmax(118px, 1fr)); overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
  .workflow-step { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .detail-tabs { top: 64px; gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .detail-tabs::-webkit-scrollbar { display: none; }
  .detail-tab { min-height: 45px; font-size: 13px; }
  .workflow-strip { margin-left: -2px; margin-right: -2px; }
  .workflow-step { min-height: 62px; padding: 9px 10px; }
  .section-head { padding-left: 16px; padding-right: 16px; }
  .form-grid { padding-left: 16px; padding-right: 16px; }
  .section-state { display: none; }
  .subsection-head { flex-direction: column; }
  .contract-change-item { grid-template-columns: 36px minmax(0, 1fr); }
  .contract-change-item .button { grid-column: 2; justify-self: start; }
}

/* v0.3.0.2 — 공사서류 생성 / A4 미리보기 / 인쇄 안정화 */
.detail-tabs {
  position: sticky;
  top: 72px;
  z-index: 15;
  display: flex;
  align-items: flex-end;
  gap: 26px;
  width: 100%;
  margin: 0 0 18px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
  background: rgba(245,247,250,.96);
  backdrop-filter: blur(9px);
}
.detail-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 10px 2px 11px;
  border: 0;
  background: transparent;
  color: #738094;
  cursor: pointer;
  font-weight: 760;
  font-size: 14px;
  transition: color .16s ease;
}
.detail-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .16s ease;
}
.detail-tab:hover { color: var(--text); }
.detail-tab.active { color: var(--primary-strong); }
.detail-tab.active::after { transform: scaleX(1); }
.detail-tab-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.detail-tab-label { white-space: nowrap; }
.detail-tab-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #e7edf5; color: #667386; font-size: 10px; font-weight: 850; }
.detail-tab.active .detail-tab-count { background: var(--primary-soft); color: var(--primary); }
.tab-panel { margin-top: 2px; }
.tab-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.tab-panel-head h2, .documents-head h2 { margin: 0; font-size: 22px; letter-spacing: -.4px; }
.tab-panel-head p:not(.eyebrow), .documents-head p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.contract-tab-panel { overflow: hidden; }
.contract-tab-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 18px 24px; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.contract-tab-summary > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.contract-tab-summary span { display: block; color: var(--muted); font-size: 11px; }
.contract-tab-summary strong { display: block; margin-top: 5px; font-size: 15px; }
.contract-tab-history { padding: 20px 24px 24px; }
.document-side-card .full-button { width: 100%; margin-top: 10px; }
.doc-item-button { width: 100%; border: 1px solid transparent; cursor: pointer; text-align: left; }
.doc-item-button:hover { border-color: #c8d4e2; background: #f5f8fc; }
.doc-item-button.ready em { color: var(--success); font-weight: 800; }
.doc-item-button.needs-info em { color: var(--warn); font-weight: 800; }

.documents-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.documents-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 24px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg,#fff 0%,#fbfcfe 100%); }
.documents-head-note { flex: none; padding: 9px 12px; border: 1px solid #cfdaea; border-radius: 11px; background: var(--primary-soft); text-align: right; }
.documents-head-note strong, .documents-head-note span { display: block; }
.documents-head-note strong { color: var(--primary-strong); font-size: 12px; }
.documents-head-note span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.reference-program-banner { display: flex; align-items: center; gap: 14px; margin: 18px 24px 24px; padding: 15px 16px; border: 1px solid #b8cce6; border-radius: 13px; background: linear-gradient(135deg,#eef5ff 0%,#f7faff 100%); color: #304a68; box-shadow: 0 5px 16px rgba(54,91,135,.07); }
.reference-program-label { flex: none; display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border-radius: 999px; background: #315f9b; color: #fff; font-size: 11px; font-weight: 850; letter-spacing: .01em; }
.reference-program-copy { display: grid; gap: 3px; min-width: 0; }
.reference-program-copy strong { color: #173f70; font-size: 13px; line-height: 1.4; }
.reference-program-copy span { color: #4f6680; font-size: 11.5px; line-height: 1.4; }
.document-group { padding: 22px 24px 4px; }
.document-group + .document-group { border-top: 1px solid #edf0f4; }
.document-group-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.document-group-title strong { font-size: 15px; }
.document-group-title span { color: var(--muted); font-size: 11px; }
.document-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding-bottom: 18px; }
.document-card { display: flex; flex-direction: column; min-height: 235px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.document-card.ready { border-color: #cde3d8; background: linear-gradient(180deg,#fff 0%,#fbfefc 100%); }
.document-card.needs-info { border-color: #ebdfc7; }
.document-card-top { display: flex; justify-content: space-between; gap: 10px; }
.document-stage { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong); font-size: 10px; font-weight: 850; }
.document-version { color: var(--muted-2); font-size: 10px; }
.document-card h3 { margin: 15px 0 4px; font-size: 18px; }
.document-card > p { margin: 0; min-height: 38px; color: var(--muted); font-size: 12px; }
.document-requirement { display: grid; gap: 3px; margin: 15px 0; padding: 10px 11px; border-radius: 9px; background: var(--warn-soft); }
.document-requirement strong { color: var(--warn); font-size: 11px; }
.document-requirement span { color: #755a2e; font-size: 10px; }
.document-requirement.ready { background: var(--success-soft); }
.document-requirement.ready strong { color: var(--success); }
.document-requirement.ready span { color: #557264; }
.document-card .button { width: 100%; margin-top: auto; }
.oneclick-gap-panel { margin: 18px 24px; border: 1px solid #d8e2ee; border-radius: 14px; background: #fbfcfe; overflow: hidden; }
.oneclick-gap-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 16px; cursor: pointer; list-style-position: inside; }
.oneclick-gap-panel summary > span { display: inline-grid; gap: 2px; }
.oneclick-gap-panel summary strong { font-size: 16px; }
.oneclick-gap-panel summary small { color: var(--muted); font-size: 13px; line-height: 1.45; font-weight: 400; }
.oneclick-gap-panel summary em { flex: none; padding: 5px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong); font-size: 11.5px; font-style: normal; font-weight: 800; }
.oneclick-gap-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 16px 14px; }
.oneclick-gap-body > div { padding: 13px 14px; border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; }
.oneclick-gap-body h3 { margin: 0 0 9px; font-size: 15px; }
.oneclick-gap-body ul { display: grid; gap: 7px; margin: 0; padding-left: 20px; color: #52647a; font-size: 14px; line-height: 1.5; }
.oneclick-gap-body li span { color: var(--warn); font-size: 11.5px; font-weight: 800; }
.oneclick-gap-note { margin: 0; padding: 13px 16px; border-top: 1px solid #e5eaf0; background: #fff; color: var(--muted); font-size: 13px; line-height: 1.5; }
.document-footnote { margin: 8px 24px 24px; padding: 13px 15px; border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: 13px; line-height: 1.5; }

.signature-print-notice { display: grid; gap: 3px; padding: 13px 14px; border: 1px solid #cfe0d7; border-radius: 12px; background: var(--success-soft); }
.signature-print-notice strong { color: var(--success); }
.signature-print-notice span { color: #536c61; font-size: 12px; }
.signature-target-list { display: grid; gap: 7px; margin: 14px 0; padding: 0; list-style: none; }
.signature-target-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.signature-target-list li span { color: var(--muted); font-size: 12px; }
.signature-pad-wrap { position: relative; overflow: hidden; border: 2px dashed #9dafc4; border-radius: 14px; background: #fff; }
.signature-pad-wrap > span { position: absolute; left: 50%; top: 50%; z-index: 0; transform: translate(-50%,-50%); color: #a0acb9; font-size: 14px; pointer-events: none; }
.signature-pad { position: relative; z-index: 1; display: block; width: 100%; height: 190px; cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAyMWw0LjItMSAxMi0xMmEyLjIgMi4yIDAgMCAwIDAtMy4xbC0uMS0uMWEyLjIgMi4yIDAgMCAwLTMuMSAwbC0xMiAxMkwzIDIxeiIgZmlsbD0id2hpdGUiIHN0cm9rZT0iIzE3MjAzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMTQuNSA2LjNsMy4yIDMuMk00LjcgMTYuM2wzIDMiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzE3MjAzMyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==") 3 20, crosshair; touch-action: none; }

.modal.wide-modal { width: min(1120px, calc(100vw - 28px)); }
.doc-preview-note { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.doc-preview-scroll { overflow: auto; padding: 20px; border-radius: 12px; background: #e9edf2; }
.paper-a4 {
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm 16mm 14mm;
  background: #fff;
  color: #111;
  box-shadow: 0 6px 28px rgba(20,30,44,.17);
  font-family: "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
  font-size: 12.8pt;
  line-height: 1.55;
}
.admin-document { position: relative; display: flex; flex-direction: column; }
.doc-title { margin: 3mm 0 16mm; text-align: center; font-size: 27pt; line-height: 1.15; font-weight: 700; }
.doc-title.wide-spacing { letter-spacing: .28em; text-indent: .28em; }
.doc-facts { display: grid; gap: 8.5mm; }
.doc-fact-row { display: grid; grid-template-columns: 45mm minmax(0,1fr); align-items: baseline; }
.doc-fact-label { white-space: nowrap; }
.doc-fact-value { min-width: 0; }
.doc-attachments { display: grid; grid-template-columns: 38mm minmax(0,1fr); margin-top: 11mm; }
.doc-attachments > span { white-space: nowrap; }
.doc-attachments ol { margin: 0; padding: 0; list-style-position: inside; }
.doc-attachments li { margin: 0 0 1.5mm; }
.doc-statement { margin: 19mm 0 0; }
.doc-statement.completion-statement { margin-top: 22mm; text-align: center; }
.doc-date-center { margin: 13mm 0 0; text-align: center; }
.doc-vendor-block { display: grid; gap: 4mm; width: 112mm; margin: 18mm 0 0 47mm; }
.doc-vendor-block > div { display: grid; grid-template-columns: 47mm minmax(0,1fr); gap: 3mm; align-items: baseline; }
.doc-vendor-block span { white-space: pre; }
.doc-vendor-block strong { font-weight: 400; overflow-wrap: anywhere; }
.doc-recipient { margin: auto 0 0; padding-top: 10mm; text-align: right; font-size: 17pt; font-weight: 700; }
.inspection-request .doc-title { margin-bottom: 13mm; }
.inspection-request .doc-facts { gap: 6.5mm; }
.doc-pledge { margin-top: 15mm; line-height: 2.15; }
.doc-pledge p { margin: 0; }
.inspection-request .doc-date-center { margin-top: 12mm; }
.inspection-request .doc-vendor-block { margin-top: 13mm; }
.document-missing-grid .money-korean { margin-bottom: 0; }

.document-print-frame {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 210mm;
  height: 297mm;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.print-only-document {
  margin: 0;
  background: #fff;
}
.print-only-document .paper-a4 {
  margin: 0;
  box-shadow: none;
}

@media (max-width: 720px) {
  .detail-tabs { width: 100%; gap: 18px; }
  .detail-tab { flex: 0 0 auto; padding-left: 1px; padding-right: 1px; }
  .tab-panel-head, .documents-head { flex-direction: column; padding: 18px; }
  .contract-tab-summary { grid-template-columns: 1fr; padding: 14px 18px; }
  .contract-tab-history { padding: 16px 18px 20px; }
  .document-group { padding-left: 18px; padding-right: 18px; }
  .document-grid { grid-template-columns: 1fr; }
  .reference-program-banner { align-items: flex-start; flex-direction: column; margin-left: 18px; margin-right: 18px; margin-bottom: 20px; }
  .oneclick-gap-panel { margin-left: 18px; margin-right: 18px; }
  .oneclick-gap-panel summary { align-items: flex-start; }
  .oneclick-gap-body { grid-template-columns: 1fr; }
  .document-footnote { margin-left: 18px; margin-right: 18px; }
  .doc-preview-scroll { padding: 10px; }
  .paper-a4 { margin: 0; }
}

@media print {
  /* 페이지 방향은 printPagesInFrame()의 문서별 @page 규칙에서 결정한다.
     공통 스타일에서 portrait를 강제하면 가로 계산식까지 세로로 덮어쓸 수 있다. */
  @page { margin: 0; }
  html, body { background: #fff !important; }

  /* Dedicated print frame: only one A4 document exists in this browsing context. */
  body.print-only-document {
    position: relative !important;
    box-sizing: border-box !important;
    width: 210mm !important;
    height: 297mm !important;
    min-width: 210mm !important;
    min-height: 297mm !important;
    max-width: 210mm !important;
    max-height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.print-only-document * { visibility: visible !important; }
  body.print-only-document .document-print-page {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    box-sizing: border-box !important;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 0 !important;
    max-height: 297mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    break-inside: avoid !important;
    break-after: avoid-page !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
  }

  /* Keep blocks together and pin the addressee to the same bottom position. */
  body.print-only-document .doc-facts,
  body.print-only-document .doc-attachments,
  body.print-only-document .doc-vendor-block,
  body.print-only-document .vendor-form-facts,
  body.print-only-document .vendor-form-table,
  body.print-only-document .vendor-form-signatures { break-inside: avoid !important; page-break-inside: avoid !important; }
  body.print-only-document .doc-recipient {
    position: absolute !important;
    right: 16mm !important;
    bottom: 11mm !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 착공계 has the most content. Keep a small safety reserve for long company/address text. */
  body.print-only-document .start-report .doc-facts { gap: 7.8mm; }
  body.print-only-document .start-report .doc-attachments { margin-top: 9mm; }
  body.print-only-document .start-report .doc-statement { margin-top: 15mm; }
  body.print-only-document .start-report .doc-date-center { margin-top: 11mm; }
  body.print-only-document .start-report .doc-vendor-block { margin-top: 14mm; }

  /* Same-window fallback for browsers that invoke the host page's print command. */
  body:not(.print-only-document) * { visibility: hidden !important; }
  body:not(.print-only-document) .document-print-page,
  body:not(.print-only-document) .document-print-page * { visibility: visible !important; }
  body:not(.print-only-document) .document-print-page {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    box-sizing: border-box !important;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }
}


/* v0.3.1 기관용 준공·지출 서류 */
.payout-section-head {
  margin-top: 6px;
  padding: 13px 14px;
  border-radius: 10px;
  background: var(--surface-soft);
}
.payout-section-head strong { font-size: 13px; }
.payout-section-head strong span { margin-left: 5px; color: var(--muted-2); font-size: 10px; font-weight: 700; }
.payout-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.official-record .doc-title { margin: 1mm 0 9mm; font-size: 25pt; }
.official-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11.4pt; line-height: 1.35; }
.official-table th, .official-table td { border: .35mm solid #222; padding: 2.3mm 3mm; vertical-align: middle; }
.official-table th { width: 31mm; text-align: center; font-weight: 400; letter-spacing: .13em; white-space: nowrap; }
.official-table th.mini-head { width: 16mm; letter-spacing: 0; }
.official-table td { overflow-wrap: anywhere; }
.official-table .memo-row th, .official-table .memo-row td { height: 14mm; }
.record-statement { margin-top: 16mm; font-size: 11.8pt; line-height: 2.2; }
.record-statement p { margin: 0; }
.record-date { margin: 20mm 0 0; text-align: center; font-size: 12pt; }
.record-signature-row { display: grid; grid-template-columns: 35mm 58mm minmax(0,1fr); align-items: center; gap: 5mm; margin-top: 26mm; font-size: 12pt; }
.record-signature-row span:last-child { text-align: right; }

.completion-inspection-record .doc-title { margin-bottom: 8mm; }
.completion-inspection-record .official-table th, .completion-inspection-record .official-table td { padding-top: 2mm; padding-bottom: 2mm; }
.completion-inspection-record .official-table .attachment-row td { font-size: 10.4pt; line-height: 1.35; }
.inspection-finished { margin: 18mm 0 0; text-align: center; font-size: 12.2pt; }
.record-date.inspection-date { margin-top: 19mm; }
.inspection-signatures { display: grid; gap: 12mm; margin-top: 24mm; font-size: 11.8pt; }
.inspection-signatures > div { display: grid; grid-template-columns: 32mm 64mm minmax(0,1fr); align-items: center; gap: 4mm; }
.inspection-signatures > div span:last-child { text-align: right; }

.payment-request { display: block; padding-top: 15mm; }
.payment-request .doc-title { margin: 2mm 0 11mm; font-size: 27pt; }
.payment-lines { display: flex; flex-direction: column; gap: 7.2mm; }
.payment-lines > div { display: flex; align-items: baseline; min-width: 0; }
.payment-label { flex: 0 0 48mm; }
.payment-value { flex: 0 0 49mm; }
.payment-words { flex: 1 1 auto; }
.payment-label { white-space: nowrap; }
.payment-value { white-space: nowrap; }
.payment-words { min-width: 0; font-size: 11.2pt; overflow-wrap: anywhere; }
.payment-statement { margin: 11mm 0 0 7mm; }
.payment-account-title { margin: 10mm 0 4mm 3mm; }
.payment-account-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.payment-account-table th, .payment-account-table td { border: .35mm solid #222; padding: 3mm 4mm; text-align: center; font-size: 11.8pt; font-weight: 400; }
.payment-account-table th { width: 46mm; letter-spacing: .14em; }
.record-date.payment-date { margin-top: 10mm; }
.payment-vendor { display: grid; gap: 5mm; width: 118mm; margin: 10mm 0 0 45mm; }
.payment-vendor > div { display: grid; grid-template-columns: 42mm minmax(0,1fr); gap: 4mm; align-items: baseline; }
.payment-vendor span { white-space: nowrap; letter-spacing: .08em; }
.payment-vendor strong { font-weight: 400; overflow-wrap: anywhere; }
.payment-note { margin: 10mm 0 0; font-size: 10.7pt; }

/* 업체 제출서류 — 수도·전기료 납부각서 / 하자보증금납부서 / 준공정산동의서 */
.vendor-form-page { padding: 18mm 18mm 14mm; font-size: 11.5pt; line-height: 1.55; }
.vendor-form-title { margin: 3mm 0 14mm; text-align: center; font-size: 25pt; line-height: 1.2; font-weight: 700; }
.vendor-form-title.spaced-title { letter-spacing: .42em; text-indent: .42em; }
.vendor-form-intro { margin: 0 2mm 13mm; text-align: justify; text-indent: 2em; line-height: 2; }
.vendor-form-facts,.vendor-form-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.vendor-form-facts th,.vendor-form-facts td { padding: 2.4mm 2mm; vertical-align: middle; }
.vendor-form-facts th { width: 36mm; text-align: left; font-weight: 500; white-space: nowrap; }
.vendor-form-facts th.compact-head { width: 17mm; text-align: center; }
.vendor-form-facts th.range-mark { width: 8mm; text-align: center; }
.vendor-form-date { margin: 15mm 0 0; text-align: center; font-size: 12pt; }
.vendor-form-signatures { display: grid; gap: 4.2mm; width: 120mm; margin: 16mm 0 0 47mm; }
.vendor-form-signatures > div { display: grid; grid-template-columns: 42mm minmax(0,1fr); gap: 4mm; align-items: baseline; }
.vendor-form-signatures .signature-heading { display: block; margin-bottom: 1mm; text-align: left; font-size: 12pt; }
.vendor-form-signatures span { white-space: nowrap; }
.vendor-form-signatures strong { min-width: 0; font-weight: 400; overflow-wrap: anywhere; }
.utility-payment-pledge .vendor-form-signatures { margin-top: 14mm; }
.utility-payment-pledge .utility-signature-line { display: grid; grid-template-columns: 42mm 42mm 12mm; gap: 4mm; align-items: baseline; width: max-content; }
.utility-payment-pledge .utility-company-line { grid-template-columns: 42mm 58mm; }
.utility-payment-pledge .utility-signature-name { display: block; min-width: 42mm; min-height: 1.55em; white-space: nowrap; }
.utility-payment-pledge .utility-signature-seal { font-style: normal; font-weight: 400; white-space: nowrap; text-align: left; }
.vendor-form-table th,.vendor-form-table td { border: .3mm solid #222; padding: 2.7mm 3mm; vertical-align: middle; overflow-wrap: anywhere; }
.vendor-form-table th { width: 38mm; text-align: center; font-weight: 500; background: #fafafa; }
.vendor-form-table th.range-mark { width: 10mm; padding-left: 0; padding-right: 0; }
.vendor-form-declaration { margin: 15mm 3mm 0; text-align: center; line-height: 1.8; }
.defect-deposit-title { margin-bottom: 10mm; font-size: 23pt; letter-spacing: .08em; text-indent: .08em; }
.defect-deposit-table th { width: 41mm; }
.defect-security-deposit .vendor-form-date { margin-top: 17mm; }
.settlement-title { margin-bottom: 10mm; letter-spacing: .12em; text-indent: .12em; }
.settlement-project-table th { width: 35mm; }
.settlement-section-title { margin: 9mm 0 4mm; font-size: 14pt; }
.settlement-subtitle { margin: 5mm 0 2.5mm; font-size: 11.5pt; font-weight: 500; }
.settlement-amount-table th,.settlement-amount-table td { width: auto; padding: 2.3mm 1.2mm; text-align: center; }
.settlement-amount-table thead th:first-child,.settlement-amount-table tbody th { width: 27mm; }
.settlement-amount-table thead th:last-child { width: 20mm; }
.settlement-reason { box-sizing: border-box; min-height: 24mm; padding: 3mm; border: .3mm solid #222; white-space: pre-wrap; }
.settlement-declaration { margin-top: 9mm; text-align: justify; text-indent: 2em; }
.completion-settlement-agreement .vendor-form-date { margin-top: 9mm; }
.completion-settlement-agreement .vendor-form-signatures { margin-top: 10mm; }

@media print {
  body.print-only-document .official-record .doc-title { margin-top: 0; }
  body.print-only-document .official-table,
  body.print-only-document .record-signature-row,
  body.print-only-document .inspection-signatures,
  body.print-only-document .payment-account-table,
  body.print-only-document .payment-vendor,
  body.print-only-document .vendor-form-facts,
  body.print-only-document .vendor-form-table,
  body.print-only-document .vendor-form-signatures { break-inside: avoid !important; page-break-inside: avoid !important; }
  body.print-only-document .supervision-record .record-statement { margin-top: 14mm; }
  body.print-only-document .supervision-record .record-date { margin-top: 16mm; }
  body.print-only-document .supervision-record .record-signature-row { margin-top: 20mm; }
  body.print-only-document .completion-inspection-record .inspection-finished { margin-top: 14mm; }
  body.print-only-document .completion-inspection-record .record-date { margin-top: 14mm; }
  body.print-only-document .completion-inspection-record .inspection-signatures { margin-top: 18mm; gap: 10mm; }
  body.print-only-document .payment-request .payment-lines { gap: 6.2mm; }
  body.print-only-document .payment-request .payment-statement { margin-top: 9mm; }
  body.print-only-document .payment-request .payment-account-title { margin-top: 8mm; }
  body.print-only-document .payment-request .payment-vendor { margin-top: 8mm; }
  body.print-only-document .payment-request .payment-note { margin-top: 7mm; }
}

.payment-lines-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.payment-lines-table th, .payment-lines-table td { border: 0; padding: 3.1mm 0; vertical-align: baseline; text-align: left; font-size: 12pt; font-weight: 400; }
.payment-lines-table th { width: 48mm; white-space: nowrap; }
.payment-lines-table td.payment-value { width: 52mm; white-space: nowrap; }
.payment-lines-table td.payment-words { overflow-wrap: anywhere; font-size: 11.2pt; }
@media print { body.print-only-document .payment-lines-table { break-inside: avoid !important; page-break-inside: avoid !important; } }

/* v0.3.2에서 도입된 묶음 선택 · 연속 미리보기 · 일괄 인쇄 기반 */
.document-batch-toolbar {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}
.document-set-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.document-batch-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #ccd8e8;
  border-radius: 12px;
  background: #fff;
}
.document-batch-summary > div { min-width: 0; }
.document-batch-summary strong { display: block; font-size: 14px; }
.document-batch-summary span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.document-batch-summary .button { flex: none; }
.document-select { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.document-select input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.document-card.selected { border-color: #86a8d4; box-shadow: 0 0 0 2px rgba(49,91,150,.08); }
.document-card-top > div { display: flex; align-items: center; gap: 7px; }
.batch-doc-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.batch-doc-labels span { padding: 5px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong); font-size: 10px; font-weight: 800; }
.batch-missing-grid { align-items: start; }
.batch-missing-field { min-width: 0; }
.batch-missing-field > .field { margin: 0; }
.batch-used-by { margin: 5px 2px 0; color: var(--muted-2); font-size: 10px; }
.batch-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.batch-preview-head > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.batch-preview-head strong { color: var(--primary-strong); font-size: 13px; }
.batch-preview-head span { font-size: 13px; font-weight: 800; }
.batch-preview-pages { display: flex; gap: 5px; }
.batch-preview-pages button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.batch-preview-pages button.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.modal-action-spacer { flex: 1; }
.print-history {
  display: grid;
  gap: 5px;
  margin: 14px 24px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.print-history strong { font-size: 11px; }
.print-history span { color: var(--muted); font-size: 10px; }

@media (max-width: 720px) {
  .document-batch-toolbar { padding: 14px 18px; }
  .document-batch-summary { align-items: stretch; flex-direction: column; }
  .document-batch-summary .button { width: 100%; }
  .batch-preview-head { align-items: flex-start; flex-direction: column; }
  .batch-preview-pages { flex-wrap: wrap; }
  .modal-action-spacer { display: none; }
  .print-history { margin-left: 18px; margin-right: 18px; }
}

.print-batch-documents { margin: 0; background: #fff; }
.print-batch-documents .paper-a4 { margin: 0; box-shadow: none; }

@media print {
  body.print-batch-documents {
    width: 210mm !important;
    height: auto !important;
    min-width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }
  body.print-batch-documents * { visibility: visible !important; }
  body.print-batch-documents .batch-print-page {
    position: relative !important;
    box-sizing: border-box !important;
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    break-after: page !important;
    page-break-after: always !important;
  }
  body.print-batch-documents .batch-print-page:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }
  body.print-batch-documents .batch-print-page .document-print-page {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    box-sizing: border-box !important;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 0 !important;
    max-height: 297mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  body.print-batch-documents .doc-recipient {
    position: absolute !important;
    right: 16mm !important;
    bottom: 11mm !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.print-batch-documents .doc-facts,
  body.print-batch-documents .doc-attachments,
  body.print-batch-documents .doc-vendor-block,
  body.print-batch-documents .official-table,
  body.print-batch-documents .record-signature-row,
  body.print-batch-documents .inspection-signatures,
  body.print-batch-documents .payment-account-table,
  body.print-batch-documents .payment-vendor,
  body.print-batch-documents .payment-lines-table,
  body.print-batch-documents .vendor-form-facts,
  body.print-batch-documents .vendor-form-table,
  body.print-batch-documents .vendor-form-signatures {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  body.print-batch-documents .start-report .doc-facts { gap: 7.8mm; }
  body.print-batch-documents .start-report .doc-attachments { margin-top: 9mm; }
  body.print-batch-documents .start-report .doc-statement { margin-top: 15mm; }
  body.print-batch-documents .start-report .doc-date-center { margin-top: 11mm; }
  body.print-batch-documents .start-report .doc-vendor-block { margin-top: 14mm; }
  body.print-batch-documents .official-record .doc-title { margin-top: 0; }
  body.print-batch-documents .supervision-record .record-statement { margin-top: 14mm; }
  body.print-batch-documents .supervision-record .record-date { margin-top: 16mm; }
  body.print-batch-documents .supervision-record .record-signature-row { margin-top: 20mm; }
  body.print-batch-documents .completion-inspection-record .inspection-finished { margin-top: 14mm; }
  body.print-batch-documents .completion-inspection-record .record-date { margin-top: 14mm; }
  body.print-batch-documents .completion-inspection-record .inspection-signatures { margin-top: 18mm; gap: 10mm; }
  body.print-batch-documents .payment-request .payment-statement { margin-top: 9mm; }
  body.print-batch-documents .payment-request .payment-account-title { margin-top: 8mm; }
  body.print-batch-documents .payment-request .payment-vendor { margin-top: 8mm; }
  body.print-batch-documents .payment-request .payment-note { margin-top: 7mm; }
}


/* v0.4.0 — 계약서류 4종 / 서류 템플릿 분리 */
.document-page-gap { height: 18px; }
.standard-contract,
.acceptance-terms,
.use-seal-form,
.private-contract-pledge { font-family: "Malgun Gothic", "맑은 고딕", Arial, sans-serif; }

/* 공사도급표준계약서 */
.standard-contract {
  display: block;
  padding: 9mm 10mm 8mm;
  font-size: 8.9pt;
  line-height: 1.28;
}
.standard-contract-title-row { display: grid; grid-template-columns: minmax(0,1fr) 49mm; align-items: stretch; border: .3mm solid #222; }
.standard-contract-title-row h1 { display: grid; place-items: center; margin: 0; min-height: 18mm; font-size: 22pt; letter-spacing: .18em; text-indent: .18em; }
.standard-contract-title-row table { width: 100%; border-collapse: collapse; border-left: .3mm solid #222; font-size: 8.2pt; }
.standard-contract-title-row th, .standard-contract-title-row td { border-bottom: .3mm solid #222; padding: 1mm 1.2mm; font-weight: 400; text-align: center; }
.standard-contract-title-row tr:last-child th, .standard-contract-title-row tr:last-child td { border-bottom: 0; }
.standard-contract-title-row th { width: 28mm; text-align: left; white-space: nowrap; }
.standard-contract-title-row td:last-child { width: 8mm; }
.standard-contract-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.standard-contract-table th, .standard-contract-table td { border: .28mm solid #222; padding: 1.25mm 1.7mm; vertical-align: middle; font-weight: 400; }
.standard-contract-table th { text-align: center; }
.party-table { border-top: 0; }
.party-table .vertical-head, .contract-detail-table .vertical-head { width: 10mm; padding-left: .6mm; padding-right: .6mm; line-height: 1.15; }
.party-table th:nth-child(2) { width: 27mm; }
.party-table td { overflow-wrap: anywhere; }
.party-table td:nth-child(3), .party-table td:nth-child(5) { width: 30mm; white-space: nowrap; }
.contract-detail-table th:nth-child(2) { width: 31mm; }
.contract-detail-table .small-label { font-size: 6.8pt; letter-spacing: -.04em; }
.contract-defect-caption { padding: 1.4mm 1mm; border-left: .28mm solid #222; border-right: .28mm solid #222; font-size: 8.4pt; }
.contract-defect-table th { font-size: 7.7pt; }
.contract-defect-table th:nth-child(1) { width: 28mm; }
.contract-defect-table th:nth-child(2) { width: 40mm; }
.contract-defect-table th:nth-child(4) { width: 44mm; }
.contract-defect-table td { height: 8mm; text-align: center; }
.contract-declaration { margin: 8mm 3mm 0; text-align: justify; font-size: 8.4pt; line-height: 1.55; }
.contract-attachments { display: grid; grid-template-columns: 20mm minmax(0,1fr); margin: 5.5mm 3mm 0; }
.contract-attachments strong { font-weight: 400; }
.contract-attachments ol { margin: 0; padding-left: 5mm; line-height: 1.55; }
.contract-date { margin: 5mm 0 0; text-align: center; font-size: 9pt; }
.contract-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 17mm; margin: 5mm 3mm 0; }
.contract-signatures > div > strong { display: block; margin-bottom: 2mm; font-size: 9pt; }
.contract-signatures p { display: grid; grid-template-columns: 17mm 4mm minmax(0,1fr); margin: 1.8mm 0; }
.contract-signatures p span { white-space: nowrap; }
.contract-signatures p b { font-weight: 400; }

/* 승낙사항 */
.acceptance-terms { padding: 14mm 15mm 12mm; font-size: 11.2pt; line-height: 1.6; }
.acceptance-title { margin: 0 0 14mm; font-size: 27pt; }
.acceptance-list { display: grid; gap: 8mm; margin: 0; padding-left: 10mm; }
.acceptance-list li { padding-left: 3mm; }
.acceptance-date { margin: 20mm 0 0; text-align: center; }
.acceptance-vendor { display: grid; gap: 3.5mm; width: 132mm; margin: 14mm 0 0 13mm; }
.acceptance-vendor p { display: grid; grid-template-columns: 40mm 5mm minmax(0,1fr); margin: 0; }
.acceptance-vendor span { white-space: nowrap; }
.acceptance-vendor b { font-weight: 400; }

/* 사용인감계 */
.use-seal-form { padding: 18mm 17mm 13mm; font-size: 12pt; line-height: 1.65; }
.use-seal-title { margin: 4mm 0 18mm; font-size: 31pt; }
.seal-boxes { display: grid; grid-template-columns: 52mm 52mm; justify-content: center; gap: 37mm; }
.seal-boxes > div { border: .35mm solid #222; }
.seal-boxes strong { display: block; padding: 3mm; border-bottom: .35mm solid #222; text-align: center; font-size: 14pt; letter-spacing: .18em; }
.seal-boxes span { display: block; height: 42mm; }
.seal-statement { margin: 27mm 0 0; text-align: justify; }
.seal-project { margin: 24mm 0 0 34mm; font-size: 13pt; }
.seal-date { margin: 16mm 0 0; text-align: center; }
.seal-vendor { display: grid; gap: 4.5mm; width: 112mm; margin: 18mm 0 0 65mm; }
.seal-vendor p { display: grid; grid-template-columns: 38mm minmax(0,1fr); margin: 0; }
.seal-recipient { font-size: 17pt; }

/* 수의계약 통합서약서 — 원본처럼 2쪽 */
.private-contract-pledge { display: block; padding: 7mm 8mm 7mm; font-size: 7.25pt; line-height: 1.24; }
.pledge-title { margin: 1mm 0 3.5mm; text-align: center; font-size: 18pt; }
.pledge-summary, .pledge-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pledge-summary th, .pledge-summary td, .pledge-table th, .pledge-table td { border: .24mm solid #222; padding: .85mm 1.15mm; vertical-align: middle; }
.pledge-summary th { width: 25mm; text-align: center; font-weight: 500; }
.pledge-summary td { overflow-wrap: anywhere; }
.pledge-table { margin-top: 3mm; }
.pledge-table thead th { text-align: center; font-weight: 600; background: #fafafa; }
.pledge-table thead th:nth-child(1) { width: 8mm; }
.pledge-table thead th:nth-child(2) { width: 27mm; }
.pledge-table thead th:nth-child(4) { width: 30mm; }
.pledge-table tbody > tr > td:first-child { text-align: center; }
.pledge-table tbody > tr > th { text-align: center; font-weight: 500; }
.pledge-table td:last-child { white-space: pre-line; text-align: center; font-size: 6.6pt; line-height: 1.2; }
.pledge-table .pledge-conflict td:nth-last-child(2) { font-size: 6.8pt; }
.pledge-mini { font-size: 6.2pt; }
.pledge-sign { display: grid; gap: 2mm; margin-top: 3.5mm; text-align: center; }
.pledge-sign p { margin: 0; }
.pledge-sign p:last-child { display: grid; grid-template-columns: 22mm minmax(0,1fr) 22mm minmax(0,1fr); align-items: baseline; width: 118mm; margin: 0 auto; text-align: left; }
.pledge-recipient { margin: 2.5mm 0 0; font-size: 8.6pt; font-weight: 700; }
.pledge-page-two { padding: 16mm 14mm 13mm; font-size: 10.2pt; line-height: 1.6; }
.pledge-reasons-title { margin: 4mm 0 12mm; text-align: center; font-size: 25pt; letter-spacing: .08em; }
.pledge-reasons { display: grid; gap: 5.8mm; margin: 0; padding-left: 10mm; }
.pledge-reasons li { padding-left: 2mm; text-align: justify; }
.pledge-reasons-note { margin: 10mm 0 0; padding-top: 5mm; border-top: .25mm solid #777; font-size: 9pt; }

@media print {
  body.print-only-document .standard-contract,
  body.print-batch-documents .standard-contract { padding-top: 8mm; padding-bottom: 7mm; }
  body.print-only-document .acceptance-terms,
  body.print-batch-documents .acceptance-terms { padding-top: 13mm; }
  body.print-only-document .private-contract-pledge,
  body.print-batch-documents .private-contract-pledge { break-inside: avoid !important; page-break-inside: avoid !important; }
  body.print-batch-documents .batch-print-page .document-print-page { break-after: auto !important; page-break-after: auto !important; }
}
/* 계약당사자 표: 긴 업체명·주소에서도 항목 경계가 무너지지 않도록 열 폭 고정 */
.party-table td:nth-child(3), .party-table td:nth-child(5) { width: auto; }
.party-table td { min-width: 0; overflow-wrap: anywhere; word-break: keep-all; }
.party-table td:nth-child(3), .party-table td:nth-child(5) { white-space: normal; }
.party-table td:nth-child(4), .party-table td:nth-child(6), .party-table td:nth-child(7) { overflow-wrap: anywhere; }

/* v0.4.1 — 행정기관 공사관리 / 하자관리 / 수도전기료 */
.warranty-row-note { margin-top: 5px; color: #6b7280; font-size: 11px; font-weight: 600; }
.warranty-management-block { padding-top: 5px; }
.warranty-history-list { display: grid; gap: 8px; margin-top: 12px; }
.warranty-history-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.warranty-history-copy { display: grid; gap: 2px; min-width: 0; }
.warranty-history-copy strong { font-size: 13px; }
.warranty-history-copy span { color: var(--text); font-size: 12px; }
.warranty-history-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.warranty-history-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.ledger-extra-wrap { padding-top: 2px; }
.ledger-extra-details { border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; }
.ledger-extra-details > summary { display: flex; justify-content: space-between; gap: 10px; padding: 13px 15px; cursor: pointer; font-weight: 700; }
.ledger-extra-details > summary span { color: var(--muted); font-size: 11px; font-weight: 500; }
.ledger-extra-details[open] > summary { border-bottom: 1px solid var(--line); }
.nested-form-grid { padding: 14px; }
.agency-document-group { border: 1px solid #d9e5f4; border-radius: 16px; padding: 18px; background: #fbfdff; }
.vendor-document-group { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.document-subgroup { margin-top: 18px; }
.document-subgroup h4 { margin: 0 0 10px; color: #516174; font-size: 12px; letter-spacing: .03em; }
.utility-tool-card { background: linear-gradient(180deg,#fff 0%,#f8fbff 100%); }
.utility-input-grid { align-items: start; }
.utility-result-panel { margin-top: 18px; padding: 16px; border: 1px solid #dce5ef; border-radius: 14px; background: #f8fafc; }
.utility-result-empty { padding: 8px; color: var(--muted); text-align: center; }
.utility-result-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.utility-result-grid > div { display: grid; gap: 4px; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid #e4eaf1; }
.utility-result-grid span { color: var(--muted); font-size: 11px; }
.utility-result-grid strong { font-size: 17px; }
.utility-result-grid .utility-total { border-color: #bfd3ed; background: #f3f8ff; }
.utility-rate-note { margin: 9px 2px 0; color: var(--muted); font-size: 11px; }

/* 공사대장 */
.construction-ledger { display: block; padding: 9mm 8mm 8mm; font-family: "Malgun Gothic","맑은 고딕",Arial,sans-serif; font-size: 7.6pt; line-height: 1.2; }
.ledger-title-row { position: relative; display: flex; align-items: end; justify-content: center; min-height: 17mm; margin-bottom: 2mm; }
.ledger-title-row h1 { margin: 0; font-size: 24pt; letter-spacing: .23em; text-indent: .23em; }
.ledger-title-row > div { position: absolute; right: 0; bottom: 1mm; font-size: 8pt; }
.ledger-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ledger-table th,.ledger-table td { border: .25mm solid #333; padding: 1.35mm 1.2mm; vertical-align: middle; overflow-wrap: anywhere; }
.ledger-table th { background: #fafafa; text-align: center; font-weight: 500; }
.ledger-table td { min-height: 6mm; }
.ledger-change-row td { height: 6mm; }
.ledger-note { margin-top: 2mm; color: #555; font-size: 6.8pt; text-align: right; }

/* 하자검사조서 */
.warranty-inspection-report { display: block; padding: 13mm 15mm 10mm; font-family: "Malgun Gothic","맑은 고딕",Arial,sans-serif; }
.warranty-inspection-report .doc-title { margin: 3mm 0 12mm; font-size: 27pt; font-weight: 400; }
.warranty-inspection-table { font-size: 10.8pt; }
.warranty-inspection-table th,.warranty-inspection-table td { font-weight: 400; }
.warranty-inspection-table th { width: 28mm; }
.warranty-inspection-table th,.warranty-inspection-table td { padding: 2.1mm 2.5mm; }
.warranty-inspection-table .warranty-large-row th,.warranty-inspection-table .warranty-large-row td { height: 23mm; vertical-align: top; white-space: pre-wrap; }
.warranty-statement { margin: 12mm 0 0 5mm; font-size: 12pt; }
.warranty-inspection-report .record-date { margin-top: 11mm; text-align: center; font-size: 12pt; }
.warranty-signatures { display: grid; gap: 8mm; margin: 15mm 0 0 10mm; width: 164mm; font-size: 11.5pt; font-weight: 400; }
.warranty-signatures > div { display: grid; grid-template-columns: 28mm minmax(0,1fr); gap: 4mm; align-items: baseline; }
.warranty-signatures,.warranty-signatures * { font-weight: 400 !important; }
.warranty-signature-label { white-space: nowrap; }
.warranty-signature-content { display: grid; grid-template-columns: minmax(0,1fr) 14mm; align-items: baseline; min-height: 1.6em; width: 100%; white-space: normal; }
.warranty-signature-name { min-width: 0; padding-right: 4mm; }
.warranty-seal { display: block; width: 14mm; text-align: center; white-space: nowrap; }

/* 하자검사대장 */
.warranty-ledger { display: block; padding: 10mm 9mm 9mm; font-family: "Malgun Gothic","맑은 고딕",Arial,sans-serif; font-size: 8.7pt; line-height: 1.25; }
.warranty-ledger > h1 { margin: 0 0 8mm; text-align: center; font-size: 25pt; letter-spacing: .18em; text-indent: .18em; }
.warranty-ledger > h2 { margin: 4mm 0 2mm; font-size: 11pt; font-weight: 600; }
.warranty-ledger-info,.warranty-ledger-list { width: 100%; border-collapse: collapse; table-layout: fixed; }
.warranty-ledger-info th,.warranty-ledger-info td,.warranty-ledger-list th,.warranty-ledger-list td { border: .26mm solid #333; padding: 1.7mm 1.5mm; vertical-align: middle; overflow-wrap: anywhere; }
.warranty-ledger-info th { width: 17mm; background: #fafafa; text-align: center; font-weight: 500; }
.warranty-ledger-list thead th { background: #fafafa; text-align: center; font-weight: 500; }
.warranty-ledger-list th:nth-child(1) { width: 27mm; }
.warranty-ledger-list th:nth-child(3) { width: 34mm; }
.warranty-ledger-list th:nth-child(4) { width: 38mm; }
.warranty-ledger-list tbody td { height: 22mm; }

@media (max-width: 720px) {
  .utility-result-grid { grid-template-columns: 1fr; }
  .warranty-history-item { align-items: flex-start; flex-direction: column; }
}

@media print {
  body.print-only-document .construction-ledger,
  body.print-batch-documents .construction-ledger { padding-top: 8mm; padding-bottom: 7mm; }
  body.print-only-document .warranty-inspection-report,
  body.print-batch-documents .warranty-inspection-report,
  body.print-only-document .warranty-ledger,
  body.print-batch-documents .warranty-ledger { break-inside: avoid !important; page-break-inside: avoid !important; }
  body.print-batch-documents .ledger-table,
  body.print-batch-documents .warranty-inspection-table,
  body.print-batch-documents .warranty-ledger-info,
  body.print-batch-documents .warranty-ledger-list,
  body.print-only-document .ledger-table,
  body.print-only-document .warranty-inspection-table,
  body.print-only-document .warranty-ledger-info,
  body.print-only-document .warranty-ledger-list { break-inside: avoid !important; page-break-inside: avoid !important; }
}


/* 공사대장 가운데 구역도 바깥 12열 표를 그대로 사용 */
.ledger-split-row > * { height: 6.4mm; box-sizing: border-box; }
.ledger-section-label,.ledger-budget-label { text-align: center; word-break: keep-all; }

.paper-a4-landscape {
  box-sizing: border-box; width: 297mm; min-height: 210mm; margin: 0 auto; padding: 11mm 12mm 9mm;
  background:#fff; color:#111; box-shadow:0 6px 28px rgba(20,30,44,.17);
  font-family:"Malgun Gothic","맑은 고딕",Arial,sans-serif;
}
.utility-cost-sheet { font-size: 9pt; line-height: 1.28; }
.utility-print-project { display:grid; grid-template-columns:24mm 1fr; gap:3mm; align-items:center; margin-bottom:5mm; font-size:10pt; }
.utility-cost-sheet > h1 { margin: 3mm 0 2.8mm; font-size: 13pt; font-weight:700; }
.utility-print-rate-table,.utility-print-inputs { width:100%; border-collapse:collapse; table-layout:fixed; }
.utility-print-rate-table th,.utility-print-rate-table td,.utility-print-inputs th,.utility-print-inputs td { border:.25mm solid #333; padding:1.3mm .8mm; text-align:center; vertical-align:middle; }
.utility-print-rate-table th,.utility-print-inputs th { background:#fafafa; font-weight:600; }
.utility-print-rate-table { font-size:8pt; }
.utility-print-rate-table thead tr:first-child th { height:7mm; }
.utility-print-rate-table thead tr:nth-child(2) th { height:10mm; }
.utility-print-notes { margin:2.7mm 0 4.2mm; font-size:7.8pt; }
.utility-print-notes p { margin:.8mm 0; }
.utility-print-inputs { font-size:8.5pt; margin-bottom:5mm; }
.utility-print-inputs th { width:18mm; }
.utility-print-formulas { display:grid; gap:4mm; margin-top:3mm; }
.utility-print-formula { display:grid; grid-template-columns:28mm 1fr 38mm; gap:3mm; align-items:center; padding:3.2mm 4mm; border:.25mm solid #777; }
.utility-print-formula strong { font-size:10pt; }
.utility-print-formula span { text-align:center; font-size:9.4pt; }
.utility-print-formula b { text-align:right; font-size:10pt; }
.utility-print-formula.disabled { color:#777; background:#fafafa; }
.utility-print-total { display:flex; justify-content:flex-end; gap:12mm; margin-top:5mm; padding-right:8mm; font-size:12pt; }
.utility-print-total strong { min-width:42mm; text-align:right; }
.utility-print-footnote { margin-top:5mm; text-align:right; color:#555; font-size:7pt; }
.print-only-document.print-landscape-document .paper-a4-landscape { margin:0; box-shadow:none; }

@media print {
  body.print-only-document.print-landscape-document { width:297mm !important; height:210mm !important; min-width:297mm !important; min-height:210mm !important; max-width:297mm !important; max-height:210mm !important; margin:0 !important; padding:0 !important; overflow:hidden !important; }
  body.print-only-document.print-landscape-document .document-print-page,
  body.print-only-document.print-landscape-document .paper-a4-landscape { position:absolute !important; left:0 !important; top:0 !important; width:297mm !important; height:210mm !important; min-width:297mm !important; min-height:210mm !important; max-width:297mm !important; max-height:210mm !important; margin:0 !important; box-shadow:none !important; overflow:hidden !important; }
}

/* v0.4.2 — 하자담보 추천 / 공종별 안전서류 / 내 서류 */
.warranty-item-list{display:grid;gap:8px;margin-top:10px}
.warranty-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #d9e2ee;border-radius:12px;background:#fff}
.warranty-item-main{display:grid;gap:3px;min-width:0}.warranty-item-main strong{font-size:14px}.warranty-item-main span{font-size:13px;color:#53657a}.warranty-item-main small{font-size:12px;color:#315f9b}
.warranty-summary-note{margin-top:10px;padding:9px 12px;border-radius:10px;background:#f3f7fc;color:#40556e;font-size:13px}
.warranty-manager-grid{display:grid;grid-template-columns:1fr;gap:14px}.warranty-manager-actions{display:flex;justify-content:flex-end;gap:8px;margin:16px 0 22px}.warranty-manager-existing{border-top:1px solid #e2e8f0;padding-top:16px}
.recommend-readonly{min-height:48px;border:1px solid #d7e0eb;border-radius:10px;background:#f7f9fc;padding:8px 12px;display:flex;align-items:center;justify-content:space-between}.recommend-readonly strong{font-size:19px;color:#315f9b}.recommend-readonly span{font-size:12px;color:#718096}
.my-documents-panel,.safety-recommend-panel{border:1px solid #d9e3ef;border-radius:16px;background:#fff;padding:18px;margin-bottom:18px}.my-documents-panel{background:#fbfcfe}.my-document-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.my-document-chips button{border:1px solid #d3deeb;background:#fff;border-radius:999px;padding:8px 12px;display:flex;gap:8px;align-items:center;cursor:pointer}.my-document-chips span{font-weight:700}.my-document-chips em{font-style:normal;font-size:11px;color:#61748a}
.safety-recommend-head h3{margin:2px 0 4px}.safety-recommend-head p{margin:0;color:#5b6b7e}.work-characteristics{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin:16px 0 12px;padding:12px 14px;border-radius:12px;background:#f5f8fc}.work-characteristics strong{width:100%;font-size:13px}.work-characteristics label{display:flex;gap:6px;align-items:center;font-size:13px}.recommended-document-list{display:grid;gap:8px}.recommended-document{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-top:1px solid #edf1f5}.recommended-document:first-child{border-top:0}.recommended-document>div{display:grid;gap:2px}.recommended-document span{font-size:12px;color:#6d7d8f}
.my-doc-toggle{margin-top:10px;border:0;background:transparent;color:#6b7a8b;font-weight:700;font-size:12px;cursor:pointer}.my-doc-toggle.active{color:#315f9b}.document-card-actions{display:flex;gap:8px;flex-wrap:wrap}.safety-document-group{border-color:#d7e6df}.safety-document-card .document-stage{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.safety-signature-hint{display:grid;gap:2px;margin:0 0 12px;padding:9px 11px;border:1px solid #cbdced;border-radius:10px;background:#f3f8fe}.safety-signature-hint strong{font-size:12px;color:#244f83}.safety-signature-hint span{font-size:11px;line-height:1.45;color:#526b87}.safety-signature-edit-note{display:grid;gap:3px;margin-top:12px;padding:11px 13px;border:1px solid #cbdced;border-radius:11px;background:#f3f8fe}.safety-signature-edit-note strong{color:#244f83;font-size:13px}.safety-signature-edit-note span{color:#526b87;font-size:12px;line-height:1.45}
.safety-meta-edit{grid-template-columns:1fr}.safety-edit-list{display:grid;gap:0;border:1px solid #d8e1ec;border-radius:14px;overflow:hidden;margin-top:16px}.safety-edit-row{display:grid;grid-template-columns:44px minmax(0,1fr) 240px;border-top:1px solid #e4e9f0;background:#fff}.safety-edit-row:first-child{border-top:0}.safety-edit-number{display:grid;place-items:center;background:#f6f8fb;font-weight:800}.safety-edit-question{padding:12px 14px;line-height:1.45}.safety-edit-options{padding:10px 12px;display:flex;align-items:center;gap:12px;background:#fbfcfe}.safety-edit-options label{display:flex;align-items:center;gap:4px;font-size:12px;white-space:nowrap}.safety-edit-footer{font-size:12px;color:#66788a;margin:10px 2px 0}

/* 인쇄 — 안전·보건 체크리스트 */
.safety-checklist{padding:12mm 13mm 10mm;font-family:"Malgun Gothic","Apple SD Gothic Neo",sans-serif;color:#111;font-size:9pt;line-height:1.28}
.safety-checklist h1,.safety-reference-page h1{text-align:center;font-size:18pt;letter-spacing:.07em;margin:0 0 5mm}.safety-subtitle{text-align:center;font-size:8.5pt;margin:-2mm 0 6mm}.safety-meta{display:grid;gap:2mm;margin-bottom:4mm}.safety-meta>div{display:grid;grid-template-columns:35mm 1fr 32mm;gap:2mm;align-items:center}.safety-meta strong{font-size:9pt}.safety-meta em{font-style:normal}.safety-signature-print{display:flex;align-items:center;justify-content:flex-end;gap:1mm;min-height:11mm}.safety-signature-print img{display:block;max-width:24mm;max-height:11mm;object-fit:contain}.safety-signature-print em{flex:none;font-size:8pt}
.safety-check-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:8.2pt}.safety-check-table th,.safety-check-table td{border:1px solid #222;padding:1.35mm 1.5mm;vertical-align:middle}.safety-check-table th:nth-child(1),.safety-check-table td:nth-child(1){width:9mm;text-align:center}.safety-check-table th:nth-child(3),.safety-check-table td:nth-child(3),.safety-check-table th:nth-child(4),.safety-check-table td:nth-child(4),.safety-check-table th:nth-child(5),.safety-check-table td:nth-child(5){width:13mm;text-align:center;font-size:10pt}.safety-check-table th{background:#f3f3f3}.safety-footer{font-size:8pt;margin:2.5mm 0}.safety-written-note{border:1px solid #333;display:grid;grid-template-columns:18mm 1fr;margin-top:2mm}.safety-written-note>*{padding:2mm}.safety-written-note strong{border-right:1px solid #333;text-align:center}.safety-vendor-confirm{margin-top:5mm}.safety-vendor-confirm h2{text-align:center;font-size:12pt;margin:0 0 3mm}.safety-vendor-confirm p{font-size:8.5pt;line-height:1.5}.safety-vendor-confirm>div{display:flex;justify-content:flex-end;gap:5mm;margin-top:2mm;padding-right:10mm}.safety-reference-page{padding:18mm 18mm;font-family:"Malgun Gothic","Apple SD Gothic Neo",sans-serif}.safety-reference-page ol{font-size:11pt;line-height:1.8}.safety-risk-note{margin-top:12mm;border:1px solid #333;padding:6mm}.safety-risk-note strong{font-size:13pt}.safety-risk-note p{line-height:1.7}
.safetyIndustrial .safety-check-table{font-size:7.4pt}.safetyIndustrial .safety-check-table th,.safetyIndustrial .safety-check-table td{padding:1mm 1.2mm;line-height:1.2}.safetyConfined .safety-check-table{font-size:7.9pt}.safetyGeneral .safety-check-table{font-size:8.1pt}
.warranty-ledger-items{width:100%;border-collapse:collapse;table-layout:fixed;margin-bottom:4mm;font-size:8.3pt}.warranty-ledger-items th,.warranty-ledger-items td{border:1px solid #222;padding:1.5mm;text-align:center}.warranty-ledger-items th{background:#f3f3f3}

@media (max-width:760px){.safety-edit-row{grid-template-columns:36px 1fr}.safety-edit-options{grid-column:1/-1;justify-content:flex-end;border-top:1px dashed #e1e7ef}.recommended-document{align-items:flex-start}.work-characteristics{display:grid}.warranty-item{align-items:flex-start}.my-document-chips{display:grid}.my-document-chips button{justify-content:space-between}}


/* v0.4.2.2 — 원본 역할구분·인쇄서식 핫픽스 */
.label-optional{font-size:11px;color:#7a8796;font-weight:500;margin-left:4px}
.work-characteristics label{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;line-height:1.35}
.work-characteristics input[type="checkbox"]{appearance:auto;width:17px!important;height:17px!important;min-width:17px!important;flex:0 0 17px!important;margin:0!important;padding:0!important}

.ledger-table col{width:8.333333%}
.ledger-table th,.ledger-table td{border:.2mm solid #444!important}
.ledger-table{border:.2mm solid #444}
.ledger-split-row td{word-break:keep-all;overflow-wrap:anywhere}

.warranty-inspection-table{width:100%;table-layout:fixed;border-collapse:collapse}
.warranty-inspection-table .wi-col-b{width:17.608%}
.warranty-inspection-table .wi-col-c{width:22.757%}
.warranty-inspection-table .wi-col-d{width:3.156%}
.warranty-inspection-table .wi-col-e{width:20.432%}
.warranty-inspection-table .wi-col-f{width:13.953%}
.warranty-inspection-table .wi-col-g{width:22.093%}
.warranty-inspection-table th,.warranty-inspection-table td{border:.2mm solid #333!important;padding:2.1mm 2.3mm;box-sizing:border-box}
.warranty-inspection-table th{width:auto!important}
.warranty-inspection-table .wi-period-start{border-right:0!important}
.warranty-inspection-table .wi-tilde{border-left:0!important;border-right:0!important;text-align:center;padding-left:0;padding-right:0}
.warranty-inspection-table .wi-period-end{border-left:0!important}
.warranty-inspection-table .wi-work-type{text-align:center}
.warranty-signatures strong{min-height:1.4em}

/* v0.4.3.4 — 수도광열비 검산성 */
.utility-basis-summary{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1.2fr);gap:8px;align-items:stretch;margin-bottom:12px}
.utility-basis-summary>div{display:grid;gap:4px;padding:10px 12px;border:1px solid #e0e7ef;border-radius:10px;background:#fff}
.utility-basis-summary>i{align-self:center;font-style:normal;font-weight:800;color:#708095}
.utility-basis-summary span{font-size:11px;color:var(--muted)}
.utility-basis-summary strong{font-size:14px}
.utility-basis-summary .utility-basis-total{border-color:#b9d0ec;background:#f2f7fd}

.utility-cost-sheet{font-size:8.7pt;line-height:1.22;padding:8.5mm 10mm 7.5mm}
.utility-print-project{margin-bottom:2.6mm;font-size:9.5pt}
.utility-cost-sheet>h1{margin:2.3mm 0 2mm;font-size:11.5pt}
.utility-print-rate-table{font-size:7.4pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.utility-print-rate-table th,.utility-print-rate-table td{padding:1mm .6mm}
.utility-print-rate-table thead tr:first-child th{height:5.5mm}
.utility-print-rate-table thead tr:nth-child(2) th{height:7.2mm}
.utility-print-rate-table .utility-rate-selected{font-weight:800;color:#173f6d;background:#eaf3ff;border-color:#4c78a8}
.utility-print-notes{display:flex;flex-wrap:wrap;gap:1.4mm 5mm;margin:1.7mm 0 2.5mm;font-size:6.8pt;color:#4f5d6d}
.utility-print-notes p{margin:0}
.utility-print-basis{display:grid;grid-template-columns:minmax(0,1fr) 7mm minmax(0,1fr) 7mm minmax(0,1.25fr);gap:1.6mm;align-items:stretch;margin-bottom:2mm}
.utility-print-basis>div{display:grid;gap:.8mm;padding:2.1mm 2.8mm;border:.25mm solid #9ba7b5;border-radius:1.5mm;background:#fff}
.utility-print-basis>i{display:grid;place-items:center;font-style:normal;font-size:12pt;font-weight:700;color:#536274}
.utility-print-basis span{font-size:7.4pt;color:#475569}
.utility-print-basis strong{font-size:10pt}
.utility-print-basis .utility-basis-emphasis{background:#f2f7fd;border-color:#5d83ae;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.utility-print-contract-meta{display:flex;gap:7mm;align-items:center;padding:1.6mm 2.6mm;margin-bottom:2.2mm;border-top:.2mm solid #c7ced7;border-bottom:.2mm solid #c7ced7;font-size:7.4pt}
.utility-print-contract-meta span{white-space:nowrap}
.utility-print-formulas{display:grid;gap:2.2mm;margin-top:0}
.utility-calc-block{border:.25mm solid #78889a;border-radius:1.7mm;overflow:hidden;background:#fff;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.utility-calc-block.disabled{color:#7a8794;background:#fafafa}
.utility-calc-head{display:flex;align-items:center;justify-content:space-between;padding:1.8mm 2.7mm;background:#f5f7fa;border-bottom:.2mm solid #cfd6df}
.utility-calc-head strong{font-size:9pt}.utility-calc-head b{font-size:10.5pt}
.utility-rate-flow{display:grid;grid-template-columns:1fr 5mm 1fr 5mm 1fr 5mm .9fr 10mm .95fr;gap:1mm;align-items:center;padding:1.7mm 2.5mm 1.4mm}
.utility-rate-flow>div{display:grid;gap:.4mm;text-align:center;padding:1.2mm 1mm;border:.2mm solid #d3d9e1;border-radius:1.2mm}
.utility-rate-flow small{font-size:6.4pt;color:#5d6b7a}.utility-rate-flow strong{font-size:8.4pt}
.utility-rate-flow>i{font-style:normal;text-align:center;font-weight:700;color:#596777;font-size:8pt}
.utility-rate-flow .utility-average-rate{border-color:#5d83ae;background:#eef5fd}
.utility-cost-flow{display:flex;justify-content:flex-end;align-items:center;gap:2.5mm;padding:0 2.7mm 1.8mm;font-size:7.5pt}
.utility-cost-flow i{font-style:normal;color:#64748b}.utility-cost-flow strong{font-size:8.3pt}
.utility-print-total{margin-top:2.5mm;padding:2mm 4mm;border-top:.4mm double #555;gap:9mm;font-size:11pt}
.utility-print-footnote{margin-top:1.7mm;font-size:6.5pt}

.warranty-name-sign{display:flex;align-items:center;white-space:nowrap}
.warranty-name-space{display:inline-block;width:34mm;height:1.2em;margin:0 2mm}

@media (max-width:720px){.utility-basis-summary{grid-template-columns:1fr}.utility-basis-summary>i{display:none}}

/* v0.4.3.5 — 공사관리대장 용어 / 수의계약 통합서약서 선택입력 / 하자검사조서 출력모드 */
.document-preview-mode{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin:0 0 12px;padding:10px 12px;border:1px solid #cfdaea;border-radius:11px;background:#f7f9fc}
.document-preview-mode strong{font-size:12px;color:#244f83;margin-right:2px}
.document-preview-mode label{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#40556e;cursor:pointer}
.document-preview-mode input{width:16px;height:16px;margin:0;accent-color:var(--primary)}
.document-preview-mode label:has(input:disabled){opacity:.45;cursor:default}
.document-preview-mode .button{margin-left:auto}
.pledge-edit-row .safety-edit-number{font-size:11px;text-align:center;padding:0 3px}
.pledge-edit-row .safety-edit-question{display:grid;gap:4px}
.pledge-edit-row .safety-edit-question strong{font-size:12px;color:#244f83}
.pledge-edit-row .safety-edit-question span{font-size:12px;color:#3f4f61;line-height:1.5}
.pledge-document-card .document-card-actions,.warranty-report-card .document-card-actions{margin-top:2px}
.warranty-filled-name{display:inline-block;min-width:34mm;margin:0 2mm;text-align:center;font-weight:700}
@media (max-width:760px){.document-preview-mode{align-items:flex-start;display:grid;grid-template-columns:1fr}.document-preview-mode .button{margin-left:0;width:100%}}

/* v0.4.3.6 — 하자검사조서 3-way 출력 / 배제사유 보완 / 업체 체크리스트 출력 복구 */
.pledge-reasons-full{display:grid;gap:8px;margin:18px 0 0;padding:0;font-size:12px;line-height:1.48}
.pledge-reason-item{padding:7px 10px;border-bottom:1px solid #d9dee7;white-space:normal}
.pledge-reason-item:last-child{border-bottom:0}
.warranty-preview-mode .preview-mode-hint{flex-basis:100%;font-size:12px;color:#667085;margin-top:4px}


/* v0.4.3.7 — drag & drop import / modal alert / checklist signature expansion */
.modal-alert-region[hidden] { display:none; }
.modal-alert-region { flex:none; padding:10px 22px 0; background:#fff; }
.modal-inline-alert {
  padding:10px 12px; border-radius:10px; background:#263447; color:#fff;
  font-size:13px; font-weight:700; line-height:1.45; box-shadow:0 8px 20px rgba(18,28,45,.12);
}
.modal-inline-alert.warn { background:#8a5d18; }
.modal-inline-alert.danger { background:#9c3a3a; }

.import-path-guide {
  margin:14px 0; padding:12px 14px; border:1px solid #cbdcf2; border-radius:12px;
  background:#f4f8fd; display:grid; gap:5px;
}
.import-path-guide strong { font-size:12px; color:#335a89; }
.import-path-guide span { font-size:13px; color:#1e3a5f; font-weight:700; line-height:1.5; }
.import-path-guide b { padding:0 4px; color:#7b8da5; }
.import-path-guide .import-path-main { font-size:13px; color:#1e3a5f; font-weight:800; line-height:1.55; }
.import-path-guide .import-path-note { font-size:13px; color:#455f7c; font-weight:650; line-height:1.5; }

.excel-drop-zone {
  min-height:190px; padding:24px; border:2px dashed #b9c9dd; border-radius:16px;
  background:#fbfdff; display:grid; place-items:center; align-content:center; gap:8px;
  text-align:center; cursor:pointer; transition:.16s ease;
}
.excel-drop-zone:hover, .excel-drop-zone:focus-visible, .excel-drop-zone.drag-active {
  outline:none; border-color:var(--primary); background:var(--primary-soft);
  box-shadow:0 0 0 4px rgba(67,112,167,.08);
}
.excel-drop-icon { font-size:30px; line-height:1; color:var(--primary); }
.excel-drop-zone strong { font-size:15px; }
.excel-drop-zone span { color:var(--muted); font-size:12px; }

.utility-site-manager-preview {
  grid-template-columns:auto minmax(180px,1fr) auto auto;
  align-items:center;
}
.utility-site-manager-preview strong span { color:var(--muted); font-size:11px; font-weight:600; }
.utility-site-manager-preview input {
  min-height:36px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; font:inherit;
}
.private-contract-pledge .pledge-conflict-confirm td {
  padding:9px 10px; text-align:left; font-size:10px; line-height:1.55; background:#fafbfd;
}
@media (max-width:700px) {
  .utility-site-manager-preview { grid-template-columns:1fr; align-items:stretch; }
  .utility-site-manager-preview .button { width:100%; }
}
.utility-site-manager-preview input#previewUtilitySiteManager { width:100%; height:36px; margin:0; accent-color:auto; }


/* v0.4.3.8 — project reset / consistent checklist actions / preview correction UX */
.popover button.popover-danger { margin-top:4px; border-top:1px solid #f2d7d7; border-radius:0 0 8px 8px; color:var(--danger); }
.popover button.popover-danger:hover { background:#fff5f5; }
.detail-head-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.detail-delete-button { white-space:nowrap; }
.preview-information-banner {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  margin:0 0 12px; padding:12px 14px; border:1px solid #cbd8e8; border-radius:12px; background:#f7f9fc;
}
.preview-information-banner > div:first-child { min-width:0; }
.preview-information-banner strong { display:block; margin-bottom:3px; font-size:13px; }
.preview-information-banner span { display:block; color:#53657a; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.preview-information-banner.warning { border-color:#efd39b; background:#fff8e8; }
.preview-information-banner.warning strong { color:#8a5d18; }
.preview-information-banner.ready { border-color:#cfe0d7; background:#f4faf6; }
.preview-information-banner.ready strong { color:#287247; }
.preview-information-banner.blank { border-color:#cbdcf2; background:#f4f8fd; }
.preview-information-banner.blank strong { color:#335a89; }
.preview-information-actions { display:flex; flex:none; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
@media (max-width:760px) {
  .detail-head-actions { justify-content:flex-start; }
  .preview-information-banner { align-items:stretch; flex-direction:column; }
  .preview-information-actions { justify-content:stretch; }
  .preview-information-actions .button { flex:1; }
}

.document-edit-guide { display:flex; align-items:center; gap:9px; margin:-4px 24px 16px; padding:10px 12px; border:1px dashed #cbd8e8; border-radius:10px; background:#fbfcfe; color:var(--muted); font-size:12px; }
.document-edit-guide strong { color:var(--text); white-space:nowrap; }
.document-edit-guide b { color:var(--primary-strong); }
@media (max-width:760px){ .document-edit-guide { margin-left:16px; margin-right:16px; align-items:flex-start; flex-direction:column; gap:3px; } }

.reset-projects-toolbar { color:var(--danger); border-color:#efd5d5; }
.reset-projects-toolbar:hover { background:#fff5f5 !important; border-color:#e8bdbd !important; }

/* v0.4.3.9 — 하자검사조서 원클릭 양식 정렬: 검사자=행정실장, 직위/성명 표제 제거, 굵은 글씨 해제 */

/* v0.4.3.10 — 하자검사조서 기본값: 학교명 제거, 검사자=행정실장 역할 우선, 공란 수기공간 확대 */


/* v0.4.3.11 — 하자검사조서 서명란: 성명 영역과 (인) 영역 분리·고정 / 목록 돌아가기 버튼 확대 / favicon 추가 */


/* v0.4.3.12 — 하자대장 감독관 즉시 수정 / 체크리스트 빠른 입력 / 상세 내비게이션 경량화 */
.safety-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 10px;
  padding: 12px 14px;
  border: 1px solid #dce5f0;
  border-radius: 12px;
  background: #f8fbff;
}
.safety-bulk-toolbar strong { display: block; font-size: 13px; }
.safety-bulk-toolbar span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.safety-bulk-actions { display: flex; gap: 7px; flex: none; }
.warranty-ledger-supervisor-preview { grid-template-columns: auto minmax(180px, 320px) auto; }
.warranty-ledger-supervisor-preview input { min-width: 0; width: 100%; }
@media (max-width: 640px) {
  .detail-tabs { top: 64px; gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .detail-tabs::-webkit-scrollbar { display: none; }
  .detail-tab { min-height: 45px; font-size: 13px; }
  .safety-bulk-toolbar { align-items: stretch; flex-direction: column; }
  .safety-bulk-actions { width: 100%; }
  .safety-bulk-actions .button { flex: 1; }
  .warranty-ledger-supervisor-preview { grid-template-columns: 1fr; align-items: stretch; }
}

/* v0.5.0 — 공사서류 작성지원 리브랜딩 / 서류 출력 중심 UX */
body { font-size: 16px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; font-size: 0; position: relative; }
.brand-mark::before,
.brand-mark::after { content: ''; position: absolute; left: 11px; right: 11px; height: 5px; border-radius: 1px; background: #fff; }
.brand-mark::before { top: 11px; }
.brand-mark::after { bottom: 11px; }
.brand-mark { background: var(--primary); }
.brand-mark { color: transparent; }
.brand-mark::selection { background: transparent; }
.brand-mark > * { display:none; }
.brand-mark { --gong-stroke: 5px; }
.brand-mark:after { box-shadow: none; }
.brand-mark { overflow:hidden; }
.brand-mark::before { box-shadow: 0 15px 0 #fff; }
.brand-button .brand-mark { isolation:isolate; }
.brand-button .brand-mark + span { min-width:0; }
.brand-button .brand-mark + span::before { content:''; position:absolute; }
.brand-mark { }
.brand-button .brand-mark::after { left: 18.5px; right:auto; top:11px; bottom:11px; width:5px; height:auto; }
.brand-title-row { display:flex; align-items:center; gap:7px; }
.brand-button strong { font-size: 18px; letter-spacing: -.35px; }
.brand-title-row em { display:inline-flex; align-items:center; min-height:22px; padding:2px 7px; border-radius:999px; background:var(--primary-soft); color:var(--primary-strong); font-size:11px; font-style:normal; font-weight:800; }
.brand-button small { margin-top:2px; font-size:12px; }
.button { min-height:42px; padding:9px 15px; font-size:15px; }
.button.small { min-height:36px; padding:7px 11px; font-size:14px; }

.document-output-hero { margin-bottom:18px; }
.document-output-hero h1 { font-size:clamp(27px,3vw,34px); }
.document-output-hero p:not(.eyebrow) { max-width:780px; font-size:16px; line-height:1.65; }
.start-card { min-height:118px; }
.start-copy strong { font-size:17px; }
.start-copy small { font-size:14px; line-height:1.55; }
.start-step { width:38px; height:38px; font-size:18px; }
.project-title strong { font-size:16px; }
.project-title small, .cell-value { font-size:14px; }
.segmented button { font-size:14px; }

.back-button { min-height:42px; margin-bottom:6px; font-size:15px; font-weight:750; }
.current-project .eyebrow { margin-bottom:2px; }
.current-project h1 { font-size:30px; }
.document-first-head { align-items:flex-start; margin-bottom:12px; }
.document-first-head .current-meta { font-size:15px; gap:9px; }
.document-first-head .current-meta strong { color:var(--text); font-size:15px; }
.meta-dot { color:#b0b9c6; }
.save-state { font-size:13px; }
.document-workspace-nav { gap:30px; margin-bottom:22px; }
.document-workspace-nav .detail-tab { min-height:52px; font-size:15px; }
.document-workspace-nav .detail-tab:first-child { font-size:16px; }

.documents-panel.document-first-panel { border-color:#d6dde7; box-shadow:0 8px 26px rgba(28,44,69,.04); }
.documents-head.document-first-title { align-items:center; padding:28px 28px 24px; background:#fff; }
.documents-head.document-first-title h2 { font-size:28px; letter-spacing:-.7px; }
.documents-head.document-first-title p:not(.eyebrow) { max-width:720px; margin-top:7px; font-size:15px; line-height:1.6; }
.text-action-button { flex:none; border:0; background:transparent; color:var(--primary); cursor:pointer; padding:8px 0; font-size:15px; font-weight:800; }
.text-action-button:hover { color:var(--primary-strong); text-decoration:underline; text-underline-offset:4px; }
.document-purpose-strip { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:20px 28px 0; padding:15px 16px; border:1px solid #d8e2ef; border-radius:12px; background:#f8fbff; }
.document-purpose-strip > div { display:grid; gap:3px; }
.document-purpose-strip strong { font-size:15px; color:#264f81; }
.document-purpose-strip span { color:#5d6d80; font-size:14px; line-height:1.5; }
.reference-program-banner.compact-reference { margin:12px 28px 6px; padding:11px 13px; box-shadow:none; background:#fbfcfe; border-color:#dde5ef; }
.compact-reference .reference-program-label { min-height:25px; padding:3px 8px; font-size:10px; }
.compact-reference .reference-program-copy strong { font-size:12px; font-weight:700; }
.compact-reference .reference-program-copy span { font-size:11px; }

.document-group { padding:28px 28px 8px; }
.document-group + .document-group { border-top:1px solid #e8edf3; }
.document-group-title { align-items:flex-end; justify-content:space-between; margin-bottom:16px; }
.document-group-title strong { font-size:20px; letter-spacing:-.3px; }
.document-group-title span { font-size:14px; line-height:1.45; }
.document-subgroup { margin-top:18px; }
.document-subgroup h4 { margin:0 0 10px; color:#536174; font-size:14px; }
.simplified-document-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.simple-document-card { min-height:178px; padding:17px; border-color:#dfe5ec; background:#fff; }
.simple-document-card.ready { border-color:#dbe5df; background:#fff; }
.simple-document-card.needs-info { border-color:#eadfc8; background:#fff; }
.simple-document-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.simple-document-head h3 { margin:0; font-size:17px; line-height:1.4; letter-spacing:-.2px; }
.document-status-pill { flex:none; display:inline-flex; align-items:center; min-height:25px; padding:3px 8px; border-radius:999px; background:#eef2f6; color:#647286; font-size:11px; font-weight:800; white-space:nowrap; }
.document-status-pill.ready { background:var(--success-soft); color:var(--success); }
.document-status-pill.warn { background:var(--warn-soft); color:var(--warn); }
.document-status-pill.neutral { background:var(--primary-soft); color:var(--primary-strong); }
.simple-document-card > .simple-document-status { min-height:44px; margin:10px 0 16px; color:var(--muted); font-size:14px; line-height:1.55; }
.simple-document-card .button { margin-top:auto; }
.simple-document-card .document-card-actions { margin-top:auto; }
.simple-document-card .two-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.simple-document-card .two-actions .button,
.simple-document-card .pledge-actions .button { margin-top:0; }
.simple-document-card .pledge-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.simple-document-card .pledge-actions .button:last-child:nth-child(3) { grid-column:1/-1; }
.full-button { width:100%; }

.secondary-feature-details { margin:2px 0 18px; border-top:1px dashed #dce3eb; }
.secondary-feature-details > summary { padding:14px 0 4px; color:#58677a; cursor:pointer; font-size:14px; font-weight:750; }
.secondary-feature-details .safety-recommend-panel { margin-top:10px; }

.batch-output-details { margin:20px 28px; border:1px solid #dbe3ec; border-radius:14px; background:#fbfcfe; overflow:hidden; }
.batch-output-details > summary { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:16px 18px; cursor:pointer; }
.batch-output-details > summary > span { display:grid; gap:2px; }
.batch-output-details > summary strong { font-size:16px; }
.batch-output-details > summary small { color:var(--muted); font-size:13px; font-weight:400; }
.batch-output-details > summary em { flex:none; color:var(--primary); font-size:12px; font-style:normal; font-weight:800; }
.batch-output-body { padding:0 18px 18px; border-top:1px solid #e6ebf1; }
.document-set-buttons { display:flex; flex-wrap:wrap; gap:7px; padding:15px 0 12px; }
.batch-document-selector { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; padding:2px 0 14px; }
.batch-document-check { display:flex; align-items:center; gap:8px; min-height:40px; padding:8px 10px; border:1px solid #e0e6ee; border-radius:9px; background:#fff; cursor:pointer; font-size:13px; }
.batch-document-check:hover { border-color:#bfcddd; }
.batch-document-check input { width:17px; min-height:17px; height:17px; margin:0; accent-color:var(--primary); }
.document-batch-summary { margin:0; padding:14px; border:1px solid #d5dfeb; border-radius:11px; background:#fff; }

/* 미리보기 = 최종 확인·수정·출력 화면 */
.modal.wide-modal { width:min(1360px, calc(100vw - 24px)); }
.document-preview-workspace { display:grid; grid-template-columns:300px minmax(0,1fr); gap:18px; align-items:start; }
.document-preview-inspector { position:sticky; top:0; display:grid; gap:10px; }
.document-preview-inspector .preview-information-banner { display:grid; gap:12px; margin:0; padding:14px; }
.document-preview-inspector .preview-information-actions { display:grid; grid-template-columns:1fr; width:100%; }
.document-preview-inspector .preview-information-actions .button { width:100%; }
.document-preview-inspector .doc-preview-note { display:grid; gap:4px; margin:0; padding:13px 14px; border:1px solid #e0e5eb; border-radius:11px; background:#fff; color:var(--muted); font-size:13px; }
.document-preview-inspector .doc-preview-note strong { color:var(--text); font-size:14px; }
.document-preview-inspector .document-preview-mode { display:grid; grid-template-columns:1fr; align-items:stretch; gap:8px; margin:0; padding:13px 14px; }
.document-preview-inspector .document-preview-mode label { font-size:13px; }
.document-preview-inspector .document-preview-mode .button { width:100%; margin-left:0; }
.document-preview-inspector .utility-site-manager-preview input,
.document-preview-inspector .warranty-ledger-supervisor-preview input { width:100%; }
.document-preview-paper { margin:0; min-width:0; max-height:calc(100vh - 230px); padding:12px; border-radius:12px; background:#eef1f5; }

/* 수의계약 배제사유: 붙임 표기 + 가독성 강화 */
.pledge-page-two { padding:13mm 14mm 12mm; font-size:10.8pt; line-height:1.48; }
.pledge-attachment-label { margin:0 0 2mm; font-size:11.5pt; font-weight:700; }
.pledge-reasons-title { margin:0 0 7mm; font-size:24pt; }
.pledge-reasons-full { gap:2.2mm; margin:0; padding:0; font-size:10.8pt; line-height:1.48; }
.pledge-reason-item { padding:1.4mm 1.8mm; border-bottom:.2mm solid #d4dae2; }
.pledge-reasons-note { margin:5mm 0 0; padding-top:3mm; font-size:9.5pt; }

/* 입력 화면 글자 확대 */
.section-head h2 { font-size:18px; }
.section-head p { font-size:14px; }
.field label { font-size:14px; }
.field .hint { font-size:12px; }
input, select, textarea { font-size:15px; }
.notice { font-size:14px; line-height:1.55; }

@media (max-width:1100px) {
  .simplified-document-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .batch-document-selector { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .document-preview-workspace { grid-template-columns:260px minmax(0,1fr); }
}
@media (max-width:820px) {
  .documents-head.document-first-title { align-items:flex-start; }
  .document-purpose-strip { align-items:flex-start; flex-direction:column; }
  .document-purpose-strip .button { width:100%; }
  .document-preview-workspace { grid-template-columns:1fr; }
  .document-preview-inspector { position:static; }
  .document-preview-paper { max-height:none; }
}
@media (max-width:700px) {
  .brand-title-row em { display:none; }
  .brand-button strong { font-size:16px; }
  .document-first-head .current-meta { font-size:14px; }
  .documents-head.document-first-title { padding:22px 18px 18px; }
  .documents-head.document-first-title h2 { font-size:24px; }
  .documents-head.document-first-title .text-action-button { width:100%; text-align:left; }
  .document-purpose-strip, .reference-program-banner.compact-reference { margin-left:18px; margin-right:18px; }
  .document-group { padding:24px 18px 6px; }
  .document-group-title { align-items:flex-start; flex-direction:column; gap:3px; }
  .document-group-title strong { font-size:19px; }
  .simplified-document-grid, .batch-document-selector { grid-template-columns:1fr; }
  .batch-output-details { margin:16px 18px; }
  .simple-document-card { min-height:0; }
  .simple-document-card .two-actions, .simple-document-card .pledge-actions { grid-template-columns:1fr; }
  .simple-document-card .pledge-actions .button:last-child:nth-child(3) { grid-column:auto; }
  .document-workspace-nav { gap:18px; }
}
/* v0.5.0 favicon/brand mark: 실제 工 글자 형태 */
.brand-mark { font-family:"Noto Sans CJK KR","Malgun Gothic","Yu Gothic",sans-serif; font-size:20px; font-weight:800; color:#fff; }
.brand-mark::before, .brand-mark::after { content:none !important; display:none !important; box-shadow:none !important; }
.recommend-badge { align-self:center; padding:4px 8px; border-radius:999px; background:var(--primary-soft); color:var(--primary); font-size:11px; font-style:normal; font-weight:800; }


/* v0.5.1 — 미리보기 왼쪽에서 부족정보 바로 입력 */
@media (min-width: 1201px) {
  .document-preview-workspace { grid-template-columns:340px minmax(0,1fr); }
}
.preview-information-banner.preview-inline-missing {
  gap:14px;
  padding:15px;
}
.preview-missing-heading { display:grid; gap:4px; }
.preview-information-banner .preview-missing-heading strong { margin:0; font-size:15px; }
.preview-information-banner .preview-missing-heading span { font-size:13px; line-height:1.45; }
.preview-information-banner .preview-missing-heading small { color:#7a6645; font-size:12px; line-height:1.45; }
.preview-inline-missing-fields { display:grid; gap:11px; }
.preview-inline-missing-fields .field { display:grid; gap:6px; min-width:0; }
.preview-inline-missing-fields .field.full { grid-column:auto; }
.preview-inline-missing-fields .field > label { color:#3d4f63; font-size:13px; font-weight:700; }
.preview-inline-missing-fields input,
.preview-inline-missing-fields select,
.preview-inline-missing-fields textarea {
  width:100%; min-width:0; margin:0; font-size:15px;
}
.preview-inline-missing-fields textarea { min-height:82px; resize:vertical; }
.preview-inline-missing-fields .hint { font-size:11px; line-height:1.4; }
.preview-inline-missing-fields .money-input-wrap { width:100%; }
.preview-inline-missing-fields .money-korean { font-size:11px; }

/* v0.5.1.2 — 행정실 서류 6칸을 실제 업무 흐름순으로 재배치 / 원클릭 별도 확인 영역 가독성 확대 */

/* v0.5.1.3 — 미리보기 왼쪽에서 전체 입력정보 상시 편집 */
@media (min-width:1201px) {
  .document-preview-workspace { grid-template-columns:400px minmax(0,1fr); }
}
.document-preview-inspector {
  max-height:calc(100vh - 230px);
  overflow:auto;
  padding-right:4px;
  align-content:start;
}
.preview-editor-status {
  display:grid;
  gap:4px;
  padding:14px 15px;
  border:1px solid #dbe3ed;
  border-radius:12px;
  background:#fff;
}
.preview-editor-status strong { font-size:15px; color:var(--text); }
.preview-editor-status span { color:var(--muted); font-size:13px; line-height:1.45; }
.preview-editor-status.ready { border-color:#cfe3d7; background:#f3faf5; }
.preview-editor-status.ready strong { color:#257345; }
.preview-editor-status.warning { border-color:#efd49a; background:#fff8e8; }
.preview-editor-status.warning strong { color:#8a5d18; }
.preview-editor-status.blank { border-color:#cbdcf2; background:#f5f8fd; }
.preview-editor-status.blank strong { color:#335a89; }
.preview-field-editor {
  display:grid;
  gap:0;
  border:1px solid #dbe3ed;
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}
.preview-editor-head { padding:14px 15px 12px; border-bottom:1px solid #e7ebf1; background:#fbfcfe; }
.preview-editor-head strong { display:block; font-size:15px; color:var(--text); }
.preview-editor-head span { display:block; margin-top:3px; color:var(--muted); font-size:12px; line-height:1.45; }
.preview-editor-group { padding:13px 14px 14px; border-top:1px solid #edf0f4; }
.preview-editor-group:first-of-type { border-top:0; }
.preview-editor-group h4 { margin:0 0 9px; color:#31587f; font-size:12px; letter-spacing:.01em; }
.preview-editor-fields { display:grid; gap:10px; }
.preview-editor-item { position:relative; min-width:0; padding:9px 10px 10px; border:1px solid #e2e7ee; border-radius:9px; background:#fff; }
.preview-editor-item.missing { border-color:#e6b95f; background:#fffaf0; box-shadow:inset 3px 0 0 #d89a23; }
.preview-editor-item .field { display:grid; gap:6px; min-width:0; }
.preview-editor-item .field.full { grid-column:auto; }
.preview-editor-item .field > label { padding-right:34px; color:#394b5e; font-size:13px; font-weight:700; }
.preview-editor-item input,
.preview-editor-item select,
.preview-editor-item textarea { width:100%; min-width:0; margin:0; font-size:14px; }
.preview-editor-item textarea { min-height:76px; resize:vertical; }
.preview-editor-item .money-input-wrap { width:100%; }
.preview-editor-item .money-korean,
.preview-editor-item .hint { font-size:11px; line-height:1.4; }
.preview-required-tag { position:absolute; top:9px; right:9px; padding:2px 5px; border-radius:999px; background:#eef4fb; color:#31587f; font-size:10px; font-weight:700; }
.preview-editor-item.missing .preview-required-tag { background:#fff0cd; color:#98640c; }
.preview-editor-savebar { position:sticky; bottom:0; padding:11px 13px; border-top:1px solid #dfe5ec; background:rgba(255,255,255,.96); backdrop-filter:blur(6px); }
.preview-editor-savebar .button { width:100%; min-height:42px; font-size:14px; }
.document-preview-paper { min-height:420px; }

/* 공통 안전·보건 체크리스트 — 원클릭 엑셀 6번 O/X 표 복원 */
.safety-related-checklist-editor {
  display:grid;
  gap:10px;
  margin-top:14px;
  padding:14px;
  border:1px solid #d8e1ec;
  border-radius:12px;
  background:#f9fbfd;
}
.safety-related-checklist-editor > div:first-child strong { display:block; font-size:13px; }
.safety-related-checklist-editor > div:first-child span { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.safety-related-grid { display:grid; border:1px solid #dfe5ec; border-radius:9px; overflow:hidden; background:#fff; }
.safety-related-grid > div { display:grid; grid-template-columns:minmax(0,1fr) 56px 56px; align-items:center; min-height:42px; border-top:1px solid #e8edf2; }
.safety-related-grid > div:first-child { border-top:0; }
.safety-related-grid > div > span { padding:9px 11px; font-size:12px; }
.safety-related-grid label { display:flex; align-items:center; justify-content:center; gap:4px; height:100%; border-left:1px solid #e8edf2; font-size:12px; }
.safety-related-print { width:100%; margin-top:2mm; border-collapse:collapse; table-layout:fixed; font-size:7.5pt; }
.safety-related-print th,.safety-related-print td { border:1px solid #444; padding:1.1mm 1.3mm; }
.safety-related-print th:first-child,.safety-related-print td:first-child { width:76%; }
.safety-related-print th:last-child,.safety-related-print td:last-child { text-align:center; }
.safety-related-print th { background:#ececec; font-weight:700; }
.safety-related-note { margin:1.2mm 0 0; font-size:7pt; line-height:1.35; }
.safetyGeneral .safety-check-table td:nth-child(2) { line-height:1.38; }

@media (max-width:1100px) {
  .document-preview-inspector { max-height:calc(100vh - 230px); }
}
@media (max-width:820px) {
  .document-preview-inspector { max-height:none; overflow:visible; padding-right:0; }
  .preview-editor-savebar { position:static; }
}


/* v0.5.1.4 — 수의계약 통합서약서 빠른 작성 */
.pledge-quick-panel {
  display:grid;
  gap:11px;
  margin:12px 0;
  padding:14px;
  border:1px solid #cfdced;
  border-radius:12px;
  background:#f8fbff;
}
.pledge-quick-heading { display:grid; gap:4px; }
.pledge-quick-heading strong { color:#173f70; font-size:15px; }
.pledge-quick-heading span { color:#5c6d80; font-size:12px; line-height:1.45; }
.pledge-business-type { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; }
.pledge-business-type > strong { margin-right:2px; font-size:13px; color:#33475e; }
.pledge-business-type label { display:inline-flex; align-items:center; gap:5px; font-size:13px; color:#33475e; cursor:pointer; }
.pledge-business-type input { width:16px; height:16px; margin:0; accent-color:var(--primary); }
.pledge-quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.pledge-quick-actions .button { width:100%; min-height:39px; }
.pledge-quick-hint { margin:0; color:#68788b; font-size:11px; line-height:1.45; }
.pledge-preview-editor { margin-top:0; overflow:visible; border:0; background:transparent; }
.pledge-preview-editor .pledge-quick-panel { margin:0; border-radius:12px; background:#f8fbff; }
.pledge-preview-summary { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:10px; padding:10px 12px; border:1px solid #e1e7ef; border-radius:10px; background:#fff; }
.pledge-preview-summary strong { color:#31587f; font-size:13px; }
.pledge-preview-summary span { color:#6c7a8a; font-size:11px; }
.pledge-preview-details { margin-top:10px; border:1px solid #dbe3ed; border-radius:11px; background:#fff; overflow:hidden; }
.pledge-preview-details summary { padding:12px 13px; color:#31587f; font-size:13px; font-weight:700; cursor:pointer; background:#fbfcfe; }
.pledge-preview-details[open] summary { border-bottom:1px solid #e5eaf0; }
.pledge-edit-list.compact { padding:8px; max-height:520px; overflow:auto; }
.pledge-edit-list.compact .pledge-edit-row { gap:7px; padding:9px 7px; }
.pledge-edit-list.compact .safety-edit-number { font-size:10px; }
.pledge-edit-list.compact .safety-edit-question strong { font-size:11px; }
.pledge-edit-list.compact .safety-edit-question span { font-size:11px; line-height:1.4; }
.pledge-edit-list.compact .safety-edit-options { gap:5px 8px; }
.pledge-edit-list.compact .safety-edit-options label { font-size:11px; }
.pledge-preview-editor > .preview-editor-savebar { position:static; margin-top:10px; border:1px solid #dbe3ed; border-radius:10px; }
@media (max-width:720px) {
  .pledge-quick-actions { grid-template-columns:1fr; }
  .pledge-business-type { align-items:flex-start; }
}

/* v0.5.1.5 — compact Figma-style typography + collapsible safety section */
body { font-size: 15px; }
.brand-button strong { font-size: 17px; }
.button { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.button.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.document-output-hero h1 { font-size: clamp(26px, 3vw, 32px); }
.document-output-hero p:not(.eyebrow) { font-size: 15px; line-height: 1.6; }
.start-copy strong { font-size: 16px; }
.start-copy small { font-size: 13px; }
.start-step { width: 36px; height: 36px; font-size: 16px; }
.project-title strong { font-size: 15px; }
.project-title small, .cell-value { font-size: 13px; }
.segmented button { font-size: 13px; }
.back-button { min-height: 40px; font-size: 14px; }
.current-project h1 { font-size: 28px; }
.document-first-head .current-meta,
.document-first-head .current-meta strong { font-size: 14px; }
.document-workspace-nav .detail-tab { min-height: 50px; font-size: 14px; }
.document-workspace-nav .detail-tab:first-child { font-size: 15px; }
.documents-head.document-first-title { padding: 25px 26px 22px; }
.documents-head.document-first-title h2 { font-size: 26px; }
.documents-head.document-first-title p:not(.eyebrow) { font-size: 14px; line-height: 1.55; }
.text-action-button { font-size: 14px; }
.document-purpose-strip { margin: 18px 26px 0; padding: 13px 14px; }
.document-purpose-strip strong { font-size: 14px; }
.document-purpose-strip span { font-size: 13px; }
.reference-program-banner.compact-reference { margin-left: 26px; margin-right: 26px; }
.document-group { padding: 24px 26px 7px; }
.document-group-title { margin-bottom: 14px; }
.document-group-title strong { font-size: 18px; }
.document-group-title span { font-size: 12.5px; }
.document-subgroup h4 { font-size: 13px; }
.simple-document-card { min-height: 168px; padding: 16px; border-radius: 12px; }
.simple-document-head h3 { font-size: 16px; }
.document-status-pill { min-height: 23px; font-size: 10.5px; }
.simple-document-card > .simple-document-status { min-height: 40px; margin: 9px 0 14px; font-size: 13px; }
.secondary-feature-details > summary { font-size: 13px; }
.batch-output-details { margin-left: 26px; margin-right: 26px; }
.batch-output-details > summary strong { font-size: 15px; }
.batch-output-details > summary small { font-size: 12px; }
.batch-document-check { font-size: 12px; }
.section-head h2 { font-size: 17px; }
.section-head p { font-size: 13px; }
.field label { font-size: 13px; }
.field .hint { font-size: 11px; }
input, select, textarea { font-size: 14px; }
.notice { font-size: 13px; }

/* 안전·보건 체크리스트: 필요할 때만 펼치는 compact section */
.safety-collapsible-group { padding: 0; overflow: hidden; }
.safety-collapsible-group > summary { list-style: none; }
.safety-collapsible-group > summary::-webkit-details-marker { display: none; }
.safety-document-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 18px 26px;
  cursor: pointer;
  user-select: none;
  background: #fff;
}
.safety-document-summary:hover { background: #fbfcfe; }
.safety-summary-copy { display: grid; gap: 3px; min-width: 0; }
.safety-summary-copy strong { font-size: 18px; letter-spacing: -.25px; }
.safety-summary-copy small { color: var(--muted); font-size: 12.5px; line-height: 1.45; font-weight: 400; }
.safety-summary-meta { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.safety-summary-meta em {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.safety-summary-toggle {
  width: 9px;
  height: 9px;
  border-right: 2px solid #7a8798;
  border-bottom: 2px solid #7a8798;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}
.safety-collapsible-group[open] .safety-summary-toggle { transform: rotate(225deg) translate(-1px,-1px); }
.safety-collapsible-group[open] .safety-document-summary { border-bottom: 1px solid #edf0f4; }
.safety-document-body { padding: 18px 26px 7px; }
.safety-document-body > .document-grid { padding-bottom: 12px; }
.safety-document-body .secondary-feature-details { margin-bottom: 12px; }

@media (max-width: 700px) {
  .documents-head.document-first-title { padding: 20px 18px 17px; }
  .documents-head.document-first-title h2 { font-size: 23px; }
  .document-group { padding: 21px 18px 6px; }
  .document-group-title strong { font-size: 17px; }
  .document-purpose-strip, .reference-program-banner.compact-reference,
  .batch-output-details { margin-left: 18px; margin-right: 18px; }
  .safety-document-summary { min-height: 70px; padding: 16px 18px; }
  .safety-summary-copy strong { font-size: 17px; }
  .safety-summary-copy small { font-size: 12px; }
  .safety-document-body { padding: 16px 18px 6px; }
}


/* v0.5.1.6 — compact document cards matched to reduced typography */
.simplified-document-grid { gap: 10px; }
.simple-document-card {
  min-height: 148px;
  padding: 14px 15px;
}
.simple-document-head { gap: 8px; }
.document-status-pill {
  min-height: 22px;
  padding: 2px 7px;
}
.simple-document-card > .simple-document-status {
  min-height: 30px;
  margin: 7px 0 10px;
  line-height: 1.45;
}
.simple-document-card .button {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
}
.simple-document-card .document-card-actions { gap: 7px; }
@media (max-width:700px) {
  .simple-document-card { min-height: 0; }
}

/* v0.6.0 — K-에듀파인 자료관리목록 우선 시작 흐름 */
.import-first-hero { margin-bottom: 18px; }
.import-first-hero h1 { max-width: 820px; }
.import-first-hero p:not(.eyebrow) { max-width: 850px; }
.start-grid.start-grid-060 { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); margin-bottom: 9px; }
.start-grid-060 .start-card { min-height: 104px; padding: 15px 16px; }
.start-grid-060 .recommended-start { border-color: #b9cde5; box-shadow: 0 3px 12px rgba(49,91,150,.045); }
.start-recommend { display: inline-flex; width: fit-content; margin-bottom: 4px; padding: 2px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong); font-size: 10px; font-weight: 850; line-height: 1.5; }
.start-recommend + strong { margin-bottom: 3px; }
.legacy-import-line { display: flex; align-items: center; gap: 7px 14px; flex-wrap: wrap; margin: 0 2px 18px; color: var(--muted); font-size: 11.5px; }
.legacy-import-line button { padding: 3px 0; border: 0; background: transparent; color: #526a88; cursor: pointer; font-size: 11.5px; font-weight: 750; }
.legacy-import-line button:hover { color: var(--primary-strong); text-decoration: underline; text-underline-offset: 3px; }
.legacy-import-line b { margin-left: 2px; font-size: 14px; }
.recent-projects-title { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px 10px; }
.recent-projects-title > div { display: grid; gap: 2px; }
.recent-projects-title strong { font-size: 14px; }
.recent-projects-title span { color: var(--muted); font-size: 11px; }
.recent-projects-panel .toolbar { border-top: 1px solid var(--line); }

.import-flow-steps { display: flex; align-items: center; gap: 10px; margin: -2px 0 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.import-flow-steps.compact { margin-bottom: 12px; }
.import-flow-steps > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-2); font-size: 11.5px; font-weight: 750; white-space: nowrap; }
.import-flow-steps > span b { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #edf1f5; color: #748195; font-size: 10px; }
.import-flow-steps > span.active { color: var(--primary-strong); }
.import-flow-steps > span.active b { background: var(--primary); color: #fff; }
.import-flow-steps > span.done { color: #536b60; }
.import-flow-steps > span.done b { background: var(--success-soft); color: var(--success); }
.import-flow-steps > i { color: #b0bac7; font-size: 15px; font-style: normal; }

.edufine-picker-toolbar { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.edufine-picker-toolbar input { min-width: 0; }
.edufine-picker-toolbar span { flex: none; min-width: 48px; color: var(--muted); font-size: 11px; text-align: right; }
.edufine-project-list { display: grid; gap: 7px; max-height: min(430px, 52vh); overflow: auto; padding: 1px; }
.edufine-project-card { display: grid; grid-template-columns: 18px minmax(0,1fr) 26px; gap: 10px; align-items: center; min-height: 72px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; transition: .14s ease; }
.edufine-project-card:hover { border-color: #bcc9d8; background: #fbfcfe; }
.edufine-project-card:has(input:checked) { border-color: #8eabd0; background: #f6f9fd; box-shadow: 0 0 0 2px rgba(49,91,150,.06); }
.edufine-project-card input { width: 16px; min-height: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.edufine-project-main { display: grid; min-width: 0; gap: 2px; }
.edufine-project-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.edufine-project-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #556274; font-size: 11.5px; }
.edufine-project-main em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 10.5px; font-style: normal; }
.edufine-project-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #eef2f6; color: transparent; font-size: 11px; font-weight: 900; }
.edufine-project-card:has(input:checked) .edufine-project-check { background: var(--primary); color: #fff; }
.edufine-project-card[hidden] { display: none !important; }

.import-confirm-summary { display: flex; gap: 8px; margin: 12px 0; }
.import-confirm-summary span { display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; color: var(--muted); font-size: 11px; }
.import-confirm-summary b { color: var(--text); font-size: 13px; }
.modal-grid.import-confirm-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px 14px; margin-top: 4px; }
.import-confirm-grid .field.full { grid-column: 1 / -1; }
.import-confirm-field { padding: 10px 11px; border: 1px solid #e6eaf0; border-radius: 10px; background: #fff; }
.import-confirm-field.needs-input { background: #fffdf8; border-color: #eee4cd; }
.import-confirm-field label { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.import-field-badge { display: inline-flex; align-items: center; margin-left: auto; padding: 2px 6px; border-radius: 999px; font-size: 9.5px; line-height: 1.45; font-weight: 850; }
.import-field-badge.loaded { background: var(--primary-soft); color: var(--primary-strong); }
.import-field-badge.needed { background: var(--warn-soft); color: var(--warn); }
.import-confirm-field input { min-height: 36px; padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
.import-confirm-field .date-picker-button { width: 36px; height: 34px; }
.import-confirm-field .money-korean { font-size: 10px; }
.import-confirm-foot { display: flex; align-items: center; gap: 7px; margin-top: 13px; color: var(--muted); font-size: 10.5px; }

@media (max-width: 760px) {
  .start-grid.start-grid-060 { grid-template-columns: 1fr; }
  .legacy-import-line { align-items: flex-start; flex-direction: column; gap: 2px; }
  .import-flow-steps { gap: 5px; overflow-x: auto; }
  .import-flow-steps > span { font-size: 10.5px; }
  .import-flow-steps > span b { width: 19px; height: 19px; }
  .modal-grid.import-confirm-grid { grid-template-columns: 1fr; }
  .import-confirm-grid .field.full { grid-column: auto; }
  .edufine-project-card { grid-template-columns: 17px minmax(0,1fr) 24px; padding: 9px 10px; }
}


/* v0.6.1 — 계약 → 착공 → 준공 → 하자 흐름 / 행정실 서류 구분 */
.workflow-documents-panel { max-width: 100%; }
.workflow-route { display:flex; align-items:center; gap:9px; width:max-content; max-width:100%; margin:4px 0 18px; padding:8px 11px; border:1px solid var(--border); border-radius:999px; background:var(--surface-subtle,#f8fafc); color:var(--text-secondary); font-size:12px; font-weight:700; }
.workflow-route b { color:var(--text-tertiary,#94a3b8); font-weight:600; }
.document-flow-stage { margin-top:18px; padding:18px; border:1px solid var(--border); border-radius:16px; background:var(--surface,#fff); }
.document-flow-stage + .document-flow-stage { margin-top:14px; }
.document-flow-stage-head { display:flex; align-items:center; gap:10px; margin-bottom:13px; }
.document-flow-stage-head .stage-number { display:grid; place-items:center; flex:0 0 25px; width:25px; height:25px; border-radius:8px; background:var(--surface-subtle,#f1f5f9); color:var(--text-secondary); font-size:12px; font-weight:800; }
.document-flow-stage-head h3 { margin:0; font-size:15px; line-height:1.2; color:var(--text-primary); }
.document-flow-stage-head p { margin:3px 0 0; font-size:11px; color:var(--text-tertiary,#64748b); }
.simple-document-head { gap:8px; }
.simple-document-meta { display:flex; align-items:center; justify-content:flex-end; gap:5px; flex-wrap:wrap; }
.document-owner-pill { display:inline-flex; align-items:center; min-height:21px; padding:2px 7px; border-radius:999px; border:1px solid #c9d9ee; background:#edf4fc; color:#315b96; font-size:10px; font-weight:800; white-space:nowrap; }
.simple-document-card.owner-agency { position:relative; border-color:#cbd9eb; background:#f8fbff; }
.simple-document-card.owner-agency::before { content:""; position:absolute; left:-1px; top:11px; bottom:11px; width:3px; border-radius:0 3px 3px 0; background:#5b7eae; }
.utility-tool-card.owner-agency { border-color:#cbd9eb; background:#f8fbff; }
.safety-extra-details { margin-top:12px; border:1px solid var(--border); border-radius:13px; background:var(--surface-subtle,#fafbfc); overflow:hidden; }
.safety-extra-details > summary { list-style:none; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:11px 13px; }
.safety-extra-details > summary::-webkit-details-marker { display:none; }
.safety-extra-details > summary > span:first-child { display:flex; flex-direction:column; gap:2px; }
.safety-extra-details > summary strong { font-size:12px; color:var(--text-primary); }
.safety-extra-details > summary small { font-size:10px; color:var(--text-tertiary,#64748b); font-weight:500; }
.safety-extra-body { padding:0 12px 12px; }
.safety-extra-details[open] .safety-summary-toggle { transform:rotate(180deg); }
@media (max-width:720px) {
  .workflow-route { width:100%; justify-content:center; box-sizing:border-box; }
  .document-flow-stage { padding:14px; }
  .simple-document-meta { align-items:flex-end; }
}

/* v0.6.2 — 카드 메뉴판 → 한 줄 목록형 공사 작업대 */
.list-workbench-panel { max-width: 1080px; margin: 0 auto; }
.list-workbench-panel .document-first-title { align-items:flex-start; gap:20px; }
.list-workbench-panel .document-first-title h2 { margin-top:2px; }
.list-workbench-panel .document-first-title > div > p:last-child { max-width:620px; }

.document-list-toolbar {
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  margin:14px 0 8px; padding:9px 10px;
  border:1px solid var(--border); border-radius:12px; background:#f8fafc;
}
.document-view-toggle { display:inline-flex; gap:3px; padding:3px; border:1px solid #dce3eb; border-radius:10px; background:#fff; }
.document-view-toggle button {
  appearance:none; border:0; background:transparent; color:#64748b; cursor:pointer;
  min-height:32px; padding:6px 11px; border-radius:7px; font:inherit; font-size:12px; font-weight:750;
}
.document-view-toggle button:hover { background:#f4f7fa; color:#334155; }
.document-view-toggle button.active { background:#315b96; color:#fff; box-shadow:0 1px 2px rgba(30,58,95,.12); }
.document-filter-help { color:#718096; font-size:11px; line-height:1.4; }
.compact-workflow-route { margin:8px 0 12px; }

.document-list-stage {
  margin-top:12px; padding:0; overflow:hidden;
  border:1px solid #dfe5ec; border-radius:13px; background:#fff;
}
.document-list-stage + .document-list-stage { margin-top:10px; }
.document-list-stage .document-flow-stage-head {
  margin:0; padding:12px 14px; border-bottom:1px solid #e8edf2; background:#fbfcfd;
}
.document-list-stage .document-flow-stage-head .stage-number {
  flex-basis:23px; width:23px; height:23px; border-radius:7px; font-size:11px;
}
.document-list-stage .document-flow-stage-head h3 { font-size:14px; }
.document-list-stage .document-flow-stage-head p { margin-top:2px; font-size:11px; }
.document-list { display:block; }
.document-row {
  position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px;
  min-height:58px; padding:9px 12px 9px 15px; margin:0; border:0; border-bottom:1px solid #edf0f4;
  border-radius:0; background:#fff; box-shadow:none;
}
.document-row:last-child { border-bottom:0; }
.document-row:hover { background:#fbfcfd; }
.document-row.owner-agency { background:#f7faff; }
.document-row.owner-agency:hover { background:#f1f6fc; }
.document-row.owner-agency::before {
  content:""; position:absolute; left:0; top:9px; bottom:9px; width:3px; border-radius:0 3px 3px 0; background:#6b8db8;
}
.document-row-main { min-width:0; display:grid; gap:3px; }
.document-row-title-line { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-width:0; }
.document-row-title-line h4 { margin:0; color:#1f2937; font-size:13px; line-height:1.35; font-weight:760; letter-spacing:-.12px; }
.document-row-main > p { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#768395; font-size:11px; line-height:1.35; }
.document-row-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; flex-wrap:nowrap; }
.document-row .button.small.document-row-primary { min-height:31px; padding:5px 10px; border-radius:8px; font-size:11px; white-space:nowrap; }
.document-row-text-action {
  appearance:none; border:0; background:transparent; color:#68778a; cursor:pointer; padding:5px 2px;
  font:inherit; font-size:11px; font-weight:700; white-space:nowrap;
}
.document-row-text-action:hover { color:#315b96; text-decoration:underline; text-underline-offset:2px; }
.document-row .document-owner-pill { min-height:19px; padding:1px 6px; font-size:9px; }
.document-row .document-status-pill { min-height:19px; padding:1px 6px; font-size:9px; }
.document-row.needs-info .document-row-title-line h4 { color:#374151; }
.stage-empty .document-flow-stage-head { border-bottom:0; }
.stage-empty-note { padding:0 14px 12px 47px; color:#8a96a6; font-size:11px; background:#fbfcfd; }

.compact-safety-details { margin:0; border:0; border-top:1px solid #e8edf2; border-radius:0; background:#fbfcfd; }
.compact-safety-details > summary { min-height:45px; padding:9px 13px 9px 15px; }
.compact-safety-details > summary strong { font-size:12px; }
.compact-safety-details > summary small { font-size:10px; }
.compact-safety-details .safety-extra-body { padding:0; border-top:1px solid #edf0f4; background:#fff; }
.compact-safety-details .secondary-feature-details { margin:8px 12px 10px; }

.list-workbench-panel .batch-output-details,
.list-workbench-panel .oneclick-gap-panel,
.document-reference-details { margin-top:10px; border-radius:12px; }
.document-reference-details { border:1px solid var(--border); background:#fff; }
.document-reference-details > summary { cursor:pointer; padding:10px 13px; color:#607086; font-size:11px; font-weight:750; }
.document-reference-details .compact-reference { margin:0 12px 12px; }
.list-workbench-panel .document-footnote { margin-top:10px; font-size:10px; }

@media (max-width: 720px) {
  .document-list-toolbar { align-items:flex-start; flex-direction:column; }
  .document-filter-help { display:none; }
  .document-view-toggle { width:100%; }
  .document-view-toggle button { flex:1; }
  .document-row { grid-template-columns:minmax(0,1fr) auto; gap:8px; min-height:56px; padding:8px 9px 8px 13px; }
  .document-row-main > p { max-width:52vw; }
  .document-row-actions { gap:5px; }
  .document-row-text-action { display:none; }
  .document-row .button.small.document-row-primary { min-height:30px; padding:5px 8px; }
  .document-row-title-line { gap:4px; }
  .document-row-title-line h4 { font-size:12px; }
  .document-row .document-status-pill { display:none; }
  .document-list-stage .document-flow-stage-head { padding:10px 12px; }
  .stage-empty-note { padding-left:44px; }
}


/* v0.6.3 — 공사번호 자동부여 / 서류 가독성 / 기준자료 신뢰 카드 / 고해상도 아이콘 */
.current-project-number {
  display:inline-flex; align-items:center; min-height:23px; padding:2px 8px;
  border:1px solid #cbd9eb; border-radius:7px; background:#f3f7fc;
  color:#315b96; font-size:11.5px; font-weight:800; letter-spacing:.02em;
}
.project-number-field label { display:flex; align-items:center; gap:7px; }
.auto-number-badge {
  display:inline-flex; align-items:center; min-height:19px; padding:1px 6px;
  border-radius:999px; background:#eaf2fb; color:#315b96; font-size:9.5px; font-weight:800;
}
.project-number-input-wrap {
  display:flex; align-items:stretch; min-height:39px; overflow:hidden;
  border:1px solid var(--border); border-radius:9px; background:#fff;
}
.project-number-input-wrap:focus-within { border-color:#7fa2ce; box-shadow:0 0 0 3px rgba(49,91,150,.09); }
.project-number-prefix {
  display:flex; align-items:center; padding:0 0 0 11px; color:#315b96;
  background:#f7faff; font-size:13px; font-weight:800; letter-spacing:.02em;
}
.project-number-input-wrap input {
  width:82px; min-width:0; border:0!important; border-radius:0!important; box-shadow:none!important;
  padding-left:2px!important; color:#1f2937; font-weight:800; letter-spacing:.04em;
}
.project-number-input-wrap input.invalid { color:#b42318; background:#fff7f6; }
.project-number-error { display:block; margin-top:5px; color:#b42318; font-size:10.5px; line-height:1.4; }
.new-project-number-preview {
  display:flex; align-items:center; gap:8px; margin-top:14px; padding:10px 12px;
  border:1px solid #d7e3f2; border-radius:10px; background:#f7faff;
}
.new-project-number-preview span { color:#64748b; font-size:11px; font-weight:750; }
.new-project-number-preview strong { color:#214f86; font-size:14px; letter-spacing:.025em; }
.new-project-number-preview em {
  margin-left:auto; padding:2px 7px; border-radius:999px; background:#e4eef9;
  color:#315b96; font-size:9.5px; font-style:normal; font-weight:800;
}

/* 서류 작업대: 중복 단계표시를 제거한 뒤 본문을 바로 시작하고 글자 위계를 한 단계 키움 */
.list-workbench-panel .document-first-title h2 { font-size:28px; }
.list-workbench-panel .document-first-title > div > p:last-child { font-size:14.5px; line-height:1.55; }
.document-list-toolbar { margin-top:15px; margin-bottom:10px; padding:10px 11px; }
.document-view-toggle button { min-height:34px; padding:6px 12px; font-size:13px; }
.document-filter-help { font-size:12px; }
.document-list-stage { margin-top:11px; }
.document-list-stage .document-flow-stage-head { padding:13px 15px; }
.document-list-stage .document-flow-stage-head .stage-number { width:25px; height:25px; flex-basis:25px; font-size:11.5px; }
.document-list-stage .document-flow-stage-head h3 { font-size:15.5px; font-weight:800; }
.document-list-stage .document-flow-stage-head p { margin-top:3px; font-size:12px; line-height:1.4; }
.document-row { min-height:62px; padding:10px 13px 10px 16px; }
.document-row-title-line h4 { font-size:14px; line-height:1.4; font-weight:780; }
.document-row-main > p { font-size:12px; line-height:1.4; }
.document-row .button.small.document-row-primary { min-height:33px; padding:5px 11px; font-size:12px; }
.document-row-text-action { font-size:11.5px; }
.document-row .document-owner-pill, .document-row .document-status-pill { min-height:20px; padding:1px 6px; font-size:9.5px; }
.compact-safety-details > summary strong { font-size:13px; }
.compact-safety-details > summary small { font-size:11px; }

/* v0.6.5 — 기준자료를 서류 화면 최상단의 신뢰 배너로 이동 */
.document-reference-card {
  position:relative; overflow:hidden;
  margin:14px 0 12px; padding:16px 18px 15px 20px;
  border:1px solid #aec6e4; border-radius:13px;
  background:linear-gradient(135deg,#edf5ff 0%,#f7fbff 62%,#ffffff 100%);
  box-shadow:0 6px 18px rgba(49,91,150,.08);
}
.document-reference-card::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:#315b96;
}
.document-reference-card-top { margin-top:14px; }
.document-reference-content { min-width:0; }
.document-reference-kicker { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:7px; }
.document-reference-kicker span {
  display:inline-flex; align-items:center; min-height:23px; padding:2px 8px; border-radius:999px;
  background:#315b96; color:#fff; font-size:10.5px; font-weight:850; letter-spacing:.01em;
}
.document-reference-kicker em {
  display:inline-flex; align-items:center; min-height:23px; padding:2px 8px; border-radius:999px;
  background:#e5effb; color:#315b96; font-size:10.5px; font-style:normal; font-weight:850;
}
.document-reference-content > strong { display:block; color:#123b6d; font-size:15px; line-height:1.48; font-weight:850; }
.document-reference-content > p { margin:5px 0 0; color:#4b6480; font-size:12px; line-height:1.5; }
.list-workbench-panel .document-footnote { margin-top:9px; color:#718096; font-size:10.5px; line-height:1.45; }

@media (max-width:720px) {
  .current-meta { flex-wrap:wrap; }
  .list-workbench-panel .document-first-title h2 { font-size:25px; }
  .list-workbench-panel .document-first-title > div > p:last-child { font-size:13.5px; }
  .document-view-toggle button { font-size:12px; }
  .document-list-stage .document-flow-stage-head h3 { font-size:14.5px; }
  .document-list-stage .document-flow-stage-head p { font-size:11.5px; }
  .document-row-title-line h4 { font-size:13px; }
  .document-row-main > p { font-size:11.5px; max-width:55vw; }
  .document-row .button.small.document-row-primary { font-size:11.5px; }
  .document-reference-card { margin:12px 0 10px; padding:14px 14px 13px 17px; }
  .document-reference-content > strong { font-size:13.5px; }
  .document-reference-content > p { font-size:11.5px; }
}

/* v0.6.6 — 시작 화면 소개 문구에서 저장된 학교명 자동 노출 제거 */


/* v0.6.7 — 공사서류 컬러 역할 재정리 / 배지 개선 / 맨 위로 */
:root {
  --bg: #f7f7f6;
  --surface-soft: #fafafa;
  --line: #e3e6ea;
  --line-strong: #d2d7de;
  --border: var(--line);
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --surface-subtle: var(--surface-soft);
}
html, body { background: var(--bg); }
.detail-tabs { background: rgba(247,247,246,.96); }

/* 서류 작업대는 흰 바탕을 기본값으로 두고 파랑은 액션에 집중 */
.documents-panel.document-first-panel {
  border-color:#dde1e6;
  background:#fff;
  box-shadow:0 7px 24px rgba(28,36,48,.035);
}
.document-list-toolbar {
  border-color:#e2e5e9;
  background:#fafafa;
}
.document-list-stage {
  border-color:#e1e4e8;
  background:#fff;
}
.document-list-stage .document-flow-stage-head {
  border-bottom-color:#e8eaed;
  background:#fafafa;
}
.document-list-stage .document-flow-stage-head .stage-number {
  background:#eff1f3;
  color:#596575;
}
.document-row,
.document-row.owner-agency,
.document-row.owner-agency:hover { background:#fff; }
.document-row:hover { background:#fafafa; }
.document-row.owner-agency::before {
  top:11px;
  bottom:11px;
  width:3px;
  background:#9aa6b4;
}

/* 행정실은 분류 정보: 파랑 대신 중립 슬레이트 */
.document-owner-pill,
.document-row .document-owner-pill {
  border-color:#dce1e6;
  background:#f1f3f5;
  color:#566170;
  font-weight:800;
}
/* 중립 상태도 파랑 대신 회색. 상태색은 success/warn만 유지 */
.document-status-pill.neutral {
  background:#f1f3f5;
  color:#657180;
}
.document-status-pill.ready {
  background:#edf8f2;
  color:#26724f;
}
.document-status-pill.warn {
  background:#fff5de;
  color:#9a6612;
}

/* 미리보기는 보조 액션: 파란 면 채움 대신 얇은 테두리 */
.document-row .button.secondary.document-row-primary {
  background:#fff;
  border-color:#c8d5e4;
  color:#285487;
}
.document-row .button.secondary.document-row-primary:hover {
  background:#f6f9fc;
  border-color:#aebfd2;
}
.document-row .button.primary.document-row-primary {
  box-shadow:0 1px 2px rgba(37,73,121,.10);
}

/* 기준자료 = 배너가 아니라 신뢰 근거 카드 */
.document-reference-card {
  margin:14px 0 12px;
  padding:16px 18px 15px 20px;
  border-color:#d9e0e7;
  background:#fff;
  box-shadow:0 2px 8px rgba(28,44,69,.035);
}
.document-reference-card::before { background:#315b96; }
.document-reference-kicker span {
  background:#315b96;
  color:#fff;
}
.document-reference-kicker em {
  background:#eef2f6;
  color:#536579;
}
.document-reference-content > strong {
  color:#26384d;
  font-size:15.5px;
}
.document-reference-content > p {
  color:#667386;
  font-size:12.5px;
}

/* 선택 토글은 현재 위치를 알려주는 유일한 강한 파랑 중 하나 */
.document-view-toggle button.active {
  background:#315b96;
  color:#fff;
}
.document-filter-help { color:#7a8491; }

/* 긴 서류 화면용 빠른 이동 */
.scroll-top-button {
  position:fixed;
  right:max(20px, calc((100vw - var(--max)) / 2 + 18px));
  bottom:24px;
  z-index:18;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:46px;
  padding:0 15px;
  border:1px solid rgba(37,73,121,.16);
  border-radius:999px;
  background:#315b96;
  color:#fff;
  box-shadow:0 8px 24px rgba(30,58,95,.18);
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  transition:transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.scroll-top-button:hover { background:#254979; transform:translateY(-1px); box-shadow:0 10px 26px rgba(30,58,95,.22); }
.scroll-top-button:focus-visible { outline:3px solid rgba(49,91,150,.20); outline-offset:3px; }
.scroll-top-button[hidden] { display:none !important; }

@media (max-width:720px) {
  .scroll-top-button { right:14px; bottom:16px; min-height:44px; padding:0 13px; font-size:12px; }
  .document-reference-content > strong { font-size:14px; }
  .document-reference-content > p { font-size:12px; }
}


/* v0.6.8 — 관내여비 콕검 톤으로 재정렬: 선명한 블루 복귀 / 소프트 블루 배지 / 카드 표면 개선 */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f3f6fb;
  --line: #e1e6ef;
  --line-strong: #cfd7e5;
  --border: var(--line);
  --text: #1c2434;
  --muted: #667085;
  --muted-2: #8791a4;
  --primary: #3159d8;
  --primary-strong: #2446b5;
  --primary-soft: #eef2ff;
  --shadow: 0 14px 40px rgba(32, 43, 69, 0.07);
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --surface-subtle: #fbfcff;
}
html, body { background: var(--bg); }
.topbar,
.detail-tabs { background: rgba(255,255,255,.96); }
.main { padding-top: 30px; }
.brand-mark,
.primary-start .start-step,
.document-view-toggle button.active,
.scroll-top-button,
.document-reference-kicker span,
.current-project-number,
.button.primary,
.workflow-route .route-current,
.new-project-number-preview em { background: var(--primary); }
.button.primary,
.scroll-top-button { box-shadow: 0 8px 20px rgba(49, 89, 216, .18); }
.button.primary:hover,
.scroll-top-button:hover,
.document-view-toggle button.active:hover { background: var(--primary-strong); }
.button.secondary {
  background: var(--primary-soft);
  border-color: transparent;
  color: var(--primary);
}
.button.secondary:hover { background: #e3e9ff; border-color: transparent; }
.button.ghost:hover { background: #f0f4fa; }
input:focus, select:focus, textarea:focus {
  border-color: #7f96ea;
  box-shadow: 0 0 0 3px rgba(49,89,216,.10);
}
.hero h1,
.current-project h1,
.document-first-title h2,
.document-reference-content > strong { color: #172033; }
.eyebrow,
.document-row-text-action:hover,
.workflow-route,
.route-active,
.route-strong,
.project-number-prefix,
.auto-number-badge,
.new-project-number-preview strong { color: var(--primary); }
.start-card {
  border-color: var(--line);
  box-shadow: 0 4px 18px rgba(28,36,52,.03);
}
.start-card:hover { border-color: #bfd0ff; box-shadow: 0 10px 24px rgba(49,89,216,.09); }
.start-card.primary-start {
  border-color: #ced8ff;
  background: linear-gradient(180deg,#ffffff 0%,#f7f9ff 100%);
}
.start-step { background: var(--primary-soft); color: var(--primary); }
.primary-start .start-step { color:#fff; }
.project-number-input-wrap:focus-within { border-color:#7f96ea; box-shadow:0 0 0 3px rgba(49,89,216,.10); }
.project-number-prefix,
.current-project-number,
.new-project-number-preview,
.document-reference-kicker em,
.document-owner-pill,
.document-row .document-owner-pill {
  border-color: #d8e1fb;
}
.current-project-number,
.project-number-prefix,
.new-project-number-preview,
.document-reference-kicker em,
.document-owner-pill,
.document-row .document-owner-pill,
.document-status-pill.neutral {
  background: var(--primary-soft);
  color: var(--primary);
}
.documents-panel.document-first-panel,
.document-list-stage,
.document-reference-card {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.document-list-toolbar {
  border-color: var(--line);
  background: #fbfcff;
  border-radius: 14px;
}
.document-view-toggle {
  border-color: #dbe3f1;
  background: #fff;
}
.document-view-toggle button {
  min-height: 34px;
  padding: 6px 12px;
  color: #667085;
}
.document-view-toggle button:hover { background: #f2f6ff; color: var(--primary); }
.document-list-stage {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
}
.document-list-stage .document-flow-stage-head {
  padding: 14px 16px;
  border-bottom-color: #e9edf4;
  background: #fcfdff;
}
.document-list-stage .document-flow-stage-head .stage-number {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 850;
}
.document-list-stage .document-flow-stage-head h3 {
  font-size: 16px;
  color: #172033;
}
.document-list-stage .document-flow-stage-head p {
  color: #7a8597;
}
.document-filter-help { color: #768195; }
.document-row,
.document-row.owner-agency,
.document-row.owner-agency:hover {
  background: #fff;
}
.document-row {
  min-height: 64px;
  padding: 10px 14px 10px 16px;
  border-bottom-color: #edf1f6;
}
.document-row:hover { background: #fbfcff; }
.document-row.owner-agency::before {
  top: 11px;
  bottom: 11px;
  width: 3px;
  background: #aac2ff;
}
.document-row-title-line h4 {
  color: #1f2a3d;
  font-size: 14px;
  font-weight: 780;
}
.document-row-main > p { color: #748094; }
.document-owner-pill,
.document-row .document-owner-pill {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 850;
}
.document-status-pill.ready {
  background: #eaf8f1;
  color: #21855a;
}
.document-status-pill.warn {
  background: #fff5df;
  color: #a95f00;
}
.document-row .button.secondary.document-row-primary {
  background: var(--primary-soft);
  border-color: transparent;
  color: var(--primary);
}
.document-row .button.secondary.document-row-primary:hover {
  background: #e3e9ff;
  border-color: transparent;
}
.document-row .button.primary.document-row-primary {
  background: var(--primary);
  box-shadow: 0 7px 16px rgba(49,89,216,.15);
}
.document-reference-card {
  margin: 15px 0 13px;
  padding: 18px 20px 17px 22px;
  border-color: #dfe6f2;
  border-radius: 16px;
  background: linear-gradient(180deg,#ffffff 0%,#fcfdff 100%);
  box-shadow: var(--shadow);
}
.document-reference-card::before { background: var(--primary); }
.document-reference-kicker { gap: 9px; margin-bottom: 8px; }
.document-reference-kicker span,
.document-reference-kicker em {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 850;
}
.document-reference-kicker span { color:#fff; }
.document-reference-kicker em {
  background: var(--primary-soft);
  color: var(--primary);
}
.document-reference-content > strong {
  color: #172033;
  font-size: 16px;
  letter-spacing: -.02em;
}
.document-reference-content > p {
  margin-top: 6px;
  color: #667085;
  font-size: 12.5px;
}
.stage-empty-note { background: #fcfdff; }
.scroll-top-button {
  border: 0;
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(49,89,216,.24);
}
.scroll-top-button:hover { background: var(--primary-strong); }

@media (max-width: 720px) {
  .document-reference-card {
    padding: 15px 14px 14px 17px;
  }
  .document-reference-content > strong { font-size: 14px; }
  .document-list-stage .document-flow-stage-head h3 { font-size: 15px; }
}

/* v0.6.9 — 공사 목록은 전체를 기본으로, 상태별 건수로 존재감 즉시 확인 */
.project-status-filter .filter-count {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  margin-left:4px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(102,112,133,.10);
  color:#667085;
  font-size:10.5px;
  font-weight:850;
  line-height:1;
}
.project-status-filter button.active .filter-count {
  background:rgba(255,255,255,.24);
  color:inherit;
}
.recent-projects-title strong { color:#172033; }
.recent-projects-title span { color:#7a8597; }
