:root {
  --red: #d71920;
  --red-dark: #b8141a;
  --ink: #111111;
  --muted: #666666;
  --line: #e2e2e2;
  --nav-hover: #fafafa;
  --white: #ffffff;
  font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; min-height: 100%; margin: 0; background: var(--white); }
body { min-width: 0; }
button, input, select, textarea { font: inherit; font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif; }
.form-hint { color: #999; font-size: 12px; font-weight: 400; margin-left: 4px; }

/* 订单表单的填写职责提示保持在对应标题后，不改变布局尺寸。 */
.product-order-file-section:has(#productMaterialList) h3::after,
.product-order-file-section:has(#internalMaterialList) h3::after,
.product-order-file-section:has(#afterSalesMaterialList) h3::after {
  content: "（设计师填写）";
  color: #999;
  font-size: 12px;
  font-weight: 400;
  margin-left: 4px;
}
.product-order-transaction:has(#productPurchaseBody) h3::after {
  content: "（采购填写）";
  color: #999;
  font-size: 12px;
  font-weight: 400;
  margin-left: 4px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { text-align: center; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid #e85a5f; outline-offset: 2px; }
button:disabled { cursor: wait; opacity: .7; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }

/* 启动阶段不提前展示登录页，避免刷新时出现登录页闪现。 */
.boot-view { min-height: 100vh; display: grid; place-items: center; padding: 32px; color: #333; background: var(--white); }
.boot-panel { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; color: #555; font-size: 15px; }
.boot-spinner { width: 16px; height: 16px; border: 2px solid #e5e5e5; border-top-color: var(--red); border-radius: 50%; animation: boot-spin .8s linear infinite; }
@keyframes boot-spin { to { transform: rotate(360deg); } }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: var(--white); }
.login-card { width: min(520px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.login-brand { display: flex; align-items: center; gap: 16px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; color: var(--white); background: var(--red); border-radius: 6px; font-weight: 700; font-size: 18px; }
.login-brand h1 { margin: 0 0 6px; color: #000; font-size: 22px; }
.login-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 18px; }
.login-form label { display: grid; gap: 8px; color: #000; font-size: 14px; font-weight: 600; }
.login-form input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #d2d2d2; border-radius: 4px; color: #000; background: #fff; }
.form-error { min-height: 18px; margin: -8px 0 0; color: var(--red); font-size: 13px; }

.btn { min-height: 34px; padding: 0 13px; border: 1px solid #d0d0d0; border-radius: 4px; color: #000; background: #fff; font-size: 14px; }
.btn-primary { border-color: var(--red); color: #fff; background: var(--red); }
.btn-primary:hover { border-color: var(--red-dark); background: var(--red-dark); }
.btn-text { border-color: transparent; background: transparent; }
.btn-wide { width: 100%; min-height: 42px; }

.app-view { display: grid; grid-template-rows: 58px minmax(0, 1fr); height: 100vh; min-height: 0; overflow: hidden; background: var(--white); }
.topbar { position: relative; z-index: 20; height: 58px; display: grid; grid-template-columns: 190px minmax(0, 1fr) 190px; align-items: center; padding: 0; color: #000; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-logo { width: 190px; height: 58px; display: flex; align-items: center; padding: 0 12px; border-right: 1px solid var(--line); }
.topbar-logo img { display: block; width: 166px; max-width: 100%; max-height: 34px; object-fit: contain; object-position: left center; }
.topbar-title { position: absolute; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; margin: 0; color: #000; font-size: 20px; line-height: 1; white-space: nowrap; }
.business-year-control { display: inline-flex; align-items: center; gap: 5px; color: #666; font-size: 12px; font-weight: 400; }
.business-year-control select { min-width: 76px; height: 28px; padding: 3px 6px; border: 1px solid #d4d4d4; border-radius: 3px; color: #222; background: #fff; font: inherit; }
.topbar-actions { grid-column: 3; width: 190px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 0 12px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.app-shell { display: grid; grid-template-columns: 190px minmax(0, 1fr); height: 100%; min-height: 0; overflow: hidden; background: var(--white); }
.sidebar { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; background: var(--white); border-right: 1px solid var(--line); }
.sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 8px 18px; }
.nav-section + .nav-section { margin-top: 8px; }
.nav-caption { padding: 16px 10px 6px; color: #777; font-size: 11px; }
.nav-parent, .nav-item { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 8px; margin: 2px 0; padding: 0 12px; border: 0; border-radius: 6px; color: #000; background: transparent; text-align: left; transition: color .16s, background .16s, box-shadow .16s; }
.nav-parent { font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif; font-size: 15px; font-weight: 700; }
.nav-parent .nav-icon { flex: 0 0 20px; width: 20px; color: #4c4c4c; font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Noto Sans Symbols", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1; text-align: center; }
.nav-parent .nav-label { flex: 1; }
.nav-parent .arrow { margin-left: auto; color: #999; font-size: 12px; transition: transform .16s; }
.nav-parent[aria-expanded="true"] .arrow { transform: rotate(180deg); }
.nav-parent:hover, .nav-item:hover { background: #f7f7f7; }
.nav-parent.active { color: var(--red); background: #fff5f5; box-shadow: inset 3px 0 0 var(--red); }
.nav-submenu { display: none; padding: 2px 0 6px; }
.nav-submenu.open { display: block; }
.nav-item { min-height: 34px; padding-left: 28px; color: #444; font-size: 14px; font-weight: 400; }
.nav-item-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; border-radius: 9px; color: #fff; background: #c75b5b; font-size: 11px; line-height: 18px; text-align: center; }
.nav-item.active { color: var(--red); background: #fff8f8; box-shadow: inset 3px 0 0 var(--red); }
.sidebar footer { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 16px 18px; border-top: 1px solid var(--line); color: #777; font-size: 12px; }
.sidebar footer i { width: 7px; height: 7px; border-radius: 50%; background: #44a66d; }

.content { min-width: 0; min-height: 0; height: 100%; padding: 24px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: var(--white); }
.empty-workspace { min-height: calc(100vh - 106px); background: var(--white); }

/* 成员信息：仅实现用户确认的两个标签和成员档案表格。 */
.member-page { min-height: calc(100vh - 106px); }
.member-tabs { display: flex; align-items: flex-end; gap: 24px; height: 44px; border-bottom: 1px solid var(--line); }
.member-tab { height: 44px; padding: 0 4px; border: 0; border-bottom: 2px solid transparent; color: #555; background: transparent; font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif; font-size: 16px; }
.member-tab:hover { color: #000; }
.member-tab.active { border-bottom-color: var(--red); color: var(--red); font-weight: 700; }
.basic-info-tabs { height: auto; min-height: 44px; flex-wrap: wrap; align-content: flex-end; column-gap: 22px; row-gap: 0; }
.basic-info-panel { padding-top: 20px; }
.basic-info-table .basic-info-description-col { width: 38%; }
.member-panel { padding-top: 20px; }
.member-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-bottom: 14px; }
#pageRoot[data-active-module="product-orders"] .member-panel,
#pageRoot[data-active-module="material-orders"] .member-panel,
#pageRoot[data-active-module="internal-orders"] .member-panel,
#pageRoot[data-active-module="after-sales-orders"] .member-panel,
#pageRoot[data-active-module="order-payments"] .member-panel,
#pageRoot[data-active-module="promotion-info"] .member-panel,
#pageRoot[data-active-module="approval-forms"] .member-panel,
#pageRoot[data-active-module="payment-orders"] .member-panel,
#pageRoot[data-active-module="production-term"] .member-panel,
#pageRoot[data-active-module="purchase-orders"] .member-panel,
#pageRoot[data-active-module="purchase-receipts"] .member-panel,
#pageRoot[data-active-module="other-inbound"] .member-panel,
#pageRoot[data-active-module="inventory"] .member-panel,
#pageRoot[data-active-module="inbound-details"] .member-panel,
#pageRoot[data-active-module="outbound-orders"] .member-panel,
#pageRoot[data-active-module="outbound-details"] .member-panel { padding-top: 0; }
#pageRoot[data-active-module="product-orders"] .member-toolbar,
#pageRoot[data-active-module="material-orders"] .member-toolbar,
#pageRoot[data-active-module="internal-orders"] .member-toolbar,
#pageRoot[data-active-module="after-sales-orders"] .member-toolbar,
#pageRoot[data-active-module="order-payments"] .member-toolbar,
#pageRoot[data-active-module="promotion-info"] .member-toolbar,
#pageRoot[data-active-module="approval-forms"] .member-toolbar,
#pageRoot[data-active-module="payment-orders"] .member-toolbar,
#pageRoot[data-active-module="production-term"] .member-toolbar,
#pageRoot[data-active-module="purchase-orders"] .member-toolbar,
#pageRoot[data-active-module="purchase-receipts"] .member-toolbar,
#pageRoot[data-active-module="other-inbound"] .member-toolbar,
#pageRoot[data-active-module="inventory"] .member-toolbar,
#pageRoot[data-active-module="inbound-details"] .member-toolbar,
#pageRoot[data-active-module="outbound-orders"] .member-toolbar,
#pageRoot[data-active-module="outbound-details"] .member-toolbar { min-height: 36px; }
.member-toolbar h1 { margin: 0; color: #000; font-size: 18px; line-height: 1; }
.member-toolbar-actions { display: flex; align-items: center; gap: 5px; }
.member-toolbar .btn { width: 59px; }
.member-toolbar .btn-danger-outline { width: auto; }
.btn-danger-outline { border-color: var(--red); color: var(--red); background: #fff; }
.btn-danger-outline:hover { border-color: var(--red-dark); color: var(--red-dark); background: #fff7f7; }
.member-table-wrap { width: 100%; overflow: hidden; }
.member-table, .member-form-table { width: 100%; border: 1px solid var(--line); border-collapse: collapse; table-layout: fixed; }
.member-table th, .member-table td { min-width: 0; height: 44px; padding: 8px 10px; overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #000; font-size: 14px; text-align: left; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.member-table th { background: #fafafa; font-weight: 700; }
.member-table th:not(.check-col):not(.serial-col):not(.member-action-col) { position: relative; padding-right: 16px; }
.member-table th.member-filterable:not(.check-col):not(.serial-col):not(.member-action-col) { padding-right: 41px; }
.member-table th.member-filterable > .table-filter-label { display: block; width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-filter-button { position: absolute; z-index: 4; top: 50%; right: 10px; width: 20px; height: 26px; padding: 0; border: 0; color: #777; background: transparent; transform: translateY(-50%); cursor: pointer; touch-action: manipulation; }
.member-filter-button span { position: absolute; inset: 0; pointer-events: none; }
.member-filter-button span::before { content: ''; position: absolute; top: 7px; left: 4px; width: 0; height: 0; border-right: 6px solid transparent; border-left: 6px solid transparent; border-top: 7px solid currentColor; }
.member-filter-button span::after { content: ''; position: absolute; top: 14px; left: 9px; width: 2px; height: 5px; background: currentColor; }
.member-filter-button:hover, .member-filter-button.active { color: var(--red); background: #fff1f1; }
.member-filter-mask { position: fixed; z-index: 40; inset: 0; background: transparent; }
.member-filter-menu { position: absolute; z-index: 41; width: 232px; border: 1px solid #bfbfbf; box-shadow: 0 4px 14px rgba(0, 0, 0, .16); background: #fff; color: #222; font-size: 13px; }
.member-filter-menu.inventory-filter-menu { width: 270px; }
.member-filter-menu-actions { display: flex; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid #e5e5e5; }
.member-filter-menu-actions .member-filter-all { display: inline-flex; align-items: center; gap: 7px; color: #555; cursor: pointer; }
.member-filter-menu-actions .member-filter-all input { width: 15px; height: 15px; margin: 0; accent-color: var(--red); }
.member-filter-menu-actions button { padding: 0; border: 0; color: #555; background: transparent; font: inherit; cursor: pointer; }
.member-filter-menu-actions button:hover { color: var(--red); }
.member-filter-search { padding: 8px 10px 2px; }
.member-filter-search input { width: 100%; height: 30px; padding: 4px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #222; background: #fff; font: inherit; }
.member-filter-search input:focus { border-color: var(--red); outline: 0; }
.member-filter-options { max-height: 220px; padding: 6px 10px; overflow: auto; }
.member-filter-options label { display: flex; align-items: center; gap: 7px; min-height: 28px; cursor: pointer; }
.member-filter-options input { width: 15px; height: 15px; margin: 0; accent-color: var(--red); }
.member-filter-menu-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 10px; border-top: 1px solid #e5e5e5; }
.member-table tr > :last-child { border-right: 0; }
.member-table tbody tr:last-child td { border-bottom: 0; }
table tbody td[data-table-cell-filled="true"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
table tbody td[data-table-cell-filled="true"] select,
table tbody td[data-table-cell-filled="true"] textarea { border-color: transparent !important; outline-color: transparent; background-color: transparent !important; box-shadow: none; }
table tbody td[data-table-cell-filled="true"] select { appearance: none; -webkit-appearance: none; padding-right: 4px; cursor: pointer; }
table tbody td[data-table-cell-filled="true"]:hover input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
table tbody td[data-table-cell-filled="true"]:hover select,
table tbody td[data-table-cell-filled="true"]:hover textarea,
table tbody td[data-table-cell-filled="true"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus,
table tbody td[data-table-cell-filled="true"] select:focus,
table tbody td[data-table-cell-filled="true"] textarea:focus { border-color: #d4d4d4 !important; outline-color: var(--red); background-color: #fff !important; box-shadow: none; }
table tbody td[data-table-cell-filled="true"] select:focus { appearance: auto; -webkit-appearance: auto; }
.member-table .check-col { width: 44px; text-align: center; }
.member-table .serial-col { width: 56px; text-align: center; }
.member-table .member-action-col { width: 82px; border-left: 1px solid var(--line); text-align: center; }
.member-info-table th, .member-info-table td { text-align: center; }
.member-resize-handle { position: absolute; z-index: 1; top: 0; right: -8px; bottom: 0; width: 16px; cursor: col-resize; touch-action: none; }
.member-resize-handle::after { content: ''; position: absolute; top: 10px; right: 7px; bottom: 10px; width: 2px; background: #cfcfcf; transition: background .16s; }
.member-resize-handle:hover::after, .member-column-resizing .member-resize-handle::after { background: var(--red); }
.member-column-resizing, .member-column-resizing * { cursor: col-resize !important; user-select: none !important; }
.member-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; vertical-align: middle; accent-color: var(--red); }
.member-table .member-actions { overflow: visible; text-align: center; text-overflow: clip; white-space: nowrap; }
#approvalTodosTable .approval-table .member-action-col { width: 180px; min-width: 180px; }
#approvalTodosTable .approval-table .member-actions { min-width: 0; padding-right: 8px; padding-left: 8px; vertical-align: middle; white-space: nowrap; }
#approvalTodosTable .approval-table .member-actions .link-button { display: inline-block; white-space: nowrap; }
.table-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 48px; color: #666; font-size: 13px; }
.table-pagination-total { margin-right: 6px; color: #444; }
.table-pagination label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.table-pagination select { min-width: 58px; height: 30px; padding: 3px 6px; border: 1px solid #d4d4d4; border-radius: 3px; color: #222; background: #fff; font: inherit; text-align: center; }
.table-pagination-button { min-width: 58px; height: 30px; padding: 0 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #333; background: #fff; font: inherit; cursor: pointer; }
.table-pagination-button:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.table-pagination-button:disabled { color: #bbb; background: #fafafa; cursor: not-allowed; }
.link-button { padding: 0; border: 0; color: var(--red); background: transparent; font-family: inherit; font-size: 14px; }
.member-empty-cell, .member-empty { color: #777; font-size: 14px; text-align: center; }
.member-empty-cell { height: 148px !important; }
.member-error { color: var(--red); }
.member-empty { min-height: 160px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); margin-top: 20px; }
.table-overflow-tooltip { position: fixed; z-index: 1000; max-width: min(560px, calc(100vw - 16px)); max-height: min(45vh, 360px); padding: 8px 10px; overflow: auto; border: 1px solid #555; border-radius: 3px; color: #fff; background: rgba(30, 30, 30, .96); box-shadow: 0 4px 14px rgba(0, 0, 0, .22); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; pointer-events: none; }
.table-overflow-tooltip[hidden] { display: none; }
.basic-info-table { font-size: 14px; }
.basic-info-table th, .basic-info-table td { padding: 7px 6px; font-size: 14px; }
.basic-info-table tbody td { text-align: center; }
.basic-info-table tbody td.basic-info-supplier-cell { text-align: left; }
.basic-info-table .member-action-col { width: 154px; }
.basic-info-table .member-actions .link-button { margin: 0 4px; }
.basic-info-import-button { border-color: var(--red); color: var(--red); background: #fff; }
.basic-info-import-button:hover { border-color: var(--red-dark); color: var(--red-dark); background: #fff7f7; }
.basic-info-table .basic-info-col-imageData { width: 82px; }
.basic-info-table .basic-info-col-code { width: 88px; }
.basic-info-table .basic-info-col-safetyStock { width: 76px; }
.basic-info-image-cell { padding: 3px !important; text-align: center !important; }
.basic-info-image-button { display: inline-flex; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); background: #fafafa; cursor: pointer; }
.basic-info-image-button img { width: 100%; height: 100%; object-fit: contain; }
.basic-info-image-preview { min-height: 24px; margin-top: 8px; color: #888; font-size: 12px; }
.basic-info-image-preview img { display: block; max-width: 180px; max-height: 120px; object-fit: contain; }
.basic-info-image-preview-row { display: flex; align-items: flex-end; gap: 10px; }
.basic-info-image-preview .basic-info-image-delete { width: auto; min-height: 30px; padding: 0 9px; font-size: 12px; }
.basic-info-view-image { display: block; max-width: 360px; max-height: 260px; object-fit: contain; }
.finance-panel { padding-top: 0; }
.approval-page:has(#approvalTodosTable) .member-panel { padding-top: 0; }
.finance-table-wrap { overflow: hidden; }
.finance-table { font-size: 13px; }
.finance-table th, .finance-table td { padding: 7px 6px; font-size: 13px; text-align: center; }
.finance-table input, .finance-table select { text-align: center; }
.finance-table .member-action-col { width: 126px; }
.finance-table .member-actions .link-button { margin: 0 4px; }
.finance-table .member-actions .finance-row-action { margin: 0; font-size: 12px; }
.finance-table .member-actions .finance-row-action:not([hidden]) ~ .finance-row-action:not([hidden]) { margin-left: 8px; }
.reimbursement-table td.reimbursement-summary-cell {
  height: auto;
  min-height: 44px;
  overflow: visible;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}
.reimbursement-summary-text { display: block; width: 100%; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; white-space: normal; word-break: break-word; }
.todo-inline-row .member-actions .link-button { margin: 0 4px; }
.todo-table .member-actions .link-button + .link-button { margin-left: 10px; }
.todo-table .todo-priority-cell { text-align: center; }
.todo-priority-tag, .todo-table .todo-inline-row .todo-priority-select { display: inline-flex; min-width: 104px; min-height: 26px; align-items: center; justify-content: center; box-sizing: border-box; padding: 4px 12px; border: 0; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; white-space: nowrap; }
.todo-table .todo-inline-row .todo-priority-select { width: calc(100% - 8px); max-width: 150px; min-height: 26px; margin: 0 auto; padding: 4px 24px 4px 12px; border: 0; border-radius: 999px; outline: 1px solid transparent; cursor: pointer; }
.todo-table .todo-inline-row .todo-priority-select:focus { outline-color: currentColor; }
.todo-priority-critical { color: #b4232c; background: #fdebed; }
.todo-priority-important { color: #946200; background: #fff3cf; }
.todo-priority-urgent { color: #24568c; background: #e9f2fb; }
.todo-priority-normal { color: #276545; background: #e8f5ed; }
.todo-table .todo-priority-select.todo-priority-critical { color: #b4232c; background: #fdebed; }
.todo-table .todo-priority-select.todo-priority-important { color: #946200; background: #fff3cf; }
.todo-table .todo-priority-select.todo-priority-urgent { color: #24568c; background: #e9f2fb; }
.todo-table .todo-priority-select.todo-priority-normal { color: #276545; background: #e8f5ed; }
.todo-table .todo-content-cell, .todo-table .todo-content-cell input { text-align: center; }
.todo-table th, .todo-table td { text-align: center; }
.purchase-orders-table-wrap {
  /* 采购单短表格不能成为 sticky 表头的独立滚动参照，否则首条记录会被表头遮住。 */
  max-height: none !important;
  overflow: visible !important;
}
.purchase-orders-table { width: 100% !important; min-width: 0 !important; }
.purchase-orders-page .purchase-orders-table-wrap > table > thead > tr > th { top: 50px !important; }
.purchase-orders-table .member-actions .link-button { margin: 0; }
.purchase-orders-table td.purchase-order-row-actions { min-width: 144px; padding-right: 3px; padding-left: 3px; white-space: nowrap; }
.purchase-order-row-action-buttons { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.purchase-order-row-action-buttons .link-button { flex: 0 0 auto; font-size: 13px; line-height: 1.35; }
.purchase-status-badge { width: max-content; max-width: 100%; min-width: 68px; min-height: 26px; display: flex; align-items: center; justify-content: center; margin: 0 auto; padding: 3px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.purchase-status-unsent { color: #c40000; border-color: #ff8f8f; background: #ffe2e2; }
.purchase-status-pending { color: #7a5100; border-color: #f0bd00; background: #fff1a8; }
.purchase-status-unpaid { color: #39714e; border-color: #b8dfc3; background: #e9f6ed; }
.purchase-status-paid { color: #6a00a8; border-color: #bb78e6; background: #f3dcff; }
.purchase-status-arrived { color: #0059b3; border-color: #79b8f2; background: #dcedff; }
.purchase-status-inbound { color: #444; border-color: #aaa; background: #e5e5e5; }
.purchase-status-approved { color: #087a2f; border-color: #62c780; background: #dcf7e4; }
.purchase-status-rejected { color: #c40000; border-color: #ff8f8f; background: #ffe2e2; }
.purchase-status-default { color: #222; border-color: #aaa; background: #f2f2f2; }
.modal-mask:has(.purchase-order-modal) { padding: 16px; }
.purchase-order-modal { width: min(1770px, calc(100vw - 32px)); max-width: none; height: auto; max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.modal.purchase-order-entry-modal { width: 1200px; }
.purchase-order-modal form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow-y: auto; }
.purchase-order-form { padding: 18px 20px 8px; }
.purchase-order-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.purchase-order-three-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.purchase-order-four-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.purchase-order-date-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.purchase-order-auto-fields { margin-top: 10px; }
.purchase-order-field { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; min-height: 36px; color: #333; font-size: 13px; }
.purchase-order-field > span { color: #555; }
.purchase-order-field input, .purchase-order-field select, .purchase-order-field output { width: 100%; min-width: 0; min-height: 32px; padding: 5px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; font: inherit; }
.purchase-order-field output { display: flex; align-items: center; border-color: transparent; background: #fafafa; }
.linked-master-select { position: relative; width: 100%; min-width: 0; }
.linked-master-value { position: absolute; width: 1px !important; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.linked-master-trigger { width: 100%; min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; font: inherit; text-align: left; }
.linked-master-trigger:hover, .linked-master-trigger[aria-expanded="true"] { border-color: var(--red); }
.linked-master-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linked-master-chevron { flex: 0 0 auto; color: #777; font-size: 12px; }
.linked-master-menu-template { display: none; }
.linked-master-floating-menu { z-index: 1200; display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: 300px; overflow: hidden; padding: 5px; border: 1px solid #cfcfcf; border-radius: 3px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .16); }
.linked-master-add { width: 100%; min-height: 32px; padding: 5px 8px; border: 0; border-bottom: 1px solid var(--line); color: var(--red); background: #fff; text-align: left; font-size: 13px; }
.linked-master-add:hover { background: #fff6f6; }
.linked-master-options { min-height: 0; max-height: 250px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; touch-action: pan-y; padding-top: 3px; }
.linked-master-option { width: 100%; min-height: 30px; padding: 5px 8px; border: 0; color: #222; background: #fff; text-align: left; font-size: 13px; }
.linked-master-option:hover, .linked-master-option[aria-selected="true"] { color: var(--red); background: #fff4f4; }
.linked-master-empty { display: block; padding: 8px; color: #999; font-size: 12px; }
.linked-master-quick-add-mask { z-index: 1201; }
.linked-master-quick-add-modal { width: min(560px, calc(100vw - 32px)); }
.member-multi-select { position: relative; width: 100%; min-width: 0; color: #111; font: inherit; }
.member-multi-select details { position: relative; width: 100%; }
.member-multi-select summary { display: flex; width: 100%; min-width: 0; min-height: 32px; align-items: center; padding: 5px 28px 5px 8px; overflow: hidden; border: 1px solid #d4d4d4; border-radius: 3px; background: #fff; cursor: pointer; list-style: none; }
.member-multi-select summary::-webkit-details-marker { display: none; }
.member-multi-select summary::after { content: ''; position: absolute; top: 12px; right: 10px; width: 6px; height: 6px; border-right: 1px solid #666; border-bottom: 1px solid #666; transform: rotate(45deg); }
.member-multi-select details[open] summary::after { top: 15px; transform: rotate(225deg); }
.member-multi-select summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-multi-select-options { position: absolute; z-index: 90; top: calc(100% + 4px); left: 0; right: 0; max-height: 220px; padding: 6px; overflow-y: auto; border: 1px solid #cfcfcf; background: #fff; box-shadow: 0 5px 16px rgba(0, 0, 0, .14); }
.member-multi-select-options label { display: flex; min-height: 32px; align-items: center; gap: 8px; padding: 5px 7px; color: #222; cursor: pointer; }
.member-multi-select-options label:hover { background: #f6f6f6; }
.member-multi-select-options input[type="checkbox"] { width: 15px; min-width: 15px; min-height: 15px; height: 15px; margin: 0; padding: 0; accent-color: var(--red); }
.member-multi-select-empty { display: block; padding: 8px; color: #888; text-align: center; }
.purchase-details-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.purchase-details-head h3 { margin: 0; color: #111; font-size: 15px; }
.outbound-order-meta-fields .purchase-order-field > span { color: #000; }
.outbound-detail-heading-title { display: flex; min-width: 0; align-items: center; gap: 12px; }
.outbound-file-row { min-width: 0; color: #666; font-size: 13px; }
.outbound-file-row a, .outbound-file-row span { display: block; max-width: min(520px, 44vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outbound-file-link { color: var(--red); text-decoration: none; }
.outbound-file-link:hover { text-decoration: underline; }
.outbound-file-name { color: #888; }
.purchase-details-wrap { min-height: 0; flex: 0 1 auto; margin: 0 20px; max-height: min(40vh, 410px); overflow: auto; border: 1px solid var(--line); }
.purchase-details-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.purchase-details-table th, .purchase-details-table td { padding: 5px 4px; font-size: 12px; }
.purchase-details-table th:nth-child(1), .purchase-details-table th:nth-child(2), .purchase-details-table th:nth-child(3) { width: 38px; }
.purchase-details-table th:nth-child(4) { width: 116px; }
.purchase-details-table th:nth-child(6) { width: 54px; }
.purchase-details-table th:nth-child(9), .purchase-details-table th:nth-child(10), .purchase-details-table th:nth-child(11) { width: 68px; }
.purchase-order-entry-modal .purchase-order-detail-wrap { min-height: 0; max-height: min(56vh, 620px); overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.purchase-order-entry-modal form { min-width: 0; overflow-x: hidden; }
.purchase-order-entry-modal .purchase-order-detail-table { width: 100% !important; min-width: 0 !important; max-width: 100%; table-layout: fixed; }
.purchase-order-entry-modal .purchase-order-detail-wrap { width: 100%; max-width: 100%; }
.purchase-order-entry-modal .other-inbound-entry-detail-wrap { scrollbar-gutter: auto; }
.purchase-order-entry-modal .purchase-order-detail-table thead th { position: sticky; z-index: 30 !important; top: 0; background: #fafafa; background-clip: border-box; }
.purchase-order-entry-modal .purchase-order-detail-table tfoot td { position: sticky; z-index: 2; bottom: 0; }
.purchase-order-entry-modal .purchase-order-detail-table th.purchase-detail-delete-col,
.purchase-order-entry-modal .purchase-order-detail-table th.purchase-detail-select-col,
.purchase-order-entry-modal .purchase-order-detail-table th.purchase-detail-serial-col { text-align: center; }
.purchase-order-detail-table .purchase-detail-delete-col { width: 51px; }
.purchase-order-detail-table .purchase-detail-select-col { width: 55px; }
.purchase-order-detail-table .purchase-detail-serial-col { width: 51px; }
.purchase-order-detail-table th.purchase-detail-delete-col, .purchase-order-detail-table th.purchase-detail-select-col, .purchase-order-detail-table th.purchase-detail-serial-col { padding-right: 4px; padding-left: 4px; text-align: center; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(1) { width: 38px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(2) { width: 38px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(3) { width: 40px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(4) { width: 108px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(5) { width: 132px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(6) { width: 52px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(7) { width: 96px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(8) { width: 54px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(9) { width: 64px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(10), .purchase-order-entry-modal .purchase-details-table th:nth-child(11) { width: 70px; }
.purchase-order-entry-modal .purchase-details-table th:nth-child(12) { width: auto; }
.purchase-order-entry-modal .purchase-order-detail-table .purchase-detail-description-col { width: 64px; min-width: 0; max-width: 72px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.purchase-order-entry-modal .purchase-order-detail-table th:last-child,
.purchase-order-entry-modal .purchase-order-detail-table td:last-child { min-width: 0; max-width: 100%; overflow: hidden; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.purchase-order-entry-modal .purchase-order-detail-table td:last-child > input,
.purchase-order-entry-modal .purchase-order-detail-table td:last-child > textarea { max-width: 100%; }
.purchase-order-entry-modal .purchase-order-detail-table .purchase-detail-brandWeight-col { min-width: 88px; }
.purchase-order-entry-modal .purchase-order-detail-table .purchase-detail-weight-col { min-width: 70px; }
.purchase-order-entry-modal .purchase-order-detail-table .purchase-detail-delete-col,
.purchase-order-entry-modal .purchase-order-detail-table .purchase-detail-serial-col { width: 51px !important; min-width: 51px; max-width: 51px; }
.purchase-order-entry-modal .purchase-order-detail-table .purchase-detail-select-col { width: 55px; min-width: 55px; max-width: 55px; }
.purchase-order-entry-modal .purchase-order-detail-table th,
.purchase-order-entry-modal .purchase-order-detail-table td { box-sizing: border-box; min-width: 0; }
.purchase-material-code-button { width: 100%; min-width: 0; padding: 0; overflow: hidden; border: 0; color: #222; background: transparent; font: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.other-inbound-entry-detail-table .purchase-material-code-button { text-align: center; }
.purchase-material-code-button:hover { color: var(--red); }
.purchase-detail-static { color: #222; background: transparent; }
.purchase-detail-image-cell { padding: 3px !important; text-align: center; }
.purchase-detail-attachments { display: flex; max-width: 100%; align-items: center; justify-content: flex-start; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 5px 4px 2px; }
.purchase-detail-attachment-item { position: relative; display: inline-flex; min-width: 38px; min-height: 38px; align-items: center; justify-content: center; }
.purchase-detail-attachment-delete { position: absolute; z-index: 1; top: -5px; right: -5px; width: 16px; height: 16px; padding: 0; border: 1px solid #c40000; border-radius: 50%; color: #c40000; background: #fff; font-size: 13px; line-height: 14px; cursor: pointer; }
.purchase-detail-attachment-delete:hover { color: #fff; background: #c40000; }
.purchase-detail-image { display: inline-block; width: 38px; height: 38px; object-fit: cover; vertical-align: middle; }
.purchase-detail-image-preview { display: inline-flex; max-width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; vertical-align: middle; }
.purchase-detail-image-preview:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.purchase-payment-image-link { padding: 0; border: 0; color: var(--red); background: transparent; font: inherit; text-decoration: underline; cursor: zoom-in; }
.purchase-payment-image-link:hover { color: #8f1b25; }
.purchase-detail-upload { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.purchase-detail-upload > span { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.purchase-detail-upload-add { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px dashed #aaa; color: #777; background: #fff; font-size: 25px; line-height: 1; cursor: pointer; }
.purchase-detail-upload-add:hover { border-color: var(--red); color: var(--red); background: #fff7f7; }
.purchase-detail-upload-add span { display: block; transform: translateY(-1px); }
.purchase-detail-upload-placeholder { display: inline-flex; width: 38px; height: 32px; align-items: center; justify-content: center; border: 1px dashed #c9c9c9; color: #888; background: #fafafa; font-size: 12px; }
.purchase-detail-pdf-thumb { display: inline-flex; width: 32px; height: 36px; align-items: center; justify-content: center; border: 1px solid #d7b4b4; color: #a35f5f; background: #fff7f7; font-size: 10px; font-weight: 700; }
.purchase-outsourced-detail-table th, .purchase-outsourced-detail-table td { text-align: center; }
.purchase-outsourced-detail-table td input { width: 100%; min-width: 0; box-sizing: border-box; padding: 4px 6px; border: 1px solid #d4d4d4; border-radius: 3px; background: #fff; font: inherit; text-align: center; }
.purchase-outsourced-detail-table td output { display: inline-block; min-width: 60px; }
.purchase-glass-detail-table th, .purchase-glass-detail-table td { text-align: center; }
.purchase-glass-detail-table td input { width: 100%; min-width: 0; box-sizing: border-box; padding: 4px 6px; border: 1px solid #d4d4d4; border-radius: 3px; background: #fff; font: inherit; text-align: center; }
.purchase-glass-detail-table td output { display: inline-block; min-width: 0; white-space: nowrap; }
.purchase-detail-no-image { color: #999; }
.purchase-approval-flow { flex: 0 0 auto; margin: 14px 20px 0; padding: 12px 14px; border: 1px solid var(--line); }
.purchase-approval-assignees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 14px 20px 0; padding: 10px 14px; border: 1px solid var(--line); background: #fff; }
.two-level-approval-assignees { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.two-level-approval-assignees .purchase-order-field,
.two-level-approval-assignees .after-sales-order-field { min-width: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(34px, auto); gap: 5px; }
.two-level-approval-assignees .purchase-order-field > span,
.two-level-approval-assignees .after-sales-order-field > span { white-space: nowrap; }
.two-level-approval-assignees .member-multi-select { min-width: 0; width: 100%; }
.payment-order-approval-cell { padding: 0 !important; }
.payment-order-approval-cell .two-level-approval-assignees { margin: 0; border: 0; }
.purchase-approval-assignees .purchase-order-field { grid-template-columns: 72px minmax(0, 1fr); }
.purchase-approval-flow h3 { margin: 0 0 12px; font-size: 15px; }
.purchase-approval-info { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: -4px 0 12px; color: #666; font-size: 12px; }
.purchase-approval-info span { white-space: nowrap; }
.approval-cc-read-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0 0 12px; color: #555; font-size: 12px; }
.approval-cc-read-status strong { color: #333; font-weight: 600; }
.approval-cc-read-status span { white-space: nowrap; }
.purchase-approval-info > .approval-cc-read-status { flex: 1 0 100%; margin: 0; }
.purchase-approval-flow ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; }
.purchase-approval-flow li { position: relative; min-width: 0; display: grid; grid-template-rows: 22px auto auto; justify-items: center; row-gap: 3px; color: #888; font-size: 13px; text-align: center; }
.purchase-approval-flow li:not(:last-child)::after { content: ''; position: absolute; top: 10px; left: calc(50% + 10px); right: calc(-50% + 10px); height: 1px; background: #d8d8d8; }
.purchase-approval-flow li i { position: relative; z-index: 1; width: 20px; height: 20px; border: 1px solid #c6c6c6; border-radius: 50%; background: #fff; }
.purchase-approval-flow li.done { color: #333; }
.purchase-approval-flow li.done i { border-color: var(--red); background: var(--red); }
.purchase-approval-flow li.done i::after { content: ''; position: absolute; top: 4px; left: 6px; width: 5px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.purchase-approval-flow li.done:not(:last-child)::after { background: var(--red); }
.purchase-approval-flow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.purchase-approval-flow small { color: #999; font-size: 11px; }
.purchase-order-modal .modal-footer { flex: 0 0 auto; }
.purchase-material-picker { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(0, 0, 0, .28); }
.purchase-material-picker[hidden] { display: none; }
.purchase-material-picker-panel { width: 1050px; max-width: calc(100vw - 56px); max-height: calc(100vh - 56px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); background: #fff; }
#purchaseMaterialPickerLayer .purchase-material-picker-panel { width: min(1320px, calc(100vw - 56px)); }
#purchaseMaterialPickerLayer .purchase-material-table-wrap { overflow-x: hidden; }
#purchaseMaterialPickerLayer .purchase-material-table { width: 100% !important; min-width: 0; }
.purchase-material-picker-panel > header { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); }
.purchase-material-picker-panel h3 { margin: 0; font-size: 17px; }
.purchase-material-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafafa; }
.purchase-material-filters label { display: grid; gap: 5px; color: #555; font-size: 12px; }
.purchase-material-filters input { width: 100%; min-width: 0; height: 32px; padding: 5px 8px; border: 1px solid #d4d4d4; border-radius: 3px; background: #fff; font: inherit; }
.purchase-material-table-wrap { min-height: 0; overflow: auto; }
.purchase-material-picker-panel > .table-pagination { flex: 0 0 auto; padding: 4px 16px; border-top: 1px solid var(--line); }
.purchase-material-table { min-width: 100%; table-layout: fixed; }
.purchase-material-table th, .purchase-material-table td { text-align: center; }
.purchase-material-table .check-col { width: 55px; min-width: 55px; max-width: 55px; padding-right: 4px; padding-left: 4px; white-space: nowrap; }
.purchase-picker-image { padding: 3px !important; }
.purchase-picker-image img { width: 38px; height: 38px; object-fit: cover; vertical-align: middle; }
.purchase-details-table th, .purchase-details-table td { height: 38px; padding: 4px 5px; overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.purchase-details-table th:last-child, .purchase-details-table td:last-child { min-width: 120px; width: auto; }
.purchase-details-table td:last-child input { box-sizing: border-box; }
.purchase-details-table th { background: #fafafa; font-weight: 700; }
.purchase-details-table tr > :last-child { border-right: 0; }
.purchase-details-table tbody tr:last-child > * { border-bottom: 0; }
.purchase-details-table tfoot td { background: #fffaf2; font-weight: 700; }
.modal .purchase-details-table tfoot tr > *,
.modal .purchase-order-preview-table tfoot tr > *,
.modal .product-order-detail-data-table tfoot tr > *,
.modal .product-series-total-table tfoot tr > *,
.modal .product-order-amount-table tfoot tr > *,
.modal table tfoot tr > * { border-top: 1px solid var(--line); }
.purchase-details-table input, .purchase-details-table select { width: 100%; min-width: 0; height: 28px; padding: 3px 4px; border: 1px solid #d4d4d4; background: #fff; font: inherit; }
.purchase-order-entry-modal .purchase-order-detail-table td:last-child > input { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.purchase-order-entry-modal .purchase-order-detail-table tr > :last-child { border-right: 1px solid var(--line); }
.purchase-details-table input[readonly] { color: #555; background: #fafafa; }
.purchase-detail-delete { width: 24px; height: 24px; padding: 0; border: 0; color: var(--red); background: transparent; font-size: 18px; line-height: 1; }
.purchase-detail-delete:hover { background: #fff1f1; }
.purchase-payment-records { flex: 0 0 auto; }
.purchase-payment-actions { display: flex; align-items: center; gap: 8px; }
.purchase-payment-record-wrap { max-height: 220px; }
.purchase-payment-record-table { width: 100%; min-width: 0; }
.purchase-payment-record-table tbody tr:only-child .member-empty-cell { height: 38px; padding: 5px 8px; line-height: 28px; }
.purchase-order-entry-modal .purchase-payment-record-table th:nth-child(n) { width: auto; min-width: 0; }
.purchase-order-entry-modal .purchase-payment-record-table .serial-col { width: 56px; min-width: 56px; }
.purchase-order-entry-modal .purchase-payment-record-table .purchase-payment-time-col { width: 190px; }
.purchase-order-entry-modal .purchase-payment-record-table .purchase-payment-attachment-col { width: 260px; }
.purchase-order-entry-modal .purchase-payment-record-table th.member-action-col,
.purchase-order-entry-modal .purchase-payment-record-table td.member-action-col { width: 82px; min-width: 82px; }
.purchase-payment-attachment { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.purchase-payment-attachment-links { min-width: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.purchase-payment-attachment-links a { max-width: 180px; overflow: hidden; color: var(--red); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.purchase-payment-attachment-links a:hover { text-decoration: underline; }
.purchase-payment-attachment-empty { color: #999; }
.member-table tfoot tr > *, .system-table tfoot tr > * { border-top: 1px solid var(--line); }
.finance-table tfoot .finance-total-row td { height: 40px; padding: 7px 6px; border-top: 1px solid var(--line); background: #fffaf0; color: #111; font-weight: 700; text-align: center; }
.finance-table tfoot .finance-total-row .finance-total-amount { color: var(--red); }
/* 财务明细及报销单的合计行跟随当前页表格数据，不固定在滚动视口。 */
.finance-page .finance-table > tfoot > tr.finance-total-row > td {
  position: static !important;
  z-index: auto !important;
  inset: auto !important;
  box-shadow: none !important;
}
.finance-table tfoot td.finance-add-cell { height: 40px; padding: 0; border-top: 1px solid var(--line); border-right: 0; border-bottom: 0; text-align: center; background: #fff; }
.finance-page .finance-table-wrap { position: relative; isolation: isolate; }
.finance-page .finance-table > tfoot > tr > td.finance-add-cell {
  position: sticky;
  z-index: 29;
  bottom: 0;
  background: #fff;
  background-clip: border-box;
  box-shadow: 0 -1px 0 var(--line);
}
.finance-add-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 40px; padding: 0; border: 0; color: var(--red); background: transparent; font-size: 20px; line-height: 1; cursor: pointer; }
.finance-add-button:hover { background: #fff8f8; }
.finance-add-toolbar-button { width: 88px; min-width: 88px; flex: 0 0 88px; border-color: var(--red); color: var(--red); background: #fff; }
.finance-add-toolbar-button:hover { border-color: var(--red-dark); color: var(--red-dark); background: #fff8f8; }
.finance-inline-row td { height: 48px; padding: 5px 6px; background: #fffaf2; }
.finance-inline-row .serial-col { color: var(--red); font-weight: 700; text-align: center; }
.finance-inline-row input { width: 100%; min-width: 0; min-height: 32px; padding: 5px 6px; border: 1px solid #d4d4d4; border-radius: 2px; color: #111; background: #fff; }
.finance-inline-row select { width: 100%; min-width: 0; min-height: 32px; padding: 5px 6px; border: 1px solid #d4d4d4; border-radius: 2px; color: #111; background: #fff; }
.finance-inline-row input:focus { border-color: var(--red); }
.finance-inline-row select:focus { border-color: var(--red); }
.finance-inline-row .member-actions { overflow: visible; white-space: nowrap; }
.finance-table .finance-col-city { width: 8%; }
.finance-table .finance-col-date { width: 11%; }
.finance-table .finance-col-project { width: 13%; }
.finance-table .finance-col-counterparty { width: 13%; }
.finance-table .finance-col-amount { width: 10%; }
.finance-table .finance-col-summary { width: 15%; }
.finance-table .finance-col-relatedOrder { width: 11%; }
.finance-table .finance-col-remark { width: 10%; }
.finance-related-order-cell { padding: 4px 6px !important; }
.finance-related-order-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: 100%; min-height: 28px; padding: 2px 4px; border: 0; color: #333; background: transparent; font: inherit; cursor: pointer; }
.finance-related-order-button:hover { color: var(--red); }
.finance-related-order-icon, .finance-related-order-option-icon { flex: 0 0 auto; font-size: 15px; line-height: 1; }
.finance-related-order-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-related-order-modal { width: min(640px, calc(100vw - 32px)); }
.finance-related-order-picker { max-height: min(56vh, 460px); padding: 4px 20px 18px; overflow: auto; }
.finance-related-order-group { padding-top: 16px; }
.finance-related-order-group h3 { margin: 0 0 8px; color: #555; font-size: 13px; font-weight: 700; }
.finance-related-order-group > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.finance-related-order-option { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 38px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 3px; color: #222; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.finance-related-order-option span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-related-order-option:hover { border-color: var(--red); color: var(--red); background: #fff7f7; }
.finance-related-order-empty { margin: 20px 0 4px; color: #777; text-align: center; }
.finance-account-tabs { margin-bottom: 12px; }
.finance-summary-table { font-size: 13px; }
.finance-summary-table th, .finance-summary-table td { padding: 7px 6px; font-size: 13px; text-align: center; }
.finance-summary-table th:first-child { width: 140px; text-align: center; }
.finance-summary-table td:first-child { width: 140px; text-align: center; }
.finance-summary-table tfoot td { background: #fffaf2; font-weight: 700; }
.inbound-details-table th { text-align: center; }
.outbound-details-table th { text-align: center; }
.inventory-table th, .inventory-table td, .inbound-details-table td, .outbound-details-table td, .outbound-orders-table th, .outbound-orders-table td { text-align: center; }
.inventory-table td.inventory-supplier-cell, .inbound-details-table td.inventory-supplier-cell, .outbound-details-table td.inventory-supplier-cell { text-align: left; }
.inventory-table td.inventory-image-cell, .inbound-details-table td.inventory-image-cell, .outbound-details-table td.inventory-image-cell { position: relative; overflow: visible; padding: 3px !important; }
.inventory-image-preview { display: inline-flex; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; vertical-align: middle; background: transparent; cursor: pointer; }
.inventory-image { display: block; width: 36px; height: 36px; border: 1px solid var(--line); object-fit: cover; background: #fafafa; }
.inventory-image-preview:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.inventory-image-modal { width: min(400px, calc(100vw - 32px)); max-width: none; }
.inventory-image-modal-content { padding: 18px 20px 4px; }
.inventory-image-modal-content > img { display: block; width: 100%; max-height: 250px; object-fit: contain; background: #fafafa; }
.inventory-image-modal-content dl { margin: 18px 0 0; border-top: 1px solid var(--line); }
.inventory-image-modal-content dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; min-height: 42px; align-items: center; border-bottom: 1px solid var(--line); }
.inventory-image-modal-content dt { color: #777; font-size: 13px; text-align: center; }
.inventory-image-modal-content dd { min-width: 0; margin: 0; color: #111; font-size: 14px; overflow-wrap: anywhere; }
.inventory-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; }
.inventory-toolbar .member-toolbar-actions { justify-self: end; }
.inventory-safety-reminder { min-height: 38px; display: inline-flex; align-items: baseline; gap: 10px; padding: 2px 8px; border: 0; color: #c81717; background: transparent; font-family: inherit; font-size: 24px; font-weight: 800; line-height: 1.2; cursor: pointer; }
.inventory-safety-reminder strong { min-width: 26px; color: #c81717; font-size: 26px; font-weight: 800; line-height: 1; text-align: center; }
.inventory-safety-reminder:hover, .inventory-safety-reminder:focus-visible { color: #9e0808; background: #fff3f3; outline: 1px solid #e5aaaa; }
.inventory-safety-reminder:hover strong, .inventory-safety-reminder:focus-visible strong { color: #9e0808; }
.inventory-safety-reminder.has-reminders { color: #c81717; }
.modal.inventory-safety-modal { width: min(1320px, calc(100vw - 32px)); max-width: none; height: min(760px, calc(100vh - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.inventory-safety-table-wrap { min-height: 0; flex: 1 1 auto; padding: 18px 20px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.inventory-safety-modal > .table-pagination { flex: 0 0 auto; padding: 4px 20px; border-top: 1px solid var(--line); }
.inventory-safety-modal > .modal-footer { flex: 0 0 auto; }
.inventory-safety-table { width: 100%; min-width: 0; max-width: 100%; table-layout: fixed; }
.inventory-safety-table th, .inventory-safety-table td { text-align: center; }
.inventory-safety-table th:not(.serial-col) { position: sticky !important; z-index: 30 !important; top: 0 !important; padding-right: 16px; background-color: #fafafa !important; background-image: linear-gradient(#fafafa, #fafafa) !important; background-clip: border-box !important; box-shadow: 0 1px 0 var(--line); }
.inventory-safety-table th:not(.serial-col)::before { content: ""; position: absolute; z-index: -1; inset: -1px 0 0; pointer-events: none; background: #fafafa; }
.inventory-safety-table th.serial-col { position: sticky !important; z-index: 30 !important; top: 0 !important; background-color: #fafafa !important; background-image: linear-gradient(#fafafa, #fafafa) !important; box-shadow: 0 1px 0 var(--line); }
.inventory-safety-table th.serial-col::before { content: ""; position: absolute; z-index: -1; inset: -1px 0 0; pointer-events: none; background: #fafafa; }
.inventory-safety-table td.inventory-supplier-cell { box-sizing: border-box; text-align: left; white-space: normal !important; overflow-wrap: anywhere; word-break: break-word; }
.inventory-safety-table .inventory-supplier-value { display: block; max-width: 100%; white-space: normal !important; overflow-wrap: anywhere; word-break: break-word; }
.inventory-safety-current { color: #a43f3b !important; font-weight: 700; }
.inventory-safety-shortage { color: #b13f3a !important; font-weight: 700; }
.outing-leave-table th { text-align: center; }
.product-orders-table th { text-align: center; }
.factory-purchase-text { color: #d04444; font-weight: 700; }
.promotion-info-table th { text-align: center; }
.promotion-info-table .member-actions .link-button { margin: 0 4px; }
.promotion-info-modal { width: min(680px, 100%); }
.after-sales-orders-table th, .after-sales-refunds-table th { text-align: center; }
.after-sales-contract-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.after-sales-statistics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 18px 20px 22px; }
.after-sales-statistics-section { min-width: 0; border: 1px solid var(--line); background: #fff; }
.after-sales-statistics-section h2 { margin: 0; padding: 13px 15px; border-bottom: 1px solid var(--line); color: #222; font-size: 15px; font-weight: 700; }
.after-sales-statistics-table-wrap { max-height: min(52vh, 520px); }
.after-sales-statistics-table { width: 100%; table-layout: fixed; }
.after-sales-statistics-table th, .after-sales-statistics-table td { text-align: center; }
.after-sales-statistics-table th:last-child, .after-sales-statistics-table td:last-child { width: 82px; }
.after-sales-detail-modal { width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.after-sales-detail-scroll { min-height: 0; padding: 18px 20px; overflow: auto; }
.after-sales-detail-fields { table-layout: fixed; }
.after-sales-detail-fields th { width: 118px; text-align: center; }
.after-sales-detail-fields td { white-space: normal; overflow-wrap: anywhere; }
.after-sales-detail-document .product-order-detail-section { margin-top: 18px; }
.after-sales-detail-document .product-order-file-section { margin-top: 18px; }
.after-sales-refund-modal { width: min(920px, 100%); }
.after-sales-refunds-table .member-actions .link-button { margin: 0 4px; }
.after-sales-refund-view { padding: 18px 20px 8px; }
.after-sales-refund-view-summary { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.after-sales-refund-view-summary > div { display: grid; gap: 7px; padding: 12px 14px; border: 1px solid var(--line); background: #fafafa; }
.after-sales-refund-view-summary span { color: #666; font-size: 12px; }
.after-sales-refund-view-summary strong { color: #111; font-size: 15px; }
.after-sales-refund-view .product-order-transaction { padding-right: 0; padding-left: 0; }
.after-sales-order-form { display: grid; gap: 14px; padding: 18px 20px 8px; }
.after-sales-basic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.after-sales-contract-field { grid-column: span 2; }
.after-sales-two-column-row, .after-sales-content-file-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.after-sales-status-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.after-sales-order-field { min-width: 0; display: grid; grid-template-rows: auto minmax(32px, auto); align-content: start; gap: 6px; color: #333; font-size: 13px; }
.after-sales-order-field > span, .after-sales-block-title { display: block; color: #444; font-size: 13px; font-weight: 700; line-height: 1.4; text-align: left; }
.after-sales-order-field input, .after-sales-order-field select, .after-sales-order-field textarea { width: 100%; min-width: 0; min-height: 34px; box-sizing: border-box; padding: 6px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; font: inherit; text-align: left; }
.after-sales-order-field textarea { min-height: 82px; resize: vertical; line-height: 1.5; }
.after-sales-production-content textarea { min-height: 132px; }
.after-sales-reason-field textarea { min-height: 76px; text-align: left; }
.after-sales-files-half { min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: 6px; }
.after-sales-file-panels { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.after-sales-file-panel { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); background: #fafafa; }
.after-sales-file-title { display: flex; min-height: 32px; align-items: center; justify-content: space-between; gap: 8px; }
.after-sales-file-title h3 { margin: 0; color: #111; font-size: 14px; }
.after-sales-file-panel .product-order-file-list { grid-template-columns: 1fr; padding-top: 6px; }
.after-sales-approval-section { padding: 4px 20px 14px; border-top: 1px solid var(--line); }
.after-sales-approval-section > .purchase-details-head { padding: 10px 0 0; border-top: 0; }
.after-sales-approval-assignees { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 10px 0 0; }
.after-sales-approval-assignees .after-sales-order-field { grid-template-columns: none; grid-template-rows: auto minmax(32px, auto); }
.after-sales-approval-status-field { max-width: 320px; margin-top: 10px; }
.after-sales-approval-flow { margin: 14px 0 0; }
.after-sales-approval-records { margin-top: 16px; }
.after-sales-approval-records h3 { margin: 0 0 8px; color: #222; font-size: 14px; }
.after-sales-uses-cell { padding: 4px !important; overflow: visible !important; white-space: normal !important; }
.after-sales-uses-table { width: 100%; border: 1px solid var(--line); border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.after-sales-uses-table th, .after-sales-uses-table td { height: 28px; padding: 3px 4px; overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.after-sales-uses-table th { background: #fafafa; }
.after-sales-uses-table tr > :last-child { border-right: 0; }
.order-payments-page { padding-top: 20px; }
.order-payment-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.order-payment-card { display: flex; align-items: flex-start; justify-content: space-between; min-height: 112px; padding: 16px; border: 1px solid var(--line); background: #fff; }
.order-payment-card h2 { margin: 0 0 18px; color: #555; font-size: 14px; font-weight: 500; }
.order-payment-card strong { color: #111; font-size: 24px; font-weight: 700; }
.order-payment-receivable-highlight { color: var(--red) !important; font-weight: 700; }
.order-payment-card-icon { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 3px; color: #444; background: #fff; font-size: 17px; line-height: 1; }
.order-payment-card-icon:hover { border-color: #999; color: #000; background: #fafafa; }
.order-payments-table th { text-align: center; }
.order-payment-detail-modal { width: min(840px, calc(100vw - 32px)); }
.order-payment-detail-wrap { max-height: 62vh; padding: 18px; overflow: auto; }
.order-payment-detail-table th,
.order-payment-detail-table td,
.order-payment-detail-content .product-order-detail-data-table th,
.order-payment-detail-content .product-order-detail-data-table td,
.order-payment-detail-content .product-order-detail-data-table tfoot th,
.order-payment-detail-content .product-order-detail-data-table tfoot td { font-size: 14px; }
.order-payment-detail-table th { text-align: center; }
.order-payment-detail-modal .order-payment-detail-table th,
.order-payment-detail-modal .order-payment-detail-table td,
.order-payment-manufacturer-detail-modal .order-payment-manufacturer-detail-table th,
.order-payment-manufacturer-detail-modal .order-payment-manufacturer-detail-table td { text-align: center !important; vertical-align: middle; }
.order-payment-detail-content { max-height: 68vh; padding: 18px; overflow-y: auto; }
.order-payment-detail-content .product-order-detail-data-table th,
.order-payment-detail-content .product-order-detail-data-table td { text-align: center !important; vertical-align: middle; }
.order-payment-detail-content .product-order-detail-section + .product-order-detail-section { margin-top: 18px; }
.order-payment-detail-content .product-order-detail-data-table .member-empty-cell { height: 40px !important; min-height: 0; padding: 6px 8px; line-height: 28px; }
.order-payment-manufacturer-detail-modal { width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.order-payment-manufacturer-detail-wrap { min-height: 0; padding: 18px; overflow: auto; }
.order-payment-manufacturer-detail-table { min-width: 860px; table-layout: fixed; }
.order-payment-manufacturer-detail-table th, .order-payment-manufacturer-detail-table td { text-align: center; }
.production-summary { display: flex; align-items: center; justify-content: flex-end; gap: 20px; color: #555; font-size: 14px; }
.production-summary span { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.production-summary strong { color: var(--red); font-size: 17px; font-weight: 700; }
.production-summary .btn { min-width: 59px; }
.production-term-table th { text-align: center; }
.production-term-table td { padding: 6px 5px; }
.production-term-table td.production-date-cell { padding-right: 1px; padding-left: 1px; }
.production-term-table th[data-production-header="productionDate"],
.production-term-table th[data-production-header="completionDate"],
.production-term-table th[data-production-header="designCompletedDate"],
.production-term-table th[data-production-header="aluminumDeliveryDate"],
.production-term-table th[data-production-header="arrivalDate"],
.production-term-table th[data-production-header="processingDate"],
.production-term-table th[data-production-header="inboundDate"],
.production-term-table th[data-production-header="shippingDate"] { padding-right: 2px; padding-left: 2px; }
.production-term-table th .member-resize-handle { right: -8px; width: 16px; z-index: 5; }
.production-term-table th.member-filterable { padding-right: 26px; padding-left: 6px; }
.production-term-table th.member-filterable .member-filter-button { right: 4px; width: 16px; }
.production-term-table td.production-series-cell { padding: 4px !important; white-space: normal; }
.production-term-table td.production-aluminum-color-cell { padding: 4px !important; white-space: normal; }
.production-aluminum-color-box { width: 100%; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.production-aluminum-color-box > div { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 5px; min-height: 25px; padding: 3px 6px; }
.production-aluminum-color-box > div + div { border-top: 1px solid var(--line); }
.production-aluminum-color-box b { color: #555; font-size: 12px; font-weight: 400; white-space: nowrap; }
.production-aluminum-color-box span { min-width: 0; overflow-wrap: anywhere; }
.product-order-transaction .purchase-details-head h3 small { color: #777; font-size: 11px; font-weight: 400; }
.production-series-box { width: 100%; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.production-term-table th, .production-term-table td { text-align: left; }
.production-term-table td.production-status-cell { text-align: center; }
.production-term-table th[data-production-header="status"],
.production-term-table td.production-status-cell { padding-right: 3px; padding-left: 3px; }
.production-term-table th[data-production-header="status"].member-filterable { padding-right: 20px; }
.production-contract-name { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.production-series-line { display: grid; grid-template-columns: minmax(80px, 1fr) 106px 124px; align-items: center; gap: 10px; min-height: 32px; padding: 5px 8px; text-align: left; }
.production-series-line > .production-series-count,
.production-series-line > .production-series-area { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; min-width: 0; }
.production-series-line b { color: #555; font-weight: 400; white-space: nowrap; }
.production-series-line em { min-width: 0; overflow: hidden; color: #111; font-style: normal; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.production-term-table .status-badge { margin-left: 0; }
.production-term-table td.production-status-cell .status-badge { margin: 0 auto; }
.production-date-input { width: 100%; min-width: 0; border: 0; background: transparent; font: inherit; text-align: left; }
.product-order-detail-contract-title { margin: 0 0 18px; color: #111; font-size: 21px; font-weight: 700; text-align: center; }
.production-series-line + .production-series-line { border-top: 1px solid var(--line); }
.production-series-line span { min-width: 0; overflow-wrap: anywhere; }
.production-series-line { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.production-series-line > .production-series-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-series-line > .production-series-count,
.production-series-line > .production-series-area { flex: 0 0 auto; display: inline-flex; grid-template-columns: none; align-items: center; gap: 3px; min-width: auto; }
.production-series-line b { flex: 0 0 auto; }
.production-series-line em { flex: 0 0 auto; overflow: visible; text-align: left; white-space: nowrap; text-overflow: clip; }
.other-inbound-form-table { display: block; width: 100%; table-layout: fixed; }
.other-inbound-form-table tbody { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; width: 100%; }
.other-inbound-form-table tbody tr { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; width: 100%; min-width: 0; }
.other-inbound-form-table tbody tr th, .other-inbound-form-table tbody tr td { display: block; width: 100%; min-width: 0; box-sizing: border-box; }
.other-inbound-form-table tbody tr td { overflow: hidden; }
.other-inbound-form-table tbody tr td input, .other-inbound-form-table tbody tr td select, .other-inbound-form-table tbody tr td textarea { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.product-orders-table th, .product-orders-table td,
.purchase-orders-table th, .purchase-orders-table td,
.order-payments-table th, .order-payments-table td,
.after-sales-orders-table th, .after-sales-orders-table td,
.after-sales-refunds-table th, .after-sales-refunds-table td,
.approval-table th, .approval-table td,
.production-term-table th, .production-term-table td,
.purchase-receipts-table th, .purchase-receipts-table td,
.other-inbound-table th, .other-inbound-table td,
.outbound-orders-table th, .outbound-orders-table td,
.outbound-details-table th, .outbound-details-table td,
.inbound-details-table th, .inbound-details-table td,
.announcement-policy-table th, .announcement-policy-table td,
.promotion-info-table th, .promotion-info-table td,
.outing-leave-table th, .outing-leave-table td { text-align: center; }
.outing-leave-table .member-actions .link-button { margin: 0 5px; }
#approvalTodosTable .member-actions .link-button + .link-button { margin-left: 10px; }
.approval-todo-tabs { display: flex; align-items: center; gap: 0; padding: 0 20px; border-bottom: 1px solid var(--line); }
.approval-todo-tab { position: relative; min-width: 88px; height: 42px; padding: 0 14px; border: 0; color: #777; background: transparent; font: inherit; cursor: pointer; }
.approval-todo-tab.active { color: var(--red); font-weight: 600; }
.approval-todo-tab.active::after { content: ''; position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; background: var(--red); }
.approval-todo-tab:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
#paymentOrdersTable .member-actions .link-button + .link-button { margin-left: 10px; }
.announcement-policy-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--red); }
.purchase-order-print-preview-modal { width: min(1320px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.purchase-order-preview-body { min-height: 0; display: grid; gap: 18px; padding: 18px 20px; overflow: auto; }
.purchase-order-preview-fields { width: 100%; }
.purchase-order-preview-fields th { width: 150px; text-align: center; }
.purchase-order-preview-fields td { white-space: normal; }
.purchase-order-preview-body h3 { margin: 0 0 8px; color: #111; font-size: 16px; }
.purchase-order-preview-table-wrap { overflow: auto; border: 1px solid var(--line); }
.purchase-order-preview-table { width: 100%; min-width: 1040px; table-layout: auto; }
.purchase-order-preview-table th, .purchase-order-preview-table td { min-width: 64px; height: 42px; padding: 6px 8px; overflow: visible; font-size: 12px; line-height: 1.4; text-align: center; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.purchase-order-preview-table th:nth-child(2), .purchase-order-preview-table td:nth-child(2) { min-width: 106px; }
.purchase-order-preview-table th:nth-child(3), .purchase-order-preview-table td:nth-child(3) { min-width: 120px; }
.purchase-order-preview-table th:last-child, .purchase-order-preview-table td:last-child { min-width: 120px; }
.purchase-order-preview-table tfoot th, .purchase-order-preview-table tfoot td { border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: #fffaf0; font-weight: 700; }
.purchase-order-preview-table tfoot tr > :last-child { border-right: 0; }
.purchase-order-preview-image-button { position: relative; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; cursor: zoom-in; vertical-align: middle; }
.purchase-order-preview-image { display: inline-block; width: 44px; height: 44px; object-fit: contain; vertical-align: middle; }
.purchase-order-preview-image-count { position: absolute; right: -6px; bottom: -6px; min-width: 22px; padding: 1px 4px; border: 1px solid #fff; border-radius: 10px; color: #fff; background: #555; font-size: 10px; line-height: 14px; font-weight: 400; }
.outbound-order-print-preview-modal { width: min(1400px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.outbound-order-preview-body { min-height: 0; display: grid; gap: 18px; padding: 18px 20px; overflow: auto; }
.outbound-order-preview-fields { width: 100%; }
.outbound-order-preview-fields th { width: 150px; text-align: center; }
.outbound-order-preview-fields td { white-space: normal; overflow-wrap: anywhere; }
.outbound-order-preview-body h3 { margin: 0 0 8px; color: #111; font-size: 16px; }
.outbound-order-preview-table-wrap { overflow: auto; border: 1px solid var(--line); }
.outbound-order-preview-table { width: 100%; min-width: 1120px; table-layout: fixed; }
.outbound-order-preview-table th, .outbound-order-preview-table td { height: 42px; padding: 6px 8px; overflow: visible; font-size: 13px; line-height: 1.5; text-align: center; white-space: normal; overflow-wrap: anywhere; word-break: break-word; vertical-align: middle; }
.outbound-order-preview-table .outbound-preview-serial-col { width: 54px; }
.outbound-order-preview-table .outbound-preview-code-col { width: 150px; }
.outbound-order-preview-table .outbound-preview-name-col { width: 280px; }
.outbound-order-preview-table .outbound-preview-unit-col { width: 72px; }
.outbound-order-preview-table .outbound-preview-quantity-col { width: 82px; }
.outbound-order-preview-table .outbound-preview-description-col { width: 180px; }
.outbound-preview-name-cell { min-width: 240px; }
.outbound-order-print-preview-modal .modal-footer { flex: 0 0 auto; }
.company-file-viewer-modal { width: min(1500px, calc(100vw - 24px)); height: min(940px, calc(100vh - 24px)); max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); display: flex; flex-direction: column; overflow: hidden; }
.company-file-viewer-modal-medium { width: min(1260px, calc(100vw - 24px)); height: min(850px, calc(100vh - 24px)); }
.company-file-viewer-modal-large { width: min(1500px, calc(100vw - 24px)); height: min(940px, calc(100vh - 24px)); }
.company-file-viewer-body { min-width: 0; min-height: 0; flex: 1 1 auto; padding: 8px; overflow-x: hidden; overflow-y: hidden; background: #ededed; }
.company-file-viewer-body iframe { display: block; width: 100%; max-width: 100%; min-width: 0; height: 100%; border: 0; background: #fff; }
.company-file-viewer-modal .modal-footer { flex: 0 0 auto; }
@media (max-width: 720px) {
  .company-file-viewer-modal { width: calc(100vw - 12px); height: calc(100vh - 12px); max-width: calc(100vw - 12px); max-height: calc(100vh - 12px); }
  .company-file-viewer-body { padding: 4px; }
}
.production-date-input { width: 100%; min-width: 0; height: 30px; padding: 3px 0; border: 1px solid #d4d4d4; border-radius: 3px; background: #fff; color: #000; font: inherit; font-size: calc(1em - 3px); }
.production-date-input::-webkit-datetime-edit { font-size: inherit; }
.production-date-input::-webkit-calendar-picker-indicator { width: 13px; height: 13px; margin: 0; padding: 0; }
.production-date-cell { cursor: pointer; }
.production-date-display { width: 100%; min-height: 30px; display: flex; align-items: center; justify-content: center; padding: 3px 0; border-radius: 3px; color: #111; font: inherit; cursor: pointer; }
.production-date-display:hover, .production-date-display:focus-visible { color: var(--red); background: #fff5f5; outline: 1px solid #efcaca; }
.production-date-input:disabled { color: #777; background: #f7f7f7; cursor: wait; }
.modal.product-order-modal { width: 1200px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.product-order-modal > form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.modal.product-order-sales-modal { width: 1100px; }
.product-order-detail-modal, .product-order-print-preview-modal { width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.product-order-form { padding: 18px 20px 8px; }
.product-order-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.product-order-field { display: grid; grid-template-columns: 102px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 36px; color: #444; font-size: 13px; }
.product-order-field-wide { grid-column: 1 / -1; align-items: start; }
.product-order-field input, .product-order-field select, .product-order-field textarea { width: 100%; min-width: 0; min-height: 32px; padding: 5px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; font: inherit; }
.product-order-field textarea { min-height: 76px; resize: vertical; }
.product-order-entry-form { display: grid; gap: 12px; }
.product-order-entry-row { display: grid; gap: 12px; }
.product-order-entry-row-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-order-entry-row-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-order-entry-row-five { grid-template-columns: minmax(190px, 1.25fr) minmax(300px, 2fr) repeat(3, minmax(115px, .72fr)); }
.product-order-entry-row-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-order-simple-sales-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-order-entry-field { display: grid; gap: 5px; min-width: 0; color: #444; font-size: 13px; }
.product-order-entry-field > span { min-height: 18px; }
.product-order-entry-field input, .product-order-entry-field select, .product-order-entry-field textarea, .product-order-entry-field output { width: 100%; min-width: 0; min-height: 32px; padding: 5px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; font: inherit; }
.product-order-entry-field textarea { min-height: 76px; resize: vertical; }
.material-content-panel { width: 100%; min-width: 0; margin: 0; }
.material-content-panel .product-series-panel-head { padding: 0; }
.material-content-panel .product-series-panel-head { margin-bottom: 8px; }
.material-content-table-wrap { width: 100%; margin: 0; max-height: 260px; overflow-x: hidden !important; overflow-y: auto !important; }
.material-content-table { width: 100%; min-width: 0; table-layout: fixed; }
.material-content-table th, .material-content-table td { height: 42px; padding: 5px 7px; text-align: center; vertical-align: middle; }
.material-content-table .material-content-serial-col { width: 48px; }
.material-content-table .material-content-type-col { width: 120px; }
.material-content-table .material-content-attachment-col { width: 190px; }
.material-content-table input:not([type="file"]) { width: 100%; min-width: 0; min-height: 30px; padding: 4px 7px; border: 1px solid #d4d4d4; border-radius: 3px; background: #fff; font: inherit; text-align: center; }
.material-content-table select, .material-content-attachments-cell { max-width: 100%; min-width: 0; }
.material-content-attachments-cell { overflow: hidden !important; white-space: normal !important; }
.material-content-attachments-cell > .btn { min-width: 54px; height: 28px; padding: 0 8px; }
.material-content-file-list { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin-top: 4px; }
.material-content-file { min-width: 0; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.material-content-file a { min-width: 0; max-width: calc(100% - 34px); overflow: hidden; color: #333; text-overflow: ellipsis; white-space: nowrap; }
.material-content-file .link-button { font-size: 12px; }
.material-content-file-empty { color: #999; font-size: 12px; }
.product-order-entry-field output { display: flex; align-items: center; background: #fafafa; }
.product-order-hardware-select { position: relative; min-width: 0; }
.product-order-hardware-select details { position: relative; }
.product-order-hardware-select summary { position: relative; width: 100%; min-height: 32px; display: flex; align-items: center; padding: 5px 28px 5px 8px; overflow: hidden; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; cursor: pointer; list-style: none; }
.product-order-hardware-select summary::-webkit-details-marker { display: none; }
.product-order-hardware-select summary::after { content: ''; position: absolute; top: 50%; right: 10px; width: 0; height: 0; border-top: 5px solid #666; border-right: 4px solid transparent; border-left: 4px solid transparent; transform: translateY(-40%); }
.product-order-hardware-select [data-product-hardware-summary] { min-width: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.product-order-hardware-options { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 100%; max-height: 210px; padding: 6px; overflow-y: auto; border: 1px solid #ccc; background: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .14); }
.product-order-hardware-options label { min-height: 30px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 6px; padding: 3px 6px; color: #222; cursor: pointer; }
.product-order-hardware-options label:hover { background: #f6f6f6; }
.product-order-hardware-options input { width: 15px; min-height: 15px; margin: 0; padding: 0; }
.product-order-hardware-options span { overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.product-order-hardware-options p { margin: 6px; color: #888; text-align: center; }
.product-series-panel { min-width: 0; margin-top: 2px; }
.product-series-panel-head { min-height: 32px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: #111; }
.product-series-panel-head h3 { margin: 0; font-size: 15px; }
.product-series-tables-grid, .product-order-amount-tables-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.product-series-table, .product-order-amount-table { width: 100%; table-layout: fixed; border: 1px solid var(--line); }
.product-series-table th, .product-series-table td, .product-order-amount-table th, .product-order-amount-table td { text-align: center; }
.product-series-table th:nth-child(1), .product-series-table td:nth-child(1) { width: 50%; }
.product-series-table th:nth-child(2), .product-series-table td:nth-child(2) { width: 22%; }
.product-series-table th:nth-child(3), .product-series-table td:nth-child(3) { width: 28%; }
.product-series-table tbody tr, .product-order-amount-table tbody tr { height: 38px; }
.product-series-total-wrap { margin-top: 10px; }
.product-series-total-table { width: 100%; min-width: 0; table-layout: fixed; border: 1px solid var(--line); }
.product-series-total-table th, .product-series-total-table td { width: 33.333%; text-align: center; }
.product-series-total-table th { width: 34%; }
.product-series-table input, .product-series-table select { width: 100%; min-width: 0; min-height: 30px; padding: 4px 7px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; font: inherit; }
.product-series-table tfoot th, .product-series-table tfoot td { background: #fffaf0; font-weight: 700; }
.product-series-select-cell { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 6px; }
.product-series-area-cell { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 5px; }
.product-series-area-cell span { color: #666; }
.formula-input-cell { position: relative; min-width: 0; }
.formula-input-cell input { padding-right: 8px; }
.formula-result { display: block; min-height: 14px; margin-top: 2px; color: #666; font-size: 11px; line-height: 14px; text-align: center; white-space: nowrap; }
.formula-result[hidden] { display: none; }
.product-series-remove { width: 24px; min-height: 32px; padding: 0; border: 0; color: var(--red); background: transparent; font-size: 19px; line-height: 1; }
.product-order-color-control { display: grid; grid-template-columns: 1fr; gap: 8px; }
.product-order-color-control:has(.product-order-other-color:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-order-color-control details { position: relative; min-width: 0; }
.product-order-color-control summary { position: relative; width: 100%; min-height: 32px; display: flex; align-items: center; padding: 5px 28px 5px 8px; overflow: hidden; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; cursor: pointer; list-style: none; }
.product-order-color-control summary::-webkit-details-marker { display: none; }
.product-order-color-control summary::after { content: ''; position: absolute; top: 50%; right: 10px; width: 0; height: 0; border-top: 5px solid #666; border-right: 4px solid transparent; border-left: 4px solid transparent; transform: translateY(-40%); }
.product-order-color-control [data-product-color-summary] { min-width: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.product-order-color-options { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 100%; max-height: 210px; padding: 6px; overflow-y: auto; border: 1px solid #ccc; background: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .14); }
.product-order-color-options label { min-height: 30px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 6px; padding: 3px 6px; color: #222; cursor: pointer; }
.product-order-color-options label:hover { background: #f6f6f6; }
.product-order-color-options input { width: 15px; min-height: 15px; margin: 0; padding: 0; }
.product-order-color-options span { overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.product-order-other-color { margin: 0; }
.product-order-other-color[hidden] { display: none; }
.product-order-amounts { padding: 12px 20px 14px; border-top: 1px solid var(--line); }
.product-order-amounts h3, .product-order-file-section h3 { min-height: 32px; display: flex; align-items: center; margin: 0; color: #111; font-size: 15px; }
.product-order-amounts > div { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.material-order-amounts-with-quotation > div { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.material-order-amounts-with-quotation > div > .purchase-details-head { min-width: 0; display: flex; align-items: end; gap: 8px; margin: 0; padding: 0; border-top: 0; }
.material-order-amounts-with-quotation > div > .purchase-details-head h3 { min-width: 0; overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.material-order-amounts-with-quotation > div > .purchase-details-head > div { min-width: 0; }
.material-order-amounts-with-quotation > div > .purchase-details-head .btn { min-width: 0; padding: 0 8px; white-space: nowrap; }
.material-order-amounts-with-quotation > .product-order-file-list { margin-top: 8px; }
.product-order-amounts label { display: grid; gap: 5px; color: #444; font-size: 13px; }
.product-order-amounts input, .product-order-amounts output { min-height: 32px; padding: 6px 8px; border: 1px solid #d4d4d4; color: #111; background: #fff; font: inherit; }
.product-order-amounts output { display: block; background: #fafafa; }
.product-order-amount-table-wrap { margin-top: 10px; }
.product-order-fixed-amount-table-wrap { margin-top: 10px; }
.product-order-fixed-amount-table { width: 100%; min-width: 0; }
.product-order-amount-table th, .product-order-amount-table td { width: 50%; text-align: center; }
.product-order-amount-table input { width: min(260px, 100%); border-radius: 3px; }
.product-order-amount-table tfoot th, .product-order-amount-table tfoot td { background: #fffaf0; font-weight: 700; }
.product-order-amount-table output { min-height: auto; padding: 0; border: 0; background: transparent; font-weight: 700; }
.product-order-files-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding: 12px 20px 14px; border-top: 1px solid var(--line); align-items: stretch; }
.product-order-files-grid .product-order-file-section { min-width: 0; padding: 0; }
.product-order-files-grid .product-order-drawing-panel { grid-column: 2; grid-row: 1; }
.product-order-files-grid .product-order-material-panel { grid-column: 1 / -1; grid-row: 2; }
.product-order-file-panel + .product-order-file-panel { padding-left: 18px; border-left: 1px solid var(--line); }
.product-order-special-drawing-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 18px; }
.product-order-special-drawing-row > .product-order-special-field { min-width: 0; min-height: 100%; padding: 0 18px 0 0; border-right: 1px solid var(--line); }
.product-order-special-drawing-row > .product-order-drawing-panel { min-width: 0; padding: 0; }
.product-order-special-drawing-row > .product-order-drawing-panel .purchase-details-head { padding: 0; }
.product-order-special-field textarea { min-height: 92px; height: 100%; resize: vertical; }
.product-order-file-section { padding: 0 20px 12px; }
.product-order-quotation-section { padding: 12px 20px 14px; border-top: 1px solid var(--line); }
.product-order-quotation-section h3 { min-height: 32px; display: flex; align-items: center; margin: 0; color: #111; font-size: 15px; }
.product-order-quotation-section .purchase-details-head { min-height: 32px; margin-bottom: 8px; padding: 0; border-top: 0; }
.product-order-file-section .purchase-details-head { min-height: 32px; margin-bottom: 8px; padding: 0; border-top: 0; }
.product-order-file-list { min-height: 34px; padding: 8px 0 4px; overflow: visible; color: #666; font-size: 13px; line-height: 1.55; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.product-order-file-item { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 2px 5px; }
.product-order-file-item button { width: 22px; height: 22px; padding: 0; border: 0; color: var(--red); background: transparent; font-size: 18px; line-height: 1; }
.product-order-file-item a { min-width: 0; overflow: hidden; color: #333; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.product-order-file-item a:hover { color: var(--red); text-decoration: underline; }
.product-order-file-item-history { grid-column: 1 / -1; min-width: 0; padding-left: 29px; color: #999; font-size: 9px; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.product-order-file-empty { color: #999; }
.product-order-file-history { min-height: 22px; padding-top: 5px; border-top: 1px dashed #ddd; color: #888; }
.product-order-file-history small { display: block; overflow: hidden; font-size: 9px; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.product-order-file-list:has(> .product-order-file-empty) { min-height: 20px; padding: 0; display: block; line-height: 20px; }
.product-order-file-history:has(> small:only-child) { min-height: 18px; padding-top: 2px; line-height: 16px; }
.product-order-modal .member-empty-cell,
.product-order-modal .product-series-table .member-empty-cell,
.product-order-modal .product-order-amount-table .member-empty-cell { height: 28px !important; min-height: 0; padding: 4px 5px; line-height: 20px; }
.modal.order-file-list-modal { width: 850px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.order-file-list-content { min-height: 0; padding: 18px; overflow: auto; }
.order-file-list-wrap { min-height: 0; max-height: min(38vh, 340px); }
.order-file-list-table { table-layout: fixed; }
.order-file-list-table th, .order-file-list-table td { text-align: center; }
.order-file-list-table .order-file-time-col { width: 190px; }
.order-file-list-table .order-file-operator-col, .order-file-action-table .order-file-operator-col { width: 110px; }
.order-file-list-table .member-action-col { width: 82px; }
.order-file-action-history { margin-top: 18px; }
.order-file-action-history h3 { margin: 0 0 8px; color: #111; font-size: 15px; }
.order-file-action-table { table-layout: fixed; }
.order-file-action-table th, .order-file-action-table td { text-align: center; }
.order-file-action-table th, .order-file-action-table td { font-size: 12px; }
.order-file-action-table .order-file-time-col { width: 190px; }
.order-file-action-table .order-file-action-col { width: 82px; }
.order-file-name-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-file-name-cell a { color: #222; text-decoration: none; }
.order-file-name-cell a:hover { color: var(--red); text-decoration: underline; }
/* 文件清单使用普通表格字号；只有操作记录使用浅灰色以区分历史信息。 */
.order-file-list-content .order-file-list-table,
.order-file-list-content .order-file-list-table th,
.order-file-list-content .order-file-list-table td,
.order-file-list-content .order-file-list-table a,
.order-file-list-content .order-file-list-table .member-empty-cell { color: #111; font-size: 14px; }
.order-file-list-content .order-file-list-table th,
.order-file-list-content .order-file-list-table td { height: 44px; padding: 8px 10px; line-height: 1.4; }
.order-file-list-content .order-file-action-history,
.order-file-list-content .order-file-action-history h3,
.order-file-list-content .order-file-action-table,
.order-file-list-content .order-file-action-table th,
.order-file-list-content .order-file-action-table td,
.order-file-list-content .order-file-action-table a,
.order-file-list-content .order-file-action-table .member-empty-cell { color: #999; font-size: 14px; }
.order-file-list-content .order-file-action-history h3 { margin-bottom: 8px; line-height: 1.4; }
.order-file-list-content .order-file-action-table th,
.order-file-list-content .order-file-action-table td { height: 44px; padding: 8px 10px; line-height: 1.4; }
.order-file-list-content .order-file-list-table .member-empty-cell,
.order-file-list-content .order-file-action-table .member-empty-cell { height: 44px !important; min-height: 0; }
.order-file-list-content .order-file-name-cell { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.order-file-list-content .order-file-list-wrap { max-height: none; }
.order-file-list-content .order-file-action-history { margin-top: 18px; }
.product-order-transaction { padding: 12px 20px 14px; border-top: 1px solid var(--line); }
.product-order-transaction .purchase-details-head { min-height: 32px; margin-bottom: 8px; padding: 0; border-top: 0; }
.product-order-transaction .purchase-details-wrap { margin: 0; overflow-x: hidden; }
.product-order-transaction .product-order-payment-table,
.product-order-transaction .product-order-purchase-table { min-width: 0; }
.product-order-transaction .purchase-details-table th { width: auto; }
.product-order-transaction .member-action-col { width: 126px; }
.product-order-transaction .member-actions .link-button { margin: 0 4px; }
.product-order-cell-value { display: block; width: 100%; min-height: 28px; padding: 3px 4px; border: 0; color: #111; background: transparent; font: inherit; text-align: center; white-space: normal; overflow-wrap: anywhere; cursor: text; }
.product-order-cell-value:hover { color: var(--red); background: #fff7f7; }
.product-order-saving-hint { display: inline-block; color: #888; font-size: 12px; line-height: 1.35; }
.product-order-transaction .member-resize-handle { right: -1px; width: 12px; }
.product-order-transaction .member-resize-handle::after { right: 0; }
.material-order-entry-modal .product-order-amounts h3,
.material-order-entry-modal .product-order-amounts label,
.material-order-entry-modal .product-order-amounts output { color: #111; }
.product-order-approval-records { padding: 12px 20px 14px; border-top: 1px solid var(--line); }
.product-order-approval-records .product-order-approval-assignees,
.product-order-approval-records .product-order-approval-flow { margin: 0; }
.product-order-approval-records .two-level-approval-assignees { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-order-approval-records .product-order-approval-flow { margin-top: 14px; }
.product-order-approval-records .product-order-approval-assignees .purchase-order-field { grid-template-columns: 112px minmax(0, 1fr); }
.product-order-approval-records .product-order-approval-flow ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-order-revisions { padding: 12px 20px 14px; border-top: 1px solid var(--line); }
.product-order-revisions .purchase-details-head { min-height: 32px; margin-bottom: 8px; padding: 0; border-top: 0; }
.product-order-revisions .purchase-details-wrap { margin: 0; }
.product-order-revision-table th, .product-order-revision-table td { height: 38px; padding: 4px 5px; text-align: center; }
.product-order-revision-table .product-order-revision-date-col { width: 190px; }
.product-order-revision-table input { width: 100%; min-width: 0; min-height: 30px; padding: 4px 7px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; font: inherit; text-align: center; }
.product-order-approval-records h3 { min-height: 32px; display: flex; align-items: center; margin: 0 0 8px; color: #111; font-size: 15px; }
.product-order-approval-records th, .product-order-approval-records td { text-align: center; }
.product-order-modal .product-series-table th,
.product-order-modal .product-series-table td,
.product-order-modal .product-order-amount-table th,
.product-order-modal .product-order-amount-table td,
.product-order-modal .product-order-payment-table th,
.product-order-modal .product-order-payment-table td,
.product-order-modal .product-order-purchase-table th,
.product-order-modal .product-order-purchase-table td,
.product-order-modal .product-order-revision-table th,
.product-order-modal .product-order-revision-table td,
.product-order-modal .product-order-approval-records th,
.product-order-modal .product-order-approval-records td { height: 38px; padding: 4px 5px; font-size: 14px; text-align: center; }
.product-order-modal .product-series-table input,
.product-order-modal .product-series-table select,
.product-order-modal .product-order-amount-table input,
.product-order-modal .product-order-amount-table output,
.product-order-modal .product-order-payment-table input,
.product-order-modal .product-order-purchase-table input,
.product-order-modal .product-order-payment-table .link-button,
.product-order-modal .product-order-purchase-table .link-button { font-size: 14px; text-align: center; }
.product-order-modal .product-order-amount-tables-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 12px; }
.product-order-modal .product-order-amount-table tbody tr { height: 44px; }
.product-order-modal .product-order-amount-table tbody td { height: 44px; padding: 4px 5px; }
.product-order-modal .product-order-amount-table .member-empty-cell { height: 44px !important; padding: 4px 5px; }
.product-order-modal .product-order-fixed-amount-table-wrap { margin-top: 10px; }
.product-order-modal .product-order-amounts > .product-order-fixed-amount-table-wrap { display: block; grid-column: 1 / -1; width: 100%; }
.product-order-modal .product-order-fixed-amount-table { width: 100%; table-layout: fixed; }
.product-order-modal .product-order-fixed-amount-table > tbody > tr { height: 44px; }
.product-order-modal .product-order-fixed-amount-table > tbody > tr > td { width: 33.333%; height: 44px; padding: 4px 8px; }
.product-order-fixed-amount-cell { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 10px; margin: 0; }
.product-order-fixed-amount-cell span,
.product-order-total-amount-cell span { color: #111; font-weight: 700; text-align: center; }
.product-order-fixed-amount-cell input { width: 100%; min-width: 0; min-height: 30px; padding: 4px 7px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; font: inherit; text-align: center; }
.product-order-fixed-amount-cell .formula-result { grid-column: 2; }
.product-order-total-amount-cell { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 10px; }
.product-order-total-amount-cell output { display: block; min-height: 30px; padding: 4px 7px; color: #111; background: #fffaf0; font-weight: 700; line-height: 22px; text-align: center; }
.order-discount-hint { display: inline-block; margin-left: 5px; color: #d33a3a; font-size: 12px; font-weight: 700; white-space: nowrap; }
.product-order-modal .product-series-table tbody tr { height: 44px; }
.product-order-modal .product-series-table tbody td { height: 44px; padding: 4px 5px; }
.product-order-modal .product-series-table .member-empty-cell { height: 44px !important; padding: 4px 5px; }
.product-order-modal .product-series-table input,
.product-order-modal .product-series-table select { min-height: 30px; }
.product-series-total-table tbody th,
.product-series-total-table tbody td { height: 36px; padding: 4px 5px; text-align: center; }
.product-series-total-table tbody th { width: 34%; }
.product-series-total-table tbody td { width: 66%; }
.product-series-total-table output { display: inline; min-height: auto; padding: 0; border: 0; background: transparent; }
.product-order-detail { padding: 20px; }
.product-order-detail-scroll, .product-order-print-preview-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.product-order-detail-screen { font-size: 17px; }
.product-order-detail-screen .product-order-detail-contract-title { font-size: 24px; }
.product-order-detail-screen .product-order-detail-fields th,
.product-order-detail-screen .product-order-detail-fields td,
.product-order-detail-screen .product-order-detail-data-table th,
.product-order-detail-screen .product-order-detail-data-table td,
.product-order-detail-screen .product-order-detail-data-table tfoot th,
.product-order-detail-screen .product-order-detail-data-table tfoot td { font-size: 17px; }
.product-order-detail-screen .product-order-detail-section h3,
.product-order-detail-screen .product-order-detail-empty { font-size: 18px; }
.product-order-detail .product-order-file-section { padding: 16px 0 0; }
.product-order-detail-document { display: grid; gap: 18px; }
.product-order-detail-fields { width: 100%; }
.product-order-detail-fields th, .product-order-detail-fields td { min-height: 44px; font-size: 14px; line-height: 1.55; white-space: normal; }
.product-order-detail-fields th { width: 180px; text-align: center; }
.product-order-detail-section { min-width: 0; }
.product-order-detail-section h3 { margin: 0 0 9px; color: #111; font-size: 15px; }
.product-order-detail-data-table th, .product-order-detail-data-table td { height: 40px; padding: 6px 8px; font-size: 14px; line-height: 1.45; text-align: center; white-space: normal; }
.product-order-detail-data-table tfoot th, .product-order-detail-data-table tfoot td { height: 40px; padding: 6px 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: #fffaf0; font-size: 14px; text-align: center; }
.product-order-detail-data-table tfoot tr > :last-child { border-right: 0; }
.product-order-detail-empty { min-height: 40px; display: grid; place-items: center; margin: 0; border: 1px solid var(--line); color: #888; font-size: 14px; }
.product-order-detail-empty-cell { height: 32px !important; min-height: 0 !important; padding: 4px 8px !important; line-height: 22px !important; }
.product-order-pdf-document + .product-order-pdf-document { margin-top: 18px; }
.product-order-pdf-heading { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 8px; border: 1px solid var(--line); border-bottom: 0; background: #fafafa; font-size: 14px; }
.product-order-print-preview-body .product-order-pdf-heading,
.product-order-print-preview-body .product-order-pdf-loading,
.product-order-print-preview-body .product-order-pdf-error,
.product-order-print-preview-body .product-order-pdf-fallback,
.product-order-print-preview-body .product-order-detail-section h3,
.product-order-print-preview-body .product-order-print-time { font-size: 14px; }
.product-order-pdf-heading strong { min-width: 0; overflow-wrap: anywhere; }
.product-order-pdf-heading a { flex: 0 0 auto; color: var(--red); text-decoration: none; }
.product-order-pdf-heading a:hover { text-decoration: underline; }
.product-order-pdf-frame { display: block; width: 100%; height: min(76vh, 860px); border: 1px solid var(--line); background: #f5f5f5; }
.product-order-image-preview { display: flex; min-height: 120px; align-items: center; justify-content: center; padding: 12px; border: 1px solid var(--line); background: #fff; }
.product-order-image-preview img { display: block; max-width: 100%; max-height: min(76vh, 860px); object-fit: contain; }
.product-order-pdf-pages { display: grid; gap: 16px; padding: 12px; border: 1px solid var(--line); background: #ececec; }
.product-order-pdf-page { width: 100%; max-width: 920px; margin: 0 auto; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .12); }
.product-order-pdf-page canvas { display: block; width: 100%; height: auto; }
.product-order-pdf-loading, .product-order-pdf-error { min-height: 48px; display: grid; place-items: center; margin: 0; color: #666; text-align: center; }
.product-order-pdf-error { color: var(--red); }
.product-order-pdf-fallback { display: block; margin: 0 auto 10px; color: var(--red); text-align: center; }
.product-order-print-time { margin: 8px 0 0; color: #555; font-size: 15px; text-align: right; }
.finance-entry { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.finance-entry h2 { margin: 0 0 14px; color: #111; font-size: 16px; }
.finance-entry-form { padding: 0; }
.finance-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.finance-entry-grid label { display: grid; gap: 6px; color: #333; font-size: 13px; }
.finance-entry-grid input { width: 100%; min-height: 34px; padding: 6px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; }
.finance-entry-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.finance-entry-actions .form-message { margin-right: auto; }
.finance-download { min-width: 88px; }
.company-files-page .member-panel { padding-top: 20px; }
.company-files-table th, .company-files-table td { text-align: center; }
.company-files-table .member-action-col { width: 154px; }
.company-files-table .member-actions .link-button { margin: 0 4px; }
.company-file-name a { color: #111; text-decoration: none; }
.company-file-name a:hover { color: var(--red); text-decoration: underline; }
.announcement-policy-page .member-panel { padding-top: 20px; }
.announcement-policy-table .member-action-col { width: 154px; }
.announcement-policy-table .member-actions .link-button { margin: 0 4px; }
.announcement-content-cell { color: #333; }
.policy-name-cell a { color: #111; text-decoration: none; }
.policy-name-cell a:hover { color: var(--red); text-decoration: underline; }
.status-badge { width: max-content; max-width: 100%; min-width: 68px; min-height: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; white-space: nowrap; }
/* 状态色按语义统一：执行、普通、提示、待执行、其他、完成。 */
.status-badge-progress { color: #39714e; background: #e9f6ed; }
.status-badge-neutral { color: #376783; background: #eaf5fb; }
.status-badge-danger { color: #a14c4c; background: #fff0f0; }
.status-badge-pending { color: #856b24; background: #fff8df; }
.status-badge-closed { color: #705f8b; background: #f3eef9; }
.status-badge-success { color: #66717a; background: #f0f2f4; }
.status-badge.production-status-design,
.status-badge.production-status-spraying,
.status-badge.production-status-processing,
.status-badge.production-status-finished,
.status-badge.production-status-shipped { font-weight: 700; }
.status-badge.production-status-design { color: #a97913; background: #fff4c7; }
.status-badge.production-status-spraying { color: #8061a8; background: #f0e8ff; }
.status-badge.production-status-processing { color: #3b855d; background: #e4f6e9; }
.status-badge.production-status-finished { color: #bd5d5d; background: #ffe7e7; }
.status-badge.production-status-shipped { color: #69757d; background: #eef1f3; }
.status-badge.status-badge-employment-active { color: #39714e; background: #e9f6ed; }
.status-badge.status-badge-employment-left { color: #a14c4c; background: #fff0f0; }
.cost-accounting-page { min-width: 0; }
.cost-accounting-tabs { margin-bottom: 14px; }
.cost-accounting-panel { min-width: 0; }
.cost-accounting-summary-block { margin-bottom: 18px; }
.cost-accounting-summary-block h2 { margin: 0; padding: 6px 16px; border-bottom: 1px solid var(--line); color: #111; font-size: 15px; font-weight: 700; text-align: left; }
.cost-accounting-summary-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; }
.cost-accounting-card { min-width: 0; min-height: 88px; display: grid; align-content: center; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); background: #fff; text-align: center; }
.cost-accounting-summary-cards:not(.cost-accounting-linked-costs) .cost-accounting-card { min-height: 78px; }
.cost-accounting-card h2 { margin: 0; padding: 0; border: 0; color: #666; font-size: 13px; font-weight: 400; text-align: center; }
.cost-accounting-card strong { color: #111; font-size: 20px; font-weight: 700; line-height: 1.2; }
.cost-accounting-percent-card strong::after { content: ''; }
.cost-accounting-two-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
.cost-accounting-two-cards .cost-accounting-card h2 { color: #111; font-size: 14px; }
.cost-accounting-two-cards .cost-accounting-card strong { font-size: 14px; font-weight: 400; }
.cost-accounting-summary-table { width: 100%; table-layout: fixed; border: 1px solid var(--line); }
.cost-accounting-summary-table th, .cost-accounting-summary-table td { height: 44px; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.cost-accounting-summary-table th:last-child, .cost-accounting-summary-table td:last-child { border-right: 0; }
.cost-accounting-summary-table tbody tr:last-child td { border-bottom: 0; }
.cost-accounting-summary-table th, .cost-accounting-summary-table td { width: 20%; }
.cost-accounting-product-summary { margin-bottom: 0; }
.cost-accounting-linked-costs { gap: 0; }
.cost-accounting-linked-costs .cost-accounting-card { min-height: 88px; gap: 0; padding: 0; border-top: 0; border-right: 0; }
.cost-accounting-linked-costs .cost-accounting-card:last-child { border-right: 1px solid var(--line); }
.cost-accounting-linked-costs .cost-accounting-card h2, .cost-accounting-linked-costs .cost-accounting-card strong { min-height: 44px; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0 12px; box-sizing: border-box; }
.cost-accounting-linked-costs .cost-accounting-card h2 { border-bottom: 1px solid var(--line); }
.cost-accounting-table-wrap { max-width: 100%; overflow-x: auto; overflow-y: auto; }
.cost-accounting-table { min-width: 1180px; table-layout: fixed; }
.cost-accounting-table th, .cost-accounting-table td { text-align: center; vertical-align: middle; }
.cost-accounting-table .member-action-col { width: 82px; }
.cost-accounting-multiline-cell { line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.cost-accounting-year { padding: 10px 16px 0; color: var(--muted); text-align: right; }
.cost-accounting-list-toolbar:empty { display: none; }
.cost-accounting-list-toolbar { height: 35px; min-height: 35px; justify-content: flex-end; padding-top: 0; padding-bottom: 0; }
.cost-accounting-detail-panel { padding: 14px; }
.cost-accounting-detail-actions { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 12px; }
.cost-accounting-detail-actions > div { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.cost-accounting-contract-title { min-width: 0; margin: 0; padding: 0 12px; overflow: hidden; font-size: 20px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.cost-accounting-order-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-bottom: 0; }
.cost-accounting-order-metrics > div { min-width: 0; padding: 10px; border-right: 1px solid var(--line); text-align: center; }
.cost-accounting-order-metrics > div:last-child { border-right: 0; }
.cost-accounting-order-metrics span { display: block; margin-bottom: 5px; color: var(--muted); }
.cost-accounting-order-metrics strong { font-size: 16px; }
.cost-accounting-category-wrap { margin-bottom: 14px; }
.cost-accounting-category-wrap th, .cost-accounting-category-wrap td { text-align: center; }
.cost-accounting-cost-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cost-detail-table-panel, .cost-accounting-usage-panel { min-width: 0; border: 1px solid var(--line); }
.cost-accounting-usage-panel { margin-top: 14px; }
.cost-detail-table-panel .purchase-details-head, .cost-accounting-usage-panel .purchase-details-head { min-height: 44px; padding: 6px 10px; }
.cost-detail-table-panel .purchase-details-wrap { overflow-x: hidden; }
.cost-detail-edit-table { width: 100%; min-width: 0; table-layout: fixed; }
.cost-detail-edit-table th, .cost-detail-edit-table td { text-align: center; }
.cost-detail-edit-table input, .cost-accounting-usage-table input { width: 100%; min-width: 0; height: 30px; padding: 3px 5px; border: 1px solid var(--line); box-sizing: border-box; text-align: center; font-family: "Microsoft YaHei", sans-serif; }
.cost-detail-edit-table tfoot th, .cost-detail-edit-table tfoot td { border-top: 1px solid var(--line); }
.cost-accounting-usage-wrap { max-height: 420px; overflow: auto; }
.cost-accounting-usage-table { min-width: 1500px; table-layout: fixed; }
.cost-accounting-usage-table thead { position: static; }
.cost-accounting-usage-table thead th { position: sticky; z-index: 30 !important; top: 0; background: #fafafa; background-clip: border-box; }
.cost-accounting-usage-table th, .cost-accounting-usage-table td { text-align: center; }
.cost-accounting-usage-table .member-action-col { width: 126px; }
.modal.cost-accounting-outbound-picker-modal { width: 1500px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.cost-accounting-usage-picker-filter { flex: 0 0 auto; display: grid; grid-template-columns: auto minmax(260px, 380px) auto; justify-content: start; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafafa; }
.cost-accounting-usage-picker-filter label { color: #333; font-size: 14px; font-weight: 700; }
.cost-accounting-usage-picker-filter input { width: 100%; height: 34px; padding: 5px 9px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; font: inherit; }
.cost-accounting-usage-picker-filter span { color: var(--muted); font-size: 13px; }
.member-table-wrap.cost-accounting-outbound-picker-wrap { min-height: 0; max-height: none; flex: 1 1 auto; overflow-x: auto; overflow-y: auto; }
.cost-accounting-outbound-picker-table { min-width: 1500px; table-layout: fixed; }
.cost-accounting-outbound-picker-table th, .cost-accounting-outbound-picker-table td { text-align: center; }
.cost-accounting-outbound-picker-table .check-col { width: 44px; min-width: 44px; max-width: 44px; }
.cost-accounting-outbound-picker-modal .modal-footer { flex: 0 0 auto; }
.cost-accounting-preview-modal { width: min(1200px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.cost-accounting-preview-body { min-height: 0; padding: 18px; overflow: auto; }
.cost-accounting-print-title { margin: 0 0 6px; color: #000; font-size: 24px; font-weight: 700; line-height: 1.35; text-align: center; }
.cost-accounting-print-contract { margin: 0 0 14px; color: #333; font-size: 14px; text-align: center; }
.cost-accounting-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.cost-accounting-preview-section { min-width: 0; margin-top: 14px; }
.cost-accounting-preview-section h3 { margin: 0 0 8px; color: #111; font-size: 15px; }
.cost-accounting-preview-section .member-table-wrap { overflow: auto; }
.cost-accounting-preview-table { width: 100%; min-width: 660px; table-layout: auto; }
.cost-accounting-preview-table th, .cost-accounting-preview-table td { height: 40px; padding: 6px 8px; font-size: 13px; text-align: center; white-space: normal; }
.cost-accounting-preview-table .member-empty-cell { height: 40px !important; }
@media (max-width: 720px) {
  .cost-accounting-summary-cards, .cost-accounting-two-cards { grid-template-columns: 1fr; }
  .cost-accounting-summary-table { min-width: 620px; }
  .cost-accounting-order-metrics, .cost-accounting-cost-grid, .cost-accounting-preview-grid { grid-template-columns: 1fr; }
  .cost-accounting-usage-picker-filter { grid-template-columns: auto minmax(0, 1fr); }
  .cost-accounting-usage-picker-filter span { grid-column: 2; }
}
.announcement-editor-modal { width: min(680px, 100%); }
.announcement-view-modal { width: min(720px, 100%); }
.announcement-form { display: grid; gap: 14px; padding: 20px 22px; }
.announcement-form label { display: grid; gap: 7px; color: #333; font-size: 13px; }
.announcement-form input, .announcement-form textarea { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; }
.announcement-form textarea { min-height: 156px; resize: vertical; line-height: 1.55; }
.announcement-view-content { padding: 20px 22px; color: #222; }
.announcement-view-content dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.announcement-view-content dl div { min-width: 0; }
.announcement-view-content dt { margin-bottom: 5px; color: #888; font-size: 12px; }
.announcement-view-content dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.announcement-view-content p { margin: 0; line-height: 1.75; white-space: normal; }
.announcement-view-content img { display: block; max-width: 100%; max-height: 380px; margin-top: 18px; object-fit: contain; object-position: left top; }
.announcement-readers-modal { width: min(680px, 100%); }
.announcement-readers-content { display: grid; gap: 18px; padding: 22px; }
.announcement-readers-content section { padding: 16px; border: 1px solid #e6e8eb; border-radius: 10px; }
.announcement-readers-content h3 { margin: 0 0 12px; font-size: 15px; }
.announcement-read-time { margin: 0; color: #555; }
.announcement-reader-list { display: flex; flex-wrap: wrap; gap: 8px; }
.announcement-reader-chip { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: #e8f5ed; color: #287348; font-size: 13px; }
.announcement-reader-list.unread .announcement-reader-chip { background: #fceaea; color: #a4142a; }
.announcement-read-status-button { white-space: nowrap; }
.payroll-page { padding-top: 0; }
.payroll-tabs { margin-bottom: 20px; }
.payroll-content { min-width: 0; }
.payroll-summary-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 18px; margin-bottom: 20px; }
.payroll-card { min-width: 0; padding: 18px; border: 1px solid var(--line); background: #fff; }
.payroll-card h1 { margin: 0; color: #111; font-size: 17px; }
.payroll-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.payroll-card-heading input, .payroll-days-card input { min-height: 34px; padding: 6px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; }
.payroll-weekdays, .payroll-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.payroll-weekdays { margin-bottom: 6px; color: #888; font-size: 12px; text-align: center; }
.payroll-calendar-day, .payroll-calendar-empty { min-height: 34px; }
.payroll-calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid transparent; color: #222; background: #fff; cursor: pointer; }
.payroll-calendar-day.sunday, .payroll-weekday-sunday { background: #f2f2f2; }
.payroll-calendar-number { line-height: 1.1; }
.payroll-calendar-holiday { color: #a56b6b; font-size: 10px; line-height: 1.1; white-space: nowrap; }
.payroll-calendar-day:hover { border-color: #d9a0a0; background: #fff7f7; }
.payroll-calendar-day.selected { border-color: #edc4c4; color: var(--red); background: #fff1f1; }
.payroll-days-card { display: grid; align-content: start; gap: 18px; }
.payroll-days-card label { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; color: #444; font-size: 14px; }
.payroll-days-card strong { color: var(--red); font-size: 19px; font-weight: 600; }
.payroll-days-card .payroll-workshop-value { min-width: 112px; cursor: pointer; text-align: right; }
.payroll-days-card .payroll-workshop-value:focus { outline: 1px solid #e6a2a2; outline-offset: 3px; }
.payroll-days-card input { width: 112px; }
.payroll-table-panel { min-width: 0; }
.payroll-salary-panel, .payroll-attendance-panel { padding-top: 9px; }
.payroll-table-panel .member-toolbar { position: relative; justify-content: center; }
.payroll-salary-panel .member-toolbar, .payroll-attendance-panel .member-toolbar { margin-bottom: 9px; }
.payroll-employees-panel { padding-top: 12px; }
.payroll-employees-panel .member-toolbar { margin-bottom: 12px; }
.payroll-table-panel .member-toolbar h1 { width: 100%; text-align: center; }
.payroll-table-panel .member-toolbar-actions { position: absolute; top: 0; right: 0; }
.payroll-table-panel .member-toolbar-actions .btn { width: auto; min-width: 54px; }
.payroll-attendance-panel .member-actions .link-button + .link-button { margin-left: 8px; }
.payroll-month-picker { width: 132px; height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: #333; font: inherit; text-align: center; }
.payroll-workshop-value { color: var(--red); }
.payroll-table-wrap { overflow: hidden; }
.payroll-table { font-size: 13px; }
.payroll-table th, .payroll-table td { padding: 7px 6px; font-size: 13px; }
.payroll-table tbody td, .payroll-preview-table tbody td { text-align: center; }
.payroll-table .attendance-inline-number { width: 100%; min-width: 0; height: 28px; padding: 3px 5px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: inherit; font: inherit; text-align: center; }
.payroll-table .attendance-inline-number:hover, .payroll-table .attendance-inline-number:focus { border-color: #d4d4d4; background: #fff; outline: 0; }
.payroll-table .attendance-inline-number.is-saved { border-color: #a9d5b8; background: #f1faf4; }
.payroll-table .member-action-col { width: 126px; }
.payroll-detail-table .member-action-col { width: 119px; white-space: nowrap; }
.payroll-detail-table tbody tr.payroll-row-employment-left > td { background: #fff0f0; }
.payroll-detail-table .status-badge-unconfirmed,
.payroll-preview-table .status-badge-unconfirmed,
.payroll-export-preview-modal .status-badge-unconfirmed { color: #a14c4c; background: #ffecec; }
.payroll-detail-table tbody tr.payroll-row-employment-left .attendance-inline-number { background: transparent; }
.payroll-detail-table .member-actions .link-button { margin: 0 1px; padding: 0 1px; font-size: 12px; line-height: 1.2; white-space: nowrap; }
.payroll-employees-table .member-action-col { width: 154px; }
.payroll-employees-table .member-actions .link-button + .link-button { margin-left: 8px; }
.payroll-detail-table thead th { height: 42px; padding: 6px 5px; text-align: center; }
.payroll-detail-table thead tr:nth-child(2) th { height: 36px; background: #f7f8fa; font-size: 12px; }
.payroll-stacked-header { display: inline-block; line-height: 1.2; white-space: normal; }
.payroll-detail-table tfoot th, .payroll-detail-table tfoot td { height: 40px; padding: 6px 5px; border-top: 1px solid var(--line); background: #fffaf0; font-weight: 700; text-align: center; }
.payroll-detail-table tfoot .payroll-total-label { color: #111; }
.payroll-detail-table tbody td.payroll-net-salary-cell,
.payroll-preview-table tbody td.payroll-net-salary-cell,
.payroll-export-preview-modal .table-export-preview-table tbody td.payroll-net-salary-cell,
.payroll-detail-table tfoot .payroll-total-amount.payroll-net-salary-cell,
.payroll-preview-table tfoot .payroll-total-amount.payroll-net-salary-cell,
.payroll-export-preview-modal .payroll-total-amount.payroll-net-salary-cell { color: #c62828 !important; font-weight: 700 !important; }
.payroll-detail-table > tbody > tr:nth-child(odd of :not([hidden])) > td,
.payroll-preview-table > tbody > tr:nth-child(odd of :not([hidden])) > td,
.payroll-export-preview-modal .table-export-preview-table > tbody > tr:nth-child(odd of :not([hidden])) > td { background-color: #fff; }
.payroll-detail-table > tbody > tr:nth-child(even of :not([hidden])) > td,
.payroll-preview-table > tbody > tr:nth-child(even of :not([hidden])) > td,
.payroll-export-preview-modal .table-export-preview-table > tbody > tr:nth-child(even of :not([hidden])) > td { background-color: #eef8f1; }
.payroll-detail-table > tbody > tr > td,
.payroll-preview-table > tbody > tr > td,
.payroll-export-preview-modal .table-export-preview-table > tbody > tr > td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.payroll-detail-table .payroll-deduction-group { background: #f1f3f6; text-align: center; }
.payroll-detail-table .member-resize-handle { right: -7px; width: 14px; }
.payroll-wide-table-wrap { overflow: hidden; }
.modal.payroll-preview-modal { width: 1700px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.payroll-preview-wrap { max-height: calc(100vh - 142px); padding: 18px; overflow-x: hidden; overflow-y: auto; }
.payroll-preview-heading { margin: 0 0 16px; color: #111; font-size: 22px; font-weight: 700; line-height: 1.35; text-align: center; }
.payroll-preview-table { width: 100%; min-width: 0; table-layout: fixed; }
.payroll-preview-table th, .payroll-preview-table td { height: 40px; padding: 7px 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; }
.payroll-preview-table th { background: #fafafa; font-weight: 700; }
.payroll-preview-table th { min-width: 0; }
.payroll-preview-table th:first-child { min-width: 0; }
.payroll-preview-table .payroll-deduction-group { text-align: center; }
.payroll-preview-table th, .payroll-preview-table td,
.payroll-export-preview-modal .table-export-preview-table th,
.payroll-export-preview-modal .table-export-preview-table td { text-align: center; }
.payroll-preview-table tfoot th, .payroll-preview-table tfoot td,
.payroll-export-preview-modal .table-export-preview-table tfoot th,
.payroll-export-preview-modal .table-export-preview-table tfoot td { border-top: 1px solid var(--line); background: #fffaf0; font-weight: 700; text-align: center; }
.payroll-preview-modal .modal-footer { flex: 0 0 auto; }
.table-export-preview-modal { width: min(1180px, calc(100vw - 32px)); }
.table-export-preview-modal.order-payment-export-preview-modal { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.order-payment-export-preview-modal .table-export-preview-wrap { min-height: 0; overflow: auto; }
.order-payment-export-preview-modal .table-export-preview-table { width: 100%; min-width: 0; table-layout: fixed; }
.order-payment-export-preview-modal .table-export-preview-table th,
.order-payment-export-preview-modal .table-export-preview-table td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; text-align: center; }
.order-payment-print-heading { display: none; }
.table-export-preview-modal.inventory-export-preview-modal { width: min(800px, calc(100vw - 32px)); }
.table-export-preview-modal.finance-export-preview-modal { width: min(1000px, calc(100vw - 32px)); }
.table-export-preview-modal.cost-accounting-list-preview-modal { width: min(1200px, calc(100vw - 32px)); }
.table-export-preview-modal.production-progress-preview-modal { width: min(1700px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.production-progress-preview-modal .modal-header { position: relative; justify-content: center; }
.production-progress-preview-modal .modal-header h2 { width: 100%; color: #000; font-size: 22px; font-weight: 800; text-align: center; }
.production-progress-preview-modal .modal-header .modal-close { position: absolute; right: 18px; }
.production-progress-preview-modal .table-export-preview-wrap { min-height: 0; max-height: none; flex: 1 1 auto; }
.production-progress-preview-modal .table-export-preview-wrap { overflow-x: hidden; overflow-y: auto; }
.production-progress-preview-modal .table-export-preview-table { width: 100% !important; min-width: 0 !important; max-width: 100%; table-layout: fixed; }
.production-progress-preview-modal .table-export-preview-table th, .production-progress-preview-modal .table-export-preview-table td { text-align: center; }
.production-progress-preview-modal .table-export-preview-table th, .production-progress-preview-modal .table-export-preview-table td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; text-overflow: clip; }
.production-progress-preview-modal .table-export-preview-table td.production-progress-series-cell { padding: 4px; white-space: normal; }
.production-progress-preview-modal .table-export-preview-table td.production-progress-aluminum-color-cell { padding: 4px; white-space: normal; }
.production-progress-preview-modal .production-series-line { display: block; text-align: left; white-space: normal; }
.production-progress-preview-modal .production-series-name, .production-progress-preview-modal .production-series-count, .production-progress-preview-modal .production-series-area { display: inline; overflow: visible; white-space: normal; text-overflow: clip; }
.production-progress-print-heading { display: none; }
.production-print-orientation-control { display: inline-flex; align-items: center; gap: 7px; color: #555; font-size: 13px; white-space: nowrap; }
.production-print-orientation-control select { height: 32px; min-width: 76px; padding: 3px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #222; background: #fff; font: inherit; }
.finance-card-native-print-root { display: none; }
.cost-accounting-list-print-heading { display: none; }
.cost-accounting-list-preview-modal .table-export-preview-table { width: 100%; min-width: 0; table-layout: fixed; }
.cost-accounting-list-preview-modal .table-export-preview-table th,
.cost-accounting-list-preview-modal .table-export-preview-table td { white-space: normal; line-height: 1.45; vertical-align: middle; overflow-wrap: anywhere; }
.cost-accounting-list-preview-modal .cost-accounting-preview-multiline-cell { white-space: normal; }
.cost-accounting-list-preview-modal .cost-accounting-preview-multiline { display: inline-block; text-align: center; }
.table-export-preview-modal.payroll-export-preview-modal { width: min(1700px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.payroll-export-preview-modal .table-export-preview-wrap { max-height: calc(100vh - 194px); overflow-x: hidden; overflow-y: auto; }
.payroll-export-preview-modal .table-export-preview-table { width: 100%; min-width: 0; table-layout: fixed; }
.payroll-export-preview-modal .table-export-preview-table th { min-width: 0; }
.payroll-export-preview-modal .table-export-preview-table th:nth-child(2) { min-width: 0; }
.payroll-export-preview-modal .table-export-preview-table th,
.payroll-export-preview-modal .table-export-preview-table td { padding-left: 5px; padding-right: 5px; white-space: normal; overflow-wrap: anywhere; }
.payroll-export-preview-modal .payroll-deduction-group { text-align: center; }
.payroll-export-preview-modal .modal-footer { flex: 0 0 auto; }
.table-export-preview-wrap { max-height: min(68vh, 720px); overflow: auto; padding: 18px; }
.finance-export-preview-modal .table-export-preview-wrap { margin: 0 18px; padding: 18px 0 0; overflow-x: hidden; }
.finance-export-preview-modal .table-export-preview-table th,
.finance-export-preview-modal .table-export-preview-table td { text-align: center; }
.finance-export-preview-modal > .table-pagination { padding: 0 18px; }
.table-export-preview-table { min-width: 760px; }
.table-export-preview-table th, .table-export-preview-table td { height: 40px; padding: 7px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-export-preview-table th { background: #fafafa; font-weight: 700; }
.payroll-bottom-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 14px; }
.payroll-file-slot { min-width: 0; color: #666; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payroll-file-slot-bottom { min-height: 22px; margin-top: 8px; text-align: right; }
.payroll-file-slot a { color: #9f2d2d; text-decoration: none; }
.payroll-file-slot a:hover { text-decoration: underline; }
.payroll-rules-panel { max-width: none; margin-top: 0; }
.payroll-rules-panel h1 { margin: 0; color: #111; font-size: 16px; }
.payroll-rules-grid { width: 100%; }
.payroll-rules-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.payroll-rule-card { min-width: 0; margin: 0; }
.payroll-rule-card h2 { margin: 0; color: #111; font-size: 16px; }
.payroll-rule-fields { display: grid; gap: 12px; padding: 18px 16px 8px; }
.payroll-rule-fields label { display: grid; grid-template-columns: 1fr minmax(100px, 1fr); align-items: center; gap: 10px; color: #444; font-size: 13px; }
.payroll-salary-rule-list { display: grid; gap: 10px; margin: 0; padding: 18px 22px 18px 38px; color: #333; font-size: 13px; line-height: 1.7; }
.payroll-salary-rule-list li::marker { color: var(--red); font-weight: 700; }
.payroll-rule-fields input, .payroll-rule-fields select { width: 100%; min-width: 0; min-height: 34px; padding: 6px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; }
.payroll-rule-note { margin: 0 16px 12px; color: #777; font-size: 12px; line-height: 1.5; }
.payroll-custom-rules { padding: 8px 16px 16px; border-top: 1px solid #f0f0f0; }
.payroll-custom-rules h3 { margin: 0 0 10px; color: #777; font-size: 12px; font-weight: 400; }
.payroll-custom-rule { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; gap: 6px; margin-bottom: 8px; }
.payroll-custom-rule input { width: 100%; min-width: 0; min-height: 30px; padding: 5px 7px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; }
.payroll-custom-rule .link-button { font-size: 12px; }
.payroll-add-rule { min-height: 30px; padding: 0 8px; font-size: 12px; }
.payroll-rules-status { grid-column: 1 / -1; color: #398356; font-size: 12px; }
.payroll-modal { width: min(620px, 100%); }
.payroll-edit-modal { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.payroll-edit-modal form { min-height: 0; display: flex; flex-direction: column; }
.payroll-edit-grid { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 18px 22px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); overflow-y: auto; }
.payroll-edit-field { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 122px minmax(0, 1fr); align-items: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.payroll-edit-field > span { align-self: stretch; display: flex; align-items: center; justify-content: center; padding: 7px 10px; background: #fafafa; color: #000; font-size: 14px; font-weight: 700; text-align: center; }
.payroll-edit-field input { width: calc(100% - 16px); min-width: 0; min-height: 32px; margin: 7px 8px; padding: 4px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #000; background: #fff; text-align: center; }
.payroll-edit-field input[readonly] { color: #555; background: #f8f8f8; }
.payroll-edit-modal .modal-footer { flex: 0 0 auto; }
.permission-page { min-height: calc(100vh - 126px); display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; padding-top: 20px; }
.permission-roles { border-right: 1px solid var(--line); padding-right: 16px; }
.permission-roles h1, .permission-heading h1 { margin: 0; color: #000; font-size: 18px; line-height: 1.2; }
.permission-role-tab { width: 100%; min-height: 40px; display: block; margin-top: 8px; padding: 0 14px; border: 0; border-left: 3px solid transparent; color: #444; background: transparent; font-size: 14px; text-align: left; }
.permission-role-tab:hover { background: #f7f7f7; }
.permission-role-tab.active { border-left-color: var(--red); color: var(--red); background: #fff5f5; font-weight: 700; }
.permission-main { min-width: 0; }
.permission-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.permission-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.permission-saving { flex: 0 0 auto; color: #4b9568; font-size: 12px; }
.permission-tables { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.permission-table-wrap { width: 100%; overflow: hidden; border: 1px solid var(--line); }
.permission-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.permission-table th, .permission-table td { height: 50px; padding: 8px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #000; font-size: 12px; text-align: center; vertical-align: middle; }
.permission-table thead th { height: 46px; background: #fafafa; font-weight: 700; }
.permission-table th:not(.permission-menu-col), .permission-table td { width: 54px; }
.permission-table tr > :last-child { border-right: 0; }
.permission-table tbody tr:last-child > * { border-bottom: 0; }
.permission-menu-col { width: auto !important; text-align: center !important; }
.permission-title-check, .permission-action-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.permission-title-check { width: 100%; justify-content: center; text-align: center; }
.permission-title-check span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.permission-title-check em { display: block; margin-bottom: 2px; color: #888; font-size: 11px; font-style: normal; font-weight: 400; }
.permission-action-check { justify-content: center; gap: 5px; }
.permission-check { display: inline-flex; justify-content: center; align-items: center; width: 100%; height: 32px; cursor: pointer; }
.permission-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.classic-page { min-height: calc(100vh - 106px); padding-top: 2px; }
.classic-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; min-height: 72px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-kicker { display: block; margin-bottom: 7px; color: #888; font-size: 12px; }
.classic-page-header h1 { margin: 0; color: #000; font-size: 22px; line-height: 1.2; }
.classic-page-header p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.classic-page-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.classic-panel { margin-top: 20px; border: 1px solid var(--line); background: #fff; }
.classic-panel-header { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.classic-panel-header h2 { margin: 0; color: #111; font-size: 16px; }
.muted-label { color: #888; font-size: 12px; }
.status-chip { padding: 4px 8px; color: #4b9568; background: #f1faf4; font-size: 12px; }
.settings-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr); gap: 20px; margin-top: 20px; }
.settings-grid .classic-panel { margin-top: 0; }
.account-admin-grid { grid-template-columns: minmax(300px, .75fr) minmax(480px, 1.25fr); }
.account-summary { min-height: 188px; padding: 20px 16px; color: var(--muted); font-size: 13px; }
.account-details { margin: 0; }
.account-details div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; min-height: 42px; align-items: center; border-bottom: 1px solid #f0f0f0; }
.account-details div:last-child { border-bottom: 0; }
.account-details dt { color: #888; }
.account-details dd { margin: 0; color: #111; }
.settings-form { display: grid; gap: 14px; padding: 20px 16px; }
.settings-form label { display: grid; gap: 7px; color: #333; font-size: 13px; }
.settings-form input, .settings-form select { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; }
.settings-form small { margin-top: -3px; color: #888; font-size: 12px; }
.settings-checkbox { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 8px !important; }
.settings-checkbox input { width: 15px; min-height: 15px; accent-color: var(--red); }
.form-message { min-height: 18px; margin: 0; color: var(--red); font-size: 13px; }
.form-message.success { color: #398356; }
.form-message.error { color: var(--red); }
.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.classic-table-wrap { width: 100%; overflow: hidden; }
/* 所有业务数据表复用成员信息的规则：两列固定，操作列固定，内容列只在相邻分隔线处调整。 */
.system-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.system-table th, .system-table td { min-width: 0; height: 44px; padding: 8px 10px; overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #000; font-size: 13px; text-align: left; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.system-table th { background: #fafafa; font-weight: 700; }
.system-table tr > :last-child { border-right: 0; }
.system-table tbody tr:last-child > * { border-bottom: 0; }
.system-table .check-col, .system-table .serial-col { text-align: center; }
.system-table .member-action-col, .system-table .member-actions { text-align: center; }
.system-table .record-detail, .system-table .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.system-table .member-actions { overflow: visible; text-overflow: clip; white-space: nowrap; }
.system-table .member-actions .link-button { margin: 0 4px; }
.system-table th:not(.check-col):not(.serial-col):not(.member-action-col) { position: relative; padding-right: 16px; }
.system-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; vertical-align: middle; accent-color: var(--red); }
.user-table th:nth-child(6), .user-table td:nth-child(6) { text-align: center; }
.account-state { display: inline-block; padding: 3px 8px; font-size: 12px; }
.account-state.enabled { color: #398356; background: #f1faf4; }
.account-state.disabled { color: #888; background: #f3f3f3; }
.danger-link { color: var(--red); }
.table-state { height: 132px !important; color: #888 !important; text-align: center !important; }
.table-state.error { color: var(--red) !important; }
.backup-notice { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 13px 16px; border-left: 3px solid #d6a63d; color: #6c5a2f; background: #fffaf0; font-size: 13px; }
.backup-notice strong { color: #5a471e; }
.modal-mask { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .24); }
.modal { width: min(620px, 100%); background: #fff; border: 1px solid var(--line); }
.modal-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); cursor: grab; user-select: none; touch-action: none; }
.modal-header:active { cursor: grabbing; }
.modal-header button, .modal-header input, .modal-header select { cursor: pointer; }
.modal-header h2 { margin: 0; color: #000; font-size: 18px; }
.modal h3,
.modal h4,
.modal .purchase-order-field > span,
.modal .purchase-material-filters label,
.modal .finance-related-order-group h3,
.modal .inventory-image-modal-content dt,
.modal .after-sales-refund-view-summary span,
.modal .after-sales-order-field > span,
.modal .after-sales-block-title,
.modal .order-payment-card h2,
.modal .product-order-field,
.modal .product-order-entry-field,
.modal .product-order-amounts label,
.modal .cost-accounting-usage-picker-filter label,
.modal .announcement-form label,
.modal .announcement-view-content dt,
.modal .payroll-rule-fields label,
.modal .settings-form label,
.modal .account-details dt { color: #000; }
.modal-close { width: 30px; height: 30px; padding: 0; border: 0; color: #555; background: transparent; font-size: 24px; line-height: 1; }
.member-form-table-wrap { padding: 20px 22px; }
.member-form-table { border: 1px solid var(--line); }
.member-form-table th, .member-form-table td { height: 48px; padding: 7px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #000; font-size: 14px; text-align: left; }
.member-form-table th { width: 130px; background: #fafafa; font-weight: 700; }
.member-form-table tr > :last-child { border-right: 0; }
.member-form-table tbody tr:last-child > * { border-bottom: 0; }
.member-form-table input, .member-form-table select, .member-form-table textarea { width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #000; background: #fff; }
.member-form-table textarea { display: block; min-height: 76px; resize: vertical; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.product-order-auto-save-status { margin-right: auto; align-self: center; color: #777; font-size: 13px; }
.product-order-auto-save-status[data-state="saving"] { color: #8a6500; }
.product-order-auto-save-status[data-state="saved"] { color: #237a3b; }
.product-order-auto-save-status[data-state="error"] { color: var(--red); }
@media print {
  @page { margin: 10mm; }
  #loginView, #appView, #toast { display: none !important; }
  #modalRoot { display: block !important; }
  .export-preview-mask { position: static; display: block; background: #fff; }
  .table-export-preview-modal { width: 100%; max-width: none; box-shadow: none; }
  .table-export-preview-modal .modal-header, .table-export-preview-modal .modal-footer { display: none; }
  .table-export-preview-wrap { max-height: none; overflow: visible; padding: 0; }
  .order-payment-print-heading { display: block; margin: 0 0 14px; color: #000; font-size: 24px; font-weight: 800; line-height: 1.35; text-align: center; }
  .table-export-preview-modal.order-payment-export-preview-modal { width: 100% !important; max-width: none !important; max-height: none !important; border: 0; outline: 0; box-shadow: none; overflow: visible; }
  .order-payment-export-preview-modal .table-export-preview-wrap { width: 100%; max-height: none; padding: 0 10mm; overflow: visible; box-sizing: border-box; }
  .order-payment-export-preview-modal .table-export-preview-table { width: 100% !important; min-width: 0 !important; table-layout: fixed; margin: 0 auto; }
  .order-payment-export-preview-modal .table-export-preview-table th,
  .order-payment-export-preview-modal .table-export-preview-table td { height: auto; min-width: 0; padding: 5px 6px; font-size: 10px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
  .order-payment-export-preview-modal .member-resize-handle,
  .order-payment-export-preview-modal .table-pagination { display: none !important; }
  .production-progress-print-heading { display: block; margin: 0 0 14px; color: #000; font-size: 24px; font-weight: 800; text-align: center; }
  .table-export-preview-modal.production-progress-preview-modal { page: auto; width: 100% !important; max-width: none !important; max-height: none !important; overflow: visible !important; border: 0; outline: 0; box-shadow: none; }
  .production-progress-preview-modal .table-export-preview-wrap { width: 100%; max-height: none; padding: 0; overflow: visible; box-sizing: border-box; }
  .production-progress-preview-modal .table-export-preview-table { width: 100% !important; min-width: 0 !important; max-width: 100% !important; margin: 0; table-layout: fixed !important; }
  .production-progress-preview-modal .table-export-preview-table th,
  .production-progress-preview-modal .table-export-preview-table td { min-width: 0; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
  .production-progress-preview-modal .member-resize-handle,
  .production-progress-preview-modal .table-pagination { display: none !important; }
  .production-progress-preview-modal .table-export-preview-table tr { break-inside: avoid; }
  body.production-progress-printing .production-progress-preview-modal tbody tr[hidden]:not([data-table-filter-hidden="true"]) { display: table-row !important; }
  body.finance-card-native-printing > * { display: none !important; }
  body.finance-card-native-printing > .finance-card-native-print-root { display: block !important; width: 100%; color: #000; background: #fff; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .finance-card-native-print-root h1 { margin: 0 0 8mm; color: #000; font-size: 20px; line-height: 1.35; text-align: center; }
  .finance-card-native-print-table { width: 100% !important; min-width: 0 !important; max-width: 100% !important; margin: 0; border-collapse: collapse; table-layout: fixed !important; }
  .finance-card-native-print-table thead { display: table-header-group; }
  .finance-card-native-print-table tr { break-inside: avoid; page-break-inside: avoid; }
  .finance-card-native-print-table th,
  .finance-card-native-print-table td { height: auto; min-width: 0 !important; padding: 4px 3px; border: 1px solid #000 !important; color: #000; background: #fff; font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
  .finance-card-native-print-table th { font-weight: 700; }
  .finance-card-native-print-table .member-resize-handle,
  .finance-card-native-print-table .member-filter-button { display: none !important; }
  .product-order-print-mask { position: static; display: block; padding: 0; background: #fff; }
  .product-order-direct-print-mask { position: static; display: block; width: 100% !important; padding: 0; background: #fff; }
  .product-order-direct-print-mask .product-order-detail-modal { display: block; width: 100% !important; max-width: none; max-height: none; border: 0; box-shadow: none; overflow: visible; }
  .product-order-direct-print-mask .product-order-detail-modal > .modal-header,
  .product-order-direct-print-mask .product-order-detail-modal > .modal-footer { display: none; }
  .product-order-direct-print-mask .product-order-detail-scroll { display: block; width: 100% !important; max-height: none; padding: 0; overflow: visible; }
  .product-order-direct-print-mask .product-order-detail,
  .product-order-direct-print-mask .product-order-detail-document { display: block; width: 100% !important; min-width: 0; }
  .product-order-direct-print-mask .product-order-detail-fields,
  .product-order-direct-print-mask .product-order-detail-data-table { width: 100% !important; max-width: 100%; table-layout: fixed; }
  .product-order-direct-print-mask .product-order-detail-fields th { width: 28%; }
  .product-order-direct-print-mask .product-order-detail-fields th,
  .product-order-direct-print-mask .product-order-detail-fields td,
  .product-order-direct-print-mask .product-order-detail-data-table th,
  .product-order-direct-print-mask .product-order-detail-data-table td { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
  .product-order-print-preview-modal { width: 100%; max-width: none; max-height: none; overflow: visible; border: 0; }
  .product-order-print-preview-modal .modal-header, .product-order-print-preview-modal .modal-footer { display: none; }
  .product-order-print-preview-body { max-height: none; padding: 0; overflow: visible; }
  .product-order-detail-section { break-inside: avoid; }
  .product-order-pdf-section, .product-order-pdf-document { break-inside: auto; }
  .product-order-pdf-heading { break-after: avoid; }
  .product-order-pdf-pages { display: block; padding: 0; border: 0; background: #fff; }
  .product-order-pdf-page { max-width: none; margin: 0; box-shadow: none; break-after: page; page-break-after: always; }
  .product-order-pdf-section .product-order-pdf-document:last-of-type .product-order-pdf-page:last-child { break-after: auto; page-break-after: auto; }
  .product-order-pdf-frame { height: 940px; }
  .product-order-print-time { break-inside: avoid; margin-top: 20px; text-align: right; }
  .purchase-order-print-mask { position: static; display: block; padding: 0; background: #fff; }
  .purchase-order-print-preview-modal { width: 100%; max-width: none; max-height: none; overflow: visible; border: 0; }
  .purchase-order-print-preview-modal .modal-header, .purchase-order-print-preview-modal .modal-footer { display: none; }
  .purchase-order-preview-body { max-height: none; padding: 0; overflow: visible; }
  .purchase-order-preview-table-wrap { overflow: visible; }
  .purchase-order-preview-table { min-width: 0; width: 100%; table-layout: auto; }
  .purchase-order-preview-table th, .purchase-order-preview-table td { min-width: 0; padding: 4px; font-size: 10px; }
  .outbound-order-print-mask { position: static; display: block; padding: 0; background: #fff; }
  .outbound-order-print-preview-modal { width: 100%; max-width: none; max-height: none; overflow: visible; border: 0; }
  .outbound-order-print-preview-modal .modal-header, .outbound-order-print-preview-modal .modal-footer { display: none; }
  .outbound-order-preview-body { max-height: none; padding: 0; overflow: visible; }
  .outbound-order-preview-table-wrap { overflow: visible; }
  .outbound-order-preview-table { min-width: 0; width: 100%; table-layout: fixed; }
  .outbound-order-preview-table th, .outbound-order-preview-table td { height: auto; min-width: 0; padding: 4px; font-size: 10px; line-height: 1.35; }
  .cost-accounting-print-mask { position: static; display: block; padding: 10mm; box-sizing: border-box; background: #fff; }
  .cost-accounting-preview-modal { width: 100%; max-width: none; max-height: none; overflow: visible; border: 0; outline: 0; box-shadow: none; }
  .cost-accounting-preview-modal .modal-header, .cost-accounting-preview-modal .modal-footer { display: none; }
  .cost-accounting-preview-body { max-height: none; padding: 0; overflow: visible; }
  .cost-accounting-print-title { color: #000 !important; font-size: 24px; font-weight: 800; }
  .cost-accounting-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-accounting-preview-section, .cost-accounting-preview-table tr { break-inside: avoid; }
  .cost-accounting-preview-section .member-table-wrap { max-height: none; overflow: visible; }
  .cost-accounting-preview-table { min-width: 0; }
  .cost-accounting-list-print-mask { width: 100%; padding: 0; }
  .table-export-preview-modal.cost-accounting-list-preview-modal { width: 100% !important; max-width: none !important; border: 0; outline: 0; box-shadow: none; }
  .cost-accounting-list-preview-modal .table-export-preview-wrap { width: 100%; margin: 0 !important; padding: 5mm 3mm; box-sizing: border-box; }
  .cost-accounting-list-preview-modal .table-export-preview-table { width: 100% !important; min-width: 0 !important; max-width: 100% !important; table-layout: fixed !important; }
  .cost-accounting-list-preview-modal .table-export-preview-table col { width: auto !important; }
  .cost-accounting-list-preview-modal .table-export-preview-table th,
  .cost-accounting-list-preview-modal .table-export-preview-table td { height: auto; min-width: 0; padding: 3px 2px; overflow: visible; font-size: 9px; line-height: 1.25; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  .cost-accounting-list-preview-modal .table-export-preview-table th:nth-child(1),
  .cost-accounting-list-preview-modal .table-export-preview-table td:nth-child(1) { width: 5%; }
  .cost-accounting-list-preview-modal .table-export-preview-table th:nth-child(2),
  .cost-accounting-list-preview-modal .table-export-preview-table td:nth-child(2) { width: 8%; }
  .cost-accounting-list-preview-modal .table-export-preview-table th:nth-child(3),
  .cost-accounting-list-preview-modal .table-export-preview-table td:nth-child(3) { width: 14%; }
  .cost-accounting-list-preview-modal .table-export-preview-table th:nth-child(4),
  .cost-accounting-list-preview-modal .table-export-preview-table td:nth-child(4) { width: 23%; }
  .cost-accounting-list-preview-modal .table-export-preview-table .member-resize-handle { display: none !important; }
  .cost-accounting-list-print-heading { display: block; margin: 0 0 14px; text-align: center; }
  .cost-accounting-list-print-heading h1 { margin: 0 0 6px; color: #000 !important; font-size: 24px; font-weight: 800; line-height: 1.35; }
  .cost-accounting-list-print-heading p { margin: 0; color: #333; font-size: 14px; }
  .cost-accounting-list-preview-modal .table-pagination { display: none !important; }
  body.cost-accounting-printing .cost-accounting-list-preview-modal tbody tr[hidden]:not([data-table-filter-hidden="true"]) { display: table-row !important; }
  .finance-page .finance-table > tfoot > tr > td.finance-add-cell { position: static; box-shadow: none; }
  .table-overflow-tooltip { display: none !important; }
}
.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; padding: 10px 14px; color: #fff; background: #222; opacity: 0; pointer-events: none; transition: opacity .16s; }
.toast.show { opacity: 1; }

/* 新版统一表格规范：所有表头文字居中，表体保持各页面原有对齐方式。 */
table thead th { text-align: center !important; }

.approval-attachment-list, .approval-edit-attachments { display: grid; gap: 5px; }
.approval-order-viewer-modal { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.approval-order-viewer-body { min-height: 0; display: grid; gap: 14px; padding: 16px 20px; overflow: auto; }
.approval-order-viewer-section { min-width: 0; }
.approval-order-viewer-section h3 { margin: 0 0 8px; font-size: 15px; }
.purchase-order-approval-preview-modal { width: 700px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.purchase-order-approval-preview-modal .purchase-order-preview-body { width: 100%; box-sizing: border-box; }
.purchase-order-approval-preview-modal .purchase-order-preview-table-wrap { max-width: 100%; overflow: auto; }
.approval-attachment-list a, .approval-edit-attachments a { color: #333; text-decoration: underline; text-underline-offset: 2px; }
.approval-edit-attachments > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.approval-edit-attachments a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.approval-empty-attachment { color: #888; }
.approval-flow { margin: 14px 20px 0; padding: 12px 14px; border: 1px solid var(--line); }
.approval-flow h3 { margin: 0 0 12px; color: #111; font-size: 15px; }
.approval-flow-info { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: -4px 0 12px; color: #666; font-size: 12px; }
.approval-flow-info span { white-space: nowrap; }
.approval-state-text { display: inline-block; white-space: nowrap; }
.approval-state-pending { color: #237a3b; }
.approval-state-unsent { color: #c40000; }
.approval-state-approved { color: #888; }
.approval-state-rejected { color: #c40000; }
.approval-state-default { color: inherit; }
.approval-flow ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; }
.approval-flow li { position: relative; display: grid; grid-template-rows: 22px auto auto; justify-items: center; row-gap: 3px; color: #888; font-size: 13px; text-align: center; }
.approval-flow li:not(:last-child)::after { content: ''; position: absolute; top: 10px; left: calc(50% + 10px); right: calc(-50% + 10px); height: 1px; background: #d8d8d8; }
.approval-flow li i { position: relative; z-index: 1; width: 20px; height: 20px; border: 1px solid #c6c6c6; border-radius: 50%; background: #fff; }
.approval-flow li.done { color: #333; }
.approval-flow li.done i { border-color: var(--red); background: var(--red); }
.approval-flow li.done i::after { content: ''; position: absolute; top: 4px; left: 6px; width: 5px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.approval-flow li.done:not(:last-child)::after { background: var(--red); }
.approval-flow li span { white-space: nowrap; }
.approval-flow li small { color: #999; font-size: 11px; }

.modal-mask:has(.payment-order-modal) { padding: 16px; }
.payment-order-modal { width: min(1200px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.payment-order-modal > form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; }
.payment-order-form-scroll { min-height: 0; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; }
.payment-order-form-wrap { padding-bottom: 6px; }
.payment-order-form-table col.payment-order-label-col { width: 130px; }
.payment-order-form-table th { width: auto; text-align: center; }
.payment-order-form-table td { text-align: left; }
.payment-order-form-table textarea[name="paymentContent"] { min-height: 86px; text-align: left; }
.payment-order-form-table .member-multi-select { width: 100%; }
.payment-order-modal .approval-flow { margin-bottom: 16px; }
.payment-order-records { padding: 0 18px 16px; }
.payment-order-records-head { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.payment-order-records-head h3 { margin: 0; color: #222; font-size: 15px; }
.payment-order-records-head h3 small { color: #777; font-size: 12px; font-weight: 400; }
.payment-record-auto-save-status { margin-left: auto; color: #777; font-size: 12px; white-space: nowrap; }
.payment-record-auto-save-status[data-state="saving"], .payment-record-auto-save-status[data-state="waiting"] { color: #8a6500; }
.payment-record-auto-save-status[data-state="saved"] { color: #237a3b; }
.payment-record-auto-save-status[data-state="error"] { color: var(--red); }
.payment-order-records-wrap { max-height: 280px; overflow-x: hidden; overflow-y: auto; }
.payment-order-records-table { width: 100%; min-width: 0; table-layout: fixed; }
.payment-order-records-table th, .payment-order-records-table td { height: 42px; padding: 5px 6px; text-align: center; }
.payment-order-records-table td { white-space: normal; overflow-wrap: anywhere; }
.payment-order-records-table input, .payment-order-records-table select { width: 100%; min-width: 0; height: 32px; padding: 4px 6px; border: 1px solid #d4d4d4; border-radius: 2px; background: #fff; text-align: center; }
.payment-order-records-table .payment-record-time-col { width: 140px; }
.payment-order-records-table .payment-record-amount-col { width: 130px; }
.payment-order-records-table .payment-record-bank-col { width: 140px; }
.payment-record-receipt-editor { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; }
.payment-record-receipt-links { min-width: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.payment-record-receipt-links a { max-width: 180px; overflow: hidden; color: var(--red); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.payment-record-receipt-links a:hover { text-decoration: underline; }
.payment-record-receipt-empty { color: #999; }
.payment-record-receipt-remove { font-size: 12px; }
.payment-record-viewer-modal { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.payment-order-viewer-records { padding: 0 18px 16px; }
.payment-order-viewer-records h3 { margin: 0 0 10px; color: #222; font-size: 15px; }
.payment-record-viewer-wrap { min-height: 0; padding: 18px; overflow-x: hidden; overflow-y: auto; }
.payment-order-viewer-records .payment-record-viewer-wrap { max-height: 260px; padding: 0; }
.payment-record-viewer-table { width: 100%; min-width: 0; table-layout: fixed; }
.payment-record-viewer-table th, .payment-record-viewer-table td { text-align: center; }
.payment-record-viewer-table td { white-space: normal; overflow-wrap: anywhere; }
.payment-attachment-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.payment-attachment-toolbar > span { color: #888; font-size: 12px; }
.payment-attachment-edit-list { min-height: 24px; }
.payment-attachment-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.payment-attachment-card { position: relative; width: 126px; min-width: 0; padding: 6px; border: 1px solid #dedede; border-radius: 4px; background: #fff; }
.payment-attachment-card > span { display: block; margin-top: 5px; overflow: hidden; color: #555; font-size: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.payment-attachment-thumbnail { display: flex; width: 112px; height: 82px; align-items: center; justify-content: center; padding: 0; overflow: hidden; border: 0; background: #f4f4f4; cursor: zoom-in; }
.payment-attachment-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.payment-attachment-remove { position: absolute; z-index: 2; top: -7px; right: -7px; width: 21px; height: 21px; padding: 0; border: 1px solid #c75b5b; border-radius: 50%; color: #fff; background: #c75b5b; font-size: 16px; line-height: 17px; cursor: pointer; }
.payment-attachment-file-card a { min-height: 82px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: #444; text-decoration: none; }
.payment-attachment-file-card a b { display: grid; width: 44px; height: 52px; place-items: center; border: 1px solid #d4a3a3; color: #b34e4e; background: #fff7f7; font-size: 12px; }
.payment-attachment-file-card a span { width: 100%; overflow: hidden; font-size: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.payment-order-viewer-modal { width: min(1000px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); overflow-x: hidden; overflow-y: auto; }
.payment-order-viewer-modal .member-form-table td { overflow-wrap: anywhere; }
.payment-image-gallery-mask { position: fixed; z-index: 1100; inset: 0; display: grid; place-items: center; padding: 28px 76px; background: rgba(0, 0, 0, .78); }
.payment-image-gallery { position: relative; width: min(1180px, 100%); height: min(820px, calc(100vh - 56px)); display: grid; grid-template-columns: 58px minmax(0, 1fr) 58px; align-items: stretch; }
.payment-image-gallery-single { grid-template-columns: minmax(0, 1fr); }
.payment-image-gallery figure { width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; align-items: center; justify-items: center; gap: 12px; margin: 0; overflow: hidden; }
.payment-image-gallery figure img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; box-shadow: 0 4px 24px rgba(0, 0, 0, .32); background: #fff; }
.payment-image-gallery figcaption { width: 100%; display: flex; align-items: center; justify-content: center; gap: 16px; color: #fff; font-size: 14px; }
.payment-image-gallery figcaption span { max-width: min(720px, 75%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-image-gallery figcaption small { color: #ddd; font-size: 12px; white-space: nowrap; }
.payment-image-gallery-close, .payment-image-gallery-nav { border: 0; color: #fff; background: rgba(0, 0, 0, .3); cursor: pointer; }
.payment-image-gallery-close { position: absolute; z-index: 2; top: 0; right: 0; width: 42px; height: 42px; border-radius: 50%; font-size: 30px; line-height: 38px; }
.payment-image-gallery-nav { width: 48px; height: 72px; border-radius: 4px; font-size: 48px; line-height: 60px; }
.payment-image-gallery-nav:hover, .payment-image-gallery-close:hover { background: rgba(255, 255, 255, .18); }
.payment-image-gallery-prev { justify-self: start; }
.payment-image-gallery-next { justify-self: end; }

/* 采购附件默认以轮播大图画布等比显示；点击图片可在弹层内按原始尺寸查看细节。 */
.purchase-glass-image-gallery-mask { padding: 12px 46px; }
.purchase-glass-image-gallery-mask .payment-image-gallery { width: min(1680px, 100%); height: calc(100vh - 24px); }
.purchase-glass-image-gallery-mask .payment-image-gallery figure { width: 100%; height: 100%; overflow: hidden; background: #171717; }
.purchase-glass-image-gallery-mask .payment-image-gallery figure img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; image-rendering: auto; cursor: zoom-in; }
.purchase-glass-image-gallery-mask.purchase-glass-image-gallery-zoomed .payment-image-gallery figure { justify-items: start; align-items: start; overflow: auto; cursor: zoom-out; }
.purchase-glass-image-gallery-mask.purchase-glass-image-gallery-zoomed .payment-image-gallery figure img { max-width: none; max-height: none; cursor: zoom-out; }

@media (max-width: 760px) {
  .payment-order-form-table col.payment-order-label-col { width: 96px; }
  .payment-image-gallery-mask { padding: 16px; }
  .payment-image-gallery { grid-template-columns: 42px minmax(0, 1fr) 42px; }
  .payment-image-gallery-nav { width: 38px; height: 60px; }
  .purchase-glass-image-gallery-mask { padding: 10px; }
  .purchase-glass-image-gallery-mask .payment-image-gallery { grid-template-columns: 34px minmax(0, 1fr) 34px; }
}

.finance-dashboard-page { display: grid; gap: 18px; }
.finance-dashboard-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.finance-dashboard-card { min-height: 126px; padding: 18px; border: 1px solid var(--line); border-top-width: 3px; background: #fff; display: grid; align-content: space-between; gap: 8px; }
.finance-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.finance-dashboard-card > span { color: #555; font-size: 14px; }
.finance-card-heading > span { min-width: 0; color: #555; font-size: 14px; }
.finance-card-detail-button { flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: 1px solid #d4d4d4; border-radius: 50%; color: #555; background: #fff; font-size: 15px; line-height: 24px; cursor: pointer; }
.finance-card-detail-button:hover, .finance-card-detail-button:focus-visible { border-color: var(--red); color: var(--red); outline: none; }
.finance-dashboard-card strong { color: #111; font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.finance-dashboard-card small { color: #888; font-size: 12px; }
.finance-balance-card { border-top-color: #286b92; }
.finance-receivable-card { border-top-color: #398356; }
.finance-payable-card { border-top-color: #c56d31; }
.finance-reimbursement-card { border-top-color: var(--red); }
.finance-chart-panel, .finance-balance-panel { margin: 0; }
.finance-chart-toolbar { gap: 12px; }
.finance-chart-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; }
.finance-chart-mode-toggle { display: inline-flex; overflow: hidden; border: 1px solid #d4d4d4; border-radius: 3px; background: #fff; }
.finance-chart-mode-button { min-width: 52px; height: 30px; padding: 0 10px; border: 0; border-right: 1px solid #d4d4d4; color: #555; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.finance-chart-mode-button:last-child { border-right: 0; }
.finance-chart-mode-button.active { color: #fff; background: var(--red); }
.finance-chart-mode-button:focus-visible { position: relative; z-index: 1; outline: 2px solid #555; outline-offset: -2px; }
.finance-chart-legend { display: inline-flex; align-items: center; gap: 7px; color: #666; font-size: 12px; }
.finance-chart-legend i { display: inline-block; width: 10px; height: 10px; margin-left: 6px; }
.finance-legend-last, .finance-chart-bar-last { background: #c7d5de; }
.finance-legend-current, .finance-chart-bar-current { background: #2d789d; }
.finance-bar-chart { --finance-chart-grid-count: 5; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; height: 280px; min-height: 280px; box-sizing: border-box; padding: 18px 20px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid #e8e8e8; background: #fff; }
.finance-chart-axis { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; padding: 0 0 20px; color: #777; font-size: 10px; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.finance-chart-axis b { margin-bottom: 8px; color: #666; font-size: 11px; font-weight: 400; white-space: nowrap; }
.finance-chart-axis span { white-space: nowrap; }
.finance-chart-month { display: grid; grid-template-rows: minmax(0, 1fr) 20px; height: 100%; min-width: 0; text-align: center; }
.finance-chart-bars { position: relative; height: 100%; min-height: 0; box-sizing: border-box; padding: 34px 0 8px; }
.finance-chart-bar { position: absolute; bottom: 8px; display: block; width: min(11px, 21%); height: 0; outline: none; }
.finance-chart-bar-last { left: calc(50% - min(13px, 25%)); }
.finance-chart-bar-current { left: calc(50% + 2px); }
.finance-chart-bar-single { left: 50%; transform: translateX(-50%); }
.finance-chart-bar:focus-visible { box-shadow: 0 0 0 2px #555; }
.finance-chart-bar-value { position: absolute; bottom: calc(100% + 3px); left: 50%; color: #333; font-size: 10px; line-height: 1; white-space: nowrap; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.finance-chart-month small { color: #777; font-size: 11px; }
.finance-year-picker { display: inline-flex; align-items: center; gap: 8px; color: #666; font-size: 13px; }
.finance-year-picker input, .finance-year-picker select { width: 100px; min-height: 32px; padding: 4px 8px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; text-align: center; }
.finance-balance-table th, .finance-balance-table td { text-align: center; }
.finance-balance-table .finance-opening-input { width: 100%; min-width: 0; min-height: 30px; padding: 4px 7px; border: 1px solid #d4d4d4; border-radius: 3px; color: #111; background: #fff; text-align: center; }
.finance-balance-table td { font-variant-numeric: tabular-nums; }
.finance-balance-table .finance-balance-total { color: #1c5d7d; font-weight: 700; }
.finance-balance-table th:first-child { width: 160px; }
.finance-balance-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: center; }
.finance-balance-detail-grid > span { min-width: 0; display: grid; gap: 4px; justify-items: center; }
.finance-balance-detail-grid b { color: #777; font-size: 12px; font-weight: 400; }
.finance-balance-detail-grid em { min-height: 30px; display: flex; align-items: center; justify-content: center; color: #111; font-size: 14px; font-style: normal; }
.finance-balance-table .finance-opening-input { border: 1px solid #d4d4d4 !important; background: #fff !important; box-shadow: none !important; }
.finance-card-detail-modal { width: min(900px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.finance-dashboard-detail-modal { width: min(920px, calc(100vw - 32px)); }
.finance-dashboard-detail-modal .finance-card-detail-table { width: 100% !important; min-width: 0 !important; max-width: 100% !important; table-layout: fixed; }
.finance-dashboard-detail-modal .finance-card-detail-table :is(th, td) { min-width: 0 !important; overflow-wrap: anywhere; word-break: break-word; }
.table-export-preview-modal.finance-card-export-preview-modal { width: min(900px, calc(100vw - 32px)); }
.finance-card-detail-wrap { min-height: 0; max-height: min(68vh, 660px); overflow: auto; padding: 18px; }
.finance-card-detail-modal .finance-card-detail-wrap { flex: 1 1 auto; min-height: 0; max-height: min(68vh, 660px) !important; overflow: auto !important; overscroll-behavior: contain; }
.finance-dashboard-detail-modal .finance-card-detail-wrap { overflow-x: hidden !important; overflow-y: auto !important; }
.finance-card-detail-modal.finance-dashboard-payable-detail-modal { width: min(1270px, calc(100vw - 32px)); }
.finance-dashboard-payable-detail-modal .finance-card-detail-table col[data-overview-detail-col="status"] { width: 88px !important; }
.finance-dashboard-payable-detail-modal .finance-card-detail-table :is(th, td):last-child { padding-right: 4px; padding-left: 4px; overflow: hidden; }
.finance-dashboard-payable-detail-modal .finance-card-detail-table td:last-child .status-badge,
.finance-card-native-print-table td:last-child .status-badge { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; padding-right: 4px; padding-left: 4px; white-space: normal; overflow-wrap: anywhere; }
.finance-card-detail-table { min-width: 760px; }
.finance-card-detail-table th, .finance-card-detail-table td { text-align: center; }
.finance-card-detail-inventory-modal .finance-card-detail-wrap { padding-top: 0; }
.finance-card-detail-inventory-modal .finance-card-detail-table thead th { background: #fafafa; box-shadow: 0 1px 0 var(--line); }
.finance-card-detail-modal.overview-business-detail-modal { width: min(1200px, calc(100vw - 32px)); }
.overview-business-detail-modal .finance-card-detail-table { width: 100%; min-width: 1000px; table-layout: fixed; }
.overview-business-detail-modal .finance-card-detail-table th:not(.serial-col) { position: relative; padding-right: 16px; }
.finance-card-detail-modal.overview-inventory-monthly-modal { width: min(1250px, calc(100vw - 32px)); }
.overview-inventory-monthly-table { width: 100%; min-width: 100%; table-layout: auto; }
.overview-inventory-monthly-table th:first-child,
.overview-inventory-monthly-table td:first-child { width: 120px; min-width: 120px; max-width: 120px; font-weight: 700; white-space: normal; }
.overview-inventory-monthly-table th:not(:first-child),
.overview-inventory-monthly-table td:not(:first-child) { min-width: 76px; padding-right: 4px; padding-left: 4px; overflow: visible; font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: clip; white-space: nowrap; }
.overview-inventory-monthly-table th:last-child,
.overview-inventory-monthly-table td:last-child { min-width: 100px; font-weight: 700; }
.overview-inventory-monthly-table tfoot th { height: 42px; padding: 7px 6px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: #fffaf0; text-align: center; }
.overview-inventory-monthly-table tfoot th:last-child { border-right: 0; }
.table-export-preview-modal.overview-inventory-monthly-preview-modal { width: min(1250px, calc(100vw - 32px)); }

/* 经营总览独立于财务看板，按订单、售后与库存口径汇总。 */
.overview-dashboard-page { display: grid; gap: 18px; }
.overview-dashboard-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.overview-dashboard-card { min-height: 126px; padding: 18px; border: 1px solid var(--line); border-top: 3px solid #5b8289; background: #fff; display: grid; align-content: space-between; gap: 8px; }
.overview-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.overview-card-heading > span { min-width: 0; color: #555; font-size: 14px; }
.overview-card-detail-button { flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: 1px solid #d4d4d4; border-radius: 50%; color: #555; background: #fff; font-size: 15px; line-height: 24px; cursor: pointer; }
.overview-card-detail-button:hover, .overview-card-detail-button:focus-visible { border-color: var(--red); color: var(--red); outline: none; }
.overview-dashboard-card strong { color: #111; font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.overview-dashboard-card small { color: #888; font-size: 12px; }
.overview-dashboard-card small b { color: #a65151; font-weight: 600; }
.overview-balance-card { border-top-color: #547d93; }
.overview-area-card { border-top-color: #6e8b5d; }
.overview-after-sales-card { border-top-color: #a77764; }
.overview-inventory-card { border-top-color: #88769e; }
.overview-chart-panel { margin: 0; }
.overview-chart-panel .member-toolbar { gap: 16px; }
.overview-area-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.overview-chart-block { min-width: 0; }
.overview-chart-block + .overview-chart-block { border-left: 1px solid var(--line); }
.overview-chart-block > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.overview-chart-title-button { padding: 0; border: 0; color: #222; background: transparent; font: inherit; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
.overview-chart-title-button:hover, .overview-chart-title-button:focus-visible { color: var(--red); outline: none; text-decoration: underline; text-underline-offset: 3px; }
.overview-chart-main-title { font-size: 18px; }
.overview-chart-scroll { min-width: 0; overflow-x: auto; }
.overview-chart-meta { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 14px; color: #666; font-size: 12px; }
.overview-chart-meta strong { color: #666; font-size: 13px; font-weight: 400; white-space: nowrap; }
.overview-chart-meta strong b { color: #9d5953; font-weight: 600; }
.overview-chart-legend { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px 12px; }
.overview-chart-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.overview-chart-legend i { width: 9px; height: 9px; display: inline-block; border-radius: 50%; }
.overview-chart-empty-legend { color: #999; }
.overview-bar-chart { display: grid; grid-template-columns: repeat(12, minmax(48px, 1fr)); gap: 8px; min-width: 700px; min-height: 270px; padding: 18px 16px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid #e8e8e8; background: #fff; }
.overview-area-chart-grid .overview-bar-chart { border-top: 0; }
.overview-chart-month { display: grid; grid-template-rows: 1fr 20px; min-width: 0; text-align: center; }
.overview-chart-bars { min-height: 0; display: flex; align-items: stretch; justify-content: center; gap: 3px; padding: 8px 0 2px; }
.overview-chart-bar-item { min-width: 0; max-width: 28px; flex: 1 1 0; display: grid; grid-template-rows: minmax(0, 1fr) 18px; align-items: end; justify-items: center; }
.overview-chart-bar-item b { max-width: 100%; overflow: visible; color: #666; font-size: 9px; font-weight: 400; line-height: 16px; white-space: nowrap; }
.overview-chart-bar { width: 100%; max-width: 22px; min-width: 2px; display: block; align-self: end; transition: opacity .15s ease; }
.overview-chart-bar-item:hover .overview-chart-bar { opacity: .72; }
.overview-chart-month small { color: #777; font-size: 11px; }
.overview-chart-error { grid-column: 1 / -1; align-self: center; margin: 0; color: #a4514b; text-align: center; }

@media (max-width: 1100px) {
  .overview-area-chart-grid { grid-template-columns: 1fr; }
  .overview-chart-block + .overview-chart-block { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 760px) {
  .login-view { padding: 18px; }
  .login-card { padding: 26px 22px; }
  .login-brand { align-items: flex-start; gap: 12px; }
  .login-brand h1 { font-size: 19px; }
  .login-brand p { line-height: 1.5; }
  .topbar { min-height: 54px; height: auto; grid-template-columns: 104px minmax(0, 1fr) 104px; padding: 10px 0; gap: 0; }
  .topbar-logo, .topbar-actions { width: 104px; }
  .topbar-logo { height: 34px; padding: 0 8px; border-right: 0; }
  .topbar-logo img { width: 88px; max-height: 28px; }
  .topbar-title { gap: 5px; font-size: 16px; }
  .business-year-control { gap: 3px; font-size: 10px; }
  .business-year-control select { min-width: 64px; height: 26px; padding: 2px 3px; }
  .topbar-actions { grid-column: 3; padding: 0 8px; font-size: 12px; gap: 2px; }
  .app-shell { display: block; }
  /* 窄窗口内让菜单在自身区域滚动，工作区无需滚过全部菜单才可见。 */
  .sidebar { display: flex; flex-direction: column; max-height: 248px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 0 10px; }
  .sidebar footer { display: flex; flex: 0 0 auto; min-height: 44px; padding: 12px 14px; }
  .nav-caption { padding: 12px 14px 5px; }
  .nav-parent { min-height: 38px; padding: 0 12px; }
  .nav-item { padding-left: 28px; }
  .content { padding: 16px; }
  .empty-workspace { min-height: 120px; }
  .member-page { min-height: 120px; }
  .permission-page { grid-template-columns: 108px minmax(0, 1fr); gap: 12px; padding-top: 16px; }
  .permission-roles { padding-right: 8px; }
  .permission-roles h1, .permission-heading h1 { font-size: 16px; }
  .permission-role-tab { min-height: 36px; padding: 0 8px; font-size: 13px; }
  .permission-heading { display: block; }
  .permission-saving { display: block; margin-top: 8px; }
  .permission-table th, .permission-table td { padding: 7px 4px; font-size: 12px; }
  .permission-table th:not(.permission-menu-col), .permission-table td { width: 54px; }
  .permission-title-check, .permission-action-check { gap: 4px; }
  .permission-title-check em { font-size: 10px; }
  .classic-page-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .classic-page-header h1 { font-size: 19px; }
  .classic-page-actions { width: 100%; justify-content: flex-end; }
  .settings-grid { grid-template-columns: 1fr; gap: 16px; }
  .classic-panel { margin-top: 16px; }
  .login-settings-page .classic-panel { margin-top: 0; }
  .backup-notice { align-items: flex-start; flex-direction: column; gap: 5px; }
  .classic-table-wrap { overflow: hidden; }
  .member-tabs { gap: 20px; }
  .member-tab { font-size: 15px; }
  .basic-info-tabs { column-gap: 18px; }
  .member-table-wrap { overflow: hidden; }
  .table-pagination { justify-content: flex-start; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
  .modal-mask { align-items: start; padding: 16px; overflow-y: auto; }
  .member-form-table-wrap { padding: 16px; }
  .finance-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-order-amounts > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-order-fields { grid-template-columns: 1fr; }
  .purchase-order-fields, .purchase-order-date-fields { grid-template-columns: 1fr; }
  .purchase-order-three-fields, .purchase-order-four-fields { grid-template-columns: 1fr; }
  .other-inbound-form-table tbody { grid-template-columns: 1fr; }
  .product-order-field-wide { grid-column: auto; }
  .product-order-entry-row-three, .product-order-entry-row-four, .product-order-entry-row-five, .product-order-entry-row-two, .product-order-simple-sales-fields, .product-order-files-grid, .product-series-tables-grid, .product-order-amount-tables-grid { grid-template-columns: 1fr; }
  .material-order-amounts-with-quotation > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-order-amounts-with-quotation > div > .purchase-details-head { grid-column: 1 / -1; }
  .product-order-files-grid .product-order-drawing-panel, .product-order-files-grid .product-order-material-panel, .product-order-special-field { grid-column: auto; grid-row: auto; }
  .product-order-special-field { padding: 0; border-right: 0; }
  .product-order-file-list { grid-template-columns: 1fr; }
  .product-order-file-panel + .product-order-file-panel { padding-top: 12px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .payroll-summary-grid { grid-template-columns: 1fr; }
  .payroll-rules-form { grid-template-columns: 1fr; }
  .payroll-rules-status { grid-column: auto; }
  .payroll-file-slot { flex-basis: 100%; margin-left: 0; }
  .announcement-view-content dl { grid-template-columns: 1fr; gap: 8px; }
  .payroll-table-panel .member-toolbar { min-height: 82px; align-items: flex-start; }
  .payroll-table-panel .member-toolbar-actions { top: auto; right: 0; bottom: 0; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; }
  .finance-dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-dashboard-card { min-height: 112px; padding: 14px; }
  .finance-dashboard-card strong { font-size: 20px; }
  .finance-chart-toolbar { align-items: flex-start; }
  .finance-chart-toolbar-actions { flex-wrap: wrap; justify-content: flex-start; gap: 8px 12px; }
  .finance-bar-chart { gap: 4px; padding: 14px 8px 10px; }
  .finance-chart-bar-value { font-size: 9px; }
  .finance-balance-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-dashboard-card { min-height: 112px; padding: 14px; }
  .overview-dashboard-card strong { font-size: 20px; }
  .overview-chart-panel .member-toolbar { align-items: flex-start; }
  .overview-chart-meta { justify-content: flex-start; }
  .overview-bar-chart { gap: 4px; padding: 14px 8px 10px; }
}

@media (max-width: 1280px) {
  .permission-tables { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .permission-tables { grid-template-columns: 1fr; }
  .order-payment-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-summary { gap: 10px; }
  .two-level-approval-assignees { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .order-payment-cards { grid-template-columns: 1fr; }
  .finance-dashboard-cards { grid-template-columns: 1fr; }
  .overview-dashboard-cards { grid-template-columns: 1fr; }
  .two-level-approval-assignees { grid-template-columns: 1fr; }
}

/* 数据超过当前页面可用高度时，仅表体滚动；短表格保持自然高度且不显示滚动条。 */
.member-table-wrap,
.permission-table-wrap {
  max-height: clamp(280px, calc(100vh - 270px), 680px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.member-table-wrap > table > thead > tr > th,
.permission-table-wrap > table > thead > tr > th,
.purchase-details-wrap > table > thead > tr > th,
.purchase-order-detail-wrap > table > thead > tr > th,
.purchase-material-table-wrap > table > thead > tr > th,
.purchase-order-preview-table-wrap > table > thead > tr > th,
.outbound-order-preview-table-wrap > table > thead > tr > th,
.order-payment-detail-wrap > table > thead > tr > th,
.order-payment-manufacturer-detail-wrap > table > thead > tr > th,
.cost-accounting-usage-wrap > table > thead > tr > th,
.payroll-preview-wrap > table > thead > tr > th,
.table-export-preview-wrap > table > thead > tr > th,
.finance-card-detail-wrap > table > thead > tr > th {
  position: sticky !important;
  z-index: 30 !important;
  top: 0 !important;
  isolation: isolate;
  background-color: #fafafa !important;
  background-image: linear-gradient(#fafafa, #fafafa) !important;
  background-clip: border-box !important;
  box-shadow: 0 1px 0 var(--line);
}

/* Chromium 在折叠边框表格中滚动时可能先绘制表体；独立的不透明底层彻底遮住表体文字。 */
.member-table-wrap > table > thead > tr > th::before,
.permission-table-wrap > table > thead > tr > th::before,
.purchase-details-wrap > table > thead > tr > th::before,
.purchase-order-detail-wrap > table > thead > tr > th::before,
.purchase-material-table-wrap > table > thead > tr > th::before,
.purchase-order-preview-table-wrap > table > thead > tr > th::before,
.outbound-order-preview-table-wrap > table > thead > tr > th::before,
.order-payment-detail-wrap > table > thead > tr > th::before,
.order-payment-manufacturer-detail-wrap > table > thead > tr > th::before,
.cost-accounting-usage-wrap > table > thead > tr > th::before,
.payroll-preview-wrap > table > thead > tr > th::before,
.table-export-preview-wrap > table > thead > tr > th::before,
.finance-card-detail-wrap > table > thead > tr > th::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1px 0 0;
  pointer-events: none;
  background: #fafafa;
}

.member-table-wrap,
.permission-table-wrap,
.purchase-details-wrap,
.purchase-order-detail-wrap,
.purchase-material-table-wrap,
.purchase-order-preview-table-wrap,
.outbound-order-preview-table-wrap,
.order-payment-detail-wrap,
.order-payment-manufacturer-detail-wrap,
.cost-accounting-usage-wrap,
.payroll-preview-wrap,
.table-export-preview-wrap,
.finance-card-detail-wrap { isolation: isolate; }

.member-table-wrap > table > thead,
.permission-table-wrap > table > thead,
.purchase-details-wrap > table > thead,
.purchase-order-detail-wrap > table > thead,
.purchase-material-table-wrap > table > thead,
.purchase-order-preview-table-wrap > table > thead,
.outbound-order-preview-table-wrap > table > thead,
.order-payment-detail-wrap > table > thead,
.order-payment-manufacturer-detail-wrap > table > thead,
.cost-accounting-usage-wrap > table > thead,
.payroll-preview-wrap > table > thead,
.table-export-preview-wrap > table > thead,
.finance-card-detail-wrap > table > thead { position: static !important; }

.member-table-wrap > table > tbody,
.permission-table-wrap > table > tbody,
.purchase-details-wrap > table > tbody,
.purchase-order-detail-wrap > table > tbody,
.purchase-material-table-wrap > table > tbody,
.purchase-order-preview-table-wrap > table > tbody,
.outbound-order-preview-table-wrap > table > tbody,
.order-payment-detail-wrap > table > tbody,
.order-payment-manufacturer-detail-wrap > table > tbody,
.cost-accounting-usage-wrap > table > tbody,
.payroll-preview-wrap > table > tbody,
.table-export-preview-wrap > table > tbody,
.finance-card-detail-wrap > table > tbody { position: relative; z-index: 0; }

/* 双层表头的第二行固定在第一行下方，跨两行的表头仍固定在顶部。 */
.member-table-wrap > table > thead > tr:nth-child(2) > th,
.payroll-preview-wrap > table > thead > tr:nth-child(2) > th,
.table-export-preview-wrap > table > thead > tr:nth-child(2) > th { top: var(--sticky-first-header-height, 44px) !important; }
.payroll-detail-table { --sticky-first-header-height: 42px; }
.payroll-preview-table,
.payroll-export-preview-modal .table-export-preview-table { --sticky-first-header-height: 40px; }

.purchase-material-table-wrap {
  flex: 1 1 auto;
  max-height: min(60vh, 540px);
  overflow-y: auto;
}

@media print {
  .member-table-wrap,
  .permission-table-wrap {
    max-height: none;
    overflow: visible;
  }

  .member-table-wrap > table > thead > tr > th,
  .permission-table-wrap > table > thead > tr > th,
  .purchase-details-wrap > table > thead > tr > th,
  .purchase-order-detail-wrap > table > thead > tr > th,
  .purchase-material-table-wrap > table > thead > tr > th,
  .purchase-order-preview-table-wrap > table > thead > tr > th,
  .outbound-order-preview-table-wrap > table > thead > tr > th,
  .order-payment-detail-wrap > table > thead > tr > th,
  .order-payment-manufacturer-detail-wrap > table > thead > tr > th,
  .cost-accounting-usage-wrap > table > thead > tr > th,
  .payroll-preview-wrap > table > thead > tr > th,
  .table-export-preview-wrap > table > thead > tr > th,
  .finance-card-detail-wrap > table > thead > tr > th {
    position: static !important;
    top: auto !important;
    box-shadow: none;
  }

  .member-table-wrap > table > thead > tr > th::before,
  .permission-table-wrap > table > thead > tr > th::before,
  .purchase-details-wrap > table > thead > tr > th::before,
  .purchase-order-detail-wrap > table > thead > tr > th::before,
  .purchase-material-table-wrap > table > thead > tr > th::before,
  .purchase-order-preview-table-wrap > table > thead > tr > th::before,
  .outbound-order-preview-table-wrap > table > thead > tr > th::before,
  .order-payment-detail-wrap > table > thead > tr > th::before,
  .order-payment-manufacturer-detail-wrap > table > thead > tr > th::before,
  .cost-accounting-usage-wrap > table > thead > tr > th::before,
  .payroll-preview-wrap > table > thead > tr > th::before,
  .table-export-preview-wrap > table > thead > tr > th::before,
  .finance-card-detail-wrap > table > thead > tr > th::before { display: none; }

  table,
  table th,
  table td,
  table tfoot th,
  table tfoot td {
    border-color: #000 !important;
  }
}

[data-permission-hidden="true"] {
  display: none !important;
}

/* 最终表格布局规则：表格容器不滚动，页面承接整体滚动，边框保持完整。 */
:where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) {
  width: 100%;
  max-width: 100%;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-gutter: auto !important;
}

:where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) > table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

:where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) > table :is(th, td) {
  min-width: 0 !important;
  height: auto;
  min-height: 38px;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 表格完整铺在页面宽度内：不在表格容器内滚动，长内容在单元格中换行。 */
:where(
  .member-table-wrap,
  .finance-table-wrap,
  .permission-table-wrap,
  .purchase-details-wrap,
  .purchase-order-detail-wrap,
  .purchase-material-table-wrap,
  .material-content-table-wrap,
  .inventory-safety-table-wrap,
  .after-sales-statistics-table-wrap,
  .order-payment-detail-wrap,
  .order-payment-manufacturer-detail-wrap,
  .cost-accounting-table-wrap,
  .cost-accounting-usage-wrap,
  .purchase-order-preview-table-wrap,
  .outbound-order-preview-table-wrap,
  .payroll-preview-wrap,
  .table-export-preview-wrap,
  .finance-card-detail-wrap
) {
  max-width: 100%;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-gutter: auto !important;
}

:where(
  .member-table-wrap,
  .finance-table-wrap,
  .permission-table-wrap,
  .purchase-details-wrap,
  .purchase-order-detail-wrap,
  .purchase-material-table-wrap,
  .material-content-table-wrap,
  .inventory-safety-table-wrap,
  .after-sales-statistics-table-wrap,
  .order-payment-detail-wrap,
  .order-payment-manufacturer-detail-wrap,
  .cost-accounting-table-wrap,
  .cost-accounting-usage-wrap,
  .purchase-order-preview-table-wrap,
  .outbound-order-preview-table-wrap,
  .payroll-preview-wrap,
  .table-export-preview-wrap,
  .finance-card-detail-wrap
) > table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed;
}

:where(
  .member-table-wrap,
  .finance-table-wrap,
  .permission-table-wrap,
  .purchase-details-wrap,
  .purchase-order-detail-wrap,
  .purchase-material-table-wrap,
  .material-content-table-wrap,
  .inventory-safety-table-wrap,
  .after-sales-statistics-table-wrap,
  .order-payment-detail-wrap,
  .order-payment-manufacturer-detail-wrap,
  .cost-accounting-table-wrap,
  .cost-accounting-usage-wrap,
  .purchase-order-preview-table-wrap,
  .outbound-order-preview-table-wrap,
  .payroll-preview-wrap,
  .table-export-preview-wrap,
  .finance-card-detail-wrap
) > table :is(th, td) {
  min-width: 0 !important;
  height: auto;
  min-height: 38px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 全站表格随页面滚动时保持表头可见，并用不透明背景覆盖滚动中的表体内容。 */
table:has(> thead) {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

table > thead > tr > th {
  position: sticky !important;
  z-index: 80 !important;
  top: 0 !important;
  isolation: isolate;
  background-color: #fafafa !important;
  background-image: linear-gradient(#fafafa, #fafafa) !important;
  background-clip: border-box !important;
  box-shadow: 0 1px 0 var(--line);
}

table > thead > tr:nth-child(n + 2) > th:not([rowspan]) {
  top: var(--sticky-first-header-height, 44px) !important;
}

/* 表头必须作为独立的不透明层绘制在表体上方，避免滚动时数据穿过表头。 */
table:has(> thead) {
  isolation: isolate;
}

table:has(> thead) > thead {
  position: relative !important;
  z-index: 90 !important;
}

table:has(> thead) > thead > tr > th {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  background-clip: padding-box !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}

table:has(> thead) > tbody {
  position: relative;
  z-index: 0;
}

/* 主页面滚动时，表格所属的小标题和操作按钮固定在页面顶部；表头固定在标题栏下方。 */
.member-panel > .member-toolbar,
.classic-panel > .classic-panel-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  background-clip: padding-box;
  box-shadow: 0 1px 0 var(--line);
}

.member-panel > .member-toolbar ~ .member-table-wrap > table > thead > tr > th,
.classic-panel > .classic-panel-header ~ .member-table-wrap > table > thead > tr > th {
  top: 50px !important;
  z-index: 90 !important;
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  opacity: 1 !important;
}

.classic-panel > .classic-panel-header ~ .member-table-wrap > table > thead > tr > th {
  top: 52px !important;
}

.member-panel > .member-toolbar ~ .member-table-wrap > table > thead > tr:nth-child(n + 2) > th:not([rowspan]),
.classic-panel > .classic-panel-header ~ .member-table-wrap > table > thead > tr:nth-child(n + 2) > th:not([rowspan]) {
  top: calc(50px + var(--sticky-first-header-height, 44px)) !important;
}

.classic-panel > .classic-panel-header ~ .member-table-wrap > table > thead > tr:nth-child(n + 2) > th:not([rowspan]) {
  top: calc(52px + var(--sticky-first-header-height, 44px)) !important;
}

@media print {
  .member-panel > .member-toolbar,
  .classic-panel > .classic-panel-header {
    position: static !important;
    box-shadow: none;
  }

  .member-panel > .member-toolbar ~ .member-table-wrap > table > thead > tr > th,
  .classic-panel > .classic-panel-header ~ .member-table-wrap > table > thead > tr > th,
  .member-panel > .member-toolbar ~ .member-table-wrap > table > thead > tr:nth-child(n + 2) > th:not([rowspan]),
  .classic-panel > .classic-panel-header ~ .member-table-wrap > table > thead > tr:nth-child(n + 2) > th:not([rowspan]) {
    position: static !important;
    top: auto !important;
  }
}

/* 主页面的表格仅在自身容器内滚动：标题、操作按钮和分页始终留在表格外。 */
.content :where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) {
  width: 100%;
  max-width: 100%;
  max-height: clamp(240px, calc(100vh - 248px), 680px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  box-sizing: border-box;
}

.content :where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) > table > thead > tr > th {
  position: sticky !important;
  z-index: 30 !important;
  top: 0 !important;
  isolation: isolate;
  background: #fafafa !important;
  background-color: #fafafa !important;
  background-image: linear-gradient(#fafafa, #fafafa) !important;
  background-clip: border-box !important;
  box-shadow: 0 1px 0 var(--line);
}

.content :where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) > table > thead > tr:nth-child(n + 2) > th:not([rowspan]) {
  top: var(--sticky-first-header-height, 44px) !important;
}

/* 旧的整页固定定位不能参与容器内滚动，否则首行会被标题栏遮挡。 */
.content .member-panel > .member-toolbar ~ :where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) > table > thead > tr > th,
.content .classic-panel > .classic-panel-header ~ :where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) > table > thead > tr > th {
  top: 0 !important;
}

.content .member-panel > .member-toolbar ~ :where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) > table > thead > tr:nth-child(n + 2) > th:not([rowspan]),
.content .classic-panel > .classic-panel-header ~ :where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) > table > thead > tr:nth-child(n + 2) > th:not([rowspan]) {
  top: var(--sticky-first-header-height, 44px) !important;
}

/* 辅料订单弹窗的制作内容与到款记录使用相同可视宽度，不出现横向滚动。 */
.modal.material-order-entry-modal .material-content-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box;
}

.modal.material-order-entry-modal .material-content-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed;
}

/* 弹窗明细由滚动容器绘制完整外框，表格只负责内部网格线。 */
.modal .modal-table-frame {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border: 1px solid var(--line);
  box-sizing: border-box;
  background: #fff;
  scrollbar-gutter: stable;
}

.modal.purchase-order-entry-modal #purchaseOrderForm .modal-table-frame {
  max-height: min(56vh, 620px) !important;
}

.modal.material-order-entry-modal .material-content-table-wrap.modal-table-frame {
  max-height: 260px !important;
}

.modal .modal-table-frame > table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  box-sizing: border-box;
  table-layout: fixed !important;
}

.modal .modal-table-frame > table :is(th, td) {
  min-width: 0 !important;
  border-right: 1px solid var(--line);
  box-sizing: border-box;
}

.modal .modal-table-frame > table tr > :last-child {
  border-right: 0 !important;
}

.modal .modal-table-frame > table > tbody:last-child > tr:last-child > *,
.modal .modal-table-frame > table > tfoot:last-child > tr:last-child > * {
  border-bottom: 0;
}

@media print {
  .content :where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) {
    max-height: none !important;
    overflow: visible !important;
    scrollbar-gutter: auto;
  }

  .content :where([class*="table-wrap"], [class*="table-wrapper"]):has(> table) > table > thead > tr > th {
    position: static !important;
    top: auto !important;
  }
}
