* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Malgun Gothic", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  color: #111;
  background: #fff;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

#layout { min-height: 100vh; display: flex; }
#sidebar {
  width: 240px;
  min-width: 240px;
  min-height: 100vh;
  border-right: 1px solid #aaa;
  background: #f2f2f2;
  display: flex;
  flex-direction: column;
}
.sidebar-title {
  padding: 14px 10px;
  font-weight: bold;
  border-bottom: 1px solid #aaa;
  background: #e7e7e7;
}
.nav-item, .project-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #d4d4d4;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  color: #111;
}
.nav-item:hover, .project-item:hover { background: #e2e2e2; }
.nav-item.active, .project-item.active { background: #cfe4f7; }
.project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 8px 6px 10px;
  font-weight: bold;
  border-bottom: 1px solid #ccc;
}
.project-heading button {
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
}
#projectList { overflow-y: auto; }
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #aaa;
  padding: 8px;
  display: grid;
  gap: 6px;
}
.sidebar-bottom button, .file-label {
  width: 100%;
  text-align: center;
  border: 1px solid #999;
  background: #eee;
  padding: 6px;
  color: #111;
}
.file-label { display: block; cursor: pointer; }
.file-label input { display: none; }

#main {
  flex: 1;
  min-width: 0;
  padding: 18px 22px 40px;
  overflow-x: auto;
}
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 18px 0 8px; }
p { margin: 6px 0; }

