.sync-error-dot {
  background: #d46262;
  box-shadow: 0 0 0 4px #f8e3e3;
}

/* 2026.08.30 unified responsive UI */
:root {
  --ui-surface: #ffffff;
  --ui-soft: #edf5f7;
  --ui-soft-strong: #e4f0f3;
  --ui-line: #d4e1e6;
  --ui-primary: #123e56;
  --ui-accent: #1685a4;
  --ui-muted: #687f8a;
  --ui-shadow: 0 8px 24px rgba(25, 54, 69, .07);
}

html { font-size: 16px; }
body { color: var(--ink); font-size: 16px; }
.sidebar { width: 220px; padding: 22px 14px; }
.app-shell { margin-left: 220px; }
.brand { padding: 0 7px; }
.brand strong { font-size: 17px; }
.brand small,.user-line small,.topbar small { font-size: 12px; }
.side-nav { gap: 3px; margin-top: 25px; }
.nav-link { min-height: 44px; padding: 9px 11px; font-size: 14px; }
.nav-link .it-label { font-size: 11px; }
.topbar { height: 68px; padding: 0 24px; }
.topbar strong { font-size: 16px; }
.content { max-width: 1600px; padding: 24px 26px 54px; }
.page-heading { margin-bottom: 18px; }
.page-heading h1 { margin: 4px 0 6px; font-size: 30px; }
.page-heading p { font-size: 14px; }
.eyebrow { font-size: 12px; }
.heading-count strong { font-size: 30px; }
.heading-count span { font-size: 13px; }
.it-label { font-size: 11px; line-height: 1.2; }
.it-inline { font-size: 12px; }

.metric-grid { gap: 12px; margin-bottom: 14px; }
.metric-card { min-height: 126px; padding: 17px; border-color: var(--ui-line); border-radius: 16px; box-shadow: var(--ui-shadow); }
.metric-card span { font-size: 14px; }
.metric-card strong { margin: 8px 0 2px; font-size: 34px; }
.metric-card small { font-size: 12px; }
.dashboard-grid { gap: 14px; }
.panel,.data-panel { border-color: var(--ui-line); border-radius: 16px; box-shadow: var(--ui-shadow); }
.panel { padding: 17px; }
.panel-head { padding-bottom: 11px; }
.panel-head h2 { font-size: 20px; }
.panel-head > a { min-height: 40px; padding: 8px 4px; font-size: 13px; }
.compact-row { padding: 12px 2px; }
.compact-main small,.compact-quantity small,.mini-list span small { font-size: 12px; }

.status-quickbar { gap: 7px; margin-bottom: 10px; }
.status-quickbar button { min-height: 40px; padding: 7px 12px; border-radius: 10px; font-size: 14px; }
.status-quickbar button small { margin-left: 3px; font-size: 11px; }
.filter-bar { grid-template-columns: minmax(260px,2fr) repeat(3,minmax(130px,1fr)) auto auto; gap: 9px; padding: 11px; border-color: var(--ui-line); border-radius: 14px; background: var(--ui-soft); }
.filter-bar label > span { font-size: 12px; }
.filter-bar input,.filter-bar select { height: 44px; font-size: 15px; }
.secondary-button,.primary-button { min-height: 42px; }
.data-table { font-size: 14px; }
.data-table th { padding: 11px 12px; font-size: 12px; }
.data-table td { padding: 12px; }
.status-pill { padding: 5px 9px; font-size: 12px; }
.cell-sub { font-size: 12px; }
.feedback-button,.record-actions .label-print-button,.text-button { min-height: 36px; font-size: 12px; }

.feedback-dialog { border-radius: 22px; }
.feedback-dialog form,.feedback-dialog > section { padding: 20px; }
.dialog-head h2 { font-size: 24px; }
.dialog-head p { font-size: 15px; }
.dialog-head .eyebrow { font-size: 12px; }
.icon-button { width: 44px; height: 44px; flex: 0 0 44px; }
.feedback-dialog label { font-size: 14px; }
.feedback-dialog label small,.field-help-action,.dialog-note { font-size: 12px; }
.history-shortcut { min-height: 40px; padding: 6px 11px; font-size: 13px; }
.history-shortcut small { font-size: 11px; }
.field-help-action .inline-reset { min-height: 30px; font-size: 12px !important; }
.label-product-summary small { font-size: 12px; }
.label-product-summary span { font-size: 13px; }
.optional-entry summary,.optional-entry > label,.correction-reason { font-size: 13px; }
.dialog-note { line-height: 1.45; }

.work-order-card-actions { display: grid; grid-template-columns: .9fr 1.5fr; gap: 8px; margin-top: 9px; }
.work-order-card-actions.single-action { grid-template-columns: 1fr; }
.work-order-card-actions .label-print-button,.work-order-card-actions .card-action { width: 100%; min-height: 48px; margin: 0; border-radius: 11px; font-size: 14px; }
.work-order-card-actions .label-print-button small,.work-order-card-actions .card-action small { margin-top: 2px; font-size: 11px; }

@media (max-width: 1050px) and (min-width: 761px) {
  .sidebar { width: 200px; }
  .app-shell { margin-left: 200px; }
  .content { padding-inline: 20px; }
  .filter-bar { grid-template-columns: minmax(220px,1.5fr) 1fr 1fr auto auto; }
}

@media (max-width: 760px) {
  body { padding-bottom: 72px; font-size: 16px; }
  .app-shell { margin-left: 0; }
  .topbar { height: 64px; padding: 0 14px; }
  .topbar strong { font-size: 16px; }
  .topbar small { max-width: 245px; font-size: 12px; }
  .mobile-avatar { width: 42px; height: 42px; }
  .content { padding: 14px 12px 26px; }
  .page-heading { align-items: flex-end; gap: 10px; margin-bottom: 9px; }
  .page-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.025em; }
  .heading-count strong { font-size: 27px; }
  .heading-count span { font-size: 12px; }
  .eyebrow { font-size: 12px; }
  .it-label { font-size: 11px; }
  .it-inline { font-size: 12px; }

  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { min-height: 108px; padding: 13px; }
  .metric-card span { font-size: 14px; }
  .metric-card strong { margin: 5px 0 0; font-size: 28px; }
  .metric-card small { font-size: 12px; }
  .panel { padding: 14px; }
  .panel-head h2 { font-size: 19px; }
  .compact-row { grid-template-columns: 48px minmax(0,1fr) auto; gap: 8px; padding: 11px 0; }
  .compact-main strong { font-size: 15px; }
  .compact-main small { font-size: 12px; }

  .status-quickbar { margin: 0 -2px 8px; padding: 0 2px 2px; }
  .status-quickbar button { min-height: 42px; padding: 7px 11px; border-radius: 10px; font-size: 14px; }
  .status-quickbar button small { display: none; }
  .filter-bar { position: static; grid-template-columns: minmax(0,1fr) auto; gap: 7px; margin-bottom: 10px; padding: 8px; border-radius: 13px; }
  .filter-bar .search-field { grid-column: 1 / -1; }
  .filter-bar label:not(.search-field),.filter-bar > button[data-clear-filters] { display: none; }
  .filter-bar input,.filter-bar select { height: 46px; font-size: 16px; }
  .filter-bar .secondary-button,.mobile-sort-button { min-height: 42px; font-size: 14px; }

  .mobile-record-list { gap: 9px; }
  .record-card { padding: 14px; border-color: var(--ui-line); border-radius: 17px; box-shadow: var(--ui-shadow); }
  .record-card h3,.work-order-card h3,.shipping-card h3 { margin: 7px 0 2px; font-size: 22px; }
  .record-paper,.work-order-paper strong { font-size: 14px; }
  .record-top .order-number { font-size: 16px; }
  .status-pill { font-size: 13px; }
  .status-pill small { font-size: 11px; }
  .work-order-paper { margin: 4px 0 8px; }
  .work-order-paper small { font-size: 12px; }
  .work-order-progress { margin-bottom: 7px; border-radius: 12px; }
  .work-order-progress > span { padding: 9px 8px; }
  .work-order-progress small { font-size: 12px; }
  .work-order-progress i { margin-top: 1px; font-size: 11px; }
  .work-order-progress strong { font-size: 16px; }
  .work-order-progress .completed strong { font-size: 20px; }
  .work-order-progress em { font-size: 12px; }
  .work-order-paper-summary { gap: 7px; }
  .work-order-paper-summary > span { padding: 9px; }
  .work-order-paper-summary small { font-size: 12px; }
  .work-order-paper-summary i { font-size: 11px; }
  .work-order-paper-summary strong,.work-order-paper-summary .estimated strong { font-size: 16px; }
  .work-order-meta { gap: 6px 14px; padding: 2px 2px 8px; font-size: 12px; }
  .work-order-tools { align-items: center; }
  .work-order-tools .record-details,.work-order-tools .record-details summary { font-size: 13px; }
  .work-order-tool-actions { flex-wrap: wrap; gap: 4px; padding-left: 5px; }
  .work-order-tool-actions .history-row-button { min-height: 40px; padding: 4px 5px; font-size: 12px; }
  .history-row-button { min-height: 42px; font-size: 13px; }
  .compact-metrics small { font-size: 12px; }
  .compact-metrics i { font-size: 11px; }
  .compact-metrics strong { font-size: 17px; }
  .generic-card-grid small,.generic-card-details small { font-size: 12px; }
  .generic-card-grid strong,.generic-card-details strong { font-size: 15px; }

  .mobile-nav { height: 72px; padding: 6px 4px max(7px,env(safe-area-inset-bottom)); }
  .mobile-nav a,.mobile-nav button { min-width: 0; min-height: 52px; flex: 1; font-size: 13px; }
  .mobile-nav .it-label { font-size: 10px; }
  .mobile-nav-dot { width: 8px; height: 8px; }
  .mobile-more-links a { min-height: 52px; font-size: 15px; }
  .mobile-more-links .it-label { font-size: 12px; }
  .logout-button { min-height: 48px; font-size: 15px; }

  .feedback-dialog,.compact-entry-dialog,.label-print-dialog { width: calc(100% - 10px); max-height: calc(100dvh - 10px); margin: auto auto max(5px,env(safe-area-inset-bottom)); border-radius: 22px; }
  .feedback-dialog form,.feedback-dialog > section,.compact-entry-dialog form,.label-print-dialog form { padding: 15px; }
  .dialog-head h2,.compact-entry-dialog .dialog-head h2,.label-print-dialog .dialog-head h2 { margin: 3px 0; font-size: 23px; white-space: normal; }
  .dialog-head p { font-size: 15px; }
  .dialog-head .eyebrow { display: block; font-size: 12px; }
  .history-shortcut { min-height: 40px; font-size: 13px; }
  .history-shortcut small { font-size: 11px; }
  .compact-entry-dialog .production-form-grid { gap: 14px; margin: 10px 0 8px; }
  .compact-entry-dialog .production-form-grid > label > small { min-height: 38px; font-size: 12px; }
  .compact-entry-dialog .production-form-grid input,.label-form-grid input { height: 48px; font-size: 16px; }
  .field-help-action { gap: 5px; }
  .field-help-action .inline-reset { min-height: 32px; font-size: 12px !important; }
  .calculation-card span,.calculation-card small { font-size: 13px; }
  .compact-entry-dialog .calculation-card strong { font-size: 28px; }
  .optional-entry summary { min-height: 46px; padding: 12px; font-size: 14px; }
  .compact-entry-dialog .dialog-note { padding: 9px; font-size: 12px; }
  .compact-entry-dialog .dialog-actions button { min-height: 48px; font-size: 15px; }
  .label-product-summary { padding: 11px 12px; }
  .label-product-summary small { font-size: 12px; }
  .label-product-summary strong { font-size: 21px; }
  .label-product-summary span { font-size: 12px; }
  .label-form-grid { column-gap: 14px; row-gap: 12px; }
  .label-form-grid label { font-size: 14px; }
  .label-form-grid label > small { min-height: 38px; font-size: 12px; }
  .label-total-card strong { font-size: 27px; }
}

/* Final 2026.08.30 cascade: keep the approved prototype scale above legacy rules. */
@media (min-width: 761px) {
  .sidebar { width: 220px; padding: 22px 14px; }
  .app-shell { margin-left: 220px; }
  .topbar { height: 68px; padding-inline: 24px; }
  .content { max-width: 1600px; padding: 24px 26px 54px; }
  .page-heading h1 { font-size: 30px; }
  .filter-bar { gap: 9px; padding: 11px; }
  .filter-bar input,.filter-bar select { height: 44px; font-size: 15px; }
  .data-table { font-size: 14px; }
  .data-table th { padding: 11px 12px; font-size: 12px; }
  .data-table td { padding: 12px; }
  .compact-entry-dialog { width: min(800px,calc(100% - 32px)); }
}

