/* Shared desktop preset. See docs/TAB-UI-PRESET.md and config/tab-ui-preset.json.
   Mobile layouts, print styles, data geometry and semantic status colors remain independent. */
:root {
  --fab-canvas: #fff;
  --fab-surface: #fff;
  --fab-border: #e2e8f0;
  --fab-text: #0f172a;
  --fab-muted: #64748b;
  --fab-hover: #f5f5f5;
  --fab-hover-border: #d4d4d4;
  --fab-accent: #9333ea;
  --fab-page-inset: 24px;
  --fab-gap: 16px;
  --fab-section-gap: 32px;
  --fab-control-height: 32px;
  --fab-kpi-height: 72px;
  --fab-kpi-label-size: 12px;
  --fab-kpi-value-size: 20px;
  --fab-control-shadow: 0 1px 2px rgb(0 0 0 / 8%);
  --fab-control-hover-shadow: 0 1px 2px rgb(0 0 0 / 10%);
  --fab-frame-shadow: 0 1px 2px #0f172a0a, 0 4px 12px #0f172a0d;
}
:root.dark {
  --fab-canvas: #0d1117;
  --fab-surface: #161b22;
  --fab-border: #30363d;
  --fab-text: #f0f6fc;
  --fab-muted: #9aa4b2;
  --fab-hover: #28323e;
  --fab-hover-border: #64748b;
  --fab-accent: #c084fc;
}
#workloadTableTools { display: contents; }
#desktopWorkspaceShell #manpowerEditorModal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  width: auto; max-width: none; margin: 0; padding: 24px; background: rgb(0 0 0 / 40%) !important;
  --mpd-surface: var(--fab-surface); --mpd-border: var(--fab-border); --mpd-muted: var(--fab-muted);
  --mpd-text: var(--fab-text); --mpd-control: var(--fab-surface); color: var(--fab-text);
}
.manpower-editor-open { overflow: hidden; }
#manpowerEditorModal .mpd-editor-dialog { width: 100%; max-width: 1400px; max-height: calc(100dvh - 48px); overflow-y: auto; padding: 20px; border: 1px solid var(--fab-border); border-radius: 12px; background: var(--fab-surface); box-shadow: 0 16px 48px rgb(0 0 0 / 20%); outline: none; }
#manpowerEditorModal .mpd-detail { margin: 0; padding: 0; border: 0; background: transparent; }
#manpowerEditorModal .mpd-detail h2 { font-size: 16px; line-height: 24px; }
#manpowerEditorModal .mpd-detail h3 { font-size: 12px; line-height: 18px; }
#manpowerEditorModal .mpd-editor-grid { gap: 24px; }
#manpowerEditorModal .mpd-edit-section { border: 1px solid var(--fab-border); border-radius: 8px; padding: 16px; background: var(--fab-surface); box-shadow: var(--fab-frame-shadow); }
#manpowerEditorModal :is(.mpd-button, .mpd-field input) { min-height: 32px; height: 32px; padding: 4px 10px; font-size: 12px; }
#manpowerEditorModal .mpd-button { border-color: var(--fab-border); background: var(--fab-surface); color: var(--fab-text); }
#manpowerEditorModal .mpd-primary { color: var(--fab-accent); }
#manpowerEditorModal .mpd-editor-placeholder { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
#manpowerEditorModal .mpd-editor-placeholder h2 { font-size: 16px; font-weight: 700; }
#manpowerEditorModal .mpd-editor-placeholder .mpd-loading { flex-basis: 100%; }
#manpowerEditorModal .mpd-notice, #manpowerEditorModal .mpd-alert { margin-top: 0; }
#manpowerSourceModal { z-index: 140; }
@media (max-width: 1023px) { #manpowerEditorModal .mpd-editor-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  #desktopWorkspaceShell #manpowerEditorModal { padding: 12px; }
  #manpowerEditorModal .mpd-editor-dialog { padding: 16px; max-height: calc(100dvh - 24px); }
  #manpowerEditorModal .mpd-detail-heading { flex-wrap: wrap; }
}
.table-page-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 8px; font-size: 12px; color: var(--fab-muted); flex-shrink: 0; }
.table-page-controls > button, .table-page-controls > select { height: 32px; padding: 0 8px; border: 1px solid var(--fab-border); border-radius: 8px; color: var(--fab-text); background: var(--fab-surface); font-size: 12px; }
.table-page-controls > button:disabled { opacity: .4; cursor: not-allowed; }
.table-page-range { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-page-size-label { white-space: nowrap; }
#mhTablePagination { padding: 0; }
#desktopMhCompareView #mhTableSection > #mhComparisonTableFrame { margin-top: 8px; }
@media (min-width: 768px) {
  /* Opt-in primitives for future tabs. */
  .fab-page { padding: 10px var(--fab-page-inset) 24px; min-width: 0; background: var(--fab-canvas); color: var(--fab-text); }
  .fab-page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .fab-page-heading :is(h1, h2) { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: 0; }
  .fab-heading-icon { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid var(--fab-border); border-radius: 8px; background: var(--fab-surface); box-shadow: var(--fab-control-shadow); }
  .fab-heading-icon svg { width: 16px; height: 16px; }
  .fab-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 0; border: 0; background: transparent; }
  .fab-section { margin-top: var(--fab-section-gap); padding: 0; border: 0; box-shadow: none; background: transparent; min-width: 0; }
  .fab-section > :not([hidden]) ~ :not([hidden]) { margin-top: var(--fab-gap); }
  .fab-frame { min-width: 0; border: 1px solid var(--fab-border); border-radius: 8px; background: var(--fab-surface); box-shadow: var(--fab-frame-shadow); }
  .fab-control { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--fab-control-height); padding: 0 10px; border: 1px solid var(--fab-border); border-radius: 8px; color: var(--fab-text); background: var(--fab-surface); font-size: 12px; box-shadow: var(--fab-control-shadow); }
  .fab-control:not(:disabled):hover { background: var(--fab-hover); border-color: var(--fab-hover-border); box-shadow: var(--fab-control-hover-shadow); }
  .fab-control:focus-visible { outline: 2px solid var(--fab-accent); outline-offset: 2px; }
  .fab-icon-button { width: 32px; height: 32px; min-width: 32px; padding: 0; }
  .fab-icon-button svg { width: 16px; height: 16px; }
  .fab-segmented { display: inline-flex; align-items: stretch; gap: 0; padding: 0; height: 32px; overflow: hidden; border: 1px solid var(--fab-border); border-radius: 8px; background: var(--fab-surface); box-shadow: var(--fab-control-shadow); }
  #desktopWorkspaceShell .fab-segmented > button { min-height: 0; height: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none !important; background: var(--fab-surface); }
  #desktopWorkspaceShell .fab-segmented > button + button { border-left: 1px solid var(--fab-border); }
  #desktopWorkspaceShell .fab-segmented > button[aria-pressed="true"] { color: var(--fab-accent); }
  .fab-segmented button[aria-pressed="true"] svg { color: var(--fab-accent); }
  .fab-legend { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 16px; font-size: 11px; color: var(--fab-muted); }
  .fab-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
  .fab-kpis > div { height: var(--fab-kpi-height); min-height: var(--fab-kpi-height); padding: 9px 12px; border: 1px solid var(--fab-border); border-radius: 12px; background: var(--fab-surface); box-shadow: var(--fab-frame-shadow); }
  .fab-kpis strong { font-size: 20px; line-height: 24px; }
  .fab-divider { position: relative; }
  .fab-divider::before { content: ''; position: absolute; top: -16px; left: -24px; right: -16px; height: 1px; background: var(--fab-border); pointer-events: none; }

  /* Existing eight tabs adopt the preset without changing renderers or data. */
  #desktopWorkspaceShell .fab-tab { background-color: var(--fab-canvas); color: var(--fab-text); }
  #desktopWorkspaceShell .fab-tab :is(h1, h2) { font-size: 16px; line-height: 24px; }
  #desktopWorkspaceShell .fab-tab :is(h3, h4) { font-size: 12px; line-height: 18px; }
  #desktopWorkspaceShell .fab-tab :is(table th, table th span) { font-family: inherit; font-size: 12px; font-weight: 600; }
  #desktopWorkspaceShell .fab-tab .fab-section { padding: 0; border: 0; box-shadow: none; border-radius: 0; background: transparent !important; }
  #desktopWorkspaceShell .fab-tab .fab-frame { border-color: var(--fab-border); background: var(--fab-surface); box-shadow: var(--fab-frame-shadow); }
  #desktopWorkspaceShell .fab-tab .fab-page-heading { padding: 0; border: 0; box-shadow: none; background: transparent !important; }
  #desktopWorkspaceShell .fab-tab div:is(.w-7.h-7, .w-9.h-9, .w-10.h-10):has(> svg) { width: 32px; height: 32px; min-width: 32px; box-sizing: border-box; border-color: var(--fab-border); background-color: var(--fab-surface); box-shadow: var(--fab-control-shadow); }
  #desktopWorkspaceShell .fab-tab div:is(.w-7.h-7, .w-9.h-9, .w-10.h-10):has(> svg) > svg { width: 16px; height: 16px; }
  #desktopWorkspaceShell .fab-tab button:not(.mpd-group):not(.settings-nav-item):not([id^="cardScope"]):not([id^="themeCard"]) { min-height: 32px; box-sizing: border-box; }
  #desktopWorkspaceShell .fab-tab :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select) { min-height: 32px; box-sizing: border-box; font-size: 12px; border-color: var(--fab-border); }
  html:not(.dark) #desktopWorkspaceShell .fab-tab button:not(.mpd-group):not(.settings-nav-item) { background-color: #fff; }
  html:not(.dark) #desktopWorkspaceShell .fab-tab button.text-white { color: #475569; }
  html:not(.dark) #desktopWorkspaceShell .fab-tab :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { background-color: #fff; }
  .fab-tab button:disabled { opacity: .45; cursor: not-allowed; }
  .fab-tab table thead { color: var(--fab-muted); }
  .fab-tab .fab-select-control { display: flex; align-items: center; width: 168px; min-width: 0; height: 32px; border: 1px solid var(--fab-border); border-radius: 8px; background: var(--fab-surface); box-shadow: var(--fab-control-shadow); }
  .fab-tab .fab-select-control select.desktop-native-filter { position: absolute; width: 1px; min-width: 0; height: 1px; min-height: 0 !important; padding: 0; opacity: 0; clip-path: inset(50%); pointer-events: none; }
  #desktopWorkspaceShell .fab-tab .fab-select-control > button { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex: 1; width: 100%; min-width: 0; min-height: 0; height: 30px; padding: 0 8px; border: 0; border-radius: 8px; color: var(--fab-text); background: transparent; box-shadow: none !important; }
  .fab-tab .fab-select-control .desktop-filter-value { display: block; min-width: 0; flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 20px; }
  .fab-tab .fab-select-control:hover { border-color: var(--fab-hover-border); background: var(--fab-hover); }
  .fab-tab .fab-select-control:focus-within { outline: 2px solid var(--fab-accent); outline-offset: 2px; }
  .fab-tab .fab-select-control:has(#settingsSupervisorSelect) { width: 260px; max-width: 100%; }
  .table-page-controls .fab-select-control { width: 64px; }

  /* Workload matrix: keep column widths, sticky cells and all editing affordances. */
  #desktopWorkloadView { padding: 10px 24px 24px; gap: 16px; }
  #desktopWorkloadView #workloadPageHeader { display: flex; }
  #desktopWorkloadView #workloadToolsSlot { display: block; }
  #desktopWorkloadView #workloadTableTools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; flex-shrink: 0; }
  #desktopWorkloadView #workloadToolsSlot { flex: 1; min-width: 0; }
  #workloadTableTools #workloadPagination { flex-shrink: 0; margin-left: auto; }
  #workloadToolsSlot .workspace-toolbar { padding: 0; border: 0; background: transparent !important; }
  #workloadToolsSlot #workloadToolbarCutoff { min-height: 32px; }
  #desktopWorkloadView .fab-workload-kpis { border: 0; padding: 0; background: transparent !important; }
  #desktopWorkloadView .fab-workload-kpis > div { gap: 8px; }
  #desktopWorkloadView .fab-workload-kpis > div > div { margin-left: 0; }
  #desktopWorkloadView .fab-workload-kpis > div > div { min-height: 72px; display: flex; flex-direction: column; justify-content: center; padding: 9px 12px; border-color: var(--fab-border); background: var(--fab-surface); box-shadow: var(--fab-frame-shadow); }
  #desktopWorkloadView .fab-workload-kpis [id^="wlKpi"] { font-size: 20px; line-height: 24px; }
  #desktopWorkloadView .fab-workload-kpis #wlKpiThisWeekPlan { font-size: 12px; }
  #workloadPagination { padding: 0; border: 0; }
  #desktopWorkloadView .fab-data-scroll { min-height: 0; }
  html:not(.dark) #workloadTable, html:not(.dark) #workloadTable :is(th, td) { border-color: var(--fab-border) !important; }
  html:not(.dark) #workloadTable thead :is(th, td) { background-color: #fff; }
  html:not(.dark) #thEditColsHeader { color: #475569; }

  /* S-curve: headings outside the frames, legend inside the chart at top right. */
  #desktopChartView { padding: 10px 24px 24px; }
  #desktopChartView > :not([hidden]) ~ :not([hidden]) { margin-top: 32px; }
  #desktopChartView .fab-section > div:first-child { border: 0; padding: 0; }
  #desktopChartView .fab-section > :not([hidden]) ~ :not([hidden]) { margin-top: 16px; }
  #desktopChartView .fab-page-heading > div:last-child { flex-wrap: wrap; gap: 8px; }
  #desktopChartView .fab-page-heading > div:last-child > * { margin-left: 0; }
  #desktopChartView .fab-page-heading > div:last-child > div { min-height: 64px; padding: 8px 12px; border-color: var(--fab-border); background: var(--fab-surface); box-shadow: var(--fab-frame-shadow); }
  #desktopChartView .fab-page-heading [id^="chartKpi"] { font-size: 20px; line-height: 24px; }
  #desktopChartView #svgChartWrapper { display: flex; flex-direction: column; gap: 12px; padding: 8px; }
  #fabScurveLegend { order: -1; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
  #workloadSvgChart { flex: 1; min-height: 0; height: 0; }
  html:not(.dark) #chartBreakdownTable :is(th, td), html:not(.dark) #chartBreakdownTable { background-color: #fff; border-color: var(--fab-border); }

  /* Gantt: preserve the 60px header and synchronized left/right row heights. */
  #desktopTimelineView { padding: 10px 24px 24px; gap: 16px; }
  #desktopTimelineView #timelinePageHeader { display: flex; }
  #desktopTimelineView .fab-toolbar { padding: 0; border: 0; background: transparent !important; }
  #desktopTimelineView .fab-timeline-summary { padding: 0; border: 0; background: transparent !important; }
  #desktopTimelineView .fab-timeline-summary > div:has(#kpiTimelineTotalItems) { flex: 1; }
  #desktopTimelineView #timelinePagination { padding: 0; margin-left: auto; flex-wrap: nowrap; }
  #desktopTimelineView .fab-timeline-frame { display: grid; grid-template-columns: 540px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
  #desktopTimelineView #timelineLegend { display: flex; grid-column: 1 / -1; grid-row: 1; justify-content: flex-end; padding: 8px; border-bottom: 1px solid var(--fab-border); }
  #desktopTimelineView #timelineLeftPane { grid-column: 1; grid-row: 2; min-height: 0; }
  #desktopTimelineView #timelineRightPane { grid-column: 2; grid-row: 2; min-height: 0; }
  #desktopTimelineView .fab-timeline-summary > div > div:has(> svg) { display: grid; place-items: center; padding: 0; width: 32px; height: 32px; }
  #desktopTimelineView .fab-timeline-summary > div > div > svg { width: 16px; height: 16px; }
  #desktopTimelineView #timelineToolbar button { height: 32px; min-height: 32px; padding: 0 10px; border: 1px solid var(--fab-border); border-radius: 8px; font-size: 12px; font-weight: 500; outline: none; }
  #desktopTimelineView #timelineToolbar button:focus-visible { outline: 2px solid var(--fab-accent); outline-offset: -3px; }
  #desktopTimelineView #timelineToolbar .fab-segmented { height: 32px; padding: 0; gap: 0; border-radius: 8px; }
  #desktopWorkspaceShell #timelineToolbar .fab-segmented > button { height: 100%; min-height: 0; border: 0; border-radius: 0; }
  #desktopWorkspaceShell #timelineToolbar .fab-segmented > button + button { border-left: 1px solid var(--fab-border); }
  #desktopTimelineView #timelineToolbar #timelineNavigation { height: 32px; padding: 0; gap: 0; overflow: hidden; border: 1px solid var(--fab-border); border-radius: 8px; background: var(--fab-surface); box-shadow: var(--fab-control-shadow); }
  #desktopTimelineView #timelineToolbar #timelineNavigation:hover { box-shadow: var(--fab-control-hover-shadow); }
  #desktopWorkspaceShell #timelineToolbar #timelineNavigation > button { display: inline-flex; align-items: center; justify-content: center; height: 100%; min-height: 0; min-width: 32px; padding: 0 10px; margin: 0; border: 0; border-radius: 0; box-shadow: none !important; }
  #timelineToolbar #timelineNavigation > div { display: none; }
  #timelineToolbar #timelineNavigation > button:not(:first-child),
  #timelineToolbar #timelineNavigation > #timelineMonthLabel { border-left: 1px solid var(--fab-border); }
  #timelineToolbar #timelineNavigation > #timelineMonthLabel { display: flex; align-items: center; height: 100%; margin: 0; padding: 0 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }
  #desktopTimelineView #timelineToolbar > div:last-child { gap: 12px; }
  #desktopTimelineView #timelineToolbar > div:last-child > * { margin-left: 0; }
  html:not(.dark) #desktopTimelineView :is(#timelineHeaderMonthsRow, #timelineHeaderDaysRow, #timelineHeaderDayOfWeekRow) { background-color: #fff; }

  /* Master database: scroll inside the frame, not across the page. */
  #desktopTableView { display: flex; flex-direction: column; overflow: hidden; padding: 10px 24px 24px; }
  #desktopTableView.hidden { display: none; }
  #desktopTableView .fab-master-frame { flex: 1; min-height: 0; overflow: auto; }
  html:not(.dark) .master-database-table thead { background-color: #fff; }
  #desktopTableView .master-database-table :is(th, td) { border-color: var(--fab-border); }
  #desktopWorkspaceShell #desktopTableView button[data-master-filter-button],
  #desktopWorkspaceShell #desktopTableView button[data-master-filter-button]:hover { border: 0; box-shadow: none !important; background: transparent !important; }

  /* Kanban: unframed headings with framed, independently scrolling lanes. */
  #desktopKanbanView { padding: 10px 24px 24px; }
  #desktopKanbanView > div { gap: 16px; }
  #desktopKanbanView > div > .fab-kanban-lane { margin-left: 0; border: 0; background: transparent !important; gap: 16px; min-width: 224px; }
  #desktopKanbanView .fab-kanban-lane > div:first-child { padding: 0; border: 0; background: transparent !important; min-height: 32px; }
  #desktopKanbanView .fab-kanban-lane > .fab-frame { padding: 8px; }
  #desktopKanbanView [id^="kCol"] > div { padding: 12px; border-color: var(--fab-border); box-shadow: var(--fab-control-shadow); }
  #desktopKanbanView [id^="kCol"] > div:hover { border-color: var(--fab-hover-border); box-shadow: var(--fab-control-hover-shadow); }

  /* Progress entry: same segmented controls, full-width cards and batch table. */
  #desktopProgressView { padding: 10px 24px 24px; gap: 16px; }
  #desktopProgressView .fab-progress-toolbar { padding: 0; border: 0; background: transparent !important; }
  #desktopProgressView #progressMainScrollArea { padding: 0; min-height: 0; }
  #progressMainScrollArea > div { max-width: none; }
  #progressMainScrollArea :is(.border.rounded-xl, .border.rounded-lg) { border-color: var(--fab-border); box-shadow: var(--fab-frame-shadow); }
  html:not(.dark) #progressMainScrollArea :is(table, thead, tr, th, td) { background-color: #fff; }
  #desktopProgressView #progressSearchInput { width: 176px; border-radius: 999px; height: 32px; }
  #desktopProgressView .fab-segmented { gap: 0; }

  /* Daily data entry keeps its forms and save confirmation; report sizing is shared. */
  #desktopManpowerDailyView { --mpd-bg: var(--fab-canvas); --mpd-border: var(--fab-border); }
  #desktopManpowerDailyView .mpd-workspace { max-width: none; padding: 10px 24px 24px; --mpd-border: var(--fab-border); }
  #desktopManpowerDailyView :is(.mpd-header, .mpd-toolbar, .mpd-kpis, .mpd-list-heading) { margin-bottom: 16px; }
  #desktopManpowerDailyView .mpd-header h1 { font-size: 16px; line-height: 24px; letter-spacing: 0; }
  #desktopManpowerDailyView .mpd-toolbar { align-items: flex-end; padding: 0; border: 0; background: transparent; }
  #desktopManpowerDailyView :is(.mpd-button, .mpd-toolbar input, .mpd-toolbar select, .mpd-field input) { height: 32px; min-height: 32px; padding: 4px 10px; }
  #desktopManpowerDailyView .mpd-primary { color: var(--fab-accent); border-color: var(--fab-border); }
  #desktopManpowerDailyView .mpd-toolbar input[type=search] { flex: 0 1 176px; margin-left: auto; border-radius: 999px; }
  #desktopManpowerDailyView :is(.mpd-kpis, .mpd-groups) { gap: 8px; }
  #desktopManpowerDailyView .mpd-kpi { min-height: 72px; padding: 9px 12px; box-shadow: var(--fab-frame-shadow); }
  #desktopManpowerDailyView .mpd-kpi strong { font-size: 20px; line-height: 24px; letter-spacing: 0; margin-top: 4px; }
  #desktopManpowerDailyView .mpd-group { border-color: var(--fab-border); }
  #desktopManpowerDailyView .mpd-group.is-selected { border-color: var(--fab-border); box-shadow: var(--fab-control-shadow); }
  #desktopManpowerDailyView .mpd-group.is-selected strong { color: var(--fab-accent); }
  #desktopManpowerDailyView .mpd-list-heading { margin-top: 32px; }
  #desktopManpowerDailyView .mpd-detail { margin-top: 32px; padding: 0; border: 0; box-shadow: none; background: transparent; }
  #desktopManpowerDailyView .mpd-editor-grid { gap: 24px; }
  #desktopManpowerDailyView .mpd-edit-section { border: 1px solid var(--fab-border); border-radius: 8px; background: var(--fab-surface); padding: 16px; box-shadow: var(--fab-frame-shadow); }

  /* Settings keeps its local navigation and permission-sensitive controls. */
  #desktopSettingsView { padding: 10px 24px 24px; gap: 32px; }
  #desktopSettingsView .settings-layout { gap: 24px; }
  #desktopSettingsView .settings-panel { gap: 16px; }
  #desktopSettingsView .settings-nav { padding: 0; border: 0; background: transparent !important; }
  #desktopWorkspaceShell #desktopSettingsView .settings-nav-item { box-shadow: none !important; border: 0; }
  #desktopSettingsView .settings-nav-item[aria-selected="true"] { color: var(--fab-accent); background: var(--fab-hover); }
  #desktopSettingsView .settings-card { border-color: var(--fab-border); border-radius: 8px; padding: 16px; background: var(--fab-surface); box-shadow: var(--fab-frame-shadow); }
  #desktopSettingsView .settings-language-buttons { display: inline-flex; padding: 0; overflow: hidden; border: 1px solid var(--fab-border); border-radius: 8px; box-shadow: var(--fab-control-shadow); }
  #desktopWorkspaceShell #desktopSettingsView .settings-language-buttons button { margin: 0; border: 0; border-radius: 0; height: 32px; box-shadow: none !important; }
  #desktopSettingsView .settings-language-buttons button + button { border-left: 1px solid var(--fab-border) !important; }
  #desktopSettingsView .settings-language-buttons button[aria-pressed="true"] { color: var(--fab-accent); }
  #desktopSettingsView :is(.group-shop-row, .settings-card table thead) { border-color: var(--fab-border); background: var(--fab-surface); }

  /* All summary cards use the measured Manpower report reference. */
  #desktopWorkspaceShell .fab-kpi-card {
    height: var(--fab-kpi-height); min-height: var(--fab-kpi-height); box-sizing: border-box;
    display: flex; flex-direction: column; justify-content: center;
    padding: 9px 12px; border: 1px solid var(--fab-border); border-radius: 12px;
    background-color: var(--fab-surface); box-shadow: var(--fab-frame-shadow); text-align: left;
  }
  #desktopWorkspaceShell .fab-kpi-card > :not([hidden]) ~ :not([hidden]) { margin-top: 4px; }
  #desktopWorkspaceShell .fab-kpi-card > .fab-kpi-label,
  #desktopWorkspaceShell .fab-kpi-card > .fab-kpi-label > span {
    font-family: inherit; font-size: var(--fab-kpi-label-size); line-height: 18px;
    font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--fab-muted);
  }
  #desktopWorkspaceShell .fab-kpi-card :is([id^="wlKpi"], [id^="chartKpi"], [id^="kpiManpower"], [id^="mhKpi"], strong):not([id$="Scope"]):not(#mhKpiNtOtBreakdown):not(#wlKpiThisWeekPlan) {
    font-size: var(--fab-kpi-value-size); line-height: 24px; font-weight: 700;
  }
  #desktopWorkspaceShell .fab-kpi-card #mhKpiNtOtBreakdown { margin-left: 6px; min-width: 0; font-size: 10px; line-height: 16px; font-weight: 400; }
  #desktopWorkspaceShell .fab-kpi-card small { display: inline; margin: 0 0 0 8px; font-size: 10px; line-height: 16px; font-weight: 400; letter-spacing: 0; }
  #desktopWorkloadView #workloadKpiStrip { display: block; }
  #desktopWorkloadView #workloadKpiStrip > div { display: grid; width: 100%; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  #desktopWorkloadView #workloadKpiStrip > div > div { min-width: 0; margin: 0; }
  #desktopChartView .fab-page-heading .fab-kpi-card { min-width: 140px; }
}
@media (max-width: 767px) { .fab-select-control { display: contents; } }
