/* Minimal workbench theme. Loaded last so older visual experiments cannot leak through. */
:root {
  --navy: #315f78;
  --navy-deep: #1d2f3b;
  --blue: #3478a4;
  --red: #b44d52;
  --gold: #a77a2d;
  --green: #2f8067;
  --ink: #20262d;
  --muted: #707780;
  --line: #dedfe3;
  --bg: #f5f5f7;
  --panel: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --soft-shadow: none;
  --radius: 8px;
  --radius-sm: 6px;
}

html {
  background: var(--bg);
  overflow-x: clip;
}

body {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  background: var(--bg);
  overflow-x: clip;
}

button,
input,
select,
textarea {
  border-radius: 7px;
  font: inherit;
}

button {
  -webkit-appearance: none;
  appearance: none;
  padding: 7px 12px;
  border: 1px solid #b5cbd9;
  background: #f5f9fc;
  color: #315f78;
  line-height: 20px;
  cursor: pointer;
  box-shadow: none;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

/* Low-specificity defaults preserve module-specific primary, icon and tab buttons. */
:where(button):hover:not(:disabled) {
  background-color: #eaf2f7;
  border-color: #88aabd;
}
:where(button):active:not(:disabled) { background-color: #dceaf2; }
button:disabled { cursor: not-allowed; opacity: .55; }
input:is([type="button"], [type="submit"], [type="reset"]),
input[type="file"]::file-selector-button {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  line-height: 20px;
  padding: 5px 10px;
  border: 1px solid #b5cbd9;
  border-radius: 5px;
  background: #f5f9fc;
  color: #315f78;
  cursor: pointer;
}
input[type="file"]::file-selector-button { margin-right: 8px; padding: 2px 8px; }
input[type="file"]::file-selector-button:hover { background: #eaf2f7; }
input:is([type="button"], [type="submit"], [type="reset"]):disabled,
input[type="file"]:disabled::file-selector-button { opacity: .55; cursor: not-allowed; }

button:hover {
  transform: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(52, 120, 164, 0.18);
  outline-offset: 1px;
}

#flow-preview-label {
  min-height: 24px;
  padding: 4px 12px;
  color: #58616a;
  border-bottom: 1px solid var(--line);
  background: #eef0f2;
  font-size: 11px;
  text-align: center;
}

/* Login */
.login-screen {
  padding: 24px;
  background: #f5f5f7;
}

.login-screen::before {
  display: none;
}

.login-card {
  width: min(400px, 100%);
  padding: 30px;
  border: 1px solid #e1e1e4;
  border-top: 1px solid #e1e1e4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(25, 30, 35, 0.09);
  backdrop-filter: none;
}

.login-brand {
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ececee;
}

.brand-mark {
  width: 34px;
  height: 34px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: #315f78;
  box-shadow: none;
}

.login-brand h1 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 650;
}

.login-form {
  gap: 15px;
  margin-top: 22px;
}

.login-form label {
  gap: 7px;
  color: #4f555c;
  font-weight: 500;
}

.login-form input,
.login-form select {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #d7d8dc;
  background: #fff;
  box-shadow: none;
}

.login-form input:focus,
.login-form select:focus {
  border-color: #5d91b0;
  outline: 3px solid rgba(52, 120, 164, 0.14);
}

.login-button {
  min-height: 44px;
  color: #fff;
  border: 1px solid #315f78;
  background: #315f78;
  box-shadow: none;
  font-weight: 600;
}

.login-button:hover {
  border-color: #274e64;
  background: #274e64;
}

/* Shell and navigation */
@media screen and (min-width: 1101px) {
  #app-shell > .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 208px;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 30;
  }

  #app-shell > .workspace {
    grid-column: 2;
    min-width: 0;
  }

  #app-shell > .sidebar > .brand,
  #app-shell > .sidebar > .sidebar-status {
    flex-shrink: 0;
  }

  #app-shell > .sidebar > .primary-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: start;
    overscroll-behavior: contain;
  }
}

.app-shell {
  grid-template-columns: 208px minmax(0, 1fr);
  min-height: calc(100vh - 24px);
  background: var(--bg);
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  margin: 0;
  gap: 14px;
  padding: 18px 12px 14px;
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fbfbfc;
  box-shadow: none;
  backdrop-filter: none;
}

.sidebar .brand {
  gap: 10px;
  padding: 0 6px 16px;
  border-bottom: 1px solid #e6e6e8;
}

.sidebar .brand h1 {
  color: #222930;
  font-size: 14px;
  font-weight: 650;
}

.sidebar .brand p {
  display: none;
}

.primary-nav {
  gap: 3px;
}

.sidebar .nav-item {
  min-height: 40px;
  gap: 10px;
  padding: 8px 10px;
  color: #525961;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  font-weight: 500;
}

.sidebar .nav-item:hover {
  color: #20262d;
  background: #f0f0f2;
}

.sidebar .nav-item.active {
  color: #153f56;
  background: #e8eff3;
  box-shadow: inset 3px 0 0 #315f78;
  font-weight: 600;
}

.sidebar .nav-icon {
  display: none;
}

