@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap");

.budget-shell { max-width: 1180px; font-family: "Montserrat", "Noto Sans Thai", sans-serif; }
.budget-shell button, .budget-shell input, .budget-shell textarea, .budget-shell select { font-family: inherit; }
:lang(th) .budget-shell, :lang(th) .budget-shell button, :lang(th) .budget-shell input, :lang(th) .budget-shell textarea, :lang(th) .budget-shell select { font-family: "Noto Sans Thai", "Montserrat", sans-serif; }
.language-switch { display: flex; justify-content: flex-end; margin-bottom: .45rem; }
.language-switch .button { min-height: 2rem; padding: .35rem .65rem; font-size: .68rem; }
.account-bar [data-language-toggle] { min-height: 1.95rem; padding: .35rem .6rem; font-size: .68rem; }
.budget-report { margin: 0 0 1.1rem; padding: .95rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.budget-report-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.budget-report-heading h2 { margin: 0; font-size: 1.08rem; }
.budget-report-heading .muted { max-width: 38rem; margin-top: .3rem; font-size: .7rem; }
.report-period { display: grid; min-width: 15rem; gap: .45rem; }
.report-period-toolbar { display: flex; align-items: end; gap: .4rem; }
.report-period-select { min-width: 0; flex: 1 1 auto; }
.report-period label > span { display: block; margin-bottom: .24rem; color: var(--muted); font-size: .62rem; font-weight: 800; }
.report-period select, .report-custom-period input { width: 100%; min-height: 2.2rem; }
.report-period-clear { min-height: 2.2rem; padding: .4rem .58rem; white-space: nowrap; }
.report-custom-period { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: .4rem; }
.report-custom-period[hidden] { display: none; }
.report-custom-period .button { min-height: 2.2rem; padding: .4rem .58rem; white-space: nowrap; }
.report-period-note { margin: .75rem 0 .55rem; color: var(--muted); font-size: .64rem; }
.status-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.status-breakdown-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .55rem; align-items: center; padding: .58rem .65rem; border: 1px solid var(--line); border-radius: calc(var(--radius) - 2px); background: #fff; }
.status-breakdown-label { display: flex; min-width: 0; align-items: center; gap: .42rem; }
.status-breakdown-label strong { overflow-wrap: anywhere; font-size: .72rem; line-height: 1.25; }
.status-breakdown-dot { width: .48rem; height: .48rem; flex: 0 0 auto; border-radius: 50%; background: var(--muted); }
.status-breakdown-value { display: grid; justify-items: end; gap: .06rem; text-align: right; }
.status-breakdown-value strong { font-size: .76rem; line-height: 1.1; }
.status-breakdown-value small { color: var(--muted); font-size: .58rem; }
.status-breakdown-row.status-draft .status-breakdown-dot { background: var(--muted); }
.status-breakdown-row.status-submitted .status-breakdown-dot { background: var(--gold); }
.status-breakdown-row.status-returned .status-breakdown-dot { background: #70428b; }
.status-breakdown-row.status-approved .status-breakdown-dot, .status-breakdown-row.status-completed .status-breakdown-dot { background: var(--teal); }
.status-breakdown-row.status-rejected .status-breakdown-dot, .status-breakdown-row.status-cancelled .status-breakdown-dot { background: var(--coral); }
.status-breakdown-total { display: flex; grid-column: 1 / -1; justify-content: space-between; gap: .6rem; padding: .62rem .65rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .66rem; }
.status-breakdown-total strong { color: var(--teal-dark); font-size: .76rem; }
.report-empty { grid-column: 1 / -1; margin: .2rem 0; color: var(--muted); font-size: .7rem; }
.budget-content { padding-top: .25rem; }
.draft-recovery { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: .7rem 0 1rem; padding: .7rem .8rem; border: 1px solid #b7d8d2; border-radius: var(--radius); background: #eef7f4; color: var(--ink); }
.draft-recovery > div:first-child { display: grid; min-width: 0; gap: .15rem; }
.draft-recovery strong { font-size: .76rem; }
.draft-recovery span { color: var(--muted); font-size: .68rem; }
.draft-recovery-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.draft-recovery-actions .button { min-height: 2rem; padding: .4rem .55rem; font-size: .65rem; }
.draft-minimized-tab { position: fixed; right: 1rem; bottom: 1rem; z-index: 20; display: flex; width: min(20rem, calc(100vw - 2rem)); align-items: stretch; border: 1px solid var(--line); border-top: 3px solid var(--coral); border-radius: var(--radius); background: var(--surface); box-shadow: 0 14px 34px rgba(45, 38, 25, .16); }
.draft-minimized-trigger { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: .6rem; border: 0; border-radius: var(--radius) 0 0 var(--radius); padding: .62rem .7rem; background: transparent; color: var(--ink); text-align: left; }
.draft-minimized-trigger:hover, .draft-minimized-trigger:focus-visible { background: var(--soft); outline: none; }
.draft-minimized-icon { display: grid; flex: 0 0 auto; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: .95rem; }
.draft-minimized-copy { display: grid; min-width: 0; flex: 1 1 auto; gap: .1rem; }
.draft-minimized-copy strong, .draft-minimized-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-minimized-copy strong { font-size: .74rem; }
.draft-minimized-copy small { color: var(--muted); font-size: .62rem; }
.draft-minimized-chevron { color: var(--teal-dark); font-size: 1.2rem; line-height: 1; }
.draft-minimized-close { align-self: center; flex: 0 0 auto; width: 2rem; height: 2rem; margin-right: .35rem; font-size: 1rem; }
.budget-filter-row { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.budget-filter-row label { min-width: 11rem; flex: 0 1 15rem; }
.budget-filter-row .search-field { flex: 1 1 22rem; }
.budget-request-list { display: grid; gap: .65rem; }
.budget-request-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 18px rgba(45, 38, 25, .04); }
.budget-request-card:hover { border-color: #b7cbc5; box-shadow: var(--shadow-soft); }
.budget-request-main { display: grid; min-width: 0; gap: .42rem; }
.budget-request-title { display: flex; align-items: start; flex-wrap: wrap; gap: .55rem; }
.budget-request-title h3 { overflow-wrap: anywhere; font-size: .96rem; }
.budget-request-number { color: var(--coral); font-size: .68rem; font-weight: 800; letter-spacing: .05em; }
.budget-request-meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; color: var(--muted); font-size: .7rem; }
.budget-request-meta span::before { margin-right: .35rem; color: var(--line); content: "•"; }
.budget-request-meta span:first-child::before { display: none; }
.budget-request-amount { color: var(--teal-dark); font-size: .95rem; font-weight: 800; }
.budget-request-detail { color: var(--muted); font-size: .68rem; }
.budget-request-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .4rem; }
.budget-request-actions .button { min-height: 2.1rem; padding: .42rem .6rem; font-size: .68rem; }
.status-badge { display: inline-flex; width: fit-content; border-radius: 999px; padding: .25rem .5rem; background: var(--soft); color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.status-badge.submitted { background: var(--gold-soft); color: #7e5a08; }
.status-badge.approved, .status-badge.completed { background: var(--teal-soft); color: var(--teal-dark); }
.status-badge.returned { background: #f0e7f8; color: #70428b; }
.status-badge.rejected, .status-badge.cancelled { background: var(--coral-soft); color: var(--danger); }

.budget-editor-modal { width: min(900px, calc(100% - 1rem)); max-height: min(94svh, 960px); }
.budget-editor-card { max-height: min(94svh, 960px); padding: 1.1rem; }
.editor-window-actions { display: flex; flex: 0 0 auto; gap: .35rem; }
.editor-window-actions .icon-button { width: 2.15rem; height: 2.15rem; font-size: 1.05rem; }
.form-section { display: grid; gap: .8rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.form-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.form-section-heading .eyebrow { margin-bottom: .25rem; }
.form-section-heading h3 { font-size: .98rem; }
.form-section-heading > span { color: var(--muted); font-size: .68rem; }
.editor-submit-context { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem; text-align: right; }
.editor-submit-context strong { color: var(--ink); font-weight: 700; }
.budget-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.budget-form-grid .full-width { grid-column: 1 / -1; }
.prepared-by-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.prepared-by-fields label { min-width: 0; }
.budget-lines { display: grid; gap: .65rem; }
.budget-line { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: start; gap: .6rem; padding: .65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.budget-line-number { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: .68rem; font-weight: 800; }
.budget-line-fields { display: grid; grid-template-columns: minmax(0, 2fr) 5rem 7rem 8rem; gap: .55rem; min-width: 0; }
.budget-line-fields label { min-width: 0; }
.budget-line-fields .line-description { grid-column: span 2; }
.budget-line-fields .line-note { grid-column: 1 / -1; }
.budget-line-total { display: grid; min-width: 7.2rem; justify-items: end; gap: .25rem; color: var(--muted); font-size: .62rem; }
.budget-line-total strong { color: var(--teal-dark); font-size: .78rem; white-space: nowrap; }
.line-remove { width: 1.85rem; height: 1.85rem; font-size: 1rem; }
.budget-adjustments { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .7rem; }
.budget-adjustments label { width: 10rem; }
.budget-total-box { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .85rem 1.2rem; padding: .75rem .85rem; border: 1px solid #b7d8d2; border-radius: var(--radius); background: #eef7f4; color: var(--muted); font-size: .72rem; }
.budget-total-box span { display: flex; align-items: baseline; gap: .35rem; }
.budget-total-box strong { color: var(--teal-dark); font-size: .82rem; }
.budget-total-box .net-payment-total strong { font-size: .98rem; }
.attachment-picker { display: grid; grid-template-columns: 12rem minmax(0, 1fr) auto; align-items: end; gap: .65rem; }
.attachment-picker .button { min-height: 2.4rem; }
.attachment-kind-field, .annex-picker { min-width: 0; }
.annex-picker { display: grid; gap: .35rem; }
.annex-dropzone { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; min-height: 3.35rem; padding: .5rem .6rem; border: 1px dashed #9fc9bf; border-radius: var(--radius); background: #fff; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.annex-dropzone:hover, .annex-dropzone:focus-within, .annex-dropzone.is-dragging { border-color: var(--teal); background: #fbfffd; box-shadow: 0 0 0 3px rgba(20, 128, 117, .08); }
.annex-dropzone.has-files { border-style: solid; border-color: #7db7aa; }
.annex-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.annex-dropzone-icon { display: grid; flex: 0 0 auto; width: 1.85rem; height: 1.85rem; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: 1rem; font-weight: 500; line-height: 1; }
.annex-dropzone-copy { display: grid; min-width: 0; gap: .1rem; }
.annex-dropzone-copy strong { overflow: hidden; color: var(--ink); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.annex-dropzone-copy span { color: var(--muted); font-size: .58rem; line-height: 1.35; }
.annex-dropzone-action { flex: 0 0 auto; padding: .34rem .5rem; border: 1px solid #d7e6e2; border-radius: 999px; color: var(--teal-dark); font-size: .59rem; font-weight: 800; white-space: nowrap; }
.annex-file-status { display: flex; min-width: 0; align-items: center; gap: .45rem; min-height: 2.05rem; padding: .35rem .45rem; border: 1px solid #d7e6e2; border-radius: var(--radius); background: #fff; }
.annex-file-status-icon { display: grid; flex: 0 0 auto; width: 1.45rem; height: 1.45rem; place-items: center; border-radius: .35rem; background: #edf3f1; color: var(--muted); font-size: .8rem; line-height: 1; }
.annex-file-status.has-files .annex-file-status-icon { background: var(--teal-soft); color: var(--teal-dark); }
.annex-file-status > div { display: grid; min-width: 0; flex: 1 1 auto; gap: .08rem; }
.annex-file-status strong { overflow: hidden; color: var(--ink); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.annex-file-status span:not(.annex-file-status-icon) { overflow: hidden; color: var(--muted); font-size: .57rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.annex-file-clear { flex: 0 0 auto; padding: .24rem .4rem; border: 0; border-radius: 999px; background: transparent; color: var(--danger); cursor: pointer; font-size: .57rem; font-weight: 800; }
.annex-file-clear:hover, .annex-file-clear:focus-visible { background: var(--coral-soft); outline: none; }
.editor-attachments { display: grid; gap: .4rem; }
.editor-attachment { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem .6rem; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.editor-attachment-meta { display: grid; min-width: 0; gap: .1rem; }
.editor-attachment strong { overflow-wrap: anywhere; font-size: .72rem; }
.editor-attachment span { color: var(--muted); font-size: .64rem; }
.editor-attachment-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .3rem; }
.editor-attachment .button { min-height: 1.9rem; padding: .35rem .5rem; font-size: .64rem; }
.editor-attachment-preview { grid-column: 1 / -1; padding-top: .45rem; border-top: 1px solid var(--line); }
.budget-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-top: .2rem; }
.budget-editor-actions > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.draft-status { min-height: 1rem; margin: .35rem 0 0; color: var(--muted); font-size: .67rem; }
.draft-status.saving { color: var(--teal-dark); }
.draft-status.saved, .draft-status.recovered { color: var(--teal-dark); }
.draft-status.error { color: var(--danger); }

.budget-detail-modal { width: min(820px, calc(100% - 1rem)); max-height: min(94svh, 900px); }
.budget-detail-card { max-height: min(94svh, 900px); padding: 1.1rem; }
.budget-detail-content { display: grid; gap: 1rem; }
.detail-overview { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.detail-overview h3 { margin-bottom: .25rem; overflow-wrap: anywhere; font-size: 1rem; }
.detail-overview p { margin: 0; color: var(--muted); font-size: .72rem; }
.detail-total { display: grid; align-content: center; justify-items: end; gap: .2rem; }
.detail-total span { color: var(--muted); font-size: .66rem; }
.detail-total strong { color: var(--teal-dark); font-size: 1.05rem; white-space: nowrap; }
.detail-total small { color: var(--muted); font-size: .62rem; text-align: right; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.detail-field { display: grid; min-width: 0; gap: .2rem; padding: .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.detail-field span { color: var(--muted); font-size: .62rem; font-weight: 700; }
.detail-field strong { overflow-wrap: anywhere; font-size: .74rem; line-height: 1.35; }
.detail-block { display: grid; gap: .55rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.detail-block-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
.detail-block-heading h3 { font-size: .9rem; }
.detail-block-heading span { color: var(--muted); font-size: .66rem; }
.detail-audit { overflow: hidden; }
.detail-audit-summary { cursor: pointer; list-style: none; }
.detail-audit-summary::-webkit-details-marker { display: none; }
.detail-audit-summary::after { color: var(--teal-dark); content: "+"; font-size: 1rem; font-weight: 500; line-height: 1; }
.detail-audit[open] .detail-audit-summary::after { content: "−"; }
.detail-audit-action { color: var(--teal-dark) !important; font-weight: 700; }
.detail-audit-content { display: grid; gap: .85rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.detail-audit-section { display: grid; gap: .5rem; }
.detail-audit-section + .detail-audit-section { padding-top: .8rem; border-top: 1px solid var(--line); }
.detail-audit-section h4 { font-size: .78rem; }
.detail-lines { display: grid; gap: .35rem; }
.detail-line { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: .55rem; align-items: start; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: var(--radius); }
.detail-line-index { color: var(--coral); font-size: .68rem; font-weight: 800; }
.detail-line-main { display: grid; min-width: 0; gap: .15rem; }
.detail-line-main strong { overflow-wrap: anywhere; font-size: .74rem; }
.detail-line-main span { color: var(--muted); font-size: .66rem; }
.detail-line-total { color: var(--teal-dark); font-size: .74rem; font-weight: 800; white-space: nowrap; }
.detail-notes { margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.55; white-space: pre-line; }
.detail-attachments, .detail-history { display: grid; gap: .35rem; }
.detail-next-step { display: grid; gap: .2rem; padding: .65rem .75rem; border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: var(--radius); background: #f1f7f5; }
.detail-next-step strong { font-size: .78rem; }
.detail-next-step span { color: var(--muted); font-size: .68rem; line-height: 1.45; }
.detail-next-step.waiting-review { border-left-color: #bd8b28; background: #fbf6e9; }
.detail-next-step.returned-review { border-left-color: var(--coral); background: #fcf1ed; }
.detail-next-step.completed-locked { border-left-color: #8f6c1f; background: #fbf6e9; }
.detail-locked-note { margin: 0; padding: .65rem .75rem; border: 1px dashed #d8c799; border-radius: var(--radius); background: #fffaf0; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.request-next-step { margin: .45rem 0 0; font-size: .67rem; line-height: 1.4; }
.request-next-step.review-ready { color: var(--teal-dark); }
.request-next-step.waiting-review { color: #89651f; }
.request-next-step.returned-review { color: var(--coral); }
.approver-picker { display: grid; gap: .55rem; padding: .7rem; border: 1px solid #cfe3de; border-radius: var(--radius); background: #f6fbf9; }
.approver-picker-heading { display: flex; align-items: start; justify-content: space-between; gap: .8rem; }
.approver-picker-heading > div { display: grid; min-width: 0; gap: .2rem; }
.approver-picker-heading .field-label { color: var(--muted); font-size: .67rem; font-weight: 700; }
.approver-picker-heading strong { font-size: .76rem; }
.approver-picker-heading .field-help { max-width: 32rem; margin: 0; text-align: right; }
.approver-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .4rem; }
.approver-option { display: grid; grid-template-columns: auto minmax(0, 1fr); min-width: 0; min-height: 3.5rem; align-items: center; align-self: start; gap: .5rem; padding: .5rem .55rem; border: 1px solid #d7e6e2; border-radius: var(--radius); background: #fff; cursor: pointer; }
.approver-option:has(input:checked) { border-color: var(--teal); background: #eef8f5; box-shadow: 0 0 0 2px rgba(20, 128, 117, .08); }
.approver-option input { width: auto; margin: 0; accent-color: var(--teal-dark); }
.approver-option > span { display: grid; width: 100%; min-width: 0; gap: .08rem; }
.approver-option strong { overflow-wrap: anywhere; font-size: .68rem; }
.approver-option small { overflow-wrap: anywhere; color: var(--muted); font-size: .59rem; }
.approver-empty { margin: 0; color: var(--muted); font-size: .68rem; }
.approver-selection-status { margin: 0; }
.approver-selection-status.has-selection { color: var(--teal-dark); font-weight: 700; }
.decision-panel { padding: .75rem; border: 1px solid #bcd7d0; border-radius: var(--radius); background: #f4faf8; }
.decision-panel .detail-block-heading { align-items: start; }
.reviewer-identity { display: grid; gap: .5rem; padding: .6rem; border: 1px solid #cfe3de; border-radius: var(--radius); background: #fff; }
.reviewer-identity-heading { display: grid; gap: .12rem; }
.reviewer-identity-heading strong { color: var(--teal-dark); font-size: .72rem; }
.reviewer-identity-heading span { color: var(--muted); font-size: .63rem; line-height: 1.4; }
.reviewer-identity .detail-comment-field input { background: #fbfdfc; }
.detail-comment-field { display: grid; gap: .3rem; color: var(--muted); font-size: .67rem; font-weight: 700; }
.detail-comment-field textarea { min-height: 4.6rem; resize: vertical; }
.decision-actions { padding-top: .1rem; border-top: 0; }
.review-conversation { gap: .7rem; }
.detail-comments { display: grid; gap: .45rem; }
.detail-comment { padding: .6rem .65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.detail-comment.decision { border-left: 3px solid var(--teal); }
.detail-comment > div { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.detail-comment strong { font-size: .7rem; }
.detail-comment time { color: var(--muted); font-size: .61rem; }
.detail-comment p { margin: .3rem 0 0; font-size: .7rem; line-height: 1.45; white-space: pre-line; }
.comment-decision { display: inline-flex; margin-top: .35rem; color: var(--teal-dark); font-size: .61rem; font-weight: 800; text-transform: uppercase; }
.detail-comment-form { display: grid; gap: .5rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.detail-comment-form .detail-actions { padding-top: 0; border-top: 0; }
.review-conversation { gap: 0; }
.review-conversation > summary { cursor: pointer; list-style: none; padding: .1rem 0; }
.review-conversation > summary::-webkit-details-marker { display: none; }
.review-conversation > summary::after { color: var(--teal-dark); content: "+"; font-size: 1rem; font-weight: 500; line-height: 1; }
.review-conversation[open] > summary::after { content: "−"; }
.discussion-summary-action { color: var(--teal-dark) !important; font-weight: 700; }
.discussion-close-label { display: none; }
.review-conversation[open] .discussion-open-label { display: none; }
.review-conversation[open] .discussion-close-label { display: inline; }
.discussion-body { display: grid; gap: .7rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.discussion-composer { gap: .7rem; padding: .75rem; border: 1px solid #cfe3de; border-radius: var(--radius); background: #f6fbf9; }
.discussion-composer .detail-comment-field textarea { border-color: #cfe3de; background: #fff; }
.discussion-attachment-picker { display: grid; gap: .35rem; }
.discussion-dropzone { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; min-height: 3.3rem; padding: .55rem .65rem; border: 1px dashed #a7cec5; border-radius: var(--radius); background: #fff; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.discussion-dropzone:hover, .discussion-dropzone:focus-within, .discussion-dropzone.is-dragging { border-color: var(--teal); background: #f8fdfb; box-shadow: 0 0 0 3px rgba(20, 128, 117, .08); }
.discussion-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.discussion-dropzone-icon { display: grid; flex: 0 0 auto; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: 1.1rem; font-weight: 500; line-height: 1; }
.discussion-dropzone-copy { display: grid; min-width: 0; gap: .1rem; }
.discussion-dropzone-copy strong { overflow-wrap: anywhere; color: var(--ink); font-size: .68rem; }
.discussion-dropzone-copy span { overflow-wrap: anywhere; color: var(--muted); font-size: .6rem; line-height: 1.35; }
.discussion-dropzone-action { flex: 0 0 auto; padding: .35rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--teal-dark); font-size: .61rem; font-weight: 800; white-space: nowrap; }
.discussion-file-summary { min-height: .9rem; margin: 0 .1rem; color: var(--muted); font-size: .61rem; }
.discussion-file-summary.has-files { color: var(--teal-dark); font-weight: 700; }
.discussion-file-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }
.discussion-file-chip { display: flex; min-width: 0; align-items: center; gap: .45rem; padding: .4rem .45rem; border: 1px solid #d7e6e2; border-radius: var(--radius); background: #fff; }
.discussion-file-type { display: grid; flex: 0 0 auto; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: .35rem; background: var(--teal-soft); color: var(--teal-dark); font-size: .5rem; font-weight: 800; letter-spacing: .03em; }
.discussion-file-chip-copy { display: grid; min-width: 0; flex: 1 1 auto; gap: .08rem; }
.discussion-file-chip-copy strong { overflow: hidden; color: var(--ink); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.discussion-file-chip-copy small { color: var(--muted); font-size: .57rem; }
.discussion-file-remove { display: grid; flex: 0 0 auto; width: 1.55rem; height: 1.55rem; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: .95rem; line-height: 1; }
.discussion-file-remove:hover, .discussion-file-remove:focus-visible { background: var(--coral-soft); color: var(--danger); outline: none; }
.comment-attachment-list { display: grid; gap: .35rem; margin-top: .55rem; }
.comment-attachment { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .65rem; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.comment-attachment-meta { display: grid; min-width: 0; gap: .1rem; }
.comment-attachment-meta strong { overflow-wrap: anywhere; font-size: .68rem; }
.comment-attachment-meta span { color: var(--muted); font-size: .6rem; }
.comment-attachment-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .3rem; }
.comment-attachment-actions .button { min-height: 1.85rem; padding: .32rem .5rem; font-size: .61rem; }
.comment-attachment .detail-attachment-preview { grid-column: 1 / -1; }
.revision-list { display: grid; gap: .35rem; }
.revision-row { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .5rem; align-items: baseline; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.revision-row strong { color: var(--coral); font-size: .66rem; }
.revision-row span { font-size: .68rem; }
.revision-row small { color: var(--muted); font-size: .6rem; text-align: right; }
.detail-attachment { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem .8rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); }
.detail-attachment-meta { display: grid; min-width: 0; gap: .1rem; }
.detail-attachment strong { overflow-wrap: anywhere; font-size: .7rem; }
.detail-attachment span { color: var(--muted); font-size: .62rem; }
.transaction-slips-block { padding: .85rem; border: 1px solid #cfe3de; border-radius: var(--radius); background: #f5faf8; }
.transaction-slips-block > .detail-block-heading { align-items: start; }
.transaction-slip { border-color: #b9d8d1; background: #fff; }
.detail-attachment-note { margin: .25rem 0 0; color: var(--muted); font-size: .66rem; line-height: 1.4; white-space: pre-line; }
.detail-slip-form { display: grid; gap: .7rem; padding-top: .75rem; border-top: 1px solid #cfe3de; }
.transaction-slip-intro { display: flex; align-items: flex-start; gap: .6rem; }
.transaction-slip-intro-kicker { display: grid; flex: 0 0 auto; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: .5rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.transaction-slip-intro div { display: grid; min-width: 0; gap: .12rem; }
.transaction-slip-intro h4 { font-size: .78rem; }
.transaction-slip-intro p { margin: 0; color: var(--muted); font-size: .65rem; line-height: 1.4; }
.detail-slip-form-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: end; gap: .6rem; }
.transaction-slip-picker, .transaction-slip-note-field { display: grid; min-width: 0; gap: .3rem; }
.transaction-slip-dropzone { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; min-height: 3.35rem; padding: .5rem .6rem; border: 1px dashed #9fc9bf; border-radius: var(--radius); background: #fff; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.transaction-slip-dropzone:hover, .transaction-slip-dropzone:focus-within, .transaction-slip-dropzone.is-dragging { border-color: var(--teal); background: #fbfffd; box-shadow: 0 0 0 3px rgba(20, 128, 117, .08); }
.transaction-slip-dropzone.has-file { border-style: solid; border-color: #7db7aa; }
.transaction-slip-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.transaction-slip-dropzone-icon { display: grid; flex: 0 0 auto; width: 1.85rem; height: 1.85rem; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: 1rem; font-weight: 500; line-height: 1; }
.transaction-slip-dropzone-copy { display: grid; min-width: 0; gap: .1rem; }
.transaction-slip-dropzone-copy strong { overflow: hidden; color: var(--ink); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.transaction-slip-dropzone-copy span { color: var(--muted); font-size: .58rem; line-height: 1.35; }
.transaction-slip-dropzone-action { flex: 0 0 auto; padding: .34rem .5rem; border: 1px solid #d7e6e2; border-radius: 999px; color: var(--teal-dark); font-size: .59rem; font-weight: 800; white-space: nowrap; }
.transaction-slip-file-status { display: flex; min-width: 0; align-items: center; gap: .45rem; min-height: 2.05rem; padding: .35rem .45rem; border: 1px solid #d7e6e2; border-radius: var(--radius); background: #fff; }
.transaction-slip-file-status-icon { display: grid; flex: 0 0 auto; width: 1.45rem; height: 1.45rem; place-items: center; border-radius: .35rem; background: #edf3f1; color: var(--muted); font-size: .8rem; line-height: 1; }
.transaction-slip-file-status.has-file .transaction-slip-file-status-icon { background: var(--teal-soft); color: var(--teal-dark); }
.transaction-slip-file-status > div { display: grid; min-width: 0; flex: 1 1 auto; gap: .08rem; }
.transaction-slip-file-status strong { overflow: hidden; color: var(--ink); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.transaction-slip-file-status span:not(.transaction-slip-file-status-icon) { color: var(--muted); font-size: .57rem; line-height: 1.3; }
.transaction-slip-selected-list { display: grid; max-height: 5rem; gap: .2rem; margin-top: .2rem; overflow-y: auto; }
.transaction-slip-selected-file { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .56rem; }
.transaction-slip-selected-file strong { min-width: 0; color: var(--muted); font-size: .56rem; font-weight: 600; text-overflow: ellipsis; }
.transaction-slip-selected-file small { flex: 0 0 auto; color: var(--muted); font-size: .52rem; }
.transaction-slip-file-clear { flex: 0 0 auto; padding: .24rem .4rem; border: 0; border-radius: 999px; background: transparent; color: var(--danger); cursor: pointer; font-size: .57rem; font-weight: 800; }
.transaction-slip-file-clear:hover, .transaction-slip-file-clear:focus-visible { background: var(--coral-soft); outline: none; }
.detail-slip-form .button { min-height: 2.15rem; white-space: nowrap; }
.transaction-slip-submit { align-self: stretch; }
.detail-attachment-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .35rem; }
.detail-attachment-actions .button { min-height: 1.95rem; padding: .35rem .55rem; font-size: .64rem; }
.detail-attachment-preview { grid-column: 1 / -1; padding-top: .55rem; border-top: 1px solid var(--line); }
.attachment-preview-frame { display: block; width: 100%; height: min(65svh, 38rem); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.attachment-preview-image { display: block; width: 100%; max-height: 48rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); object-fit: contain; object-position: center; }
.attachment-preview-fallback { display: grid; min-height: 5rem; place-items: center; padding: 1rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--soft); color: var(--muted); text-align: center; font-size: .7rem; }
.detail-history-entry { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .7rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.detail-history-entry:last-child { border-bottom: 0; }
.detail-history-entry time { color: var(--muted); font-size: .64rem; }
.detail-history-entry strong { font-size: .7rem; }
.detail-history-entry p { margin: .15rem 0 0; color: var(--muted); font-size: .68rem; }
.detail-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.detail-actions .button { min-height: 2.15rem; font-size: .68rem; }
.detail-empty { margin: 0; color: var(--muted); font-size: .72rem; }

.request-scope-tabs { display: flex; align-items: end; gap: .2rem; margin: .2rem 0 .8rem; border-bottom: 1px solid var(--line); }
.request-scope-tab { display: inline-flex; min-width: 0; align-items: center; gap: .35rem; margin-bottom: -1px; padding: .52rem .62rem .58rem; border: 0; border-bottom: 2px solid transparent; border-radius: var(--radius) var(--radius) 0 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .68rem; font-weight: 800; line-height: 1.25; }
.request-scope-tab:hover, .request-scope-tab:focus-visible { background: var(--soft); color: var(--ink); outline: none; }
.request-scope-tab.is-active { border-bottom-color: var(--teal); color: var(--ink); }
.request-scope-count { display: inline-grid; min-width: 1.25rem; height: 1.25rem; place-items: center; border-radius: 999px; background: var(--coral-soft); color: var(--danger); font-size: .58rem; }
.request-scope-amount { color: var(--teal-dark); font-size: .6rem; white-space: nowrap; }
.notification-trigger { display: inline-flex; align-items: center; gap: .35rem; }
.notification-count { display: inline-grid; min-width: 1.2rem; height: 1.2rem; place-items: center; border-radius: 999px; background: var(--coral); color: #fff; font-size: .55rem; font-weight: 800; line-height: 1; }
.notifications-modal { width: min(650px, calc(100% - 1rem)); max-height: min(88svh, 760px); }
.notifications-card { max-height: min(88svh, 760px); padding: 1rem; }
.notifications-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.notifications-toolbar .modal-context { margin: 0; }
.notifications-toolbar .button { min-height: 2rem; padding: .38rem .55rem; font-size: .62rem; white-space: nowrap; }
.notifications-list { display: grid; gap: .35rem; padding-top: .7rem; }
.notification-entry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .6rem; width: 100%; padding: .62rem .65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.notification-entry:hover, .notification-entry:focus-visible { border-color: #a9c9c1; background: #fbfefd; box-shadow: var(--shadow-soft); outline: none; }
.notification-entry.is-unread { border-color: #b9d8d1; background: #f4faf8; }
.notification-entry-dot { width: .52rem; height: .52rem; margin-top: .32rem; border-radius: 50%; background: transparent; }
.notification-entry.is-unread .notification-entry-dot { background: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.notification-entry-copy { display: grid; min-width: 0; gap: .16rem; }
.notification-entry-copy strong { overflow-wrap: anywhere; font-size: .72rem; line-height: 1.35; }
.notification-entry-copy > span { color: var(--muted); font-size: .65rem; line-height: 1.45; }
.notification-entry-copy small { overflow-wrap: anywhere; color: var(--muted); font-size: .58rem; line-height: 1.35; }
.notification-entry-side { display: flex; align-items: center; gap: .35rem; }
.notification-entry-status { align-self: start; margin-top: .05rem; font-size: .54rem; }
.notification-entry-arrow { color: var(--teal-dark); font-size: 1.15rem; line-height: 1; }

@media (max-width: 760px) {
  .budget-report-heading { flex-direction: column; }
  .report-period { width: 100%; }
  .status-breakdown { grid-template-columns: 1fr; }
  .budget-request-card { grid-template-columns: 1fr; }
  .budget-request-actions { justify-content: flex-start; }
  .budget-line { grid-template-columns: 2rem minmax(0, 1fr); }
  .budget-line-total { grid-column: 2; grid-template-columns: 1fr auto auto; align-items: center; justify-items: start; width: 100%; padding-top: .4rem; border-top: 1px solid var(--line); }
  .budget-line-total .line-remove { justify-self: end; }
  .budget-line-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget-line-fields .line-description { grid-column: 1 / -1; }
  .budget-line-fields .line-note { grid-column: 1 / -1; }
  .attachment-picker { grid-template-columns: 1fr; align-items: stretch; }
  .attachment-picker .button { width: 100%; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification-settings { grid-template-columns: 1fr; }
  .draft-recovery { align-items: stretch; flex-direction: column; }
  .draft-recovery-actions { justify-content: flex-start; }
  .draft-minimized-tab { right: .6rem; bottom: .6rem; left: .6rem; width: auto; }
  .detail-slip-form-grid { grid-template-columns: 1fr; align-items: stretch; }
  .detail-slip-form .button { width: 100%; }
  .transaction-slip-submit { width: 100%; }
  .notifications-toolbar { align-items: flex-start; flex-direction: column; }
  .notifications-toolbar .button { width: 100%; }
}

@media (max-width: 580px) {
  .request-scope-tabs { align-items: stretch; flex-wrap: wrap; }
  .request-scope-tab { flex: 1 1 auto; justify-content: center; }
  .report-custom-period { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-custom-period .button { grid-column: 1 / -1; width: 100%; }
  .budget-form-grid { grid-template-columns: 1fr; }
  .budget-form-grid .full-width { grid-column: auto; }
  .budget-form-grid .prepared-by-fields { grid-column: auto; grid-template-columns: 1fr; }
  .approver-picker-heading { display: grid; gap: .35rem; }
  .approver-picker-heading .field-help { max-width: none; text-align: left; }
  .approver-options { grid-template-columns: 1fr; }
  .budget-adjustments { justify-content: stretch; }
  .budget-adjustments label { width: calc(50% - .35rem); }
  .budget-total-box { justify-content: space-between; gap: .4rem .8rem; }
  .budget-editor-actions { align-items: stretch; flex-direction: column-reverse; }
  .budget-editor-actions > div { width: 100%; justify-content: stretch; }
  .budget-editor-actions .button { flex: 1 1 0; }
  .detail-overview { grid-template-columns: 1fr; }
  .detail-total { justify-items: start; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-history-entry { grid-template-columns: 1fr; gap: .2rem; }
  .editor-submit-context { max-width: 50%; }
  .revision-row { grid-template-columns: 2.1rem minmax(0, 1fr); }
  .revision-row small { grid-column: 2; text-align: left; }
  .people-toolbar { align-items: stretch; flex-direction: column; }
  .people-toolbar .button { width: 100%; }
  .user-preferences { grid-template-columns: 1fr; }
  .editor-attachment, .detail-attachment { grid-template-columns: 1fr; }
  .editor-attachment-actions, .detail-attachment-actions { justify-content: flex-start; }
  .editor-attachment-actions .button, .detail-attachment-actions .button { flex: 1 1 auto; }
  .comment-attachment { grid-template-columns: 1fr; }
  .comment-attachment-actions { justify-content: flex-start; }
  .discussion-file-list { grid-template-columns: 1fr; }
  .discussion-dropzone { grid-template-columns: auto minmax(0, 1fr); }
  .discussion-dropzone-action { grid-column: 2; justify-self: start; }
  .annex-dropzone { grid-template-columns: auto minmax(0, 1fr); }
  .annex-dropzone-action { grid-column: 2; justify-self: start; }
  .transaction-slip-dropzone { grid-template-columns: auto minmax(0, 1fr); }
  .transaction-slip-dropzone-action { grid-column: 2; justify-self: start; }
}

.budget-print-sheet { display: none; }

@media print {
  @page { size: A4; margin: 10mm 12mm 11mm; }
  html, body { min-width: 0; background: #fff !important; }
  body.printing-budget-request { color: #171816; font-family: "Noto Sans Thai", "TH Sarabun New", "Leelawadee UI", Tahoma, Arial, sans-serif; }
  body.printing-budget-request > *:not(.budget-print-sheet) { display: none !important; }
  body.printing-budget-request .budget-print-sheet { display: block !important; width: 100%; }
  .budget-print-page { box-sizing: border-box; width: 100%; color: #171816; font-family: "Noto Sans Thai", "TH Sarabun New", "Leelawadee UI", Tahoma, Arial, sans-serif; font-size: 8.5pt; line-height: 1.3; }
  .budget-print-page:not(.budget-print-annex) { min-height: 0; }
  .budget-print-page + .budget-print-page { page-break-before: always; }
  .print-company-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8mm; min-height: 23mm; padding-bottom: 4mm; border-bottom: 1pt solid #171816; }
  .print-brand { display: flex; flex: 1 1 auto; align-items: center; gap: 3mm; min-width: 0; padding-top: 1mm; }
  .print-brand img { width: 15mm; height: 15mm; object-fit: contain; object-position: center; }
  .print-brand div { display: grid; gap: .8mm; min-width: 0; }
  .print-brand strong { font-size: 8pt; letter-spacing: .02em; white-space: nowrap; }
  .print-brand span { color: #60625d; font-size: 7.5pt; }
  .print-document-block { width: 86mm; min-width: 0; }
  .print-document-title { display: grid; justify-items: center; gap: .5mm; padding: 0; text-align: center; }
  .print-document-title span { font-size: 13pt; font-weight: 800; line-height: 1.1; }
  .print-document-title strong { font-size: 8pt; letter-spacing: .12em; text-transform: uppercase; }
  .print-header-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2mm; margin-top: 2.5mm; }
  .print-header-meta > div { display: grid; min-width: 0; gap: .5mm; }
  .print-header-meta span { color: #676963; font-size: 6.6pt; white-space: nowrap; }
  .print-header-meta strong { min-height: 3.5mm; font-size: 7pt; overflow-wrap: anywhere; }
  .print-header-meta > div:first-child strong { white-space: nowrap; font-size: 6.5pt; }
  .print-form-intro { display: grid; gap: 2mm; margin: 3mm 0 2mm; }
  .print-inline-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5mm; }
  .print-line-field { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 1.5mm; min-width: 0; align-items: baseline; border-bottom: 1pt solid #171816; padding-bottom: 1mm; }
  .print-line-field span, .print-subject span, .print-payment-line > span, .print-notes-reference > span { font-size: 7.3pt; font-weight: 700; white-space: nowrap; }
  .print-line-field strong, .print-subject strong, .print-payment-line strong, .print-notes-reference strong { min-width: 0; min-height: 3.5mm; font-size: 8pt; font-weight: 500; overflow-wrap: anywhere; }
  .print-subject { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2mm; align-items: baseline; min-height: 5mm; border-bottom: 1pt solid #171816; padding-bottom: 1mm; }
  .print-kicker { margin: 0 0 2mm; color: #bd5e48; font-size: 7pt; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
  .print-options-section { display: grid; gap: 1.5mm; margin: 3mm 0; }
  .print-options-section > p { margin: 0; font-size: 7.8pt; font-weight: 800; }
  .print-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2mm; align-items: start; }
  .print-option { display: flex; align-items: flex-start; gap: 1.5mm; min-width: 0; font-size: 7.5pt; line-height: 1.25; }
  .print-checkbox { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 3.5mm; height: 3.5mm; margin-top: .4mm; border: 1pt solid #171816; box-sizing: border-box; color: #171816; font-size: 7.5pt; font-weight: 800; line-height: 1; }
  .print-checkbox.checked { border-width: 1.3pt; }
  .print-section { margin-top: 3mm; }
  .print-section > h2, .print-annex-heading h2, .print-payment-reference > h2 { margin: 0 0 1.5mm; font-size: 9pt; font-weight: 800; }
  .print-cost-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .print-cost-table th, .print-cost-table td { padding: 1.4mm 1.2mm; border: 1pt solid #171816; vertical-align: top; overflow-wrap: anywhere; line-height: 1.25; }
  .print-cost-table thead th { background: #e5e5e5; color: #171816; font-size: 7.4pt; text-align: center; font-weight: 800; }
  .print-cost-table tbody td, .print-cost-table tfoot td, .print-cost-table tfoot th { font-size: 7.4pt; }
  .print-cost-table th:nth-child(1), .print-cost-table td:nth-child(1) { width: 6%; }
  .print-cost-table th:nth-child(2), .print-cost-table td:nth-child(2) { width: 28%; }
  .print-cost-table th:nth-child(3), .print-cost-table td:nth-child(3) { width: 8%; }
  .print-cost-table th:nth-child(4), .print-cost-table td:nth-child(4) { width: 11%; }
  .print-cost-table th:nth-child(5), .print-cost-table td:nth-child(5) { width: 15%; }
  .print-cost-table th:nth-child(6), .print-cost-table td:nth-child(6) { width: 15%; }
  .print-cost-table th:nth-child(7), .print-cost-table td:nth-child(7) { width: 17%; }
  .print-column-center { text-align: center !important; }
  .print-item-description { font-weight: 500; }
  .print-number { text-align: right; white-space: nowrap; }
  .print-blank-row td { height: 5.5mm; }
  .print-cost-table tfoot th { text-align: right; font-weight: 800; }
  .print-reference-total th, .print-reference-total td { background: #e5e5e5; font-weight: 800; }
  .print-net-total th, .print-net-total td { background: #eef7f4; color: #075f58; font-weight: 800; }
  .print-payment-reference { display: grid; gap: 1.5mm; margin-top: 3mm; }
  .print-payment-line { display: grid; grid-template-columns: max-content minmax(30mm, 1fr) max-content minmax(30mm, 1fr); gap: 1.5mm; min-height: 5mm; align-items: baseline; }
  .print-payment-line.single { grid-template-columns: max-content minmax(0, 1fr); }
  .print-payment-line strong, .print-notes-reference strong { border-bottom: 1pt solid #171816; }
  .print-notes-reference { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 1.5mm; min-height: 5mm; align-items: baseline; }
  .print-approval-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14mm; margin-top: 5mm; padding-top: 3mm; break-inside: avoid; }
  .print-approval-field { display: grid; gap: 1.7mm; min-width: 0; }
  .print-approval-field > h3 { margin: 0 0 .8mm; font-size: 9pt; font-weight: 800; }
  .print-approval-row { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2mm; min-height: 6mm; align-items: baseline; }
  .print-approval-row > span { font-size: 7.5pt; white-space: nowrap; }
  .print-approval-row > strong { min-width: 0; min-height: 4mm; border-bottom: 1pt solid #171816; font-size: 8pt; font-weight: 500; overflow-wrap: anywhere; }
  .print-annex-heading { margin-top: 4mm; padding-bottom: 3mm; border-bottom: 1pt solid #171816; }
  .print-annex-heading p:last-child { max-width: 150mm; margin: 0; color: #676963; }
  .print-annex-list { display: grid; gap: 2mm; margin: 5mm 0 0; padding-left: 6mm; }
  .print-annex-list li { display: grid; gap: 1mm; padding: 2.5mm; border: 1pt solid #171816; break-inside: avoid; }
  .print-annex-list strong { overflow-wrap: anywhere; font-size: 8.5pt; }
  .print-annex-list span { color: #676963; font-size: 7.5pt; }
  .print-attachment-page .print-annex-heading h2 { margin: 0 0 1.5mm; font-size: 14pt; line-height: 1.15; overflow-wrap: anywhere; }
  .print-attachment-page .print-annex-heading p:last-child { font-size: 7.5pt; }
  .print-attachment-page { page-break-inside: avoid; }
  .print-annex-image { display: block; width: auto; max-width: 100%; height: auto; max-height: 175mm; margin: 5mm auto 0; object-fit: contain; object-position: center top; }
  .print-attachment-fallback { display: grid; align-content: center; min-height: 130mm; margin-top: 8mm; padding: 12mm; border: 1pt solid #171816; text-align: center; }
  .print-attachment-fallback strong { font-size: 12pt; overflow-wrap: anywhere; }
  .print-attachment-fallback p { max-width: 130mm; margin: 4mm auto 0; color: #676963; font-size: 8pt; }
}
