/* Shared workspace shell. Existing page controllers and permissions are retained. */
body.fh-workspace-v2 {
  --ws-sidebar: 216px; --ws-topbar: 82px;
  --fh-canvas: #0b111a; --fh-surface: #121c29; --fh-surface-inset: #0e1722;
  --fh-line: #283647; --fh-copy: #eef3fa; --fh-secondary: #a3b3c6;
  --fh-radius: 10px; --accent: #34c7ed; --accent-2: #57d8f3;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Record workspaces use the same hierarchy as the vehicle profile. */
body.fh-workspace-v2 :is(.fh-driver-registry,.fh-client-editor) { color: var(--fh-copy); font-size: 13px; line-height: 1.5; }
body.fh-workspace-v2 :is(.fh-driver-registry,.fh-client-editor) :is(input:not([type=checkbox]),select,textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; border: 1px solid #304158 !important; border-radius: 6px !important; background: #0e1722 !important; color: #e3ecf7 !important; font: inherit; padding: 9px 11px; }
body.fh-workspace-v2 :is(.fh-driver-registry,.fh-client-editor) textarea { min-height: 96px; resize: vertical; }
body.fh-workspace-v2 :is(.fh-driver-registry,.fh-client-editor) button { min-height: 38px; font: inherit; }
body.fh-workspace-v2 :is(.fh-driver-registry,.fh-client-editor) button:disabled { opacity: .5; cursor: not-allowed; }
body.fh-workspace-v2 .fh-driver-registry { gap: 16px; }
body.fh-workspace-v2 .fh-driver-registry-head { padding-bottom: 12px; border-bottom: 1px solid #283647; }
body.fh-workspace-v2 .fh-driver-registry-head h2 { font-size: 18px; }
body.fh-workspace-v2 .fh-driver-registry:is([data-view=detail],[data-view=form]) > .fh-driver-registry-head { display: none; }
body.fh-workspace-v2 .ws-record-caption { color: #a3b3c6; font-size: 12px; }
body.fh-workspace-v2 .fh-driver-registry-company { max-width: 440px; color: #a3b3c6; font-size: 12px; }
body.fh-workspace-v2 .fh-driver-registry-toolbar { display: grid; grid-template-columns: minmax(160px,1fr) auto minmax(130px,.5fr) auto auto; gap: 8px; }
body.fh-workspace-v2 .fh-driver-registry-toolbar input[type=search] { min-width: 0; }
body.fh-workspace-v2 .fh-driver-registry-list { grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); }
body.fh-workspace-v2 .fh-driver-registry-row { padding: 16px; border: 1px solid #304158; background: #0e1722; border-radius: 8px; }
body.fh-workspace-v2 .fh-driver-registry-row h3 { font-size: 17px; margin-bottom: 10px; }
body.fh-workspace-v2 .fh-driver-registry-row p { color: #a3b3c6; font-size: 12px; }
body.fh-workspace-v2 .ws-record-identity h3 { font-size: 24px; line-height: 1.3; margin: 0 0 6px; overflow-wrap: anywhere; }
body.fh-workspace-v2 .ws-record-identity p { color: #a3b3c6; }
body.fh-workspace-v2 .ws-record-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; margin: 0; padding: 4px 16px; border: 1px solid #283647; border-radius: 8px; background: #0e1722; }
body.fh-workspace-v2 .ws-record-facts > div { min-width: 0; padding: 12px 0; }
body.fh-workspace-v2 .ws-record-facts dt { color: #a3b3c6; font-size: 12px; }
body.fh-workspace-v2 .ws-record-facts dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
body.fh-workspace-v2 .ws-record-note { padding: 12px 14px; background: #142535; border-left: 3px solid #397d99; border-radius: 4px; color: #b4c7da; font-size: 12px; }
body.fh-workspace-v2 .ws-record-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
body.fh-workspace-v2 .ws-record-actions button { margin: 0; width: auto; flex: 0 1 auto; padding: 8px 12px; white-space: normal; }
body.fh-workspace-v2 .ws-record-actions > p { flex-basis: 100%; }
body.fh-workspace-v2 .fh-driver-registry-row .ws-record-actions { margin-top: 12px; }
body.fh-workspace-v2 .ws-primary-action { background: #164052 !important; border-color: #316b82 !important; color: #91e6fa !important; }
body.fh-workspace-v2 .ws-record-related { padding-top: 14px; border-top: 1px solid #283647; }
body.fh-workspace-v2 .ws-record-related:not(:has(button)) { display: none; }
body.fh-workspace-v2 .ws-record-related h4 { margin: 0 0 12px; font-size: 13px; color: #a3b3c6; }
body.fh-workspace-v2 .fh-driver-registry-form { gap: 16px; }
body.fh-workspace-v2 .fh-driver-registry-form h3 { font-size: 20px; }
body.fh-workspace-v2 .fh-driver-registry-form label { color: #b8c7d9; font-size: 12px; }
body.fh-workspace-v2 .fh-driver-registry-actions { padding-top: 12px; border-top: 1px solid #283647; }
body.fh-workspace-v2 .ws-field-wide { grid-column: 1/-1; }
body.fh-workspace-v2 .ws-record-section { grid-column: 1/-1; display: block; min-width: 0; margin: 0; padding: 16px; border: 1px solid #283647; border-radius: 8px; background: #0e1722; }
body.fh-workspace-v2 .ws-record-section > legend { padding: 0 8px; color: #d9e8f8; font-size: 14px; font-weight: 600; }
body.fh-workspace-v2 .ws-record-section-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 18px; }
body.fh-workspace-v2 .ws-record-section-grid > label { display: grid; gap: 6px; align-content: start; color: #b8c7d9; font-size: 12px; }
body.fh-workspace-v2 .ws-record-section-grid > p { margin: 0; color: #a3b3c6; font-size: 12px; }
body.fh-workspace-v2 .fh-client-editor .fh-client-weekdays { min-width: 0; display: flex; flex-wrap: wrap; gap: 10px; border-color: #304158; }
body.fh-workspace-v2 .fh-client-editor .fh-client-weekdays label { display: flex; flex: 0 0 auto !important; align-items: center; gap: 5px; font-size: 12px; }
body.fh-workspace-v2 .fh-client-editor .fh-data-inline-actions { position: sticky; bottom: -20px; margin-top: 12px; padding: 14px 0; background: #121c29; border-top: 1px solid #283647; z-index: 1; }
/* Explicit controller visibility must outrank legacy button display styles. */
body.fh-workspace-v2 .fh-dispatch-dialog [hidden],
body.fh-workspace-v2 #clientsPage button[hidden] { display: none !important; }
@media (max-width: 900px) {
  body.fh-workspace-v2 .fh-driver-registry-toolbar { grid-template-columns: minmax(140px,1fr) auto; }
  body.fh-workspace-v2 .fh-driver-registry-toolbar select { grid-column: 1/-1; }
}
@media (max-width: 600px) {
  body.fh-workspace-v2 .ws-record-facts,body.fh-workspace-v2 .ws-record-section-grid { grid-template-columns: minmax(0,1fr); }
  body.fh-workspace-v2 .ws-record-section { padding: 12px; }
  body.fh-workspace-v2 .fh-driver-registry-company { max-width: none; }
  body.fh-workspace-v2 .fh-driver-registry-form { grid-template-columns: minmax(0,1fr); }
}
.ws-topbar,.ws-nav-backdrop,.ws-menu-toggle,.ws-nav-pin { display: none; }
body.fh-workspace-v2:not(.fh-authenticated) :is(.ws-topbar,.ws-skip,.ws-nav-backdrop) { display: none; }
.ws-skip { position: fixed; left: 240px; top: -60px; z-index: 99999; padding: 12px 20px; background: #57d8f3; color: #06121c; border-radius: 6px; }
.ws-skip:focus { top: 10px; }
body.fh-workspace-v2.fh-authenticated .header {
  position: fixed !important; inset: 0 auto 0 0 !important;
  width: var(--ws-sidebar) !important; height: 100dvh !important; max-height: 100dvh !important; min-height: 0 !important; border-radius: 0 !important;
  background: #0e1722 !important; border: 0 !important; border-right: 1px solid #243142 !important;
  z-index: 2100 !important; overflow: visible !important; box-shadow: none !important;
}
body.fh-workspace-v2 .header-inner {
  display: flex !important; flex-direction: column !important; align-items: stretch !important;
  width: 100% !important; height: 100% !important; max-height: none !important; min-height: 0 !important;
  max-width: none !important; margin: 0 !important; padding: 0 12px !important; gap: 0 !important;
}
body.fh-workspace-v2 .ws-brand { display: flex; align-items: center; flex: 0 0 82px; gap: 8px; padding: 0 4px; }
body.fh-workspace-v2 .ws-brand .brand { display: flex !important; padding: 0 !important; margin: 0 !important; width: auto !important; min-width: 0 !important; border: 0 !important; }
body.fh-workspace-v2 .brand-badge { width: 48px !important; height: 42px !important; border: 0 !important; padding: 0 !important; }
body.fh-workspace-v2 .brand-logo-img { width: 48px !important; height: auto !important; object-fit: contain; }
body.fh-workspace-v2 .brand-wordmark { display: inline !important; position: static !important; margin: 0 !important; font-size: 15px !important; letter-spacing: -.4px !important; white-space: nowrap; }
body.fh-workspace-v2 .nav {
  position: static !important; display: flex !important; flex-direction: column !important;
  align-items: stretch !important; justify-content: flex-start !important;
  flex: 1 1 auto !important; width: 100% !important; min-height: 0 !important; height: auto !important; max-height: none !important;
  padding: 0 0 12px !important; margin: 0 !important; gap: 12px !important;
  border: 0 !important; background: transparent !important; overflow: auto !important; box-shadow: none !important;
  transform: none !important;
}
body.fh-workspace-v2 .ws-nav-section { display: flex; flex-direction: column; gap: 3px; }
body.fh-workspace-v2 .ws-nav-heading { padding: 12px 12px 5px; color: #8395ac; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
body.fh-workspace-v2 .nav .nav-btn {
  flex-direction: row !important;
  align-items: center !important; justify-content: flex-start !important; gap: 12px !important;
  width: 100% !important; flex: 0 0 auto !important; min-width: 0 !important;
  min-height: 42px !important; height: auto !important; padding: 10px 12px !important;
  margin: 0 !important; border: 1px solid transparent !important; border-radius: 7px !important;
  background: transparent !important; color: #afbed0 !important; font-size: 13px !important; font-weight: 550 !important;
  line-height: 20px !important; text-align: left !important; box-shadow: none !important;
}
body.fh-workspace-v2 .nav-btn::after { display: none !important; }
body.fh-workspace-v2 .nav .nav-label { display: inline !important; opacity: 1 !important; font-size: 13px !important; }
body.fh-workspace-v2 .nav-icon { width: 18px !important; height: 18px !important; flex: 0 0 18px; }
body.fh-workspace-v2 .nav-btn:hover { background: #182737 !important; color: #fff !important; }
body.fh-workspace-v2 .nav-btn.active { background: #123447 !important; color: #6edff7 !important; border-color: #22566c !important; }
body.fh-workspace-v2 .nav-group { display: grid !important; grid-template-columns: minmax(0,1fr) 28px; position: relative !important; flex: 0 0 auto !important; width: 100% !important; }
body.fh-workspace-v2 .ws-nav-expand { border: 0; border-radius: 6px; background: transparent; color: #91a5bb; padding: 0; font-size: 18px; cursor: pointer; }
body.fh-workspace-v2 .ws-nav-expand:hover { color: #6edff7; background: #182737; }
body.fh-workspace-v2 .nav .nav-menu {
  display: none !important; position: static !important; inset: auto !important; grid-column: 1/-1;
  width: auto !important; min-width: 0 !important; transform: none !important; padding: 4px 0 4px 30px !important;
  background: none !important; border: 0 !important; box-shadow: none !important;
}
body.fh-workspace-v2 .nav .ws-submenu-open .nav-menu { display: grid !important; grid-template-columns: 1fr !important; }
body.fh-workspace-v2 .nav-menu button { white-space: normal !important; font-size: 12px !important; min-height: 34px; text-align: left; }
body.fh-workspace-v2 .ws-sidebar-foot { flex: 0 0 auto; padding: 14px 12px; border-top: 1px solid #243142; font-size: 10px; color: #8395ac; letter-spacing: .4px; }
body.fh-workspace-v2.fh-authenticated .ws-topbar {
  position: fixed; inset: 0 0 auto var(--ws-sidebar); height: var(--ws-topbar); z-index: 2000;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 28px; background: #0e1722; border-bottom: 1px solid #243142;
}
body.fh-workspace-v2 .ws-heading { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 16px; min-width: 0; }
body.fh-workspace-v2 .ws-breadcrumb { grid-column: 1/-1; font-size: 10px; color: #8295ad; text-transform: uppercase; letter-spacing: 1px; line-height: 18px; }
body.fh-workspace-v2 .ws-page-title { margin: 0; font-size: 23px; line-height: 32px; font-weight: 650; letter-spacing: -.65px; color: #f1f6fc; }
body.fh-workspace-v2 .ws-page-description { color: #94a6bc; font-size: 12px; line-height: 18px; }
body.fh-workspace-v2 .ws-topbar .handler-header-actions { display: flex !important; position: relative !important; margin: 0 !important; flex: 0 0 auto; gap: 8px !important; }
body.fh-workspace-v2 .ws-topbar .handler-header-button { width: 36px !important; height: 36px !important; border-radius: 8px !important; background: #142131 !important; border: 1px solid #2a3a50 !important; }
body.fh-workspace-v2 .ws-topbar .handler-header-button[hidden] { display: none !important; }
body.fh-workspace-v2.fh-authenticated .page {
  position: absolute !important; left: var(--ws-sidebar) !important; top: var(--ws-topbar) !important;
  width: calc(100% - var(--ws-sidebar)) !important; height: calc(100dvh - var(--ws-topbar)) !important;
  max-height: calc(100dvh - var(--ws-topbar)) !important; min-height: 0 !important;
  margin: 0 !important; padding: 24px !important; overflow: auto !important;
}
body.fh-workspace-v2 .page-section { min-width: 0 !important; }
body.fh-workspace-v2 .page :is(h1,h2,h3) { letter-spacing: -.3px; }
body.fh-workspace-v2 .page :is(.panel,.reports-panel,.reports-workspace,.reports-rail-panel,.tacho-card,.tacho-data-panel,.vehicles-panel,.drivers-ops-panel,.drivers-context-panel,.communication-panel,.admin-console-card,.preferences-console-card,.ai-console-surface) {
  background: #121c29 !important; border: 1px solid #283647 !important; border-radius: 10px !important; box-shadow: none !important;
}
body.fh-workspace-v2 .page :is(.panel-header,.reports-panel-heading,.reports-preview-head,.drivers-panel-head,.admin-card-head,.preferences-card-head) { padding: 16px 18px !important; border-bottom-color: #283647 !important; }
body.fh-workspace-v2 .page :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) {
  background-color: #0e1722 !important; border-color: #304158 !important; border-radius: 6px !important; color: #e3ecf7 !important;
}
body.fh-workspace-v2 .page :is(button,input,select,textarea) { font-family: inherit; }
body.fh-workspace-v2 .page button:disabled { opacity: .48; cursor: not-allowed; }
body.fh-workspace-v2 :is(button,a,input,select,summary):focus-visible { outline: 2px solid #6edff7 !important; outline-offset: 3px; }
body.fh-workspace-v2 .page table { font-variant-numeric: tabular-nums; }
body.fh-workspace-v2 .page table th { color: #9aadc4 !important; font-weight: 600 !important; }
body.fh-workspace-v2 .page :is(.status-line,.panel-subtitle) { line-height: 1.5 !important; }
/* Tachograph workspace: keep service availability separate from stored originals. */
body.fh-workspace-v2 #tachographsPage.page-section.active { display: grid !important; grid-template-columns: minmax(0,1fr) auto !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; padding: 0 !important; gap: 16px !important; }
body.fh-workspace-v2 #tachographsPage .tachographs-console-head { position: static !important; grid-column: 2 !important; grid-row: 1 !important; height: auto !important; min-height: 0 !important; max-height: none !important; padding: 0 !important; margin: 0 !important; pointer-events: auto !important; }
body.fh-workspace-v2 #tachographsPage .tachographs-refresh-area { height: auto !important; flex-wrap: wrap !important; font-size: 11px !important; }
body.fh-workspace-v2 #tachographsPage .tachographs-refresh-area > span { flex-wrap: wrap; }
body.fh-workspace-v2 #tachographsPage > .module-source-status { grid-column: 1/-1 !important; grid-row: 2 !important; margin: 0 !important; padding: 12px 16px !important; font-size: 13px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #tachographsPage .tachographs-tabs { grid-column: 1 !important; grid-row: 1 !important; height: auto !important; min-height: 40px !important; padding: 0 !important; margin: 0 !important; gap: 4px !important; flex-wrap: wrap !important; }
body.fh-workspace-v2 #tachographsPage .tachographs-tabs button { padding: 8px 12px !important; height: auto !important; min-height: 40px !important; font-size: 13px !important; }
body.fh-workspace-v2 #tachographsPage .tachographs-tabs { overflow: visible !important; }
body.fh-workspace-v2 #tachographsPage .tachographs-tab-stage { grid-column: 1/-1 !important; grid-row: 3 !important; min-height: 0 !important; height: auto !important; overflow: visible !important; padding: 0 !important; }
body.fh-workspace-v2 #tachographsPage .tachographs-tab-panel { height: auto !important; min-height: 0 !important; overflow: visible !important; }
body.fh-workspace-v2 #tachographsPage #tachoOverviewPanel.active { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; grid-template-rows: auto !important; gap: 16px !important; }
body.fh-workspace-v2 #tachographsPage :is(.tacho-overview-top,.tacho-overview-bottom) { display: contents !important; }
body.fh-workspace-v2 #tachographsPage .tacho-overview-bottom > .tacho-card:last-child { grid-column: 1/-1; }
body.fh-workspace-v2 #tachographsPage .tacho-metric-strip { grid-column: 1/-1 !important; grid-template-columns: repeat(5,minmax(0,1fr)) !important; gap: 10px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-metric-card { grid-template-columns: 28px minmax(0,1fr) !important; min-height: 94px !important; padding: 12px !important; gap: 10px !important; background: var(--fh-surface) !important; border-color: var(--fh-line) !important; border-radius: 8px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-metric-icon { width: 28px !important; height: 28px !important; flex-basis: 28px !important; border: 0 !important; border-radius: 7px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-metric-strip { overflow: visible !important; }
body.fh-workspace-v2 #tachographsPage .tacho-metric-card { min-width: 0 !important; }
body.fh-workspace-v2 #tachographsPage .tacho-metric-icon .fh-icon { width: 18px !important; height: 18px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-metric-card span { font-size: 11px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #tachographsPage .tacho-metric-card b { font-size: 23px !important; line-height: 1.3 !important; }
body.fh-workspace-v2 #tachographsPage .tacho-metric-card small { font-size: 11px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #tachographsPage .tacho-card { height: auto !important; min-height: 0 !important; padding: 16px !important; gap: 12px !important; grid-template-rows: auto minmax(0,1fr) auto !important; overflow: visible !important; }
body.fh-workspace-v2 #tachographsPage .tacho-card h2 { font-size: 16px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #tachographsPage .tacho-card h2 span { font-size: 12px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-card-content { height: auto !important; min-height: 130px !important; padding-top: 0 !important; overflow: visible !important; }
body.fh-workspace-v2 #tachographsPage :is(.tacho-donut-layout,.tacho-readout-stack,.tacho-compliance-layout) { height: auto !important; min-height: 130px !important; gap: 12px !important; }
body.fh-workspace-v2 #tachographsPage :is(.tacho-donut-layout,.tacho-compliance-layout) { grid-template-columns: 132px minmax(0,1fr) !important; }
/* Clip only the gauge artwork, leaving room for the two-line status label. */
body.fh-workspace-v2 #tachographsPage .tacho-gauge { height: 90px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-gauge::before { clip-path: inset(0 0 50% 0); }
body.fh-workspace-v2 #tachographsPage .tacho-gauge::after { height: 44px; border-radius: 44px 44px 0 0; }
body.fh-workspace-v2 #tachographsPage :is(.tacho-legend-row,.tacho-readout-meta,.tacho-missing,.tacho-company-card small,.tacho-list-row span,.tacho-status-tag,.tacho-donut-center,.tacho-gauge-label) { font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #tachographsPage :is(.tacho-company-card span,.tacho-list-row b) { font-size: 13px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #tachographsPage .tacho-list-row { min-height: 44px !important; padding: 8px 0 !important; }
body.fh-workspace-v2 #tachographsPage .tacho-card-action { min-height: 38px !important; margin-top: 0 !important; font-size: 12px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-data-panel { height: auto !important; min-height: 0 !important; overflow: visible !important; padding: 16px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-data-panel > header { flex-wrap: wrap !important; gap: 12px !important; margin-bottom: 16px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-data-panel > header h2 { font-size: 18px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #tachographsPage .tacho-data-panel > header p { font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #tachographsPage .tacho-table-wrap { flex: 0 0 auto !important; height: auto !important; max-height: 600px !important; overflow: auto !important; }
body.fh-workspace-v2 #tachographsPage .tacho-table-wrap table { min-width: 720px !important; width: 100% !important; }
body.fh-workspace-v2 #tachographsPage .tacho-table-wrap :is(th,td) { padding: 10px 12px !important; height: 44px !important; font-size: 12px !important; line-height: 1.5 !important; white-space: normal !important; }
body.fh-workspace-v2 #tachographsPage .tacho-table-wrap button { min-height: 34px !important; font-size: 12px !important; margin: 4px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-archive-launcher { padding: 16px 0 !important; font-size: 13px !important; }
body.fh-workspace-v2 #tachographsPage .tacho-archive-launcher h3 { font-size: 15px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #tachographsPage .tachographs-console-foot { grid-column: 1/-1 !important; grid-row: 4 !important; height: auto !important; min-height: 0 !important; flex-wrap: wrap !important; font-size: 11px !important; line-height: 1.5 !important; padding: 0 0 8px !important; }
@media (max-width: 1100px) {
  body.fh-workspace-v2 #tachographsPage.page-section.active { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #tachographsPage .tachographs-console-head { grid-column: 1 !important; grid-row: 2 !important; justify-content: flex-start !important; }
  body.fh-workspace-v2 #tachographsPage .tachographs-refresh-area { justify-content: flex-start !important; margin: 0 !important; }
  body.fh-workspace-v2 #tachographsPage > .module-source-status { grid-row: 3 !important; }
  body.fh-workspace-v2 #tachographsPage .tachographs-tab-stage { grid-row: 4 !important; }
  body.fh-workspace-v2 #tachographsPage .tachographs-console-foot { grid-row: 5 !important; }
  body.fh-workspace-v2 #tachographsPage .tacho-metric-strip { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width: 700px) {
  body.fh-workspace-v2 #tachographsPage #tachoOverviewPanel.active { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #tachographsPage .tacho-metric-strip { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.fh-workspace-v2 #tachographsPage .tachographs-tabs button { font-size: 12px !important; padding: 8px !important; }
  body.fh-workspace-v2 #tachographsPage .tacho-archive-controls button { width: 100%; }
}
@media (max-width: 380px) {
  body.fh-workspace-v2 #tachographsPage :is(.tacho-donut-layout,.tacho-compliance-layout) { grid-template-columns: minmax(0,1fr) !important; }
}
/* Communications: a stable contact rail and conversation-first workspace. */
body.fh-workspace-v2 #commsPage.page-section.active { padding: 0 !important; height: max(600px,calc(100dvh - var(--ws-topbar) - 48px)) !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
body.fh-workspace-v2 #commsPage .communication-grid { display: grid !important; grid-template-columns: 280px minmax(0,1fr) 280px !important; height: 100% !important; min-height: 0 !important; gap: 16px !important; overflow: visible !important; }
body.fh-workspace-v2 #commsPage.comms-context-hidden-v144 .communication-grid { grid-template-columns: 280px minmax(0,1fr) !important; }
body.fh-workspace-v2 #commsPage .communication-panel { min-width: 0 !important; min-height: 0 !important; height: 100% !important; max-height: none !important; }
body.fh-workspace-v2 #commsPage [hidden] { display: none !important; }
body.fh-workspace-v2 #commsPage .comm-panel-head { padding: 16px !important; }
body.fh-workspace-v2 #commsPage .comm-panel-head :is(h1,h2) { font-size: 17px !important; }
body.fh-workspace-v2 #commsPage .comm-search-row { padding: 0 12px 12px !important; }
body.fh-workspace-v2 #commsPage .comm-search-shell input { font-size: 12px !important; }
body.fh-workspace-v2 #commsPage .comm-contact-list { padding: 0 10px 10px !important; gap: 6px !important; }
body.fh-workspace-v2 #commsPage .comm-contact { padding: 10px !important; gap: 8px 10px !important; min-height: 90px !important; grid-template-columns: 34px minmax(0,1fr) !important; }
body.fh-workspace-v2 #commsPage .comm-contact .comm-avatar { width: 34px !important; height: 34px !important; font-size: 11px !important; }
body.fh-workspace-v2 #commsPage .comm-contact-title { font-size: 13px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #commsPage :is(.comm-contact-meta,.comm-role-pill,.comm-contact-state) { font-size: 11px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #commsPage .comm-contacts-footer { flex: 0 0 42px !important; }
body.fh-workspace-v2 #commsPage .comm-contacts-footer button { font-size: 12px !important; min-height: 38px !important; }
body.fh-workspace-v2 #commsPage .comm-thread-panel { display: flex !important; flex-direction: column !important; }
body.fh-workspace-v2 #commsPage .comm-thread-head { flex: 0 0 auto !important; min-height: 76px !important; height: auto !important; max-height: none !important; padding: 14px 16px !important; gap: 12px !important; }
body.fh-workspace-v2 #commsPage .comm-thread-person h2 { font-size: 17px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #commsPage .comm-thread-person p { display: flex !important; font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #commsPage .comm-thread-actions button { font-size: 12px !important; min-height: 38px !important; padding-inline: 10px !important; }
body.fh-workspace-v2 #commsPage .comm-thread { flex: 1 1 auto !important; min-height: 150px !important; padding: 16px !important; gap: 12px !important; }
body.fh-workspace-v2 #commsPage .comm-bubble { padding: 10px 14px !important; max-width: min(560px,85%) !important; }
body.fh-workspace-v2 #commsPage .comm-bubble-body { font-size: 14px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #commsPage :is(.comm-bubble-head,.comm-day-divider,.comm-unread-divider) { font-size: 11px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #commsPage :is(.comm-empty,.comm-read-action) { font-size: 13px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #commsPage .comm-template-scope { margin: 0 16px !important; padding: 12px 0 8px !important; border-top: 1px solid var(--fh-line) !important; border-bottom: 0 !important; gap: 6px 10px !important; font-size: 11px !important; }
body.fh-workspace-v2 #commsPage #communicationTemplateCompany { flex: 1 1 180px !important; min-width: 0 !important; width: auto !important; max-width: 300px !important; min-height: 34px !important; height: 34px !important; padding: 5px 10px !important; font-size: 12px !important; }
body.fh-workspace-v2 #commsPage #communicationTemplateScopeStatus { flex: 1 1 180px !important; font-size: 11px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #commsPage .comm-compose { display: grid !important; grid-template-columns: minmax(0,1fr) !important; grid-template-rows: auto auto !important; min-height: 0 !important; height: auto !important; max-height: none !important; margin: 0 16px 12px !important; padding: 0 !important; border: 0 !important; gap: 8px !important; }
body.fh-workspace-v2 #commsPage .comm-compose-field { display: grid !important; grid-template-rows: 70px 36px !important; min-height: 0 !important; width: 100% !important; }
body.fh-workspace-v2 #commsPage .comm-compose-field textarea { min-height: 0 !important; height: 70px !important; font-size: 14px !important; line-height: 1.5 !important; padding: 10px 12px !important; }
body.fh-workspace-v2 #commsPage .comm-compose-tools { gap: 4px !important; padding: 0 6px 4px !important; }
body.fh-workspace-v2 #commsPage .comm-compose-tools button { width: 32px !important; height: 32px !important; min-width: 32px !important; }
body.fh-workspace-v2 #commsPage .comm-compose-actions { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; justify-content: flex-start !important; gap: 8px !important; min-width: 0 !important; }
body.fh-workspace-v2 #commsPage .comm-compose-actions > button { width: auto !important; min-width: 0 !important; min-height: 36px !important; height: auto !important; padding: 7px 12px !important; font-size: 12px !important; }
body.fh-workspace-v2 #commsPage .comm-template-manage-v144 { display: inline-flex; align-items: center; gap: 6px !important; }
body.fh-workspace-v2 #commsPage #communicationSendButton { padding-inline: 20px !important; }
body.fh-workspace-v2 #commsPage .comm-more-menu { top: 66px !important; width: min(260px,calc(100% - 32px)) !important; }
body.fh-workspace-v2 #commsPage .comm-template-menu { width: min(320px,100%) !important; max-height: 300px !important; overflow: auto !important; bottom: 44px !important; left: 0 !important; right: auto !important; }
body.fh-workspace-v2 #commsPage :is(.comm-more-menu,.comm-template-menu) button { min-height: 38px !important; padding: 8px 10px !important; font-size: 12px !important; white-space: normal !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #commsPage #communicationStatus { font-size: 12px !important; line-height: 1.5 !important; flex: 0 0 auto !important; }
body.fh-workspace-v2 #commsPage #communicationStatus:empty { display: none; }
body.fh-workspace-v2 #commsPage .comm-context-list { font-size: 13px !important; }
@media (max-width: 1350px) {
  body.fh-workspace-v2 #commsPage:not(.comms-context-hidden-v144) { height: auto !important; }
  body.fh-workspace-v2 #commsPage:not(.comms-context-hidden-v144) .communication-grid { grid-template-columns: 250px minmax(0,1fr) !important; height: auto !important; }
  body.fh-workspace-v2 #commsPage:not(.comms-context-hidden-v144) .comm-thread-panel { height: 680px !important; }
  body.fh-workspace-v2 #commsPage #communicationVehicleContextPanelV144 { grid-column: 1/-1; height: auto !important; }
}
@media (max-width: 1000px) {
  body.fh-workspace-v2 #commsPage.comms-context-hidden-v144 .communication-grid { grid-template-columns: 245px minmax(0,1fr) !important; }
  body.fh-workspace-v2 #commsPage .comm-thread-head { flex-wrap: wrap !important; }
}
@media (max-width: 700px) {
  body.fh-workspace-v2 #commsPage.page-section.active { height: auto !important; }
  body.fh-workspace-v2 #commsPage .communication-grid,
  body.fh-workspace-v2 #commsPage.comms-context-hidden-v144 .communication-grid,
  body.fh-workspace-v2 #commsPage:not(.comms-context-hidden-v144) .communication-grid { grid-template-columns: minmax(0,1fr) !important; height: auto !important; }
  body.fh-workspace-v2 #commsPage .communication-panel[aria-label="Communication contacts"] { height: 300px !important; }
  body.fh-workspace-v2 #commsPage .comm-thread-panel { height: max(660px,calc(100dvh - 100px)) !important; }
  body.fh-workspace-v2 #commsPage .comm-thread-head { display: grid !important; grid-template-columns: 44px minmax(0,1fr) !important; }
  body.fh-workspace-v2 #commsPage .comm-thread-person p { white-space: normal !important; }
  body.fh-workspace-v2 #commsPage .comm-thread-actions { grid-column: 1/-1; width: 100% !important; }
  body.fh-workspace-v2 #commsPage .comm-thread-actions button span { display: inline !important; }
  body.fh-workspace-v2 #commsPage .comm-template-scope { margin-inline: 12px !important; }
  body.fh-workspace-v2 #commsPage #communicationTemplateCompany { max-width: none !important; }
  body.fh-workspace-v2 #commsPage .comm-compose { position: relative !important; bottom: auto !important; width: auto !important; margin-inline: 12px !important; overflow: visible !important; box-shadow: none !important; background: transparent !important; }
  body.fh-workspace-v2 #commsPage .comm-compose-actions { overflow: visible !important; }
  body.fh-workspace-v2 #commsPage #communicationSendButton { width: auto !important; }
  body.fh-workspace-v2 #commsPage .comm-template-button { max-width: none !important; text-indent: 0 !important; }
  body.fh-workspace-v2 #commsPage .comm-template-button span { display: inline !important; }
}
body.fh-workspace-v2 #historyPage .history-sidebar { overflow-y: auto !important; }
body.fh-workspace-v2 #historyPage .history-actions-panel { flex: 0 0 auto !important; min-height: 0 !important; height: auto !important; overflow: visible !important; }
body.fh-workspace-v2 #historyPage .history-actions-panel .history-control-body { display: flex !important; flex-direction: column !important; gap: 12px !important; padding: 12px !important; }
body.fh-workspace-v2 #historyPage .history-actions-panel .history-controls-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; grid-template-rows: auto auto !important; height: auto !important; gap: 8px !important; }
body.fh-workspace-v2 #historyPage #loadHistoryBtn { grid-column: 1/-1 !important; width: 100% !important; }
body.fh-workspace-v2 #historyPage .history-status-bar { display: flex !important; flex-direction: column !important; height: auto !important; min-height: 0 !important; padding: 0 !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-control-copy > :is(h1,p) { display: none !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-control-form { margin-top: 0 !important; }
/* AI workbench: one page flow, with table overflow only where data requires it. */
body.fh-workspace-v2 #aiAnalysisPage.page-section.active { display: flex !important; flex-direction: column !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; gap: 16px !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-console-surface,.ai-upper-grid,.ai-lower-grid) { flex: 0 0 auto !important; min-width: 0 !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-control-strip { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 14px !important; padding: 16px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-control-copy { display: block !important; min-width: 0 !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-control-form { display: grid !important; grid-template-columns: minmax(160px,1fr) minmax(160px,1fr) auto !important; gap: 12px !important; align-items: end !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-field { min-width: 0 !important; grid-row: auto !important; grid-column: auto !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-field > span { font-size: 11px !important; color: var(--fh-secondary) !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-select-shell select { height: 40px !important; font-size: 13px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-run-button { grid-column: auto !important; grid-row: auto !important; width: auto !important; min-width: 0 !important; height: 40px !important; min-height: 40px !important; padding: 0 16px !important; font-size: 13px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-foundation-actions-v149 { display: flex !important; flex-wrap: wrap !important; grid-column: 1/-1 !important; grid-row: auto !important; gap: 6px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-foundation-actions-v149 button { min-height: 32px !important; height: auto !important; font-size: 11px !important; padding: 6px 10px !important; }
body.fh-workspace-v2 #aiAnalysisPage #aiStatus { grid-column: 1/-1 !important; grid-row: auto !important; margin: 0 !important; font-size: 12px !important; line-height: 1.5 !important; overflow-wrap: anywhere; }
body.fh-workspace-v2 #aiAnalysisPage .ai-control-statuses { grid-template-columns: repeat(3,minmax(0,1fr)) !important; padding-top: 12px !important; gap: 16px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-control-status { min-height: 0 !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-control-status small { font-size: 11px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-control-status b { font-size: 12px !important; line-height: 1.5 !important; white-space: normal !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-upper-grid { display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr) !important; gap: 16px !important; align-items: start !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-lower-grid { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 16px !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-section-head,.ai-map-toolbar) { height: auto !important; min-height: 0 !important; padding: 16px !important; gap: 12px !important; flex-wrap: wrap !important; align-items: center !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-section-head,.ai-map-toolbar) h2 { font-size: 16px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-section-head,.ai-map-toolbar) p { font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-section-head,.ai-map-toolbar) button { min-height: 32px !important; height: auto !important; font-size: 11px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-map-toggles { flex-wrap: wrap !important; gap: 10px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-map-toggles label { font-size: 11px !important; }
body.fh-workspace-v2 #aiAnalysisPage #aiMapPanel .ai-map-stage { flex: 0 0 auto !important; height: 340px !important; min-height: 340px !important; border-radius: 0 0 10px 10px; overflow: hidden !important; }
body.fh-workspace-v2 #aiAnalysisPage #aiMapPanel:is(:fullscreen,.ai-map-fullscreen) { height: 100dvh !important; max-height: none !important; display: flex !important; flex-direction: column !important; }
body.fh-workspace-v2 #aiAnalysisPage #aiMapPanel:is(:fullscreen,.ai-map-fullscreen) .ai-map-stage { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(#aiAnalysisResult,.ai-result-body,.ai-llm-body-v160,.ai-llm-summary-v160,.ai-llm-columns-v160 > section,.ai-llm-list-v160,#aiEventsTable,.ai-events-table-wrap,#aiRecommendationsPanel,.ai-recommendation-layout,.ai-recommendation-column,.ai-trend-column) { flex: 0 0 auto !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; overscroll-behavior: auto !important; scrollbar-gutter: auto !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(#aiAnalysisResult,.ai-llm-body-v160,#aiRecommendationsPanel) { padding: 0 16px 16px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-result-body { grid-template-rows: auto !important; gap: 14px !important; padding: 0 !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-score-zone { grid-template-columns: 110px minmax(0,1fr) !important; min-height: 0 !important; padding-bottom: 14px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-performance-grid { grid-template-columns: minmax(0,1fr) !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-performance-item { min-height: 44px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-performance-item :is(small,strong,em) { font-size: 11px !important; line-height: 1.4 !important; white-space: normal !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-score-card small,.ai-finding-card span,.ai-llm-policy-v160 small,.ai-llm-policy-v160 span,.ai-llm-summary-v160 small,.ai-llm-unknowns-v160 span) { font-size: 11px !important; line-height: 1.5 !important; white-space: normal !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-summary-card b,.ai-finding-card b,.ai-llm-summary-v160 strong,.ai-llm-item-v160 b,.ai-llm-action-v160 b,.ai-llm-loading-v160 b,.ai-llm-error-v160 b) { font-size: 13px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-summary-card p,.ai-llm-item-v160 p,.ai-llm-action-v160 p,.ai-llm-loading-v160 span,.ai-llm-error-v160 span) { font-size: 12px !important; line-height: 1.6 !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-finding-grid,.ai-llm-columns-v160) { gap: 12px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-finding-grid { grid-template-columns: minmax(0,1fr) !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-llm-item-v160,.ai-llm-action-v160,.ai-finding-card) { padding: 12px !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-llm-columns-v160,.ai-llm-unknowns-v160) h3 { font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-llm-evidence-v160 button { font-size: 11px !important; min-height: 30px !important; height: auto !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-events-table-wrap { padding: 0 16px 16px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-events-table-scroll { height: auto !important; max-height: 480px !important; overflow: auto !important; overscroll-behavior: auto !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-events-table { min-width: 640px !important; font-size: 12px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-events-table :is(th,td) { font-size: 12px !important; height: 40px !important; padding: 8px 10px !important; }
body.fh-workspace-v2 #aiAnalysisPage :is(.ai-events-footer,.ai-severity-tag) { font-size: 11px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-events-footer { flex-wrap: wrap !important; gap: 10px !important; padding-top: 12px !important; }
body.fh-workspace-v2 #aiAnalysisPage .ai-pagination button { min-width: 32px !important; height: 32px !important; font-size: 12px !important; }
body.fh-workspace-v2 #aiAnalysisPage .empty-state { font-size: 13px !important; line-height: 1.6 !important; min-height: 140px !important; padding: 24px !important; }
@media (max-width: 1100px) {
  body.fh-workspace-v2 #aiAnalysisPage .ai-upper-grid { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 600px) {
  body.fh-workspace-v2 #aiAnalysisPage .ai-control-form { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #aiAnalysisPage .ai-run-button { width: 100% !important; }
  body.fh-workspace-v2 #aiAnalysisPage :is(.ai-control-statuses,.ai-llm-columns-v160,.ai-recommendation-layout) { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #aiAnalysisPage .ai-score-zone { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #aiAnalysisPage .ai-llm-head-actions-v160 { flex-wrap: wrap !important; }
  body.fh-workspace-v2 #aiAnalysisPage #aiMapPanel .ai-map-stage { min-height: 280px !important; height: 280px !important; }
  body.fh-workspace-v2 #aiAnalysisPage #aiMapPanel:is(:fullscreen,.ai-map-fullscreen) .ai-map-stage { min-height: 0 !important; height: auto !important; }
}
/* Context stays visible; verbose source evidence is an accessible disclosure. */
body.fh-workspace-v2 #handlerPage .handler-scope-bar { gap: 10px !important; padding: 12px 16px !important; margin-bottom: 16px !important; }
body.fh-workspace-v2 #handlerPage .handler-page-title { display: none !important; }
body.fh-workspace-v2 #handlerPage .handler-controls { flex: 1 1 auto !important; width: 100% !important; }
body.fh-workspace-v2 #handlerPage .handler-search-shell { flex: 1 !important; }
body.fh-workspace-v2 #handlerScopeStatus { flex: 1 1 200px; }
body.fh-workspace-v2 .ws-source-details { flex: 0 1 auto; font-size: 12px; color: #adc0d5; }
body.fh-workspace-v2 .ws-source-details[open] { flex-basis: 100%; }
body.fh-workspace-v2 .ws-source-details summary { cursor: pointer; padding: 8px 0; }
body.fh-workspace-v2 .ws-source-details-body { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-top: 12px; border-top: 1px solid #283647; }
body.fh-workspace-v2 .ws-source-details-body [role=status] { flex: 1 1 300px; }
body.fh-workspace-v2 #handlerPage.page-section.active { height: auto !important; min-height: 0 !important; overflow: visible !important; flex: 0 0 auto !important; gap: 14px !important; }
body.fh-workspace-v2 #handlerPage .handler-page-head { display: block !important; margin: 0 !important; min-height: 0 !important; height: auto !important; }
body.fh-workspace-v2 #handlerPage .handler-controls { display: flex !important; gap: 10px !important; height: auto !important; max-height: none !important; }
body.fh-workspace-v2 #handlerPage .handler-scope-bar { margin: 0 !important; padding: 10px 14px !important; }
body.fh-workspace-v2 #handlerPage .handler-scope-bar > label { font-size: 12px; }
body.fh-workspace-v2 #handlerPage .decision-layout { display: grid !important; grid-template-rows: auto auto !important; height: auto !important; min-height: 0 !important; flex: 0 0 auto !important; gap: 16px !important; }
body.fh-workspace-v2 #handlerPage .decision-metrics { grid-template-columns: repeat(4,minmax(0,1fr)) !important; gap: 12px !important; margin: 0 !important; }
body.fh-workspace-v2 #handlerPage .handler-metric-card { grid-template-columns: 28px minmax(0,1fr) !important; min-height: 88px !important; height: auto !important; padding: 12px !important; gap: 10px !important; }
body.fh-workspace-v2 #handlerPage .handler-metric-icon { width: 28px !important; height: 28px !important; }
body.fh-workspace-v2 #handlerPage .handler-metric-icon .fh-icon { width: 16px !important; height: 16px !important; }
body.fh-workspace-v2 #handlerPage .handler-metric-card .metric-value { font-size: 25px !important; line-height: 1.2 !important; margin: 3px 0 !important; }
body.fh-workspace-v2 #handlerPage .handler-metric-note { display: block !important; height: auto !important; overflow: visible !important; -webkit-line-clamp: unset !important; font-size: 11px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #handlerPage .decision-workspace { grid-template-columns: minmax(260px,.85fr) minmax(0,1.8fr) !important; gap: 16px !important; height: auto !important; min-height: 0 !important; overflow: visible !important; align-items: start !important; }
body.fh-workspace-v2 #handlerPage .decision-workspace > .panel { height: auto !important; min-height: 0 !important; max-height: none !important; margin: 0 !important; overflow: visible !important; }
body.fh-workspace-v2 #handlerPage .decision-workspace > .panel > .panel-header { flex: 0 0 auto !important; height: auto !important; }
body.fh-workspace-v2 #handlerPage .decision-workspace > .panel > .panel-body { flex: 0 0 auto !important; min-height: 0 !important; height: auto !important; max-height: none !important; overflow: visible !important; padding: 0 16px 16px !important; }
body.fh-workspace-v2 #handlerPage .panel-title { font-size: 16px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #handlerPage .panel-subtitle { font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #handlerPage .handler-recommendation-list { max-height: 580px !important; overflow-y: auto !important; padding: 2px; gap: 8px !important; }
body.fh-workspace-v2 #handlerPage .handler-recommendation { padding: 12px !important; border-radius: 8px !important; }
body.fh-workspace-v2 #handlerPage .handler-recommendation.is-dismissible { padding-right: 42px !important; }
body.fh-workspace-v2 #handlerPage .handler-rec-title { font-size: 13px !important; line-height: 1.5 !important; font-weight: 650 !important; }
body.fh-workspace-v2 #handlerPage .handler-rec-meta { font-size: 11px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #handlerPage .handler-rec-top { flex-wrap: wrap !important; gap: 8px !important; }
body.fh-workspace-v2 #handlerPage .handler-rec-heading { flex: 1 1 180px !important; }
body.fh-workspace-v2 #handlerPage .handler-detail-grid { gap: 18px !important; }
body.fh-workspace-v2 #handlerPage .handler-detail-title { font-size: 20px !important; line-height: 1.4 !important; font-weight: 650 !important; }
body.fh-workspace-v2 #handlerPage .handler-detail-top { padding-bottom: 16px; border-bottom: 1px solid var(--fh-line); }
body.fh-workspace-v2 #handlerPage .handler-section { gap: 10px !important; }
body.fh-workspace-v2 #handlerPage .handler-section h3 { font-size: 12px !important; line-height: 1.5 !important; color: var(--fh-secondary) !important; }
body.fh-workspace-v2 #handlerPage .handler-fact { font-size: 13px !important; line-height: 1.65 !important; overflow-wrap: anywhere; color: #c2cfdf !important; }
body.fh-workspace-v2 #handlerPage .handler-fact-list { gap: 9px !important; }
body.fh-workspace-v2 #handlerPage .handler-detail-split { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px !important; }
body.fh-workspace-v2 #handlerPage .handler-detail-split > .handler-section { padding: 14px !important; }
body.fh-workspace-v2 #handlerPage .handler-action-options { gap: 8px !important; }
body.fh-workspace-v2 #handlerPage .handler-action-option { padding: 12px !important; min-height: 58px !important; border-radius: 7px !important; gap: 10px !important; }
body.fh-workspace-v2 #handlerPage .handler-action-title { font-size: 13px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #handlerPage .handler-action-note { font-size: 12px !important; line-height: 1.5 !important; margin-top: 3px; }
body.fh-workspace-v2 #handlerPage .handler-dispatch { font-size: 13px !important; line-height: 1.6 !important; }
body.fh-workspace-v2 #handlerPage .handler-dispatch .status-line { font-size: 12px !important; line-height: 1.6 !important; }
body.fh-workspace-v2 #handlerPage .ws-handler-log { grid-column: 1 / -1; }
body.fh-workspace-v2 #handlerPage .ws-handler-log > .panel-body { display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 12px; align-items: start; }
body.fh-workspace-v2 #handlerPage .handler-action-log { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px !important; }
body.fh-workspace-v2 #handlerPage :is(.handler-current-card,.handler-log-item,.handler-log-message,.handler-current-card .handler-dispatch) { min-height: 0 !important; margin: 0 !important; }
body.fh-workspace-v2 #handlerPage .handler-log-item .status-line { font-size: 12px !important; line-height: 1.6 !important; }
body.fh-workspace-v2 #handlerPage .handler-console-footer { position: static !important; height: auto !important; min-height: 0 !important; padding: 14px 0 !important; margin: 0 !important; flex-wrap: wrap !important; gap: 12px !important; border-top: 1px solid var(--fh-line); }
body.fh-workspace-v2 #handlerPage :is(.handler-footer-left,.handler-footer-right) { flex-wrap: wrap; gap: 10px !important; }
body.fh-workspace-v2 #handlerPage .handler-more-menu { z-index: 100; max-width: min(300px,calc(100vw - 60px)); width: 260px; }
body.fh-workspace-v2 #handlerPage [hidden] { display: none !important; }
@media (max-width: 1100px) {
  body.fh-workspace-v2 #handlerPage .decision-workspace { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #handlerPage .handler-recommendation-list { max-height: 350px !important; }
  body.fh-workspace-v2 #handlerPage .ws-handler-log > .panel-body { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 680px) {
  body.fh-workspace-v2 #handlerPage .decision-metrics { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.fh-workspace-v2 #handlerPage .handler-metric-card { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #handlerPage .handler-controls { flex-wrap: wrap !important; }
  body.fh-workspace-v2 #handlerPage .handler-search-shell { flex-basis: 100% !important; }
  body.fh-workspace-v2 #handlerPage .handler-filter-shell { margin-left: 0 !important; }
  body.fh-workspace-v2 #handlerPage .handler-scope-bar > select { flex: 1 1 180px !important; max-width: 100% !important; }
  body.fh-workspace-v2 #handlerPage :is(.handler-detail-split,.handler-action-log) { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #handlerPage .handler-detail-top { flex-wrap: wrap !important; }
  body.fh-workspace-v2 #handlerPage .handler-detail-title { font-size: 18px !important; }
}
/* Reports: one reading/scrolling flow, from scope and settings to full-width results. */
body.fh-workspace-v2 #reportsPage.page-section.active { height: auto !important; min-height: 100% !important; overflow: visible !important; }
body.fh-workspace-v2 #reportsPage .reports-console-layout { display: flex !important; flex-direction: column !important; height: auto !important; flex: 0 0 auto !important; gap: 16px !important; }
body.fh-workspace-v2 #reportsPage .reports-console-sidebar { display: grid !important; grid-template-columns: minmax(250px,.8fr) minmax(0,1.6fr) !important; grid-template-rows: auto !important; gap: 16px !important; align-items: start !important; }
body.fh-workspace-v2 #reportsPage .reports-panel { padding: 18px !important; }
body.fh-workspace-v2 #reportsPage .reports-select-actions { margin-top: 0 !important; }
body.fh-workspace-v2 #reportsPage .reports-device-list { max-height: 216px !important; gap: 2px !important; margin-top: 10px !important; }
body.fh-workspace-v2 #reportsPage .reports-device-row { min-height: 32px !important; padding: 4px 6px !important; border-radius: 5px; }
body.fh-workspace-v2 #reportsPage .reports-device-row:hover { background: #193044; }
body.fh-workspace-v2 #reportsPage .reports-options-scroll { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px 16px !important; margin-top: 0 !important; padding-right: 0 !important; overflow: visible !important; }
body.fh-workspace-v2 #reportsPage .reports-field { grid-template-columns: minmax(0,1fr) !important; gap: 6px !important; font-size: 12px !important; font-weight: 500 !important; align-content: start !important; }
body.fh-workspace-v2 #reportsPage .reports-field :is(select,input) { min-height: 38px !important; font-size: 13px !important; color-scheme: dark; }
body.fh-workspace-v2 #reportsPage .reports-field:has(#workHourStart:disabled),
body.fh-workspace-v2 #reportsPage .reports-field:has(.work-day:disabled) { display: none !important; }
body.fh-workspace-v2 #reportsPage .reports-weekdays { gap: 8px !important; }
body.fh-workspace-v2 #reportsPage .reports-weekdays label { min-height: 28px !important; font-size: 12px !important; }
body.fh-workspace-v2 #reportsPage .ws-report-options { grid-column: 1/-1; padding-top: 10px; border-top: 1px solid #283647; }
body.fh-workspace-v2 #reportsPage .ws-report-options summary { cursor: pointer; color: #b8cadd; font-size: 12px; padding: 4px 0; }
body.fh-workspace-v2 #reportsPage .reports-switch-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; margin-top: 12px; }
body.fh-workspace-v2 #reportsPage .reports-switch-row { min-height: 32px; font-size: 12px; line-height: 1.4; }
body.fh-workspace-v2 #reportsPage .reports-switch-row:has(input:focus-visible) { outline: 2px solid #6edff7; outline-offset: 3px; border-radius: 4px; }
body.fh-workspace-v2 #reportsPage .reports-workspace { display: flex !important; flex-direction: column !important; min-width: 0 !important; min-height: 0 !important; height: auto !important; overflow: visible !important; }
body.fh-workspace-v2 #reportsPage .reports-workspace-head { flex: 0 0 auto !important; flex-wrap: wrap; gap: 14px; padding: 18px !important; }
body.fh-workspace-v2 #reportsPage .reports-workspace-head > div:first-child { flex: 1 1 220px; }
body.fh-workspace-v2 #reportsPage .reports-workspace-head p { font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #reportsPage .reports-workspace-actions { flex-wrap: wrap; gap: 8px !important; }
body.fh-workspace-v2 #reportsPage :is(.reports-select-actions,.reports-workspace-actions,.reports-preview-head,.reports-rail-panel) button { min-height: 36px !important; font-size: 12px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #reportsPage .reports-tabs { flex: 0 0 auto !important; height: auto !important; min-height: 0 !important; max-height: none !important; display: flex !important; flex-wrap: wrap !important; align-items: stretch !important; overflow: visible !important; padding: 8px 12px !important; gap: 4px !important; border-block: 1px solid #283647; }
body.fh-workspace-v2 #reportsPage .reports-tabs button { flex: 0 0 auto !important; min-height: 38px !important; height: auto !important; padding: 10px !important; font-size: 12px !important; line-height: 1.4 !important; white-space: normal !important; border-radius: 5px !important; }
body.fh-workspace-v2 #reportsPage .reports-table-note { flex: 0 0 auto !important; min-height: 0 !important; padding: 10px 16px !important; font-size: 12px !important; }
body.fh-workspace-v2 #reportsPage .reports-workspace-body { flex: 0 0 auto !important; min-height: 0 !important; display: grid !important; grid-template-columns: minmax(0,1fr) !important; grid-template-rows: auto auto !important; gap: 16px !important; padding: 16px !important; overflow: visible !important; }
body.fh-workspace-v2 #reportsPage .reports-preview { min-height: 260px !important; }
body.fh-workspace-v2 #reportsPage .reports-preview-head { flex-basis: auto !important; flex-wrap: wrap; }
body.fh-workspace-v2 #reportsPage .reports-table-stage { max-height: 65vh; min-height: 140px; }
body.fh-workspace-v2 #reportsPage .reports-data-table :is(th,td) { font-size: 12px !important; padding: 11px 12px !important; }
body.fh-workspace-v2 #reportsPage .reports-workspace-rail { display: grid !important; grid-template-columns: 1fr 1fr !important; grid-template-rows: auto !important; gap: 16px !important; }
body.fh-workspace-v2 #reportsPage .reports-summary-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
body.fh-workspace-v2 #reportsPage .reports-summary-row :is(b,span) { font-size: 12px !important; overflow-wrap: anywhere; }
body.fh-workspace-v2 #reportsPage .reports-recent-item :is(b,span) { font-size: 12px !important; }
body.fh-workspace-v2 #reportsPage [hidden] { display: none !important; }
body.fh-workspace-v2 #reportsPage .reports-workspace-foot { flex: 0 0 auto !important; }
body.fh-workspace-v2 #reportsPage :is(#reportFuelThresholdField,#reportSnapshotAtField,#reportSpeedThresholdField,#reportSnapshotAgeField):has(input:disabled) { display: none !important; }
body.fh-workspace-v2 #reportsPage .reports-panel-heading { padding: 4px 0 14px !important; }
body.fh-workspace-v2 #reportsPage :is(.reports-field label,.reports-panel-heading p,.reports-preview-head p,.reports-summary-list,.reports-device-row) { font-size: 12px !important; line-height: 1.5 !important; }
/* Let dense records scroll instead of squeezing independent column controls. */
body.fh-workspace-v2 #vehiclesPage .vehicles-table-wrap { overflow: auto !important; min-width: 0 !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-table { width: 100% !important; min-width: 1460px !important; table-layout: auto !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-table :is(th,td) { width: auto !important; min-width: 100px !important; padding: 14px 12px !important; font-size: 12px !important; overflow: visible !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-table td:first-child { min-width: 140px !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-workspace { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 16px !important; height: auto !important; overflow: visible !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-filter-panel { flex: 0 0 auto !important; display: grid !important; grid-template-columns: minmax(200px,1.2fr) repeat(4,minmax(150px,1fr)) !important; grid-auto-rows: auto !important; height: auto !important; max-height: none !important; gap: 16px !important; padding: 16px !important; overflow: visible !important; align-items: start !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-filter-panel :is(.vehicles-filter-section,.vehicles-saved-views) { border: 0 !important; padding: 0 !important; margin: 0 !important; min-width: 0 !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-filter-chips { display: flex !important; flex-wrap: wrap !important; gap: 6px !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-filter-chips button { width: auto !important; min-width: 0 !important; padding: 6px 8px !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-filter-heading { margin-bottom: 8px !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-filter-panel label { margin-bottom: 8px !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-saved-views { grid-column: 1/-1; }
body.fh-workspace-v2 #vehiclesPage .vehicles-saved-views h3 { margin: 0 0 8px !important; }
body.fh-workspace-v2 #vehiclesSavedViewsList { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; gap: 6px !important; overflow: visible !important; margin: 0 !important; height: auto !important; }
body.fh-workspace-v2 #vehiclesSavedViewsList button { width: auto !important; min-width: 110px; padding: 6px 10px !important; gap: 12px !important; background: #142333 !important; border-radius: 5px !important; }
body.fh-workspace-v2 #vehiclesSavedViewsList button.active { background: #123d50 !important; color: #6edff7 !important; }
body.fh-workspace-v2 #vehiclesPage #vehiclesRegistryView { overflow: auto !important; }
body.fh-workspace-v2 #vehiclesPage .vehicles-board-panel { flex: 1 0 350px !important; height: auto !important; max-height: none !important; min-height: 350px !important; overflow: hidden !important; }
body.fh-workspace-v2 #driversPage.page-section.active { display: flex !important; flex-direction: column !important; gap: 16px !important; overflow-y: auto !important; }
body.fh-workspace-v2 #driversPage > :not(.drivers-ops-grid) { flex: 0 0 auto !important; height: auto !important; max-height: none !important; overflow: visible !important; }
body.fh-workspace-v2 #driverRegistryEntry { padding: 16px 18px !important; border: 1px solid #283647; border-radius: 10px; }
body.fh-workspace-v2 #driverRegistryEntry h2 { margin: 0 0 6px; font-size: 16px; }
body.fh-workspace-v2 #driverRegistryEntry p { margin: 0 0 12px; color: #a3b3c6; font-size: 13px; }
body.fh-workspace-v2 #driverActiveRoutePanel { padding: 16px 18px !important; }
body.fh-workspace-v2 #driversPage .drivers-ops-grid { flex: 1 0 460px !important; min-height: 460px !important; grid-template-columns: minmax(220px,.9fr) minmax(280px,1.2fr) minmax(230px,1fr) !important; gap: 16px !important; }
@media (max-width: 1250px) and (min-width: 901px) {
  body.fh-workspace-v2 { --ws-sidebar: 190px; }
  body.fh-workspace-v2 .ws-page-description { display: none; }
  body.fh-workspace-v2 #vehiclesPage .vehicles-filter-panel { grid-template-columns: repeat(3,minmax(150px,1fr)) !important; }
}
@media (max-width: 900px) {
  body.fh-workspace-v2 { --ws-sidebar: 0px; --ws-topbar: 72px; }
  body.fh-workspace-v2.fh-authenticated .header { width: 240px !important; visibility: hidden; transform: translateX(-100%) !important; }
  body.fh-workspace-v2.fh-authenticated.ws-nav-open .header { visibility: visible; transform: none !important; }
  body.fh-workspace-v2.fh-authenticated .ws-topbar { padding: 10px 16px; gap: 12px; }
  body.fh-workspace-v2 .ws-menu-toggle { display: block; border: 1px solid #304158; background: #142131; color: #d5e4f5; border-radius: 7px; min-height: 40px; padding: 0 12px; }
  body.fh-workspace-v2 .ws-heading { flex: 1; }
  body.fh-workspace-v2 .ws-page-title { font-size: 20px; line-height: 26px; }
  body.fh-workspace-v2 .ws-page-description { display: none; }
  body.fh-workspace-v2 .ws-topbar .handler-header-actions > :not(#handlerHeaderAvatar):not(#handlerHeaderMenu) { display: none !important; }
  body.fh-workspace-v2.fh-authenticated.ws-nav-open .ws-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 2050; border: 0; background: #0009; }
  body.fh-workspace-v2.fh-authenticated .page { padding: 16px !important; padding-bottom: 24px !important; }
  body.fh-workspace-v2 .ws-skip { left: 16px; }
  body.fh-workspace-v2 #reportsPage .reports-console-layout { grid-template-columns: 1fr !important; }
  body.fh-workspace-v2 #reportsPage .reports-workspace-rail { grid-template-columns: 1fr !important; }
  body.fh-workspace-v2 #driversPage .drivers-ops-grid { grid-template-columns: 1fr !important; min-height: 0 !important; }
  body.fh-workspace-v2 #driversPage .drivers-ops-panel { min-height: 350px !important; }
  body.fh-workspace-v2 #vehiclesPage .vehicles-filter-panel { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table { min-width: 0 !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table :is(th,td) { min-width: 0 !important; }
  body.fh-workspace-v2 #vehiclesPage .vehicles-workspace { display: flex !important; flex-direction: column !important; align-items: stretch !important; height: auto !important; }
  body.fh-workspace-v2 #vehiclesPage .vehicles-filter-panel { height: auto !important; max-height: none !important; flex: 0 0 auto !important; }
  body.fh-workspace-v2 #vehiclesPage .vehicles-board-panel { flex: 0 0 auto !important; max-height: none !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage #vehiclesRegistryView { display: flex !important; flex-direction: column !important; gap: 16px !important; height: auto !important; overflow: visible !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-metric-strip { flex: 0 0 auto !important; max-height: none !important; min-height: 0 !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-filter-panel { display: flex !important; flex-direction: column !important; height: auto !important; min-height: 0 !important; flex: 0 0 auto !important; align-items: stretch !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-filter-panel > section { height: auto !important; min-height: 0 !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-filter-panel > .vehicles-filter-section { display: none !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-metric-strip { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; height: auto !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-metric-card { height: auto !important; min-height: 88px !important; max-height: none !important; padding: 12px !important; grid-template-columns: 24px minmax(0,1fr) !important; grid-template-rows: auto !important; gap: 8px !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-metric-card small { font-size: 11px !important; white-space: normal !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-metric-card b { font-size: 18px !important; line-height: 1.3 !important; white-space: normal !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-metric-card > div { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; overflow-wrap: anywhere; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-metric-icon { width: 24px !important; height: 24px !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-metric-icon .fh-icon { width: 14px !important; height: 14px !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-board-panel > header { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 10px !important; padding: 12px !important; height: auto !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-board-panel { display: flex !important; flex-direction: column !important; height: auto !important; min-height: 0 !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-board-panel > header { flex: 0 0 auto !important; min-height: 0 !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table-wrap { height: auto !important; max-height: none !important; overflow: visible !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td { display: flex !important; flex-direction: column !important; align-items: flex-start !important; justify-content: flex-start !important; gap: 5px !important; padding: 8px 4px !important; height: auto !important; white-space: normal !important; overflow-wrap: anywhere; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td:first-child { display: block !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td:nth-child(2) { display: none !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td:nth-child(8) { grid-column: 1 / -1 !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td :is(button,div,span) { max-width: 100% !important; min-width: 0 !important; white-space: normal !important; overflow-wrap: anywhere; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td button { height: auto !important; font-size: 11px !important; line-height: 1.4 !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-board-actions { flex-wrap: wrap !important; gap: 6px !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td:first-child { min-width: 0 !important; }
}
@media (max-width: 1100px) {
  body.fh-workspace-v2 #reportsPage .reports-field:has(#workHourStart),
  body.fh-workspace-v2 #reportsPage .reports-field:has(.work-day) { grid-column: 1/-1; }
  body.fh-workspace-v2 #reportsPage .reports-time-range { max-width: 420px; }
}
@media (max-width: 680px) {
  body.fh-workspace-v2 #reportsPage .reports-console-sidebar { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #reportsPage .reports-panel { padding: 14px !important; }
  body.fh-workspace-v2 #reportsPage .reports-options-scroll { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #reportsPage .reports-device-list { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 180px !important; }
  body.fh-workspace-v2 #reportsPage .reports-switch-list { grid-template-columns: minmax(0,1fr); }
  body.fh-workspace-v2 #reportsPage .reports-workspace-head { padding: 14px !important; }
  body.fh-workspace-v2 #reportsPage .reports-workspace-head > div:first-child { flex: 0 0 auto; }
  body.fh-workspace-v2 #reportsPage .reports-workspace-body { padding: 10px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.fh-workspace-v2 *, body.fh-workspace-v2 *::before, body.fh-workspace-v2 *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}

/* The legacy phone class can persist after resizing; layout follows width. */
@media (min-width: 681px) and (max-width: 900px) {
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table-wrap { overflow: auto !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table { display: table !important; min-width: 1460px !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table tbody { display: table-row-group !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table tbody tr { display: table-row !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table :is(th,td),
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td:first-child,
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td:nth-child(2) { display: table-cell !important; min-width: 100px !important; padding: 12px !important; }
  body.fh-workspace-v2.fh-phone #vehiclesPage .vehicles-table td::before { display: none !important; }
}

/* Trips: keep vehicle, selected trip and its evidence in one readable workspace. */
body.fh-workspace-v2 #summariesPage.page-section.active { height: auto !important; min-height: 0 !important; overflow: visible !important; flex: 0 0 auto !important; }
body.fh-workspace-v2 #summariesPage > .panel { display: grid; grid-template-columns: minmax(200px,.8fr) minmax(320px,1.2fr); align-items: center; margin-bottom: 16px; }
body.fh-workspace-v2 #summariesPage .panel-header { display: block !important; padding: 16px !important; }
body.fh-workspace-v2 #summariesPage .panel-title { margin: 0; font-size: 16px !important; line-height: 1.4; }
body.fh-workspace-v2 #summariesPage .panel-subtitle { margin: 5px 0 0; color: var(--fh-secondary); font-size: 12px; line-height: 1.5; }
body.fh-workspace-v2 #summariesPage .panel-body { padding: 16px !important; min-width: 0; }
body.fh-workspace-v2 #summariesPage > .panel > .panel-header { border: 0; }
body.fh-workspace-v2 #summariesPage .toolbar { display: flex !important; align-items: flex-end !important; gap: 10px; margin: 0; }
body.fh-workspace-v2 #summariesPage .toolbar .field { flex: 1; min-width: 0; }
body.fh-workspace-v2 #summariesPage #summaryVehicleSelect { width: 100%; min-width: 0; }
body.fh-workspace-v2 #summariesPage .toolbar button { flex: 0 0 auto; }
body.fh-workspace-v2 #summariesPage .status-bar { padding: 0; margin: 8px 0 0; border: 0; background: none; }
body.fh-workspace-v2 #summariesPage .status-line { font-size: 12px; color: var(--fh-secondary); }
body.fh-workspace-v2 #summariesPage .live-layout { display: grid !important; grid-template-columns: minmax(270px,340px) minmax(0,1fr) !important; gap: 16px !important; align-items: start; height: auto !important; overflow: visible !important; }
body.fh-workspace-v2 #summariesPage .sidebar-stack { display: grid; gap: 16px !important; min-width: 0; }
body.fh-workspace-v2 #summaryTripsList { display: grid; gap: 8px; max-height: 440px; overflow-y: auto; padding: 2px; color: var(--fh-secondary); font-size: 13px; }
body.fh-workspace-v2 #summariesPage .ws-trip-card { display: block; width: 100%; text-align: left; padding: 12px !important; border: 1px solid var(--fh-line) !important; border-radius: 8px !important; background: var(--fh-surface-inset) !important; color: var(--fh-copy); white-space: normal; cursor: pointer; }
body.fh-workspace-v2 #summariesPage .ws-trip-card:hover { border-color: #497086 !important; }
body.fh-workspace-v2 #summariesPage .ws-trip-card[aria-pressed=true] { background: #142d3a !important; border-color: #34c7ed !important; }
body.fh-workspace-v2 #summariesPage .ws-trip-card:focus-visible { outline: 2px solid #34c7ed; outline-offset: 2px; }
body.fh-workspace-v2 #summariesPage .admin-item-title { font-size: 13px; line-height: 1.6; font-weight: 600; margin-bottom: 8px; overflow-wrap: anywhere; }
body.fh-workspace-v2 #summariesPage .admin-item-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; font-size: 11px; line-height: 1.5; color: var(--fh-secondary); }
body.fh-workspace-v2 #summariesPage .admin-item-meta b { display: block; font-weight: 500; font-size: 12px; color: var(--fh-copy); overflow-wrap: anywhere; }
body.fh-workspace-v2 #summaryDetails { color: var(--fh-secondary); font-size: 13px; line-height: 1.6; }
body.fh-workspace-v2 #summaryDetails .metrics-grid { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; }
body.fh-workspace-v2 #summaryDetails .metric-card { padding: 10px !important; min-width: 0; border-radius: 6px !important; }
body.fh-workspace-v2 #summaryDetails .metric-label { font-size: 11px; }
body.fh-workspace-v2 #summaryDetails .metric-value { margin-top: 4px; font-size: 13px !important; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
body.fh-workspace-v2 #summariesPage .panel-header:has(#summaryFitRoute) { display: grid !important; grid-template-columns: minmax(0,1fr) auto; column-gap: 12px; }
body.fh-workspace-v2 #summaryFitRoute { grid-column: 2; grid-row: 1 / 3; align-self: center; }
body.fh-workspace-v2 #summaryFitRoute:disabled { opacity: .45; cursor: not-allowed; }
body.fh-workspace-v2 #summariesPage .map-frame { position: relative; border-radius: 8px; overflow: hidden; }
body.fh-workspace-v2 #summaryMap { height: 360px !important; border-radius: 8px !important; }
body.fh-workspace-v2 #summariesPage .ws-trip-map-empty { position: absolute; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 32px; text-align: center; color: var(--fh-secondary); background: #0e1722; font-size: 13px; line-height: 1.7; }
body.fh-workspace-v2 #summariesPage .ws-trip-empty { margin: 0; color: var(--fh-secondary); font-size: 13px; line-height: 1.7; }
body.fh-workspace-v2 #summariesPage [hidden] { display: none !important; }
@media (max-width: 1100px) {
  body.fh-workspace-v2 #summariesPage > .panel { grid-template-columns: minmax(0,1fr); }
  body.fh-workspace-v2 #summariesPage > .panel > .panel-header { padding-bottom: 0 !important; }
  body.fh-workspace-v2 #summariesPage .live-layout { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 680px) {
  body.fh-workspace-v2 #summariesPage .toolbar { flex-wrap: wrap; }
  body.fh-workspace-v2 #summariesPage .toolbar .field { flex-basis: 100%; }
  body.fh-workspace-v2 #summariesPage .toolbar button { width: 100%; }
  body.fh-workspace-v2 #summaryTripsList { max-height: 300px; }
  body.fh-workspace-v2 #summaryMap { height: 300px !important; }
}

/* Administration and preferences: management first, creation by explicit disclosure. */
body.fh-workspace-v2 :is(#adminPage,#preferencesPage).page-section.active { height: auto !important; min-height: 0 !important; max-height: none !important; padding: 0 !important; overflow: visible !important; }
body.fh-workspace-v2 #adminPage > .admin-console-head,
body.fh-workspace-v2 #preferencesPage > .preferences-console-head { display: none !important; }
body.fh-workspace-v2 #adminPage .admin-console-layout { display: flex !important; flex-direction: column !important; gap: 16px !important; height: auto !important; min-height: 0 !important; overflow: visible !important; }
body.fh-workspace-v2 #adminPage [hidden] { display: none !important; }
body.fh-workspace-v2 #adminPage .admin-management-console { width: 100% !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
body.fh-workspace-v2 #adminPage .admin-management-head { padding: 18px !important; gap: 16px !important; flex-wrap: wrap !important; }
body.fh-workspace-v2 #adminPage :is(.admin-management-head,.admin-card-head) h2 { font-size: 17px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #adminPage :is(.admin-management-head,.admin-card-head) p { font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #adminPage .admin-search-shell { flex: 0 1 340px !important; width: 340px !important; min-width: 180px !important; height: 38px !important; }
body.fh-workspace-v2 #adminPage .admin-management-grid { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 8px !important; padding: 0 18px 18px !important; height: auto !important; max-height: none !important; overflow: visible !important; }
body.fh-workspace-v2 #adminPage .admin-collapsible { height: auto !important; min-height: 0 !important; max-height: none !important; }
body.fh-workspace-v2 #adminPage .admin-collapsible > summary { min-height: 78px !important; padding: 12px !important; gap: 12px !important; }
body.fh-workspace-v2 #adminPage .admin-summary-title { font-size: 14px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #adminPage .admin-summary-subtitle { font-size: 12px !important; line-height: 1.5 !important; white-space: normal !important; }
body.fh-workspace-v2 #adminPage .admin-section-count { font-size: 11px !important; padding: 5px 9px !important; }
body.fh-workspace-v2 #adminPage .admin-collapsible[open] > .panel-body { height: auto !important; min-height: 0 !important; max-height: none !important; padding: 14px !important; }
body.fh-workspace-v2 #adminPage .admin-list.admin-list-scroll { display: grid !important; grid-template-columns: repeat(auto-fit,minmax(min(100%,360px),1fr)) !important; align-items: start; gap: 12px !important; height: auto !important; min-height: 0 !important; max-height: 480px !important; overflow: auto !important; padding-right: 6px !important; }
body.fh-workspace-v2 #adminPage .admin-item { padding: 14px !important; min-width: 0 !important; overflow-wrap: anywhere; }
body.fh-workspace-v2 #adminPage .admin-item-title { font-size: 15px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #adminPage :is(.admin-item-meta,.status-line,.admin-form-field > span,.manager-permission-toolbar,.manager-permission-grid,.admin-create-status) { font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 #adminPage :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { min-width: 0 !important; min-height: 38px !important; font-size: 13px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #adminPage button { min-height: 36px !important; font-size: 12px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #adminPage .admin-actions { flex-wrap: wrap !important; gap: 8px !important; }
body.fh-workspace-v2 #adminPage .admin-create-disclosure { border: 1px solid var(--fh-line); border-radius: var(--fh-radius); background: var(--fh-surface); min-width: 0; }
body.fh-workspace-v2 #adminPage .admin-create-disclosure > summary { padding: 18px; font-size: 15px; font-weight: 600; cursor: pointer; }
body.fh-workspace-v2 #adminPage .admin-create-disclosure > summary span { margin-left: 12px; font-size: 12px; font-weight: 400; color: var(--fh-secondary); }
body.fh-workspace-v2 #adminPage .admin-create-grid { display: grid !important; grid-template-columns: minmax(240px,.7fr) minmax(0,1.3fr) !important; gap: 16px !important; padding: 0 16px 16px !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
body.fh-workspace-v2 #adminPage .admin-create-grid:has(#createOrgPanel[hidden]) { grid-template-columns: minmax(0,1fr) !important; }
body.fh-workspace-v2 #adminPage .admin-console-card { height: auto !important; min-height: 0 !important; overflow: visible !important; }
body.fh-workspace-v2 #adminPage .admin-card-head { padding: 16px !important; }
body.fh-workspace-v2 #adminPage .admin-create-body { padding: 0 16px 16px !important; }
body.fh-workspace-v2 #adminPage .admin-create-form { gap: 12px !important; }
body.fh-workspace-v2 #adminPage .admin-create-user-form { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
body.fh-workspace-v2 #adminPage .admin-form-field { gap: 6px !important; min-width: 0 !important; }
body.fh-workspace-v2 #adminPage .manager-permission-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
body.fh-workspace-v2 #adminPage .admin-create-status:empty { display: none; }
body.fh-workspace-v2 #preferencesPage .preference-grid { gap: 16px !important; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) !important; align-items: start; height: auto !important; overflow: visible !important; }
body.fh-workspace-v2 #preferencesPage :is(.preferences-console-card,.preferences-profile-body,.preferences-status-body) { height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
body.fh-workspace-v2 #preferencesPage .preferences-card-head { padding: 18px 18px 12px !important; }
body.fh-workspace-v2 #preferencesPage :is(.preferences-profile-body,.preferences-status-body) { padding: 0 18px 18px !important; }
body.fh-workspace-v2 #preferencesPage .preferences-field-grid { gap: 12px !important; }
body.fh-workspace-v2 #preferencesPage .preferences-status-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
body.fh-workspace-v2 :is(#adminPage,#preferencesPage) .console-page-footer { margin-top: 20px !important; padding: 14px 0 !important; font-size: 11px !important; flex-wrap: wrap !important; gap: 12px !important; }
@media (max-width: 1000px) {
  body.fh-workspace-v2 #preferencesPage .preference-grid { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 700px) {
  body.fh-workspace-v2 #adminPage .admin-search-shell { flex-basis: 100% !important; width: 100% !important; }
  body.fh-workspace-v2 #adminPage .admin-management-head { padding: 14px !important; }
  body.fh-workspace-v2 #adminPage .admin-management-grid { padding: 0 10px 10px !important; }
  body.fh-workspace-v2 #adminPage .admin-collapsible > summary { grid-template-columns: 30px minmax(0,1fr) 16px !important; gap: 8px !important; }
  body.fh-workspace-v2 #adminPage .admin-section-count { grid-column: 2; justify-self: start; }
  body.fh-workspace-v2 #adminPage .admin-summary-chevron { grid-column: 3; grid-row: 1; }
  body.fh-workspace-v2 #adminPage .admin-summary-icon { width: 30px !important; height: 30px !important; }
  body.fh-workspace-v2 #adminPage .admin-collapsible[open] > .panel-body { padding: 10px !important; }
  body.fh-workspace-v2 #adminPage .admin-list.admin-list-scroll { grid-template-columns: minmax(0,1fr) !important; max-height: 520px !important; }
  body.fh-workspace-v2 #adminPage .admin-create-grid,body.fh-workspace-v2 #adminPage .admin-create-user-form,body.fh-workspace-v2 #adminPage .manager-permission-grid { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #adminPage .admin-create-disclosure > summary span { display: block; margin: 6px 0 0 16px; }
  body.fh-workspace-v2 #preferencesPage .preferences-field-grid { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #preferencesPage .preferences-status-grid { grid-template-columns: minmax(0,1fr) !important; }
}

/* Vehicle document family: consistent context, filters, records and upload. */
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog) { width: min(1000px,calc(100vw - 32px)); padding: 24px; }
body.fh-workspace-v2 #vehicleFileUploadDialog { width: min(760px,calc(100vw - 32px)); padding: 24px; }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog,#vehicleFileUploadDialog) .fh-activity-header { position: sticky; top: -24px; z-index: 2; background: var(--fh-surface); padding: 12px 0; margin-top: -12px; border-bottom: 1px solid var(--fh-line); }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog,#vehicleFileUploadDialog) > p { color: var(--fh-secondary); font-size: 12px; line-height: 1.6; }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog,#vehicleFileUploadDialog) [data-part=context] { font-size: 13px; color: var(--fh-copy); }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog,#vehicleFileUploadDialog) [data-part=error] { color: #ffb9b9; }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog,#vehicleFileUploadDialog) button { min-height: 38px; padding: 8px 12px; font-size: 13px; white-space: normal; }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog,#vehicleFileUploadDialog) button:disabled { opacity: .5; cursor: not-allowed; }
body.fh-workspace-v2 #vehicleFilesDialog [data-part=form],
body.fh-workspace-v2 #vehicleTaskDocumentsDialog > .task-document-tools { display: grid; grid-template-columns: minmax(170px,1fr) minmax(220px,1.5fr) auto; align-items: end; gap: 14px; padding: 16px; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); background: var(--fh-surface-inset); margin: 20px 0 14px; }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog) label { font-size: 12px; color: var(--fh-secondary); }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog) .fh-activity-event { margin: 12px 0; padding: 16px; background: var(--fh-surface-inset); border: 1px solid var(--fh-line); border-radius: var(--fh-radius); }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog) h3 { font-size: 15px; line-height: 1.4; }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog) [data-part=items] p { font-size: 12px; line-height: 1.6; color: var(--fh-secondary); }
body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog) .fh-activity-event button + button { margin-left: 8px; }
body.fh-workspace-v2 #vehicleTaskDocumentsDialog [data-part=cargo] { margin: 18px 0; padding: 18px; border: 1px solid #316b82; border-radius: var(--fh-radius); background: var(--fh-surface-inset); }
body.fh-workspace-v2 #vehicleTaskDocumentsDialog [data-part=cargo] p { color: var(--fh-secondary); font-size: 12px; line-height: 1.6; }
body.fh-workspace-v2 #vehicleFileUploadDialog form { padding: 18px; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); background: var(--fh-surface-inset); margin-top: 20px; gap: 18px; }
body.fh-workspace-v2 #vehicleFileUploadDialog label { color: var(--fh-secondary); font-size: 12px; gap: 8px; }
body.fh-workspace-v2 #vehicleFileUploadDialog input[type=date] { color-scheme: dark; }
body.fh-workspace-v2 #vehicleFileUploadDialog input[type=file] { padding: 8px; color: var(--fh-copy); }
body.fh-workspace-v2 #vehicleFileUploadDialog input[type=file]::file-selector-button { padding: 8px 12px; margin-right: 12px; background: var(--fh-surface); color: var(--fh-copy); border: 1px solid var(--fh-line); border-radius: 6px; font: inherit; cursor: pointer; }
body.fh-workspace-v2 #vehicleFileUploadDialog [data-part=submit] { justify-self: start; min-width: 180px; }
body.fh-workspace-v2 #vehicleFileUploadDialog [data-part=submit]:enabled,
body.fh-workspace-v2 #vehicleFilesDialog [data-part=upload]:enabled { background: #164052; border-color: #316b82; color: #91e6fa; }
@media (max-width: 640px) {
  body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog,#vehicleFileUploadDialog) { padding: 16px; }
  body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog,#vehicleFileUploadDialog) .fh-activity-header { top: -16px; }
  body.fh-workspace-v2 #vehicleFilesDialog [data-part=form],
  body.fh-workspace-v2 #vehicleTaskDocumentsDialog > .task-document-tools,
  body.fh-workspace-v2 #vehicleFileUploadDialog form { grid-template-columns: minmax(0,1fr); padding: 14px; gap: 12px; }
  body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog) .fh-activity-event button { margin: 4px 8px 4px 0; }
  body.fh-workspace-v2 :is(#vehicleFilesDialog,#vehicleTaskDocumentsDialog) .fh-activity-event button + button { margin-left: 0; }
}

/* Task evidence workspace: browse links first, attach from a separate area. */
body.fh-workspace-v2 #taskDocumentsDialog { width: min(1040px,calc(100vw - 32px)); padding: 24px; }
body.fh-workspace-v2 #taskDocumentsDialog .fh-activity-header { position: sticky; top: -24px; z-index: 2; background: var(--fh-surface); padding: 12px 0; margin-top: -12px; border-bottom: 1px solid var(--fh-line); }
body.fh-workspace-v2 #taskDocumentsDialog [data-part=context] { font-size: 13px; color: var(--fh-copy); line-height: 1.6; }
body.fh-workspace-v2 #taskDocumentsDialog > p:not([data-part=context]) { font-size: 12px; line-height: 1.6; color: var(--fh-secondary); }
body.fh-workspace-v2 #taskDocumentsDialog [data-part=error] { color: #ffb9b9 !important; }
body.fh-workspace-v2 #taskDocumentsDialog .task-document-tools { gap: 8px; align-items: center; margin: 14px 0; }
body.fh-workspace-v2 #taskDocumentsDialog .task-document-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,340px); gap: 20px; align-items: start; margin-top: 20px; }
body.fh-workspace-v2 #taskDocumentsDialog .task-document-workspace:has(> [data-part=attach][hidden]) { grid-template-columns: minmax(0,1fr); }
body.fh-workspace-v2 #taskDocumentsDialog :is(.task-document-history,[data-part=attach],[data-part=picker]) { min-width: 0; padding: 18px; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); background: var(--fh-surface-inset); }
body.fh-workspace-v2 #taskDocumentsDialog [data-part=picker] { margin-top: 16px; }
body.fh-workspace-v2 #taskDocumentsDialog :is([data-part=attach],[data-part=picker]) > p { font-size: 12px; line-height: 1.6; color: var(--fh-secondary); }
body.fh-workspace-v2 #taskDocumentsDialog [data-part=items] > p { margin: 14px 0 0; color: var(--fh-secondary); font-size: 13px; line-height: 1.6; }
body.fh-workspace-v2 #taskDocumentsDialog h3 { font-size: 15px; font-weight: 650; line-height: 1.4; }
body.fh-workspace-v2 #taskDocumentsDialog .fh-activity-event { margin-top: 12px; padding: 14px 0; }
body.fh-workspace-v2 #taskDocumentsDialog .fh-activity-event p { color: var(--fh-secondary); font-size: 12px; line-height: 1.6; }
body.fh-workspace-v2 #taskDocumentsDialog [data-part=save]:enabled { background: #164052; border-color: #316b82; color: #91e6fa; }
body.fh-workspace-v2 #taskDocumentsDialog button { min-height: 38px; padding: 8px 12px; font-size: 13px; }
body.fh-workspace-v2 #taskDocumentsDialog button:disabled { opacity: .5; cursor: not-allowed; }
body.fh-workspace-v2 #taskDocumentsDialog :is([data-part=pickerLoads],[data-part=pickerStops]) { margin-top: 14px; }
@media (max-width: 760px) {
  body.fh-workspace-v2 #taskDocumentsDialog { padding: 16px; }
  body.fh-workspace-v2 #taskDocumentsDialog .fh-activity-header { top: -16px; }
  body.fh-workspace-v2 #taskDocumentsDialog .task-document-workspace { grid-template-columns: minmax(0,1fr); gap: 14px; }
  body.fh-workspace-v2 #taskDocumentsDialog :is(.task-document-history,[data-part=attach],[data-part=picker]) { padding: 14px; }
}

/* Task workspace: one page scroll, with the fleet and map still reachable. */
body.fh-workspace-v2 #dashboardPage:has(.manager-layout.tasks-open) {
  height: auto !important; min-height: calc(100dvh - var(--ws-topbar) - 48px) !important;
  overflow: visible !important; grid-template-rows: 72px auto !important;
}
body.fh-workspace-v2 #dashboardPage #managerLayout.tasks-open {
  display: grid !important; height: auto !important; min-height: 0 !important;
  grid-template-columns: minmax(240px,28%) minmax(0,1fr) !important;
  grid-template-rows: auto auto !important; gap: 16px !important; align-items: start !important;
}
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-device-panel {
  grid-column: 1 !important; grid-row: 1 / 3 !important; position: sticky !important; top: 0;
  height: calc(100dvh - var(--ws-topbar) - 128px) !important; min-height: 320px !important;
}
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-detail-panel {
  display: flex; position: static !important; grid-column: 2 !important; grid-row: 1 !important;
  width: 100% !important; height: auto !important; min-height: 0 !important; max-height: none !important;
  overflow: visible !important; z-index: auto !important;
}
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-detail-panel > .panel-header { position: sticky !important; top: 0; z-index: 2; background: var(--fh-surface) !important; border-radius: var(--fh-radius) var(--fh-radius) 0 0; padding: 16px !important; border-bottom: 1px solid var(--fh-line) !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-panel-title-row { flex-wrap: wrap !important; align-items: start !important; gap: 12px !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open #managerVehicleTitle { display: block !important; font-size: 18px !important; line-height: 1.35 !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-panel-actions { flex-wrap: wrap !important; gap: 6px !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open #managerTaskDetails { flex: none !important; padding: 16px !important; overflow: visible !important; height: auto !important; min-height: 0 !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-task-shell { grid-template-columns: minmax(0,1fr) !important; gap: 16px !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-active-task-card { padding: 16px !important; gap: 14px !important; background: var(--fh-surface-inset) !important; border-color: var(--fh-line) !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-active-task-title { font-size: 17px !important; line-height: 1.4 !important; font-weight: 650 !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-task-facts { grid-template-columns: repeat(auto-fit,minmax(140px,1fr)) !important; gap: 8px !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-task-fact { padding: 10px !important; border-color: var(--fh-line) !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-task-fact span { color: var(--fh-secondary) !important; font-size: 11px !important; line-height: 1.4 !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-task-fact b { font-size: 13px !important; line-height: 1.45 !important; font-weight: 600 !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open :is(.manager-task-stop-card,.fh-route-stop-card) { padding: 12px !important; border-color: var(--fh-line) !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open :is(.manager-task-stop-head,.fh-route-stop-head) { line-height: 1.5 !important; font-size: 13px !important; font-weight: 600 !important; flex-wrap: wrap !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open :is(.manager-task-stop-meta,.fh-route-stop-meta) { line-height: 1.5 !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open :is(.manager-detail-panel,.fh-route-planner-panel) button { min-height: 36px !important; height: auto !important; padding: 7px 10px !important; font-size: 12px !important; line-height: 1.4 !important; white-space: normal !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-task-composer-slot .fh-route-planner-panel { width: 100% !important; height: auto !important; max-height: none !important; overflow: visible !important; background: var(--fh-surface) !important; border-color: var(--fh-line) !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .fh-route-planner-panel .panel-body { overflow: visible !important; padding: 16px !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .fh-route-planner-panel .panel-header { padding: 16px !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .fh-route-planner-grid { gap: 12px !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .fh-route-planner-grid fieldset { min-width: 0; border: 1px solid var(--fh-line); border-radius: 8px; padding: 12px; margin: 0; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-map-stack { display: grid !important; grid-column: 2 !important; grid-row: 2 !important; grid-template-rows: auto !important; align-items: start !important; align-content: start !important; gap: 16px !important; height: auto !important; min-height: 0 !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open .manager-map-stack > .map-panel { grid-column: auto !important; grid-row: auto !important; height: 380px !important; min-height: 380px !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open #managerTimelinePanel { grid-column: auto !important; grid-row: auto !important; height: auto !important; min-height: 0 !important; max-height: none !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open #managerTimelinePanel .panel-body { flex: none !important; height: auto !important; min-height: 0 !important; max-height: 320px !important; overflow: auto !important; }
body.fh-workspace-v2 #dashboardPage .tasks-open #managerTimelinePanel .panel-header { height: auto !important; min-height: 0 !important; white-space: normal !important; flex-wrap: wrap !important; }
@media (max-width: 1000px) {
  body.fh-workspace-v2 #dashboardPage #managerLayout.tasks-open { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #dashboardPage .tasks-open .manager-detail-panel { grid-column: 1 !important; grid-row: 1 !important; }
  body.fh-workspace-v2 #dashboardPage .tasks-open .manager-map-stack { grid-column: 1 !important; grid-row: 2 !important; }
  body.fh-workspace-v2 #dashboardPage .tasks-open .manager-device-panel { grid-column: 1 !important; grid-row: 3 !important; position: static !important; height: 420px !important; }
}
@media (max-width: 700px) {
  body.fh-workspace-v2 #dashboardPage .tasks-open #managerTaskDetails { padding: 10px !important; }
  body.fh-workspace-v2 #dashboardPage .tasks-open .manager-active-task-card { padding: 12px !important; }
  body.fh-workspace-v2 #dashboardPage .tasks-open .manager-task-facts { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.fh-workspace-v2 #dashboardPage .tasks-open .fh-route-planner-grid { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 #dashboardPage .tasks-open .fh-route-address-row { grid-template-columns: minmax(0,1fr) !important; }
}

/* Unsigned CMR workspace: source remains inspectable; explicit input comes first. */
body.fh-workspace-v2 #cmrDraftsDialog { width: min(1080px,calc(100vw - 32px)); padding: 24px; }
body.fh-workspace-v2 #cmrDraftsDialog .fh-activity-header { position: sticky; top: -24px; z-index: 2; background: var(--fh-surface); padding: 12px 0; margin-top: -12px; border-bottom: 1px solid var(--fh-line); }
body.fh-workspace-v2 #cmrDraftsDialog p { color: var(--fh-secondary); font-size: 12px; line-height: 1.6; }
body.fh-workspace-v2 #cmrDraftsDialog [data-part=context] { color: var(--fh-copy); }
body.fh-workspace-v2 #cmrDraftsDialog :is([data-part=error],[data-part=storage]) { color: #ffb9b9; }
body.fh-workspace-v2 #cmrDraftsDialog .cmr-tools { align-items: end; }
body.fh-workspace-v2 #cmrDraftsDialog button { min-height: 38px; padding: 8px 12px; font-size: 13px; }
body.fh-workspace-v2 #cmrDraftsDialog button:disabled { opacity: .5; cursor: not-allowed; }
body.fh-workspace-v2 #cmrDraftsDialog [data-part=content] > details { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--fh-line); border-radius: var(--fh-radius); background: var(--fh-surface-inset); }
body.fh-workspace-v2 #cmrDraftsDialog summary { cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1.6; }
body.fh-workspace-v2 #cmrDraftsDialog [data-part=form] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
body.fh-workspace-v2 #cmrDraftsDialog [data-part=form] > fieldset { margin: 0; padding: 16px; background: var(--fh-surface-inset); border-color: var(--fh-line); border-radius: var(--fh-radius); }
body.fh-workspace-v2 #cmrDraftsDialog [data-part=form] > fieldset:nth-of-type(n+5),
body.fh-workspace-v2 #cmrDraftsDialog [data-part=form] > :is(button,p) { grid-column: 1 / -1; }
body.fh-workspace-v2 #cmrDraftsDialog legend { padding: 0 6px; font-size: 13px; font-weight: 600; }
body.fh-workspace-v2 #cmrDraftsDialog label { font-size: 12px; color: var(--fh-secondary); }
body.fh-workspace-v2 #cmrDraftsDialog label:has(textarea) { grid-column: 1 / -1; }
body.fh-workspace-v2 #cmrDraftsDialog label:has(input[type=checkbox]) { display: flex; align-items: start; gap: 8px; }
body.fh-workspace-v2 #cmrDraftsDialog input[type=date] { color-scheme: dark; }
body.fh-workspace-v2 #cmrDraftsDialog [data-part=save] { justify-self: start; background: #164052; border-color: #316b82; color: #91e6fa; }
@media (max-width: 760px) {
  body.fh-workspace-v2 #cmrDraftsDialog [data-part=form] { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 680px) {
  body.fh-workspace-v2 #cmrDraftsDialog { width: calc(100vw - 20px); padding: 16px; }
  body.fh-workspace-v2 #cmrDraftsDialog .fh-activity-header { top: -16px; }
  body.fh-workspace-v2 #cmrDraftsDialog [data-part=form] > fieldset { padding: 12px; }
  body.fh-workspace-v2 #cmrDraftsDialog .cmr-tools > * { flex: 1 1 100%; }
  body.fh-workspace-v2 #cmrDraftsDialog .cmr-grid { grid-template-columns: minmax(0,1fr); }
}

/* Vehicle object workspace: identity stays readable independently of action count. */
body.fh-workspace-v2 #vehiclesPage.vehicles-profile-active-v120 :is(#vehiclesRegistryView,#vehiclesMaintenanceView)[hidden] { display: none !important; }
body.fh-workspace-v2 #vehiclesFullProfileView { height: auto !important; min-height: 0 !important; overflow: visible !important; }
body.fh-workspace-v2 #vehiclesPage.vehicles-profile-active-v120.page-section.active { overflow: auto !important; padding: 0 12px 24px !important; }
body.fh-workspace-v2 .vehicles-profile-header { position: relative !important; padding: 8px 0 18px !important; margin-bottom: 18px; background: transparent !important; }
body.fh-workspace-v2 .vehicles-profile-title-row { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 20px !important; padding-top: 12px; }
body.fh-workspace-v2 .vehicles-profile-identity { min-width: 0 !important; width: 100% !important; }
body.fh-workspace-v2 .vehicles-profile-identity h1 { font-size: 28px !important; line-height: 1.2 !important; }
body.fh-workspace-v2 .vehicles-profile-states { flex-wrap: wrap !important; gap: 8px !important; }
body.fh-workspace-v2 .vehicles-profile-head-actions { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) auto !important; width: 100% !important; gap: 14px !important; align-items: start !important; }
body.fh-workspace-v2 .ws-vehicle-action-group { min-width: 0; padding: 12px; background: #111e2c; border: 1px solid #283647; border-radius: 8px; }
body.fh-workspace-v2 .ws-vehicle-action-group:nth-child(3) { grid-column: 1 / 3; }
body.fh-workspace-v2 .ws-vehicle-action-label { display: block; margin-bottom: 8px; color: #a3b3c6; font-size: 11px; font-weight: 600; }
body.fh-workspace-v2 .ws-vehicle-action-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
body.fh-workspace-v2 .ws-vehicle-action-group:has(>div:empty) { display: none; }
body.fh-workspace-v2 .vehicles-profile-head-actions button { min-height: 34px !important; height: auto !important; padding: 7px 10px !important; font-size: 12px !important; line-height: 1.4 !important; white-space: normal !important; }
body.fh-workspace-v2 .vehicles-profile-more { grid-column: 3; grid-row: 1; }
body.fh-workspace-v2 .vehicles-profile-overview { gap: 16px !important; grid-template-columns: minmax(0,2fr) minmax(280px,1fr) !important; }
body.fh-workspace-v2 .vehicles-profile-overview > :is(main,aside) { gap: 16px !important; }
body.fh-workspace-v2 .vehicles-profile-card { background: #121c29 !important; border-color: #283647 !important; border-radius: 10px !important; }
body.fh-workspace-v2 .vehicles-profile-card > h2 { min-height: 48px !important; padding: 12px 16px !important; }
body.fh-workspace-v2 .vehicles-profile-card table { table-layout: auto !important; }
body.fh-workspace-v2 .vehicles-profile-card :is(th,td) { padding: 10px 12px !important; font-size: 12px !important; line-height: 1.45 !important; }
body.fh-workspace-v2 .vehicles-profile-fact { gap: 10px !important; padding: 5px 0 !important; }
body.fh-workspace-v2 .vehicles-profile-fact > :is(span,div),body.fh-workspace-v2 .vehicles-profile-info-section h3 { font-size: 12px !important; line-height: 1.5 !important; }
body.fh-workspace-v2 .vehicles-profile-summary { gap: 12px !important; }
@media (max-width: 1150px) {
  body.fh-workspace-v2 .vehicles-profile-overview { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 .vehicles-profile-overview > aside { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 680px) {
  body.fh-workspace-v2 .vehicles-profile-head-actions { grid-template-columns: minmax(0,1fr) !important; }
  body.fh-workspace-v2 .ws-vehicle-action-group:nth-child(3) { grid-column: auto; }
  body.fh-workspace-v2 .vehicles-profile-more { grid-column: 1; grid-row: auto; }
  body.fh-workspace-v2 .vehicles-profile-card table { min-width: 580px !important; }
  body.fh-workspace-v2 .vehicles-profile-summary { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}

/* Desktop navigation: a compact rail by default; expansion overlays content.
   Only explicit pinning reserves the full width. Mobile remains unchanged. */
@media (min-width: 901px) {
  body.fh-workspace-v2 { --ws-sidebar: 68px; }
  body.fh-workspace-v2.ws-nav-pinned { --ws-sidebar: 216px; }
  body.fh-workspace-v2 .header-inner { padding: 0 8px !important; overflow: hidden; }
  body.fh-workspace-v2.fh-authenticated .header { transition: width 140ms ease; }
  body.fh-workspace-v2.fh-authenticated .header.ws-rail-expanded { width: 216px !important; box-shadow: 12px 0 28px #0005 !important; }
  body.fh-workspace-v2 .ws-brand { gap: 8px; padding: 0 1px; overflow: hidden; }
  body.fh-workspace-v2 .ws-brand .brand { flex-shrink: 0; }
  body.fh-workspace-v2 .ws-nav-pin { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 34px; padding: 6px 10px; border: 1px solid #304158; border-radius: 6px; background: #142131; color: #afbed0; font: inherit; font-size: 12px; cursor: pointer; }
  body.fh-workspace-v2 .ws-nav-pin[aria-pressed=true] { border-color: #316b82; color: #91e6fa; }
  body.fh-workspace-v2 .ws-heading { margin-right: auto; }
  body.fh-workspace-v2 .nav .nav-btn { white-space: nowrap; }
  body.fh-workspace-v2 .ws-nav-heading { white-space: nowrap; }
  body.fh-workspace-v2:not(.ws-nav-pinned) .header:not(.ws-rail-expanded) :is(.brand-wordmark,.ws-nav-expand,.nav-label,.nav .nav-menu) { display: none !important; }
  body.fh-workspace-v2:not(.ws-nav-pinned) .header:not(.ws-rail-expanded) :is(.ws-sidebar-foot,.ws-nav-heading) { visibility: hidden; }
  body.fh-workspace-v2 .ws-sidebar-foot { box-sizing: border-box; flex: 0 0 43px; min-width: 0; white-space: nowrap; overflow: hidden; }
  body.fh-workspace-v2:not(.ws-nav-pinned) .header:not(.ws-rail-expanded) .nav-group { grid-template-columns: minmax(0,1fr); }
  body.fh-workspace-v2:not(.ws-nav-pinned) .header:not(.ws-rail-expanded) .nav .nav-btn { gap: 0 !important; }
  body.fh-workspace-v2 .ws-skip { left: 80px; }
  body.fh-workspace-v2 .ws-vehicle-action-group:nth-child(3) { grid-column: 1; }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  body.fh-workspace-v2.fh-authenticated .header { transition: none; }
}
