/* DAYO international transport: scoped UI and opening-balance allocation hotfix. */
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon).page{
  --transport-blue:#2563eb;
  --transport-line:#dbe5f1;
  --transport-soft:#f5f8fc;
  --transport-text:#172033;
}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon).page.active{
  box-sizing:border-box;
  height:calc(100dvh - 92px);
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon).page.active>:not(.table-panel){flex-shrink:0}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon).page.active>.transport-filter-panel{overflow:visible}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon).page.active>.table-panel{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon).page.active>.table-panel>.table-wrap,
#transportRecon.page.active>.table-panel>#reconCards,
#transportRecon.page.active>.table-panel>#reconCards>.table-wrap{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
#shipments.page.active .transport-main-table,#transportRecon.page.active .transport-main-table{max-height:none}
#transportRecon.page.active>.exchange-rate-collapsible{flex:0 0 auto}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon) .toolbar{
  margin-bottom:14px;
  padding:0 2px;
}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon) .toolbar h2{
  color:var(--transport-text);
  font-size:22px;
  letter-spacing:-.02em;
}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon) .panel{
  border:1px solid var(--transport-line);
  border-radius:12px;
  box-shadow:0 2px 10px rgba(31,54,88,.04);
}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon) .table-wrap{
  border-color:var(--transport-line);
}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon) table thead th{
  background:#f3f7fc;
  color:#526174;
  font-size:11px;
  font-weight:700;
}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon) table tbody td{
  color:var(--transport-text);
  font-size:12px;
}
:is(#transportCompanies,#shipments,#freightPayments,#transportRecon) .primary-btn{
  background:var(--transport-blue);
  border-color:var(--transport-blue);
}
.opening-balance-cell,.payment-allocation-summary{
  display:grid;
  gap:3px;
  min-width:128px;
  line-height:1.35;
}
.opening-balance-cell span,.payment-allocation-summary span{
  color:#64748b;
  font-size:10px;
}
.opening-balance-cell b,.payment-allocation-summary b{color:#1e3a5f;font-size:11px}
.payment-allocation-table{max-height:min(46vh,520px);overflow:auto;border:1px solid #dbe5f1;border-radius:10px}
.payment-allocation-table table{min-width:900px}
.payment-allocation-table thead th{position:sticky;top:0;z-index:3;background:#f3f7fc}
.payment-allocation-table tfoot td{position:sticky;bottom:0;z-index:3;background:#f8fafc;border-top:1px solid #cbd5e1}
.payment-allocation-table small{display:block;margin-top:3px;color:#64748b;font-size:10px}
.payment-allocation-table input[type="checkbox"]{width:16px;height:16px;accent-color:#2563eb}
.payment-allocation-table .modal-allocation{width:120px;text-align:right}
.payment-allocation-table .opening-allocation-row td{background:#fffbeb}
.payment-allocation-table .opening-allocation-row:hover td{background:#fff7d6}
.opening-allocation-row td{background:#fffbeb}

@media(max-width:1400px){
  :is(#transportCompanies,#shipments,#freightPayments,#transportRecon) .toolbar{align-items:flex-start}
  :is(#transportCompanies,#shipments,#freightPayments,#transportRecon) .top-actions{flex-wrap:wrap;justify-content:flex-end}
  .payment-allocation-table{max-height:42vh}
}
@media(max-width:900px){
  :is(#transportCompanies,#shipments,#freightPayments,#transportRecon) .toolbar{gap:10px}
  .payment-allocation-table{max-height:40vh}
}
