/* Direct Mini Mix v2.20.24 — Back Office Display controls
   Scope: office portal + office dialogs only. Driver portal, invoice/POD documents,
   planner job-card styling and semantic status colours remain independent. */
:root{
  --dmm-office-font-family: Arial, sans-serif;
  --dmm-office-font-size: 14px;
  --dmm-office-text-color: #334155;
  --dmm-office-muted-color: #64748b;
  --dmm-office-text-weight: 400;
  --dmm-office-heading-weight: 600;
}

body.dmm-office-display .app-shell,
body.dmm-office-display .sidebar,
body.dmm-office-display dialog{
  font-family:var(--dmm-office-font-family)!important;
}
body.dmm-office-display .app-shell main,
body.dmm-office-display dialog{
  color:var(--dmm-office-text-color);
  font-size:var(--dmm-office-font-size);
  font-weight:var(--dmm-office-text-weight);
}

/* Normal office text / form controls inherit the selected colour and weight. */
body.dmm-office-display .app-shell main :where(input,select,textarea),
body.dmm-office-display dialog :where(input,select,textarea){
  font-family:var(--dmm-office-font-family)!important;
  color:var(--dmm-office-text-color)!important;
  font-weight:var(--dmm-office-text-weight)!important;
}
body.dmm-office-display .app-shell main :where(p,li,td),
body.dmm-office-display dialog :where(p,li,td){
  font-weight:var(--dmm-office-text-weight);
}
body.dmm-office-display .app-shell main :where(.muted,small,.card-head p),
body.dmm-office-display dialog :where(.muted,small,.dialog-head p){
  color:var(--dmm-office-muted-color);
}

/* Headings / labels use a separate controllable weight, rather than legacy 800/900. */
body.dmm-office-display .topbar h2,
body.dmm-office-display .app-shell main :where(h1,h2,h3,h4),
body.dmm-office-display dialog :where(h1,h2,h3,h4),
body.dmm-office-display .app-shell main label,
body.dmm-office-display dialog label,
body.dmm-office-display .app-shell main table th{
  font-family:var(--dmm-office-font-family)!important;
  font-weight:var(--dmm-office-heading-weight)!important;
}

/* Full Job Edit / Quick Add — intentionally override the old ultra-heavy weights. */
body.dmm-office-display #jobFormGrid > label,
body.dmm-office-display #jobFormGrid .audit-row > label,
body.dmm-office-display #jobFormGrid .delivery-row > label,
body.dmm-office-display #jobFormGrid .form-grid > label,
body.dmm-office-display #jobDialog .job-line label,
body.dmm-office-display #jobDialog .guided-label-row,
body.dmm-office-display #jobDialog .job-pay-label,
body.dmm-office-display #jobDialog .job-customer-source-title{
  color:var(--dmm-office-text-color)!important;
  font-weight:var(--dmm-office-heading-weight)!important;
}
body.dmm-office-display #jobDialog .dialog-head h2,
body.dmm-office-display #jobDialog .dialog-head h3,
body.dmm-office-display #jobDialog .customer-flow-copy strong,
body.dmm-office-display #jobDialog .job-line-product strong,
body.dmm-office-display #jobDialog .job-line .product-name,
body.dmm-office-display #jobDeliveryChargePanel .delivery-charge-copy strong,
body.dmm-office-display #jobDialog .address-mode-copy strong{
  font-weight:var(--dmm-office-heading-weight)!important;
}
body.dmm-office-display #jobFormGrid .job-section-bar,
body.dmm-office-display #jobFormGrid .driver-note-title,
body.dmm-office-display #jobFormGrid .office-note-title{
  font-family:var(--dmm-office-font-family)!important;
  font-weight:var(--dmm-office-heading-weight)!important;
  /* keep their deliberate white-on-colour section treatment */
}
body.dmm-office-display #jobFormGrid .job-total-breakdown span{
  font-weight:var(--dmm-office-heading-weight)!important;
}
body.dmm-office-display #jobFormGrid .job-total-breakdown strong{
  font-family:var(--dmm-office-font-family)!important;
  font-weight:var(--dmm-office-heading-weight)!important;
}
body.dmm-office-display #jobDialog .audit-readonly{
  color:var(--dmm-office-muted-color)!important;
  font-weight:var(--dmm-office-text-weight)!important;
}

/* Common office management screens. */
body.dmm-office-display .app-shell main :where(.table-wrap,.card,.settings-card,.search-box,.filters,.form-grid){
  font-family:var(--dmm-office-font-family);
}
body.dmm-office-display .app-shell main :where(.table-wrap td,.table-wrap th,.card label,.settings-form label),
body.dmm-office-display dialog :where(.form-grid label,.dialog-head h3){
  color:var(--dmm-office-text-color);
}

/* Top office chrome uses font settings, but keeps its established white/nav colours. */
body.dmm-office-display .nav-item,
body.dmm-office-display .topbar,
body.dmm-office-display .topbar button,
body.dmm-office-display .topbar-account{
  font-family:var(--dmm-office-font-family)!important;
}

/* Explicit exclusions: these visual systems already have their own settings/meaning. */
body.dmm-office-display #calendarSection .planner-note,
body.dmm-office-display #calendarSection .staff-note-card{
  /* Preserve the pre-v2.20.24 note font family; note size/weight/colour remain controlled by Note settings. */
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif!important;
}
/* Settings preview tile */
.office-display-preview{
  grid-column:1/-1;
  padding:12px 14px;
  border:1px solid #dbe3ec;
  border-radius:9px;
  background:#f8fafc;
}
.office-display-preview strong{display:block;margin-bottom:5px}
.office-display-preview span{display:block;color:var(--dmm-office-muted-color);font-size:.82rem}


/* v2.20.26 — Cost Summary must obey the universal Back Office Display controls.
   Legacy quick-booking CSS hard-coded these cells at 900/950 and #111827. */
body.dmm-office-display #jobQuickTotalsMatrix .t-label{
  color:var(--dmm-office-text-color)!important;
  font-family:var(--dmm-office-font-family)!important;
  font-weight:var(--dmm-office-heading-weight)!important;
}
body.dmm-office-display #jobQuickTotalsMatrix .t-value{
  color:var(--dmm-office-text-color)!important;
  font-family:var(--dmm-office-font-family)!important;
  font-weight:var(--dmm-office-text-weight)!important;
}
body.dmm-office-display #jobQuickTotalsMatrix .t-job{
  /* keep the intentional green total meaning, but lose the legacy 950 weight */
  color:#2f6d45!important;
  font-weight:var(--dmm-office-heading-weight)!important;
}
body.dmm-office-display #jobFormGrid .quick-cost-summary-bar .cost-summary-title,
body.dmm-office-display #jobFormGrid .quick-cost-summary-bar > span:not(.cost-summary-title){
  font-family:var(--dmm-office-font-family)!important;
  font-weight:var(--dmm-office-heading-weight)!important;
}
