/* Document content is shared by editing preview and saved detail. */
.structured-content{font-size:13px;color:#24394d}.structured-content h3{font-size:14px;margin:22px 0 10px;border-left:3px solid #e56b36;padding-left:10px;line-height:1.4}.form-facts{display:grid;grid-template-columns:1fr 1fr;border:1px solid #cbd5df;margin:0}.form-facts>div{display:grid;grid-template-columns:100px 1fr;border-bottom:1px solid #dce3e9;min-height:38px}.form-facts dt{background:#f0f4f7;padding:10px;font-size:11px;color:#53697e}.form-facts dd{margin:0;padding:10px;white-space:pre-wrap;overflow-wrap:anywhere}.form-paper-table{border-collapse:collapse;width:100%;table-layout:fixed;min-width:0!important;font-size:10px}.form-paper-table th,.form-paper-table td{border:1px solid #cbd5df;padding:9px 6px!important;white-space:pre-wrap!important;overflow-wrap:anywhere;line-height:1.5}.form-paper-table th{background:#edf2f6;color:#354d64;font-weight:600}.form-paper-table th:first-child{width:35px}.form-totals{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:20px;background:#eff4f8;padding:16px;margin:0}.form-totals dt{font-size:10px;color:#62758a}.form-totals dd{margin:6px 0 0;font-weight:700;font-size:16px}.form-totals>div:last-child dd{color:#c75021}.form-prose p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;padding:0 12px 12px;border-bottom:1px solid #e1e7ed;min-height:36px}
@media screen{
 #modal:has(.structured-editor){width:min(1520px,96vw);max-width:1520px;max-height:94dvh;border-radius:16px}
 .structured-editor>.modal-head{background:#fff;padding:22px 28px;position:sticky;top:0;z-index:5;border-bottom:1px solid #dce5ee}
 .structured-editor .modal-head h2{margin:6px 0;font-size:24px}.editor-kicker{font-size:11px;font-weight:700;color:#c05a2b;letter-spacing:.04em}
 .structured-editor .editor-layout{display:grid;grid-template-columns:minmax(350px,.95fr) minmax(400px,1.05fr);gap:28px;padding:24px;background:#f2f5f8;align-items:start}
 .editor-input{min-width:0}.editor-section{background:white;border:1px solid #dde5ed;border-radius:12px;padding:22px;margin-bottom:16px}
 .editor-section h3{display:flex;align-items:center;gap:10px;font-size:16px;margin:0 0 20px}.editor-section h3>span{font-size:11px;color:#c25d31;background:#fff1e8;border-radius:6px;padding:5px 7px}
 .editor-section .form-grid{gap:18px 14px}.editor-section input,.editor-section textarea,.editor-section select{width:100%;font-size:14px;min-height:44px;background:#fff}.editor-section textarea{min-height:100px}.editor-section label{font-size:13px;color:#41556a;font-weight:600}.required{color:#c94a24}
 .field-help{font-size:12px!important;line-height:1.6;color:#697d90;margin:10px 0 0}.structured-row{padding:16px;border:1px solid #dde5ed;background:#fafcfe;border-radius:10px;margin-bottom:12px}.structured-row header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.structured-row header b{font-size:12px}.structured-row header button{font-size:11px;min-height:32px;padding:4px 10px;color:#ad4428}
 .add-form-row{width:100%;border:1px dashed #9fb1c3;background:#f6f9fc;min-height:44px;margin:0 0 20px}
 #editorTotals{background:#243d56;color:white;border-radius:10px;padding:16px;margin:16px 0;display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px}#editorTotals:empty{display:none}#editorTotals span{display:block;font-size:11px;color:#c6d4e1;margin-bottom:7px}#editorTotals strong{font-size:18px}
 .editor-preview{min-width:0;position:sticky;top:105px}.preview-caption{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:0 0 12px;color:#3c536b;font-size:12px}.preview-caption span{font-size:10px;color:#6b7d90}
 .editor-preview .paper{padding:28px;margin:0;background:white;box-shadow:0 4px 20px #233a5210;border:1px solid #d9e2ea;min-height:620px}.editor-preview .paper h2{font-size:25px;margin:22px 0;text-align:center}.editor-preview .paper-top{font-size:10px}.editor-preview .paper-info{font-size:11px}.editor-preview .paper-info b{font-size:10px}.editor-preview .paper-content{font-size:12px;min-height:100px}.editor-preview .signature-box{font-size:10px}.editor-preview .signature-box strong{font-size:12px}
 .structured-editor>.modal-foot{position:sticky;bottom:0;z-index:5;padding:16px 24px;background:#fff;box-shadow:0 -4px 18px #253b5010}.structured-editor>.modal-foot button{min-height:44px}.editor-save-note{font-size:12px;color:#697c8f;margin-right:auto}
 @media(max-width:1050px){.structured-editor .editor-layout{grid-template-columns:1fr}.editor-preview{position:static}.editor-preview .paper{min-height:0}.editor-save-note{display:none}}
 @media(max-width:600px){#modal:has(.structured-editor){width:100%;max-height:100dvh;height:100dvh;margin:0;border-radius:0}.structured-editor>.modal-head{padding:16px}.structured-editor .editor-layout{padding:12px;gap:12px}.editor-section{padding:16px}.editor-section .form-grid{grid-template-columns:1fr}.editor-section input,.editor-section select,.editor-section textarea{font-size:16px}.editor-preview .paper{padding:16px}.form-facts{grid-template-columns:1fr}.form-facts>div{grid-template-columns:95px 1fr}.form-paper-table{font-size:9px}.form-paper-table th,.form-paper-table td{padding:5px 3px!important}.form-totals{gap:12px}.form-totals dd{font-size:13px}.preview-caption{flex-wrap:wrap}}
}

@media screen and (min-width:1051px){.structured-editor .editor-layout{height:calc(94dvh - 190px);overflow:hidden}.editor-input,.editor-preview{height:100%;max-height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:6px}.editor-preview{position:static}.structured-editor>.modal-head{position:static}.structured-editor>.modal-foot{position:static}}

/* Approval belongs to the first-page header, before all document content. */
.document-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:20px 0 24px;break-inside:avoid}.document-heading h2{flex:1;min-width:0;overflow-wrap:anywhere;margin:0!important;text-align:center}.document-approval{display:flex;flex:0 0 auto;border:1px solid #637386;color:#25374a;max-width:100%;font-size:11px}.approval-caption{display:flex;flex-direction:column;justify-content:center;text-align:center;padding:8px;border-right:1px solid #637386;line-height:1.8}.approval-cell{width:74px;text-align:center;border-right:1px solid #637386}.approval-cell:last-child{border-right:0}.approval-cell>b{display:block;background:#f0f3f6;padding:6px;border-bottom:1px solid #637386;font-size:11px}.approval-mark{min-height:73px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:5px 3px;gap:3px}.approval-mark strong{font-size:11px;overflow-wrap:anywhere}.approval-mark small{font-size:8px;color:#64748b}.approval-mark .submission-image{width:60px;height:28px;object-fit:contain;margin:0}.editor-preview .document-heading h2{font-size:22px}.editor-preview .document-approval{margin-left:auto}
@media(max-width:600px){.document-heading{flex-wrap:wrap}.document-heading h2{flex-basis:100%}.document-approval{margin-left:auto}}
@media print{.document-heading{display:flex;flex-wrap:nowrap}.document-approval{margin-left:auto}.approval-cell{width:24mm}.approval-mark{min-height:22mm}}
/* A single ruled document system. Dark frame, clear cell divisions, restrained fills. */
.paper:not(.trip-paper){--doc-frame:#24384d;--doc-rule:#748294;--doc-fill:#e8edf2;--doc-label:#f1f4f7;font-family:"Malgun Gothic","Apple SD Gothic Neo",sans-serif;color:#172635}
.paper .paper-top{border-bottom:2px solid var(--doc-frame);padding-bottom:10px;color:#405367}
.paper .document-heading{margin:18px 0;min-height:105px;gap:18px}
.paper .document-heading h2{font-size:27px;font-weight:700;letter-spacing:.09em;line-height:1.4;word-break:keep-all;color:#172635}
.paper .document-approval{border:2px solid var(--doc-frame);color:#172635}
.paper .approval-caption,.paper .approval-cell{border-right:1px solid var(--doc-rule)}.paper .approval-cell:last-child{border-right:0}
.paper .approval-cell>b{background:var(--doc-fill);border-bottom:1px solid var(--doc-rule);font-weight:700}.paper .approval-caption{background:var(--doc-label)}
.paper .paper-subject{display:grid;grid-template-columns:90px 1fr;border:2px solid var(--doc-frame);font-size:12px;line-height:1.6}
.paper-subject>b{padding:11px 12px;background:var(--doc-fill);border-right:1px solid var(--doc-rule);font-weight:700;text-align:center}.paper-subject>span{padding:11px 12px;overflow-wrap:anywhere;white-space:pre-wrap;font-weight:600}
.paper .paper-info{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0 0 16px;border:2px solid var(--doc-frame);border-top:0;font-size:11px}
.paper .paper-info>div{display:grid;grid-template-columns:90px 1fr;align-items:stretch;padding:0;line-height:1.7;min-height:35px;border:0;border-bottom:1px solid var(--doc-rule);overflow-wrap:anywhere}
.paper .paper-info>div:nth-child(odd){border-right:1px solid var(--doc-rule)}
.paper .paper-info b{padding:9px 6px;background:var(--doc-label);border-right:1px solid var(--doc-rule);font-size:10px;margin:0;text-align:center;font-weight:600}.paper .paper-info>div>span{padding:9px 10px}.paper .paper-info>div:last-child:nth-child(odd){grid-column:1/-1;border-right:0}
.paper .document-section{margin:18px 0 0;border:2px solid var(--doc-frame)}
.paper .document-section>h3{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:700;letter-spacing:.01em;background:var(--doc-frame);color:#fff;border:0;border-bottom:1px solid var(--doc-frame);margin:0;padding:10px 12px;line-height:1.4;break-after:avoid}
.paper .document-section>h3 span{color:#d5e0eb;border-right:1px solid #8192a5;padding-right:10px;font-size:10px;font-weight:500}
.paper .form-facts{border:0;gap:0;margin:0}.paper .form-facts>div{grid-template-columns:100px 1fr;border:0;border-bottom:1px solid var(--doc-rule);min-height:39px}
.paper .form-facts>div:nth-child(odd){border-right:1px solid var(--doc-rule)}.paper .form-facts>div.fact-wide{grid-column:1/-1;border-right:0}
.paper .form-facts dt{background:var(--doc-label);color:#33485e;border-right:1px solid var(--doc-rule);font-size:10px;padding:10px;font-weight:600}.paper .form-facts dd{font-size:11px;padding:10px;line-height:1.6}
.paper .form-facts>div:last-child:nth-child(odd){grid-column:1/-1;border-right:0}
.paper .form-prose{border:0;border-bottom:1px solid var(--doc-rule)}.paper .form-prose h4{font-size:11px;font-weight:700;background:var(--doc-fill);margin:0;padding:9px 12px;border-bottom:1px solid var(--doc-rule);break-after:avoid;color:#24384d}
.paper .form-prose p{padding:12px 14px;margin:0;min-height:64px;border:0;font-size:12px;line-height:1.85}
.paper .form-paper-table{border:0;margin:0}.paper .form-paper-table th,.paper .form-paper-table td{border:1px solid var(--doc-rule);font-size:11px;vertical-align:top;padding:10px 8px!important;line-height:1.6}
.paper .form-paper-table tr>*:first-child{border-left:0}.paper .form-paper-table tr>*:last-child{border-right:0}.paper .form-paper-table thead tr:first-child>*{border-top:0}
.paper .form-paper-table th{background:var(--doc-fill);color:#24384d;text-align:center;vertical-align:middle;font-weight:700}.paper .form-paper-table th:first-child{width:auto}.paper .form-paper-table .numeric{text-align:right;font-variant-numeric:tabular-nums;word-break:normal}.paper .row-number{text-align:center;color:#465a70}
.paper .form-totals{background:var(--doc-label);border:0;border-top:2px solid var(--doc-frame);gap:0;padding:0;justify-content:flex-end}.paper .form-totals>div{min-width:105px;flex:1;padding:12px 14px;border-right:1px solid var(--doc-rule);text-align:right}.paper .form-totals>div:last-child{border-right:0;background:var(--doc-fill)}.paper .form-totals dt{font-size:10px;color:#465a70}.paper .form-totals dd{font-size:15px;font-weight:700;color:#172635}.paper .form-totals>div:last-child dd{color:#172635}
.paper .document-section>:last-child{border-bottom:0}
.paper .paper-content{min-height:100px;padding:14px;border:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85}
.editor-section .form-field.wide{grid-column:1/-1}.editor-input .editor-section{border-color:#b5c1cd}.editor-input .editor-section h3{margin-bottom:16px}.editor-input textarea{min-height:110px}.editor-input .form-grid{align-items:start}.editor-input input,.editor-input select,.editor-input textarea{border-color:#9eafbf}
.editor-preview .paper{min-height:900px!important}.editor-preview .document-heading h2{font-size:25px}.editor-preview .paper .paper-info{font-size:10px}.editor-preview .paper .paper-info>div{grid-template-columns:80px 1fr}.editor-preview .paper-subject{grid-template-columns:80px 1fr}
@media screen and (max-width:600px){.paper .document-heading h2{font-size:23px}.paper .paper-info{grid-template-columns:1fr}.paper .paper-info>div:nth-child(odd){border-right:0}.paper .paper-info>div:nth-last-child(2){border-bottom:1px solid var(--doc-rule)}.paper .form-facts{grid-template-columns:1fr}.paper .form-facts>div{border-right:0!important;grid-template-columns:90px 1fr}.paper .form-paper-table th,.paper .form-paper-table td{font-size:9px;padding:6px 3px!important}.editor-preview .paper{min-height:0!important}.paper .form-totals>div{min-width:90px;padding:10px}.paper .form-facts>div:not(:last-child){border-bottom:1px solid var(--doc-rule)!important}}
@media print{.paper{print-color-adjust:exact;-webkit-print-color-adjust:exact}.paper .document-heading{min-height:30mm;margin:4mm 0}.paper .document-heading h2{font-size:20pt}.paper .paper-subject{font-size:10pt}.paper .document-section{margin-top:4mm}.paper .document-section>h3{font-size:10pt}.paper .form-prose p{font-size:10pt;min-height:12mm}.paper .form-paper-table td,.paper .form-paper-table th{font-size:9pt}.form-paper-table thead{display:table-header-group}.form-paper-table tr{break-inside:avoid}.form-totals{break-inside:avoid}.paper .paper-info,.paper-subject{break-inside:avoid}.paper .paper-content{font-size:11pt}}

.document-company{display:flex;align-items:center;gap:8px}.document-company img{width:28px;height:28px;object-fit:contain}.paper .paper-top{align-items:center}.trip-paper .paper-top{border-bottom:1px solid #425466;padding-bottom:8px}.trip-paper .trip-sheet{margin-top:16px}@media print{.document-company img{width:7mm;height:7mm}}

.document-company img.document-company-logo{width:120px;height:auto;max-height:31px;object-fit:contain}@media print{.document-company img.document-company-logo{width:26mm;height:auto;max-height:7mm}}
