.record-history-card{width:min(1080px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);display:flex;flex-direction:column;overflow:hidden;direction:rtl}
.record-history-card>.modal-header,.record-history-card>.modal-actions{flex:none}
.record-history-card>.modal-header h2{font-size:18px;margin:0;overflow-wrap:anywhere}
.record-history-content{flex:1;min-height:0;overflow:auto;padding:12px 16px;overscroll-behavior:contain}
.record-history-notice{font-size:12px;color:#64748b;margin:0 0 12px;line-height:1.7}
.record-history-entry{border:1px solid #dae5ef;border-radius:8px;margin-bottom:12px;background:#fff;min-width:0}
.record-history-entry>header{display:grid;grid-template-columns:minmax(100px,.8fr) minmax(140px,1fr) minmax(180px,1.2fr);align-items:start;gap:8px 16px;padding:10px 12px;background:#f3f8fc;font-size:13px;border-radius:8px 8px 0 0;line-height:1.7}
.record-history-user,.record-history-time{min-width:0;overflow-wrap:anywhere}
.record-history-user bdi{font-weight:700}
.record-history-time{color:#526779;text-align:end;unicode-bidi:isolate}
.record-history-changes:empty{display:none}
.record-history-change{padding:10px 12px;border-top:1px solid #e4ecf4;min-width:0;font-size:13px;line-height:1.75}
.record-history-context{display:flex;flex-wrap:wrap;gap:4px 16px;margin-bottom:7px;color:#526779;font-size:12px}
.record-history-subject{min-width:0;overflow-wrap:anywhere}
.record-history-values{display:grid;grid-template-columns:minmax(0,.8fr) repeat(2,minmax(0,1fr));gap:10px}
.record-history-values>div{min-width:0;padding:8px 10px;border:1px solid #e2eaf1;border-radius:5px;background:#fafcfe}
.record-history-values>div>span{display:block;font-size:11px;color:#60758a;margin-bottom:4px}
.record-history-values strong,.record-history-values bdi{display:block;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}
.record-history-values>.record-history-after{background:#f3faf7;border-color:#d9eae2}
.record-history-item-title{margin-bottom:5px}
.record-history-quantity{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px}
.record-history-quantity>span{color:#60758a;font-size:12px}
.record-history-entry>[data-history-details]{margin:0 12px 10px}
.record-history-explanation{margin:0;padding:10px 12px;font-size:13px;line-height:1.8;color:#725f35;background:#fffcf3;overflow-wrap:anywhere;border-top:1px solid #e4ecf4}
.record-history-reason{margin:0;padding:9px 12px;border-top:1px solid #e4ecf4;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere;background:#fffdf5;line-height:1.8}
.record-history-empty{font-size:13px;padding:12px;color:#64748b}
.record-history-card>.modal-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#record-history-count{margin-inline-end:auto;font-size:12px;color:#64748b}
.relation-node.cancelled>.relation-node-card{border-color:#e8c7c7;background:#fff8f8}
.relation-node.cancelled>.relation-node-card>span{color:#b24545;font-weight:700}
@media(max-width:600px){.record-history-card{width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}.record-history-content{padding:8px}.record-history-entry>header{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px 10px;padding:8px 10px}.record-history-time{grid-column:1/-1;text-align:start}.record-history-values{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}.record-history-field{grid-column:1/-1}.record-history-change{padding:9px}.record-history-values>div{padding:7px}.record-history-context{gap:4px 8px}.record-history-card>.modal-actions .button{font-size:12px;padding:7px 10px}}
