/* Finance Inbox Layout v1.36.8 -- Finance UI only. No job/ledger logic changed. */
body.app-shell .nmbm-finance-header-right {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end;
  gap:12px; min-width:0; max-width:100%;
}
body.app-shell .nmbm-finance-security {
  display:inline-flex; align-items:center; gap:7px;
  font-size:12px; white-space:normal; opacity:.84;
}
body.app-shell .nmbm-finance-inbox-shortcuts {
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  position:static !important; inset:auto !important; transform:none !important;
}
body.app-shell .nmbm-finance-shortcut {
  box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center;
  gap:8px; min-height:39px; padding:8px 13px;
  border-radius:9px; background:#0b2b50; color:white !important;
  border:1px solid #164b75; font-size:13px; font-weight:800;
  text-decoration:none; white-space:nowrap; cursor:pointer;
  position:static !important; inset:auto !important; transform:none !important;
  box-shadow:none !important; touch-action:manipulation;
}
body.app-shell .nmbm-finance-shortcut:hover,
body.app-shell .nmbm-finance-shortcut:focus-visible {
  background:#16456e; outline:2px solid #58b5ff; outline-offset:2px;
}
body.app-shell .nmbm-finance-inbox-count {
  min-width:22px; height:22px; border-radius:999px;
  display:inline-flex; justify-content:center; align-items:center;
  padding:0 5px; font-size:12px; font-weight:800;
  background:#eb202b; color:white !important;
}
body.app-shell .nmbm-finance-inbox-count[hidden]{display:none!important}
/* A regular document-flow table: no artificially narrow table or overlaid buttons. */
body.app-shell .nmbm-finance-contract-inbox {width:100%; max-width:none; min-width:0;}
body.app-shell .nmbm-finance-contract-inbox .card {width:100%; max-width:none; box-sizing:border-box;}
body.app-shell .nmbm-finance-inbox-scroll {
  width:100%; max-width:none; overflow-x:auto; box-sizing:border-box;
}
body.app-shell .nmbm-finance-contract-table {
  width:100% !important; min-width:850px; max-width:none !important;
  table-layout:fixed; border-collapse:collapse;
}
body.app-shell .nmbm-finance-awaiting-card th:nth-child(1){width:12%}
body.app-shell .nmbm-finance-awaiting-card th:nth-child(2){width:19%}
body.app-shell .nmbm-finance-awaiting-card th:nth-child(3){width:32%}
body.app-shell .nmbm-finance-awaiting-card th:nth-child(4){width:37%}
body.app-shell .nmbm-finance-contract-table th,
body.app-shell .nmbm-finance-contract-table td {
  padding:10px 12px; text-align:left; vertical-align:middle;
  overflow-wrap:anywhere;
}
body.app-shell .nmbm-finance-awaiting-card .nmbm-finance-contract-table td form {
  display:grid !important; grid-template-columns:minmax(185px,1fr) auto;
  align-items:center; gap:9px; width:100%; max-width:none; margin:0;
}
body.app-shell .nmbm-finance-awaiting-card .nmbm-finance-contract-table td form label {
  display:flex; align-items:center; gap:6px; min-width:0; width:100%;
}
body.app-shell .nmbm-finance-contract-table input[name="contract_value_ex_vat_zar"] {
  box-sizing:border-box; width:100% !important;
  max-width:none !important; min-width:0;
}
body.app-shell .nmbm-finance-awaiting-card .nmbm-finance-contract-table td form button {
  min-width:100px; white-space:nowrap;
}
@media(max-width:1000px){
  body.app-shell .nmbm-finance-header-right {justify-content:flex-start}
  body.app-shell .nmbm-finance-contract-table {min-width:900px;}
}
@media(max-width:620px){
  body.app-shell .nmbm-finance-security {display:none}
  body.app-shell .nmbm-finance-shortcut{padding:7px 9px; font-size:12px}
  body.app-shell .nmbm-finance-contract-table{min-width:880px;}
}

/* v1.36.8c: Horizontal Inbox buttons on the LEFT of the header, status on RIGHT.
   No floating/draggable positioning. Scoped to the authenticated Finance shell. */
body.app-shell .nmbm-finance-topbar-horizontal {
  display:flex; align-items:center; justify-content:space-between;
  column-gap:18px; row-gap:14px; flex-wrap:wrap;
}
body.app-shell .nmbm-finance-topbar-horizontal .nmbm-finance-header-left {
  display:flex; flex:1 1 490px; min-width:0; align-items:center;
  justify-content:flex-start; flex-wrap:wrap; gap:12px 26px;
}
body.app-shell .nmbm-finance-topbar-horizontal .nmbm-finance-heading {
  flex:0 1 auto; min-width:0;
}
body.app-shell .nmbm-finance-topbar-horizontal .nmbm-finance-inbox-shortcuts {
  display:flex !important; flex:0 0 auto; align-items:center;
  justify-content:flex-start; flex-direction:row !important;
  flex-wrap:nowrap !important; gap:10px; margin:0; padding:0;
  position:static !important; inset:auto !important; transform:none !important;
}
body.app-shell .nmbm-finance-topbar-horizontal .nmbm-finance-header-right {
  display:flex; flex:0 1 auto; justify-content:flex-end;
  align-items:center; margin-left:auto; max-width:100%;
}
body.app-shell .nmbm-finance-topbar-horizontal .nmbm-finance-security {
  white-space:nowrap;
}
@media(max-width:720px) {
  body.app-shell .nmbm-finance-topbar-horizontal .nmbm-finance-header-left {
    flex-basis:100%; gap:12px;
  }
  body.app-shell .nmbm-finance-topbar-horizontal .nmbm-finance-header-right {
    flex-basis:100%; justify-content:flex-start; margin-left:0;
  }
  body.app-shell .nmbm-finance-topbar-horizontal .nmbm-finance-security {
    white-space:normal;
  }
}
