/* Consistent action rows for Sales, quotation, invoice, and payment history. */
.history-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:5px}
.history-actions .history-action,.history-line .text-button,.history-line .delivery-slip-button{display:inline-flex;align-items:center;justify-content:center;min-height:30px;margin:0!important;padding:6px 11px;border:1px solid #d5dfd2;border-radius:6px;background:#f8fbf6;color:#426c31;text-decoration:none;font:700 10px/1.25 Manrope;letter-spacing:0;text-align:center;white-space:nowrap;cursor:pointer}
.history-actions .history-action:hover,.history-line .text-button:hover,.history-line .delivery-slip-button:hover{background:#eaf5d9;border-color:#b9d898}
.history-line .delivery-slip-button{background:#e9f8c1;border-color:#b6d867;color:#294618}
.history-line small .history-action,.history-line small .text-button{margin:3px 3px 0 0!important}
.history-line [data-create-so],.history-line [data-create-invoice],.history-line [data-save-payment],.history-line [data-apply-credit],.history-line [data-so-stage]{background:#e7f7d4;border-color:#a9d77b;color:#276136}
.history-line [data-approve-flow-quote],.history-line [data-approve-quote]{background:#fff1bd;border-color:#e8c967;color:#795b00}
.history-line [data-edit-quote],.history-line [data-revise-payment],.history-line a.history-action{background:#e7f1ff;border-color:#a9c9f0;color:#285f9d}
.history-line [data-cancel-quote],.history-line [data-cancel-invoice],.history-line [data-cancel-payment],.history-line [data-so-rollback]{background:#ffe8e8;border-color:#efb1b1;color:#a22b2b}
.history-line [data-create-so]:hover,.history-line [data-create-invoice]:hover,.history-line [data-save-payment]:hover,.history-line [data-apply-credit]:hover,.history-line [data-so-stage]:hover{background:#cdf25b;border-color:#99c95b}
.history-line [data-cancel-quote]:hover,.history-line [data-cancel-invoice]:hover,.history-line [data-cancel-payment]:hover,.history-line [data-so-rollback]:hover{background:#ffd3d3;border-color:#df8989}
.history-actions>[data-create-so],.history-actions>[data-create-invoice],.history-actions>[data-save-payment],.history-actions>[data-apply-credit]{order:1}
.history-actions>[data-edit-quote],.history-actions>[data-revise-payment]{order:2}
.history-actions>[data-cancel-quote],.history-actions>[data-cancel-invoice],.history-actions>[data-cancel-payment]{order:3}
.history-actions>a[href*="/print"]{order:4}.history-actions>a[href*="/export"]{order:5}.history-actions>a[href*="proforma-invoice"]{order:6}
/* Semantic action groups are declared by the document renderer, never added later. */
.history-actions [data-pclean="approve-pr"],.history-actions [data-pclean="approve-po"],.history-actions [data-pclean="send-po"],.history-actions [data-pclean="receive-po"],.history-actions [data-pclean="stock-info"],.history-actions [data-pclean="approve-si"],.history-actions [data-pclean="save-payment"]{order:1;background:#e7f7d4;border-color:#a9d77b;color:#276136}
.history-actions [data-pclean="review-pr"],.history-actions [data-pclean="review-po"],.history-actions [data-pclean="review-si"]{order:2;background:#e7f1ff;border-color:#a9c9f0;color:#285f9d}
.history-actions [data-pclean="revise-pr"],.history-actions [data-pclean="revise-po"],.history-actions [data-pclean="revise-si"]{order:3;background:#fff1bd;border-color:#e8c967;color:#795b00}
.history-actions [data-pclean^="cancel-"],.history-actions [data-pclean^="delete-"]{order:6;background:#ffe8e8;border-color:#efb1b1;color:#a22b2b}
/* One colour system everywhere: status-changing actions are never ambiguous. */
.history-actions [data-approve-quote],.history-actions [data-create-so],.history-actions [data-start-packing],.history-actions [data-open-packing],.history-actions [data-deliver-so],.history-actions [data-create-invoice],.history-actions [data-save-payment],.history-actions [data-apply-credit],.history-actions [data-pclean="approve-pr"],.history-actions [data-pclean="approve-po"],.history-actions [data-pclean="send-po"],.history-actions [data-pclean="receive-po"],.history-actions [data-pclean="stock-info"],.history-actions [data-pclean="approve-si"],.history-actions [data-pclean="save-payment"]{background:#e7f7d4!important;border-color:#a9d77b!important;color:#276136!important}
.history-actions .sales-review,.history-actions [data-document-history],.history-actions [data-pclean^="review-"],.history-actions [data-supplier-payment-review]{background:#e7f1ff!important;border-color:#a9c9f0!important;color:#285f9d!important}
.history-actions [data-edit-quote],.history-actions [data-revise-payment],.history-actions [data-supplier-payment-revise],.history-actions [data-pclean^="revise-"]{background:#fff1bd!important;border-color:#e8c967!important;color:#795b00!important}
.history-actions [data-cancel-quote],.history-actions [data-cancel-invoice],.history-actions [data-cancel-payment],.history-actions [data-cancel-packing-to-quote],.history-actions [data-so-rollback],.history-actions [data-supplier-payment-cancel],.history-actions [data-pclean^="cancel-"]{background:#eee4ff!important;border-color:#cdb7ed!important;color:#6842a6!important}
.history-actions [data-delete-cancelled-quote],.history-actions [data-pclean^="delete-"]{background:#ffe5e5!important;border-color:#efaaa5!important;color:#b42318!important}
.history-actions a[href*="/print"],.history-actions a[href*="/export"],.history-actions [data-pclean^="print-"],.history-actions [data-pclean^="export-"]{background:#eef1f3!important;border-color:#ccd4da!important;color:#52616c!important}
.document-timeline{margin:8px 0 18px;padding-left:22px;border-left:2px solid #dce8d3}.document-timeline li{padding:0 0 12px 10px;color:#33414a}.document-timeline li::marker{color:#77a84b}.document-timeline small{color:#74808a;line-height:1.55}
.workflow-focus{outline:3px solid #c7f15a;outline-offset:3px;border-radius:8px}
@media(max-width:620px){.history-actions{gap:5px}.history-actions .history-action,.history-line .text-button,.history-line .delivery-slip-button{min-height:27px;padding:5px 8px;font-size:9px;white-space:normal;text-align:center}}
