/* SELQON Precision / foundation pilot.
 * Every rule is opt-in. Existing business markup, statuses and charts remain.
 * Screen-only: invoice/PDF/print layouts are deliberately excluded.
 * No remote font dependency: retain the ERP font stack until licensed local
 * font files are supplied and verified.
 */
@media screen {
  html.selqon-precision-preview body.globalrf-ui {
    --precision-radius: 12px;
    --precision-focus: #896300;
    --precision-control: #ffffff;
    --precision-control-readonly: #eeede8;
    --precision-control-border: #a7a79f;
    --precision-secondary: #5e6470;
    --precision-divider: #e3e1da;
    --precision-heading-surface: #f1f1ed;
    font-size: 14px;
    line-height: 1.5;
  }
  html.selqon-precision-preview body.globalrf-ui.globalrf-dark-context {
    --precision-focus: #f6b900;
    --precision-control: var(--sq-tone-262424, #262424);
    --precision-control-readonly: #323030;
    --precision-control-border: #72777e;
    --precision-secondary: #b6bbc4;
    --precision-divider: #3c4046;
    --precision-heading-surface: #22262a;
  }
  html.selqon-precision-preview body.globalrf-ui .nav-section-title {
    font-size: 11px;
    color: #b6bbc4;
    letter-spacing: .1em;
  }
  html.selqon-precision-preview body.globalrf-ui .nav-link {
    min-height: 42px;
    font-size: 13px;
    border-radius: 8px;
  }
  html.selqon-precision-preview body.globalrf-ui .nav-link.active {
    color: #17191d;
    background: #f6b900;
    border-color: #f6b900;
  }
  html.selqon-precision-preview body.globalrf-ui .nav-link.active::after {
    background: #f6b900;
  }
  html.selqon-precision-preview body.globalrf-ui .breadcrumb { font-size: 12px; }
  html.selqon-precision-preview body.globalrf-ui .global-search input {
    padding-inline: 42px 62px;
  }
  html.selqon-precision-preview body.globalrf-ui h1 {
    font-size: clamp(26px, 2.3vw, 32px);
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -.035em;
  }
  html.selqon-precision-preview body.globalrf-ui h2 { font-size: 17px; line-height: 1.35; }
  html.selqon-precision-preview body.globalrf-ui h3 { font-size: 15px; line-height: 1.4; }
  html.selqon-precision-preview body.globalrf-ui .eyebrow { font-size: 11px; }
  html.selqon-precision-preview body.globalrf-ui .page-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
  }
  html.selqon-precision-preview body.globalrf-ui .page-header > div { min-width: 0; }
  html.selqon-precision-preview body.globalrf-ui :is(.panel, .kpi-card, .catalog-card) {
    border-radius: var(--precision-radius);
  }
  html.selqon-precision-preview body.globalrf-ui :is(.primary-button, .secondary-button) {
    min-height: 40px;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
    border-radius: 8px;
  }
  html.selqon-precision-preview body.globalrf-ui :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--precision-focus);
    outline-offset: 3px;
  }
  html.selqon-precision-preview body.globalrf-ui :is(label, .field-label) {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
  }
  html.selqon-precision-preview body.globalrf-ui :is(input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not([type='color']), select, textarea) {
    font: inherit;
    color: var(--text-primary);
    background-color: var(--precision-control);
    border-color: var(--precision-control-border);
    border-radius: 8px;
    max-width: 100%;
  }
  html.selqon-precision-preview body.globalrf-ui :is(input, textarea)::placeholder {
    color: var(--precision-secondary);
    opacity: 1;
  }
  html.selqon-precision-preview body.globalrf-ui :is(input[readonly], textarea[readonly], input:disabled, select:disabled, textarea:disabled) {
    background-color: var(--precision-control-readonly);
    color: var(--precision-secondary);
  }
  html.selqon-precision-preview body.globalrf-ui :is(.form-grid, .filter-grid) > * { min-width: 0; }
  html.selqon-precision-preview body.globalrf-ui :is(.helptext, .section-note, .data-note) {
    color: var(--precision-secondary);
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  html.selqon-precision-preview body.globalrf-ui :is(.report-tabs, .fleet-tabs, .record-tabs, .tyre-module-nav) a {
    font-size: 13px;
    line-height: 1.4;
  }
  html.selqon-precision-preview body.globalrf-ui .table-scroll { max-width: 100%; overflow-x: auto; }
  html.selqon-precision-preview body.globalrf-ui :is(th, td) {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    border-bottom-color: var(--precision-divider);
  }
  html.selqon-precision-preview body.globalrf-ui th {
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--precision-secondary);
    background: var(--precision-heading-surface);
    word-break: normal;
  }
  html.selqon-precision-preview body.globalrf-ui :is(td.number, th.number, .record-code) {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  /* Existing summaries in Workers and Fines lacked shared card geometry. */
  html.selqon-precision-preview body.globalrf-ui .employee-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 16px;
    margin-bottom: 20px;
  }
  html.selqon-precision-preview body.globalrf-ui .employee-metric-grid .metric-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--precision-divider);
    border-radius: var(--precision-radius);
    background: var(--surface);
  }
  html.selqon-precision-preview body.globalrf-ui .employee-metric-grid .metric-card strong {
    font-size: clamp(24px, 2vw, 32px);
    line-height: 1.15;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }
  html.selqon-precision-preview body.globalrf-ui .employee-metric-grid .metric-card small {
    font-size: 12px;
    color: var(--precision-secondary);
  }
  /* Composition: editorial header, quiet surfaces and a clear reading order. */
  html.selqon-precision-preview body.globalrf-ui .page-header {
    padding: 8px 0 22px;
    border-bottom: 1px solid var(--precision-divider);
  }
  html.selqon-precision-preview body.globalrf-ui .page-header h1::before {
    content: '';
    display: block;
    width: 32px;
    height: 4px;
    margin-bottom: 12px;
    border-radius: 2px;
    background: #eeb50c;
  }
  html.selqon-precision-preview body.globalrf-ui .page-header p {
    max-width: 76ch;
    line-height: 1.55;
  }
  html.selqon-precision-preview body.globalrf-ui .transport-tools {
    gap: 10px;
    margin-bottom: 18px;
  }
  html.selqon-precision-preview body.globalrf-ui .transport-tools > a {
    min-height: 0;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: none;
    border-color: var(--precision-divider);
  }
  html.selqon-precision-preview body.globalrf-ui .transport-tools > a strong { font-size: 13px; }
  html.selqon-precision-preview body.globalrf-ui .transport-tools > a span { font-size: 12px; line-height: 1.4; }
  html.selqon-precision-preview body.globalrf-ui :is(.service-form, .fleet-master-form, .stack-form) > section.panel {
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: none;
  }
  html.selqon-precision-preview body.globalrf-ui :is(.service-form, .fleet-master-form, .stack-form) > section.panel > h2,
  html.selqon-precision-preview body.globalrf-ui .stack-form > section.panel > .section-heading {
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--precision-divider);
  }
  html.selqon-precision-preview body.globalrf-ui :is(.service-form, .fleet-master-form, .stack-form) .form-grid {
    gap: 20px 18px;
    align-items: start;
  }
  html.selqon-precision-preview body.globalrf-ui .form-grid label { line-height: 1.5; }
  html.selqon-precision-preview body.globalrf-ui .form-grid small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--precision-secondary);
  }
  /* Document and total fields are located by their existing stable IDs.
     No inputs, IDs, form ordering, values or event handlers are replaced. */
  html.selqon-precision-preview body.globalrf-ui .stack-form .form-grid > label:has(#id_source_document),
  html.selqon-precision-preview body.globalrf-ui .stack-form .form-grid > label:has(#id_notes) { grid-column: span 2; }
  html.selqon-precision-preview body.globalrf-ui .stack-form .form-grid > label:has(#id_total) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(170px, 260px);
    align-items: center;
    gap: 8px 20px;
    padding: 18px;
    background: var(--precision-heading-surface);
    border-radius: 10px;
    border-left: 3px solid #eeb50c;
  }
  html.selqon-precision-preview body.globalrf-ui .stack-form #id_total {
    font-size: 23px;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-height: 48px;
  }
  html.selqon-precision-preview body.globalrf-ui .stack-form .form-grid > label:has(#id_total) small { grid-column: 1 / -1; }
  html.selqon-precision-preview body.globalrf-ui input[type='file']::file-selector-button {
    border: 0;
    border-right: 1px solid var(--precision-divider);
    padding: 10px 12px;
    margin-right: 10px;
    background: var(--precision-heading-surface);
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
  }
  html.selqon-precision-preview body.globalrf-ui .form-actions {
    padding: 20px 0;
    border-top: 1px solid var(--precision-divider);
    gap: 12px;
    flex-wrap: wrap;
  }
  html.selqon-precision-preview body.globalrf-ui :is(input, select, textarea)[aria-invalid='true'] {
    border: 2px solid var(--danger, #b42318);
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview {
    --profitability-muted: #b6bbc4;
    --profitability-border: #3c4046;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-delta { color: #f2c94c; font-size: 13px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-card { border-radius: 12px; }
  /* Dense operational records: keep all eleven columns and inline actions. */
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form .bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--precision-divider);
    background: var(--precision-heading-surface);
  }
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form .bulk-toolbar > small {
    flex: 1 1 250px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--precision-secondary);
  }
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form table { min-width: 1420px; }
  /* Keep register cells vertically centered, including compact action stacks. */
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form :is(th, td) { vertical-align: middle; }
  html.selqon-precision-preview body.globalrf-ui input:is([type='checkbox'],[type='radio']) {
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    accent-color: #d9a500;
  }
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form .selection-cell { min-width: 84px; text-align: center; }
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form td:nth-child(4) { min-width: 170px; }
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form td:nth-child(5) { min-width: 230px; }
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form td:nth-child(2) a {
    font-weight: 650;
    white-space: nowrap;
    text-decoration: underline;
    text-decoration-color: #d9a500;
    text-underline-offset: 4px;
  }
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form :is(.inline-weight-editor, .inline-delivery-note-editor) {
    display: grid;
    gap: 8px;
    min-width: 135px;
  }
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form .inline-delivery-note-editor { min-width: 260px; }
  html.selqon-precision-preview body.globalrf-ui #transport-bulk-form :is(.inline-weight-editor, .inline-delivery-note-editor) button { justify-self: start; }
  html.selqon-precision-preview body.globalrf-ui .report-table-panel .dashboard-panel-heading { padding: 20px; }
  html.selqon-precision-preview body.globalrf-ui .report-table :is(th, td) { min-width: 110px; }

  /* The financial summary AND both daily evolution panels stay present. */
  html.selqon-precision-preview body.globalrf-ui .profitability-overview {
    width: 100%;
    max-width: none;
    padding: 20px;
    border-top-width: 3px;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-toolbar {
    grid-template-columns: minmax(0,1fr) minmax(240px,330px);
    margin-bottom: 20px;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-period-note {
    grid-column: auto;
    grid-row: auto;
    text-align: left;
    font-size: 12px;
    line-height: 1.5;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-kpis {
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-auto-rows: auto;
    gap: 16px;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-card { padding: 20px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-card > header {
    flex-wrap: wrap;
    gap: 10px;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-card header p,
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-card footer {
    color: #b6bbc4;
    font-size: 12px;
    line-height: 1.5;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-card header h3 { font-size: 16px; line-height: 1.4; }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-value {
    font-size: clamp(26px,2.2vw,36px);
    line-height: 1.2;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-chip {
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid #55595f;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-overview-treemaps { gap: 16px; margin-top: 16px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-daily-grid { grid-template-columns: 1fr; gap: 16px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-daily-header { padding: 20px; flex-wrap: wrap; }
  html.selqon-precision-preview body.globalrf-ui .profitability-daily-header > div:first-child { flex: 1 1 210px; }
  html.selqon-precision-preview body.globalrf-ui :is(.profitability-daily-header p, .profitability-daily-delta span, .profitability-daily-legend, .profitability-daily-metric-label, .profitability-daily-mini-label, .profitability-daily-metric-change, .profitability-daily-metrics dt, .profitability-daily-metrics dd) {
    font-size: 12px;
    line-height: 1.5;
  }
  html.selqon-precision-preview body.globalrf-ui .profitability-daily-body { grid-template-columns: minmax(0,1fr) minmax(180px,26%); }
  html.selqon-precision-preview body.globalrf-ui .profitability-daily-metric-value { font-size: 28px; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
  html.selqon-precision-preview body.globalrf-ui :is(.profitability-chart-axis text, .profitability-chart-axis-title, .profitability-chart-cutoff-label) { font-size: 11px; }
  html.selqon-precision-preview body.globalrf-ui :is(.profitability-overview-empty, .profitability-overview-sources, .profitability-overview-tooltip) { font-size: 12px; line-height: 1.5; }
  @media (min-width:1440px) {
    html.selqon-precision-preview body.globalrf-ui .profitability-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
    html.selqon-precision-preview body.globalrf-ui :is(.profitability-overview-toolbar, .profitability-overview-warnings, .profitability-overview-sources) { grid-column: 1 / -1; margin: 0; }
    html.selqon-precision-preview body.globalrf-ui .profitability-overview-kpis { grid-column: 1; grid-row: 3; }
    html.selqon-precision-preview body.globalrf-ui .profitability-overview-treemaps { grid-column: 1; grid-row: 4; grid-template-columns: 1fr; margin: 0; }
    html.selqon-precision-preview body.globalrf-ui .profitability-daily-grid { grid-column: 2; grid-row: 3 / 5; margin: 0; }
    html.selqon-precision-preview body.globalrf-ui .profitability-daily-body { grid-template-columns: 1fr; }
    html.selqon-precision-preview body.globalrf-ui .profitability-daily-metrics { border-left: 0; border-top: 1px solid #3c4046; }
    html.selqon-precision-preview body.globalrf-ui .profitability-daily-metrics dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
  }
  @media (min-width:1800px) {
    html.selqon-precision-preview body.globalrf-ui .profitability-overview-treemaps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  }
  @media (max-width:720px) {
    html.selqon-precision-preview body.globalrf-ui .profitability-overview { padding: 12px; }
    html.selqon-precision-preview body.globalrf-ui .profitability-overview-toolbar,
    html.selqon-precision-preview body.globalrf-ui .profitability-overview-kpis,
    html.selqon-precision-preview body.globalrf-ui .profitability-daily-body { grid-template-columns: 1fr; }
    html.selqon-precision-preview body.globalrf-ui .profitability-overview-card { padding: 16px; }
    html.selqon-precision-preview body.globalrf-ui .profitability-daily-header > div:first-child { flex: initial; width: 100%; }
    html.selqon-precision-preview body.globalrf-ui .profitability-daily-header { min-height: 0; gap: 12px; }
  }
  /* Finance: filter and metadata get their own rows, never competing widths. */
  html.selqon-precision-preview body.globalrf-ui .profitability-dashboard { --profitability-muted-dark: #b6bbc4; border-top-width: 3px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-toolbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-period { grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: 14px; padding: 18px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-period-context { margin: 0; max-width: none; text-align: left; font-size: 12px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-heading-strip { flex-wrap: wrap; font-size: 11px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-card-header { flex-wrap: wrap; }
  html.selqon-precision-preview body.globalrf-ui :is(.profitability-card-caption,.profitability-card-header p,.profitability-card-header > span,.profitability-mini-kpi span,.profitability-mini-kpi small) { font-size: 12px; line-height: 1.5; }
  html.selqon-precision-preview body.globalrf-ui .profitability-card { padding: 20px; }
  html.selqon-precision-preview body.globalrf-ui .profitability-bento { gap: 16px; }
  html.selqon-precision-preview body.globalrf-ui :is(.profitability-hero-value,.profitability-mini-kpi strong) { overflow-wrap: anywhere; white-space: normal; line-height: 1.25; }
  html.selqon-precision-preview body.globalrf-ui .profitability-vat-kpis { grid-template-columns: repeat(auto-fit,minmax(min(100%,140px),1fr)); }
  /* Commercial retains its maps, data joins and cross-filter logic. */
  html.selqon-precision-preview body.globalrf-ui .commercial-dashboard { font-family: inherit; --commercial-muted: #b6bbc4; --commercial-border: #45494f; border-top-width: 3px; box-shadow: none; }
  html.selqon-precision-preview body.globalrf-ui :is(.commercial-toolbar,.commercial-card-heading,.commercial-toolbar-actions,.commercial-inline-controls) { flex-wrap: wrap; }
  html.selqon-precision-preview body.globalrf-ui .commercial-toolbar-actions { max-width: 100%; }
  html.selqon-precision-preview body.globalrf-ui .commercial-period-picker { width: min(330px,100%); }
  html.selqon-precision-preview body.globalrf-ui .commercial-period-picker form { width: 100%; }
  html.selqon-precision-preview body.globalrf-ui .commercial-kpi-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
  html.selqon-precision-preview body.globalrf-ui .commercial-kpi { padding: 18px; border-radius: 12px; }
  html.selqon-precision-preview body.globalrf-ui .commercial-kpi strong { white-space: normal; overflow-wrap: anywhere; overflow: visible; font-size: clamp(24px,2vw,32px); font-weight: 600; line-height: 1.2; margin: 10px 0; }
  html.selqon-precision-preview body.globalrf-ui .commercial-kpi .kpi-label { font-size: 12px; min-height: 0; }
  html.selqon-precision-preview body.globalrf-ui .commercial-kpi .kpi-status { font-size: 11px; font-weight: 500; border-color: #55595f; border-radius: 5px; }
  html.selqon-precision-preview body.globalrf-ui :is(.commercial-kpi .kpi-change,.commercial-footnote,.commercial-inline-controls label,.commercial-inline-controls select,.commercial-inline-controls button,.commercial-legend,.commercial-client-name,.commercial-client-metric) { font-size: 12px; line-height: 1.5; }
  html.selqon-precision-preview body.globalrf-ui :is(.commercial-client-name small,.commercial-client-metric small) { font-size: 11px; }
  html.selqon-precision-preview body.globalrf-ui .commercial-card-heading { padding: 20px; }
  html.selqon-precision-preview body.globalrf-ui .commercial-grid { gap: 16px; }
  html.selqon-precision-preview body.globalrf-ui :is(.commercial-client-performance,.commercial-efficiency,.commercial-goods-card) { min-height: 0; }
  html.selqon-precision-preview body.globalrf-ui .commercial-chart { min-height: 0; max-height: 420px; padding-bottom: 20px; }
  html.selqon-precision-preview body.globalrf-ui .commercial-client-row { grid-template-columns: minmax(100px,1.2fr) minmax(70px,2fr) minmax(92px,1fr); }
  @media (max-width:1000px) {
    html.selqon-precision-preview body.globalrf-ui .commercial-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  }
  @media (max-width:620px) {
    html.selqon-precision-preview body.globalrf-ui .commercial-kpi-grid { grid-template-columns: 1fr; }
    html.selqon-precision-preview body.globalrf-ui .commercial-client-row { grid-template-columns: minmax(0,1fr) auto; }
    html.selqon-precision-preview body.globalrf-ui .commercial-client-bars { grid-column: 1 / -1; grid-row: 2; }
    html.selqon-precision-preview body.globalrf-ui .commercial-card-heading { padding: 16px; }
    html.selqon-precision-preview body.globalrf-ui .profitability-card { padding: 16px; }
  }
  /* Never override semantic payment/error colors. */
  /* Module navigation follows the approved reference, not a grid of cards. */
  html.selqon-precision-preview body.globalrf-ui :is(.transport-tools,.catalog-grid,.fleet-tabs,.report-tabs,.record-tabs) { display: flex; align-items: stretch; flex-wrap: nowrap; gap: 8px; max-width: 100%; overflow-x: auto; padding: 0; margin: 0 0 20px; border: 0; border-bottom: 1px solid var(--precision-divider); background: transparent; border-radius: 0; box-shadow: none; }
  html.selqon-precision-preview body.globalrf-ui :is(.transport-tools,.catalog-grid,.fleet-tabs,.report-tabs,.record-tabs) > a { position: relative; display: flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 46px; min-width: 0; padding: 10px 14px; margin: 0; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; box-shadow: none; text-decoration: none; white-space: nowrap; color: var(--precision-secondary); font-size: 14px; font-weight: 500; transform: none; }
  html.selqon-precision-preview body.globalrf-ui :is(.transport-tools,.catalog-grid) > a :is(h2,strong:not(.card-count)) { font: inherit; margin: 0; color: inherit; }
  html.selqon-precision-preview body.globalrf-ui :is(.transport-tools,.catalog-grid) > a > span:not(.card-count) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: normal; }
  html.selqon-precision-preview body.globalrf-ui .catalog-grid .card-count { font-size: 11px; padding: 2px 6px; border-radius: 5px; background: #f6b900; color: #17191d; }
  html.selqon-precision-preview body.globalrf-ui :is(.transport-tools,.catalog-grid,.fleet-tabs,.report-tabs,.record-tabs) > a:hover { color: inherit; background: var(--precision-heading-surface); border-bottom-color: #d9a500; }
  html.selqon-precision-preview body.globalrf-ui :is(.transport-tools,.catalog-grid,.fleet-tabs,.report-tabs,.record-tabs) > a:is([aria-current='page'],.active) { color: inherit; border-bottom-color: #f6b900; background: transparent; font-weight: 650; }
  html.selqon-precision-preview body.globalrf-ui .nav-link.active { color: #f7f6f2; background: #323030; border-color: transparent; box-shadow: inset 4px 0 #f6b900; }
  /* Dense operating-cost matrix: keep unit identity in view, never hide columns. */
  html.selqon-precision-preview body.globalrf-ui .table-scroll:has(> table > thead > tr > th:nth-child(17)) { isolation: isolate; }
  html.selqon-precision-preview body.globalrf-ui .table-scroll > table:has(> thead > tr > th:nth-child(17)) { min-width: 1760px; font-variant-numeric: tabular-nums; }
  html.selqon-precision-preview body.globalrf-ui table:has(> thead > tr > th:nth-child(17)) :is(th,td) { padding: 16px; }
  html.selqon-precision-preview body.globalrf-ui table:has(> thead > tr > th:nth-child(17)) td { white-space: nowrap; }
  html.selqon-precision-preview body.globalrf-ui table:has(> thead > tr > th:nth-child(17)) td:nth-child(n+3) { text-align: right; }
  html.selqon-precision-preview body.globalrf-ui table:has(> thead > tr > th:nth-child(17)) th:nth-child(n+3) { text-align: right; }
  html.selqon-precision-preview body.globalrf-ui table:has(> thead > tr > th:nth-child(17)) :is(th,td):first-child { position: sticky; left: 0; z-index: 1; min-width: 150px; background: var(--precision-control); border-right: 1px solid var(--precision-control-border); }
  html.selqon-precision-preview body.globalrf-ui table:has(> thead > tr > th:nth-child(17)) th:first-child { background: var(--precision-heading-surface); }
  html.selqon-precision-preview body.globalrf-ui .table-panel > .help-text { padding: 12px 16px; margin: 0; color: var(--precision-secondary); font-size: 12px; line-height: 1.6; }
  /* Operational workspaces: retain controls and semantic states, unify rhythm. */
  html.selqon-precision-preview body.globalrf-ui :is(.detail-grid,.fleet-master-grid) { gap: 20px; align-items: start; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); }
  html.selqon-precision-preview body.globalrf-ui :is(.detail-grid > .panel,.fleet-master-grid > .panel,.fleet-section,.invoice-documents-panel,.invoice-collection-panel) { padding: 24px; min-width: 0; }
  html.selqon-precision-preview body.globalrf-ui :is(.detail-grid,.fleet-master-grid) h2 { margin-top: 0; margin-bottom: 20px; }
  html.selqon-precision-preview body.globalrf-ui .detail-grid dl { margin: 0; }
  html.selqon-precision-preview body.globalrf-ui .detail-grid dt { font-size: 12px; font-weight: 600; margin-top: 18px; }
  html.selqon-precision-preview body.globalrf-ui .detail-grid dd { margin: 6px 0 0; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
  html.selqon-precision-preview body.globalrf-ui .asset-data-grid { gap: 20px; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); }
  html.selqon-precision-preview body.globalrf-ui .asset-data-grid > div { padding-bottom: 12px; border-bottom: 1px solid #d9dadd; min-width: 0; }
  html.selqon-precision-preview body.globalrf-ui .asset-data-grid dt { font-size: 12px; line-height: 1.5; }
  html.selqon-precision-preview body.globalrf-ui .asset-data-grid dd { font-size: 15px; margin-top: 6px; overflow-wrap: anywhere; }
  html.selqon-precision-preview body.globalrf-ui :is(.fleet-tabs,.module-tabs) { gap: 8px; overflow-x: auto; max-width: 100%; }
  html.selqon-precision-preview body.globalrf-ui .fleet-tabs a { padding: 12px 16px; white-space: nowrap; }
  html.selqon-precision-preview body.globalrf-ui :is(.fleet-kpis,.report-kpis) { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); gap: 16px; margin-block: 20px; }
  html.selqon-precision-preview body.globalrf-ui :is(.fleet-kpis,.report-kpis) .kpi-card { min-width: 0; padding: 22px; border-radius: 12px; }
  html.selqon-precision-preview body.globalrf-ui :is(.fleet-kpis,.report-kpis) .kpi-card > span { display: block; font-size: 12px; line-height: 1.5; }
  html.selqon-precision-preview body.globalrf-ui :is(.fleet-kpis,.report-kpis) .kpi-card strong { display: block; font-size: clamp(24px,2vw,32px); margin: 12px 0; line-height: 1.2; overflow-wrap: anywhere; }
  html.selqon-precision-preview body.globalrf-ui :is(.fleet-kpis,.report-kpis) .kpi-card small { display: block; font-size: 12px; line-height: 1.5; }
  html.selqon-precision-preview body.globalrf-ui .invoice-document-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 16px; }
  html.selqon-precision-preview body.globalrf-ui .invoice-document-slot { padding: 18px; min-width: 0; border-radius: 10px; }
  html.selqon-precision-preview body.globalrf-ui .document-check { display: flex; align-items: start; gap: 10px; line-height: 1.5; }
  html.selqon-precision-preview body.globalrf-ui .document-check input { flex: 0 0 18px; min-width: 18px; width: 18px; margin-top: 3px; }
  html.selqon-precision-preview body.globalrf-ui :is(.section-heading,.planning-zone-heading,.planning-week-nav,.invoice-collection-actions) { flex-wrap: wrap; gap: 16px; }
  html.selqon-precision-preview body.globalrf-ui .totals-panel { padding: 24px; }
  html.selqon-precision-preview body.globalrf-ui .totals-panel .grand-total { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 2px solid #eeb50c; padding-top: 20px; }
  html.selqon-precision-preview body.globalrf-ui .totals-panel .grand-total strong { font-size: 28px; font-variant-numeric: tabular-nums; }
  html.selqon-precision-preview body.globalrf-ui .history-list { padding-left: 22px; }
  html.selqon-precision-preview body.globalrf-ui .history-list li { padding: 12px 0 12px 12px; line-height: 1.6; }
  html.selqon-precision-preview body.globalrf-ui .hash-value { overflow-wrap: anywhere; }
  html.selqon-precision-preview body.globalrf-ui :is(.planning-toolbar,.report-filter-grid) { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); gap: 16px; align-items: end; }
  html.selqon-precision-preview body.globalrf-ui :is(.planning-toolbar > div,.report-filter-grid > label) { min-width: 0; }
  html.selqon-precision-preview body.globalrf-ui .planning-toolbar-panel { padding: 22px; }
  html.selqon-precision-preview body.globalrf-ui .planning-week-nav { margin-top: 20px; padding-top: 16px; border-top: 1px solid #45494f; }
  html.selqon-precision-preview body.globalrf-ui .planning-week-nav a { color: #f2c94c; font-size: 13px; padding: 8px 10px; border-radius: 6px; }
  html.selqon-precision-preview body.globalrf-ui .planning-week-nav strong { font-size: 13px; }
  html.selqon-precision-preview body.globalrf-ui .detail-grid { align-items: stretch; }
  html.selqon-precision-preview body.globalrf-ui .planning-overview-grid { gap: 20px; }
  html.selqon-precision-preview body.globalrf-ui .planning-map-metrics { gap: 12px; flex-wrap: wrap; }
  html.selqon-precision-preview body.globalrf-ui .planning-map-metrics > span { padding: 14px; min-width: 140px; }
  html.selqon-precision-preview body.globalrf-ui .planning-map-metrics small { display: block; font-size: 12px; margin-top: 6px; }
  html.selqon-precision-preview body.globalrf-ui :is(.planning-map-caveat,.data-note,.section-note) { font-size: 12px; line-height: 1.6; }
  @media (max-width:720px) {
    html.selqon-precision-preview body.globalrf-ui .page-header > .button-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; align-items: stretch; }
    html.selqon-precision-preview body.globalrf-ui .page-header > .button-row > a { display: flex; align-items: center; justify-content: center; min-height: 44px; width: auto; text-align: center; white-space: normal; }
    html.selqon-precision-preview body.globalrf-ui :is(.detail-grid > .panel,.fleet-master-grid > .panel,.fleet-section,.invoice-documents-panel,.invoice-collection-panel,.planning-toolbar-panel) { padding: 16px; }
    html.selqon-precision-preview body.globalrf-ui :is(.planning-overview-grid,.planning-map-layout) { grid-template-columns: minmax(0,1fr); }
    html.selqon-precision-preview body.globalrf-ui .fleet-action-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
    html.selqon-precision-preview body.globalrf-ui .fleet-action-row a { white-space: normal; text-align: center; }
  }
  @media (max-width: 1200px) {
    html.selqon-precision-preview body.globalrf-ui .global-search input { padding-right: 12px; }
  }
  @media (max-width: 620px) {
    html.selqon-precision-preview body.globalrf-ui :is(.service-form, .fleet-master-form, .stack-form) > section.panel { padding: 16px; margin-bottom: 14px; }
    html.selqon-precision-preview body.globalrf-ui .stack-form .form-grid > label:has(#id_source_document),
    html.selqon-precision-preview body.globalrf-ui .stack-form .form-grid > label:has(#id_notes) { grid-column: 1 / -1; }
    html.selqon-precision-preview body.globalrf-ui .stack-form .form-grid > label:has(#id_total) { grid-template-columns: 1fr; padding: 14px; }
    html.selqon-precision-preview body.globalrf-ui .transport-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html.selqon-precision-preview body.globalrf-ui .transport-tools > a { padding: 12px; overflow-wrap: anywhere; }
    html.selqon-precision-preview body.globalrf-ui :is(input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not([type='color']), select, textarea) { font-size: 16px; }
    html.selqon-precision-preview body.globalrf-ui .main-content { padding-inline: 16px; }
    html.selqon-precision-preview body.globalrf-ui .page-header { gap: 12px; margin-bottom: 18px; }
    html.selqon-precision-preview body.globalrf-ui .employee-metric-grid { grid-template-columns: 1fr; gap: 10px; }
  }
  @media (pointer: coarse) {
    html.selqon-precision-preview body.globalrf-ui :is(.primary-button, .secondary-button, .icon-button, .nav-link) { min-height: 44px; }
  }
  @media (prefers-reduced-motion: reduce) {
    html.selqon-precision-preview body.globalrf-ui .app-shell { transition: none; }
  }
}