.sidebar .sidebar-status {
  margin-top: auto;
  padding: 10px 12px;
  color: #375c50;
  border: 1px solid #d7e5de;
  border-radius: 6px;
  background: #edf5f1;
  box-shadow: none;
  font-size: 12px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.sidebar .sidebar-status .status-dot {
  vertical-align: middle;
  margin-right: 8px;
  background: #32846b;
}

.status-dot {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: var(--green);
  box-shadow: none;
}

.workspace {
  width: 100%;
  min-width: 0;
  padding: 0 0 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 22;
  min-height: 64px;
  margin: 0;
  padding: 11px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.eyebrow {
  display: none;
}

.topbar h2 {
  margin: 0;
  color: #20262d;
  font-size: 20px;
  font-weight: 650;
}

.topbar-actions {
  gap: 7px;
}

.user-chip,
.logout-button,
.icon-button,
.detail-head-button,
.panel-link-button,
.approval-tab-buttons button,
.table-link-button,
.device-jump-button,
.detail-actions button,
.info-entry-form-actions button {
  min-height: 32px;
  padding: 0 11px;
  color: #394149;
  border: 1px solid #d7d8dc;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.user-chip:hover,
.logout-button:hover,
.icon-button:hover,
.detail-head-button:hover,
.panel-link-button:hover,
.table-link-button:hover {
  color: #20262d;
  border-color: #bfc2c7;
  background: #f7f7f8;
}

.logout-button {
  color: #656b72;
}

/* Secondary navigation */
.subnav-panel {
  margin: 0;
  padding: 0 22px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.subnav {
  display: flex;
  gap: 22px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav::-webkit-scrollbar {
  display: none;
}

.subnav button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 1px;
  color: #6b727a;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 500;
}

.subnav button:hover {
  color: #20262d;
  background: transparent;
}

.subnav button.active {
  color: #214f68;
  border-color: #315f78;
  background: transparent;
  box-shadow: none;
  font-weight: 600;
}

.subnav button.has-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 1px;
}

.subnav button.has-badge::after,
.subnav button.has-badge.badge-urgent::after {
  position: static;
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  color: #fff;
  border-radius: 9px;
  background: #bd6165;
  box-shadow: none;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  animation: none;
}

/* Work surfaces */
#biz-modal .biz-field { min-width: 0; align-content: start; }
#biz-modal .biz-field input { box-sizing: border-box; width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 0 10px; font: inherit; }
#biz-modal input:not([type="date"]) { appearance: textfield; -moz-appearance: textfield; }
#biz-modal input:not([type="date"])::-webkit-inner-spin-button,
#biz-modal input:not([type="date"])::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#biz-modal input:not([type="date"])::-webkit-contacts-auto-fill-button,
#biz-modal input:not([type="date"])::-webkit-credentials-auto-fill-button { visibility: hidden; display: none !important; pointer-events: none; }
#biz-modal input[type="date"] { appearance: auto; -webkit-appearance: auto; }
#biz-modal input[type="date"]::-webkit-calendar-picker-indicator { display: block; opacity: 1; cursor: pointer; }
#biz-modal .biz-field.has-time-error input { border-color: #c85c60; box-shadow: 0 0 0 2px rgba(200, 92, 96, .12); }
.biz-time-error { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid #c85c60; color: #9f3d42; background: #fff6f6; font-size: 13px; }
.biz-time-error[hidden] { display: none; }

.contract-signing-card { width: min(920px, calc(100vw - 32px)); }
.contract-signing-body { display: grid; gap: 18px; padding-top: 18px; }
.contract-template-section { min-width: 0; }
.contract-template-section .biz-group-title { margin: 0 0 10px; }
.contract-template-table th,
.contract-cost-reference th { width: 132px; }
.contract-variable-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.contract-variable { min-width: 0; padding: 14px; border: 1px solid #d9e0e5; background: #f8fafb; border-radius: 6px; }
.contract-variable > label { display: block; margin-bottom: 8px; color: #52616c; font-size: 13px; font-weight: 600; }
.contract-variable-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.contract-variable-control input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid #cfd8df; border-radius: 5px; font: inherit; appearance: textfield; -moz-appearance: textfield; }
.contract-variable-control input::-webkit-inner-spin-button,
.contract-variable-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.contract-variable-control input[type="date"] { appearance: auto; -webkit-appearance: auto; }
.contract-variable-control input[type="date"]::-webkit-calendar-picker-indicator { display: block; opacity: 1; cursor: pointer; }
.contract-variable-control button { min-width: 90px; border-color: #7f9aaa; color: #28596f; background: #fff; }
.contract-variable p { min-height: 20px; margin: 7px 0 0; color: #7a858d; font-size: 12px; }
.contract-variable p.is-changed { color: #a85b22; }
.contract-variable p.is-confirmed { color: #23745f; }
.contract-variable.is-locked { border-color: #b9d3ca; background: #f4f8f6; }
.contract-variable.is-locked input { pointer-events: none; color: #27343b; background: #edf3f0; border-color: #b9cbc4; }
.contract-variable.is-locked button:disabled { opacity: 1; cursor: default; color: #24614f; background: #e4f0eb; border-color: #aac8bd; }
.contract-file-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, auto); align-items: end; gap: 16px; }
.contract-file-section .biz-field { margin: 0; }
.contract-ready-status { margin: 0 0 7px; color: #8a5f24; font-size: 13px; text-align: right; }
.contract-ready-status.is-ready { color: #23745f; }
.deal-change-confirm-body { padding-top: 20px; }
.deal-change-confirm-body h3 { margin: 5px 0 14px; }
.upload-modal-actions button:disabled { cursor: not-allowed; opacity: .45; }

.biz-lost-price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.biz-lost-difference-field { min-width: 0; }
.biz-lost-price-grid .biz-field { align-content: start; }
.biz-lost-difference-value { box-sizing: border-box; display: flex; align-items: center; width: 100%; height: 36px; min-height: 36px; margin: 0; padding: 0 10px; border: 1px solid #cfd8df; border-radius: 5px; color: #6c7880; background: #f5f7f8; font: inherit; font-weight: 700; }
.biz-lost-difference-value.is-higher { color: #a94348; background: #fff5f5; border-color: #e1b8ba; }
.biz-lost-difference-value.is-lower { color: #24705d; background: #f1f8f5; border-color: #b9d3ca; }
.biz-lost-difference-value.is-equal { color: #4e606a; background: #f2f5f6; }
.biz-required-field > span em { color: #b5474d; font-style: normal; }

@media screen and (max-width: 760px) {
  .contract-variable-grid,
  .contract-file-section { grid-template-columns: 1fr; }
  .biz-lost-price-grid { grid-template-columns: 1fr; }
  .contract-ready-status { text-align: left; }
}

.home-dashboard,
.workflow-system {
  --page-gutter: 32px;
  width: calc(100% - 2 * var(--page-gutter));
  max-width: calc(100% - 2 * var(--page-gutter));
  min-width: 0;
  margin-right: 32px;
  margin-left: 32px;
}

.workflow-system > *,
.detail-body > * {
  min-width: 0;
  max-width: 100%;
}

.detail-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.metrics-grid {
  gap: 10px;
  margin-top: 18px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.metric {
  min-height: 88px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.metric::before,
.metric::after {
  display: none;
}

.metric span {
  color: #6c737b;
  font-size: 12px;
}

.metric strong {
  color: #20262d;
  font-size: 25px;
  font-weight: 650;
}

.metric em {
  display: none;
}

.panel,
.submodule-detail,
.vehicle-search-bar,
.info-entry-form,
.driver-archive-form,
.photo-review-panel,
.annual-plan-board,
.org-tree,
.org-root,
.org-company-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.submodule-detail,
.command-panel,
.detail-body,
.detail-table {
  min-width: 0;
  max-width: 100%;
}

.panel-head {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ececee;
}

.panel h3,
.detail-head h4 {
  color: #252b32;
  font-weight: 650;
}

.panel-badge,
.detail-status,
.table-status {
  min-height: 23px;
  padding: 3px 7px;
  border-radius: 5px;
  box-shadow: none;
  font-size: 11px;
  font-weight: 500;
}

.panel-badge {
  color: #656b72;
  border-color: #dedfe3;
  background: #f6f6f7;
}

.home-guide-panel,
.home-reminder-panel,
.home-panels,
.home-upload-progress-panel,
.home-log-panel {
  margin-top: 10px;
  margin-bottom: 0;
}

.guide-step,
.reminder-row {
  min-height: 46px;
  margin: 0;
  padding: 9px 6px;
  border: 0;
  border-bottom: 1px solid #ededee;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.guide-step:last-child,
.reminder-row:last-child {
  border-bottom: 0;
}

.guide-step:hover,
.reminder-row:hover {
  background: #fafafa;
}

.guide-step-num {
  width: 24px;
  height: 24px;
  color: #315f78;
  border: 1px solid #c7d7e0;
  border-radius: 50%;
  background: #edf3f6;
}

.guide-step-body p,
.reminder-row-body p,
.boss-overview-head > span {
  display: none;
}

.guide-step-btn {
  min-height: 28px;
  padding: 0 9px;
  color: #315f78;
  border: 0;
  background: transparent;
}

.guide-step-btn:hover:not([disabled]) {
  color: #214f68;
  background: #edf3f6;
}

.home-dashboard.boss-home-compact {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  grid-template-areas:
    "metrics metrics"
    "guide reminder"
    "overview overview";
  gap: 10px;
}

.boss-home-compact .metrics-grid {
  margin-top: 18px;
}

.boss-home-compact .boss-management-overview {
  min-height: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.boss-overview-group {
  padding: 13px 15px;
  border-right: 1px solid #ececee;
  box-shadow: none !important;
}

.boss-overview-head {
  margin-bottom: 9px;
}

.boss-overview-head h3 {
  color: #343b42;
  font-size: 13px;
  font-weight: 600;
}

.boss-overview-metrics {
  gap: 0;
  border: 1px solid #ededee;
  border-radius: 6px;
  background: #ededee;
  overflow: hidden;
}

.boss-overview-metric {
  min-height: 38px;
  color: #343b42;
  border: 0;
  background: #fff;
}

.boss-overview-metric:hover {
  background: #f7f7f8;
}

.boss-overview-metric strong {
  color: #20262d;
  font-size: 15px;
}

.boss-overview-metric.is-warning strong {
  color: var(--red);
}

.module-grid {
  gap: 8px;
}

.module-card {
  min-height: 82px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.module-card:hover {
  border-color: #bdc9d0;
  background: #fafbfb;
}

.submodule-detail {
  overflow: hidden;
}

.detail-head {
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid #e7e7e9;
  border-radius: 0;
  background: #fafafa;
}

.biz-opportunity-head {
  min-height: 62px;
  padding: 11px 14px;
}

.biz-opportunity-head p {
  margin-top: 3px;
  font-size: 12px;
}

.biz-opportunity-actions {
  margin-left: auto;
}

.biz-opportunity-actions .detail-head-button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 500;
}

.biz-opportunity-actions .detail-head-button.primary {
  color: #fff;
  border-color: #315f78;
  background: #315f78;
}

.biz-opportunity-actions .detail-head-button.primary:hover {
  border-color: #274e64;
  background: #274e64;
}

.biz-opportunity-body {
  display: block;
  padding: 10px 10px 12px;
}

.biz-analytics {
  padding: 12px 14px 14px;
  border-bottom: 1px solid #e7e7e9;
  background: #fff;
}

.biz-analytics-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.biz-analytics-toolbar > div:first-child {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.biz-analytics-toolbar > div:first-child strong {
  color: #26343d;
  font-size: 14px;
}

.biz-analytics-toolbar > div:first-child span {
  color: #7b858d;
  font-size: 12px;
}

.biz-analytics-range {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.biz-analytics-range label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #68737b;
  font-size: 12px;
}

.biz-analytics-range input {
  width: 132px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid #d3dadd;
  border-radius: 6px;
  color: #28353d;
  background: #fff;
  font: inherit;
}

.biz-analytics-range button {
  height: 32px;
  padding: 0 11px;
  border: 1px solid #c7d3d9;
  border-radius: 6px;
  color: #315f78;
  background: #fff;
  cursor: pointer;
}

.biz-analytics-presets {
  display: inline-flex;
  gap: 4px;
  padding-left: 2px;
}

.biz-analytics-presets button {
  padding-right: 9px;
  padding-left: 9px;
}

.biz-analytics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  overflow: visible;
}

.biz-analytics-card {
  --metric-color: #315f78;
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 10px 11px 8px;
  border: 1px solid #dfe4e7;
  border-top: 3px solid var(--metric-color);
  border-radius: 7px;
  background: #fff;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.biz-analytics-card:hover,
.biz-analytics-card:focus-visible,
.biz-analytics-card:focus-within {
  z-index: 20;
  border-color: color-mix(in srgb, var(--metric-color) 45%, #dfe4e7);
  outline: 0;
  box-shadow: 0 4px 14px rgba(32, 43, 50, 0.12);
}

.biz-analytics-hover-panel {
  box-sizing: border-box;
  position: absolute;
  top: -16px;
  left: 50%;
  z-index: 30;
  width: min(820px, 58vw);
  min-height: 430px;
  padding: 22px 24px 20px;
  border: 1px solid color-mix(in srgb, var(--metric-color) 48%, #dfe4e7);
  border-top: 4px solid var(--metric-color);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(28, 40, 48, 0.24);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) scale(0.98);
  transform-origin: center top;
  transition: opacity 150ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.biz-analytics-card:nth-child(-n + 2) .biz-analytics-hover-panel {
  left: 0;
  transform: scale(0.98);
  transform-origin: left top;
}

.biz-analytics-card:nth-last-child(-n + 2) .biz-analytics-hover-panel {
  right: 0;
  left: auto;
  transform: scale(0.98);
  transform-origin: right top;
}

.biz-analytics-card:hover .biz-analytics-hover-panel,
.biz-analytics-card:focus-visible .biz-analytics-hover-panel,
.biz-analytics-card:focus-within .biz-analytics-hover-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
  transition-delay: 0s;
}

.biz-analytics-card:nth-child(-n + 2):hover .biz-analytics-hover-panel,
.biz-analytics-card:nth-child(-n + 2):focus-visible .biz-analytics-hover-panel,
.biz-analytics-card:nth-child(-n + 2):focus-within .biz-analytics-hover-panel,
.biz-analytics-card:nth-last-child(-n + 2):hover .biz-analytics-hover-panel,
.biz-analytics-card:nth-last-child(-n + 2):focus-visible .biz-analytics-hover-panel,
.biz-analytics-card:nth-last-child(-n + 2):focus-within .biz-analytics-hover-panel {
  transform: scale(1);
}

.biz-analytics-card.is-green { --metric-color: #2d8069; }
.biz-analytics-card.is-red { --metric-color: #b55459; }
.biz-analytics-card.is-yellow { --metric-color: #b08a3e; }
.biz-analytics-card.is-gold { --metric-color: #9b7429; }

.biz-analytics-card header {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 5px;
}

.biz-analytics-card header > span {
  color: #66717a;
  font-size: 12px;
  font-weight: 600;
}

.biz-analytics-card header > strong {
  color: #202b32;
  font-size: 22px;
  line-height: 1;
}

.biz-analytics-card header small {
  margin-left: 3px;
  color: #78828a;
  font-size: 11px;
  font-weight: 500;
}

.biz-analytics-hover-panel header {
  margin-bottom: 10px;
  min-width: 0;
}

.biz-analytics-hover-panel header > span {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.biz-analytics-hover-panel header > strong {
  font-size: 34px;
}

.biz-analytics-hover-panel header small {
  font-size: 13px;
}

.biz-analytics-hover-panel .biz-analytics-share {
  min-height: 22px;
  margin-bottom: 6px;
  font-size: 13px;
}

.biz-analytics-share {
  min-height: 16px;
  margin: -1px 0 2px;
  color: #7a858d;
  font-size: 10px;
  line-height: 1.4;
}

.biz-analytics-bars {
  display: grid;
  height: 92px;
  min-width: 0;
  grid-template-columns: repeat(var(--biz-period-count, 1), minmax(0, 1fr));
  gap: var(--biz-period-gap, 4px);
  align-items: end;
  overflow: hidden;
}

.biz-analytics-hover-panel .biz-analytics-bars {
  height: 330px;
  gap: max(var(--biz-period-gap, 4px), 3px);
}

.biz-analytics-chart-zoom { min-width: 0; }

.biz-analytics-zoom-toolbar {
  display: flex;
  min-height: 34px;
  margin: -8px 0 8px;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.biz-analytics-zoom-toolbar button {
  display: grid;
  width: 34px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid #c6d5dc;
  border-radius: 5px;
  color: #315f78;
  background: #f4f8fa;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.biz-analytics-zoom-toolbar button.is-fit {
  width: auto;
  padding: 0 10px;
  font-size: 12px;
}

.biz-analytics-zoom-toolbar button:hover:not(:disabled) {
  color: #fff;
  border-color: #315f78;
  background: #315f78;
}

.biz-analytics-zoom-toolbar button:disabled {
  color: #aeb7bc;
  border-color: #e1e5e7;
  background: #f7f8f8;
  cursor: default;
}

.biz-analytics-zoom-value {
  min-width: 46px;
  color: #66737c;
  font-size: 12px;
  text-align: center;
}

.biz-analytics-chart-viewport {
  min-width: 0;
  padding-bottom: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: #aebfc8 #eef2f4;
  scrollbar-width: thin;
}

.biz-analytics-chart-viewport .biz-analytics-bars.is-zoomable {
  width: calc(100% * var(--biz-chart-scale, 1));
  max-width: none;
  transition: width 180ms ease;
}

.biz-analytics-hover-panel .biz-analytics-bar-item {
  grid-template-rows: 28px minmax(0, 1fr) 28px;
}

.biz-analytics-hover-panel .biz-analytics-bar-item strong,
.biz-analytics-hover-panel .biz-analytics-bar-item span {
  font-size: 13px;
}

.biz-analytics-hover-panel .biz-analytics-bar-item i {
  width: min(42px, 66%);
}

.biz-analytics-bar-item {
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-rows: 18px minmax(0, 1fr) 17px;
  align-items: end;
  justify-items: center;
  cursor: help;
}

.biz-analytics-bars.is-timeline .biz-analytics-bar-item {
  grid-template-rows: minmax(0, 1fr) 17px;
}

.biz-analytics-hover-panel .biz-analytics-bars.is-timeline .biz-analytics-bar-item {
  grid-template-rows: minmax(0, 1fr) 28px;
}

.biz-analytics-bars.is-timeline .biz-analytics-bar-item strong {
  display: none;
}

.biz-analytics-bars.is-timeline .biz-analytics-bar-item span:not(:empty) {
  width: max-content;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.biz-analytics-bars.is-timeline .biz-analytics-bar-item:first-child span:not(:empty) {
  transform: translateX(35%);
}

.biz-analytics-bars.is-timeline .biz-analytics-bar-item:last-child span:not(:empty) {
  transform: translateX(-35%);
}

.biz-analytics-bar-item strong,
.biz-analytics-bar-item span {
  max-width: 100%;
  color: #77818a;
  font-size: 9px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.biz-analytics-bar-item i {
  display: block;
  width: min(24px, 68%);
  min-height: 2px;
  border-radius: 3px 3px 1px 1px;
  background: color-mix(in srgb, var(--metric-color) 78%, white);
}

.biz-analytics-card.is-category .biz-analytics-bar-item span {
  white-space: normal;
  text-align: center;
  line-height: 1.15;
}

.biz-category-daily-list {
  display: grid;
  max-height: 340px;
  gap: 12px;
  overflow-y: auto;
  scrollbar-color: #b7c3c9 #eef2f4;
  scrollbar-width: thin;
}

.biz-category-daily-track { min-width: 0; }

.biz-analytics-hover-panel .biz-category-daily-track header {
  display: flex;
  min-height: 24px;
  margin: 0 0 4px;
  align-items: baseline;
  justify-content: space-between;
}

.biz-analytics-hover-panel .biz-category-daily-track header strong {
  color: #33424b;
  font-size: 13px;
}

.biz-analytics-hover-panel .biz-category-daily-track header span {
  color: #78838b;
  font-size: 11px;
}

.biz-analytics-hover-panel .biz-category-daily-track .biz-analytics-bars {
  height: 112px;
  gap: 2px;
}

.biz-analytics-card.is-category .biz-category-daily-track .biz-analytics-bar-item span {
  font-size: 10px;
  white-space: nowrap;
}

.biz-analytics-empty {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  color: #8a9399;
  font-size: 11px;
}

@media (max-width: 1100px) {
  .biz-analytics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .biz-analytics-hover-panel { width: min(680px, 62vw); }
}

@media (max-width: 720px) {
  .biz-analytics-grid { grid-template-columns: 1fr; }
  .biz-analytics-range { align-items: stretch; }
  .biz-analytics-range label { width: 100%; justify-content: space-between; }
  .biz-analytics-range input { flex: 1; width: auto; }
  .biz-analytics-presets { width: 100%; padding-left: 0; }
  .biz-analytics-presets button { flex: 1; }
  .biz-analytics-hover-panel { display: none; }
}

.detail-body.biz-roomy {
  padding-right: 10px;
  padding-left: 10px;
}

.biz-roomy .detail-table th,
.biz-roomy .detail-table td {
  padding: 7px 6px !important;
  line-height: 1.35;
}

.biz-roomy .detail-table th {
  font-size: 12px;
}

.biz-roomy .detail-table td {
  font-size: 14px;
}

.biz-roomy .biz-view-toggle button {
  min-height: 34px;
  padding-right: 16px;
  padding-left: 16px;
  font-size: 13px;
}

.biz-opportunity-table-wrap {
  width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.biz-opportunity-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
  border: 0;
  border-collapse: collapse;
  border-radius: 0;
}

.biz-opportunity-table th,
.biz-opportunity-table td {
  height: auto;
  padding: 8px 7px !important;
  border-top: 0;
  border-left: 0;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.biz-opportunity-table th { font-size: 12px; }
.biz-opportunity-table td { font-size: 14px; }

.biz-opportunity-table th:last-child,
.biz-opportunity-table td:last-child {
  border-right: 0;
  text-align: center;
}

.biz-opportunity-table tbody tr:last-child td {
  border-bottom: 0;
}

.biz-opportunity-toggle { margin: 0 0 12px; }
.biz-opportunity-table.is-expanded { min-width: 0 !important; table-layout: fixed; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(1) { width: 5%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(2) { width: 9%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(3) { width: 11%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(4) { width: 11%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(5) { width: 8%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(6) { width: 8%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(7) { width: 9%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(8) { width: 9%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(9) { width: 9%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(10) { width: 9%; }
.biz-opportunity-table.is-expanded:not(.is-overview) th:nth-child(11) { width: 10%; }
.biz-opportunity-table.is-overview th:nth-child(1) { width: 5%; }
.biz-opportunity-table.is-overview th:nth-child(2) { width: 9%; }
.biz-opportunity-table.is-overview th:nth-child(3) { width: 12%; }
.biz-opportunity-table.is-overview th:nth-child(4) { width: 12%; }
.biz-opportunity-table.is-overview th:nth-child(5) { width: 8%; }
.biz-opportunity-table.is-overview th:nth-child(6) { width: 8%; }
.biz-opportunity-table.is-overview th:nth-child(7) { width: 10%; }
.biz-opportunity-table.is-overview th:nth-child(8) { width: 9%; }
.biz-opportunity-table.is-overview th:nth-child(9) { width: 9%; }
.biz-opportunity-table.is-overview th:nth-child(10) { width: 10%; }
.biz-lead-link {
  padding: 2px 3px;
  border: 0;
  color: #315f78;
  background: transparent;
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.biz-lead-link:hover,
.biz-lead-link:focus-visible { color: #1f4d65; background: #eef4f6; outline: 2px solid rgba(49, 95, 120, 0.2); }
.biz-status-filter-head {
  padding-top: 7px;
  padding-bottom: 7px;
  text-align: center !important;
}
.biz-status-filter-head > span {
  display: block;
  margin-bottom: 5px;
}
.biz-status-filter-head select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 24px 0 8px;
  border: 1px solid #cbd5da;
  border-radius: 5px;
  color: #42515a;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}
.biz-status-filter-head select:focus {
  border-color: #5d879c;
  outline: 2px solid rgba(49, 95, 120, 0.15);
  outline-offset: 1px;
}
.biz-opportunity-table .biz-detail-btn {
  max-width: 100%;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #cbd5da;
  border-radius: 6px;
  color: #315f78;
  background: #fff;
  cursor: pointer;
  line-height: 1.25;
  white-space: normal;
}

.biz-opportunity-table .biz-detail-btn:hover {
  border-color: #9fb3bd;
  background: #f1f5f6;
}

.biz-contract-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}

.biz-contract-table-wrap {
  overflow-x: hidden;
}
.biz-contract-table th,
.biz-contract-table td {
  height: auto;
  padding: 8px 7px !important;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.biz-contract-table th {
  font-size: 12px;
}
.biz-contract-table td {
  font-size: 14px;
}
.biz-contract-table.is-pending th:nth-child(1) { width: 10%; }
.biz-contract-table.is-pending th:nth-child(2) { width: 14%; }
.biz-contract-table.is-pending th:nth-child(3) { width: 17%; }
.biz-contract-table.is-pending th:nth-child(4) { width: 10%; }
.biz-contract-table.is-pending th:nth-child(5) { width: 10%; }
.biz-contract-table.is-pending th:nth-child(6) { width: 9%; }
.biz-contract-table.is-pending th:nth-child(7) { width: 10%; }
.biz-contract-table.is-pending th:nth-child(8) { width: 10%; }
.biz-contract-table.is-pending th:nth-child(9) { width: 10%; }

.biz-contract-table.is-done th:nth-child(1) { width: 9%; }
.biz-contract-table.is-done th:nth-child(2) { width: 11%; }
.biz-contract-table.is-done th:nth-child(3) { width: 14%; }
.biz-contract-table.is-done th:nth-child(4) { width: 8%; }
.biz-contract-table.is-done th:nth-child(5) { width: 8%; }
.biz-contract-table.is-done th:nth-child(6) { width: 7%; }
.biz-contract-table.is-done th:nth-child(7) { width: 8%; }
.biz-contract-table.is-done th:nth-child(8) { width: 8%; }
.biz-contract-table.is-done th:nth-child(9) { width: 8%; }
.biz-contract-table.is-done th:nth-child(10) { width: 7%; }
.biz-contract-table.is-done th:nth-child(11) { width: 12%; }

.biz-contract-table.is-lost th:nth-child(1) { width: 9%; }
.biz-contract-table.is-lost th:nth-child(2) { width: 12%; }
.biz-contract-table.is-lost th:nth-child(3) { width: 14%; }
.biz-contract-table.is-lost th:nth-child(4) { width: 8%; }
.biz-contract-table.is-lost th:nth-child(5) { width: 8%; }
.biz-contract-table.is-lost th:nth-child(6) { width: 8%; }
.biz-contract-table.is-lost th:nth-child(7) { width: 8%; }
.biz-contract-table.is-lost th:nth-child(8) { width: 10%; }
.biz-contract-table.is-lost th:nth-child(9) { width: 13%; }
.biz-contract-table.is-lost th:nth-child(10) { width: 10%; }
.biz-contract-table .biz-badge {
  display: inline-block;
  max-width: 100%;
}
.biz-contract-table .biz-ops {
  text-align: center;
  white-space: normal;
}
.biz-contract-table .biz-ops button {
  max-width: 100%;
  min-height: 28px;
  margin: 2px 2px;
  padding: 4px 7px;
  line-height: 1.25;
  white-space: normal;
}

.upload-modal-card.compact.business-detail-modal-card { width: min(940px, calc(100vw - 32px)); }
.business-detail-modal-card .upload-modal-body { padding: 16px 18px 18px; }
.biz-detail-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #d9dfe3; background: #fff; }
.biz-detail-table { width: 100%; min-width: 720px; table-layout: fixed; border-collapse: collapse; }
.biz-detail-table .biz-detail-label-col { width: 148px; }
.biz-detail-table th,
.biz-detail-table td { padding: 9px 11px; border-right: 1px solid #e0e4e7; border-bottom: 1px solid #e0e4e7; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.biz-detail-table tr > *:last-child { border-right: 0; }
.biz-detail-table tbody tr:last-child > * { border-bottom: 0; }
.biz-detail-table th { color: #5d6972; background: #f5f6f7; font-size: 13px; font-weight: 600; }
.biz-detail-table td { color: #202b32; background: #fff; font-size: 14px; font-weight: 500; }
.biz-detail-table .biz-detail-section-row th { padding: 8px 11px; color: #244c61; background: #edf3f5; font-size: 14px; font-weight: 700; }
.biz-detail-table .biz-detail-long-value { white-space: normal; line-height: 1.55; }
.business-detail-modal-card .biz-approval-banner { margin-bottom: 12px; }

.workflow-system.flow-active > .command-panel,
.workflow-system.flow-active .submodule-detail,
.workflow-system.flow-active .flow-workspace {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.workflow-system.flow-active .flow-heading {
  margin: 0 0 16px;
}

.workflow-system.flow-active .detail-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.workflow-system.flow-active .flow-workspace .detail-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border: 0;
  border-radius: 0;
}

.workflow-system.flow-active .flow-workspace .detail-table th:nth-child(1),
.workflow-system.flow-active .flow-workspace .detail-table td:nth-child(1) {
  width: 29%;
}

.workflow-system.flow-active .flow-workspace .detail-table th:nth-child(2),
.workflow-system.flow-active .flow-workspace .detail-table td:nth-child(2) {
  width: 28%;
}

.workflow-system.flow-active .flow-workspace .detail-table th:nth-child(3),
.workflow-system.flow-active .flow-workspace .detail-table td:nth-child(3) {
  width: 13%;
}

.workflow-system.flow-active .flow-workspace .detail-table th:nth-child(4),
.workflow-system.flow-active .flow-workspace .detail-table td:nth-child(4) {
  width: 18%;
}

.workflow-system.flow-active .flow-workspace .detail-table th:nth-child(5),
.workflow-system.flow-active .flow-workspace .detail-table td:nth-child(5) {
  width: 12%;
  text-align: center;
}

/* The expanded waybill checklist replaces the legacy five-column widths above. */
.workflow-system.flow-active .flow-workspace .flow-list-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}
.workflow-system.flow-active .flow-workspace .flow-list-table th,
.workflow-system.flow-active .flow-workspace .flow-list-table td {
  min-width: 0;
  padding: 9px 6px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.workflow-system.flow-active .flow-workspace .flow-list-table .flow-stage-badge {
  min-width: 0;
  max-width: 100%;
  padding: 4px 6px;
  white-space: normal;
}
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(1),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(1) { width: 4%; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(2),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(2) { width: 14%; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(3),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(3) { width: 9%; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(4),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(4) { width: 9%; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(5),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(5) { width: 15%; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(6),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(6) { width: 9%; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(7),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(7) { width: 8%; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(8),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(8) { width: 7%; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(9),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(9) { width: 7%; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(10),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(10) { width: 10%; text-align: center; }
.workflow-system.flow-active .flow-workspace .flow-list-table th:nth-child(11),
.workflow-system.flow-active .flow-workspace .flow-list-table td:nth-child(11) { width: 8%; text-align: center; }

/* Main workbench lists stay fully visible without horizontal dragging. */
#submodule-detail .detail-table-wrap:not(.quality-indicator-table-wrap):not(.authz-matrix-wrap):not(.authz-editor-table-wrap),
#submodule-detail .detail-table:not(.electronic-checklist-table):not(.equipment-detail-table):not(.quality-record-table) {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

#submodule-detail .detail-table-wrap:not(.quality-indicator-table-wrap):not(.authz-matrix-wrap):not(.authz-editor-table-wrap) > table,
#submodule-detail .detail-table:not(.electronic-checklist-table):not(.equipment-detail-table):not(.quality-record-table) > table,
#submodule-detail table.detail-table:not(.flow-checklist-table):not(.quality-indicator-table):not(.authz-matrix-table):not(.authz-editor-table):not(.authz-scope-table) {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
  font-size: 12px;
}

#submodule-detail .detail-table-wrap:not(.quality-indicator-table-wrap):not(.authz-matrix-wrap):not(.authz-editor-table-wrap) th,
#submodule-detail .detail-table-wrap:not(.quality-indicator-table-wrap):not(.authz-matrix-wrap):not(.authz-editor-table-wrap) td,
#submodule-detail .detail-table:not(.electronic-checklist-table):not(.equipment-detail-table):not(.quality-record-table) th,
#submodule-detail .detail-table:not(.electronic-checklist-table):not(.equipment-detail-table):not(.quality-record-table) td {
  min-width: 0;
  padding: 9px 6px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
}

#submodule-detail .detail-table-wrap button,
#submodule-detail .detail-table:not(.electronic-checklist-table) button,
#submodule-detail .detail-table-wrap .table-status,
#submodule-detail .detail-table:not(.electronic-checklist-table) .table-status {
  max-width: 100%;
  min-width: 0;
  padding: 5px 7px;
  white-space: normal;
}

.detail-body {
  gap: 10px;
  padding-top: 12px;
}

.field-line,
.folder-card,
.ddl-node,
.info-entry-card,
.photo-preview,
.empty-upload,
.hq-risk-card,
.reminder-row {
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}

/* Tables and controls */
.detail-table,
.notice-picker-table,
.equipment-detail-table,
.driver-archive-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.detail-table table,
.modal-info-table,
.notice-picker-table table,
.equipment-detail-table table {
  border: 0;
  border-collapse: collapse;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.detail-table th,
.modal-info-table th,
.notice-picker-table th,
.equipment-detail-table th,
.driver-archive-table th,
.annual-plan-table th,
.authz-editor-table thead th,
.authz-scope-table thead th {
  height: 38px;
  padding: 8px 10px;
  color: #59616a;
  border-color: #e4e5e8;
  background: #f5f5f6;
  font-size: 12px;
  font-weight: 600;
}

.detail-table td,
.modal-info-table td,
.notice-picker-table td,
.equipment-detail-table td,
.driver-archive-table td {
  padding: 9px 10px;
  border-color: #e8e8ea;
  background: #fff;
}

.detail-table tbody tr:nth-child(even) td {
  background: #fcfcfd;
}

.detail-table tbody tr:hover td,
.notice-picker-table tbody tr:hover td {
  background: #f5f8fa;
}

.table-action-button,
.info-entry-card button,
.info-entry-form-actions button:first-child,
.detail-actions button:first-child,
.approval-tab-buttons button.active {
  color: #fff;
  border-color: #315f78;
  border-radius: 6px;
  background: #315f78;
  box-shadow: none;
  font-weight: 500;
}

.table-action-button:hover,
.info-entry-card button:hover,
.detail-actions button:first-child:hover {
  border-color: #274e64;
  background: #274e64;
}

.table-status.passed {
  color: #276d59;
  border-color: #cce0d9;
  background: #edf6f2;
}

.table-status.pending,
.table-status.progress {
  color: #896316;
  border-color: #e5d8b8;
  background: #f9f5ea;
}

.table-status.rejected {
  color: #9d4247;
  border-color: #e5c9cb;
  background: #faf0f1;
}

.upload-modal-card {
  border: 1px solid #d6d7db;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(25, 30, 35, 0.18);
  backdrop-filter: none;
}

.upload-modal-head,
.annual-plan-head,
.archive-audit-folder-head,
.full-entry-head,
.authz-editor-footer,
.document-approval-actions {
  border-color: #e3e3e6;
  background: #fafafa;
}

.modal-backdrop {
  background: rgba(25, 30, 35, 0.34);
  backdrop-filter: blur(3px);
}

/* Boss home: business analysis board */
.home-dashboard:has(.business-dashboard) {
  display: block;
}

.business-dashboard {
  padding-top: 18px;
}

.business-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.business-dashboard-head h3,
.business-panel h4 {
  margin: 0;
  color: #242a30;
  letter-spacing: 0;
}

.business-dashboard-head h3 {
  font-size: 17px;
  font-weight: 650;
}

.business-dashboard-head p,
.business-panel header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.business-dashboard-head > span,
.business-panel header > span {
  color: #666d75;
  font-size: 11px;
}

.business-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.business-dashboard-actions > span {
  margin-right: 4px;
  color: #666d75;
  font-size: 11px;
}

.business-dashboard-actions button,
.business-widget-add-panel button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #d7dde1;
  border-radius: 6px;
  color: #4d5961;
  background: #fff;
  font-size: 10px;
  cursor: pointer;
}

.business-dashboard-actions button:hover,
.business-dashboard-actions button.active,
.business-widget-add-panel button:hover {
  color: #244f65;
  border-color: #aabdc7;
  background: #eef4f6;
}

.business-widget-add-panel {
  min-height: 210px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid #dde2e5;
  border-radius: 7px;
  background: #f7f8f9;
}

.business-widget-add-panel.is-hidden {
  display: none;
}

.business-widget-library-head,
.business-widget-library-head > div,
.business-widget-library-item footer {
  display: flex;
  align-items: center;
}

.business-widget-library-head {
  justify-content: space-between;
  gap: 12px;
}

.business-widget-library-head > div {
  gap: 10px;
}

.business-widget-library-head strong {
  color: #29333a;
  font-size: 13px;
}

.business-widget-library-head span,
.business-widget-library-item footer > span {
  color: #788087;
  font-size: 10px;
}

.business-widget-add-panel .business-widget-library-close {
  width: 28px;
  padding: 0;
  font-size: 16px;
}

.business-widget-library {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.business-widget-library-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d7dde1;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 45, 54, 0.04);
}

.business-widget-library-item.is-added {
  opacity: 0.62;
}

.business-widget-library-preview {
  height: 126px;
  overflow: hidden;
  padding: 10px;
  border-bottom: 1px solid #e6e9eb;
  background: #fbfcfc;
  pointer-events: none;
}

.business-widget-library-item footer {
  min-height: 42px;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
}

.business-widget-library-item footer > strong {
  overflow: hidden;
  color: #3b464d;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-widget-library-item footer button {
  flex: 0 0 auto;
  height: 27px;
}

.business-widget-add-panel button b {
  margin-right: 4px;
  color: #315f78;
  font-size: 13px;
  font-weight: 500;
}

.business-widget-library-preview .business-kpi {
  height: 100%;
  padding: 8px;
  border: 0;
  box-shadow: none;
}

.business-widget-library-preview .business-kpi > strong {
  margin-top: 7px;
  font-size: 21px;
}

.business-widget-library-preview .business-kpi > div {
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
}

.business-preview-warning > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 8px;
  color: #a34b50;
}

.business-preview-warning > div strong {
  font-size: 24px;
}

.business-preview-warning > div span,
.business-preview-warning p {
  font-size: 9px;
}

.business-preview-warning p,
.business-preview-funnel p,
.business-preview-attention p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 5px 0;
}

.business-preview-warning p i {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #b85c61;
}

.business-preview-warning p span {
  overflow: hidden;
  flex: 1;
  color: #606970;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-preview-warning p b {
  color: #a34b50;
  font-size: 9px;
}

.business-preview-chart {
  display: flex;
  height: 100%;
  align-items: flex-end;
  justify-content: space-around;
  gap: 7px;
  padding: 14px 5px 15px;
  border-bottom: 1px solid #dfe4e6;
}

.business-preview-chart i {
  position: relative;
  width: 16px;
  max-height: 100%;
  border-radius: 3px 3px 0 0;
  background: #aebfc8;
}

.business-preview-chart i:last-child {
  background: #315f78;
}

.business-preview-chart span {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  color: #858d93;
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
  transform: translateX(-50%);
}

.business-preview-share .business-share-row {
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 5px;
  margin: 7px 0;
}

.business-preview-share .business-share-meta,
.business-preview-share .business-share-row small {
  font-size: 8px;
}

.business-preview-share .business-share-track {
  height: 5px;
}

.business-preview-funnel p,
.business-preview-attention p {
  min-height: 19px;
  color: #687078;
  font-size: 9px;
}

.business-preview-funnel p span,
.business-preview-attention p span {
  width: 52px;
  flex: 0 0 auto;
}

.business-preview-funnel p i {
  height: 6px;
  flex: 1;
  border-radius: 3px;
  background: #7893a1;
}

.business-preview-funnel p b,
.business-preview-attention p b {
  margin-left: auto;
  color: #26343c;
}

.business-preview-attention {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.business-preview-attention p {
  min-height: 42px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #e2e6e8;
  border-radius: 5px;
  background: #fff;
}

.business-preview-attention p b {
  margin-left: 0;
  font-size: 17px;
}

.business-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.business-kpi {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.business-kpi > span {
  color: #69717a;
  font-size: 12px;
}

.business-kpi > strong {
  display: block;
  margin-top: 8px;
  color: #20262d;
  font-size: 25px;
  font-weight: 650;
  line-height: 1;
}

.business-kpi > div {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 13px;
  padding-top: 9px;
  border-top: 1px solid #ededee;
}

.business-kpi small {
  color: #858b92;
  font-size: 10px;
}

.business-kpi b {
  margin-left: 3px;
  font-weight: 600;
}

.business-kpi .is-up {
  color: #26705c;
}

.business-kpi .is-down {
  color: #a34b50;
}

.business-kpi .is-flat {
  color: #6f767e;
}

.business-analysis-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 8px;
  gap: 10px;
}

.business-widget {
  position: relative;
  container-type: inline-size;
  min-width: 0;
  height: 100%;
  align-self: stretch;
  grid-column: span var(--business-widget-span, 4);
  grid-row: span var(--business-widget-rows, 10);
  transition: opacity 160ms ease, box-shadow 220ms ease, filter 160ms ease, outline-color 160ms ease;
}

.business-widget > .business-kpi {
  height: 100%;
  overflow: auto;
}

.business-widget > .business-panel {
  height: 100%;
  overflow: auto;
}

.business-widget > .business-kpi,
.business-widget > .business-panel {
  min-height: 0;
  padding: 12px;
}

.business-widget .business-kpi > strong { margin-top: 6px; }
.business-widget .business-kpi > div { gap: 5px 10px; margin-top: 9px; padding-top: 7px; }
.business-widget .business-kpi small { white-space: nowrap; }
.business-widget .business-panel > header { min-height: 0; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; }
.business-widget .business-share-list,
.business-widget .business-funnel { gap: 8px; padding-top: 9px; }
.business-widget .business-share-meta { flex-wrap: wrap; gap: 3px 8px; }
.business-widget .business-share-meta span { white-space: normal; overflow-wrap: anywhere; }
.business-widget .business-attention-list { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin-top: 9px; }

@container (max-width: 360px) {
  .business-trend-toolbar { flex-wrap: wrap; }
  .business-trend-presets { flex-wrap: wrap; }
  .business-trend-chart { height: 130px; }
}

.business-widget-controls {
  position: absolute;
  z-index: 5;
  top: -11px;
  right: 9px;
  left: 9px;
  display: none;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.business-analysis-grid.is-editing .business-widget {
  outline: 1px solid #9fb2bc;
  outline-offset: 2px;
}

.business-analysis-grid.is-editing .business-widget:hover {
  outline-color: #557b8e;
  box-shadow: 0 5px 16px rgba(34, 58, 70, 0.1);
}

.business-analysis-grid.is-editing .business-widget-controls {
  display: flex;
}

.business-widget-controls span,
.business-widget-controls button {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #cfd8dd;
  border-radius: 12px;
  color: #586771;
  background: #fff;
  box-shadow: 0 2px 8px rgba(29, 45, 54, 0.12);
  font-size: 13px;
  pointer-events: auto;
}

.business-widget-controls button {
  width: 24px;
  padding: 0;
  color: #8e474b;
  cursor: pointer;
}

.business-widget-controls .business-widget-drag {
  width: 34px;
  cursor: grab;
  touch-action: none;
}

.business-widget-controls .business-widget-drag b {
  color: #526b78;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.business-widget-controls .business-widget-drag:active {
  cursor: grabbing;
}

.business-widget.is-dragging {
  opacity: 0.96;
  outline: 2px solid #547b8f;
  filter: saturate(0.92);
  box-shadow: 0 16px 36px rgba(29, 45, 54, 0.2);
  will-change: transform;
}

.business-analysis-grid.is-reordering {
  cursor: grabbing;
}

.business-analysis-grid.is-reordering .business-widget:not(.is-dragging) {
  outline-color: #b4c2c9;
}

.business-widget-placeholder {
  min-height: 50px;
  border: 1px dashed #8fa7b3;
  border-radius: 8px;
  outline: 0 !important;
  background: #edf3f5;
  box-shadow: inset 0 0 0 1px rgba(84, 123, 143, 0.05);
}

.business-widget-resize-handle {
  position: absolute;
  z-index: 6;
  right: -5px;
  bottom: -5px;
  display: none;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: #456879;
  border: 1px solid #b8c7ce;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(29, 45, 54, 0.13);
  cursor: nwse-resize;
  touch-action: none;
}

.business-widget-resize-handle::after {
  content: "↘";
  font-size: 13px;
  line-height: 1;
}

.business-analysis-grid.is-editing .business-widget-resize-handle {
  display: flex;
}

.business-widget.is-resizing {
  z-index: 4;
  outline: 2px solid #557b8e;
  box-shadow: 0 6px 20px rgba(34, 58, 70, 0.13);
}

.business-widget.is-resizing::before {
  position: absolute;
  z-index: 7;
  right: 22px;
  bottom: -6px;
  content: attr(data-business-widget-size) " × " attr(data-business-widget-height);
  padding: 3px 7px;
  color: #fff;
  border-radius: 9px;
  background: #315f78;
  font-size: 9px;
  line-height: 1;
}

.business-analysis-grid.is-resizing-widget .business-widget:not(.is-resizing) {
  outline-color: #c1cbd0;
}

.business-panel {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.business-panel > header {
  display: flex;
  min-height: 39px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ededee;
}

.business-panel h4 {
  font-size: 13px;
  font-weight: 650;
}

.business-trend-panel {
  min-height: 286px;
}

.business-warning-panel {
  min-height: 286px;
}

.business-warning-count {
  color: #a34b50 !important;
  font-weight: 650;
}

.business-warning-list {
  display: grid;
  gap: 1px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid #e7e8ea;
  border-radius: 6px;
  background: #e7e8ea;
}

.business-warning-groups {
  display: grid;
  gap: 9px;
  margin-top: 9px;
}

.business-warning-group {
  min-width: 0;
}

.business-warning-group-head {
  display: flex;
  min-height: 26px;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border: 1px solid #e1e5e7;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f5f7f8;
}

.business-warning-group-head strong {
  color: #3d4a51;
  font-size: 10px;
  font-weight: 650;
}

.business-warning-group-head span {
  color: #7a6265;
  font-size: 9px;
}

.business-warning-group .business-warning-list {
  margin-top: 0;
  border-radius: 0 0 6px 6px;
}

.business-warning-group-more {
  margin: 0;
  padding: 5px 8px;
  border: 1px solid #e7e8ea;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  color: #7b8389;
  background: #fafbfb;
  font-size: 9px;
}

.business-warning-group:has(.business-warning-group-more) .business-warning-list {
  border-radius: 0;
}

.business-warning-row {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 58px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 0;
  border-radius: 0;
  color: #333a41;
  background: #fff;
  text-align: left;
}

.business-warning-row:hover {
  background: #faf6f6;
}

.business-warning-row:has(.business-warning-viewed) {
  padding-top: 27px;
}

.business-warning-viewed {
  position: absolute;
  top: 6px;
  right: 8px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  color: #647981;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-warning-level {
  color: #a34b50;
  font-size: 10px;
  font-weight: 650;
}

.business-warning-main {
  min-width: 0;
}

.business-warning-main strong,
.business-warning-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-warning-main strong {
  font-size: 10px;
  font-weight: 600;
}

.business-warning-main small {
  margin-top: 2px;
  color: #838991;
  font-size: 9px;
}

.business-warning-row em {
  color: #8b5054;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.business-warning-action button {
  height: 25px;
  padding: 0 7px;
  border: 1px solid #d4dde1;
  border-radius: 5px;
  color: #315f78;
  background: #fff;
  font-size: 9px;
  white-space: nowrap;
  cursor: pointer;
}

.business-warning-action button:hover {
  border-color: #9db2bd;
  background: #eef4f6;
}

.business-warning-readonly {
  color: #969da3;
  font-size: 9px;
}

.business-warning-all {
  width: 100%;
  margin-top: 8px;
  padding: 5px;
  border: 0;
  color: #315f78;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.business-warning-modal-card {
  width: min(900px, calc(100vw - 32px));
}

.business-warning-summary {
  margin-bottom: 10px;
  color: #68717a;
  font-size: 11px;
}

.business-warning-list-all {
  max-height: min(62vh, 600px);
  overflow-y: auto;
}

.business-warning-list-all.business-warning-groups {
  padding-right: 4px;
}

.business-warning-list-all .business-warning-row {
  grid-template-columns: 70px minmax(0, 1fr) 100px 64px;
  min-height: 48px;
}

.operator-warning-panel {
  grid-column: 1 / -1;
}

.operator-warning-list {
  display: grid;
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #e5e7e9;
  border-radius: 7px;
  background: #e5e7e9;
}

.operator-warning-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  background: #fff;
}

.operator-warning-row:has(.operator-warning-viewed) {
  padding-top: 30px;
}

.operator-warning-row strong,
.operator-warning-row small,
.operator-warning-row p {
  display: block;
}

.operator-warning-row strong {
  color: #30373e;
  font-size: 12px;
}

.operator-warning-row small {
  margin-top: 3px;
  color: #8a9096;
  font-size: 10px;
}

.operator-warning-row p {
  margin: 6px 0 0;
  color: #6f5c5e;
  font-size: 10px;
}

.operator-warning-row > button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #b9c8cf;
  border-radius: 6px;
  color: #315f78;
  background: #fff;
  font-size: 10px;
  cursor: pointer;
}

.operator-warning-viewed {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #426b5f;
  font-size: 10px;
  font-weight: 600;
}

.business-trend-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  color: #737a82;
  font-size: 10px;
}

.business-trend-presets {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 2px;
  border: 1px solid #dfe3e6;
  border-radius: 7px;
  background: #f5f6f7;
}

.business-trend-presets button {
  min-width: 44px;
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  color: #606870;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.business-trend-presets button:hover {
  color: #284f64;
  background: #fff;
}

.business-trend-presets button.active {
  color: #fff;
  background: #315f78;
}

.business-trend-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.business-trend-toolbar input[type="month"] {
  width: 122px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid #d9dee2;
  border-radius: 6px;
  color: #3f474f;
  background: #fff;
  font: inherit;
}

.business-trend-toolbar > span {
  margin-left: auto;
  white-space: nowrap;
}

.business-trend-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}

.business-trend-chart {
  display: grid;
  height: 190px;
  grid-template-columns: repeat(var(--business-point-count, 6), minmax(44px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 18px 4px 0;
}

.business-trend-column {
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-rows: 18px minmax(0, 1fr) 22px;
  align-items: end;
  justify-items: center;
}

.business-trend-column strong {
  color: #737a82;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

.business-trend-column i {
  display: block;
  width: min(34px, 64%);
  min-height: 8px;
  border-radius: 4px 4px 1px 1px;
  background: #b6c7d0;
}

.business-trend-column.is-current i {
  background: #315f78;
}

.business-trend-column span {
  color: #757c84;
  font-size: 10px;
}

.business-share-list {
  display: grid;
  gap: 12px;
  padding-top: 13px;
}

.business-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 5px 10px;
  align-items: center;
}

.business-share-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.business-share-meta span {
  min-width: 0;
  overflow: hidden;
  color: #555d65;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-share-meta strong {
  flex: 0 0 auto;
  color: #30363c;
  font-size: 11px;
  font-weight: 600;
}

.business-share-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #eceef0;
}

.business-share-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6f94a8;
}

.business-share-row small {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: #777e86;
  font-size: 10px;
  text-align: right;
}

.business-empty {
  padding: 24px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.business-funnel {
  display: grid;
  gap: 10px;
  padding-top: 13px;
}

.business-funnel > div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 28px;
  gap: 9px;
  align-items: center;
}

.business-funnel span {
  color: #5f666e;
  font-size: 11px;
}

.business-funnel i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: #789aab;
}

.business-funnel strong {
  color: #343a40;
  font-size: 12px;
  text-align: right;
}

.business-attention-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid #e7e8ea;
  border-radius: 6px;
  background: #e7e8ea;
}

.business-attention-panel {
  grid-column: 1 / -1;
}

.business-attention-panel .business-attention-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.business-attention-list button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  color: #565e66;
  border: 0;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
}

.business-attention-list button:hover {
  background: #f6f8f9;
}

.business-attention-list strong {
  color: #283039;
  font-size: 15px;
}

.business-attention-list strong.is-warning {
  color: var(--red);
}

@media screen and (max-width: 1100px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    height: auto;
    margin: 0;
    gap: 6px;
    padding: 9px 10px 8px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 251, 252, 0.96);
    backdrop-filter: blur(16px);
  }

  .sidebar .brand {
    min-height: 34px;
    padding: 0 4px 7px;
    border-bottom: 0;
  }

  .sidebar .brand-mark {
    width: 30px;
    height: 30px;
  }

  .primary-nav {
    display: flex;
    gap: 4px;
    padding-bottom: 1px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 34px;
    padding: 6px 11px;
    white-space: nowrap;
  }

  .sidebar .nav-item.active {
    box-shadow: inset 0 -2px 0 #315f78;
  }

  .sidebar-status {
    display: none;
  }

  .topbar {
    position: static;
  }

  .home-dashboard,
  .workflow-system {
    --page-gutter: 20px;
    margin-right: 20px;
    margin-left: 20px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric,
  .metric:nth-child(2) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .business-widget-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-dashboard-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .business-dashboard-actions {
    margin-left: auto;
  }
}

@media screen and (max-width: 720px) {
  .sidebar {
    padding: 8px 8px 7px;
  }

  .sidebar .brand h1 {
    font-size: 13px;
  }

  .sidebar .nav-item {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 12px;
  }

  .workspace {
    padding-bottom: 14px;
  }

  .topbar {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .topbar h2 {
    font-size: 18px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
  }

  .topbar-actions > * {
    min-width: 0;
  }

  .topbar-actions .logout-button {
    padding-right: 8px;
    padding-left: 8px;
  }

  .user-chip {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .subnav-panel {
    padding: 0 12px;
  }

  .subnav {
    gap: 18px;
  }

  .home-dashboard,
  .workflow-system {
    --page-gutter: 14px;
    margin-right: 14px;
    margin-left: 14px;
  }

  .metrics-grid,
  .boss-home-compact .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
  }

  .metric {
    min-height: 76px;
    padding: 12px;
  }

  .metric strong {
    font-size: 22px;
  }

  .home-dashboard.boss-home-compact {
    grid-template-columns: 1fr;
    grid-template-areas:
      "metrics"
      "guide"
      "reminder"
      "overview";
  }

  .business-dashboard {
    padding-top: 12px;
  }

  .business-dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .business-dashboard-actions,
  .business-widget-library-head {
    width: 100%;
    flex-wrap: wrap;
  }

  .business-widget-library {
    grid-template-columns: 1fr;
  }

  .business-analysis-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .business-widget,
  .business-widget-warnings,
  .business-widget-trend,
  .business-widget-attention {
    height: auto;
    grid-column: 1;
    grid-row: auto;
  }

  .business-widget > .business-kpi,
  .business-widget > .business-panel {
    height: auto;
    overflow: visible;
  }

  .business-analysis-grid.is-editing .business-widget-resize-handle {
    display: none;
  }

  .biz-opportunity-head {
    align-items: flex-start;
  }

  .biz-opportunity-actions {
    width: 100%;
    margin-left: 0;
  }

  .biz-opportunity-body {
    overflow-x: auto;
  }

  .business-trend-panel {
    grid-column: auto;
  }

  .business-attention-panel {
    grid-column: auto;
  }

  .business-attention-panel .business-attention-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-trend-chart {
    height: 170px;
    gap: 6px;
  }

  .business-trend-toolbar {
    flex-wrap: wrap;
  }

  .business-trend-toolbar > span {
    margin-left: 0;
  }

  .business-warning-row,
  .business-warning-list-all .business-warning-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }

  .business-warning-row > em {
    display: none;
  }

  .panel,
  .submodule-detail {
    padding: 12px;
  }

  .panel-head {
    align-items: center;
    flex-direction: row;
  }

  .boss-home-compact .boss-management-overview {
    grid-template-columns: 1fr;
  }

  .boss-overview-group {
    border-right: 0;
    border-bottom: 1px solid #ececee;
  }

  .boss-overview-group:last-child {
    border-bottom: 0;
  }

  .guide-step {
    width: 100%;
    min-width: 0;
    grid-template-columns: 26px minmax(0, 1fr) auto;
  }

  .guide-step-btn {
    grid-column: auto;
  }

  .reminder-row {
    align-items: center;
    flex-direction: row;
  }

  .upload-modal-card {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
}

@media screen and (max-width: 420px) {
  .login-card {
    padding: 24px 20px;
  }

  .topbar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .user-chip {
    grid-column: 1 / -1;
  }

  .metrics-grid,
  .boss-home-compact .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Safety records have eight columns; isolate them from legacy five-column widths. */
.workflow-system.flow-active .flow-workspace .flow-safety-table {
  width: 100%;
  min-width: 920px;
  table-layout: fixed;
}
.workflow-system.flow-active .flow-workspace .flow-safety-table th,
.workflow-system.flow-active .flow-workspace .flow-safety-table td {
  box-sizing: border-box;
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.workflow-system.flow-active .flow-workspace .flow-safety-table th:nth-child(1),
.workflow-system.flow-active .flow-workspace .flow-safety-table td:nth-child(1) { width: 6%; }
.workflow-system.flow-active .flow-workspace .flow-safety-table th:nth-child(2),
.workflow-system.flow-active .flow-workspace .flow-safety-table td:nth-child(2) { width: 25%; }
.workflow-system.flow-active .flow-workspace .flow-safety-table th:nth-child(3),
.workflow-system.flow-active .flow-workspace .flow-safety-table td:nth-child(3) { width: 8%; }
.workflow-system.flow-active .flow-workspace .flow-safety-table th:nth-child(4),
.workflow-system.flow-active .flow-workspace .flow-safety-table td:nth-child(4) { width: 11%; }
.workflow-system.flow-active .flow-workspace .flow-safety-table th:nth-child(5),
.workflow-system.flow-active .flow-workspace .flow-safety-table td:nth-child(5) { width: 16%; }
.workflow-system.flow-active .flow-workspace .flow-safety-table th:nth-child(6),
.workflow-system.flow-active .flow-workspace .flow-safety-table td:nth-child(6) { width: 13%; }
.workflow-system.flow-active .flow-workspace .flow-safety-table th:nth-child(7),
.workflow-system.flow-active .flow-workspace .flow-safety-table td:nth-child(7) { width: 11%; }
.workflow-system.flow-active .flow-workspace .flow-safety-table th:nth-child(8),
.workflow-system.flow-active .flow-workspace .flow-safety-table td:nth-child(8) { width: 10%; }

.workflow-system.flow-active .flow-workspace .flow-safety-table th,
.workflow-system.flow-active .flow-workspace .flow-safety-table td:last-child button {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}
.workflow-system.flow-active .flow-workspace .flow-safety-table button {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.workflow-system.flow-active .flow-workspace .flow-safety-table td:last-child button { padding: 6px 8px; }

#analytics-chart-tooltip {
  position: fixed;
  z-index: 2000;
  max-width: min(340px, calc(100vw - 16px));
  padding: 7px 10px;
  border: 1px solid #9db9ca;
  border-radius: 5px;
  background: #f0f7fb;
  color: #315f78;
  box-shadow: 0 3px 10px rgba(49, 95, 120, .16);
  font: 500 12px/1.5 system-ui, sans-serif;
  overflow-wrap: anywhere;
  pointer-events: none;
}

/* Compact contract signing: keep the number and PDF fields above the fixed footer. */
#biz-deal-modal .contract-signing-card { width: min(1080px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
#biz-deal-modal .upload-modal-head, #biz-deal-modal .upload-modal-actions { flex: 0 0 auto; padding: 12px 18px; }
#biz-deal-modal .contract-signing-body { min-height: 0; overflow-y: auto; gap: 10px; padding: 12px 18px; }
#biz-deal-modal .biz-group-title { margin-bottom: 6px; }
#biz-deal-modal .modal-info-table th, #biz-deal-modal .modal-info-table td { padding: 7px 10px; line-height: 1.35; }
#biz-deal-modal .contract-variable-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#biz-deal-modal .contract-variable { padding: 8px 10px; }
#biz-deal-modal .contract-variable > label { margin-bottom: 4px; font-size: 12px; }
#biz-deal-modal .contract-variable-control input { height: 32px; }
#biz-deal-modal .contract-variable-control button { min-width: 64px; padding: 4px 6px; font-size: 12px; }
#biz-deal-modal .contract-variable p { min-height: 16px; margin: 3px 0 0; line-height: 16px; font-size: 11px; }
#deal-waybill-no { padding: 7px 10px; border: 1px solid #d9e0e5; border-radius: 4px; background: #f7f9fb; font-weight: 600; overflow-wrap: anywhere; }
#biz-deal-modal .contract-file-section { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.4fr); gap: 8px 14px; align-items: start; }
#biz-deal-modal .contract-file-section input { min-width: 0; width: 100%; box-sizing: border-box; min-height: 34px; padding: 5px 8px; }
@media (max-width: 760px) {
  #biz-deal-modal .contract-file-section { grid-template-columns: 1fr; }
}

#biz-deal-modal .contract-file-section .biz-field { min-width: 0; margin: 0; display: grid; gap: 4px; }
#biz-deal-modal #deal-waybill-no { min-height: 34px; box-sizing: border-box; font-size: 12px; line-height: 20px; }
#biz-deal-modal .contract-variable-control { gap: 6px; }
#biz-deal-modal .contract-variable-control input { min-width: 0; padding: 4px 6px; font-size: 12px; }
@media (max-width: 1000px) {
  #biz-deal-modal .contract-variable-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  #biz-deal-modal .contract-variable-grid { grid-template-columns: 1fr; }
}

/* Contract list: compact rows with one line of actions. */
.biz-contract-body { padding: 12px !important; }
.biz-contract-body .biz-view-toggle { margin: 0 0 12px; gap: 8px; }
.biz-contract-body .contract-list-actions { display: flex; align-items: center; justify-content: center; gap: 6px; }
.biz-contract-body .contract-list-actions button { margin: 0; flex: 0 0 auto; white-space: nowrap; }
.biz-contract-body .biz-contract-table.is-done td { padding: 9px 7px !important; }
.biz-contract-body .biz-contract-table.is-done th:nth-child(11) { width: 12%; }
.biz-contract-body .biz-contract-table-wrap { overflow-x: auto; }
.biz-contract-body .biz-contract-table.is-done { min-width: 1060px !important; }

.vehicle-archive-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.vehicle-archive-toolbar > label { flex: 0 1 360px; min-width: 0; }
.vehicle-archive-toolbar > .biz-opportunity-actions { flex: 0 0 auto; }
@media (max-width: 600px) { .vehicle-archive-toolbar { flex-wrap: wrap; } }

/* Floating analytics must not be clipped by a short work surface. */
@media (min-width: 761px) {
  .biz-analytics-card .biz-analytics-hover-panel {
    position: fixed;
    left: var(--analytics-popup-left, 16px) !important;
    top: var(--analytics-popup-top, 16px);
    right: auto !important;
    transform: none !important;
    max-width: calc(100vw - 32px);
    min-height: min(430px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    z-index: 1000;
  }
}

#vehicle-create-modal .upload-modal-card { width: min(1240px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
#vehicle-create-form { display:flex; flex-direction:column; max-height:calc(100dvh - 32px); }
#vehicle-create-form .upload-modal-body { overflow:auto; padding:12px 16px; min-height:0; }
#vehicle-create-form .upload-modal-head, #vehicle-create-form .upload-modal-actions { flex-shrink:0; padding:12px 16px; }
.vehicle-entry-section { border:1px solid #dce2e6; padding:0; margin:0 0 12px; }
.vehicle-entry-section legend { font-weight:600; font-size:13px; padding:0 8px; }
.vehicle-entry-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.vehicle-entry-grid label { display:grid; grid-template-columns:140px minmax(0,1fr); align-items:center; border:1px solid #e4e7eb; min-width:0; }
.vehicle-entry-grid label span { padding:6px; font-size:12px; background:#f5f7f9; height:100%; box-sizing:border-box; display:flex; align-items:center; }
#vehicle-create-form input:not([type=file]), #vehicle-create-form select { width:100%; min-width:0; box-sizing:border-box; border:1px solid #d8dfe5; border-radius:3px; height:30px; padding:3px 5px; font-size:12px; }
.vehicle-entry-history { margin-top:10px; border:1px solid #dce2e6; padding:8px; }
.vehicle-entry-history summary { font-size:13px; font-weight:600; cursor:pointer; }
.vehicle-entry-history table { width:100%; table-layout:fixed; border-collapse:collapse; margin:8px 0; }
.vehicle-entry-history th,.vehicle-entry-history td { border:1px solid #dce2e6; padding:4px; font-size:12px; }
.vehicle-entry-history th { background:#f5f7f9; }
.vehicle-entry-photo { display:flex; gap:12px; align-items:center; font-size:12px; flex-wrap:wrap; }
@media(max-width:1000px){.vehicle-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.vehicle-entry-grid{grid-template-columns:1fr;}}

/* Vehicle form actions use the same blue, white-text save-button treatment. */
#vehicle-create-modal button,
#vehicle-create-modal input[type="file"]::file-selector-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 36px;
  min-width: 60px;
  padding: 8px 16px;
  border: 1px solid #337fac;
  border-radius: 7px;
  background: #337fac;
  color: #fff;
  font: 600 13px/1.25 system-ui, sans-serif;
  text-shadow: none;
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
}
#vehicle-create-modal button:hover:not(:disabled),
#vehicle-create-modal input[type="file"]::file-selector-button:hover { background: #28688f; border-color: #28688f; }
#vehicle-create-modal button:focus-visible { outline: 2px solid #337fac; outline-offset: 3px; }
#vehicle-create-modal button:disabled { opacity: .5; cursor: not-allowed; }
#vehicle-create-modal input[type="file"]::file-selector-button { margin-right: 10px; }
#vehicle-create-modal .vehicle-entry-history td button { min-height: 30px; min-width: 48px; padding: 5px 10px; }
.personnel-board { padding:18px; background:#fff; border:1px solid #d8dfe5; border-radius:8px; }
.personnel-toolbar { display:flex; justify-content:space-between; align-items:center; margin:12px 0; gap:12px; }
.personnel-toolbar>div { display:flex; gap:8px; }
.personnel-board button,#personnel-modal button { border:1px solid #315f75; border-radius:7px; padding:9px 15px; background:#315f75; color:#fff; font:600 14px inherit; cursor:pointer; }
#personnel-modal [data-personnel-close] { background:#fff; color:#315f75; border-color:#d5dee5; }
#personnel-modal .upload-modal-card { width:min(900px,94vw); max-height:90vh; overflow:auto; }
.personnel-fields { display:grid; grid-template-columns:1fr 100px 2fr; gap:12px; }
#personnel-modal label { display:flex; flex-direction:column; gap:5px; font-size:13px; }
#personnel-modal input { min-width:0; padding:8px; border:1px solid #d5dee5; border-radius:5px; }
.personnel-certificate { display:grid; grid-template-columns:180px 1fr 1.5fr; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid #e2e6eb; }
.personnel-certificate img { max-width:180px; max-height:100px; object-fit:contain; }
@media(max-width:650px){.personnel-fields,.personnel-certificate{grid-template-columns:1fr;}}
#personnel-modal .upload-modal-card { width:min(1040px,94vw); }
.personnel-driver-basics { display:grid; grid-template-columns:minmax(0,1fr) 155px; gap:16px; }
.personnel-basic-grid { display:grid; grid-template-columns:1fr 1fr 1.6fr; align-items:start; gap:12px; }
#personnel-modal select { padding:8px; border:1px solid #d5dee5; border-radius:5px; background:#fff; }
#personnel-modal .personnel-certificate { grid-template-columns:minmax(170px,1fr) minmax(0,2fr); align-items:start; }
.personnel-upload { min-width:0; }
#personnel-modal input[type=file] { width:100%; box-sizing:border-box; padding:5px; font-size:12px; }
.personnel-preview { margin-top:6px; height:62px; border:1px dashed #cad5df; border-radius:5px; background:#f8fafc; display:flex; align-items:center; justify-content:center; font-size:12px; color:#7c8792; overflow:hidden; }
#personnel-modal .personnel-preview img { max-width:100%; max-height:100%; object-fit:contain; }
.personnel-portrait .personnel-preview { height:150px; background:#fff; }
@media(max-width:650px){.personnel-driver-basics,.personnel-basic-grid,#personnel-modal .personnel-certificate{grid-template-columns:1fr;}.personnel-portrait{max-width:155px;}}
/* Compact personnel form: aligned inputs and inline document thumbnails. */
#personnel-modal .upload-modal-card { width:min(960px,94vw); max-height:92vh; }
#personnel-modal .upload-modal-head { padding:12px 16px; }
#personnel-modal .upload-modal-body { padding:14px 16px; }
#personnel-modal .upload-modal-actions { padding:10px 16px; }
#personnel-modal .personnel-driver-basics { grid-template-columns:minmax(0,1fr) 130px; gap:12px; margin-bottom:10px; }
#personnel-modal .personnel-basic-grid { grid-template-columns:1.3fr 1fr .65fr; gap:10px; align-content:start; }
#personnel-modal label { gap:4px; margin:0; }
#personnel-modal input:not([type=file]),#personnel-modal select { height:32px; box-sizing:border-box; padding:5px 8px; width:100%; font-size:13px; }
#personnel-modal .personnel-basic-grid>label:nth-child(4) { grid-column:1 / 3; }
#personnel-modal .personnel-basic-grid>.personnel-upload { grid-column:1 / -1; }
#personnel-modal .personnel-upload { display:grid; grid-template-columns:minmax(0,1fr) 96px; gap:10px; align-items:center; }
#personnel-modal .personnel-preview { height:52px; margin:0; }
#personnel-modal .personnel-certificate { grid-template-columns:230px minmax(0,1fr); padding:9px 0; gap:16px; align-items:center; }
#personnel-modal .personnel-portrait .personnel-upload { display:flex; flex-direction:column; gap:6px; align-items:stretch; }
#personnel-modal .personnel-portrait .personnel-preview { height:112px; width:84px; align-self:center; }
#personnel-modal input[type=file] { height:32px; }
#personnel-modal [role=alert]:empty { display:none; }
@media(max-width:650px){
 #personnel-modal .personnel-driver-basics { grid-template-columns:1fr; }
 #personnel-modal .personnel-basic-grid { grid-template-columns:1fr 1fr; }
 #personnel-modal .personnel-basic-grid>label:nth-child(4) { grid-column:auto; }
 #personnel-modal .personnel-certificate { grid-template-columns:1fr; gap:8px; }
}
#personnel-modal .personnel-upload { display:flex; flex-direction:column; align-items:stretch; gap:4px; position:relative; font-size:13px; }
#personnel-modal .personnel-photo-input { position:absolute; width:1px; height:1px; opacity:0; padding:0; bottom:0; left:0; }
#personnel-modal .personnel-archive-section { margin-top:14px; }
#personnel-modal .personnel-archive-section h4 { margin:0 0 10px; font-size:14px; }
#personnel-modal .personnel-archive-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; }
#personnel-modal .personnel-archive-grid .personnel-upload { min-width:0; }
#personnel-modal .personnel-archive-grid>label { min-width:0; display:flex; flex-direction:column; justify-content:flex-start; font-size:13px; }
#personnel-modal .personnel-archive-grid input[name="wecomUserId"] { height:58px; min-height:58px; border-radius:5px; background:#f6f9fb; }
#personnel-modal .personnel-archive-grid img { max-width:100%; max-height:48px; object-fit:contain; }
@media(max-width:650px){#personnel-modal .personnel-archive-grid { grid-template-columns:1fr; }}
#personnel-modal button.personnel-preview { width:100%; height:58px; padding:4px; margin:0; border:1px dashed #b8cbd8; background:#f6f9fb; color:#315f75; border-radius:5px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
#personnel-modal button.personnel-preview:hover { background:#edf4f8; border-color:#315f75; }
#personnel-modal button.personnel-preview:focus-visible { outline:2px solid #347da5; outline-offset:2px; }
#personnel-modal .personnel-portrait button.personnel-preview { width:84px; height:112px; }
#personnel-photo-viewer { z-index:10050; }
#personnel-photo-viewer>section { width:min(800px,92vw); max-height:90vh; background:#fff; border-radius:8px; overflow:auto; }
#personnel-photo-viewer>section>img { display:block; max-width:calc(100% - 32px); max-height:65vh; object-fit:contain; margin:12px auto; }
#personnel-photo-viewer button { background:#315f75; color:white; border:0; border-radius:7px; padding:9px 15px; cursor:pointer; }
/* Personnel list follows the flat document-review workspace. */
.workflow-system:has(.personnel-board) > .command-panel,
.workflow-system:has(.personnel-board) .submodule-detail { border:0; border-radius:0; box-shadow:none; padding:0; margin:0; background:#fff; }
.personnel-board { padding:24px; border:0; border-radius:0; box-shadow:none; background:#fff; min-width:0; }
.personnel-heading h3 { margin:0 0 6px; font-size:20px; line-height:1.35; color:#20252b; }
.personnel-heading p { margin:0; font-size:14px; color:#69717b; }
.personnel-board .personnel-toolbar { margin:16px 0 14px; }
.personnel-board .detail-table-wrap { width:100%; overflow-x:auto; }
.personnel-board .detail-table { width:100%; min-width:600px; table-layout:fixed; }
.personnel-board .detail-table th,.personnel-board .detail-table td { text-align:center; padding:14px 12px; overflow-wrap:anywhere; }
.personnel-board .detail-table th { background:#f4f4f6; color:#5b6570; font-size:13px; }
.personnel-board .detail-table th:nth-child(1) { width:18%; }
.personnel-board .detail-table th:nth-child(2) { width:10%; }
.personnel-board .detail-table th:nth-child(3) { width:32%; }
.personnel-board .detail-table th:nth-child(4) { width:24%; }
.personnel-board .detail-table th:nth-child(5) { width:16%; }
.personnel-board [data-personnel-view],.personnel-board [data-personnel-kind][aria-pressed=false] { background:#fff; border:1px solid #cdd4d9; color:#26343e; font-weight:400; }
.personnel-board [data-personnel-view]:hover,.personnel-board [data-personnel-kind][aria-pressed=false]:hover { background:#f0f4f5; }

/* Seven-column exception lists must not inherit the generic five-column widths. */
#submodule-detail#submodule-detail .flow-workspace .detail-table-wrap:has(> .exception-table) { overflow-x: auto; }
#submodule-detail#submodule-detail .flow-workspace table.exception-table { min-width: 1050px !important; width: 100%; border-collapse: collapse; table-layout: fixed; }
#submodule-detail#submodule-detail .flow-workspace .exception-table :is(th, td) { padding: 8px 10px; height: auto; line-height: 1.5; vertical-align: middle; }
#submodule-detail .flow-workspace .exception-table :is(th, td):nth-child(1) { width: 6%; text-align: center; }
#submodule-detail .flow-workspace .exception-table :is(th, td):nth-child(2) { width: 29%; text-align: left; }
#submodule-detail .flow-workspace .exception-table :is(th, td):nth-child(3) { width: 15%; text-align: left; }
#submodule-detail .flow-workspace .exception-table :is(th, td):nth-child(4) { width: 21%; text-align: left; }
#submodule-detail .flow-workspace .exception-table :is(th, td):nth-child(5) { width: 13%; text-align: center; }
#submodule-detail .flow-workspace .exception-table :is(th, td):nth-child(6) { width: 7%; text-align: center; white-space: nowrap; }
#submodule-detail .flow-workspace .exception-table :is(th, td):nth-child(7) { width: 9%; text-align: center; white-space: nowrap; }
#submodule-detail .flow-workspace .exception-table button { max-width: 100%; min-width: 0; padding: 6px 8px; font-size: 12px; white-space: nowrap; }

/* Keep exception filters aligned independently of generic action toolbars. */
#submodule-detail .exception-board .flow-heading { margin: 0 0 16px; padding: 0; }
#submodule-detail .exception-board .flow-heading h4 { margin: 0; font-size: 20px; line-height: 1.4; }
#submodule-detail .exception-board .exception-metrics { margin: 0 0 18px; }
#submodule-detail .exception-board .exception-metrics > div { padding: 12px 18px; min-width: 0; }
#submodule-detail .exception-board .exception-metrics span { font-size: 13px; line-height: 20px; }
#submodule-detail .exception-board .exception-metrics strong { font-size: 24px; line-height: 30px; margin-top: 4px; }
#submodule-detail .exception-board #exception-search { display: grid; grid-template-columns: minmax(180px, 260px) minmax(160px, 220px) 180px auto auto; justify-content: start; align-items: end; gap: 12px; margin: 0 0 18px; }
#submodule-detail .exception-board #exception-search label { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; font-size: 13px; line-height: 20px; }
#submodule-detail .exception-board #exception-search :is(input, select) { box-sizing: border-box; width: 100%; min-width: 0; max-width: none; height: 36px; min-height: 36px; padding: 6px 10px; margin: 0; font: inherit; border: 1px solid #cbd5df; border-radius: 4px; background: #fff; }
#submodule-detail .exception-board #exception-search button { box-sizing: border-box; height: 36px; min-height: 36px; padding: 6px 16px; margin: 0; font-size: 13px; white-space: nowrap; }
#submodule-detail .exception-board .flow-list-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
#submodule-detail .exception-board .flow-list-filters button { box-sizing: border-box; width: auto; min-width: 80px; height: 34px; min-height: 34px; margin: 0; padding: 6px 14px; font-size: 13px; line-height: 20px; white-space: nowrap; }
#submodule-detail .exception-board .flow-list-filters button[data-exception-batch] { margin-left: auto; }
#submodule-detail .exception-board .flow-list-filters [data-exception-batch]:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 1100px) {
  #submodule-detail .exception-board #exception-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #submodule-detail .exception-board #exception-search label:last-of-type { grid-column: 1 / -1; max-width: 240px; }
}
@media (max-width: 600px) {
  #submodule-detail .exception-board .exception-metrics > div { padding: 10px 12px; }
  #submodule-detail .exception-board #exception-search { gap: 10px; }
  #submodule-detail .exception-board #exception-search label { grid-column: 1 / -1; }
  #submodule-detail .exception-board #exception-search label:last-of-type { max-width: none; }
  #submodule-detail .exception-board .flow-list-filters button { flex: 1 0 auto; min-width: 64px; padding: 6px 10px; }
}

#flow-modal .exception-review-dialog { width: min(940px, calc(100vw - 32px)); max-width: 940px; max-height: calc(100dvh - 32px); overflow: hidden; }
#flow-modal .exception-review-dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); min-height: 0; }
#flow-modal .exception-review-dialog .upload-modal-head,
#flow-modal .exception-review-dialog .upload-modal-actions { flex: 0 0 auto; padding: 12px 20px; }
#flow-modal .exception-review-dialog .upload-modal-body { padding: 16px 20px; max-height: none; min-height: 0; overflow-y: auto; overflow-x: hidden; }
#flow-modal .exception-review-dialog p { margin: 0 0 8px; line-height: 1.5; overflow-wrap: anywhere; }
#flow-modal .exception-review-dialog .flow-section { margin: 10px 0; padding: 12px 0 0; }
#flow-modal .exception-review-dialog h5 { margin: 0 0 8px; font-size: 15px; }
#flow-modal .exception-review-dialog .biz-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin-top: 12px; align-items: start; }
#flow-modal .exception-review-dialog .biz-field { display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; min-width: 0; margin: 0; font-size: 13px; line-height: 1.5; }
#flow-modal .exception-review-dialog :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; margin: 0; padding: 8px 10px; font: inherit; border: 1px solid #cdd4dc; border-radius: 6px; background: #fff; }
#flow-modal .exception-review-dialog :is(input, select) { height: 38px; }
.annual-review-workspace:not(.archive-folder-open) > .sample-panel { display: none; }
.annual-review-workspace.archive-folder-open > .annual-plan-board,
.annual-review-workspace.archive-folder-open > .annual-folder-section { display: none; }
.archive-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid #d4dfe6; }
.archive-breadcrumb button { white-space: normal; overflow-wrap: anywhere; text-align: left; }
.archive-directory-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; }
.archive-directory-head > span { color: #697681; font-size: 12px; }
.archive-directory-head > button { margin-left: auto; }
.archive-directory-list { border: 1px solid #d4dfe6; border-radius: 6px; overflow: hidden; }
.archive-directory-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 48px; border: 0; border-radius: 0; border-bottom: 1px solid #e4e9ed; background: #fff; text-align: left; padding: 10px 14px; }
.archive-directory-row strong, .archive-document-row summary > span:last-child { overflow-wrap: anywhere; min-width: 0; }
.archive-directory-row > span:last-child { font-size: 12px; color: #697681; }
.archive-folder-icon { width: 20px; height: 14px; border-radius: 2px; background: #dba942; position: relative; }
.archive-folder-icon::before { content: ''; position: absolute; left: 0; top: -4px; width: 9px; height: 5px; border-radius: 2px 2px 0 0; background: #dba942; }
.archive-document-icon { width: 15px; height: 20px; border: 1px solid #91a7b4; border-radius: 2px; background: #f4f8fa; }
.archive-document-row { border-bottom: 1px solid #e4e9ed; }
.archive-document-row:last-child { border-bottom: 0; }
.archive-document-row summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 46px; cursor: pointer; list-style: none; }
.archive-document-row summary::-webkit-details-marker { display: none; }
.archive-document-row summary:hover, .archive-document-row[open] summary { background: #f1f6f8; }
.archive-document-row summary:focus-visible { outline: 2px solid #317997; outline-offset: -2px; }
.archive-document-icon { flex-shrink: 0; }
.archive-document-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 14px 12px 41px; }
.archive-month-file { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; }
.archive-month-file:nth-child(even) { background: #f5f8fa; }
#hq-3check-modal .check-record-detail { width: min(1180px, 96vw); max-width: 1180px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
#hq-3check-modal .check-record-detail .upload-modal-head { flex: 0 0 auto; padding: 14px 18px; }
#hq-3check-modal .check-record-detail .upload-modal-head h3 { margin: 0; font-size: 17px; }
#hq-3check-modal .check-record-detail .upload-modal-body { display: block; padding: 16px; overflow: auto; min-height: 0; max-height: none; }
#hq-3check-modal .check-record-detail .modal-info-table { position: static; display: table; width: 100%; margin: 0; table-layout: fixed; border-collapse: collapse; }
#hq-3check-modal .check-record-detail .modal-info-table th { width: 13%; }
#hq-3check-modal .check-record-detail .modal-info-table td { width: auto; overflow-wrap: anywhere; }
#hq-3check-modal .check-record-detail th, #hq-3check-modal .check-record-detail td { padding: 8px 10px; line-height: 1.5; font-size: 13px; vertical-align: top; }
#hq-3check-modal .check-detail-section { display: block; width: 100%; margin: 16px 0 0; padding: 0; }
#hq-3check-modal .check-detail-section h4 { margin: 0 0 8px; font-size: 14px; }
#hq-3check-modal .check-detail-table { width: 100%; max-width: none; overflow-x: auto; }
#hq-3check-modal .check-detail-table table { width: 100%; min-width: 700px; table-layout: fixed; border-collapse: collapse; }
#hq-3check-modal .check-detail-table th, #hq-3check-modal .check-detail-table td { white-space: normal; overflow-wrap: anywhere; width: auto; }
#hq-3check-modal .check-detail-table tbody tr:nth-child(even) { background: #f6f8fa; }
#hq-3check-modal .check-detail-attachments { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; align-items: start; }
#hq-3check-modal .check-detail-attachments .hq-preview-card { width: auto; min-width: 0; margin: 0; padding: 10px; }
#hq-3check-modal .check-detail-attachments .hq-preview-media { display: flex; align-items: center; justify-content: center; height: 240px; width: 100%; margin: 8px 0; background: #f5f7f9; overflow: hidden; }
#hq-3check-modal .check-detail-attachments img, #hq-3check-modal .check-detail-attachments iframe { width: 100%; height: 100%; object-fit: contain; border: 0; }
#hq-3check-modal .check-detail-attachments .hq-preview-meta { overflow-wrap: anywhere; font-size: 12px; }
.vehicle-entry-photos {display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin-top:16px;}
#vehicle-create-form .vehicle-entry-photos .vehicle-entry-photo {display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;margin:0;padding:12px;border:1px solid #d5e0e7;border-radius:5px;background:#f7fafb;}
#vehicle-create-form .vehicle-entry-photos input {max-width:100%;min-width:0;}
#vehicle-create-form .vehicle-entry-photos img {width:100%;height:150px;object-fit:contain;}
@media(max-width:600px){.vehicle-entry-photos{grid-template-columns:1fr;}}
.archive-file-name { overflow-wrap: anywhere; }
.archive-project-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,22%) 200px; align-items: center; gap: 12px; border-bottom: 1px solid #e4e9ed; padding-right: 12px; }
.archive-project-row:last-child { border-bottom: 0; }
.archive-submission-status { flex: 0 1 320px; min-width: 0; padding: 8px 0; font-size: 12px; }
.archive-submission-status strong { display: block; color: #315f78; }
.archive-submission-status small { display: block; margin-top: 4px; color: #626d79; overflow-wrap: anywhere; }
.archive-project-row .archive-directory-row { flex: 1; min-width: 0; border: 0; }
@media (max-width: 900px) {
  .archive-project-row { grid-template-columns: minmax(0,1fr) 200px; }
  .archive-project-row .archive-directory-row { grid-column: 1 / -1; }
  .archive-submission-status { flex: 1 1 180px; padding-left: 12px; }
}
.archive-project-row .archive-document-actions { justify-content: flex-end; min-width: 0; padding: 0; gap: 8px; }
.archive-project-row .sample-download-link, .archive-material-toolbar .sample-download-link { display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid #b5cbd9; border-radius: 5px; color: #315f78; text-decoration: none; white-space: nowrap; }
.archive-material-toolbar { display: flex; justify-content: flex-end; padding: 0 0 12px; }
.archive-material-toolbar .archive-document-actions { padding: 0; }
.archive-file-name small { display: block; font-size: 12px; color: #657583; padding-top: 4px; }
@media (max-width: 620px) {
  .archive-project-row { grid-template-columns: minmax(0,1fr) 170px; gap: 6px; padding-right: 6px; }
  .archive-project-row .archive-document-actions { gap: 4px; }
  .archive-project-row .archive-document-actions > * { padding: 6px; font-size: 12px; white-space: nowrap; }
}
.archive-file-status { color: #657583; font-size: 12px; }
.qualification-new-table { overflow-x: auto; width: 100%; margin: 10px 0 16px; }
.qualification-new-table table { width: 100%; min-width: 700px; border-collapse: collapse; table-layout: fixed; }
.qualification-new-table th, .qualification-new-table td { white-space: normal; overflow-wrap: anywhere; padding: 8px 10px; border: 1px solid #d8e2e9; font-size: 13px; text-align: left; }
.qualification-new-table th { background: #f3f6f8; }
.qualification-new-table button { margin-top: 6px; }
.qualification-new-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.qualification-new-fields label { display: grid; gap: 5px; min-width: 0; }
.qualification-new-fields label[hidden] { display: none; }
.qualification-new-fields input, .qualification-new-fields select { width: 100%; min-width: 0; padding: 8px; border: 1px solid #bccedb; border-radius: 4px; }
.new-qualification-section { margin-top: 16px; border-top: 1px solid #d8e2e9; }
@media(max-width:620px) { .qualification-new-fields { grid-template-columns: minmax(0,1fr); } }
.detail-table.hq-three-check-table { width: 100%; min-width: 0; overflow-x: auto; }
.detail-table.hq-three-check-table table { width: 100%; min-width: 900px; table-layout: fixed; }
.detail-table.hq-three-check-table th, .detail-table.hq-three-check-table td { width: auto; white-space: normal; overflow-wrap: anywhere; word-break: normal; vertical-align: middle; padding: 10px 12px; line-height: 1.5; }
.detail-table.hq-three-check-table .check-company-cell { font-weight: 600; }
.detail-table.hq-three-check-table .check-waybill-cell { white-space: normal; overflow-wrap: anywhere; }
.detail-table.hq-three-check-table td:last-child button { white-space: nowrap; }
#sample-panel .archive-filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px 12px; background: #f5f8fa; border-bottom: 1px solid #d5e0e7; }
#sample-panel .archive-filter-bar label { display: grid; gap: 5px; min-width: 130px; flex: 1 1 130px; color: #607180; font-size: 12px; }
#sample-panel .archive-filter-bar .archive-filter-search { flex: 2 1 180px; }
#sample-panel .archive-filter-bar input, #sample-panel .archive-filter-bar select { width: 100%; min-width: 0; height: 36px; padding: 6px 9px; border: 1px solid #b9cddd; border-radius: 4px; background: #fff; color: #243743; font: inherit; font-size: 13px; }
#sample-panel .archive-filter-bar input:disabled { background: #edf1f4; color: #647583; }
#sample-panel .archive-material-summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px; }
#sample-panel .archive-material-summary .archive-document-actions { padding: 0; }
#sample-panel .archive-material-table { width: 100%; overflow-x: auto; }
#sample-panel .archive-material-table table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: auto; }
#sample-panel .archive-material-table th { background: #f3f6f8; color: #576773; font-weight: 600; text-align: left; }
#sample-panel .archive-material-table th, #sample-panel .archive-material-table td { padding: 10px 12px; font-size: 13px; border: 0; border-bottom: 1px solid #dde5eb; overflow-wrap: anywhere; vertical-align: middle; }
#sample-panel .archive-material-table td:first-child { min-width: 150px; max-width: 380px; }
#sample-panel .archive-material-table td:nth-last-child(2), #sample-panel .archive-material-table td:last-child { white-space: nowrap; }
#sample-panel .archive-material-table small { display: block; margin-top: 3px; color: #657583; font-size: 12px; }
#sample-panel .archive-material-summary .sample-download-link, #sample-panel .archive-material-table .sample-download-link { display: inline-flex; padding: 7px 12px; border: 1px solid #b5cbd9; border-radius: 4px; color: #315f78; text-decoration: none; white-space: nowrap; }
#sample-panel .archive-breadcrumb strong { min-width: 0; overflow-wrap: anywhere; }
.archive-month-file .archive-document-actions { padding: 0; flex-wrap: nowrap; gap: 8px; }
.archive-month-file .sample-download-link { display: inline-flex; padding: 7px 12px; border: 1px solid #b5cbd9; border-radius: 5px; color: #315f78; text-decoration: none; white-space: nowrap; }
.archive-month-file button { white-space: nowrap; }
@media (max-width: 620px) {
  .archive-month-file { grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; padding: 8px; }
  .archive-month-file .archive-file-status { grid-column: 2; }
  .archive-month-file .archive-document-actions { grid-column: 3; grid-row: 1 / span 2; }
}
#flow-modal .exception-review-dialog textarea { height: 78px; min-height: 78px; resize: vertical; }
#flow-modal .exception-review-dialog label:has(input[type="file"]) { grid-column: 1 / -1; }
#flow-modal .exception-review-dialog input[type="file"] { height: 42px; padding: 6px 8px; overflow: hidden; }
#flow-modal .exception-review-dialog #flow-error:empty { display: none; }
@media (max-width: 620px) {
  #flow-modal .exception-review-dialog .biz-field-grid { grid-template-columns: minmax(0, 1fr); }
  #flow-modal .exception-review-dialog .upload-modal-body { padding: 12px 16px; }
}