fieldset {
  border: 1px solid #999;
  padding: 12px;
  margin: 0 0 14px;
  /* 기본값(min-content)이면 넓은 표가 화면 전체를 밀어내므로, 표는 .table-wrap 안에서 스크롤한다. */
  min-width: 0;
}
legend { padding: 0 5px; font-weight: bold; }
.form-grid {
  display: grid;
  grid-template-columns: 150px minmax(180px, 340px) 150px minmax(180px, 340px);
  gap: 8px 10px;
  align-items: center;
}
.form-grid label { text-align: right; }
input[type="text"], input[type="number"], input[type="date"], input[type="url"], input[type="search"], select, textarea {
  border: 1px solid #888;
  background: #fff;
  padding: 4px 5px;
  min-height: 27px;
  border-radius: 0;
}
input[type="number"] { text-align: right; }
input[readonly] { background: #eee; }
textarea { width: 100%; min-height: 65px; resize: vertical; }
.inline { display: flex; align-items: center; gap: 5px; }
.inline input, .inline select { flex: 1; min-width: 0; }
.help { color: #555; font-size: 12px; }
.error-text { color: #b00020; font-weight: bold; }
.ok-text { color: #075a07; }

.school-lookup-grid {
  display: grid;
  grid-template-columns: 150px minmax(240px, 1fr);
  gap: 8px 10px;
  align-items: center;
  max-width: 760px;
}
.school-lookup-grid > label { text-align: right; }
.school-search-controls { display: flex; gap: 6px; min-width: 0; }
.school-search-controls input { flex: 1; min-width: 0; }
.school-search-results {
  display: grid;
  gap: 4px;
  max-width: 760px;
  margin-top: 8px;
}
.school-search-results:empty { display: none; }
.school-search-result {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  text-align: left;
  background: #fff;
}
.school-search-result small { color: #555; }
.school-info-lookup {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  gap: 6px;
  margin: 8px 0;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar .spacer { flex: 1; }
button, .button-like {
  border: 1px solid #888;
  background: #eee;
  color: #111;
  padding: 5px 9px;
  border-radius: 0;
}
button:hover, .button-like:hover { background: #ddd; }
button:disabled { color: #888; cursor: default; background: #eee; }
button.danger { color: #8b0000; }

.table-wrap { overflow-x: auto; border: 1px solid #999; }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
table.compact-table { min-width: 640px; }
th, td {
  border-right: 1px solid #bbb;
  border-bottom: 1px solid #bbb;
  padding: 5px 6px;
  vertical-align: middle;
  white-space: nowrap;
}
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
th { background: #e9e9e9; text-align: center; font-weight: normal; }
td.number { text-align: right; }
td.center { text-align: center; }
table input, table select { width: 100%; min-width: 80px; }
table input[type="text"] { min-width: 150px; }
.small-button { padding: 2px 6px; min-width: 26px; }

.summary-table { min-width: 620px; max-width: 850px; }
.summary-table th { width: 220px; text-align: left; }
.summary-table td { text-align: right; }
.summary-table tr.total th, .summary-table tr.total td { font-weight: bold; background: #f4f4f4; }

.status-box {
  border: 1px solid #999;
  background: #fafafa;
  padding: 8px 10px;
  margin: 8px 0 14px;
}
.status-box ul { margin: 5px 0 0 20px; padding: 0; }

.empty {
  border: 1px solid #bbb;
  padding: 16px;
  background: #fafafa;
}
.page-actions { margin-top: 14px; display: flex; gap: 6px; }

#message {
  position: fixed;
  bottom: 14px;
  right: 14px;
  border: 1px solid #777;
  background: #ffffe1;
  padding: 7px 10px;
  display: none;
  z-index: 20;
}
#message.show { display: block; }

@media (max-width: 900px) {
  #sidebar { width: 200px; min-width: 200px; }
  #main { padding: 14px; }
  .form-grid { grid-template-columns: 130px minmax(180px, 1fr); }
  .form-grid label { text-align: left; }
  .school-lookup-grid { grid-template-columns: 130px minmax(180px, 1fr); }
  .school-lookup-grid > label { text-align: left; }
}

@media (max-width: 650px) {
  #layout { display: block; }
  #sidebar { width: 100%; min-width: 0; min-height: auto; border-right: 0; border-bottom: 1px solid #999; }
  .sidebar-bottom { margin-top: 0; }
  .school-lookup-grid { grid-template-columns: 1fr; }
  .school-search-controls { flex-direction: column; }
}

@media print {
  #sidebar, .toolbar button, .page-actions, #message { display: none !important; }
  #main { padding: 0; }
  fieldset { break-inside: avoid; }
}

.section-fieldset { position: relative; }
.section-fieldset:has(> .section-save) { padding-top: 40px; }
.section-save {
  position: absolute;
  top: 7px;
  right: 10px;
}

.section-note {
  margin: 0 0 10px;
  padding: 7px 9px;
  border: 1px solid #c5c5c5;
  background: #eee;
  color: #444;
}
.report-text {
  margin-top: 12px;
  padding: 8px 10px;
  border-top: 1px solid #bbb;
  background: #fafafa;
  line-height: 1.7;
}
.report-text p { margin: 2px 0; }
.input-with-option {
  display: flex;
  align-items: center;
  gap: 10px;
}
.input-with-option > input[type="number"] {
  flex: 1;
  min-width: 120px;
}
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  text-align: left !important;
}
.check-label input { margin: 0; }

.expense-guide p { margin: 2px 0; }
.expense-actions {
  white-space: nowrap;
  text-align: center;
}
.expense-actions button { margin: 1px; }

.fixed-cost-block { margin-bottom: 14px; }
.fixed-cost-table td small { display: block; color: #666; font-size: 11px; white-space: normal; min-width: 180px; max-width: 260px; margin-left: auto; }
.fixed-cost-table input[type="text"] { width: 100%; }
.fixed-cost-mode { display: flex; flex-direction: column; gap: 3px; }
.fixed-cost-mode .check-label { font-size: 12px; }
.fixed-cost-mode .check-label input, .budget-checklist input[type="checkbox"] { width: auto; min-width: 0; }
.fixed-cost-mode label:has(input:disabled) { color: #999; }
.expense-section h3 { margin: 6px 0; font-size: 15px; }
.expense-section h3 .help { font-weight: normal; margin-left: 6px; }

.checkbox-label { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.schedule-source { margin: 0 0 8px; color: #075a07; font-size: 13px; }
.address-cell { display: flex; gap: 4px; }
.address-cell input { flex: 1; min-width: 0; }

.place-search-dialog { width: min(560px, calc(100vw - 32px)); border: 1px solid #888; padding: 14px 16px; }
.place-search-dialog h2 { margin: 0 0 10px; font-size: 17px; }
.place-search-controls { display: flex; gap: 6px; }
.place-search-controls input { flex: 1; min-width: 0; }
.place-search-results { list-style: none; margin: 8px 0; padding: 0; max-height: 50vh; overflow-y: auto; display: grid; gap: 4px; }
.place-search-result { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; gap: 2px; }
.place-search-result small { color: #555; }
.place-search-actions { text-align: right; }

@media (max-width: 900px) {
  .checkbox-label { justify-content: flex-start; }
}

.project-group { border-bottom: 1px solid #d4d4d4; }
.project-row { display: flex; align-items: stretch; }
.project-row > .project-item { flex: 1; min-width: 0; border-bottom: 0; overflow-wrap: anywhere; }
.project-row.active, .project-row:has(> .project-item.active) { background: #cfe4f7; }
.project-delete {
  border: 0;
  background: transparent;
  color: #777;
  padding: 0 10px;
  font-size: 16px;
}
.project-delete:hover { background: #f2d4d4; color: #b00020; }
.project-copy { border: 0; background: transparent; color: #555; padding: 0 6px; font-size: 12px; }
.project-copy:hover { background: #dde8f3; color: #1f4f7a; }
/* 다른 학년과 함께 계산 */
.shared-count { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.shared-summary { font-size: 12px; color: #1f4f7a; }
.shared-panel-row td { background: #f3f8fc; }
.shared-panel { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 28px; padding: 6px 4px; }
.shared-option h4 { margin: 0 0 6px; font-size: 13px; }
.shared-candidates { list-style: none; margin: 0 0 6px; padding: 0; }
.shared-candidates li { padding: 2px 0; }
.shared-candidates input { width: auto; min-width: 0; }
.shared-candidates small { color: #555; }
.shared-close { margin-left: auto; }
.inline-check { justify-content: flex-start; white-space: nowrap; }
tr.shared-row > th, tr.shared-row > td { background: #fff4dc; }
.shared-badge { display: block; margin-top: 4px; padding: 2px 4px; border-radius: 3px; background: #f5d58a; color: #5a3d00; font-size: 11px; font-weight: bold; white-space: normal; }
.project-submenu {
  border-top: 1px solid #d4d4d4;
  background: #f8f8f8;
  padding: 3px 0;
}
.project-subitem {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #222;
  text-align: left;
  padding: 6px 10px 6px 26px;
}
.project-subitem:hover { background: #e8e8e8; }
.project-subitem.active {
  background: #ddd;
  font-weight: bold;
}
.section-output { margin: 0 0 18px; }

@media print {
  .project-submenu { display: none !important; }
}

.workflow-page { max-width: 1500px; }
.workflow-fieldset { margin-bottom: 16px; }
.workflow-fieldset > legend { font-size: 15px; }
.workflow-status-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0 16px;
}
.workflow-status-cards > div, .finance-summary-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid #aab3bd;
  background: #f7f9fb;
  padding: 9px 11px;
}
.workflow-status-cards span, .finance-summary-grid strong { color: #4a5562; font-size: 12px; font-weight: normal; }
.workflow-status-cards strong, .finance-summary-grid span { font-size: 16px; }
.workflow-status-cards small { color: #555; }
.workflow-business-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 9px 14px;
}
.workflow-business-grid label, .resource-main-row label, .resource-limit-grid label, .workflow-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.workflow-business-grid .wide-field { grid-column: span 2; }
.workflow-count-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px 12px;
  max-width: 1050px;
}
.workflow-count-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; }
.workflow-count-group h3 { margin-top: 4px; }
.workflow-count-grid input { width: 100%; }
.workflow-derived { margin-top: 12px; padding: 8px; border-top: 1px solid #bbb; font-weight: bold; }
.workflow-page h2 { margin-top: 18px; }
.workflow-page h3 { margin: 14px 0 6px; font-size: 14px; }
.workflow-table-wrap { margin: 8px 0; }
.workflow-cost-table { min-width: 1130px; }
.workflow-cost-table td:first-child { min-width: 150px; white-space: normal; }
.workflow-cost-table td small { display: block; color: #777; font-size: 10px; }
.workflow-cost-table input, .workflow-cost-table select { min-width: 100px; }
.workflow-cost-table .compact-number { min-width: 75px; margin-top: 3px; }
.custom-cohort-grid { display: grid; grid-template-columns: repeat(5, minmax(115px, 1fr)); gap: 8px; }
.custom-cohort-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; }
.custom-cohort-grid input { min-width: 80px; }
.custom-cohort-row td { background: #f7f9fb; }
.resource-list { display: grid; gap: 10px; }
.resource-card { border: 1px solid #aab3bd; padding: 10px; background: #fafbfd; }
.resource-main-row { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) minmax(150px, 1fr) 100px auto auto; gap: 9px; align-items: end; }
.resource-sub-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 13px; margin-top: 8px; }
.resource-sub-row strong { min-width: 92px; font-size: 12px; }
.mini-check { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mini-check input { margin: 0; }
.resource-limit-grid { display: grid; grid-template-columns: repeat(5, minmax(145px, 1fr)); gap: 8px; margin-top: 10px; }
.resource-limit-grid label, .resource-actual { font-size: 11px; color: #4b5561; }
.resource-actual { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.resource-actual input { max-width: 180px; }
.finance-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 8px; margin-top: 12px; }
.workflow-confirm-row { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 10px; border: 1px solid #b5bfca; background: #f7f9fb; }
.workflow-confirm-row label { display: flex; flex-direction: column; gap: 4px; min-width: 260px; }
.proposal-reference { margin: 12px 0; padding: 10px; border: 1px solid #aab3bd; background: #fafbfd; }
.proposal-reference .workflow-business-grid { margin: 8px 0; }
.proposal-reference input { width: 100%; }
.workflow-review-columns { display: grid; grid-template-columns: minmax(400px, 1.3fr) minmax(300px, 1fr); gap: 18px; }
.workflow-print-heading, .workflow-print-only { display: none; }
.reconciliation-table td { white-space: normal; }
.delta { color: #8b0000; }

@media (max-width: 900px) {
  .workflow-count-sections { grid-template-columns: 1fr; }
  .workflow-count-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .workflow-business-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .resource-limit-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .workflow-review-columns { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .workflow-status-cards { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .workflow-business-grid { grid-template-columns: 1fr; }
  .workflow-business-grid .wide-field { grid-column: auto; }
  .workflow-count-grid { grid-template-columns: repeat(2, minmax(125px, 1fr)); }
  .finance-summary-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .resource-main-row { grid-template-columns: 1fr 1fr; }
  .resource-limit-grid { grid-template-columns: 1fr 1fr; }
  .custom-cohort-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

@media print {
  @page { size: A4 landscape; margin: 9mm; }
  html, body, #layout, #main { height: auto; min-height: 0; background: #fff; }
  #main { padding: 0; overflow: visible; }
  .workflow-page > *:not(.workflow-print-only) { display: none !important; }
  .workflow-print-only { display: block !important; font-size: 9pt; }
  .workflow-print-only h1 { font-size: 16pt; margin-bottom: 8pt; }
  .workflow-print-only h2 { margin: 10pt 0 4pt; font-size: 11pt; break-after: avoid; }
  .workflow-print-only p { margin: 4pt 0; }
  .workflow-print-only table { min-width: 0; width: 100%; table-layout: fixed; font-size: 8pt; }
  .workflow-print-only th, .workflow-print-only td { padding: 3pt; white-space: normal; overflow-wrap: anywhere; }
  .workflow-print-only thead { display: table-header-group; }
  .workflow-print-only tr { break-inside: avoid; }
  .print-meta { margin-bottom: 8pt; }
  .print-meta th { width: 12%; }
  .print-meta td { width: 38%; }
}

/* 예산 */
.budget-group { margin-bottom: 16px; }
.budget-group h3 { margin: 4px 0 8px; font-size: 15px; }
.budget-group-head { display: flex; align-items: center; gap: 10px; }
.budget-rows { display: grid; gap: 6px; }
.budget-row {
  display: grid;
  grid-template-columns: 170px minmax(220px, 340px) minmax(160px, 1fr);
  gap: 8px;
  align-items: center;
}
.budget-row > label { text-align: right; }
.budget-row > label small { display: block; color: #666; font-size: 11px; font-weight: normal; }
.budget-amount { display: flex; align-items: center; gap: 6px; }
.budget-amount input[type="number"] { flex: 1; min-width: 0; }
.budget-amount .check-label { white-space: nowrap; }
.budget-memo { width: 100%; }
.other-support-table input[type="text"], .other-support-table input[type="number"] { width: 100%; }
@media (max-width: 900px) {
  .budget-row { grid-template-columns: 1fr; }
  .budget-row > label { text-align: left; }
}

/* 시행 전 데이터 보기 */
.sheet-table th[scope="row"] { background: #f4f4f4; font-weight: normal; vertical-align: middle; }
.sheet-table tfoot th, .sheet-table tfoot td,
.proposal-table tfoot th, .proposal-table tfoot td { font-weight: bold; background: #f4f4f4; }

/* 품의 도우미 */
.warn-text { color: #9a5b00; font-weight: bold; }
.proposal-table th[scope="rowgroup"] { background: #f4f4f4; vertical-align: middle; white-space: normal; min-width: 120px; }
.proposal-table .proposal-item { padding-left: 22px; color: #333; }
.proposal-table .proposal-item small { color: #777; }
.proposal-table tr.subtotal td { font-weight: bold; background: #fafafa; }
.proposal-table tbody.proposal-block { border-top: 2px solid #999; }
.proposal-steps { margin: 0 0 8px; padding-left: 22px; line-height: 1.8; }
.proposal-notes { margin: 0; padding-left: 18px; color: #444; line-height: 1.7; }

.proposal-howto { border: 1px solid #b9cfe4; background: #f1f7fc; padding: 10px 14px; margin-bottom: 12px; }
.proposal-howto ol { margin: 6px 0 0; padding-left: 20px; line-height: 1.7; }
.proposal-progress { border: 1px solid #ccc; padding: 8px 12px; margin: 0 0 12px; }
.proposal-progress p { margin: 0 0 6px; }
.proposal-progress.done { border-color: #9cc59c; background: #f0f8f0; color: #075a07; font-weight: bold; }
.proposal-progress.warn { border-color: #e2c48a; background: #fffaf0; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { border: 1px solid #d9c49a; background: #fff; padding: 2px 8px; border-radius: 12px; font-size: 12px; }
.budget-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 14px; }
.budget-card { border: 1px solid #999; background: #fff; display: flex; flex-direction: column; }
.budget-card.vulnerable { border-color: #8fb3d6; }
.budget-card header { padding: 8px 12px; background: #f4f4f4; border-bottom: 1px solid #ccc; }
.budget-card.vulnerable header { background: #eaf2fa; }
.budget-card header h3 { margin: 0; font-size: 15px; }
.budget-card header p { margin: 2px 0 0; color: #555; font-size: 12px; }
.meter { height: 8px; background: #e6e6e6; margin: 10px 12px 0; }
.meter span { display: block; height: 100%; background: #3d7ab8; }
.budget-card-usage { margin: 4px 12px 6px; font-size: 12px; color: #444; }
.budget-checklist { list-style: none; margin: 0; padding: 4px 12px; flex: 1; }
.budget-checklist li { border-bottom: 1px dotted #ddd; padding: 4px 0; }
.budget-checklist li:last-child { border-bottom: 0; }
.budget-checklist label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.budget-checklist .item-name { flex: 1; }
.budget-checklist .item-amount { color: #333; white-space: nowrap; }
.budget-checklist li.checked .item-name, .budget-checklist li.checked .item-amount { font-weight: bold; }
.budget-checklist li.disabled { color: #999; }
.budget-checklist li.disabled label { cursor: default; }
.budget-checklist .item-note { margin: 2px 0 0 22px; font-size: 12px; }
.budget-card > .help { margin: 0 12px 6px; }
.budget-card footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid #ddd; background: #fafafa; font-size: 13px; }
.proposal-table tfoot tr.unassigned th, .proposal-table tfoot tr.unassigned td { color: #9a5b00; background: #fffaf0; }

.block-head { display: flex; align-items: center; gap: 10px; }
.block-head h3 { margin: 6px 0; }
.fixed-cost-table tr.auto-row th, .fixed-cost-table tr.auto-row td { background: #f7f7f7; font-weight: normal; }

/* 품의 도우미: 카드 머리의 메모·지원 금액 */
.budget-card .budget-memo-text { margin: 2px 0 0; color: #3b5b7a; font-size: 12px; white-space: pre-wrap; }
.budget-setting { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 13px; flex-wrap: wrap; }
.budget-setting input { width: 110px; min-width: 0; }
.budget-setting small { color: #666; }
.budget-full-note { margin: 4px 12px 0; padding: 4px 8px; background: #fff4e0; color: #7a4a00; font-size: 12px; }
.budget-card.is-full .meter span { background: #2f8a3a; }
.card-actions { display: flex; gap: 4px; }

/* 정산 서식 도우미 */
.settlement-warnings { margin: 0 0 10px; padding: 8px 12px 8px 28px; border: 1px solid #e2c48a; background: #fffaf0; line-height: 1.7; }
.settlement-remarks { border: 1px solid #bbb; background: #fafafa; padding: 10px 12px; white-space: pre-wrap; font-family: inherit; margin: 6px 0; }
.budget-card footer { flex-wrap: wrap; }
.card-actions .small-button { white-space: nowrap; }

/* 날짜별 색 구분(일정·체험처 표 공통) */
.day-tone-0 { --day-tone: #e8f1fb; --day-tone-strong: #3d7ab8; }
.day-tone-1 { --day-tone: #eaf6ea; --day-tone-strong: #3f8f4a; }
.day-tone-2 { --day-tone: #fdf1e3; --day-tone-strong: #c07a1c; }
.day-tone-3 { --day-tone: #f3ecfa; --day-tone-strong: #7b55a8; }
.day-tone-4 { --day-tone: #fbe9ee; --day-tone-strong: #b34a66; }
tr[class*="day-tone-"] > td { background: var(--day-tone); }
tr[class*="day-tone-"] > td:first-child { box-shadow: inset 4px 0 0 var(--day-tone-strong); }

.schedule-view-table tbody.schedule-day tr.schedule-day-head th {
  text-align: left; background: var(--day-tone-strong, #666); color: #fff; padding: 6px 10px; font-size: 14px;
}
.schedule-view-table tbody.schedule-day td { background: var(--day-tone, #fff); white-space: normal; }
.schedule-view-table .schedule-time { white-space: nowrap; color: #333; width: 120px; }
.schedule-view-table .schedule-name { font-weight: bold; }
.schedule-empty { color: #666; padding: 10px 0; }

/* 체험처 기초자료 점검 */
.expense-checks { margin: 10px 0 0; color: #b00020; }
.expense-checks.ok-text { color: #075a07; }
.expense-checks ul { margin: 4px 0 0; padding-left: 20px; line-height: 1.7; }

/* 정산 참고 */
.settlement-basics { font-weight: bold; margin: 6px 0 10px; }
.ref-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 12px; }
.ref-card { border: 1px solid #bbb; background: #fff; padding: 10px 14px; margin-bottom: 12px; }
.ref-cards .ref-card { margin-bottom: 0; }
.ref-card h3 { margin: 0 0 8px; font-size: 15px; border-bottom: 1px solid #ddd; padding-bottom: 6px; }
.ref-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 4px 0; }
.ref-item .ref-value { text-align: right; font-variant-numeric: tabular-nums; }
.ref-item .ref-note { grid-column: 1 / -1; color: #666; font-size: 12px; }
.ref-item.strong .ref-label, .ref-item.strong .ref-value { font-weight: bold; }
.ref-item.strong .ref-value { font-size: 16px; }

/* 저장 버튼: 저장하지 않은 변경이 있으면 눈에 띄게 */
.block-head .spacer { flex: 1; }
.save-all-bar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 0 0 10px; }
.save-all-bar .unsaved-note { display: none; color: #b03a2e; font-size: 13px; font-weight: bold; }
.save-button { font-weight: bold; }
.has-unsaved .save-all-bar .unsaved-note { display: inline; }
.has-unsaved .save-button { background: #c0392b; border-color: #962d22; color: #fff; }
.has-unsaved .save-button:hover { background: #a93226; }

/* 품의 도우미: 신청 후 불참 공통비와 계산식 */
.budget-checklist-head { margin: 6px 12px 0; padding-top: 6px; border-top: 1px solid #ddd; font-size: 13px; color: #7a4a00; }
.absent-checklist { flex: 0; }
.budget-formula { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-left: auto; }
input.headcount-input { width: 80px; min-width: 0; }
.headcount-summary { align-self: center; font-weight: bold; }

/* 예산별 품의 내용: 예산마다 색, 합계 강조, 나눈 항목은 같은 색 */
.proposal-table thead th { background: #3b4a5a; color: #fff; }
.proposal-table tr.proposal-head td { font-weight: bold; }
.proposal-table tbody.tone-education th[scope="rowgroup"] { background: #d6e6f7; color: #1f4f7a; }
.proposal-table tbody.tone-education tr.proposal-head td { background: #f1f6fc; }
.proposal-table tbody.tone-education tr.subtotal td { background: #d6e6f7; color: #1f4f7a; }
.proposal-table tbody.tone-other th[scope="rowgroup"] { background: #d8efd9; color: #2f6b35; }
.proposal-table tbody.tone-other tr.proposal-head td { background: #f1f9f1; }
.proposal-table tbody.tone-other tr.subtotal td { background: #d8efd9; color: #2f6b35; }
.proposal-table tbody.tone-student th[scope="rowgroup"] { background: #fbe3c6; color: #8a4b00; }
.proposal-table tbody.tone-student tr.proposal-head td { background: #fdf4e8; }
.proposal-table tbody.tone-student tr.subtotal td { background: #fbe3c6; color: #8a4b00; }
.proposal-table tr.subtotal td { font-size: 14px; }
.proposal-table tfoot tr.total th, .proposal-table tfoot tr.total td { background: #3b4a5a; color: #fff; font-size: 15px; }
.proposal-table tr.split-row td { font-weight: bold; }
.proposal-table tr.split-row td:first-child { border-left: 5px solid var(--split-strong); }
.proposal-table tr.split-row td { background: var(--split); }
.split-0 { --split: #fff1a8; --split-strong: #d4a800; }
.split-1 { --split: #d5f0ff; --split-strong: #2a8fc9; }
.split-2 { --split: #f8d9f0; --split-strong: #b83f98; }
.split-3 { --split: #dcf5cf; --split-strong: #4c9a2a; }
.split-4 { --split: #ffe0cc; --split-strong: #d0671f; }
.split-5 { --split: #e4dcfb; --split-strong: #6a4fc4; }
.proposal-table .split-tag { color: #333 !important; font-weight: bold; }
.split-legend { margin: 6px 0 0; font-size: 12px; color: #555; }
@media print {
  .proposal-table tr.split-row td, .proposal-table th, .proposal-table td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 검증 도우미 */
.verify-summary { margin: 0 0 12px; padding: 8px 12px; border: 1px solid; font-weight: bold; }
.verify-summary.ok { background: #eaf6ea; border-color: #8cc58f; color: #1f5a24; }
.verify-summary.warn { background: #fff7e0; border-color: #e2c48a; color: #7a4a00; }
.verify-summary.fail { background: #fdecea; border-color: #e0a19a; color: #8b1a10; }
.verify-cards { display: grid; gap: 10px; }
.verify-card { border: 1px solid #ccc; border-left: 6px solid #999; background: #fff; padding: 8px 12px; }
.verify-card.ok { border-left-color: #2f8a3a; }
.verify-card.warn { border-left-color: #d49a00; }
.verify-card.fail { border-left-color: #c0392b; background: #fffafa; }
.verify-card.skip { border-left-color: #bbb; color: #777; }
.verify-card header { display: flex; align-items: center; gap: 8px; }
.verify-card h3 { margin: 0; font-size: 15px; flex: 1; }
.verify-badge { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: bold; font-size: 13px; background: #999; }
.verify-card.ok .verify-badge { background: #2f8a3a; }
.verify-card.warn .verify-badge { background: #d49a00; }
.verify-card.fail .verify-badge { background: #c0392b; }
.verify-status { font-size: 12px; font-weight: bold; }
.verify-card.ok .verify-status { color: #2f8a3a; }
.verify-card.warn .verify-status { color: #9a6b00; }
.verify-card.fail .verify-status { color: #c0392b; }
.verify-lines { margin: 8px 0 4px; padding-left: 20px; font-variant-numeric: tabular-nums; line-height: 1.7; }
.verify-result { margin: 4px 0; font-weight: bold; }
.verify-items { margin: 4px 0 2px; padding-left: 20px; color: #7a4a00; line-height: 1.6; }
.verify-card.fail .verify-items { color: #8b1a10; }

/* 양식 생성기 */
.form-card { border: 1px solid #bbb; background: #fff; padding: 10px 12px; margin-bottom: 12px; }
.form-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.form-card-head h3 { margin: 0; font-size: 15px; }
.form-card-head .spacer { flex: 1; }
.form-preview { background: #fff; padding: 12px; border: 1px dashed #ccc; overflow-x: auto; }
.form-preview table { min-width: 0; max-width: 900px; }
.form-preview th, .form-preview td { white-space: normal; }

/* 업무포털 품목내역 받기 */
.portal-downloads { margin-top: 12px; padding: 10px 12px; border: 1px solid #b7c7d9; background: #f3f7fc; }
.portal-downloads h3 { margin: 0 0 8px; font-size: 14px; }
.portal-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.portal-buttons small { color: #555; margin-left: 4px; }
