/* Shared workspace layout. Home keeps its own production map presentation. */
@media screen {
  :root #root .ops-app.ops-workspace {
    --workspace-accent: #8ab4ee;
    --workspace-accent-soft: rgb(79 131 219 / 12%);
  }
  :root #root .ops-app.ops-workspace[data-theme='dark'] {
    --ui-canvas: #181a1d;
    --ui-panel: #212429;
    --ui-raised: #292d33;
    --ui-hover: #30363e;
    --ui-input: #1a1d22;
    --ui-border: #343a42;
    --ui-border-strong: #4a525d;
    --ui-text: #f4f5f6;
    --ui-secondary: #d6d9de;
    --ui-muted: #b5bbc4;
    --ui-subtle: #959eab;
  }
  :root #root .ops-app.ops-workspace[data-theme='light'] {
    --workspace-accent: #245690;
    --workspace-accent-soft: #e7eef8;
  }
  :root #root .ops-app.ops-workspace[data-theme='goth'] {
    --workspace-accent: #dedede;
    --workspace-accent-soft: rgb(255 255 255 / 8%);
    --ui-on-primary: #111;
  }

  .workspace-skip-link { position: fixed; z-index: 2000; top: 10px; left: 16px; transform: translateY(-180%); padding: 12px 18px; border-radius: 10px; color: var(--ui-text); background: var(--ui-panel); border: 2px solid var(--workspace-accent); text-decoration: none; }
  .workspace-skip-link:focus { transform: translateY(0); }
  .workspace-content { min-width: 0; }
  .workspace-content:focus { outline: none; }
  :root #root .ops-app[data-theme] .weighing-modal-backdrop,
  :root #root .ops-app[data-theme] dialog::backdrop {
    border: 0;
    border-radius: 0;
    background: transparent !important;
    background-image: none !important;
    backdrop-filter: none;
    box-shadow: none;
  }
  .workspace-search-help { margin: 0; padding: 11px 16px; border-top: 1px solid var(--ui-border); color: var(--ui-muted); font-size: 10px; line-height: 1.6; }

  :root #root .ops-app.ops-workspace .workspace-content > .ops-main,
  :root #root .ops-app.ops-workspace .production-layout {
    width: min(calc(100% - 64px), 1460px);
    margin: 0 auto;
  }
  :root #root .ops-app.ops-workspace .ops-main { padding-top: 24px; padding-bottom: 48px; }
  :root #root .ops-app.ops-workspace .production-stats-layout { margin-top: 0; overflow: visible; }
  :root #root .ops-app.ops-workspace .production-stats-main { padding-inline: 0; }
  :root #root .ops-app.ops-workspace[data-theme='dark'] :is(.production-stats-layout, .production-batches-report) {
    --stats-surface: #181a1d;
    --stats-tile: #212429;
    --stats-hover: #292d33;
    --stats-secondary: #b5bbc4;
  }
  :root #root .ops-app.ops-workspace .production-batches-report { padding-inline: 0; }
  :root #root .ops-app.ops-workspace .ops-breadcrumb { flex-wrap: wrap; gap: 8px; margin-bottom: 0; color: var(--ui-subtle); line-height: 1.6; }
  :root #root .ops-app.ops-workspace .ops-page-heading { align-items: flex-start; flex-wrap: wrap; gap: 18px 24px; margin: 18px 0 26px; }
  :root #root .ops-app.ops-workspace .ops-page-heading > div:first-child { min-width: 0; flex: 1 1 340px; }
  :root #root .ops-app.ops-workspace .ops-page-heading h1 { margin: 8px 0; font-size: clamp(26px, 2.6vw, 36px); font-weight: 650; letter-spacing: -.9px; line-height: 1.2; overflow-wrap: anywhere; }
  :root #root .ops-app.ops-workspace .ops-page-heading p { max-width: 760px; font-size: 14px; line-height: 1.65; }
  :root #root .ops-app.ops-workspace .ops-overline { color: var(--workspace-accent); font-size: 10px; letter-spacing: .12em; }
  :root #root .ops-app.ops-workspace .ops-heading-actions { flex-wrap: wrap; align-self: center; justify-content: flex-start; gap: 8px; }
  :root #root .ops-app.ops-workspace .ops-button { min-height: 44px; padding: 10px 16px; font-size: 13px; line-height: 1.4; }
  :root #root .ops-app.ops-workspace .ops-button-primary { border-color: var(--ui-primary); background: var(--ui-primary); color: var(--ui-on-primary, #fff); }
  :root #root .ops-app.ops-workspace .ops-button-primary:hover:not(:disabled) { border-color: var(--ui-primary-hover); background: var(--ui-primary-hover); }
  :root #root .ops-app.ops-workspace :is(a, button, input, select, textarea, summary, [tabindex='0']):focus-visible { outline: 2px solid var(--workspace-accent); outline-offset: 3px; }
  :root #root .ops-app.ops-workspace :is(input, select, textarea) { font-size: 13px; }
  :root #root .ops-app.ops-workspace :is(input, select) { min-width: 0; }
  :root #root .ops-app.ops-workspace :is(.ops-metric-card, .erp-metrics article) { min-height: 120px; padding: 20px; }
  :root #root .ops-app.ops-workspace :is(.ops-metric-card:hover, .erp-metrics article:hover) { transform: none; }
  :root #root .ops-app.ops-workspace .ops-metric-value { font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
  :root #root .ops-app.ops-workspace .ops-metric-foot { font-size: 12px; line-height: 1.5; }
  :root #root .ops-app.ops-workspace .weighings-panel-heading { flex-wrap: wrap; gap: 14px; padding: 20px 22px; }
  :root #root .ops-app.ops-workspace :is(.weighings-panel-heading, .dosage-chart-heading) h2 { font-size: 17px; font-weight: 600; line-height: 1.4; }
  :root #root .ops-app.ops-workspace .weighings-panel-heading p { margin-top: 5px; font-size: 12px; line-height: 1.6; }
  :root #root .ops-app.ops-workspace .weighings-toolbar { flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 22px; }
  :root #root .ops-app.ops-workspace .ops-search { min-height: 42px; min-width: 0; }
  :root #root .ops-app.ops-workspace .ops-search input { min-width: 0; font-size: 13px; }
  :root #root .ops-app.ops-workspace .weighings-tabs { flex-wrap: wrap; gap: 4px; margin-block: 20px 16px; border-bottom-color: var(--ui-border); }
  :root #root .ops-app.ops-workspace .weighings-tab { min-height: 44px; color: var(--ui-muted); font-size: 13px; }
  :root #root .ops-app.ops-workspace .weighings-tab.is-active { color: var(--workspace-accent); background: var(--workspace-accent-soft); border-bottom-color: var(--workspace-accent); box-shadow: none; }
  :root #root .ops-app.ops-workspace :is(.weighings-table-wrap, .almox-table-scroll, .billing-table-scroll, .erp-table-scroll) { max-width: 100%; overscroll-behavior-inline: contain; }
  :root #root .ops-app.ops-workspace :is(.weighings-table, .almox-table, .billing-table, .erp-table) td { padding: 12px 14px; font-size: 13px; line-height: 1.55; }
  :root #root .ops-app.ops-workspace :is(.weighings-table, .almox-table, .billing-table, .erp-table) th { padding: 13px 14px; font-size: 12px; letter-spacing: .02em; }
  :root #root .ops-app.ops-workspace .weighings-state { min-height: 200px; padding: 32px 22px; gap: 12px; line-height: 1.65; }
  :root #root .ops-app.ops-workspace .weighings-footer { flex-wrap: wrap; gap: 14px; padding: 16px 22px; font-size: 12px; }
  :root #root .ops-app.ops-workspace .weighings-pagination { flex-wrap: wrap; }

  /* Period filters take a full row instead of squeezing beside the title. */
  :root #root .ops-app.ops-workspace .production-stats-heading { flex-direction: column; align-items: stretch; }
  :root #root .ops-app.ops-workspace .production-stats-heading > div:first-child { flex-basis: auto; }
  :root #root .ops-app.ops-workspace .production-stats-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; width: 100%; padding: 12px 16px; border: 1px solid var(--ui-border); border-radius: 12px; background: var(--ui-panel); }
  :root #root .ops-app.ops-workspace .production-stats-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 0 1 640px; gap: 10px; }
  :root #root .ops-app.ops-workspace .production-stats-field { min-width: 0; font-size: 12px; }
  :root #root .ops-app.ops-workspace .production-stats-field input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 38px; height: 38px; padding-block: 6px; }
  :root #root .ops-app.ops-workspace .production-stats-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  :root #root .ops-app.ops-workspace .production-start-information { display: flex; flex-wrap: wrap; gap: 8px; }
  :root #root .ops-app.ops-workspace .production-stats-main .dosage-charts-grid { align-items: stretch; }
  :root #root .ops-app.ops-workspace .production-stats-main .dosage-hourly-chart { overflow-x: auto; overscroll-behavior-inline: contain; }
  :root #root .ops-app.ops-workspace .production-stats-main .dosage-chart-bar-stack { position: relative; grid-column: 1; grid-row: 2; align-self: end; width: min(18px, 72%); }
  :root #root .ops-app.ops-workspace .production-stats-main .dosage-chart-bar { display: block; width: 100%; height: 100%; }
  :root #root .ops-app.ops-workspace .production-stats-main .dosage-chart-hour { grid-column: 1; grid-row: 3; }
  :root #root .ops-app.ops-workspace .dosage-hourly-card { align-self: start; }
  :root #root .ops-app.ops-workspace .dosage-chart-scroll-hint { display: none; margin: 10px 0 0; color: var(--ui-muted); font-size: 12px; }
  :root #root .ops-app.ops-workspace .dosage-downtime-chart { margin-top: 12px; }
  :root #root .ops-app.ops-workspace .dosage-downtime-chart .dosage-chart-bars { height: auto; min-width: 622px; gap: 2px; padding-top: 0; border-bottom: 0; }
  :root #root .ops-app.ops-workspace .dosage-downtime-chart .dosage-chart-column { grid-template-rows: 124px 22px; row-gap: 6px; }
  :root #root .ops-app.ops-workspace .dosage-downtime-chart .dosage-chart-bar-stack { grid-row: 1; width: min(18px, 72%); }
  :root #root .ops-app.ops-workspace .dosage-downtime-chart .dosage-chart-bar { border-radius: 3px 3px 0 0; }
  :root #root .ops-app.ops-workspace .dosage-downtime-chart .dosage-chart-value { position: absolute; bottom: calc(100% + 5px); left: 50%; width: 24px; max-width: none; transform: translateX(-50%); overflow: visible; color: var(--ui-text); font-size: 11px; line-height: 14px; white-space: normal; text-align: center; }
  :root #root .ops-app.ops-workspace .dosage-downtime-chart .dosage-chart-hour { grid-row: 2; width: 100%; padding-top: 5px; border-top: 1px solid var(--ui-border-strong); color: var(--ui-muted); font-size: 11px; line-height: 16px; text-align: center; }
  :root #root .ops-app.ops-workspace .production-stoppages-entry { flex-wrap: wrap; gap: 16px; }
  :root #root .ops-app.ops-workspace .erp-filters { padding: 14px 16px; gap: 12px; border: 1px solid var(--ui-border); border-radius: 12px; background: var(--ui-panel); }
  :root #root .ops-app.ops-workspace :is(.erp-filters, .erp-toolbar) label { min-width: 0; font-size: 12px; }
  :root #root .ops-app.ops-workspace :is(.erp-filters, .erp-toolbar) :is(input, select) { min-height: 38px; padding-block: 7px; }
  :root #root .ops-app.ops-workspace .erp-filters > .erp-muted { flex: 1 0 100%; max-width: none; margin: 0; font-size: 12px; }
  .workspace-clear-filter { flex: 0 0 auto; border: 0; border-radius: 6px; padding: 10px 8px; color: var(--workspace-accent); background: transparent; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
  .workspace-empty-state { display: grid; gap: 8px; justify-items: start; line-height: 1.65; }
  .workspace-empty-state strong { color: var(--ui-text); font-size: 15px; }
  .workspace-empty-state p { margin: 0; }
  :root #root .ops-app.ops-workspace :is(.users-profile-card, .users-list, .users-sessions, .workforce-panel) { scroll-margin-top: 90px; }
  :root #root .ops-app.ops-workspace .almox-stock-filters { align-items: end; flex-wrap: wrap; gap: 14px; }
  :root #root .ops-app.ops-workspace .almox-select-label { display: grid; gap: 7px; color: var(--ui-muted); font-size: 12px; }
  :root #root .ops-app.ops-workspace .almox-select-label select { min-height: 42px; }
  .workspace-monitor-filters, .workforce-view-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 20px 0; padding: 12px 16px; border: 1px solid var(--ui-border); border-radius: 12px; background: var(--ui-panel); }
  .workspace-monitor-filters label, .workforce-view-toolbar label { display: grid; gap: 7px; color: var(--ui-muted); font-size: 12px; }
  .workspace-monitor-filters label:first-child { flex: 0 1 420px; }
  .workspace-monitor-filters :is(input, select), .workforce-view-toolbar input { width: 100%; min-height: 38px; padding: 7px 12px; border: 1px solid var(--ui-border); border-radius: 9px; color: var(--ui-text); background: var(--ui-input); font: inherit; }
  .workspace-monitor-count { align-self: center; color: var(--ui-muted); font-size: 12px; }
  .workforce-view-toolbar > strong { flex: 1 1 160px; align-self: center; color: var(--ui-secondary); font-size: 13px; }
  .workforce-view-toolbar .workforce-inline-error { flex-basis: 100%; margin: 0; }

  /* Shared hierarchy and balanced summaries across the operational pages. */
  :root #root .ops-app.ops-workspace :is(.weighings-dashboard, .production-timeline-metrics, .dosage-metrics) {
    grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
    align-items: stretch;
  }
  :root #root .ops-app.ops-workspace .ops-metric-top { font-size: 13px; line-height: 1.5; }
  :root #root .ops-app.ops-workspace .ops-metric-value { overflow-wrap: anywhere; }
  :root #root .ops-app.ops-workspace .dosage-quantity-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; }
  :root #root .ops-app.ops-workspace .dosage-batch-count { color: var(--ui-secondary); font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
  :root #root .ops-app.ops-workspace .production-live-indicator { animation: workspace-live-pulse 1.5s ease-in-out infinite; }
  :root #root .ops-app.ops-workspace .production-live-status.has-error .production-live-indicator { animation: none; }
  :root #root .ops-app.ops-workspace .ops-page-heading {
    padding: 0 0 24px;
    border: 0;
    border-bottom: 1px solid var(--ui-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  :root #root .ops-app.ops-workspace .ops-page-heading::before { display: none; }
  :root #root .ops-app.ops-workspace .erp-report-heading > div { padding: 0; }
  :root #root .ops-app.ops-workspace .erp-report .ops-breadcrumb { margin-bottom: 0; }
  :root #root .ops-app.ops-workspace .production-material-consumption-report .erp-report-heading { margin-top: 18px; }
  :root #root .ops-app.ops-workspace :is(.dosage-data-note, .production-chat-note, .production-order-code, .production-live-status, .billing-data-scope, .billing-refresh > span, .import-lineup-date-range label) { font-size: 12px; line-height: 1.6; }
  :root #root .ops-app.ops-workspace :is(.weighings-table, .almox-table, .billing-table, .erp-table) :is(small, .almox-code) { font-size: 12px; }
  :root #root .ops-app.ops-workspace :is(.erp-detail-grid, .users-profile-facts) dt { font-size: 12px; color: var(--ui-muted); }
  :root #root .ops-app.ops-workspace :is(.erp-detail-grid, .users-profile-facts) dd { margin-top: 7px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
  :root #root .ops-app.ops-workspace .production-stats-main .ops-button-secondary { border-color: var(--ui-border-strong); color: var(--ui-secondary); background: var(--ui-raised); }
  :root #root .ops-app.ops-workspace .production-stats-main .ops-button-secondary:hover:not(:disabled) { color: var(--ui-text); background: var(--ui-hover); }
  :root #root .ops-app.ops-workspace :is(.erp-filters, .erp-toolbar) :is(input, select) { color-scheme: inherit; }
  :root #root .ops-app.ops-workspace :is(.weighings-table-wrap, .almox-table-scroll, .billing-table-scroll, .erp-table-scroll) { scrollbar-width: thin; scrollbar-color: var(--ui-border-strong) transparent; }
  :root #root .ops-app.ops-workspace .production-material-consumption-report :is(.production-material-quantity-pair small, .production-material-chart-legend, .production-material-section-heading p) { font-size: 12px; }
  :root #root .ops-app.ops-workspace .production-material-line-chart { max-height: 340px; }
  :root #root .ops-app.ops-workspace .erp-map-search { border-radius: 12px; }
  :root #root .ops-app.ops-workspace .billing-refresh { padding: 0; border: 0; background: transparent; box-shadow: none; }
  :root #root .ops-app.ops-workspace .production-timeline-page .production-stats-fields { flex-basis: 340px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root #root .ops-app.ops-workspace .production-stats-filter-actions > .ops-button { min-height: 38px; padding-block: 7px; }
  :root #root .ops-app.ops-workspace .production-material-consumption-filters { grid-template-columns: repeat(2, minmax(140px, 180px)) minmax(0, 1fr); }

  /* Team and monitoring details stay readable at the same scale as reports. */
  :root #root .ops-app.ops-workspace .workforce-overview { align-items: start; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); }
  :root #root .ops-app.ops-workspace .workforce-summary-card { min-height: 0; }
  :root #root .ops-app.ops-workspace :is(.workforce-section-kicker, .workforce-card-label, .workforce-calendar-weekday) { font-size: 11px; }
  :root #root .ops-app.ops-workspace :is(.workforce-summary-caption, .workforce-calendar-note, .workforce-summary-metrics article > small, .workforce-shift-toggle small, .workforce-team-person small, .workforce-user-option small, .workforce-tasks li small, .workforce-member-chip) { font-size: 12px; line-height: 1.5; }
  :root #root .ops-app.ops-workspace :is(.workforce-summary-metrics article > span, .workforce-user-option strong, .workforce-team-person strong, .workforce-tasks li strong, .workforce-calendar-day) { font-size: 13px; }
  :root #root .ops-app.ops-workspace .workforce-calendar-heading button { width: 36px; height: 36px; }
  :root #root .ops-app.ops-workspace .workforce-calendar-day { min-height: 38px; }
  :root #root .ops-app.ops-workspace .workforce-panel .weighings-panel-heading { padding: 0 0 18px; }
  :root #root .ops-app.ops-workspace .workforce-panel .weighings-panel-heading p { font-size: 13px; line-height: 1.6; }
  :root #root .ops-app.ops-workspace .workforce-shift-toggle { min-height: 100px; }
  :root #root .ops-app.ops-workspace .workforce-branch-tag { font-size: 11px; }
  :root #root .ops-app.ops-workspace .workforce-shift-toggle-main > strong { font-size: 15px; }
  :root #root .ops-app.ops-workspace .it-card-values small { font-size: 12px; }
  :root #root .ops-app.ops-workspace :is(.it-card-description, .it-card-bottom, .it-monitor-info, .it-data-note) { font-size: 12px; line-height: 1.65; }
  :root #root .ops-app.ops-workspace .it-card-open:focus-visible { outline-offset: -4px; }
  :root #root .ops-app.ops-workspace .production-process-node-index { color: var(--ui-text); background: var(--ui-raised); }

  /* Navigation and Home share the same legible supporting text. */
  :root #root .ops-app .ops-primary-nav { margin-block: 8px; }
  :root #root .ops-app .ops-primary-nav :is(.ops-nav-item, .ops-operations-trigger) { min-height: 38px; font-size: 13px; }
  :root #root .ops-app .ops-operations-links a { font-size: 13px; }
  :root #root .ops-app .ops-account-dropdown a strong { font-size: 13px; }
  :root #root .ops-app .ops-account-dropdown a small { font-size: 12px; }
  :root #root .ops-app[data-theme] .home-production-panel-heading .ops-overline { color: var(--ui-muted); }
  :root #root .ops-app :is(.home-factory-card-heading small, .home-factory-card p, .home-factory-share small, .home-factory-total-card > small, .home-production-trend-heading p, .home-production-note, .home-production-source, .home-map-delivery-legend, .home-production-refresh) { font-size: 12px; line-height: 1.6; }
  :root #root .ops-app .home-factory-card-heading strong { font-size: 16px; }
  :root #root .ops-app .home-production-trend-heading h2 { font-size: 17px; }
  :root #root .ops-app .home-factory-total-card > span { font-size: 13px; }
  :root #root .ops-app .home-factory-total small { font-size: 12px; }
  :root #root .ops-app .home-chart-legend strong { font-size: 12px; }
  :root #root .ops-app .home-map-callout-title { fill: var(--ui-secondary); }
  :root #root .ops-app .home-map-callout-date { fill: var(--ui-muted); }
  :root #root .ops-app :is(.home-map-callout-value, .home-map-callout-value.is-bom-jesus) { fill: var(--ui-text); }
  :root #root .ops-app :is(.home-factory-card, .home-factory-total-card):hover { transform: none; }
  :root #root .ops-app :is(.home-production-panel, .home-production-panel-heading) { background: transparent !important; box-shadow: none !important; }
  :root #root .login-page :is(.login-card > p, .login-label, .login-note) { font-size: 13px; line-height: 1.65; }

  :root[data-theme='light'] { --ui-subtle: #626976; }
  :root[data-theme='light'] #root .ops-app[data-theme='light'] { --ui-subtle: #626976; }
  :root #root .ops-app[data-theme='light'] .ops-primary-nav { background: var(--ui-raised); }
  :root #root .ops-app[data-theme='light'] :is(.home-factory-share.is-paranagua strong, .home-factory-pin-share.is-paranagua) { color: #245cb7; }
  :root #root .ops-app[data-theme='light'] .home-factory-share.is-barcarena strong { color: #b3353d; }
  :root #root .ops-app[data-theme='light'] .home-map-callout-share.is-paranagua { fill: #245cb7; }
  :root #root .ops-app[data-theme='light'] .home-map-callout-share.is-barcarena { fill: #b3353d; }

  @media (max-width: 1024px) {
    :root #root .ops-app.ops-workspace .workforce-overview { grid-template-columns: minmax(0, 1fr); }
    :root #root .ops-app.ops-workspace .dosage-chart-scroll-hint { display: block; }
  }

  @media (max-width: 760px) {
    :root #root .ops-app.ops-workspace .workspace-content > .ops-main,
    :root #root .ops-app.ops-workspace .production-layout { width: calc(100% - 32px); }
    :root #root .ops-app.ops-workspace .ops-page-heading { flex-direction: column; align-items: stretch; margin-block: 16px 22px; }
    :root #root .ops-app.ops-workspace .ops-page-heading > div:first-child { flex-basis: auto; }
    :root #root .ops-app.ops-workspace .ops-heading-actions { align-self: stretch; }
    :root #root .ops-app.ops-workspace .production-stats-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); flex-basis: 100%; }
    :root #root .ops-app.ops-workspace :is(.weighings-panel-heading, .weighings-toolbar, .weighings-footer) { padding-inline: 16px; }
    :root #root .ops-app.ops-workspace .weighings-toolbar .ops-search { flex-basis: 100%; max-width: none; }
    :root #root .ops-app.ops-workspace .weighings-date-filter { max-width: 100%; }
    :root #root .ops-app.ops-workspace .erp-filters > label { flex: 1 1 140px; }
    :root #root .ops-app.ops-workspace :is(.erp-filters, .erp-toolbar) input { width: 100%; }
    :root #root .ops-app.ops-workspace .almox-stock-filters > .ops-search { flex-basis: 100%; }
    :root #root .ops-app.ops-workspace .almox-select-label { flex: 1 1 120px; }
    .workforce-view-toolbar > strong { flex-basis: 100%; }
    .workforce-view-toolbar label { flex: 1 1 120px; min-width: 0; }
    .workspace-monitor-filters label { flex: 1 1 180px; min-width: 0; }
    .workspace-monitor-count { flex-basis: 100%; }
  }
  @media (max-width: 680px) {
    :root #root .ops-app .ops-primary-nav :is(.ops-nav-item, .ops-operations-trigger) { min-height: 40px; padding-inline: 10px; gap: 6px; font-size: 12px; }
    :root #root .ops-app .ops-menu-search-field input { font-size: 16px; }
    :root #root .ops-app .ops-menu-search-field { height: 44px; }
    :root #root .ops-app.ops-workspace :is(input:not([type='checkbox']):not([type='radio']), select, textarea) { font-size: 16px; min-height: 44px; }
    :root #root .ops-app.ops-workspace :is(.weighings-dashboard, .production-timeline-metrics, .dosage-metrics, .erp-metrics) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    :root #root .ops-app.ops-workspace :is(.weighings-dashboard, .dosage-metrics, .erp-metrics) > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    :root #root .ops-app.ops-workspace .dosage-metrics > .ops-metric-card:first-child { grid-column: 1 / -1; }
    :root #root .ops-app.ops-workspace .dosage-metrics > .ops-metric-card:last-child { grid-column: auto; }
    :root #root .ops-app.ops-workspace .ops-metric-card { padding: 16px; min-height: 128px; }
    :root #root .ops-app.ops-workspace .ops-metric-value { font-size: clamp(22px, 6vw, 28px); }
    :root #root .ops-app.ops-workspace .ops-metric-top { gap: 6px; font-size: 12px; }
    :root #root .ops-app.ops-workspace .ops-metric-icon { width: 28px; height: 28px; }
    :root #root .ops-app.ops-workspace :is(.weighings-table, .almox-table) td { padding: 10px 12px; row-gap: 0; }
    :root #root .ops-app.ops-workspace :is(.weighings-table, .almox-table) td::before { font-size: 12px; }
    :root #root .ops-app.ops-workspace .almox-branches { flex-wrap: wrap; overflow: visible; }
    :root #root .ops-app.ops-workspace .almox-branches button { flex: 1 1 100px; padding-inline: 10px; }
    :root #root .ops-app.ops-workspace .production-stats-filter { padding: 16px; }
    :root #root .ops-app.ops-workspace .production-material-consumption-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    :root #root .ops-app.ops-workspace .production-stats-filter-actions { flex: 1 1 100%; }
    :root #root .ops-app.ops-workspace .production-stats-filter-actions > button { flex: 1; }
    :root #root .ops-app.ops-workspace .workforce-calendar-day { min-height: 42px; }
    :root #root .ops-app.ops-workspace .workforce-summary-metrics { gap: 8px; }
    :root #root .ops-app.ops-workspace .workforce-summary-metrics article { padding: 10px; }
    :root #root .ops-app.ops-workspace .workforce-summary-metrics article > small { display: none; }
    :root #root .ops-app.ops-workspace .workforce-user-picker > div { grid-template-columns: minmax(0, 1fr); }
    :root #root .ops-app.ops-workspace .workforce-panel { padding: 16px; }
    :root #root .ops-app .home-factory-list { gap: 14px; }
    :root #root .ops-app .home-production-trend-heading h2 { font-size: 16px; }
  }
  @media (prefers-reduced-motion: reduce) {
    :root #root .ops-app.ops-workspace :is(.ops-button, .ops-metric-card) { transition: none; }
    :root #root .ops-app.ops-workspace .production-live-indicator { animation: none; }
  }
}

@keyframes workspace-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

@media screen {
  :root #root .ops-app .home-production-page { padding-top: 20px; padding-bottom: 20px; }
  :root #root .ops-app .home-production-heading { margin-bottom: 14px; }
  :root #root .ops-app .home-production-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
  :root #root .ops-app .home-weekly-trend-toggle { min-height: 34px; padding: 7px 12px; font-size: 12px; }
  :root #root .ops-app .home-production-heading h1 { margin-top: 4px; font-size: clamp(26px, 2.4vw, 32px); }
  :root #root .ops-app .home-production-content { align-items: start; row-gap: 14px; padding-top: 4px; padding-bottom: 4px; }
  :root #root .ops-app .home-brazil-map-wrap { align-self: start; padding-top: 0; padding-bottom: 0; }
  :root #root .ops-app .home-map-callout-title { font-size: 11px; }
  :root #root .ops-app .home-map-callout-date { font-size: 10px; }
  :root #root .ops-app .home-map-callout-value { font-size: 14px; }
  :root #root .ops-app .home-map-callout-share { font-size: 10px; }

  @media (min-width: 960px) {
    :root #root .ops-app .home-production-heading > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 2px 20px; }
    :root #root .ops-app .home-production-heading .ops-overline { grid-column: 1 / -1; }
    :root #root .ops-app .home-production-heading h1 { margin: 2px 0 0; }
    :root #root .ops-app .home-production-panel-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
    :root #root .ops-app .home-production-panel-heading h2 { margin: 0; }
    :root #root .ops-app .home-production-content { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); column-gap: 24px; }
    :root #root .ops-app .home-brazil-map-wrap { grid-column: 1; grid-row: 1; width: min(100%, 440px, calc(84dvh - 286px)); }
    :root #root .ops-app .home-production-trend { grid-column: 2; grid-row: 1; align-self: start; padding: 16px 18px; }
    :root #root .ops-app .home-factory-list { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 12px; }
    :root #root .ops-app .home-factory-card { padding: 12px 14px 10px; }
    :root #root .ops-app .home-factory-total-card { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 12px 14px 10px; gap: 6px 12px; }
    :root #root .ops-app .home-factory-total-card > strong { font-size: 24px; }
    :root #root .ops-app .home-production-content:not(.has-weekly-trend) .home-factory-list { grid-column: 2; grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    :root #root .ops-app .home-production-content:not(.has-weekly-trend) .home-brazil-map-wrap { width: min(100%, 590px, calc(84dvh - 210px)); }
  }
  @media (min-width: 960px) and (max-height: 900px) {
    :root #root .ops-app .home-production-page { padding-top: 12px; padding-bottom: 12px; }
    :root #root .ops-app .home-production-heading { margin-bottom: 10px; }
    :root #root .ops-app .home-production-content { row-gap: 10px; }
    :root #root .ops-app .home-brazil-map-wrap { width: min(100%, 440px, calc(84dvh - 336px)); }
    :root #root .ops-app .home-chart3d-stage { height: 190px; }
    :root #root .ops-app .home-production-trend-heading p { margin-bottom: 8px; }
  }
  @media (min-width: 560px) and (max-width: 959px) {
    :root #root .ops-app .home-brazil-map-wrap { width: min(100%, 450px); }
  }
}