@media (max-width: 760px) {
  body { padding-bottom: 72px; font-size: 16px; }
  .topbar { height: 64px; padding-inline: 14px; }
  .topbar strong { font-size: 16px; }
  .topbar small { font-size: 12px; }
  .content { padding: 14px 12px 26px; }
  .page-heading { margin-bottom: 9px; }
  .page-heading h1 { font-size: 27px; }
  .heading-count strong { font-size: 27px; }
  .heading-count span,.eyebrow,.it-inline { font-size: 12px; }
  .it-label { font-size: 11px; }

  .status-quickbar button { min-height: 42px; padding: 7px 11px; font-size: 14px; }
  .status-quickbar button small { display: none; }
  .filter-bar { grid-template-columns: minmax(0,1fr) auto; gap: 7px; padding: 8px; }
  .filter-bar .search-field { grid-column: 1/-1; }
  .filter-bar label:not(.search-field),.filter-bar > button[data-clear-filters] { display: none; }
  .filter-bar input,.filter-bar select { height: 46px; font-size: 16px; }
  .filter-bar .secondary-button,.mobile-sort-button { min-height: 42px; font-size: 14px; }

  .mobile-record-list { gap: 9px; }
  .record-card,.work-order-card,.shipping-card { padding: 14px; border-radius: 17px; }
  .record-card h3,.work-order-card h3,.shipping-card h3 { margin: 7px 0 2px; font-size: 22px; }
  .record-top .order-number { font-size: 16px; }
  .status-pill { font-size: 13px; }
  .status-pill small { font-size: 11px; }
  .work-order-paper small { font-size: 12px; }
  .work-order-paper strong { font-size: 14px; }
  .work-order-progress > span { padding: 9px 8px; }
  .work-order-progress small,.work-order-paper-summary small { font-size: 12px; }
  .work-order-progress i,.work-order-paper-summary i { font-size: 11px; }
  .work-order-progress strong { font-size: 16px; }
  .work-order-progress .completed strong { font-size: 20px; }
  .work-order-progress em { font-size: 12px; }
  .work-order-paper-summary > span { padding: 9px; }
  .work-order-paper-summary strong,.work-order-paper-summary .estimated strong { font-size: 16px; }
  .work-order-meta { font-size: 12px; }
  .work-order-tools .record-details,.work-order-tools .record-details summary { font-size: 13px; }
  .work-order-tool-actions .history-row-button { min-height: 40px; font-size: 12px; }
  .work-order-card-actions { grid-template-columns: .9fr 1.5fr; gap: 8px; }
  .work-order-card-actions.single-action { grid-template-columns: 1fr; }
  .work-order-card-actions .label-print-button,.work-order-card-actions .card-action { min-height: 48px; margin: 0; font-size: 14px; }
  .work-order-card-actions .label-print-button small,.work-order-card-actions .card-action small { font-size: 11px; }
  .compact-metrics small,.generic-card-grid small,.generic-card-details small { font-size: 12px; }
  .compact-metrics i { font-size: 11px; }
  .compact-metrics strong,.generic-card-grid strong,.generic-card-details strong { font-size: 16px; }

  .mobile-nav { height: 72px; }
  .mobile-nav a,.mobile-nav button { min-height: 52px; font-size: 13px; }
  .mobile-nav .it-label { font-size: 10px; }
  .mobile-more-links a,.logout-button { min-height: 48px; font-size: 15px; }

  .feedback-dialog,.compact-entry-dialog,.label-print-dialog { width: calc(100% - 10px); max-height: calc(100dvh - 10px); border-radius: 22px; }
  .feedback-dialog form,.feedback-dialog > section,.compact-entry-dialog form,.label-print-dialog form { padding: 15px; }
  .dialog-head h2,.compact-entry-dialog .dialog-head h2,.label-print-dialog .dialog-head h2 { font-size: 23px; white-space: normal; }
  .dialog-head p { font-size: 15px; }
  .dialog-head .eyebrow { font-size: 12px; }
  .history-shortcut { min-height: 40px; font-size: 13px; }
  .history-shortcut small { font-size: 11px; }
  .compact-entry-dialog .production-form-grid { gap: 14px; }
  .compact-entry-dialog .production-form-grid > label > small,.label-form-grid label > small { min-height: 38px; font-size: 12px; }
  .compact-entry-dialog .production-form-grid input,.label-form-grid input { height: 48px; font-size: 16px; }
  .field-help-action .inline-reset { min-height: 32px; font-size: 12px !important; }
  .calculation-card span,.calculation-card small { font-size: 13px; }
  .compact-entry-dialog .calculation-card strong { font-size: 28px; }
  .optional-entry summary { min-height: 46px; padding: 12px; font-size: 14px; }
  .compact-entry-dialog .dialog-note { padding: 9px; font-size: 12px; }
  .compact-entry-dialog .dialog-actions button { min-height: 48px; font-size: 15px; }
  .label-product-summary small { font-size: 12px; }
  .label-product-summary strong { font-size: 21px; }
  .label-product-summary span { font-size: 12px; }
  .label-form-grid label { font-size: 14px; }
  .label-total-card strong { font-size: 27px; }
}

.it-label {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.05;
  opacity: .68;
}

.it-inline {
  color: var(--muted);
  font-size: .78em;
  font-weight: 500;
}

.bi-button {
  display: inline-grid;
  place-items: center;
  gap: 1px;
  line-height: 1.1;
}

.bi-button small {
  font-size: 9px;
  font-weight: 600;
  opacity: .75;
}

.status-pill small {
  display: block;
  margin-top: 1px;
  font-size: 8px;
  font-weight: 600;
  opacity: .72;
}

.hero-metric small i,
.record-stats small i,
.generic-card-grid small i,
.generic-card-details small i {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
  opacity: .7;
}

.unified-filter {
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(130px, 1fr)) auto auto;
}

.advanced-filter-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 14px;
  margin: -4px 0 14px;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.advanced-filter-panel[hidden] {
  display: none;
}

.advanced-filter-panel label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}

.advanced-filter-panel input,
.advanced-filter-panel select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  background: #fff;
  border: 1px solid #cfdee4;
  border-radius: 9px;
  outline: none;
}

.advanced-filter-panel input:focus,
.advanced-filter-panel select:focus {
  border-color: #4f9db5;
  box-shadow: 0 0 0 3px rgba(79, 157, 181, .13);
}

.form-grid.single-field {
  grid-template-columns: 1fr;
}

.shipping-stats {
  grid-template-columns: repeat(4, 1fr);
}

.field-remark {
  color: var(--ink-2);
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .unified-filter {
    grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(130px, 1fr)) auto auto;
  }
}

@media (max-width: 760px) {
  body { padding-bottom: 78px; }
  .unified-filter {
    grid-template-columns: 1fr 1fr auto auto;
  }

  .advanced-filter-panel {
    position: fixed;
    z-index: 29;
    right: 8px;
    bottom: 74px;
    left: 8px;
    max-height: 64vh;
    margin: 0;
    overflow-y: auto;
    grid-template-columns: 1fr;
    border-radius: 17px;
    box-shadow: 0 22px 60px rgba(13, 37, 51, .24);
  }

  .shipping-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 761px) {
  .filter-bar[data-filter-panel] {
    grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(130px, 1fr)) auto auto;
  }
}

/* Factory-first mobile hierarchy and pallet entry workflow. */
.hero-metric {
  display: grid;
  gap: 3px;
  margin: 14px 0 10px;
  padding: 14px;
  border: 1px solid #d4e6eb;
  border-radius: 13px;
  background: linear-gradient(135deg, #eef8f9, #f8fbfc);
}

.hero-metric small,
.hero-metric span {
  color: var(--muted);
  font-size: 11px;
}

.hero-metric strong {
  color: var(--nav);
  font-size: 28px;
  line-height: 1.1;
}

.hero-metric strong em {
  font-size: 12px;
  font-style: normal;
}

.record-stats.two-column {
  grid-template-columns: 1fr 1fr;
}

.production-history {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.production-history > summary,
.generic-card-details > summary {
  padding: 11px 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.history-list {
  display: grid;
  gap: 8px;
  padding: 0 9px 9px;
}

.history-list article {
  padding: 10px;
  border-radius: 9px;
  background: #f3f7f8;
}

.history-list article > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.history-list article span,
.history-list article p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 11px;
}

.history-dialog {
  width: min(620px, calc(100% - 24px));
}

.history-dialog > section {
  padding: 22px;
  max-height: min(760px, calc(100vh - 28px));
  overflow-y: auto;
}

.history-dialog .history-list {
  margin-top: 18px;
  padding: 0;
}

.history-record-head b {
  color: var(--blue);
}

.history-audit {
  color: var(--muted) !important;
}

.history-open-button {
  white-space: nowrap;
}

.text-button,
.inline-reset {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.record-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.important-number {
  color: var(--blue);
  font-weight: 900;
}

.production-dialog form {
  max-height: min(820px, calc(100vh - 28px));
  overflow-y: auto;
}

.production-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 12px;
}

.production-form-grid label,
.paper-used-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.production-form-grid input,
.paper-used-field input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid #c8d9df;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.production-form-grid label > small,
.paper-used-field small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
}

.stepper input {
  border-radius: 0;
  text-align: center;
}

.stepper button {
  border: 1px solid #c8d9df;
  color: var(--nav);
  background: #eef5f7;
  font-size: 20px;
  font-weight: 800;
}

.stepper button:first-child { border-radius: 10px 0 0 10px; }
.stepper button:last-child { border-radius: 0 10px 10px 0; }

.calculation-card {
  display: grid;
  gap: 2px;
  margin: 12px 0;
  padding: 14px;
  border-radius: 13px;
  color: #fff;
  background: var(--nav);
}

.calculation-card span,
.calculation-card small,
.calculation-card em {
  color: #c7dce6;
  font-size: 11px;
  font-style: normal;
}

.calculation-card strong {
  font-size: 28px;
}

.shipping-pallet-grid {
  grid-template-columns: 1fr 1fr 1fr;
}

.mobile-menu-dialog,
.sort-dialog {
  width: min(520px, 100%);
  max-width: none;
  margin: auto 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 60px rgba(10, 31, 43, .25);
}

.mobile-menu-dialog::backdrop,
.sort-dialog::backdrop {
  background: rgba(10, 31, 43, .46);
  backdrop-filter: blur(2px);
}

body:has(dialog[open]) { overflow: hidden; }

.mobile-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.mobile-sheet-head h3 { margin: 3px 0 0; }

.account-summary {
  display: flex;
  align-items: center;
  gap: 11px;
}

.account-summary strong,
.account-summary small { display: block; }
.account-summary small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.mobile-more-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 18px;
}

.mobile-more-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  color: var(--ink);
  background: #f2f6f7;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.mobile-more-links a.active { color: var(--blue); background: #e5f3f6; }

