.di {max-width:1100px;margin:auto}.di .card {margin-bottom:16px}.di h2,.di h3 {margin-bottom:12px}
.di-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.di label {display:block;font-size:14px;margin:6px 0}
.di input:not([type=checkbox]):not([type=radio]),.di select,.di textarea {width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#182d3f;box-sizing:border-box}
.di textarea {min-height:76px;resize:vertical}.di .di-check {display:flex;align-items:center;gap:8px}.di-check input {width:auto}
.di-row {display:flex;gap:10px;flex-wrap:wrap;align-items:center}.di-row > span {flex:1}.di-muted {color:#526375;font-size:13px;line-height:1.7}
.di-notice {padding:12px;border-radius:6px;background:#eef6ff;white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0}
.di-error {background:#fff1ee;color:#9e2f1b}.di-source {white-space:pre-wrap;background:#f5f7fa;padding:12px;line-height:1.7;overflow-wrap:anywhere}
.di fieldset {border:0;padding:0;min-width:0}.di fieldset:disabled {opacity:.65}.di details {margin:12px 0}.di summary {cursor:pointer}
.di-actions {position:sticky;bottom:0;background:#fff;padding:14px;border-top:1px solid #ddd;box-shadow:0 -4px 12px #0001}
.di button {margin:3px 0}.di-result {border-bottom:1px solid #e2e8f0;padding:12px 0;overflow-wrap:anywhere}
@media(max-width:700px){.di-grid{grid-template-columns:1fr}.di .card{padding:16px}.di-actions{position:static}.di-row{align-items:stretch}}

.di-candidate {display:block;padding:12px;margin:8px 0;border:1px solid #cbd5e1;border-radius:8px;overflow-wrap:anywhere;}
.di-registry {border-left:3px solid #0f766e;padding-left:12px;margin:16px 0;}
.di .di-candidate input[type=radio] {width:auto;margin-right:8px;}
.di-group-item{padding:12px 0;border-bottom:1px solid #e2e8f0;overflow-wrap:anywhere}
.di-group-edit{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.di-group-edit label{flex:1 1 220px;min-width:0;margin:0}
.di-group-item .di-notice p{margin:0 0 8px}.di-group-edit button{flex-shrink:0}
@media(max-width:700px){.di-group-edit label{flex-basis:100%}}

/* Registration preview only. The risk detail editor keeps its existing form. */
.di-ledger-preview{--ledger-seq:64px;--ledger-description:280px;min-width:0}
.di .di-ledger-preview h2{overflow-wrap:anywhere;font-size:22px}
.di-ledger-table-scroll{overflow:auto;max-height:65vh;max-height:65dvh;min-height:180px;border:1px solid #b9c9c5;border-radius:8px;overscroll-behavior:contain;scrollbar-gutter:stable;isolation:isolate}
.di-ledger-table{width:2434px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:14px;color:#182d3f;margin:0}
.di-ledger-col-location{width:160px}
.di-ledger-choice{display:flex;justify-content:space-between;align-items:center;gap:6px;width:100%;min-height:34px;padding:6px 4px;border:1px solid transparent;border-radius:5px;background:transparent;color:inherit;text-align:left;cursor:pointer;font:inherit;overflow-wrap:anywhere}
.di-ledger-choice:not(:disabled):hover,.di-ledger-choice:focus-visible{border-color:#a6bfc3;background:#f1f7f6}
.di-ledger-choice:disabled{opacity:1;cursor:default}
.di-ledger-choice:disabled .di-choice-arrow{display:none}
.di-choice-arrow{color:#6c8588}
.di.di-ledger-dialog.di-ledger-choice-dialog{width:460px;padding:20px;overflow:hidden}
.di-ledger-choice-dialog [hidden]{display:none!important}
.di-ledger-choice-dialog .di-ledger-dialog-head{margin-bottom:14px}
.di-ledger-choice-dialog .di-ledger-dialog-head h3{font-size:17px}
.di-choice-header-copy p{font-size:12px;color:#78838b;margin:5px 0 0;line-height:1.5}
.di .di-choice-close{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;margin:0;border:0;border-radius:5px;background:transparent;font-size:25px;font-weight:400;color:#7c858c;cursor:pointer}
.di .di-choice-close:hover{background:#f1f3f5;color:#263544}
.di-ledger-choice-dialog [data-choice-search],.di-ledger-choice-dialog [data-choice-manual]{height:38px;padding:8px 10px;font-size:14px}
.di-choice-modes{display:flex;gap:4px;padding:3px;background:#f2f4f5;border-radius:7px;margin-bottom:14px}
.di .di-choice-modes button{flex:1;min-height:34px;margin:0;border:0;border-radius:5px;background:transparent;color:#657079;font-size:14px;cursor:pointer}
.di .di-choice-modes button[aria-pressed=true]{background:#fff;color:#c76716;box-shadow:0 1px 4px #182d3f14;font-weight:600}
.di-choice-options{max-height:min(360px,45vh);overflow:auto;margin:12px 0 0;border:1px solid #e2e6e9;border-radius:7px;overscroll-behavior:contain}
.di.di-ledger-choice-dialog .di-choice-option{display:grid;grid-template-columns:17px minmax(0,1fr);align-items:center;gap:10px;box-sizing:border-box;min-height:48px;padding:5px 12px;margin:0;border-bottom:1px solid #edf0f2;cursor:pointer;text-align:left}
.di-ledger-choice-dialog .di-choice-option:last-child{border-bottom:0}
.di-ledger-choice-dialog .di-choice-option:hover{background:#faf8f5}
.di-ledger-choice-dialog .di-choice-option.is-selected{background:#fff3e8}
.di.di-ledger-choice-dialog .di-choice-option input[type=radio],.di.di-ledger-choice-dialog .di-choice-option input[type=checkbox]{display:block;width:17px;height:17px;min-width:17px;max-width:17px;min-height:17px;margin:0;padding:0;accent-color:#e68428;box-shadow:none;cursor:pointer}
.di-choice-option-copy{display:block;min-width:0}
.di-choice-option-copy strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:20px;font-weight:500;color:#263544}
.di-choice-option-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7d8790;font-size:11px;line-height:16px}
.di-choice-manual{padding:5px 0 8px;min-height:112px}
.di-choice-manual p,.di-choice-current{font-size:12px;color:#78838b;margin:10px 0 0;line-height:1.6}
.di-choice-current{max-height:42px;overflow:auto}
.di-choice-empty-result{padding:12px;color:#78838b;font-size:13px;text-align:center;margin:0}
.di-choice-error{min-height:0;margin:8px 0 0;font-size:13px;color:#ad3c23}
.di-choice-error:empty{display:none}
.di-choice-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;border-top:1px solid #edf0f2;padding-top:12px}
.di .di-choice-actions button{min-width:72px;margin:0}
.di-choice-confirm{display:flex;gap:8px;align-items:center}
.di-ledger-table .di-ledger-col-seq{width:var(--ledger-seq)}
.di-ledger-table .di-ledger-col-description{width:var(--ledger-description)}
.di-ledger-col-blank{width:80px}.di-ledger-col-date{width:156px}.di-ledger-col-photo{width:190px}
.di-ledger-col-category{width:140px}.di-ledger-col-level{width:130px}
.di-ledger-col-unit{width:152px}.di-ledger-col-person{width:132px}.di-ledger-col-measure{width:260px}
.di-ledger-col-deadline{width:164px}.di-ledger-col-remarks{width:204px}
.di-ledger-zoom{display:flex;align-items:center;gap:6px;font-size:13px;white-space:nowrap}
.di .di-ledger-zoom input[type=range]{flex:0 1 120px;width:120px;min-width:72px;height:28px;min-height:0;padding:0;margin:0;border:0;background:transparent}
.di-ledger-zoom output{flex:0 0 40px;font-variant-numeric:tabular-nums;text-align:center}
.di .di-ledger-zoom .btn{flex:0 0 auto;min-width:30px;white-space:nowrap}
.di-deadline-gear{border:0;background:transparent;color:#236c5b;padding:0 3px;font-size:18px;cursor:pointer}
.di-deadline-gear:focus-visible{outline:2px solid #25806b}
.di.di-ledger-dialog.di-ledger-deadline-dialog{width:520px}
.di.di-ledger-deadline-dialog .di-deadline-option{display:grid;grid-template-columns:18px minmax(0,1fr);gap:10px;align-items:start;text-align:left;margin:14px 0;line-height:1.6;cursor:pointer}
.di.di-ledger-deadline-dialog .di-deadline-option input{width:16px;height:16px;min-height:0;margin:3px 0 0;padding:0;accent-color:#1d7960}
.di-deadline-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:16px;flex-wrap:wrap}
.di-deadline-actions [data-clear-date]{margin-right:auto}
.di-ledger-table [data-ledger-field=deadline_text][readonly]:not(:disabled){cursor:pointer}
.di-ledger-recheck-dialog{width:1100px}
.di-recheck-scroll{max-height:60vh;overflow:auto;margin:12px 0}
.di-recheck-scroll table{width:100%;border-collapse:collapse}
.di-recheck-scroll th,.di-recheck-scroll td{padding:10px;border:1px solid #cdd8d5;text-align:left}
@media(max-width:600px){.di-ledger-zoom{font-size:12px;gap:3px}.di .di-ledger-zoom input[type=range]{width:80px;flex-basis:80px}}
@media(max-width:360px){.di-ledger-zoom{gap:2px}.di .di-ledger-zoom input[type=range]{width:72px;flex-basis:72px}.di-ledger-zoom output{flex-basis:36px}}
.di-ledger-table th,.di-ledger-table td{padding:12px 8px;border:0;border-right:1px solid #cdd8d5;border-bottom:1px solid #cdd8d5;text-align:center;vertical-align:middle;white-space:normal;background:#fff;overflow-wrap:anywhere}
.di-ledger-table th:last-child,.di-ledger-table td:last-child{border-right:0}
/* Manual rows have separate tbody groups; keep each row's bottom border. */
.di-ledger-table thead th{position:sticky;top:0;z-index:3;background:#edf5f1;font-weight:700;color:#183d31;box-shadow:0 1px 0 #a7bdb5;padding:14px 6px}
.di-ledger-table th:first-child,.di-ledger-table td:first-child{position:sticky;left:0;z-index:2}
.di-ledger-table th:nth-child(2),.di-ledger-table td:nth-child(2){position:sticky;left:var(--ledger-seq);z-index:2;box-shadow:3px 0 4px -3px #3c595b80}
.di-ledger-table thead th:first-child,.di-ledger-table thead th:nth-child(2){z-index:4}
.di-ledger-table.di-ledger-sequence-only td:nth-child(2){position:static;box-shadow:none}
.di-ledger-table.di-ledger-sequence-only th:nth-child(2){left:auto;box-shadow:none}
.di-ledger-table .is-selected td{background:#fcfefd}
.di-ledger-table .is-selected td:first-child{background:#f0f8f3}
.di-ledger-table td.di-ledger-blank{background:repeating-linear-gradient(135deg,#f7f9f8,#f7f9f8 5px,#f2f5f3 5px,#f2f5f3 6px)}
.di .di-ledger-table textarea,.di .di-ledger-table input[type=date]{min-height:42px;border:1px solid transparent;border-radius:4px;padding:8px 5px;background:transparent;text-align:left;font-size:14px;line-height:1.65;resize:vertical;color:#182d3f}
.di .di-ledger-table select{width:100%;min-height:38px;font-size:14px;padding:6px 3px;background:#fff;border:1px solid #b9c9c5;cursor:pointer}
.di .di-ledger-table select:focus-visible{outline:2px solid #25806b;outline-offset:-1px}
.di .di-ledger-table select:disabled{background:transparent;border-color:transparent;opacity:1}
.di .di-ledger-table textarea{min-height:64px}
.di .di-ledger-table textarea[data-ledger-field=description]{min-height:88px}
.di .di-ledger-table textarea[data-ledger-field=location]{min-height:38px;height:38px}
.di .di-ledger-table textarea::placeholder{color:#8b979d}
.di .di-ledger-table textarea:hover,.di .di-ledger-table input[type=date]:hover{border-color:#aabfb7}
.di .di-ledger-table textarea:focus,.di .di-ledger-table input[type=date]:focus{outline:2px solid #25806b;outline-offset:-1px;background:#fff}
.di .di-ledger-table textarea[aria-invalid=true]{border-color:#e8aa9b;background:#fff8f5}
.di .di-ledger-table :disabled{color:#66756f;cursor:default;resize:none}
.di .di-ledger-sequence{display:flex;flex-direction:column;align-items:center;gap:8px;margin:0;font-weight:600}
.di-ledger-sequence input{accent-color:#1d7960;width:18px;height:18px}
.di-ledger-table small{font-size:11px;color:#688075;display:block;margin-top:8px}
.di .di-ledger-location{font-size:12px;color:#6a7d75;text-align:left;border-top:1px dashed #dde5e1;padding-top:6px}
.di-ledger-row-tools{display:flex;align-items:center;justify-content:space-between;gap:5px;flex-wrap:wrap}
.di-ledger-row-tools .btn{font-size:12px;padding:5px 8px}
.di-ledger-missing{font-size:12px;color:#90723e;line-height:1.5}
.di-ledger-photos{display:flex;gap:8px;align-items:center;flex-direction:column;margin-bottom:8px}
.di .di-ledger-thumb{display:block;border:1px solid #e0e7e3;background:#f5f8f6;border-radius:6px;padding:3px;width:100%;min-height:104px;cursor:zoom-in;overflow:hidden;color:#65766f;font-size:12px}
.di-ledger-thumb img{display:block;width:100%;height:132px;object-fit:contain;background:#fff}
.di-ledger-thumb img:not([src]){display:none}
.di-ledger-thumb [data-image-status]{display:block;padding:28px 3px}
.di-ledger-thumb [data-image-status][hidden]{display:none}
.di-photo-card{position:relative;width:100%;min-width:0}
.di .di-photo-more{position:absolute;right:4px;top:4px;width:28px;min-height:28px;padding:0;border:1px solid #c6d6ce;border-radius:5px;background:#fffffff0;color:#365b4e;font-size:20px;line-height:24px;cursor:pointer}
.di-photo-menu{position:fixed;z-index:16000;width:130px;max-height:calc(100vh - 16px);overflow:auto;box-sizing:border-box;padding:5px;background:#fff;border:1px solid #c6d6ce;border-radius:7px;box-shadow:0 6px 24px #183b3526}
.di-photo-menu button{display:block;width:100%;border:0;border-radius:4px;background:white;color:#233b31;text-align:left;padding:8px 12px;font:14px/1.4 system-ui,sans-serif;cursor:pointer}
.di-photo-menu button:hover,.di-photo-menu button:focus-visible{background:#fff1e1}
.di-photo-menu button:disabled{opacity:.4;cursor:default}
.di-direct-photo-cell.is-dragover{outline:2px solid #238c78;outline-offset:-3px;background:#edf8f1}
.di .di-ledger-confirm{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:5px 0;background:#fff;border-top:1px solid #e0e8e4;margin-top:6px;min-height:42px;box-sizing:border-box}
.di-ledger-confirm strong{font-size:15px;color:#245c4c}
body.mobile-shell .di .di-ledger-confirm{bottom:calc(88px + env(safe-area-inset-bottom))}
.di-ledger-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.di.di-ledger-dialog{box-sizing:border-box;width:900px;max-width:calc(100vw - 24px);max-height:90vh;max-height:90dvh;overflow:auto;border:1px solid #c5d2cc;border-radius:12px;padding:20px;box-shadow:0 12px 48px #152d3240;margin:auto}
.di-ledger-dialog::backdrop{background:#102b3659}
.di-ledger-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.di .di-ledger-dialog-head h3{font-size:18px;margin:0}
.di-ledger-dialog-head .btn{flex-shrink:0}
.di-ledger-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px;max-height:48vh;overflow:auto;padding:2px}
.di-ledger-photo-option{border:1px solid #d7e1dc;border-radius:8px;padding:8px;min-width:0}
.di-ledger-photo-option .di-check{overflow-wrap:anywhere;font-size:12px;align-items:flex-start}
.di-ledger-photo-option input[type=checkbox]{flex-shrink:0;accent-color:#1d7960;margin-top:3px}
.di-ledger-large-photo{display:block;max-width:100%;max-height:74vh;object-fit:contain;margin:auto}
@media(max-width:700px){
    .di-ledger-preview{--ledger-seq:44px;--ledger-description:160px}
    .di-ledger-table{width:2294px}
    .di .di-ledger-preview h2{font-size:18px}
    .di-ledger-table-scroll{max-height:62vh;max-height:62dvh}
    .di-ledger-table th,.di-ledger-table td{padding:8px 4px}
    .di-ledger-table thead th{font-size:12px}
    .di .di-ledger-table textarea,.di .di-ledger-table input[type=date]{font-size:14px}
    .di-ledger-confirm .btn{margin-top:0}
    .di.di-ledger-dialog{padding:14px}
    .di-ledger-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .di-ledger-gallery .di-ledger-thumb img{height:100px}
}

/* Dedicated registration route: the table uses the full workspace viewport. */
body.document-ledger-page{overflow:hidden}
body.document-ledger-page #sidebar,body.document-ledger-page #mobile-tabbar,
body.document-ledger-page #workspace-signature,body.document-ledger-page #demo-project-banner{display:none}
body.document-ledger-page #app{display:block;height:100vh;height:100dvh;min-height:0;overflow:hidden}
body.document-ledger-page .workspace-shell{margin:0;width:100%;height:100%;min-height:0}
body.document-ledger-page #main-content{margin:0;width:100%;height:100%;min-height:0;padding:8px;box-sizing:border-box}
.di.di-ledger-workspace{display:flex;flex-direction:column;gap:4px;height:100%;max-width:none;min-height:0;background:#fff;padding:8px;border-radius:10px;box-sizing:border-box}
.di-ledger-page-head{position:relative;z-index:10;display:flex;align-items:center;gap:8px;flex-shrink:0;min-height:40px;box-sizing:border-box;border-bottom:1px solid #e0e8e4;padding-bottom:4px;white-space:nowrap}
.di-ledger-page-head > div{flex:0 0 auto;min-width:0}
.di-ledger-page-head h1{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:17px;line-height:1.4;margin:0}
.di-ledger-title{display:block;max-width:100%;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:3px 0;cursor:pointer}
.di-ledger-title:hover:not(:disabled){text-decoration:underline;text-underline-offset:3px}
.di-ledger-title:focus-visible{outline:2px solid #237664;outline-offset:-2px;border-radius:3px}
.di-ledger-title:disabled{opacity:1;cursor:default}
.di-title-dialog{width:min(480px,calc(100vw - 24px));box-sizing:border-box}
.di-title-dialog input{width:100%;box-sizing:border-box}.di-title-dialog [data-title-error]{white-space:normal;overflow-wrap:anywhere}
.di-ledger-page-head > span{flex-shrink:0;font-size:12px;color:#526375}
.di-ledger-page-head .di-ledger-project{max-width:180px;overflow:hidden;text-overflow:ellipsis}
.di-ledger-page-head .btn{flex-shrink:0;font-size:13px;padding:5px 10px;min-height:30px}
.di-ledger-preview [hidden],.di-ledger-workspace [hidden]{display:none!important}
.di-ledger-workspace #di-message:empty,.di-ledger-workspace #di-result:empty{display:none}
.di-ledger-workspace #di-message,.di-ledger-workspace #di-result{margin:0;padding:0;font-size:13px}
.di-ledger-workspace .di-ledger-popover{margin:0}
.di-ledger-popover > summary{padding:5px 10px;min-height:30px;box-sizing:border-box;border:1px solid #d7dfdb;border-radius:5px;font-size:13px;line-height:18px;font-weight:400;cursor:pointer;background:#fff}
.di-ledger-popover > div{position:absolute;right:0;top:calc(100% + 4px);width:420px;max-width:100%;max-height:60vh;overflow:auto;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;background:#fff;border:1px solid #c5d2cc;border-radius:8px;padding:12px;box-shadow:0 6px 24px #152d3230}
.di-ledger-popover > div p{margin:4px 0}
.di-ledger-alert{color:#a44326!important;border-color:#d7ad9e!important;background:#fff9f4!important}
.di-ledger-workspace #di-preview{flex:1;min-height:0;display:flex;flex-direction:column}
body.document-ledger-page .di .di-ledger-preview{flex:1;display:flex;flex-direction:column;min-height:0;margin:0;padding:0;box-shadow:none}
.di-ledger-workspace .di-ledger-preview > fieldset{flex:1;display:flex;flex-direction:column;min-height:0}
.di-ledger-workspace .di-ledger-table-scroll{flex:1;max-height:none;min-height:0}
.di-ledger-workspace .di-ledger-table{width:max(100%,2434px)}
.di-ledger-workspace .di-ledger-col-description{width:auto}
.di-ledger-workspace .di-ledger-table textarea{resize:none;overflow:hidden}
body.document-ledger-page .di .di-ledger-confirm{position:static;flex-shrink:0;margin:0;gap:8px}
.di-ledger-counts{flex:1;display:flex;align-items:center;min-width:0;white-space:nowrap}
.di-ledger-counts strong{font-size:13px;font-weight:500}
.di .di-ledger-confirm .btn{font-size:13px;padding:4px 8px;line-height:20px;height:30px;min-height:30px;margin:0;width:auto;box-sizing:border-box;white-space:nowrap}
.di-ledger-workspace .di-ledger-zoom{flex-shrink:0}
.di-ledger-workspace .di-ledger-zoom .btn{padding:4px 8px}
.di-ledger-workspace #di-result h2{font-size:16px;margin:0 0 4px}
.di.di-ledger-settings-dialog,.di.di-ledger-help-dialog{width:620px;overflow-wrap:anywhere}
.di-ledger-settings-dialog p,.di-ledger-help-dialog p{margin:12px 0;line-height:1.6}
.di-person-status{display:block;font-size:12px;line-height:1.5;text-align:left;overflow-wrap:anywhere}
.di-person-status.is-matched{color:#176a53}.di-person-status.is-review{color:#a1531e}.di-person-status.is-missing{color:#697b74}
[data-people-cell] .btn{font-size:12px;padding:5px}
.di-people-candidates{max-height:40vh;overflow:auto}
.di-ledger-people-dialog .di-candidate{margin:6px 0;padding:10px}
.di.di-allocation-dialog,.di.di-entry-dialog{width:960px;max-width:calc(100vw - 24px);max-height:90vh;max-height:90dvh;box-sizing:border-box;padding:0;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#23352f;font:14px/1.5 system-ui,"Microsoft YaHei",sans-serif;box-shadow:0 18px 64px #132e3538;overflow:hidden}
.di.di-allocation-dialog[open],.di.di-entry-dialog[open]{display:flex;flex-direction:column}
.di-allocation-dialog::backdrop,.di-entry-dialog::backdrop{background:#122b354d}
.di .di-allocation-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid #e1e7e4;flex-shrink:0}
.di .di-allocation-head h2{margin:0;font-size:18px;line-height:1.4}.di-allocation-head h2 small{font-size:13px;color:#71827a;font-weight:400}
.di .di-allocation-body{overflow:auto;min-height:0;padding:12px 16px;overscroll-behavior:contain}
.di .di-allocation-body h3{font-size:14px;margin:8px 0}.di .di-allocation-description{margin:0 0 10px;overflow-wrap:anywhere;color:#4e6259}
.di .di-allocation-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(160px,2.3fr) 112px 126px;gap:10px;align-items:start;padding:10px 0;border-bottom:1px solid #e1e7e4}
.di .di-allocation-unit small,.di .di-allocation-deadline small{display:block;color:#728179;font-size:12px}
.di .di-unit-warning,.di .di-allocation-unit small.di-unit-warning{color:#b42318}
.di .di-unit-warning-detail{display:block;font-size:12px;line-height:1.5;margin-top:3px;overflow-wrap:anywhere}
.di .di-allocation-measure{white-space:pre-wrap;overflow-wrap:anywhere}.di .di-allocation-state{display:inline-block;font-size:12px;border-radius:4px;padding:1px 6px;background:#fff3dc;color:#8a5b13;margin-top:4px}.di .di-allocation-state.is-complete{background:#e4f4ec;color:#226d50}
.di .di-allocation-actions{display:flex;flex-wrap:wrap;gap:4px}.di .di-allocation-actions small{color:#728179}
.di .di-allocation-footer{padding:10px 16px;border-top:1px solid #e1e7e4;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-shrink:0;background:#fafcfb}
.di .di-allocation-footer>span{flex:1;font-size:12px;overflow-wrap:anywhere;color:#53695d}
.di.di-allocation-dialog .btn,.di.di-entry-dialog .btn{width:auto;margin:0;white-space:nowrap;font-size:13px;padding:6px 10px;min-height:30px;line-height:1.4}
.di .di-allocation-list{margin-bottom:10px}
.di .di-allocation-editor{margin-top:10px;padding:12px;background:#f5f9f7;border:1px solid #cbded2;border-radius:6px}
.di .di-allocation-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}.di .di-allocation-editor-grid label{display:block;min-width:0}.di .di-allocation-wide{grid-column:1/-1}.di .di-allocation-editor-buttons{display:flex;align-items:flex-end;justify-content:flex-end;gap:6px}
.di .di-allocation-editor input,.di .di-allocation-editor select,.di .di-allocation-editor textarea{box-sizing:border-box;min-height:34px;padding:6px 8px;width:100%;font-size:14px;line-height:1.45}
.di .di-allocation-diff{padding-left:20px;margin:6px 0;overflow-wrap:anywhere}.di .di-allocation-diff li{padding:5px 0}.di .di-allocation-diff small{display:block;color:#74837b}
.di .di-allocation-history{margin-top:14px;color:#53695d}.di .di-allocation-history section{border-bottom:1px solid #e1e7e4;padding:8px 0}.di .di-allocation-history p{margin:3px 0}
.di .di-dispatch-allocation{display:grid;grid-template-columns:120px minmax(180px,1fr) 140px;gap:10px;align-items:start;margin:8px 0;padding:8px;background:#f5f9f7}.di .di-dispatch-allocation label{font-size:12px}.di .di-dispatch-allocation textarea,.di .di-dispatch-allocation input{width:100%;box-sizing:border-box;font-size:14px}
.di .di-ledger-unit-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 8px;margin:4px 0 8px;overflow-wrap:anywhere}.di .di-ledger-unit-tools small{font-size:12px;color:#71827a}
.di.di-entry-dialog .di-grid{gap:10px 14px}.di.di-entry-dialog label{font-size:13px}.di.di-entry-dialog input,.di.di-entry-dialog select,.di.di-entry-dialog textarea{font-size:14px;padding:7px 9px;box-sizing:border-box}.di.di-entry-dialog textarea{min-height:64px}.di.di-entry-dialog input:disabled,.di.di-entry-dialog textarea:disabled{color:#52645b;background:#f3f6f4}
@media(max-width:700px){
    .di.di-allocation-dialog,.di.di-entry-dialog{max-width:calc(100vw - 16px);max-height:94dvh}
    .di .di-allocation-head,.di .di-allocation-body,.di .di-allocation-footer{padding:10px 12px}
    .di .di-allocation-row{grid-template-columns:1fr auto;gap:6px 10px}.di .di-allocation-unit{grid-column:1}.di .di-allocation-measure{grid-column:1/-1;grid-row:2}.di .di-allocation-deadline{grid-column:2;grid-row:1;text-align:right}.di .di-allocation-actions{grid-column:1/-1;justify-content:flex-end}
    .di .di-dispatch-allocation{grid-template-columns:1fr}.di .di-dispatch-allocation textarea{min-height:64px}
    .di .di-allocation-footer{flex-wrap:wrap}.di .di-allocation-footer>span{flex-basis:100%}.di .di-allocation-editor-grid{grid-template-columns:1fr}.di .di-allocation-wide{grid-column:1}.di.di-entry-dialog .di-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
    body.document-ledger-page #main-content{padding:4px}
    .di.di-ledger-workspace{padding:6px;gap:4px}
    .di-ledger-page-head{gap:4px 6px;flex-wrap:wrap}
    .di-ledger-page-head .btn{padding:4px 8px;font-size:12px;min-height:28px}
    .di-ledger-page-head h1{font-size:15px;flex-basis:calc(100% - 130px)}
    .di-ledger-page-head .di-ledger-project{display:none}
    .di-ledger-page-head [data-ledger-overview],.di-ledger-page-head > div{order:1}
    .di-ledger-workspace .di-ledger-table{width:max(100%,2294px)}
    .di-ledger-workspace .di-ledger-confirm{gap:4px}
    .di-ledger-workspace .di-ledger-confirm .btn{font-size:12px;padding:4px 7px;min-height:28px}
    .di-ledger-workspace .di-ledger-counts{gap:4px;flex-basis:100%}
    .di-ledger-workspace .di-ledger-zoom{margin-left:auto}
}
.di-rectification-cell{outline-offset:-3px}
.di-rectification-cell:focus,.di-rectification-cell.is-dragover{outline:2px solid #408979;background:#edf8f4}
.di-photo-drop-hint,.di-photo-status{font-size:11px;line-height:1.5;margin-top:6px;color:#4b736b;overflow-wrap:anywhere}
.di-rectification-cell .di-ledger-thumb{display:flex;flex-direction:column;align-items:center}
.di-rectification-cell .di-ledger-thumb small{font-size:10px;line-height:1.4;white-space:normal;color:#4b736b}
.di-rectification-gallery{display:flex;flex-wrap:wrap;gap:12px;max-height:65vh;overflow:auto}
.di-rectification-option{width:230px;border:1px solid #cad8d4;border-radius:6px;padding:8px;font-size:12px}
.di-rectification-option img{width:100%;height:150px;object-fit:contain}
.di-photo-actions{display:flex;gap:8px;align-items:center;margin-top:12px;flex-wrap:wrap}
.di-ledger-table .di-manual-blank {height:64px;}
.di-ledger-table .di-manual-blank td {height:64px;padding:8px;cursor:cell;vertical-align:middle;box-sizing:border-box;}
.di-manual-blank td:first-child {text-align:center;color:#667b78;}
.di-manual-blank td:focus {outline:2px solid #238c78;outline-offset:-2px;background:#f0faf6;}
.di-manual-blank td span {font-size:11px;color:#849491;}
.di-ledger-table .di-manual-spacer td {padding:0;border:0;min-height:0;line-height:0;}
.di-ledger-table [data-photo-cell]:focus {outline:2px solid #238c78;outline-offset:-2px;}
.di-manual-photo-tools {display:flex;justify-content:center;gap:4px;margin:3px 0;}
.di-manual-photo-tools button {border:1px solid #d7e1de;border-radius:3px;background:white;color:#466a62;cursor:pointer;}
.di-manual-origin:not([hidden]) {display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex-shrink:0;padding:8px 12px;background:#edf6f3;border:1px solid #cadfd6;border-radius:6px;color:#355f53;font-size:13px;line-height:1.6;}
.di-manual-origin>span {flex:1 1 360px;overflow-wrap:anywhere;}
.di-manual-origin>div {display:flex;gap:8px;flex-wrap:wrap;}
/* Inline unit tokens and the unscaled, viewport-positioned suggestion menu. */
.di .di-unit-editor{display:flex;align-items:flex-start;gap:4px;min-width:0;padding:3px 0}
.di .di-unit-tokens{display:flex;flex:1;flex-direction:column;align-items:stretch;gap:4px;min-width:0}
.di .di-unit-group{display:flex;flex-direction:column;align-items:flex-start;gap:2px;max-width:100%;min-width:0}
.di .di-unit-status{display:inline-flex;align-items:center;gap:3px;max-width:100%;font-size:12px;line-height:1.5;color:#6b7c75}
.di .di-unit-status.is-attention{color:#a45a10}
.di .di-unit-status.is-error{color:#b42318}
.di .di-unit-status.is-complete{color:#24704e}
.di .di-unit-info{display:inline-flex;flex:none;align-items:center;justify-content:center;min-width:24px;min-height:24px;padding:0;border-radius:4px;color:inherit;text-decoration:none;font:16px/1 system-ui,sans-serif;cursor:pointer}
.di .di-unit-info:hover,.di .di-unit-info:focus-visible{background:#edf3ef;outline:2px solid currentColor;outline-offset:-2px}
.di-unit-status-popover{position:fixed;z-index:16000;box-sizing:border-box;max-height:70vh;overflow:auto;border:1px solid #c6d6ce;border-radius:8px;background:white;box-shadow:0 6px 24px #183b3526;padding:12px;font:14px/1.6 system-ui,sans-serif;color:#233b31;overflow-wrap:anywhere}
.di-unit-status-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.di-unit-status-head button{flex:none;border:0;border-radius:4px;background:transparent;color:#687a70;font-size:22px;line-height:28px;min-width:32px;cursor:pointer}
.di-unit-status-popover section{border-top:1px solid #e4eae6;margin-top:8px;padding-top:8px}
.di-unit-status-popover p{margin:5px 0}
.di .di-unit-chip{display:inline-flex;align-items:center;max-width:100%;border:1px solid #ccdcd5;border-radius:5px;background:#f0f7f3;overflow:hidden}
.di .di-unit-chip button{border:0;background:transparent;color:#244e3c;font:inherit;font-size:13px;margin:0;padding:4px 5px;min-height:28px;width:auto;cursor:pointer}
.di .di-unit-chip [data-unit-chip]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.di .di-unit-chip button:focus-visible{outline:2px solid #ed801f;outline-offset:-2px;background:#fff2df}
.di .di-unit-chip button:disabled{cursor:default;color:#6c7c75}
.di input.di-unit-input{flex:none;width:100%;min-width:0;max-width:100%;border:0;background:transparent;border-radius:0;box-shadow:none;padding:4px 2px;font-size:13px;min-height:28px}
.di input.di-unit-input[readonly]:not(:disabled){cursor:pointer}
:is(.di-unit-dropdown,.di-person-dropdown){position:fixed;z-index:15000;display:flex;flex-direction:column;background:#fff;border:1px solid #c6d6ce;border-radius:8px;box-shadow:0 6px 24px #183b3526;overflow:hidden;padding:6px;box-sizing:border-box;font:14px/1.5 system-ui,sans-serif;color:#233b31}
:is(.di-unit-dropdown,.di-person-dropdown)[hidden]{display:none}
:is(.di-unit-dropdown,.di-person-dropdown) [role=listbox]{min-height:0;max-height:222px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
:is(.di-unit-dropdown,.di-person-dropdown) [role=option]{display:block;text-align:left;width:100%;padding:8px 10px;border:0;background:#fff;border-radius:4px;color:inherit;font:inherit;cursor:pointer}
:is(.di-unit-dropdown,.di-person-dropdown) [role=option].is-active{background:#fff1e1}
:is(.di-unit-dropdown,.di-person-dropdown) [role=option].is-selected{color:#24704e;font-weight:600}
:is(.di-unit-dropdown,.di-person-dropdown) [role=option]:disabled{opacity:.6;cursor:default}
:is(.di-unit-dropdown,.di-person-dropdown) p{margin:10px;color:#728078}
.di-unit-extra{flex:none;border-top:1px solid #e4eae6;margin-top:5px;padding:6px 4px}
.di-unit-extra>button{border:0;background:transparent;padding:6px 0;color:#506d5d;font:inherit;font-size:12px;cursor:pointer}
.di [data-row-save-state]{display:block;font-size:11px;max-width:90px;white-space:normal;overflow-wrap:anywhere;color:#748277}

/* Single-person editors share the unit editor's last-row input layout. */
.di .di-person-editor{display:flex;flex-direction:column;gap:4px;min-width:0;padding:3px 0}
.di .di-person-chip-row{min-width:0;max-width:100%}
.di .di-person-chip{display:inline-flex;align-items:center;max-width:100%;border:1px solid #ccdcd5;border-radius:5px;background:#f0f7f3;overflow:hidden}
.di .di-person-chip button{border:0;background:transparent;color:#244e3c;font:inherit;font-size:13px;margin:0;padding:4px 5px;min-height:28px;width:auto;cursor:pointer}
.di .di-person-chip [data-person-chip]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.di .di-person-chip button:focus-visible{outline:2px solid #ed801f;outline-offset:-2px;background:#fff2df}
.di .di-person-chip button:disabled{cursor:default;color:#6c7c75}
.di input.di-person-input{flex:none;width:100%;min-width:0;max-width:100%;padding:4px 2px;font-size:13px;min-height:28px}
.di .di-person-status{display:flex;align-items:center;gap:3px;font-size:12px;line-height:1.5;color:#6b7c75}
.di .di-person-status.is-attention{color:#a45a10}
.di-person-dropdown [role=option] small{display:block;color:#6b7c75;font-size:12px;font-weight:400}

.di-ledger-save{display:inline-flex;align-items:center;gap:3px;white-space:nowrap;font-size:13px;color:#526b60}
.di-save-dialog section{padding:8px 0;border-bottom:1px solid #d7e1dc}.di-save-dialog p{white-space:pre-wrap;overflow-wrap:anywhere}
.di-ledger-save[hidden]{display:none}

.di [data-ledger-head-actions],.di [data-ledger-local-actions]{display:flex;align-items:center;gap:4px;flex-wrap:wrap;max-width:100%}
