/* Compact document details retain the original fields, handlers and permissions. */
body .bcp-proc-document .bcp-document-metadata{border:1px solid #dce6ee;border-radius:8px;background:#f8fbfe;margin:0 0 12px;padding:0;min-width:0}
body .bcp-proc-document .bcp-document-metadata>summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:12px 14px;cursor:pointer;list-style:none;color:#254960;font-size:13px}
body .bcp-proc-document .bcp-document-metadata>summary::after{content:'Details ▾';margin-left:auto;color:#206a94;font-size:12px;white-space:nowrap}
body .bcp-proc-document .bcp-document-metadata[open]>summary::after{content:'Collapse ▴'}
body .bcp-proc-document .bcp-document-metadata>summary::-webkit-details-marker{display:none}
body .bcp-proc-document .bcp-metadata-preview{color:#5d7283;font-size:12px;overflow-wrap:anywhere}
body :is(#prModal#prModal,#rfqModal#rfqModal,#poModal#poModal) .bcp-document-metadata[open]>:not(summary){padding:14px!important;border-top:1px solid #e1e9f0!important}
body .bcp-document-metadata :is(.bc-form-section-title,#poSupplierHeading){display:none!important}
body .bcp-proc-document .bcp-document-tabs{margin-top:12px}
body .bcp-specification{margin-top:7px;font-size:11px;max-width:100%}
body .bcp-specification>summary{cursor:pointer;color:#266c92;line-height:1.5}
body .bcp-specification .bcp-spec-preview{display:block;color:#657d8d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:30ch}
body .bcp-specification[open] .bcp-spec-preview{display:none}
body .bcp-specification .bc-rfq-spec-field{margin:7px 0 0!important}
body .bcp-proc-document .bcp-po-finance-summary{padding:14px;border:1px solid #d9e5ee;border-radius:8px;background:#f4f9fc;font-size:13px;line-height:1.6}
body .bcp-proc-document .bcp-po-finance-summary h3{margin:0 0 8px;font-size:14px;color:#24465d}
body .bcp-proc-document .bcp-finance-status{color:#175f79;font-size:15px}
body .bcp-proc-document .bcp-po-finance-summary p{margin:6px 0}
body .bcp-proc-document .bcp-po-finance-summary small{color:#607a8c}
.bcp-missing-price{display:block;color:#946217;font-size:11px;margin-top:5px}
.bcp-email-settings{margin:12px 0;color:#365970;font-size:12px}.bcp-email-settings>summary{cursor:pointer;padding:8px 0}.bcp-email-settings>label{display:flex;flex-direction:column;gap:6px;max-width:420px}.bcp-email-settings input{min-height:36px;box-sizing:border-box;width:100%}

/* Atomic financial values never split between digits; small screens scroll the table only. */
body :is(#purchase_requests,#purchase_orders,#rfqs,#acctAPPage,#acctPaymentsPage,#acctExpensesPage) table{table-layout:auto!important;min-width:var(--bc-record-min,1000px)!important;width:100%!important}
body :is(#purchase_requests,#purchase_orders,#rfqs,#acctAPPage,#acctPaymentsPage,#acctExpensesPage) table :is(th,td).bc-record-atomic,
body :is(#purchase_requests,#purchase_orders,#rfqs,#acctAPPage,#acctPaymentsPage,#acctExpensesPage) table .bc-record-atomic :is(b,strong,button,small),
body :is(#purchase_requests,#purchase_orders) .bcp-reference{white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}
body :is(#purchase_requests,#purchase_orders,#rfqs,#acctAPPage,#acctPaymentsPage,#acctExpensesPage) :is(.bc-safe-table-scroll,.bcp-rfq-list){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}

body :is(.erp-toolbar,.bc-acct-toolbar).bcp-compact-filters{display:flex!important;flex-wrap:wrap;align-items:flex-start;gap:10px!important;padding:10px!important}
.bcp-compact-filters>label{flex:1 1 160px;min-width:0}
.bcp-compact-filters>label.wide{flex:2 1 240px}
.bcp-compact-filters>input{flex:2 1 220px;min-width:0}
.bcp-compact-filters>select{flex:1 1 160px;min-width:0}
.bcp-compact-filters>.action{flex:0 0 auto}
body .bcp-more-filters{flex:0 0 auto;margin:0;padding:0;min-width:0}
body .bcp-more-filters>summary{cursor:pointer;border:1px solid #ccdce7;padding:10px 12px;border-radius:6px;color:#315b75;background:#fff;font-size:12px;line-height:18px;white-space:nowrap}
body .bcp-more-filters[open]{flex:1 0 100%}
body .bcp-more-filters[open]>summary{display:inline-block;margin-bottom:10px}
.bcp-filter-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.bcp-filter-fields>label{min-width:0}
body .bcp-filter-fields :is(select,input){width:100%;min-width:0;box-sizing:border-box}

/* Isolate timeline styles from the application's generic dark header rule. */
body .bcp-proc-document aside.bca-panel header.bca-head{position:static!important;display:flex!important;background:#f4f9fc!important;min-height:0!important;height:auto!important;padding:13px 14px 9px!important;border:0!important;box-shadow:none!important;color:#153b5c!important}
body .bcp-proc-document aside.bca-panel .bca-head h3{color:#153b5c!important}
body .bca-panel .bca-latest{align-self:flex-end;margin:8px 14px 0;font-size:11px}
body #projectControls .pc-stat.dark strong{color:#fff!important}
body #projectControls .pc-stat.dark :is(span,small){color:#d9edf6!important}
.pc-collapsible{margin-top:18px;border:1px solid #dce6ee;border-radius:10px;background:#fff;padding:0}
.pc-collapsible>summary{cursor:pointer;padding:15px 18px;color:#234a61;font-size:14px;font-weight:650}
.pc-collapsible>.pc-panel{border:0;box-shadow:none;margin:0}

body.bcp-client-demonstration #saWorkspaceBar{min-height:0!important;padding:8px 12px!important;margin-bottom:12px!important;gap:8px!important}
body.bcp-client-demonstration #saWorkspaceBar #saBack{min-height:30px!important;padding:5px 9px!important;font-size:11px!important}
body.bcp-client-demonstration #saWorkspaceMode{font-size:11px!important;line-height:1.4!important}
body #bc-command-bar #bcpAccountSecurity{width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important}
body #bc-command-bar #bcpAccountSecurity span{display:none!important}
body #bc-command-bar #bcpAccountSecurity svg{width:18px;height:18px}
@media(max-width:650px){
 body .bcp-document-metadata>summary{gap:6px 10px}
 body .bcp-document-metadata .bcp-metadata-preview{flex-basis:100%;order:2}
 .bcp-compact-filters>label,.bcp-compact-filters>input,.bcp-compact-filters>select{flex-basis:calc(50% - 10px)}
 body .bcp-filter-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.bcp-client-demonstration #saWorkspaceBar{flex-wrap:wrap!important}
}
@media(max-width:390px){body .bcp-filter-fields{grid-template-columns:1fr}}
@media print{.bcp-document-metadata>summary::after{display:none}.bcp-more-filters{display:none}}