.mobile-account-actions {
  display: grid;
  gap: 12px;
  padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.mobile-account-actions > div { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.logout-button { width: 100%; height: 46px; border: 1px solid #ebc8c5; border-radius: 11px; color: #a3332a; background: #fff5f4; font-weight: 800; }

.sort-options {
  display: grid;
  max-height: 62vh;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.sort-options button {
  padding: 13px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  text-align: left;
  font-size: 14px;
}

.generic-card-details { margin-top: 8px; border-top: 1px solid var(--line); }
.generic-card-details > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 10px 10px; }
.generic-card-details span { display: grid; gap: 2px; padding: 8px; border-radius: 8px; background: #f3f7f8; }
.generic-card-details small { color: var(--muted); font-size: 10px; }
.generic-card-details strong { overflow-wrap: anywhere; font-size: 12px; }

@media (max-width: 760px) {
  .topbar { box-shadow: 0 1px 0 var(--line); }
  .page-heading { gap: 12px; margin-bottom: 16px; }
  .page-heading h1 { line-height: 1.12; }
  .page-heading p { line-height: 1.5; }
  .heading-count { min-width: 64px; }

  .filter-bar,
  .unified-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 10px;
    border-radius: 15px;
  }

  .filter-bar .search-field,
  .unified-filter .search-field {
    grid-column: 1 / -1;
  }

  .filter-bar .search-field input { height: 46px; }
  .filter-bar > [data-clear-filters] { display: none; }
  .filter-bar > .stock-toggle { min-width: 0; padding: 0 9px; }
  .filter-bar > [data-toggle-advanced],
  .mobile-sort-button { min-width: 66px; padding: 0 11px; white-space: nowrap; }

  .advanced-filter-panel.mobile-filter-sheet {
    position: fixed;
    z-index: 70;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 78vh;
    margin: 0;
    padding: 0 16px calc(14px + env(safe-area-inset-bottom));
    overflow-y: auto;
    border-radius: 22px 22px 0 0;
    background: #fff;
  }

  .advanced-filter-panel.mobile-filter-sheet[hidden] { display: none !important; }
  body.filter-sheet-open::before { content: ''; position: fixed; z-index: 65; inset: 0; background: rgba(10, 31, 43, .46); }

  .filter-sheet-head {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -16px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

  .filter-sheet-head h3 { margin: 2px 0 0; }
  .filter-sheet-actions { position: sticky; bottom: -1px; display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin: 4px -16px -14px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }

  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
    min-height: 72px;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }

  .mobile-nav a,
  .mobile-nav button {
    display: grid;
    place-items: center;
    gap: 3px;
    min-width: 0;
    padding: 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
  }

  .mobile-nav .it-label { font-size: 7px; }

  .mobile-nav a.active,
  .mobile-nav button.active { color: var(--blue); }
  .mobile-nav-more { height: 11px; line-height: 7px; font-size: 13px; letter-spacing: 1px; }

  .generic-card-grid > span:nth-child(n+6) { display: none; }
  .generic-card-grid > span:first-child { grid-column: 1 / -1; }
  .generic-card-grid > span:first-child strong { color: var(--nav); font-size: 18px; }
  .generic-card-grid > .priority-value { grid-column: 1 / -1; display: grid; }
  .generic-card-grid > .priority-value strong { color: var(--blue); font-size: 26px; }

  .feedback-dialog { width: 100%; max-height: 96vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .feedback-dialog form { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .production-form-grid,
  .shipping-pallet-grid { grid-template-columns: 1fr; gap: 11px; }
  .production-form-grid input,
  .paper-used-field input { height: 48px; font-size: 16px; }
  .calculation-card strong { font-size: 31px; }
  .dialog-actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); margin: 14px -16px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
}

.secondary-admin-link {
  margin-top: -10px;
  color: #91aab8;
  font-size: 11px;
}

.account-panel {
  padding: 0 20px;
}

.account-list-head,
.account-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(120px, .6fr) minmax(210px, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.account-list-head {
  padding: 14px 8px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
}

.account-row {
  min-height: 78px;
  padding: 12px 8px;
  border-bottom: 1px solid #e7eef1;
}

.account-row:last-child {
  border-bottom: 0;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-identity strong,
.account-identity small {
  display: block;
}

.account-identity small {
  margin-top: 3px;
  color: var(--muted);
}

.management-form {
  margin-bottom: 18px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.management-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
}

.management-form-grid label:not(.check-field) {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}

.management-form-grid input[type="text"],
.management-form-grid input[type="password"] {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ccdae1;
  border-radius: 10px;
  outline: none;
}

.management-form-grid small {
  color: var(--muted);
  font-weight: 400;
}

.check-field,
.switch-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.check-field {
  align-self: end;
  min-height: 42px;
}

.check-field input,
.switch-check input,
.column-check-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.management-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
}

.permission-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.permission-toolbar h2 {
  margin: 4px 0 0;
}

.permission-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}

.permission-toolbar select {
  min-width: 180px;
  height: 40px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #c8d8df;
  border-radius: 9px;
}

.permission-help {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 11px;
}

.permission-table-head,
.permission-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 120px 140px minmax(260px, 2fr);
  gap: 16px;
  align-items: center;
}

.permission-table-head {
  padding: 11px 12px;
  background: #edf4f6;
  color: var(--ink-2);
  border-radius: 10px 10px 0 0;
  font-size: 11px;
  font-weight: 800;
}

.permission-row {
  min-height: 70px;
  padding: 12px;
  border-bottom: 1px solid #e3ecef;
  transition: opacity .18s, background .18s;
}

.permission-row > div:first-child strong,
.permission-row > div:first-child small {
  display: block;
}

.permission-row > div:first-child small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.permission-row.permission-disabled {
  background: #fafcfc;
  opacity: .58;
}

.column-permission summary {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.column-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 12px;
  margin-top: 8px;
  background: #f5f9fa;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.column-check-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
}

.column-check-grid label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-check-grid em {
  color: var(--red);
  font-size: 9px;
  font-style: normal;
}

.column-check-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
}

.column-check-actions button {
  padding: 4px 8px;
  color: var(--blue);
  background: #fff;
  border: 1px solid #bfd3db;
  border-radius: 7px;
  font-size: 10px;
}

.sticky-save {
  position: sticky;
  z-index: 8;
  bottom: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(21, 52, 70, .14);
  backdrop-filter: blur(10px);
}

.errorlist {
  padding: 0;
  margin: 3px 0 0;
  color: var(--red);
  list-style: none;
  font-size: 11px;
}

@media (max-width: 900px) {
  .management-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .permission-table-head {
    display: none;
  }

  .permission-row {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .permission-row > div:last-child {
    grid-column: 1 / -1;
  }

  .account-list-head {
    display: none;
  }

  .account-row {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 560px) {
  .management-form-grid,
  .account-row {
    grid-template-columns: 1fr;
  }

  .permission-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .permission-toolbar select {
    width: 100%;
  }

  .column-check-grid {
    grid-template-columns: 1fr;
  }

  .permission-row {
    grid-template-columns: 1fr 1fr;
  }

  .sticky-save .primary-button {
    flex: 1;
  }
}

/* Long data tables keep their headings visible while the list scrolls. */
@media (min-width: 761px) {
  .data-panel > .table-wrap,
  [data-tab-panel] .data-panel > .table-wrap {
    max-height: calc(100vh - 260px);
    overflow: auto;
    scrollbar-gutter: stable;
  }

  .data-table th {
    position: sticky;
    z-index: 4;
    top: 0;
    box-shadow: inset 0 -1px #d8e4e9;
  }

  .data-table[data-freeze-first] th:first-child,
  .data-table[data-freeze-first] td:first-child {
    position: sticky;
    z-index: 3;
    left: 0;
    background: #fff;
    box-shadow: 1px 0 #dce6eb;
  }

  .data-table[data-freeze-first] th:first-child {
    z-index: 6;
    background: #edf4f6;
  }

  .data-table[data-freeze-first] tbody tr:hover td:first-child {
    background: #f8fbfc;
  }
}

.data-table th[data-sort] {
  padding-right: 28px;
  user-select: none;
}

.data-table th[data-sort]::after {
  position: absolute;
  right: 10px;
  content: "↕";
  color: #9ab0bc;
  font-size: 13px;
  font-weight: 900;
}

.data-table th[data-sort][data-direction="asc"],
.data-table th[data-sort][data-direction="desc"] {
  color: var(--blue);
  background: #dceef3;
}

.data-table th[data-sort][data-direction="asc"]::after {
  content: "↑";
  color: var(--blue);
}

.data-table th[data-sort][data-direction="desc"]::after {
  content: "↓";
  color: var(--blue);
}

.data-table th[data-sort]:focus-visible {
  outline: 2px solid #4f9db5;
  outline-offset: -3px;
}

.inventory-column {
  background: #eaf6f8;
  color: #155b72;
  font-weight: 800;
}

th.inventory-column {
  background: #d7edf2;
}

.inventory-column.inventory-zero,
.inventory-mobile.inventory-zero {
  background: #f1f4f5;
  color: #8999a2;
}

.inventory-column.inventory-negative,
.inventory-mobile.inventory-negative {
  background: #fae8e7;
  color: var(--red);
}

.inventory-mobile {
  background: #eaf6f8 !important;
  color: #155b72;
}

.stock-toggle {
  display: flex !important;
  min-height: 42px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  gap: 7px !important;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #c5d7de;
  border-radius: 10px;
}

.stock-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.stock-toggle span {
  display: inline !important;
  color: var(--ink-2) !important;
  font-size: 12px !important;
}

.mobile-sort-field {
  display: none !important;
}

.csrf-panel {
  max-width: 680px;
  margin: 8vh auto 0;
  padding: 34px;
}

.csrf-panel h1 {
  margin: 8px 0;
  font-size: 30px;
}

.csrf-panel p {
  margin: 0 0 24px;
  color: var(--muted);
}

.csrf-panel > div {
  display: flex;
  gap: 10px;
}

button:disabled {
  cursor: wait;
  opacity: .68;
}

/* 2026.08.30 compact factory workflow */
.status-quickbar { display:flex; align-items:center; gap:7px; margin:0 0 12px; overflow-x:auto; scrollbar-width:none; }
.status-quickbar::-webkit-scrollbar { display:none; }
.status-quickbar button { min-height:38px; padding:6px 13px; border:1px solid var(--line); border-radius:999px; color:var(--ink-2); background:#fff; font-weight:800; white-space:nowrap; touch-action:manipulation; }
.status-quickbar button small { margin-left:3px; color:var(--muted); font-size:9px; }
.status-quickbar button.active { border-color:var(--blue); color:#fff; background:var(--blue); }
.status-quickbar button.active small { color:#d7eef4; }
.status-quickbar .save-default-filter { margin-left:auto; color:var(--blue); background:#edf7f9; }
.compact-metrics { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin:10px 0; }
.compact-metrics > span { padding:9px 10px; border-radius:10px; background:#f2f7f8; }
.compact-metrics small,.compact-metrics strong,.compact-metrics i { display:block; }
.compact-metrics small { color:var(--muted); font-size:10px; }
.compact-metrics i { margin-top:1px; font-size:8px; font-style:normal; }
.compact-metrics strong { margin-top:3px; color:var(--nav); font-size:15px; }
.history-row-button { width:100%; min-height:38px; border:0; border-top:1px solid var(--line); color:var(--blue); background:transparent; text-align:left; font-weight:800; touch-action:manipulation; }
.estimated-paper-cell { color:var(--blue); background:#eef8fa; font-weight:900; }
.work-order-paper { min-width:0; margin:5px 0 9px; }
.work-order-paper small,.work-order-paper strong { display:block; }
.work-order-paper small { color:var(--muted); font-size:9px; }
.work-order-paper strong { margin-top:1px; color:var(--ink-2); font-size:12px; line-height:1.3; overflow-wrap:anywhere; }
.work-order-progress { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:hidden; margin:0 0 7px; border:1px solid var(--line); border-radius:11px; }
.work-order-progress > span { min-width:0; padding:8px 9px; background:#f6f9fa; }
.work-order-progress > span + span { border-left:1px solid var(--line); }
.work-order-progress > .completed { background:#e9f6f8; }
.work-order-progress small,.work-order-progress strong,.work-order-progress i { display:block; }
.work-order-progress small { color:var(--muted); font-size:9px; }
.work-order-progress i { margin-top:1px; font-size:7px; font-style:normal; }
.work-order-progress strong { margin-top:3px; color:var(--nav); font-size:14px; white-space:nowrap; }
.work-order-progress .completed strong { color:var(--blue); font-size:17px; }
.work-order-progress em { font-size:9px; font-style:normal; }
.work-order-paper-summary { display:grid; grid-template-columns:1.15fr .85fr; gap:7px; margin-bottom:7px; }
.work-order-paper-summary > span { min-width:0; padding:8px 10px; border-radius:10px; background:#f2f6f7; }
.work-order-paper-summary > .estimated { background:#ddf1f5; }
.work-order-paper-summary small,.work-order-paper-summary strong,.work-order-paper-summary i { display:block; }
.work-order-paper-summary small { color:var(--muted); font-size:9px; }
.work-order-paper-summary i { margin-top:1px; font-size:7px; font-style:normal; }
.work-order-paper-summary strong { margin-top:3px; color:var(--nav); font-size:14px; }
.work-order-paper-summary .estimated strong { color:#126b87; font-size:17px; }
.work-order-meta { display:flex; align-items:center; gap:5px 12px; overflow-x:auto; padding:1px 2px 7px; color:var(--muted); font-size:9px; white-space:nowrap; scrollbar-width:none; }
.work-order-meta::-webkit-scrollbar { display:none; }
.work-order-meta strong { color:var(--ink-2); }
.work-order-tools { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; border-top:1px solid var(--line); }
.work-order-tools .record-details { min-width:0; padding:8px 0 0; border:0; }
.work-order-tools .record-details summary { white-space:nowrap; }
.work-order-tools .history-row-button { width:auto; min-height:34px; padding:8px 0 0 12px; border:0; white-space:nowrap; }
.work-order-tool-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; min-width:0; padding:6px 0 0 10px; }
.work-order-tool-actions .history-row-button { min-height:32px; padding:0 5px; }
.label-print-button { display:inline-grid; place-items:center; min-height:32px; padding:5px 10px; border:1px solid #8db7c5; border-radius:9px; color:var(--blue); background:#f5fbfc; font-size:11px; font-weight:900; line-height:1.05; white-space:nowrap; touch-action:manipulation; }
.label-print-button small { display:block; margin-top:2px; color:var(--muted); font-size:8px; font-weight:700; }
.record-actions .label-print-button { display:inline-flex; min-height:31px; }
.label-product-summary { display:grid; grid-template-columns:1fr auto; gap:2px 12px; margin:15px 0 10px; padding:12px 14px; border-radius:12px; background:#eef6f7; }
.label-product-summary small { grid-column:1/-1; color:var(--muted); font-size:10px; }
.label-product-summary strong { min-width:0; overflow-wrap:anywhere; font-size:21px; }
.label-product-summary span { align-self:center; color:var(--ink-2); font-size:11px; }
.dialog-head-actions { display:flex; flex:none; align-items:flex-start; gap:8px; }
.history-shortcut { min-width:0; min-height:36px; padding:5px 10px; border:1px solid #b9ccd5; border-radius:10px; color:var(--blue); background:#fff; font-size:11px; font-weight:900; line-height:1.05; white-space:nowrap; }
.history-shortcut small { display:block; margin-top:2px; color:var(--muted); font-size:8px; font-weight:700; }
.field-help-action { display:flex !important; align-items:center; justify-content:space-between; gap:6px; min-width:0; }
.field-help-action > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.field-help-action .inline-reset { position:static !important; flex:none; max-width:none !important; padding:0; border:0; color:var(--blue); background:transparent; font-size:10px !important; font-weight:900; line-height:1; white-space:nowrap; }
.field-help-action .inline-reset::before { content:none !important; }
.label-form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.label-form-grid label { position:relative; min-width:0; overflow:hidden; }
.label-form-grid input,.label-form-grid .stepper { min-width:0; width:100%; }
.label-form-grid input { box-sizing:border-box; min-inline-size:0; inline-size:100%; height:46px; border:1px solid #c8d9df; border-radius:10px; padding:0 12px; font-size:16px; }
.label-form-grid .stepper input { border-radius:0; padding:0; }
.label-total-card { grid-template-columns:1fr auto; align-items:center; }
.label-total-card strong { grid-column:2; grid-row:1/3; }
.label-history-list .audit-actions { align-items:center; }
.optional-entry { margin:8px 0; border:1px solid var(--line); border-radius:11px; }
.optional-entry summary { padding:11px 12px; color:var(--nav); font-size:12px; font-weight:800; cursor:pointer; touch-action:manipulation; }
.optional-entry > label { display:grid; gap:6px; padding:0 12px 12px; font-size:12px; font-weight:800; }
.optional-entry input,.optional-entry textarea,.correction-reason input,.audit-actions input { width:100%; border:1px solid #c8d9df; border-radius:9px; font:inherit; }
.optional-entry input,.correction-reason input,.audit-actions input { min-height:44px; padding:0 10px; }
.optional-entry textarea { padding:10px; }
.correction-reason { display:grid; gap:6px; margin:9px 0; color:#9a3d32; font-size:12px; font-weight:800; }
.correction-reason[hidden] { display:none !important; }
.overage-warning { margin-top:5px; padding:6px 8px; border-radius:7px; color:#7a4d00 !important; background:#fff1bd; font-weight:800; }
.audit-actions { display:flex; align-items:center; gap:10px; margin-top:8px; }
.audit-actions form { display:flex; align-items:center; gap:6px; flex:1; }
.audit-actions input { min-width:110px; }
.danger-text-button { border:0; color:#a3332a; background:transparent; font-size:11px; font-weight:800; white-space:nowrap; }
.void-record { opacity:.68; border:1px dashed #c98f89; }
.void-reason { color:#a3332a !important; font-weight:800; }
.data-table thead th { position:sticky; z-index:2; top:0; background:#f7fafb; }
.compact-entry-dialog button,.compact-entry-dialog input,.compact-entry-dialog summary { touch-action:manipulation; }
.compact-entry-dialog input,.compact-entry-dialog textarea { font-size:16px; }
.compact-entry-dialog .production-form-grid { min-width:0; }
.compact-entry-dialog .production-form-grid > label { min-width:0; overflow:hidden; }
.compact-entry-dialog .production-form-grid > label > small { min-height:30px; }
.compact-entry-dialog .production-form-grid input,
.compact-entry-dialog .stepper { box-sizing:border-box; min-width:0; max-width:100%; width:100%; }
.compact-entry-dialog .stepper > input { width:100%; }
.compact-entry-dialog input[type="date"] { min-inline-size:0; inline-size:100%; }
.record-card { max-width:100%; overflow:hidden; touch-action:pan-y; user-select:none; -webkit-user-select:none; }
.record-card input,.record-card textarea { user-select:text; -webkit-user-select:text; }
html { -webkit-text-size-adjust:100%; }

@media (min-width:761px) {
  .compact-entry-dialog { width:min(760px,calc(100% - 32px)); }
  .compact-entry-dialog .production-form-grid { grid-template-columns:repeat(4,minmax(0,1fr)); align-items:end; }
  .compact-entry-dialog .calculation-card { grid-template-columns:1fr auto; align-items:center; }
  .compact-entry-dialog .calculation-card strong { grid-row:1/4; grid-column:2; }
}

@media (max-width: 760px) {
  .page-heading p { display:none; }
  .page-heading { margin-bottom:10px; }
  .page-heading h1 { font-size:27px; }
  .heading-count strong { font-size:28px; }
  .status-quickbar { margin:0 -4px 9px; padding:0 4px; }
  .status-quickbar .save-default-filter { margin-left:0; }
  .work-order-card,.shipping-card { padding:14px; }
  .work-order-card h3,.shipping-card h3 { margin:7px 0 2px; font-size:20px; }
  .work-order-card .card-action { min-height:46px; margin-top:8px; }
  .compact-entry-dialog { width:calc(100% - 12px); max-height:calc(100dvh - 12px); margin:auto; border-radius:20px; overscroll-behavior:contain; }
  .compact-entry-dialog form { max-height:none; overflow:visible; padding:14px; }
  .compact-entry-dialog .dialog-head h2 { margin:3px 0; font-size:22px; }
  .compact-entry-dialog .production-form-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; margin:10px 0 8px; }
  .compact-entry-dialog .production-form-grid label { gap:3px; }
  .compact-entry-dialog .production-form-grid input { height:44px; }
  .compact-entry-dialog .calculation-card { margin:8px 0; padding:11px; }
  .compact-entry-dialog .calculation-card strong { font-size:27px; }
  .compact-entry-dialog .dialog-note { padding:8px; font-size:9px; }
  .compact-entry-dialog .dialog-actions { position:static; margin:9px 0 0; padding:0; border:0; grid-template-columns:1fr 1.5fr; }
  .compact-entry-dialog .dialog-actions button { min-height:46px; }
  .work-order-tool-actions { gap:4px; padding-left:5px; }
  .work-order-tool-actions .history-row-button { font-size:10px; }
  .work-order-tool-actions .label-print-button { padding-inline:8px; }
  .label-print-dialog { width:calc(100% - 12px); max-height:calc(100dvh - 12px); margin:auto; }
  .label-print-dialog form { padding:14px; }
  .label-print-dialog .dialog-head h2 { font-size:21px; white-space:nowrap; }
  .label-print-dialog .dialog-head-actions { gap:6px; }
  .label-print-dialog .history-shortcut { min-height:34px; padding:4px 8px; }
  .label-form-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); column-gap:16px; row-gap:11px; }
  .label-form-grid input[type="date"] { padding-inline:8px; font-size:15px; }
  .label-form-grid label:last-child { grid-column:1/-1; }
  .label-product-summary { margin:10px 0; padding:10px 12px; }
  .label-product-summary strong { font-size:19px; }
  .label-product-summary span { font-size:9px; }
  .label-total-card { margin:9px 0; padding:11px; }
  .label-total-card strong { font-size:25px; }
  .mobile-sort-field {
    display: grid !important;
    grid-column: 1 / -1;
  }

  .stock-toggle {
    min-height: 40px;
  }

  .csrf-panel {
    margin-top: 4vh;
    padding: 24px;
  }

  .csrf-panel > div {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Final mobile readability and layout overrides. Keep this block last. */
@media (min-width: 761px) {
  .sidebar { width: 220px; padding: 22px 14px; }
  .app-shell { margin-left: 220px; }
  .topbar { height: 68px; padding-inline: 24px; }
  .content { max-width: 1600px; padding: 24px 26px 54px; }
  .page-heading h1 { font-size: 30px; }
  .filter-bar input,.filter-bar select { height: 44px; font-size: 15px; }
  .data-table { font-size: 14px; }
  .data-table th { padding: 11px 12px; font-size: 12px; }
  .data-table td { padding: 12px; }
  .compact-entry-dialog { width: min(800px,calc(100% - 32px)); }
}

@media (max-width: 760px) {
  body { padding-bottom: 72px; font-size: 16px; }
  .topbar { height: 64px; padding-inline: 14px; }
  .topbar strong { font-size: 16px; }
  .topbar small { font-size: 12px; }
  .content { padding: 14px 12px 26px; }
  .page-heading { margin-bottom: 9px; }
  .page-heading h1 { font-size: 27px; }
  .heading-count strong { font-size: 27px; }
  .heading-count span,.eyebrow,.it-inline { font-size: 12px; }
  .it-label { font-size: 11px; }
  .status-quickbar button { min-height: 42px; padding: 7px 11px; font-size: 14px; }
  .status-quickbar button small { display: none; }
  .filter-bar { grid-template-columns: minmax(0,1fr) auto; gap: 7px; padding: 8px; }
  .filter-bar .search-field { grid-column: 1/-1; }
  .filter-bar label:not(.search-field),.filter-bar > button[data-clear-filters] { display: none; }
  .filter-bar input,.filter-bar select { height: 46px; font-size: 16px; }
  .filter-bar .secondary-button,.mobile-sort-button { min-height: 42px; font-size: 14px; }
  .mobile-record-list { gap: 9px; }
  .record-card,.work-order-card,.shipping-card { padding: 14px; border-radius: 17px; }
  .record-card h3,.work-order-card h3,.shipping-card h3 { margin: 7px 0 2px; font-size: 22px; }
  .record-top .order-number { font-size: 16px; }
  .status-pill { font-size: 13px; }
  .status-pill small { font-size: 11px; }
  .work-order-paper small { font-size: 12px; }
  .work-order-paper strong { font-size: 14px; }
  .work-order-progress > span { padding: 9px 8px; }
  .work-order-progress small,.work-order-paper-summary small { font-size: 12px; }
  .work-order-progress i,.work-order-paper-summary i { font-size: 11px; }
  .work-order-progress strong { font-size: 16px; }
  .work-order-progress .completed strong { font-size: 20px; }
  .work-order-progress em { font-size: 12px; }
  .work-order-paper-summary > span { padding: 9px; }
  .work-order-paper-summary strong,.work-order-paper-summary .estimated strong { font-size: 16px; }
  .work-order-meta { font-size: 12px; }
  .work-order-tools .record-details,.work-order-tools .record-details summary { font-size: 13px; }
  .work-order-tool-actions .history-row-button { min-height: 40px; font-size: 12px; }
  .work-order-card-actions { grid-template-columns: .9fr 1.5fr; gap: 8px; }
  .work-order-card-actions.single-action { grid-template-columns: 1fr; }
  .work-order-card-actions .label-print-button,.work-order-card-actions .card-action { width: 100%; min-height: 48px; margin: 0; font-size: 14px; }
  .work-order-card-actions .label-print-button small,.work-order-card-actions .card-action small { font-size: 11px; }
  .compact-metrics small,.generic-card-grid small,.generic-card-details small { font-size: 12px; }
  .compact-metrics i { font-size: 11px; }
  .compact-metrics strong,.generic-card-grid strong,.generic-card-details strong { font-size: 16px; }
  .mobile-nav { height: 72px; }
  .mobile-nav a,.mobile-nav button { min-height: 52px; font-size: 13px; }
  .mobile-nav .it-label { font-size: 10px; }
  .mobile-more-links a,.logout-button { min-height: 48px; font-size: 15px; }
  .feedback-dialog,.compact-entry-dialog,.label-print-dialog { width: calc(100% - 10px); max-height: calc(100dvh - 10px); border-radius: 22px; }
  .feedback-dialog form,.feedback-dialog > section,.compact-entry-dialog form,.label-print-dialog form { padding: 15px; }
  .dialog-head h2,.compact-entry-dialog .dialog-head h2,.label-print-dialog .dialog-head h2 { font-size: 23px; white-space: normal; }
  .dialog-head p { font-size: 15px; }
  .dialog-head .eyebrow { font-size: 12px; }
  .history-shortcut { min-height: 40px; font-size: 13px; }
  .history-shortcut small { font-size: 11px; }
  .compact-entry-dialog .production-form-grid { gap: 14px; }
  .compact-entry-dialog .production-form-grid > label > small,.label-form-grid label > small { min-height: 38px; font-size: 12px; }
  .compact-entry-dialog .production-form-grid input,.label-form-grid input { height: 48px; font-size: 16px; }
  .field-help-action .inline-reset { min-height: 32px; font-size: 12px !important; }
  .calculation-card span,.calculation-card small { font-size: 13px; }
  .compact-entry-dialog .calculation-card strong { font-size: 28px; }
  .optional-entry summary { min-height: 46px; padding: 12px; font-size: 14px; }
  .compact-entry-dialog .dialog-note { padding: 9px; font-size: 12px; }
  .compact-entry-dialog .dialog-actions button { min-height: 48px; font-size: 15px; }
  .label-product-summary small { font-size: 12px; }
  .label-product-summary strong { font-size: 21px; }
  .label-product-summary span { font-size: 12px; }
  .label-form-grid label { font-size: 14px; }
  .label-total-card strong { font-size: 27px; }
}


/* UI v2 trial: factory console theme, 2026-08-30.
   Surface: Monitor + Operate. Dense business data first, less decoration, stronger action hierarchy. */
:root {
  --v2-bg: #eef2f4;
  --v2-ink: #16212a;
  --v2-muted: #667785;
  --v2-line: #d6e0e5;
  --v2-navy: #0b2535;
  --v2-accent: #0f8aa6;
  --v2-shadow: 0 18px 45px rgba(15, 37, 51, .10);
}
body {
  background: radial-gradient(circle at top left, rgba(15, 138, 166, .10), transparent 34rem), linear-gradient(180deg, #f7fafb 0, var(--v2-bg) 38rem);
  color: var(--v2-ink);
}
.sidebar {
  width: 236px;
  padding: 18px 12px;
  background: linear-gradient(180deg, var(--v2-navy) 0%, #071822 100%);
  border-right: 1px solid rgba(255,255,255,.08);
}
.app-shell { margin-left: 236px; }
.brand { padding: 10px 10px 16px; border-bottom: 1px solid rgba(255,255,255,.10); }
.brand-mark { background: linear-gradient(135deg, #dcf7fb, #87cddd); color: #082536; box-shadow: inset 0 -8px 16px rgba(8,37,54,.10); }
.brand small { color: #9fc2cf; }
.side-nav { gap: 5px; margin-top: 18px; }
.nav-link { border: 1px solid transparent; border-radius: 14px; color: #bfd3dc; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
.nav-link:hover { background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-link.active { color: #fff; background: linear-gradient(135deg, rgba(15,138,166,.95), rgba(35,93,122,.88)); border-color: rgba(255,255,255,.18); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.nav-link.active .nav-dot { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.sidebar-foot { border-top-color: rgba(255,255,255,.10); }
.admin-link { padding: 9px 10px; margin-bottom: 8px; border-radius: 11px; background: rgba(255,255,255,.06); color: #d5f5fb; }
.user-line { padding: 10px 6px; }
.quiet-button { border-radius: 12px; }
.topbar { height: 64px; background: rgba(255,255,255,.86); border-bottom: 1px solid var(--v2-line); backdrop-filter: blur(14px); }
.topbar strong { color: var(--v2-ink); letter-spacing: .01em; }
.topbar small { color: var(--v2-muted); }
.live-dot { background: #24b47e; box-shadow: 0 0 0 5px rgba(36,180,126,.12); }
.content { max-width: 1680px; padding: 24px 28px 58px; }
.page-heading { padding: 2px 2px 4px; border-bottom: 1px solid rgba(214,224,229,.65); }
.page-heading h1 { color: #0b2535; letter-spacing: -.035em; line-height: 1.05; }
.page-heading p { color: var(--v2-muted); }
.eyebrow { color: var(--v2-accent); letter-spacing: .14em; }
.heading-count { padding: 12px 18px; border: 1px solid var(--v2-line); border-radius: 18px; background: rgba(255,255,255,.70); }
.metric-grid { gap: 14px; }
.metric-card,.panel,.data-panel,.record-card,.work-order-card,.shipping-card { border: 1px solid rgba(214,224,229,.95); background: rgba(255,255,255,.92); box-shadow: var(--v2-shadow); }
.metric-card { position: relative; overflow: hidden; min-height: 132px; }
.metric-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--v2-accent); }
.metric-card span { color: var(--v2-muted); }
.metric-card strong { color: #0b2535; letter-spacing: -.045em; }
.metric-card small { color: #758693; }
.metric-card.tone-gold::before { background: #d79a1e; }
.metric-card.tone-red::before { background: #d45b5b; }
.metric-card.tone-green::before { background: #25a56f; }
.panel-head h2 { color: #0b2535; letter-spacing: -.025em; }
.panel-head > a,.text-button,.history-row-button { color: var(--v2-accent); }
.compact-row,.mini-list > div { border-radius: 13px; }
.compact-row:hover,.mini-list > div:hover { background: #f3f8fa; }
.order-number { color: #0b2535; background: #eaf4f7; border: 1px solid #d5e8ee; }
.status-quickbar { padding: 4px; border: 1px solid var(--v2-line); border-radius: 16px; background: rgba(255,255,255,.72); box-shadow: 0 10px 28px rgba(15,37,51,.06); }
.status-quickbar button,.secondary-button { border-radius: 12px; border-color: #cfdde3; background: #fff; }
.status-quickbar button.active,.primary-button { border-color: var(--v2-accent); background: linear-gradient(135deg, var(--v2-accent), #126680); color: #fff; box-shadow: 0 10px 22px rgba(15,138,166,.22); }
.save-default-filter { color: var(--v2-muted); }
.filter-bar,.advanced-filter-panel { background: rgba(255,255,255,.82); border-color: var(--v2-line); box-shadow: 0 10px 30px rgba(15,37,51,.06); }
.filter-bar label > span,.advanced-filter-panel label { color: var(--v2-muted); }
.filter-bar input,.filter-bar select,.advanced-filter-panel input,.advanced-filter-panel select,.feedback-dialog input,.feedback-dialog select,.feedback-dialog textarea { border-color: #cedce3; background: #fff; border-radius: 12px; }
.filter-bar input:focus,.filter-bar select:focus,.advanced-filter-panel input:focus,.advanced-filter-panel select:focus,.feedback-dialog input:focus,.feedback-dialog select:focus,.feedback-dialog textarea:focus { border-color: var(--v2-accent); box-shadow: 0 0 0 4px rgba(15,138,166,.13); }
.table-wrap { border-radius: 16px; }
.data-table th { background: #f1f6f8; color: #526775; border-bottom: 1px solid var(--v2-line); letter-spacing: .04em; }
.data-table td { border-bottom-color: #e7eef2; }
.data-table tbody tr:hover td { background: #f7fbfc; }
.data-table .numeric { font-variant-numeric: tabular-nums; }
.important-number { color: #0b2535; font-weight: 800; }
.paper-code { color: #17384b; background: #eef6f8; border: 1px solid #d8e9ee; border-radius: 999px; padding: 4px 9px; }
.status-pill { border-radius: 999px; border: 1px solid transparent; }
.status-pill.warning { background: #fff4d8; color: #8a5a00; border-color: #f0d58d; }
.status-pill.success { background: #e4f6ec; color: #1d6b49; border-color: #b9e5cc; }
.status-pill.danger { background: #fdeaea; color: #9d3434; border-color: #f1c5c5; }
.feedback-button,.label-print-button,.card-action { border-radius: 12px; font-weight: 800; }
.feedback-button,.card-action { background: var(--v2-accent); color: #fff; border-color: var(--v2-accent); }
.label-print-button { background: #eef6f8; color: #126680; border-color: #cfe6ed; }
.feedback-dialog { border: 1px solid rgba(214,224,229,.9); box-shadow: 0 28px 90px rgba(9,31,45,.30); }
.dialog-head h2 { letter-spacing: -.03em; }
.calculation-card,.label-product-summary { border-color: #d8e7ed; background: linear-gradient(135deg, #f3fafb, #ffffff); }
.calculation-card strong { color: #0b2535; }
.stepper button { background: #eef6f8; color: #126680; }
.login-page { background: radial-gradient(circle at 18% 12%, rgba(46,173,197,.18), transparent 26rem), linear-gradient(135deg, #071822 0%, #0d2f43 48%, #eef3f5 48.1%, #f8fafb 100%); }
.login-story { background: transparent; }
.login-story .story-copy h1 { letter-spacing: -.045em; }
.login-card { border: 1px solid rgba(214,224,229,.95); box-shadow: 0 28px 80px rgba(9,31,45,.22); }
.login-card h2 { letter-spacing: -.035em; }
.login-card label input { border-radius: 13px; }
@media (max-width: 1050px) and (min-width: 761px) { .sidebar { width: 216px; } .app-shell { margin-left: 216px; } }
@media (max-width: 760px) {
  body { background: #f3f6f8; }
  .app-shell { margin-left: 0; }
  .topbar { height: 60px; }
  .content { padding: 14px 12px 84px; }
  .page-heading { border-bottom: 0; }
  .page-heading h1 { font-size: 25px; }
  .heading-count { padding: 8px 11px; border-radius: 14px; }
  .metric-card { min-height: 104px; }
  .mobile-nav { border-top: 1px solid var(--v2-line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); box-shadow: 0 -12px 35px rgba(15,37,51,.10); }
  .mobile-nav a.active,.mobile-nav button.active { color: var(--v2-accent); }
  .work-order-progress,.work-order-paper-summary,.record-stats { gap: 6px; }
  .work-order-card-actions .card-action,.work-order-card-actions .label-print-button { min-height: 52px; }
}


/* Mobile v2 focus: production-floor workflow, 2026-08-30.
   Surface: Operate first. Employee sees tasks, quantity, and the next action quickly. */
@media (max-width: 760px) {
  :root {
    --mobile-bg: #f2f5f7;
    --mobile-card: #ffffff;
    --mobile-ink: #101d27;
    --mobile-muted: #607382;
    --mobile-line: #d7e2e7;
    --mobile-accent: #0f8aa6;
    --mobile-accent-dark: #0c6278;
    --mobile-green: #21845b;
    --mobile-shadow: 0 12px 34px rgba(10, 34, 49, .10);
  }

  html { scroll-padding-top: 74px; }
  body {
    padding-bottom: 86px;
    background:
      linear-gradient(180deg, #eef5f7 0, var(--mobile-bg) 220px),
      var(--mobile-bg);
    color: var(--mobile-ink);
    -webkit-tap-highlight-color: rgba(15,138,166,.16);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    height: 58px;
    padding: 8px 12px;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid rgba(215,226,231,.92);
    backdrop-filter: blur(16px);
  }
  .topbar > div:first-child { min-width: 0; }
  .topbar strong { display: block; font-size: 15px; line-height: 1.15; }
  .topbar small {
    display: block;
    max-width: 235px;
    overflow: hidden;
    color: var(--mobile-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-avatar {
    width: 42px;
    height: 42px;
    border: 1px solid #cde3ea;
    background: #eaf6f8;
    color: #0b5266;
  }

  .content { padding: 12px 10px 96px; }
  .page-heading {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px;
    align-items: end;
    margin: 2px 0 10px;
    padding: 0 2px;
  }
  .page-heading h1 {
    margin: 0;
    color: var(--mobile-ink);
    font-size: 24px;
    letter-spacing: -.035em;
  }
  .page-heading p {
    margin-top: 4px;
    max-width: 27em;
    color: var(--mobile-muted);
    font-size: 12px;
    line-height: 1.32;
  }
  .eyebrow { font-size: 10px; letter-spacing: .13em; }
  .heading-count {
    min-width: 64px;
    padding: 7px 10px;
    border-radius: 14px;
    text-align: center;
    box-shadow: none;
  }
  .heading-count strong { font-size: 24px; line-height: 1; }
  .heading-count span { font-size: 10px; }

  .status-quickbar {
    position: sticky;
    top: 63px;
    z-index: 18;
    display: flex;
    gap: 6px;
    margin: 0 -10px 8px;
    padding: 7px 10px;
    overflow-x: auto;
    border-width: 1px 0;
    border-radius: 0;
    background: rgba(242,245,247,.96);
    box-shadow: 0 8px 22px rgba(10,34,49,.08);
    scrollbar-width: none;
  }
  .status-quickbar::-webkit-scrollbar { display: none; }
  .status-quickbar button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
  }
  .status-quickbar .save-default-filter { display: none; }

  .filter-bar {
    position: sticky;
    top: 113px;
    z-index: 17;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto;
    gap: 7px;
    margin: 0 0 10px;
    padding: 7px;
    border-radius: 16px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 10px 26px rgba(10,34,49,.09);
  }
  .filter-bar .search-field { grid-column: auto; }
  .filter-bar label:not(.search-field),
  .filter-bar > button[data-clear-filters] { display: none; }
  .filter-bar input[type="search"] {
    height: 42px;
    padding-inline: 13px;
    border-radius: 13px;
    font-size: 15px;
  }
  .filter-bar .secondary-button,
  .mobile-sort-button {
    min-width: 58px;
    min-height: 42px;
    padding: 6px 10px;
    border-radius: 13px;
    font-size: 13px;
  }

  .mobile-filter-sheet,
  .sort-dialog,
  .mobile-menu-dialog {
    width: calc(100% - 12px);
    max-height: min(76dvh, 620px);
    margin: auto auto max(6px, env(safe-area-inset-bottom));
    padding: 0;
    border: 1px solid var(--mobile-line);
    border-radius: 24px 24px 18px 18px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(8,28,42,.28);
  }
  .filter-sheet-head,
  .mobile-sheet-head {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 14px 14px 10px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #edf2f4;
  }
  .filter-sheet-head h3,
  .mobile-sheet-head h3 { margin: 2px 0 0; font-size: 19px; }
  .mobile-filter-sheet label { gap: 6px; padding: 0 14px; font-size: 12px; }
  .mobile-filter-sheet input,
  .mobile-filter-sheet select { height: 46px; border-radius: 13px; font-size: 16px; }
  .filter-sheet-actions { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; padding: 12px 14px 14px; background: #fff; border-top: 1px solid #edf2f4; }

  .mobile-record-list { display: grid; gap: 10px; }
  .record-card,
  .work-order-card,
  .shipping-card {
    position: relative;
    padding: 13px;
    border-radius: 19px;
    background: var(--mobile-card);
    border-color: var(--mobile-line);
    box-shadow: var(--mobile-shadow);
  }
  .work-order-card::before,
  .shipping-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--mobile-accent);
  }
  .record-top { gap: 8px; align-items: center; }
  .record-top .order-number {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
  }
  .status-pill { padding: 5px 8px; font-size: 12px; line-height: 1.05; }
  .status-pill small { display: none; }
  .record-card h3,
  .work-order-card h3,
  .shipping-card h3 {
    margin: 8px 0 4px;
    color: var(--mobile-ink);
    font-size: 20px;
    line-height: 1.12;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
  }
  .work-order-paper {
    margin: 6px 0 9px;
    padding: 9px 10px;
    border: 1px solid #dbe8ed;
    border-radius: 13px;
    background: #f5fafb;
  }
  .work-order-paper small { color: var(--mobile-muted); font-size: 11px; }
  .work-order-paper strong { margin-top: 2px; color: #17384b; font-size: 13px; overflow-wrap: anywhere; }

  .work-order-progress {
    display: grid;
    grid-template-columns: 1fr 1.12fr 1fr;
    gap: 6px;
    margin: 0 0 7px;
    padding: 0;
    background: transparent;
    border: 0;
  }
  .work-order-progress > span,
  .work-order-paper-summary > span,
  .record-stats span {
    min-width: 0;
    padding: 9px 8px;
    border: 1px solid #deeaee;
    border-radius: 13px;
    background: #f7fafb;
  }
  .work-order-progress .completed {
    background: #e9f7f0;
    border-color: #c9e9d8;
  }
  .work-order-progress small,
  .work-order-paper-summary small,
  .record-stats small { color: var(--mobile-muted); font-size: 10px; line-height: 1.1; }
  .work-order-progress i,
  .work-order-paper-summary i { display: none; }
  .work-order-progress strong { margin-top: 3px; font-size: 14px; letter-spacing: -.02em; }
  .work-order-progress .completed strong { color: var(--mobile-green); font-size: 18px; }
  .work-order-progress em { font-size: 10px; }
  .work-order-paper-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 7px; }
  .work-order-paper-summary strong { margin-top: 3px; font-size: 14px; }
  .work-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 1px 0 8px;
    color: var(--mobile-muted);
    font-size: 11px;
  }
  .work-order-meta span {
    padding: 4px 7px;
    border-radius: 999px;
    background: #f1f5f7;
  }

  .work-order-tools { margin-top: 2px; }
  .work-order-tools .record-details {
    border: 1px solid #e0e9ed;
    border-radius: 13px;
    background: #fff;
  }
  .work-order-tools .record-details summary { padding: 9px 10px; font-size: 12px; }
  .work-order-tools .record-details p { padding: 0 10px 8px; margin: 0; color: var(--mobile-muted); font-size: 12px; }
  .work-order-tool-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 7px 0 0; }
  .history-row-button { min-height: 40px; border-radius: 12px; background: #f2f7f9; }

  .work-order-card-actions {
    position: sticky;
    bottom: 86px;
    z-index: 2;
    display: grid;
    grid-template-columns: .86fr 1.35fr;
    gap: 7px;
    margin: 10px -2px 0;
    padding-top: 7px;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 34%);
  }
  .work-order-card-actions.single-action { grid-template-columns: 1fr; }
  .work-order-card-actions .label-print-button,
  .work-order-card-actions .card-action {
    min-height: 54px;
    border-radius: 15px;
    font-size: 15px;
    line-height: 1.05;
  }
  .work-order-card-actions .card-action {
    background: linear-gradient(135deg, var(--mobile-accent), var(--mobile-accent-dark));
    box-shadow: 0 12px 26px rgba(15,138,166,.25);
  }
  .work-order-card-actions .label-print-button small,
  .work-order-card-actions .card-action small { margin-top: 3px; font-size: 10px; }

  .feedback-dialog,
  .compact-entry-dialog,
  .label-print-dialog {
    width: calc(100% - 8px);
    max-height: calc(100dvh - 8px);
    margin: auto auto max(4px, env(safe-area-inset-bottom));
    border-radius: 24px 24px 18px 18px;
  }
  .feedback-dialog form,
  .feedback-dialog > section,
  .compact-entry-dialog form,
  .label-print-dialog form { padding: 14px; }
  .dialog-head {
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f4;
  }
  .dialog-head h2,
  .compact-entry-dialog .dialog-head h2,
  .label-print-dialog .dialog-head h2 { margin: 2px 0; font-size: 22px; line-height: 1.1; }
  .dialog-head p { font-size: 13px; line-height: 1.25; }
  .icon-button { width: 42px; height: 42px; }
  .history-shortcut { min-height: 42px; border-radius: 12px; }
  .compact-entry-dialog .production-form-grid,
  .label-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 12px 0 10px; }
  .compact-entry-dialog .production-form-grid label:first-child { grid-column: 1 / -1; }
  .compact-entry-dialog .production-form-grid > label > small,
  .label-form-grid label > small { min-height: 32px; font-size: 11px; line-height: 1.15; }
  .compact-entry-dialog .production-form-grid input,
  .label-form-grid input {
    height: 50px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
  }
  .stepper { min-height: 50px; border-radius: 14px; overflow: hidden; }
  .stepper button { min-width: 46px; font-size: 22px; }
  .calculation-card {
    margin: 10px 0;
    padding: 13px;
    border-radius: 16px;
  }
  .compact-entry-dialog .calculation-card strong { font-size: 30px; line-height: 1; }
  .optional-entry summary { min-height: 48px; border-radius: 14px; font-size: 14px; }
  .paper-used-field input { height: 50px; font-size: 17px; }
  .compact-entry-dialog textarea { min-height: 82px; font-size: 16px; }
  .compact-entry-dialog .dialog-note { border-radius: 13px; font-size: 11px; }
  .compact-entry-dialog .dialog-actions {
    position: sticky;
    bottom: -14px;
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 8px;
    margin: 12px -14px -14px;
    padding: 10px 14px max(14px, env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97);
    border-top: 1px solid #edf2f4;
  }
  .compact-entry-dialog .dialog-actions button { min-height: 52px; border-radius: 15px; font-size: 15px; }

  .mobile-nav {
    height: 78px;
    padding: 7px 5px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--mobile-line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 -14px 34px rgba(10,34,49,.12);
  }
  .mobile-nav a,
  .mobile-nav button {
    min-height: 56px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 800;
  }
  .mobile-nav a.active,
  .mobile-nav button.active {
    background: #e7f5f8;
    color: #0b6278;
  }
  .mobile-nav .it-label { margin-top: 1px; font-size: 9px; }
}


/* Mobile v2 hotfix: keep per-card actions inside each task card instead of floating over content. */
@media (max-width: 760px) {
  .work-order-card-actions {
    position: static;
    bottom: auto;
    z-index: auto;
    margin: 10px 0 0;
    padding-top: 8px;
    background: transparent;
    border-top: 1px solid #edf2f4;
  }
  .work-order-card-actions .label-print-button,
  .work-order-card-actions .card-action {
    box-shadow: none;
  }
}


/* Permission row filters: work-order status and broker customer scope. */
.row-filter-box {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #d8e6eb;
  border-radius: 13px;
  background: #f7fbfc;
}
.row-filter-box strong {
  color: #123e56;
  font-size: 12px;
  letter-spacing: .02em;
}
.row-filter-box label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #334b5b;
  font-size: 13px;
  font-weight: 700;
}
.row-filter-box textarea {
  width: 100%;
  min-height: 78px;
  padding: 9px 10px;
  border: 1px solid #cfdde3;
  border-radius: 11px;
  resize: vertical;
  font: inherit;
}
.row-filter-box textarea:focus {
  border-color: #0f8aa6;
  outline: none;
  box-shadow: 0 0 0 4px rgba(15,138,166,.13);
}
.row-filter-box small {
  color: #667785;
  font-size: 11px;
  line-height: 1.35;
}
@media (max-width: 760px) {
  .row-filter-box { padding: 9px; }
  .row-filter-box textarea { min-height: 92px; font-size: 16px; }
}

/* Broker Italian mobile stock page */
.broker-mode .sidebar,
.broker-mode .topbar,
.broker-mode .mobile-nav,
.broker-mode .mobile-menu-dialog {
  --broker-accent: #0f7f95;
}
.broker-mode .brand strong,
.broker-mode .topbar strong { letter-spacing: .01em; }
.broker-stock-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #d9e7ec;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f3fafb 100%);
  box-shadow: 0 14px 36px rgba(13, 54, 74, .08);
}
.broker-stock-hero h1 { margin: 4px 0 8px; font-size: clamp(28px, 7vw, 42px); color: #14354d; }
.broker-stock-hero p { margin: 0; color: #5b7180; max-width: 62ch; line-height: 1.45; }
.broker-stock-count { display: grid; place-items: center; min-width: 98px; padding: 13px; border-radius: 20px; background: #14354d; color: white; }
.broker-stock-count strong { font-size: 32px; line-height: 1; }
.broker-stock-count span { font-size: 12px; opacity: .82; }
.broker-filter-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #dae7ec;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(14, 63, 86, .07);
}
.broker-search span,
.broker-zero-toggle span { display: block; margin-bottom: 7px; color: #415b69; font-size: 12px; font-weight: 800; }
.broker-search input { width: 100%; min-height: 46px; border: 1px solid #c9dce4; border-radius: 14px; padding: 0 14px; font-size: 16px; }
.broker-zero-toggle { min-height: 46px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #f4fafb; }
.broker-zero-toggle span { margin: 0; }
.broker-stock-list { display: grid; gap: 14px; }
.broker-stock-card {
  display: grid;
  gap: 15px;
  padding: 18px;
  border: 1px solid #d7e7ed;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 64, 86, .08);
}
.broker-stock-card[hidden] { display: none !important; }
.broker-stock-card header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.broker-client { display: block; color: #0f7f95; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.broker-stock-card h2 { margin: 4px 0 0; color: #14354d; font-size: clamp(20px, 5.4vw, 30px); line-height: 1.08; }
.broker-status { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #e7f7f1; color: #087653; font-size: 11px; font-weight: 900; }
.broker-main-stock {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 16px;
  border-radius: 20px;
  background: #f1f8fa;
  border: 1px solid #d7e9ee;
}
.broker-main-stock small { grid-column: 1 / -1; color: #57717f; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.broker-main-stock strong { color: #0e3147; font-size: clamp(42px, 13vw, 64px); line-height: .95; letter-spacing: -.04em; }
.broker-main-stock span { color: #5b7180; font-size: 18px; font-weight: 900; padding-bottom: 5px; }
.broker-stock-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.broker-stock-metrics span { padding: 12px; border-radius: 16px; background: #f8fbfc; border: 1px solid #e0ebef; }
.broker-stock-metrics small { display: block; color: #607886; font-size: 12px; font-weight: 800; }
.broker-stock-metrics strong { display: block; margin-top: 5px; color: #15384e; font-size: 22px; }
.broker-empty-state { padding: 28px; border: 1px dashed #aacbd5; border-radius: 24px; background: #f7fbfc; text-align: center; }
.broker-empty-state h2 { margin: 0 0 8px; color: #14354d; }
.broker-empty-state p { margin: 0; color: #5f7582; }
@media (max-width: 760px) {
  .broker-mode .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .broker-stock-hero { grid-template-columns: 1fr; margin: -2px 0 12px; padding: 17px; border-radius: 22px; }
  .broker-stock-hero h1 { font-size: 31px; }
  .broker-stock-count { grid-template-columns: auto 1fr; justify-content: start; min-width: 0; width: fit-content; padding: 9px 12px; }
  .broker-stock-count strong { font-size: 22px; margin-right: 7px; }
  .broker-filter-card { position: sticky; top: 64px; z-index: 12; grid-template-columns: 1fr; gap: 10px; padding: 12px; border-radius: 20px; }
  .broker-search input, .broker-filter-card .secondary-button { min-height: 48px; }
  .broker-zero-toggle { min-height: 48px; }
  .broker-stock-card { padding: 15px; border-radius: 22px; gap: 12px; }
  .broker-status { display: none; }
  .broker-main-stock { padding: 14px; }
  .broker-main-stock strong { font-size: 52px; }
  .broker-stock-metrics { grid-template-columns: 1fr 1fr; }
  .broker-mobile-nav { grid-template-columns: 1fr 1fr; }
  .broker-mobile-nav a, .broker-mobile-nav button { min-height: 58px; }
}


/* Work-order actual production columns */
.loss-paper-cell { color: #b45309; font-weight: 700; }
.work-order-paper-summary .loss-paper-card { border-color: rgba(245, 158, 11, .35); background: #fffbeb; }
@media (max-width: 760px) {
  .work-order-paper-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work-order-paper-summary span { min-width: 0; }
  .work-order-paper-summary strong { font-size: .98rem; }
}
@media (max-width: 420px) {
  .work-order-paper-summary { grid-template-columns: 1fr; }
}


/* Account language column */
.account-list-head-language,
.account-row-language {
  grid-template-columns: minmax(180px, 1.3fr) 120px 110px minmax(160px, 1fr) 160px;
}
@media (max-width: 760px) {
  .account-list-head-language { display: none; }
  .account-row-language { grid-template-columns: 1fr; }
}


/* Mobile UI v3 handoff: reference-image matching, mobile-only layer. Desktop/table UI unchanged. */
@media (max-width: 760px) {
  :root {
    --v3-accent: #0E8794;
    --v3-accent-dark: #096776;
    --v3-bg: #f4f6f7;
    --v3-card: #ffffff;
    --v3-line: #dfe8ec;
    --v3-ink: #10202b;
    --v3-muted: #647682;
    --v3-green: #20845b;
    --v3-red: #b33a3a;
    --v3-shadow: 0 10px 26px rgba(18, 48, 63, .08);
  }

  body {
    background: var(--v3-bg);
  }

  .content {
    padding-inline: 12px;
  }

  .page-heading h1 {
    font-size: 26px;
    letter-spacing: -.03em;
  }

  .status-quickbar {
    top: 58px;
    background: rgba(244,246,247,.97);
  }

  .status-quickbar button.active,
  .primary-button,
  .work-order-card-actions .card-action {
    border-color: var(--v3-accent);
    background: linear-gradient(135deg, var(--v3-accent), var(--v3-accent-dark));
  }

  .filter-bar {
    top: 111px;
    border: 1px solid var(--v3-line);
    border-radius: 17px;
  }

  .mobile-v3-card {
    padding: 14px;
    border: 1px solid var(--v3-line);
    border-radius: 20px;
    background: var(--v3-card);
    box-shadow: var(--v3-shadow);
  }

  .mobile-v3-card::before {
    background: var(--v3-accent);
  }

  .mobile-v3-card.is-completed::before {
    background: var(--v3-green);
  }

  .mobile-v3-card h3 {
    margin: 9px 0 7px;
    color: var(--v3-ink);
    font-size: 21px;
    line-height: 1.12;
  }

  .work-order-paper {
    margin-bottom: 9px;
    padding: 9px 10px;
    border-color: var(--v3-line);
    background: #f8fbfc;
  }

  .work-order-progress.active-layout {
    grid-template-columns: 1fr 1fr;
  }

  .work-order-progress.active-layout > span {
    min-height: 70px;
    display: grid;
    align-content: center;
  }

  .work-order-progress.active-layout .completed {
    background: #e9f7f8;
    border-color: #cbe7eb;
  }

  .work-order-progress.active-layout .completed strong {
    color: var(--v3-accent-dark);
    font-size: 19px;
  }

  .work-order-completed-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 8px;
  }

  .work-order-completed-grid > span {
    min-width: 0;
    min-height: 70px;
    display: grid;
    align-content: center;
    padding: 9px 8px;
    border: 1px solid var(--v3-line);
    border-radius: 14px;
    background: #f8fbfc;
  }

  .work-order-completed-grid small,
  .work-order-completed-grid strong,
  .work-order-completed-grid em {
    display: block;
  }

  .work-order-completed-grid small {
    color: var(--v3-muted);
    font-size: 10px;
    line-height: 1.12;
  }

  .work-order-completed-grid strong {
    margin-top: 4px;
    color: var(--v3-ink);
    font-size: 15px;
    line-height: 1.08;
    letter-spacing: -.02em;
  }

  .work-order-completed-grid em {
    margin-top: 1px;
    color: var(--v3-muted);
    font-size: 10px;
    font-style: normal;
  }

  .work-order-completed-grid .completed {
    background: #e8f6ef;
    border-color: #c5e7d4;
  }

  .work-order-completed-grid .completed strong {
    color: var(--v3-green);
    font-size: 18px;
  }

  .work-order-completed-grid .loss-paper-card {
    background: #fff8eb;
    border-color: #f2dfb6;
  }

  .work-order-completed-grid .loss-paper-card strong {
    color: #a15d08;
  }

  .mobile-v3-history-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px 0 0;
  }

  .mobile-v3-history-actions:empty {
    display: none;
  }

  .mobile-v3-history-actions .history-row-button {
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid #d6e7ec;
    border-radius: 14px;
    background: #f3f8fa;
    color: var(--v3-accent-dark);
    text-align: center;
    font-size: 13px;
  }

  .work-order-card-actions {
    grid-template-columns: .92fr 1.25fr;
    margin-top: 10px;
    border-top: 1px solid #edf2f4;
  }

  .work-order-card-actions .label-print-button,
  .work-order-card-actions .card-action {
    min-height: 54px;
    border-radius: 16px;
    font-size: 15px;
  }

  .work-order-card-actions .label-print-button {
    background: #eef7f9;
    color: var(--v3-accent-dark);
  }

  .is-completed .work-order-card-actions {
    display: none;
  }

  .filter-sheet-head h3,
  .mobile-sheet-head h3,
  .sort-dialog h3 {
    font-size: 20px;
  }

  .compact-entry-dialog .dialog-actions {
    position: sticky;
  }
}

@media (max-width: 380px) {
  .work-order-completed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Mobile UI v3 correction: closer to supplied reference screens; mobile only. */
@media (max-width: 760px) {
  body {
    padding-bottom: 74px;
    background: #f7f8f9;
    color: #10213a;
    font-size: 14px;
  }

  .topbar {
    display: none;
  }

  .content {
    padding: 12px 12px 86px;
  }

  .page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
  }

  .page-heading .eyebrow {
    display: none;
  }

  .page-heading h1 {
    margin: 0;
    color: #10234b;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.15;
  }

  .page-heading p {
    display: block;
    margin: 3px 0 0;
    color: #738093;
    font-size: 10px;
    line-height: 1.2;
  }

  .heading-count {
    min-width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #718195;
    font-size: 10px;
  }

  .heading-count strong {
    display: none;
  }

  .heading-count span {
    font-size: 10px;
  }

  .status-quickbar {
    position: static;
    display: flex;
    gap: 6px;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .status-quickbar button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #dce5eb;
    border-radius: 8px;
    background: #fff;
    color: #33435b;
    font-size: 11px;
    font-weight: 800;
  }

  .status-quickbar button.active {
    border-color: #0E8794;
    background: #0E8794;
    color: #fff;
    box-shadow: 0 4px 10px rgba(14,135,148,.18);
  }

  .status-quickbar .save-default-filter {
    display: none;
  }

  .filter-bar,
  .unified-filter {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .filter-bar .search-field,
  .unified-filter .search-field {
    grid-column: 1 / -1;
  }

  .filter-bar label > span,
  .unified-filter label > span {
    display: none;
  }

  .filter-bar input[type="search"],
  .unified-filter input[type="search"] {
    height: 34px;
    padding: 0 12px 0 34px;
    border: 1px solid #e1e7ec;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
  }

  .search-field {
    position: relative;
  }

  .search-field::before {
    content: "⌕";
    position: absolute;
    left: 12px;
    bottom: 7px;
    z-index: 1;
    color: #7a8a9c;
    font-size: 14px;
  }

  .filter-bar .secondary-button,
  .mobile-sort-button {
    min-width: 48px;
    min-height: 28px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #0E8794;
    font-size: 11px;
    font-weight: 900;
  }

  .filter-bar .secondary-button::before,
  .mobile-sort-button::before {
    margin-right: 3px;
  }

  .filter-bar [data-toggle-advanced]::before { content: "▽"; }
  .mobile-sort-button::before { content: "↕"; }

  .data-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .mobile-record-list {
    gap: 8px;
  }

  .record-card,
  .work-order-card,
  .shipping-card {
    padding: 10px;
    border: 1px solid #dfe8ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 42, 70, .04);
  }

  .work-order-card::before,
  .shipping-card::before {
    content: none;
  }

  .record-top {
    align-items: center;
    gap: 8px;
  }

  .record-top .order-number {
    padding: 0;
    border: 0;
    background: transparent;
    color: #0d3e62;
    font-size: 13px;
    font-weight: 900;
  }

  .status-pill {
    padding: 0;
    border: 0;
    background: transparent !important;
    font-size: 11px;
    font-weight: 900;
  }

  .status-pill.warning { color: #f05a28; }
  .status-pill.success { color: #16924f; }
  .status-pill.danger { color: #d23b3b; }
  .status-pill.neutral { color: #637188; }

  .record-card h3,
  .work-order-card h3,
  .shipping-card h3 {
    margin: 6px 0 2px;
    color: #11224a;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.18;
  }

  .record-paper,
  .work-order-paper {
    margin: 0 0 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #52637a;
    font-size: 10px;
  }

  .work-order-paper small {
    display: none;
  }

  .work-order-paper strong {
    color: #52637a;
    font-size: 10px;
    font-weight: 700;
  }

  .work-order-progress.active-layout,
  .compact-metrics,
  .record-stats.two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
    margin: 7px 0;
  }

  .work-order-progress.active-layout > span,
  .compact-metrics > span,
  .record-stats.two-column > span {
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .work-order-progress small,
  .compact-metrics small,
  .record-stats small {
    color: #6f7d91;
    font-size: 10px;
    font-weight: 700;
  }

  .work-order-progress strong,
  .compact-metrics strong,
  .record-stats strong {
    margin-top: 1px;
    color: #0a3f68;
    font-size: 14px;
    font-weight: 900;
  }

  .work-order-progress.active-layout .completed {
    background: transparent;
    border: 0;
  }

  .work-order-progress.active-layout .completed strong {
    color: #0a3f68;
    font-size: 14px;
  }

  .work-order-completed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px 8px;
    margin: 8px 0 2px;
  }

  .work-order-completed-grid > span {
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
  }

  .work-order-completed-grid small {
    color: #6f7d91;
    font-size: 10px;
    font-weight: 700;
  }

  .work-order-completed-grid strong {
    color: #0a3f68;
    font-size: 13px;
    font-weight: 900;
  }

  .work-order-completed-grid .completed strong {
    color: #16924f;
    font-size: 13px;
  }

  .work-order-completed-grid .loss-paper-card strong {
    color: #e65b2e;
  }

  .work-order-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 0;
    color: #6f7d91;
    font-size: 10px;
  }

  .work-order-meta span {
    padding: 0;
    background: transparent;
  }

  .mobile-v3-history-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-top: 7px;
  }

  .mobile-v3-history-actions .history-row-button,
  .history-row-button {
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: #f4fafc;
    color: #0E8794;
    font-size: 11px;
    font-weight: 900;
  }

  .work-order-card-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
    padding-top: 0;
    border: 0;
  }

  .work-order-card-actions .label-print-button,
  .work-order-card-actions .card-action,
  .shipping-card .card-action {
    min-height: 38px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 900;
  }

  .work-order-card-actions .label-print-button {
    border: 1px solid #0E8794;
    background: #fff;
    color: #0E8794;
  }

  .work-order-card-actions .card-action,
  .shipping-card .card-action {
    border: 1px solid #0E8794;
    background: #0E8794;
    color: #fff;
    box-shadow: none;
  }

  .hero-metric {
    margin: 7px 0;
    padding: 9px;
    border: 1px solid #cfe9ef;
    border-radius: 8px;
    background: #f0fbfd;
  }

  .hero-metric small {
    color: #607082;
    font-size: 10px;
    font-weight: 800;
  }

  .hero-metric strong {
    margin-top: 3px;
    color: #0E8794;
    font-size: 22px;
    font-weight: 900;
  }

  .inventory-negative strong,
  .inventory-mobile.inventory-negative strong,
  .inventory-mobile.inventory-negative {
    color: #d73333 !important;
  }

  .generic-card-details {
    margin-top: 7px;
    border-top: 1px solid #edf1f4;
  }

  .generic-card-details > summary {
    padding: 8px 0 0;
    color: #0E8794;
    font-size: 11px;
    font-weight: 900;
    text-align: right;
  }

  .generic-card-details > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
    padding: 8px 0 0;
  }

  .generic-card-details span {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .generic-card-details small {
    color: #6f7d91;
    font-size: 10px;
  }

  .generic-card-details strong {
    color: #10234b;
    font-size: 12px;
  }

  .feedback-dialog,
  .compact-entry-dialog,
  .label-print-dialog,
  .mobile-filter-sheet,
  .sort-dialog,
  .mobile-menu-dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
    margin: auto;
    border: 1px solid #dfe8ee;
    border-radius: 8px;
    box-shadow: 0 18px 55px rgba(8, 28, 42, .22);
  }

  .dialog-head h2,
  .compact-entry-dialog .dialog-head h2,
  .label-print-dialog .dialog-head h2,
  .filter-sheet-head h3,
  .mobile-sheet-head h3 {
    color: #10234b;
    font-size: 16px;
    font-weight: 900;
  }

  .compact-entry-dialog .production-form-grid,
  .label-form-grid {
    gap: 10px;
  }

  .compact-entry-dialog .production-form-grid input,
  .label-form-grid input,
  .paper-used-field input,
  .compact-entry-dialog textarea {
    border-radius: 6px;
  }

  .calculation-card {
    border: 1px solid #cfe9ef;
    border-radius: 8px;
    background: #eaf8fb;
    color: #10234b;
  }

  .calculation-card span,
  .calculation-card small,
  .calculation-card em {
    color: #617084;
  }

  .calculation-card strong,
  .compact-entry-dialog .calculation-card strong {
    color: #0E8794;
    font-size: 24px;
  }

  .mobile-nav {
    height: 62px;
    padding: 4px 6px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid #dfe8ee;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -4px 16px rgba(20,42,70,.06);
  }

  .mobile-nav a,
  .mobile-nav button {
    min-height: 48px;
    border-radius: 6px;
    color: #53637b;
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-nav a.active,
  .mobile-nav button.active {
    background: transparent;
    color: #0E8794;
  }

  .mobile-nav-dot {
    width: 15px;
    height: 15px;
    border: 1.8px solid currentColor;
    border-radius: 4px;
    background: transparent;
  }
}


/* Mobile reference-screen dialogs: forms, histories, filter/sort sheets. */
@media (max-width: 760px) {
  .reference-form-dialog,
  .history-dialog,
  .sort-dialog,
  .mobile-filter-sheet {
    width: calc(100% - 16px) !important;
    max-width: 390px;
    max-height: calc(100dvh - 16px);
    margin: auto;
    border: 1px solid #dce7ee;
    border-radius: 10px !important;
    background: #fff;
    box-shadow: 0 18px 55px rgba(10, 28, 48, .22);
  }

  .reference-form-dialog form,
  .history-dialog > section,
  .sort-dialog,
  .mobile-filter-sheet {
    padding: 12px !important;
  }

  .dialog-head,
  .mobile-sheet-head,
  .filter-sheet-head {
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
  }

  .dialog-head::before,
  .mobile-sheet-head::before,
  .filter-sheet-head::before {
    content: "‹";
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #0d284a;
    font-size: 24px;
    line-height: 1;
  }

  .dialog-head > div,
  .mobile-sheet-head > div,
  .filter-sheet-head > div {
    text-align: center;
  }

  .dialog-head h2,
  .dialog-head h3,
  .mobile-sheet-head h3,
  .filter-sheet-head h3 {
    margin: 0;
    color: #10234b;
    font-size: 17px !important;
    font-weight: 900;
  }

  .dialog-head p {
    margin: 3px 0 0;
    color: #64748a;
    font-size: 10px !important;
  }

  .dialog-head .eyebrow,
  .mobile-sheet-head .eyebrow,
  .filter-sheet-head .eyebrow {
    display: none !important;
  }

  .dialog-head-actions,
  .dialog-head > .icon-button,
  .mobile-sheet-head > .icon-button,
  .filter-sheet-head > .icon-button {
    justify-self: end;
  }

  .icon-button {
    width: 30px !important;
    height: 30px !important;
    border: 0;
    background: transparent;
    color: #1a2c47;
    font-size: 21px;
  }

  .reference-info-strip,
  .label-product-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 12px;
    padding: 9px 10px;
    border: 1px solid #d4ebf1;
    border-radius: 8px;
    background: #f1fbfd;
    color: #29435d;
  }

  .reference-info-strip strong,
  .label-product-summary strong {
    color: #10234b;
    font-size: 12px !important;
    font-weight: 900;
  }

  .reference-info-strip span,
  .label-product-summary span {
    color: #52657a;
    font-size: 10px !important;
    font-weight: 800;
  }

  .production-form-grid,
  .label-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px !important;
    margin: 0 0 10px !important;
  }

  .production-form-grid label,
  .label-form-grid label,
  .reference-note-label,
  .paper-used-field {
    display: grid;
    gap: 5px;
    color: #243954;
    font-size: 12px !important;
    font-weight: 900;
  }

  .production-form-grid input,
  .label-form-grid input,
  .reference-note-label textarea,
  .optional-entry input,
  .optional-entry textarea,
  .correction-reason input {
    width: 100%;
    height: 40px !important;
    border: 1px solid #dce6ed;
    border-radius: 7px !important;
    background: #fff;
    color: #10234b;
    font-size: 13px !important;
  }

  .reference-note-label textarea,
  .optional-entry textarea {
    min-height: 72px;
    padding: 10px;
  }

  .field-help-action {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    min-height: 0 !important;
    color: #0E8794;
    font-size: 10px !important;
  }

  .inline-reset {
    min-height: 24px !important;
    padding: 0 2px !important;
    border: 0 !important;
    background: transparent !important;
    color: #0E8794 !important;
    font-size: 10px !important;
    font-weight: 900;
  }

  .stepper {
    grid-template-columns: 38px 1fr 38px !important;
  }

  .stepper button {
    height: 40px;
    border-color: #d7e3ea;
    background: #f8fafb;
    color: #0d3352;
    font-size: 18px;
  }

  .calculation-card,
  .label-total-card {
    margin: 10px 0;
    padding: 12px !important;
    border: 1px solid #cdeaf0 !important;
    border-radius: 8px !important;
    background: #edf9fc !important;
    text-align: center;
  }

  .calculation-card span,
  .calculation-card small,
  .calculation-card em {
    display: block;
    color: #587085 !important;
    font-size: 10px !important;
    font-style: normal;
  }

  .calculation-card strong,
  .label-total-card strong,
  .history-big-number {
    margin: 3px 0;
    color: #0E8794 !important;
    font-size: 26px !important;
    font-weight: 900;
    line-height: 1.1;
  }

  .shipping-summary-lines {
    display: grid;
    gap: 6px;
    margin: 8px 0 10px;
  }

  .shipping-summary-lines span {
    display: flex;
    justify-content: space-between;
    color: #5d6e82;
    font-size: 12px;
  }

  .shipping-summary-lines strong {
    color: #10234b;
    font-size: 13px;
  }

  .optional-entry {
    margin: 8px 0;
    border: 1px solid #e5edf2;
    border-radius: 8px;
    background: #fff;
  }

  .optional-entry summary {
    min-height: 38px !important;
    padding: 10px !important;
    color: #35475e;
    font-size: 12px !important;
    font-weight: 900;
  }

  .optional-entry > label {
    padding: 0 10px 10px;
  }

  .reference-form-hint {
    margin: 8px 0;
    color: #6b7b8e;
    font-size: 11px;
  }

  .label-preview-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
    margin: 8px 0 12px;
    padding: 10px;
    border: 1px solid #e2e9ee;
    border-radius: 8px;
    background: #fff;
  }

  .label-preview-card small {
    display: block;
    color: #6e7e91;
    font-size: 10px;
  }

  .label-preview-card strong {
    color: #10234b;
    font-size: 12px;
  }

  .fake-barcode {
    grid-column: 1 / -1;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 2px;
    height: 34px;
    padding-top: 3px;
  }

  .fake-barcode span {
    width: 3px;
    background: #111827;
  }
  .fake-barcode span:nth-child(2), .fake-barcode span:nth-child(5) { width: 6px; }
  .fake-barcode span:nth-child(3) { width: 2px; }

  .dialog-actions {
    position: sticky;
    bottom: -12px;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px -12px -12px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #edf2f5;
    background: #fff;
  }

  .dialog-actions button,
  .dialog-actions .primary-button,
  .dialog-actions .secondary-button {
    min-height: 42px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 900;
  }

  .dialog-actions .primary-button,
  .sort-apply-button {
    border-color: #0E8794 !important;
    background: #0E8794 !important;
    color: #fff !important;
  }

  .dialog-actions .secondary-button {
    border: 1px solid #cbd8e0 !important;
    background: #fff !important;
    color: #0E8794 !important;
  }

  .history-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 12px;
    border-bottom: 1px solid #e2eaf0;
  }

  .history-tabs span {
    padding: 8px 4px;
    color: #52637a;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
  }

  .history-tabs .active {
    color: #0E8794;
    border-bottom: 2px solid #0E8794;
  }

  .reference-history-list {
    gap: 10px !important;
  }

  .reference-history-list article {
    padding: 12px !important;
    border: 1px solid #dfe8ee;
    border-radius: 8px !important;
    background: #fff !important;
  }

  .history-record-head strong {
    color: #10234b;
    font-size: 13px;
  }

  .history-record-head b {
    color: #0E8794;
    font-size: 15px;
  }

  .represented-label,
  .history-main-line,
  .history-audit,
  .history-remark summary,
  .history-remark p {
    color: #5f6f82 !important;
    font-size: 11px !important;
  }

  .reference-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .reference-actions > .text-button,
  .reference-actions > a {
    min-height: 34px;
    border: 1px solid #cfe3ea;
    border-radius: 6px;
    background: #fff;
    color: #0E8794;
    font-weight: 900;
    text-align: center;
  }

  .reference-actions form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 10px;
    border: 1px solid #f0c2c2;
    border-radius: 8px;
    background: #fff8f8;
  }

  .reference-actions form::before {
    content: "作废记录";
    color: #10234b;
    font-size: 13px;
    font-weight: 900;
  }

  body[data-ui-language="it"] .reference-actions form::before {
    content: "Annulla registrazione";
  }

  .reference-actions input[name="reason"] {
    height: 58px;
    padding: 9px;
    border: 1px solid #e7ced0;
    border-radius: 6px;
    background: #fff;
  }

  .danger-text-button {
    min-height: 36px;
    border: 1px solid #d93939 !important;
    border-radius: 6px;
    background: #d93939 !important;
    color: #fff !important;
    font-weight: 900;
  }

  .sort-dialog .sort-options {
    display: grid;
    gap: 2px;
    margin-top: 6px;
  }

  .sort-radio-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    color: #253853;
    font-size: 13px;
    font-weight: 800;
  }

  .sort-radio-row input {
    width: 18px;
    height: 18px;
    accent-color: #0E8794;
  }

  .sort-apply-button {
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
    border-radius: 6px;
    font-weight: 900;
  }
}


/* Confirmed UI prototype details: realistic mobile nav icons, compact Italian labels, clean label preview, explicit units. */
@media (max-width: 760px) {
  .mobile-nav a,
  .mobile-nav button {
    gap: 2px !important;
  }

  .mobile-nav-icon,
  .mobile-nav-more {
    width: 22px !important;
    height: 22px !important;
    display: grid !important;
    place-items: center !important;
    margin-bottom: 1px;
    border: 0 !important;
    border-radius: 0 !important;
    color: inherit;
    font-size: 18px !important;
    line-height: 22px !important;
    filter: grayscale(.15);
  }

  .mobile-nav a.active .mobile-nav-icon,
  .mobile-nav button.active .mobile-nav-more {
    filter: none;
    transform: translateY(-1px);
  }

  .mobile-nav span:last-child {
    font-size: 9px !important;
    line-height: 1.05;
    white-space: nowrap;
  }

  .label-preview-card {
    grid-template-columns: 1fr auto !important;
    background: #fff;
  }

  .fake-barcode {
    display: none !important;
  }
}


/* Shipping center: merge shipping plan + outbound records in one page, like paper operations. */
.shipping-center-switch,
.module-switch {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.shipping-center-switch a,
.shipping-center-switch button,
.module-switch a {
  text-decoration: none;
  border: 1px solid var(--border, #dfe5ec);
  background: #fff;
  color: var(--text, #10213a);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.shipping-center-switch a.active,
.shipping-center-switch button.active,
.module-switch a.active {
  background: #12b7a6;
  color: #fff;
  border-color: #12b7a6;
}
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-title-row h2 {
  margin: 0;
}
.section-count {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef8f6;
  color: #0d9488;
  font-weight: 800;
}
.outbound-section {
  margin-top: 18px;
}
@media (max-width: 760px) {
  .shipping-center-heading .heading-count span { font-size: 10px; }
  .shipping-center-switch {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f7f8f9;
    padding: 4px 0 8px;
  }
  .shipping-center-switch a {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 13px;
  }
  .shipping-center-panel {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .section-title-row {
    padding: 0 2px;
    margin: 18px 0 10px;
  }
  .section-title-row h2 { font-size: 18px; }
  .outbound-section { margin-top: 24px; }
  .outbound-mobile-list .record-card {
    border-left: 4px solid #12b7a6;
  }
}


/* Inventory center: product stock + paper stock paper-style tab switch. */
.inventory-center-switch {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.inventory-center-switch button {
  border: 1px solid var(--border, #dfe5ec);
  background: #fff;
  color: var(--text, #10213a);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}
.inventory-center-switch button.active {
  background: #12b7a6;
  color: #fff;
  border-color: #12b7a6;
}
.inventory-center-panel { margin-top: 0; }
@media (max-width: 760px) {
  .inventory-center-heading .heading-count span { font-size: 10px; }
  .inventory-center-switch {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f7f8f9;
    padding: 4px 0 8px;
  }
  .inventory-center-switch button {
    flex: 1;
    min-height: 42px;
    font-size: 13px;
    padding: 10px 8px;
  }
  .inventory-center-panel {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}


/* Inventory typography pass: units, centered numeric columns, cleaner desktop table rhythm. */
.inventory-center-panel .data-table th,
.inventory-center-panel .data-table td {
  vertical-align: middle;
}
.inventory-center-panel .data-table th {
  font-size: 12px;
  letter-spacing: .02em;
}
.inventory-center-panel .data-table td {
  font-size: 13px;
  line-height: 1.25;
}
.inventory-center-panel .data-table th:nth-child(n+3),
.inventory-center-panel .data-table td.numeric,
.inventory-center-panel .data-table td.centered-data-cell,
.inventory-center-panel .data-table td.inventory-column,
.inventory-center-panel .data-table td.stock-value-cell {
  text-align: center;
}
.inventory-center-panel .data-table td[data-field="客户"],
.inventory-center-panel .data-table td[data-field="产品"],
.inventory-center-panel .data-table td[data-field="纸-尺寸/代码"],
.inventory-center-panel .data-table td[data-field="对应产品"] {
  text-align: left;
}
.value-with-unit {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-width: 78px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.value-with-unit b {
  font-size: 13px;
  font-weight: 800;
  color: #17384b;
}
.value-with-unit em {
  font-size: 10px;
  line-height: 1;
  font-style: normal;
  color: #72808a;
}
.stock-value-cell .value-with-unit,
.inventory-column .value-with-unit {
  min-width: 88px;
}
.stock-value-cell .value-with-unit b,
.inventory-column .value-with-unit b {
  color: #0f6f86;
  font-size: 14px;
}
.inventory-center-panel .record-stats strong,
.inventory-center-panel .hero-metric strong {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .inventory-center-panel .compact-metrics,
  .inventory-center-panel .record-stats.two-column {
    text-align: center;
  }
  .inventory-center-panel .record-stats strong,
  .inventory-center-panel .hero-metric strong {
    display: block;
    text-align: center;
  }
  .inventory-center-panel .hero-metric small {
    text-align: center;
  }
}


/* Global data readability pass: numeric units, centered figures, safer table/card spacing. */
.data-table td.numeric,
.data-table td.centered-data-cell,
.data-table td.inventory-column,
.data-table td.stock-value-cell,
.data-table th.numeric {
  text-align: center !important;
  vertical-align: middle;
}
.data-table td.important-number,
.data-table td.inventory-column,
.data-table td.stock-value-cell,
.important-number .value-with-unit b {
  font-weight: 800;
  color: #0f6f86;
}
.value-with-unit {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-width: 70px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.value-with-unit b {
  font-size: 13px;
  font-weight: 800;
  color: #17384b;
}
.value-with-unit em {
  font-size: 10px;
  line-height: 1;
  font-style: normal;
  color: #72808a;
}
.data-table .loss-paper-cell .value-with-unit b,
.loss-paper-card strong {
  color: #b42318;
}
.metric-card strong,
.compact-quantity,
.hero-metric strong,
.record-stats strong,
.compact-metrics strong,
.history-big-number,
.history-record-head b {
  font-variant-numeric: tabular-nums;
}
.record-stats.two-column > span,
.compact-metrics > span,
.generic-card-grid > span {
  text-align: center;
}
@media (max-width: 760px) {
  .hero-metric,
  .record-stats.two-column > span,
  .compact-metrics > span,
  .generic-card-grid > span {
    align-items: center;
    text-align: center;
  }
  .hero-metric strong em,
  .record-stats strong em,
  .compact-metrics strong em {
    font-size: 11px;
    font-style: normal;
    color: #667085;
  }
}
