.workspace-mode-notice {display:flex;flex-wrap:wrap;gap:8px 18px;padding:13px 18px;margin:12px 0 20px;border:1px solid #dce5e1;border-left:4px solid #518675;border-radius:10px;background:#f4f9f6;color:#46645a;font-size:13px;line-height:1.7;}
.duty-assignee {font-size:13px;color:#60536b;}
.module-loading .loading-skeleton {height:48px;margin:16px 0;border-radius:8px;background:linear-gradient(90deg,#f4f0f5,#fff,#f4f0f5);background-size:200% 100%;animation:module-loading-shimmer 1.8s infinite;}
@keyframes module-loading-shimmer {to {background-position:-200% 0;}}
@media (prefers-reduced-motion:reduce) {.module-loading .loading-skeleton {animation:none;}}
:root {
  --ink: #18201d;
  --muted: #6d7772;
  --line: #dfe5e1;
  --paper: #f4f6f4;
  --panel: #fff;
  --green: #4b245b;
  --green-2: #6d3b7b;
  --mint: #eee4f1;
  --gold: #ad7b35;
  --red: #b84c48;
  --shadow: 0 12px 32px rgba(24, 43, 35, .08);
}

.batch-task-center .batch-task-header { margin-bottom:20px; padding:18px 22px; background:#fff; border:1px solid var(--line); border-radius:14px; }
.batch-task-center .batch-task-header { padding:10px 18px; margin-bottom:14px; }
.batch-task-center .batch-task-header h1 { margin:3px 0 0; font-size:21px; }
.batch-task-center .batch-header-count b { font-size:26px; }
.batch-task-center .batch-project-identifiers { display:flex; flex-wrap:wrap; gap:4px 20px; }
.batch-task-center .batch-project-identifiers strong { font-weight:600; color:#39323d; }
.batch-task-center .batch-project-identifiers .batch-key-lot { font-size:16px; color:#241c2b; font-weight:750; }
.batch-task-center .batch-project-summary-status { align-self:start; }
.batch-task-center .batch-project-state { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; }
.batch-task-center .batch-project-state > span { font-size:12px; letter-spacing:0; }
.batch-task-center .batch-project-count { color:white; background:#b82e53; border-radius:20px; padding:5px 11px; font-size:14px; white-space:nowrap; }
.batch-task-center .batch-next-actions { display:flex; flex-wrap:wrap; gap:8px; }
.batch-task-center button.batch-project-next-task { text-align:left; white-space:normal; line-height:1.6; }
@media(max-width:760px) {
 .batch-task-center .batch-project-summary-status { grid-row:1; justify-self:end; }
 .batch-task-center .batch-project-state { justify-content:flex-start; }
}
.batch-task-header small { color:var(--muted); font-size:12px; }
.batch-task-header h1 { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:8px 0 0; font-size:23px; line-height:1.5; }
.batch-header-count { font-size:18px; }
.batch-header-count b { color:#b62b51; font-size:30px; font-weight:800; }
.batch-header-help { position:relative; display:inline-block; border:1px solid #d6cada; border-radius:50%; color:#73507e; font-size:13px; cursor:help; }
.batch-header-help > span { display:none; position:absolute; z-index:10; top:100%; left:0; width:260px; max-width:65vw; padding:12px; border-radius:8px; background:#382c41; color:#fff; font-size:12px; font-weight:400; line-height:1.7; }
.batch-header-help:hover > span,.batch-header-help:focus > span { display:block; }
.batch-task-center .batch-project-workspace { background:transparent; border:0; padding:0; box-shadow:none; }
.batch-task-center .batch-project-card { display:block; background:#fff; border:1px solid #e1dce4; border-radius:12px; box-shadow:none; margin:12px 0; }
.batch-task-center .batch-project-card.has-pending { background:#fff0f5; border:1px solid #e8afc3; box-shadow:0 3px 12px rgba(174,42,88,.06); }
.batch-task-center .batch-project-card-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; align-items:center; padding:20px; }
.batch-task-center .batch-project-card-head h3 { font-size:18px; font-weight:600; line-height:1.6; margin:4px 0 6px; }
.batch-task-center .batch-project-card-head p { font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.batch-task-center .batch-project-card:not(.has-pending) .batch-project-card-head span { color:#77717b; font-weight:400; }
.batch-task-center .batch-project-next-task { display:inline-block; margin-top:12px !important; padding:8px 12px; border-radius:8px; background:#f9dce8; color:#872044; font-size:16px !important; font-weight:750; }
.batch-task-center .batch-project-summary-status > strong:not(.done) { padding:5px 11px; border-radius:20px; background:#b82e53; color:#fff; font-size:14px; }
.batch-task-center .batch-project-summary-status > strong > i { display:none; }
.batch-task-center .batch-project-summary-status > .done { color:#8a858d; font-size:12px; font-weight:400; }
.batch-task-center .batch-project-summary-status { gap:8px; }
.batch-task-center .batch-project-open-button { font-size:13px; }
.batch-task-center .batch-auxiliary { border-top:1px solid #ded8e2; margin-top:32px; padding-top:18px; }
.batch-task-center .batch-auxiliary > h2 { color:#746a79; font-size:16px; margin:0 0 14px; }
.batch-task-center .batch-aux-details { margin:12px 0; border:1px solid var(--line); border-radius:12px; background:white; }
.batch-task-center .batch-aux-details > summary { padding:16px; font-weight:600; cursor:pointer; }
@media(max-width:760px) {
 .batch-task-center .batch-project-card-head { grid-template-columns:minmax(0,1fr); gap:14px; padding:16px; }
 .batch-task-center .batch-project-summary-status { justify-items:start; }
 .batch-task-header h1 { font-size:20px; }
 .batch-header-help > span { left:auto; right:0; }
}

/* Order master/detail workspace. Scoped rules also override legacy dashboard grids. */
#orderFlowWorkspace .flow-split { display:grid; grid-template-columns:minmax(0,35fr) minmax(0,65fr); gap:20px; align-items:start; }
#orderFlowWorkspace .flow-orders-pane,#orderFlowWorkspace .flow-detail-pane { min-width:0; padding:18px; border:1px solid var(--line); border-radius:16px; background:#fff; height:calc(100dvh - 190px); min-height:460px; overflow:auto; }
#orderFlowWorkspace .flow-orders-pane { background:#faf7fc; }
#orderFlowWorkspace .flow-order-tools { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
#orderFlowWorkspace .flow-order-tools label:first-child,#orderFlowWorkspace .flow-order-tools output { grid-column:1/-1; }
#orderFlowWorkspace .flow-order-tools output { padding:0; }
#orderFlowWorkspace .flow-order-list { display:grid; grid-template-columns:minmax(0,1fr); max-height:none; overflow:visible; }
#orderFlowWorkspace .flow-order-choice { position:relative; display:block; min-height:0; padding:0; background:#fff; color:var(--ink); }
#orderFlowWorkspace .flow-order-choice.active { border:2px solid #9750a5; background:#f5eefa; box-shadow:0 0 0 2px #ead9ef; }
#orderFlowWorkspace .flow-card-select { width:100%; border:0; background:transparent; padding:16px 14px 8px; color:inherit; text-align:left; }
#orderFlowWorkspace .flow-card-select b { display:block; margin-top:10px; font-size:14px; overflow-wrap:anywhere; }
#orderFlowWorkspace .flow-order-choice-top strong { white-space:normal; overflow-wrap:anywhere; }
#orderFlowWorkspace .flow-order-choice .normal { color:#697079; background:#edf0f2; }
#orderFlowWorkspace .flow-order-choice .overdue { color:#b1263f; background:#ffe4e9; }
#orderFlowWorkspace .flow-card-info { margin:0 14px 10px; text-align:right; }
#orderFlowWorkspace .flow-card-tasks { margin:4px 14px 12px; padding:12px; border:1px solid #edbfd1; border-radius:9px; background:#fff0f5; }
#orderFlowWorkspace .flow-card-tasks > strong { font-size:12px; color:#a22a53; }
#orderFlowWorkspace .flow-card-task { display:grid; gap:6px; padding-top:10px; margin-top:8px; border-top:1px solid #edcfda; }
#orderFlowWorkspace .flow-card-task small { color:#746570; font-size:12px; }
#orderFlowWorkspace .flow-card-task b { color:#38283e; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
#orderFlowWorkspace .flow-card-task button { justify-self:start; }
#orderFlowWorkspace .flow-card-wait { padding:4px 14px 10px; font-size:12px; color:#776a7d; line-height:1.6; overflow-wrap:anywhere; }
#orderFlowWorkspace .flow-card-wait small { display:block; }
#orderFlowWorkspace .flow-card-info summary { display:inline-block; padding:4px 8px; cursor:pointer; color:#765184; font-size:12px; border-radius:6px; border:1px solid #e5d8eb; }
#orderFlowWorkspace .flow-card-info dl { text-align:left; font-size:12px; border-top:1px solid var(--line); padding-top:10px; }
#orderFlowWorkspace .flow-card-info dd { margin:3px 0 8px; overflow-wrap:anywhere; }
#orderFlowWorkspace .flow-selected-head { margin:0; padding:0 0 14px; border-top:0; }
#orderFlowWorkspace .flow-order-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
#orderFlowWorkspace .flow-current-progress article { grid-template-columns:1fr 1fr; }
#orderFlowWorkspace .flow-current-progress article > div:nth-child(3) { grid-column:1/-1; }
#orderFlowWorkspace .flow-current-progress article > button { justify-self:start; }
#orderFlowWorkspace .flow-production-radar { padding:12px 0; box-shadow:none; }
#orderFlowWorkspace .flow-production-radar h2 { font-size:17px; }
#orderFlowWorkspace .flow-production-radar header { padding:8px 0; }
#orderFlowWorkspace .flow-production-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); align-items:start; gap:12px; padding:12px; }
#orderFlowWorkspace .flow-production-item { grid-template-columns:32px minmax(0,1fr); align-items:start; gap:10px 12px; min-height:0; padding:16px; }
#orderFlowWorkspace .flow-production-item > i { width:30px; height:30px; margin-top:2px; font-size:12px; }
#orderFlowWorkspace .flow-production-item > div:first-of-type { gap:6px; }
#orderFlowWorkspace .flow-production-item > div:first-of-type small { font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
#orderFlowWorkspace .flow-production-item strong { font-size:15px; line-height:1.6; font-weight:600; overflow-wrap:anywhere; }
#orderFlowWorkspace .flow-production-item span { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; white-space:normal; line-height:1.6; font-size:12px; overflow-wrap:anywhere; }
#orderFlowWorkspace .flow-production-item > div:last-child { grid-column:2; display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:6px 10px; padding-top:10px; border-top:1px solid var(--line); text-align:left; }
#orderFlowWorkspace .flow-production-item > div:last-child small { flex:1 0 100%; font-size:12px; line-height:1.6; overflow-wrap:anywhere; order:2; }
#orderFlowWorkspace .flow-production-item > div:last-child b { font-size:12px; line-height:1.6; font-weight:400; }
#orderFlowWorkspace .flow-production-item em { font-size:12px; line-height:1.5; white-space:nowrap; }
#orderFlowWorkspace .flow-material-table { width:100%; border-collapse:collapse; font-size:12px; }
#orderFlowWorkspace .flow-material-table .flow-material-item { display:table-row; }
#orderFlowWorkspace .flow-material-table td,#orderFlowWorkspace .flow-material-table th { padding:10px; border-bottom:1px solid var(--line); text-align:left; min-width:90px; vertical-align:top; }
#orderFlowWorkspace .flow-material-table td:first-child { min-width:30px; }
#orderFlowWorkspace .flow-material-table small,#orderFlowWorkspace .flow-material-table strong { display:block; }
#orderFlowWorkspace .flow-business-notice { padding:14px 16px; margin:14px 0; border:1px solid #9ed8c2; border-left:4px solid #238b68; border-radius:10px; background:#eaf9f2; color:#195a45; font-weight:600; }
#orderFlowWorkspace .flow-progress-tools { display:flex; align-items:center; gap:12px; margin:14px 0; }
#orderFlowWorkspace .flow-progress-tools .flow-progress { flex:1; margin:0; }
#orderFlowWorkspace .flow-help { display:inline-block; position:relative; border:1px solid #d6cada; border-radius:50%; font-size:12px; cursor:help; }
#orderFlowWorkspace .flow-help > span { display:none; position:absolute; right:0; top:100%; z-index:5; width:250px; padding:12px; background:#382c41; color:white; border-radius:8px; font-size:12px; font-weight:400; line-height:1.6; }
#orderFlowWorkspace .flow-help:hover > span,#orderFlowWorkspace .flow-help:focus > span { display:block; }
#orderFlowWorkspace .flow-detail-empty { display:grid; place-items:center; min-height:350px; color:var(--muted); }
#orderFlowWorkspace .flow-back-list { display:none; }
#orderFlowWorkspace .flow-command { padding:12px 18px; margin-bottom:12px; }
#orderFlowWorkspace .flow-command h2 { font-size:20px; }
#orderFlowWorkspace .flow-command { min-height:0; display:flex; flex-direction:row; align-items:center; gap:12px; }
#orderFlowWorkspace .flow-command .head-tools { margin:0; }
main:has(#orderFlowWorkspace) > .page-head { padding:18px 24px; min-height:0; margin-bottom:14px; }
main:has(#orderFlowWorkspace) > .page-head h1 { font-size:26px; margin:6px 0; }
#orderFlowWorkspace .flow-order-summary > div { padding:12px; min-height:0; }
#orderFlowWorkspace .flow-command p { display:none; }
#orderFlowWorkspace .flow-arrival-status { display:block; padding:14px; }
#orderFlowWorkspace .flow-arrival-step { display:none; }
#orderFlowWorkspace .flow-arrival-grid { grid-template-columns:1fr 1fr; }
#orderFlowWorkspace .stage-detail { grid-template-columns:1fr; padding:14px; }
#orderFlowWorkspace .stage-detail .stage-actions { grid-column:auto; text-align:left; }
@media(max-width:950px) {
  #orderFlowWorkspace .flow-split { display:block; }
  #orderFlowWorkspace .flow-orders-pane,#orderFlowWorkspace .flow-detail-pane { height:auto; min-height:0; overflow:visible; }
  #orderFlowWorkspace .flow-split.has-selection .flow-orders-pane { display:none; }
  #orderFlowWorkspace .flow-split:not(.has-selection) .flow-detail-pane { display:none; }
  #orderFlowWorkspace .flow-back-list { display:inline-block; margin-bottom:14px; }
}

/* Keep conditional form sections truly hidden even when component rules set display. */
[hidden] { display: none !important; }

.batch-signature-panel { display:grid; grid-template-columns:minmax(180px,260px) minmax(360px,760px) auto; align-items:center; gap:16px; margin-top:18px; padding:18px; border:1px solid rgba(108,71,135,.18); border-radius:12px; background:#faf8fc; }
.batch-signature-panel>div:first-child { display:flex; flex-direction:column; gap:5px; }
.batch-signature-panel small { color:var(--muted); }
.batch-signature-panel canvas { width:100%; height:150px; background:#fff; }
@media(max-width:900px) { .batch-signature-panel { grid-template-columns:1fr; }.batch-signature-panel canvas { min-width:0; } }
.complaint-product-analysis { display:grid; gap:10px; padding:8px 12px 8px 22px; font-family:inherit; }
.complaint-product-analysis>label,.complaint-sample-choice { display:grid; grid-template-columns:150px minmax(0,1fr); align-items:center; gap:14px; }
.complaint-product-analysis input:not([type=file]),.complaint-product-analysis textarea { width:100%; min-width:0; padding:8px 10px; border:1px solid #c8b9cd; border-radius:7px; background:#fffdfd; font:inherit; }
.complaint-product-analysis textarea { min-height:96px; resize:vertical; }
.complaint-photo-field { align-items:start!important; }
.complaint-photo-preview { display:flex; flex-wrap:wrap; gap:9px; }
.complaint-photo-preview figure { width:100px; margin:0; padding:5px; border:1px solid #ddd0e0; border-radius:8px; background:#fff; }
.complaint-photo-preview img { display:block; width:88px; height:72px; border-radius:5px; object-fit:cover; }
.complaint-photo-preview figcaption { margin-top:4px; overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.complaint-photo-cell { display:grid; gap:7px; min-width:260px; padding:5px; font-family:inherit; }
.complaint-photo-cell>small { color:var(--muted); font-size:10px; }
.complaint-photo-cell .complaint-photo-preview { grid-column:auto; }
.complaint-analysis-input { min-height:96px; }
.batch-response-detail { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.batch-detail-row { display:flex; flex-direction:column; gap:4px; padding:10px 12px; border:1px solid #e2d8e5; border-radius:9px; background:#faf8fb; }
.batch-detail-row.full { grid-column:1/-1; }.batch-detail-row>span { color:var(--muted); font-size:11px; }.batch-detail-row>strong { white-space:pre-wrap; }
.complaint-photo-gallery { display:flex; flex-wrap:wrap; gap:10px; }.complaint-photo-gallery a { display:grid; gap:5px; width:130px; padding:6px; border:1px solid #d5c6d9; border-radius:8px; color:inherit; text-decoration:none; }.complaint-photo-gallery img { width:116px; height:92px; border-radius:5px; object-fit:cover; }.complaint-photo-gallery small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.complaint-footer-fields { margin:16px 0 0; padding:16px 18px; border:1px solid #c9bccd; border-radius:10px; background:#fff; }
.complaint-footer-fields h3 { margin:0 0 10px; font-size:15px; }
.complaint-footer-fields>div { display:grid; grid-template-columns:minmax(260px,1fr) minmax(200px,.55fr); gap:18px; padding:9px 0; border-top:1px solid #ece5ee; }
.complaint-footer-fields label { display:grid; grid-template-columns:100px minmax(0,1fr); align-items:center; gap:10px; }
.complaint-footer-fields input { width:100%; padding:8px 10px; border:1px solid #c8b9cd; border-radius:7px; background:#fffdfd; }
@media(max-width:760px) { .complaint-product-analysis>label,.complaint-sample-choice,.complaint-footer-fields>div,.complaint-footer-fields label,.batch-response-detail { grid-template-columns:1fr; } }

* { box-sizing: border-box; }
html { max-width:100%; overflow-x:hidden; background: var(--paper); }
body { max-width:100%; margin: 0; overflow-x:hidden; color: var(--ink); background:linear-gradient(135deg,#f7f4f8 0%,#fff7fa 48%,#f5f1f7 100%); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; touch-action:manipulation; }
button:active:not(:disabled) { transform:translateY(1px) scale(.99); filter:brightness(.97); }
button:disabled,[aria-busy="true"] { cursor:wait; }

.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position:fixed; z-index:20; inset:0 auto 0 0; width:252px; height:100dvh; overflow:auto; color:#f1eaf3; background:#24162c; border-right:1px solid #432d4e; display:flex; flex-direction:column; }
.brand { height: 76px; padding: 7px 14px 11px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-logo-frame { width: 151px; height: 43px; flex: none; overflow: hidden; border-radius: 6px; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.16); }
.brand-logo-frame { position:relative; border:2px solid rgba(238,111,158,.35); }
.brand-logo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 49%; }
.brand .brand-subtitle { display: block; color: #c3d2cc; font-size: 10px; line-height: 1.55; letter-spacing: .08em; white-space: nowrap; }
.role-picker { position:relative; flex:none; margin:8px 12px; padding:13px; border:1px solid rgba(255,255,255,.12); border-radius:12px; background:rgba(255,255,255,.05); }
.role-picker[hidden] { display:none; }
.role-picker label { display: block; color: #91ab9f; font-size: 11px; margin-bottom: 5px; }
.role-tree-trigger { width:100%; min-height:34px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 8px; border:1px solid rgba(238,111,158,.24); border-radius:9px; color:#4c3a42; background:rgba(255,255,255,.72); text-align:left; }
.role-tree-trigger strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.role-tree-trigger span { color:#cf4e7c; transition:transform .16s ease; }.role-tree-trigger[aria-expanded="true"] span { transform:rotate(180deg); }
.role-tree-trigger:focus-visible,.role-tree-group:focus-visible,.role-tree-role:focus-visible { outline:2px solid rgba(224,81,133,.48); outline-offset:1px; }
.role-tree-popover { position:absolute; z-index:4; right:0; bottom:calc(100% + 8px); left:0; max-height:min(58vh,520px); overflow:auto; overscroll-behavior:contain; border:1px solid #efc4d4; border-radius:10px; background:#fffafd; box-shadow:0 -12px 30px rgba(100,42,78,.16); scrollbar-width:thin; }
.role-tree-group { width:100%; min-height:34px; display:grid; grid-template-columns:15px minmax(0,1fr) auto; align-items:center; gap:6px; padding:7px 8px; border:0; border-top:1px solid #f4e7ed; color:#694357; background:#fff7fa; text-align:left; font-size:11px; font-weight:750; }
.role-tree-branch:first-child>.role-tree-group { border-top:0; }.role-tree-group:hover { background:#fdeef4; }
.role-tree-group i { color:#df5685; font-size:16px; font-style:normal; transition:transform .15s ease; }.role-tree-branch.is-open>.role-tree-group i { transform:rotate(90deg); }
.role-tree-group em { min-width:20px; padding:1px 5px; border-radius:9px; color:#a24d6e; background:#f8dfe9; text-align:center; font-size:9px; font-style:normal; }
.role-tree-children { padding:3px 4px 5px 10px; border-left:1px solid #efc8d6; background:#fff; }
.role-tree-branch.level-2 { margin-left:4px; }.role-tree-branch.level-2>.role-tree-group { min-height:31px; padding-left:5px; color:#806370; background:#fff; font-size:10px; }
.role-tree-role { position:relative; width:100%; min-height:34px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:3px 7px; margin:2px 0; padding:6px 8px 6px 15px; border:0; border-radius:8px; color:#55434b; background:transparent; text-align:left; }
.role-tree-role::before { content:""; position:absolute; left:4px; top:0; bottom:50%; width:7px; border-left:1px solid #e6bdcc; border-bottom:1px solid #e6bdcc; }.role-tree-role:hover { background:#fff0f6; }
.role-tree-role>span { font-size:11px; font-weight:700; }.role-tree-role small { grid-column:1; color:#a17e8d; font-size:8px; }.role-tree-role b { grid-column:2; grid-row:1 / span 2; padding:2px 6px; border-radius:8px; color:#fff; background:#df5685; font-size:8px; }
.role-tree-role.is-current { color:#a93562; background:#ffeaf2; box-shadow:inset 2px 0 #df5685; }
.role-picker p { margin: 6px 0 0; color: #9bb0a7; font-size: 11px; }
nav { min-height:0; padding:7px 10px 18px; flex:1; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.nav-group { margin-top: 7px; }
.nav-group-title { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; border-radius:8px; color:#a992b1; font-size:11px; font-weight:700; letter-spacing:.08em; cursor:pointer; list-style:none; background:rgba(255,255,255,.035); }
.nav-group-title::-webkit-details-marker { display:none; }.nav-group-title::after { content:"＋"; color:#856f8d; font-size:12px; }.nav-group[open]>.nav-group-title::after { content:"−"; }.nav-group-title em { margin-left:auto; margin-right:8px; min-width:21px; padding:1px 5px; border-radius:9px; color:#c9b7cf; background:rgba(255,255,255,.08); text-align:center; font-size:9px; font-style:normal; letter-spacing:0; white-space:nowrap; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 9px; padding: 9px 10px; margin: 2px 0; text-align: left; color: #bdd0c7; background: transparent; transition: .15s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: #5a3268; box-shadow: inset 3px 0 #c9a9d2; }
.nav-item .nav-icon { width: 20px; text-align: center; opacity: .9; }
.nav-item em { margin-left: auto; padding: 1px 7px; border-radius: 999px; color: #18382e; background: #b9d8c9; font-size: 10px; font-style: normal; }
.nav-item .nav-branch { margin-left: auto; color: #8fac9f; }
.nav-item.nav-child { position: relative; width: calc(100% - 10px); margin-left: 10px; padding: 7px 10px 7px 21px; color: #9fb7ac; font-size: 12px; }
.nav-item.nav-child::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 50%; width: 7px; border-left: 1px solid #45695c; border-bottom: 1px solid #45695c; }
.nav-item.nav-child .nav-icon { width: 10px; font-size: 9px; }
.nav-home { margin: 5px 0 9px; }
.nav-level { margin: 2px 0 2px 7px; }
.nav-level > summary { display:flex; align-items:center; gap:6px; min-height:30px; padding:5px 8px; border-radius:7px; color:#bca7c3; cursor:pointer; list-style:none; font-size:12px; }
.nav-level > summary::-webkit-details-marker { display:none; }
.nav-level > summary::before { content:"›"; width:11px; color:#8e7397; transition:transform .15s ease; }
.nav-level[open] > summary::before { transform:rotate(90deg); }
.nav-level > summary:hover { color:#fff; background:rgba(255,255,255,.05); }
.nav-level > summary em { margin-left:auto; color:#8f7998; font-size:9px; font-style:normal; }
.nav-level-2 { margin-left:12px; }
.nav-level-2 > summary { color:#a993b0; font-size:11px; }
.nav-item.nav-function { width:calc(100% - 14px); margin-left:14px; padding:6px 8px 6px 12px; color:#a994b0; font-size:11px; line-height:1.35; }
.nav-item.nav-function .nav-icon { width:8px; color:#82698b; }
.nav-item.nav-function i { margin-left:auto; padding:1px 4px; border:1px solid rgba(201,169,210,.3); border-radius:4px; color:#c9a9d2; font-size:8px; font-style:normal; }
.field-invalid { border-color:#d64f67 !important; box-shadow:0 0 0 3px rgba(214,79,103,.14) !important; }
.sidebar-foot { min-height: 82px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #16382c; background: #c7ded4; font-weight: 700; }
.sidebar-foot strong, .sidebar-foot span,.sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot span { color: #8fa99e; font-size: 10px; }
.sidebar-account-card { min-width:0; flex:1; display:flex; align-items:center; gap:9px; padding:7px; border:0; border-radius:11px; color:inherit; background:transparent; text-align:left; }
.sidebar-account-card:hover { background:rgba(255,255,255,.68); box-shadow:0 5px 14px rgba(117,48,78,.07); }
.sidebar-account-card .avatar { flex:none; color:#fff; font-size:13px; }
.sidebar-account-copy { min-width:0; flex:1; }
.sidebar-account-copy strong,.sidebar-account-copy span,.sidebar-account-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-account-copy small { margin-top:2px; color:#bd7690; font-size:8px; letter-spacing:.015em; }
.sidebar-logout { flex:none; width:30px; height:30px; display:grid; place-items:center; border:0; border-radius:9px; color:#a8bdb4; background:transparent; font-size:17px; }
.sidebar-logout:hover { color:#b42f51; background:#ffe5ec; }

.workspace { position:relative; grid-column:2; min-width:0; }
.workspace::before { content:""; position:fixed; z-index:-1; inset:64px 0 0 252px; pointer-events:none; opacity:.42; background-image:radial-gradient(circle at 7% 10%,rgba(238,111,158,.11) 0 7px,transparent 8px),radial-gradient(circle at 93% 18%,rgba(109,59,123,.08) 0 10px,transparent 11px),radial-gradient(circle at 82% 84%,rgba(238,111,158,.1) 0 6px,transparent 7px); background-size:190px 190px,260px 260px,150px 150px; }
.topbar { position: sticky; top: 0; z-index: 5; height: 64px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,252,253,.93); backdrop-filter: blur(14px); border-bottom: 1px solid #eadde6; box-shadow:0 4px 18px rgba(97,54,108,.04); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.breadcrumb span { font-family: Georgia, serif; color: var(--green); letter-spacing: .07em; }
.breadcrumb b { color: #c2c9c5; font-weight: 400; }
.breadcrumb strong { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.global-search { width: min(31vw, 330px); height: 37px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9f7; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.global-search > button { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.global-search-results { display: grid; gap: 14px; max-height: min(68vh, 680px); overflow: auto; }
.global-search-results section { display: grid; gap: 8px; }
.search-result-list { display: grid; gap: 7px; }
.search-result { width: 100%; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); cursor: pointer; }
.search-result:hover { border-color: var(--accent); background: var(--accent-soft); }
.search-result span { display: grid; gap: 3px; }
.search-result small { color: var(--muted); }
kbd { color: #87918c; font-size: 10px; border: 1px solid #d4dad6; padding: 1px 5px; border-radius: 4px; background: #fff; }
.icon-button { position: relative; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.icon-button i { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px; color: #fff; background: var(--red); font: 700 10px/17px sans-serif; }
.quick-button { height: 38px; border: 0; border-radius: 9px; padding: 0 15px; color: #fff; background: var(--green); font-weight: 650; }
.message-button { position:relative; }
.message-button i { position:absolute; top:-7px; right:-7px; min-width:19px; height:19px; padding:0 5px; border:2px solid #fff; border-radius:12px; color:#fff; background:#d64f67; font:700 10px/15px sans-serif; }
.message-alert { position:fixed; z-index:30; top:72px; right:24px; width:min(390px,calc(100vw - 32px)); padding:15px; border:1px solid #d6e6df; border-radius:13px; color:var(--ink); background:#fff; box-shadow:0 18px 55px rgba(25,44,36,.2); }
.message-alert[hidden] { display:none; }
.message-alert-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px; }
.message-alert-head strong { font-size:14px; }
.message-alert-head span { padding:3px 8px; border-radius:12px; color:#fff; background:#d64f67; font-size:10px; }
.message-alert-item { display:grid; gap:4px; padding:10px; border-radius:9px; background:#f3f8f5; }
.message-alert-item b { font-size:13px; }
.message-alert-item small { color:var(--muted); line-height:1.55; }
.message-alert-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.message-alert-actions button { min-height:32px; padding:0 11px; border:1px solid var(--line); border-radius:8px; background:#fff; cursor:pointer; }
.message-alert-actions .primary { color:#fff; border-color:var(--green); background:var(--green); }
.mobile-menu { display: none; }

/* 企业收件箱：保留专业信息密度，同时突出未读、待办和风险。 */
.message-inbox-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.message-inbox-summary article { position:relative; min-width:0; padding:16px 18px; overflow:hidden; border:1px solid #eadde6; border-radius:15px; background:rgba(255,255,255,.93); box-shadow:0 9px 25px rgba(82,46,93,.055); }
.message-inbox-summary article::after { content:""; position:absolute; right:-12px; bottom:-18px; width:62px; height:62px; border:8px solid rgba(238,111,158,.08); border-radius:50%; }
.message-inbox-summary article.has-alert { border-color:#f2bcc8; background:#fff7f8; }
.message-inbox-summary span,.message-inbox-summary small { display:block; color:var(--muted); }
.message-inbox-summary strong { display:block; margin:3px 0; color:#492452; font:750 26px/1.2 Georgia,serif; }
.message-inbox-summary small { font-size:10px; }
.message-inbox-shell { overflow:hidden; border:1px solid #e7dce9; border-radius:17px; background:rgba(255,255,255,.96); box-shadow:0 14px 38px rgba(70,38,80,.065); }
.message-inbox-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 17px; border-bottom:1px solid #eee5ef; background:linear-gradient(180deg,#fff,#fffafd); }
.message-filter-tabs { display:flex; flex-wrap:wrap; gap:5px; }
.message-filter-tabs button { min-height:35px; padding:0 11px; border:0; border-radius:10px; color:#695f6d; background:transparent; font-weight:650; }
.message-filter-tabs button:hover { background:#f9edf4; }
.message-filter-tabs button.active { color:#fff; background:#694275; box-shadow:0 5px 13px rgba(76,36,91,.18); }
.message-filter-tabs i { min-width:18px; margin-left:6px; padding:1px 5px; border-radius:9px; color:inherit; background:rgba(255,255,255,.18); font-size:9px; font-style:normal; }
.message-filter-tabs button:not(.active) i { background:#f0e8f1; }
.message-inbox-tools { display:flex; align-items:center; gap:8px; min-width:0; }
.message-search { width:min(30vw,340px); min-height:39px; display:flex; align-items:center; gap:8px; padding:0 11px; border:1px solid #dfd4e2; border-radius:10px; background:#fff; }
.message-search span { color:#9d7aa8; font-size:18px; }
.message-search input { min-width:0; width:100%; border:0; outline:0; background:transparent; }
.message-inbox-caption { display:flex; justify-content:space-between; gap:12px; padding:9px 18px; color:#887f8a; background:#fbf8fc; font-size:10px; }
.message-inbox-list { display:grid; }
.message-inbox-item { position:relative; width:100%; min-width:0; display:grid; grid-template-columns:12px minmax(0,1fr) auto; align-items:center; gap:16px; padding:18px; border:0; border-top:1px solid #f0e9f1; color:var(--ink); background:#fff; text-align:left; transition:background .15s ease; }
.message-type-dot { width:10px; height:10px; border-radius:50%; background:#3182ce; }
.kind-alert .message-type-dot { background:#dc3545; }
.kind-task .message-type-dot { background:#e58b20; }
.kind-completed .message-type-dot { background:#9ca3af; }
.message-inbox-item.is-read .message-inbox-open { opacity:.65; }
.message-inbox-item.is-read:hover .message-inbox-open,.message-inbox-item.is-read:focus-within .message-inbox-open { opacity:1; }
.message-inbox-summary article.has-alert strong,.message-inbox-summary article.has-alert span { color:#b3263d; }
.message-inbox-open { min-width:0; width:100%; padding:0; border:0; background:transparent; color:inherit; text-align:left; }
.message-inbox-item:first-child { border-top:0; }
.message-inbox-item:hover { z-index:1; background:#faf8fb; box-shadow:inset 3px 0 var(--green-2); }
.message-inbox-item.is-unread { background:linear-gradient(90deg,#fff4f8,#fff 34%); }
.message-unread-dot { width:8px; height:8px; border-radius:50%; background:transparent; }
.is-unread .message-unread-dot { background:var(--green-2); box-shadow:0 0 0 4px rgba(109,59,123,.12); }
.message-kind-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; color:#664071; background:#f2e9f4; font-weight:800; }
.kind-alert .message-kind-icon { color:#b62f50; background:#ffe7ed; }
.kind-task .message-kind-icon { color:#75417e; background:#f1e5f4; }
.message-inbox-content { min-width:0; display:grid; gap:5px; }
.message-inbox-title { min-width:0; display:flex; align-items:center; gap:7px; }
.message-inbox-title strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.message-kind-label,.message-priority { flex:none; padding:2px 7px; border-radius:999px; color:#795b81; background:#f3edf5; font-size:9px; font-style:normal; font-weight:650; }
.message-priority.priority-important { color:#966217; background:#fff0ce; }
.message-priority.priority-urgent { color:#b62f50; background:#ffe1e8; }
.message-preview { overflow:hidden; color:#665f68; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; white-space:normal; overflow-wrap:anywhere; line-height:1.6; }
.message-meta { display:flex; flex-wrap:wrap; gap:5px 12px; color:#968e98; font-size:10px; }
.message-meta b { color:#796f7c; font-weight:650; }.message-meta em { font-style:normal; }
.message-inbox-state { min-width:118px; display:grid; justify-items:end; gap:8px; }
.message-inbox-state button { white-space:nowrap; }
.message-inbox-state .compact { min-height:34px; padding:7px 11px; font-size:12px; }
.message-inbox-state b { color:#684074; font-size:10px; }

main { width:100%; max-width:none; margin:0; padding:28px; }
main:focus { outline:none; }
.page-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 22px; }
.eyebrow { color: var(--green-2); font-size: 11px; font-weight: 750; letter-spacing: .14em; }
.page-head h1 { margin: 4px 0 4px; font: 700 clamp(26px, 3vw, 34px)/1.2 Georgia, "Songti SC", serif; }
.page-head p { margin: 0; color: var(--muted); }
.head-tools { display:flex; flex-wrap:wrap; gap:8px; }
.secondary, .primary { min-height: 38px; border-radius: 9px; padding: 0 14px; font-weight: 620; }
.secondary { color: var(--ink); border: 1px solid var(--line); background: #fff; }
.primary { color: #fff; border: 1px solid var(--green); background: var(--green); }

.alert-strip { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 14px 17px; margin-bottom: 18px; border: 1px solid #e8dbc3; border-radius: 11px; background: #fff9ef; }
.alert-strip strong { color: #7a5520; }
.alert-strip span { color: #7a6b55; }
.alert-strip button { border: 0; color: #74501d; background: transparent; font-weight: 650; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: 0 5px 16px rgba(30,48,40,.03); }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--green); background: var(--mint); }
.metric strong { display: block; margin: 11px 0 2px; font: 700 28px/1 Georgia, serif; }
.metric small { color: var(--muted); }
.metric small.up { color: var(--green-2); }
.metric small.warn { color: var(--red); }

.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(300px,.8fr); gap:18px; align-items:start; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: var(--panel); overflow: hidden; box-shadow: 0 5px 18px rgba(30,48,40,.035); }
.panel + .panel { margin-top: 18px; }
.panel-head { min-height: 58px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf0ee; }
.panel-head h2 { margin: 0; font: 700 17px Georgia, "Songti SC", serif; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.panel-head button { border: 0; color: var(--green-2); background: transparent; }
.workflow { display: grid; grid-template-columns: repeat(4, 1fr); padding: 19px 13px; }
.flow-step { position: relative; text-align: center; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; top: 16px; left: 62%; right: -38%; height: 1px; background: #cfd9d4; }
.flow-icon { position: relative; z-index: 1; width: 33px; height: 33px; margin: auto; display: grid; place-items: center; border: 1px solid #bfd0c8; border-radius: 50%; color: var(--green); background: #edf5f1; font-weight: 750; }
.flow-step strong { display: block; margin-top: 7px; font-size: 11px; }
.flow-step span { color: var(--muted); font-size: 10px; }
.flow-step.attention .flow-icon { color: #fff; border-color: var(--gold); background: var(--gold); }
.task-list { padding: 3px 17px 8px; }
.task { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid #edf0ee; }
.task:last-child { border: 0; }
.task-type { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--green); background: #edf5f1; }
.task strong, .task span { display: block; }
.task strong { font-size: 13px; }
.task span, .task time { color: var(--muted); font-size: 11px; }
.status { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 10px; white-space: nowrap; }
.status.pending { color: #76541f; background: #f8ebd4; }
.status.ok { color: #216047; background: #dff0e7; }
.status.bad { color: #95413d; background: #f8dfdd; }
.status.info { color: #355e82; background: #e1edf7; }
.chart { height: 176px; padding: 20px 18px 14px; display: flex; align-items: flex-end; gap: 12px; }
.bar-wrap { height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.bar { width: 72%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(#3d8068, #174c3c); }
.bar-wrap span { color: var(--muted); font-size: 9px; }
.notice-list { padding: 6px 17px; }
.notice { padding: 12px 0; border-bottom: 1px solid #edf0ee; }
.notice:last-child { border: 0; }
.notice strong { display: block; font-size: 12px; }
.notice span { color: var(--muted); font-size: 10px; }

.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.module-card { min-height: 154px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; transition: .18s ease; }
.manager-actions .module-card { text-align: left; color: var(--ink); }
.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #becdc6; }
.module-card-top { display: flex; align-items: center; justify-content: space-between; }
.module-card .big-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--green); background: var(--mint); font-size: 18px; }
.module-card h3 { margin: 16px 0 4px; font-size: 15px; }
.module-card p { margin: 0; color: var(--muted); font-size: 12px; }
.module-card .count { color: var(--green); font: 700 16px Georgia, serif; }

.toolbar { display: flex; gap: 9px; margin-bottom: 14px; }
.toolbar .filter-search { flex: 1; min-width: 180px; }
.time-sort-control { display:flex; align-items:center; gap:8px; min-height:39px; padding:0 10px; border:1px solid var(--line); border-radius:9px; background:#fff; color:#59675f; font-size:12px; }
.time-sort-control select { min-width:132px; border:0; outline:0; background:#fff; color:#24162c; font:inherit; }
.filter-search, .filter-select { height: 39px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #fff; }
.data-panel { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 14px; color: var(--muted); background: #f7f9f7; text-align: left; font-size: 11px; font-weight: 650; }
.data-table td { padding: 13px 14px; border-top: 1px solid #edf0ee; vertical-align: middle; }
.data-table tr:hover td { background: #fbfcfb; }
.code { color: var(--green); font: 650 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.subtle { display: block; color: var(--muted); font-size: 10px; }
.row-actions button { border: 0; color: var(--green); background: transparent; font-weight: 650; }
.empty-state { padding:42px 20px; text-align:center; color:var(--muted); }
.dashboard-grid .empty-state { padding:32px 20px; }
.empty-state h3 { margin: 8px 0 3px; color: var(--ink); }
.empty-state p { margin: 0; }
.empty-icon { width: 46px; height: 46px; margin: auto; display: grid; place-items: center; border-radius: 14px; color: var(--green); background: var(--mint); font-size: 22px; }
.text-action { border: 0; color: var(--green); background: transparent; font-weight: 650; }

dialog { width: min(1320px, calc(100vw - 48px)); max-width:none; max-height:calc(100dvh - 32px); overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; border: 0; border-radius: 16px; padding: 0; box-shadow: 0 30px 90px rgba(10,35,26,.28); }
dialog::backdrop { background: rgba(10,27,21,.48); backdrop-filter: blur(3px); }
dialog form, .receipt-detail { width:100%; min-width:0; max-width:100%; padding:28px 32px; overflow-x:hidden; }
.receipt-detail,.receipt-detail>*,dialog form>*,dialog fieldset,.form-grid,.form-grid>* { min-width:0; max-width:100%; }
.receipt-detail img,dialog form img,dialog canvas { max-width:100%; }
.receipt-detail .table-scroll,dialog form .table-scroll { width:100%; max-width:100%; overflow-x:hidden; }
.receipt-detail .data-table,dialog form .data-table { width:100%; table-layout:fixed; }
.receipt-detail .data-table th,.receipt-detail .data-table td,dialog form .data-table th,dialog form .data-table td { min-width:0; padding:10px 8px; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
.receipt-detail .row-actions,dialog form .row-actions { display:flex; flex-wrap:wrap; gap:4px; }
.dialog-head { display: flex; justify-content: space-between; }
.dialog-head small { color: var(--green-2); letter-spacing: .15em; }
.dialog-head .record-number-label { letter-spacing:.04em; }
.record-number-label em { display:inline-block; margin-left:7px; padding:2px 7px; border-radius:999px; color:#66516f; background:#f3eaf6; font-size:9px; font-style:normal; letter-spacing:0; }
.dialog-head h2 { margin: 3px 0; font: 700 25px Georgia, serif; }
.dialog-head button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #eef2ef; font-size: 20px; }
dialog form > p { color: var(--muted); }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.quick-grid > button:not(.quick-option) { display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-height:42px; padding:14px 16px; text-align:left; color:var(--role-ink); border:1px solid #e5d8de; border-radius:12px; background:#fff; transition:background .16s ease,color .16s ease,border-color .16s ease; }
.quick-grid > button:not(.quick-option):not(:disabled):hover { color:#fff; border-color:var(--role-accent); background:var(--role-accent); }
.quick-option { padding: 14px; display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.quick-option:hover { border-color: #82a797; background: #f5faf7; }
.quick-option span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--mint); }
.quick-option strong, .quick-option small { display: block; }
.quick-option small { color: var(--muted); }
fieldset { margin: 18px 0; padding: 17px; border: 1px solid var(--line); border-radius: 11px; }
legend { padding: 0 7px; color: var(--green); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid label { display: block; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid label > span { display: block; margin-bottom: 5px; color: #4f5c57; font-size: 12px; font-weight: 650; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; border: 1px solid #d5dcd8; border-radius: 8px; padding: 9px 10px; outline: 0; background: #fbfcfb; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #66927f; box-shadow: 0 0 0 3px rgba(52,116,90,.1); background: #fff; }
.form-grid input,.form-grid select,.form-grid textarea,.business-material-row input,.business-material-row select,.business-material-row textarea { color:#24162c; caret-color:#5a3268; opacity:1; }
.form-grid .purchase-fast-input { min-height:46px; font-size:16px; line-height:1.2; touch-action:manipulation; -webkit-tap-highlight-color:rgba(238,119,159,.12); }
.large-number-input { min-height:46px; font-size:17px!important; font-weight:750; font-variant-numeric:tabular-nums; letter-spacing:.03em; background:#fff!important; }
.product-specification-control { display:grid; grid-template-columns:minmax(0,1fr) minmax(150px,.38fr); gap:10px; }
.product-specification-control input { min-height:48px; font-size:17px; font-weight:750; font-variant-numeric:tabular-nums; }
.product-specification-control select { min-height:48px; font-size:15px; font-weight:700; }
.business-material-list { display:grid; gap:14px; width:100%; }
.sales-sku-count-control { display:flex; align-items:center; width:min(430px,100%); overflow:hidden; border:1px solid #e4bfd0; border-radius:12px; background:#fff; box-shadow:0 5px 16px rgba(174,64,107,.07); }
.sales-sku-count-control button { flex:0 0 52px; height:50px; border:0; border-radius:0; color:#b63d6b; background:#fff4f8; font-size:22px; font-weight:800; }
.sales-sku-count-control button:hover { color:#fff; background:#df527f; }
.sales-sku-count-control input { flex:0 1 112px; height:50px; border:0!important; border-radius:0!important; text-align:center; box-shadow:none!important; }
.sales-sku-count-control b { padding:0 18px; color:#674b58; font-size:14px; white-space:nowrap; }
.sales-sku-formula-list { display:grid; gap:12px; width:100%; }
.sales-sku-formula-row { display:grid; grid-template-columns:86px repeat(12,minmax(0,1fr)); gap:14px; align-items:end; padding:18px; border:1px solid #ead0db; border-radius:14px; background:linear-gradient(135deg,#fffafd,#fff); box-shadow:0 7px 20px rgba(126,60,87,.05); }
.sales-sku-row-title { align-self:center; display:grid; gap:3px; text-align:center; }
.sales-sku-row-title strong { color:#a93562; font-size:17px; }
.sales-sku-row-title small { color:#9a8290; font-size:10px; }
.sales-sku-formula-row label { display:grid; gap:5px; min-width:0; }
.sales-sku-formula-row label>span { color:#5e4c65; font-size:11px; font-weight:700; }
.sales-sku-formula-row input,.sales-sku-formula-row select { width:100%; min-width:0; height:44px; padding:10px 11px; border:1px solid #cfc4d3; border-radius:8px; background:#fff; }
.sales-sku-formula-row>.sales-sku-identity { grid-column:span 4; }
.sales-sku-formula-row>.sales-sku-formula { grid-column:span 5; }
.sales-sku-formula-row>.sales-sku-quantity { grid-column:span 3; }
.sales-sku-formula-row>.sales-sku-spec,.sales-sku-formula-row>.sales-sku-fill { grid-column:span 6; }
.sales-sku-usage { grid-column:1/-1; }
.sales-sku-usage,.sales-usage-summary { padding:14px 16px; border:1px solid #ead0db; border-radius:12px; background:#fff6fa; color:#614753; overflow-wrap:anywhere; }
.sales-sku-usage { display:grid; gap:6px; }
.sales-sku-usage output { font-size:18px; font-weight:700; color:#a93562; }
.sales-sku-usage small { color:#8b7d84; font-size:11px; line-height:1.6; }
.sales-usage-summary { font-size:13px; line-height:1.7; }
.sales-sku-formula-row>.sales-sku-formula small { color:#8b7d84; font-size:10px; line-height:1.4; }
.form-grid label.is-readonly input { background:#f3f5f4; color:#718078; cursor:not-allowed; }

dialog:has(> .sales-order-form) { width:min(1180px,calc(100vw - 40px)); border-radius:22px; }
.sales-order-form { padding:34px 42px 38px; font-family:var(--font-ui); background:linear-gradient(180deg,#fff 0,#fffafd 100%); }
.sales-order-form .dialog-head { align-items:flex-start; padding-bottom:18px; border-bottom:1px solid #f1dce5; }
.sales-order-form .dialog-head h2 { margin-top:7px; color:#2d2529; font-family:inherit; font-size:29px; font-weight:800; letter-spacing:-.02em; }
.sales-order-form>p { max-width:920px; margin:14px 0 20px; color:#756a70; font-size:13px; line-height:1.75; }
.sales-order-quick-nav { position:sticky; top:-1px; z-index:12; display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 -18px 20px; padding:13px 18px; border:1px solid #f0cddd; border-radius:15px; background:rgba(255,250,253,.96); box-shadow:0 10px 28px rgba(137,46,81,.1); backdrop-filter:blur(14px); }
.sales-order-quick-nav>div { display:grid; gap:2px; min-width:190px; }
.sales-order-quick-nav>div small { color:#d23e75; font-size:10px; font-weight:850; letter-spacing:.09em; }
.sales-order-quick-nav>div strong { color:#493840; font-size:12px; line-height:1.45; }
.sales-order-quick-nav nav { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.sales-order-quick-nav button { min-height:34px; padding:7px 12px; border:1px solid #edbfd1; border-radius:999px; color:#a92f5d; background:#fff; font-size:11px; font-weight:800; white-space:nowrap; box-shadow:none; }
.sales-order-quick-nav button:hover,.sales-order-quick-nav button:focus-visible { color:#fff; border-color:#db4679; background:#db4679; transform:translateY(-1px); }
.sales-order-form fieldset { margin:22px 0; padding:22px 24px 25px; border-color:#edd9e2; border-radius:16px; background:rgba(255,255,255,.92); box-shadow:0 8px 28px rgba(124,64,88,.045); }
.sales-order-form fieldset>legend { padding:0 10px; color:#a93662; font-size:15px; font-weight:800; }
.sales-order-form .form-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px 22px; align-items:start; }
.sales-order-form .form-grid>.full { grid-column:1/-1; }
.sales-order-form .sales-sku-count-field { grid-column:1; min-width:0; }
.sales-order-form .form-grid label>span { margin-bottom:8px; color:#51464c; font-size:13px; font-weight:750; }
.sales-order-form .form-grid input,.sales-order-form .form-grid select { min-height:48px; border-color:#dfd3d8; border-radius:10px; padding:11px 13px; font-size:14px; }
.sales-order-form .form-grid textarea { min-height:108px; border-color:#dfd3d8; border-radius:10px; padding:12px 13px; font-size:14px; line-height:1.65; }
.sales-order-form .form-grid label>small { display:block; margin-top:7px; color:#8b7d84; font-size:11px; line-height:1.55; }
.sales-order-form .pmc-form-section-title { margin:18px 0 0; padding:13px 16px; border-radius:11px; box-shadow:0 5px 16px rgba(184,61,107,.05); }
.sales-order-form .pmc-form-section-title span { font-size:16px; }
.sales-order-form .regulatory-guidance>div { padding:15px 16px; border-color:#efdae3; background:#fff8fb; }
.sales-order-form [data-sales-order-section] { scroll-margin-top:110px; }
.sales-order-form .sales-order-quick-nav nav { width:100%; justify-content:flex-start; }
.sales-order-guidance { margin:12px 0 20px; color:#756a70; font-size:13px; }
.sales-order-guidance summary { cursor:pointer; padding:8px 0; }
.sales-order-form .sales-handoff-help { margin:0; color:#756a70; font-size:13px; line-height:1.7; }
.sales-order-form .form-actions.inline { position:static; margin:0; padding:12px 0; border:0; background:none; box-shadow:none; }
.sales-order-form [data-sales-delivery-summary] .delivery-recipients { margin:8px 0; }
.sales-order-form .form-actions { position:sticky; bottom:-38px; z-index:5; margin:28px -42px -38px; padding:16px 42px 20px; border-top:1px solid #efdce5; background:rgba(255,255,255,.95); backdrop-filter:blur(12px); }
.business-material-row { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:10px 12px; align-items:end; width:100%; padding:16px; border:1px solid #d9cedd; border-radius:12px; background:#faf8fb; }
.business-material-row label { display:grid; gap:5px; min-width:0; }
.business-material-row label>span,.business-material-row .material-unit>span { color:#5e4c65; font-size:11px; font-weight:700; }
.business-material-row input,.business-material-row select,.business-material-row textarea { display:block; width:100%; min-width:0; padding:10px 11px; border:1px solid #cfc4d3; border-radius:8px; outline:0; background:#fff; font-size:14px; }
.business-material-row input,.business-material-row select { height:44px; }.business-material-row textarea { min-height:70px; resize:vertical; line-height:1.55; }
.business-material-row input:focus,.business-material-row select:focus,.business-material-row textarea:focus { border-color:#7b4b88; box-shadow:0 0 0 3px rgba(90,50,104,.12); }
.business-material-row input[type="number"] { font-size:17px; font-weight:750; font-variant-numeric:tabular-nums; }
.business-material-row .material-source { grid-column:span 3; }.business-material-row .material-type { grid-column:span 4; }.business-material-row .material-name { grid-column:span 5; }.business-material-row .material-quantity { grid-column:span 4; min-width:130px; }
.business-material-row .material-unit { grid-column:span 1; display:grid; gap:5px; }.business-material-row .material-unit strong { display:flex; align-items:center; height:44px; padding:0 10px; border:1px solid #d7cedb; border-radius:8px; color:#4b245b; background:#f1e8f3; }
.business-material-row .material-remove { grid-column:span 2; min-height:44px; white-space:nowrap; }.business-material-row .material-spec,.business-material-row .material-package { grid-column:span 6; }
@media(max-width:900px) { .business-material-row .material-source,.business-material-row .material-type,.business-material-row .material-name,.business-material-row .material-quantity,.business-material-row .material-unit,.business-material-row .material-remove { grid-column:span 6; }.business-material-row .material-spec,.business-material-row .material-package { grid-column:1/-1; } }
@media(max-width:600px) { .business-material-row>* { grid-column:1/-1!important; }.product-specification-control { grid-template-columns:1fr; }.sales-sku-formula-row { grid-template-columns:1fr; }.sales-sku-formula-row>* { grid-column:1/-1!important; }.sales-sku-row-title { grid-template-columns:auto 1fr; align-items:baseline; text-align:left; }.sales-order-form { padding:22px 16px 26px; }.sales-order-form .form-grid { grid-template-columns:1fr; }.sales-order-form .form-actions { bottom:-26px; margin:24px -16px -26px; padding:14px 16px 16px; }.sales-order-quick-nav { align-items:flex-start; margin:0 -6px 18px; padding:11px 12px; }.sales-order-quick-nav>div { display:none; }.sales-order-quick-nav nav { justify-content:flex-start; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }.sales-order-quick-nav nav::-webkit-scrollbar { display:none; } }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.form-actions button:disabled { opacity: .6; cursor: wait; }
.incoming-inspection-form-layout { display:grid; grid-template-columns:minmax(540px,1.15fr) minmax(400px,.85fr); column-gap:22px; align-items:start; overflow:visible; }
.incoming-inspection-form-layout > .dialog-head,.incoming-inspection-form-layout > .form-actions { grid-column:1 / -1; }
.incoming-inspection-form-layout > .incoming-inspection-preview-stack { grid-column:1; grid-row:2; position:sticky; top:12px; z-index:2; display:grid; gap:16px; max-height:calc(100vh - 36px); margin-top:12px; overflow:auto; align-self:start; scrollbar-gutter:stable; }
.incoming-inspection-form-layout > .incoming-inspection-entry-panel { grid-column:2; grid-row:2; min-width:0; }
.incoming-inspection-entry-panel > p { margin-top:12px; color:var(--muted); }
.inspection-preview-navigator { position:sticky; top:0; z-index:8; display:grid; gap:8px; padding:12px; border:1px solid #e895b5; border-radius:14px; background:rgba(255,248,251,.97); box-shadow:0 8px 22px rgba(173,51,100,.13); backdrop-filter:blur(8px); }
.inspection-preview-navigator strong { color:#9f315c; font-size:13px; }.inspection-preview-navigator div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }.inspection-preview-navigator button { min-height:40px; padding:7px 8px; border:1px solid #edbfd0; border-radius:9px; color:#7b4058; background:#fff; font-size:11px; font-weight:800; cursor:pointer; }.inspection-preview-navigator button:hover,.inspection-preview-navigator button.active { border-color:#df4d86; color:#fff; background:#df4d86; }
.inspection-preview-guide { display:grid; gap:5px; margin:12px 0 16px; padding:14px 16px; border:1px solid #efb3ca; border-left:5px solid #df4d86; border-radius:12px; color:#6f4053; background:#fff3f8; }.inspection-preview-guide strong { color:#a52e5c; font-size:15px; }.inspection-preview-guide span { font-size:12px; line-height:1.65; }
.incoming-inspection-preview-panel { min-width:0; padding:14px; border:1px solid #efc9d8; border-radius:14px; background:#fff8fb; }
.package-iqc-preview-panel,.raw-material-iqc-preview-panel { min-width:0; padding:14px; border:1px solid #efc9d8; border-radius:14px; background:#fff8fb; }
.incoming-inspection-record-sheet { max-width:920px; margin:0 auto 20px; }.incoming-inspection-record-sheet .incoming-inspection-preview-panel { position:static; }
.incoming-sheet-toolbar { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:10px; color:#6b4054; }
.incoming-sheet-toolbar strong,.incoming-sheet-toolbar small { display:block; }.incoming-sheet-toolbar small { margin-top:2px; color:#8b727d; font-size:10px; }
.preview-toolbar-actions { display:flex; flex:0 0 auto; gap:7px; align-items:center; }.preview-format-badge { padding:4px 8px; border-radius:999px; color:#9c3e64; background:#ffe7f0; font-size:10px; font-weight:750; }.preview-toolbar-actions button { min-height:30px; padding:5px 10px; border:1px solid #df87aa; border-radius:8px; color:#9d3560; background:#fff; font-size:11px; font-weight:800; cursor:pointer; }.preview-toolbar-actions button:hover { color:#fff; background:#df4d86; }
.preview-expanded-open { overflow:hidden; }.incoming-inspection-preview-stack.has-expanded-preview { overflow:visible; }.incoming-inspection-preview-panel.preview-expanded,.package-iqc-preview-panel.preview-expanded,.raw-material-iqc-preview-panel.preview-expanded { position:fixed!important; inset:14px; z-index:10050; display:block; width:auto; max-width:none; max-height:none; margin:0!important; overflow:auto; border:2px solid #dd4b84; background:#fff8fb; box-shadow:0 0 0 100vmax rgba(42,24,35,.62),0 22px 60px rgba(77,29,50,.35); }.preview-expanded .incoming-sheet-toolbar { position:sticky; top:-14px; z-index:4; margin:-14px -14px 14px; padding:13px 18px; border-bottom:1px solid #ecc3d3; background:#fff8fb; }.preview-expanded .incoming-inspection-sheet,.preview-expanded .package-iqc-sheet,.preview-expanded .raw-material-iqc-sheet { width:min(1500px,100%); margin:0 auto; }.preview-expanded .package-iqc-aql-full th,.preview-expanded .package-iqc-aql-full td { height:28px; padding:3px 2px; font-size:9px; }.preview-expanded .package-iqc-results th,.preview-expanded .package-iqc-results td,.preview-expanded .raw-iqc-results th,.preview-expanded .raw-iqc-results td,.preview-expanded .raw-iqc-report-results th,.preview-expanded .raw-iqc-report-results td { padding:8px 6px; font-size:11px; }.preview-expanded .package-iqc-control-table > h4 { padding:10px; font-size:16px; }.preview-expanded .package-iqc-control-table > div { min-height:520px; padding:14px 10px; font-size:16px; }.preview-expanded .template-mark-control { width:38px; min-width:38px; height:38px; min-height:38px; font-size:24px; line-height:36px; }.preview-expanded .template-write-control { width:140px; height:40px; min-height:40px; font-size:16px; }.preview-expanded .package-iqc-meta-lines span,.preview-expanded .package-iqc-conclusion span,.preview-expanded .raw-iqc-meta-grid span,.preview-expanded .raw-report-meta-grid span,.preview-expanded .raw-iqc-signatures span { padding:10px 12px; font-size:12px; }
.incoming-inspection-sheet { position:relative; overflow:hidden; border:1.5px solid #171717; color:#111; background:#fff; font-family:"Songti SC","SimSun",serif; }
.incoming-inspection-sheet h2 { margin:15px 70px 2px; text-align:center; font-size:22px; line-height:1.25; }.incoming-inspection-sheet h3 { margin:0; padding:3px; border-top:1.5px solid #111; border-bottom:1.5px solid #111; text-align:center; font-size:20px; }
.incoming-sheet-code { position:absolute; top:4px; right:7px; font-size:11px; }
.incoming-sheet-categories { display:flex; flex-wrap:wrap; gap:12px; padding:7px 8px; border-bottom:1.5px solid #111; font-size:13px; }.incoming-sheet-categories span.checked { font-weight:800; }
.incoming-inspection-sheet table { width:100%; table-layout:fixed; border-collapse:collapse; }
.incoming-inspection-sheet th,.incoming-inspection-sheet td { height:38px; padding:4px; border-right:1px solid #111; border-bottom:1px solid #111; text-align:center; overflow-wrap:anywhere; font-size:10px; }.incoming-inspection-sheet th:last-child,.incoming-inspection-sheet td:last-child { border-right:0; }.incoming-inspection-sheet th { height:32px; font-size:11px; font-weight:700; }
.incoming-sheet-reason { min-height:48px; padding:7px 8px; border-bottom:1px solid #111; font-size:10px; line-height:1.55; }.incoming-sheet-reason strong { color:#b23b68; }
.incoming-sheet-signatures { display:grid; grid-template-columns:1fr 1fr; }.incoming-sheet-signatures span { min-height:38px; padding:9px 8px; font-size:11px; }.incoming-sheet-signatures span:first-child { border-right:1px solid #111; }
.package-iqc-sheet { position:relative; overflow:hidden; border:1.5px solid #171717; color:#111; background:#fff; font-family:"Songti SC","SimSun",serif; }
.package-iqc-sheet h2 { margin:15px 70px 2px; text-align:center; font-size:21px; line-height:1.25; }.package-iqc-sheet h3 { margin:0; padding:3px; border-top:1.5px solid #111; border-bottom:1.5px solid #111; text-align:center; font-size:19px; }
.package-iqc-sheet table { width:100%; table-layout:fixed; border-collapse:collapse; }.package-iqc-sheet th,.package-iqc-sheet td { padding:4px; border-right:1px solid #111; border-bottom:1px solid #111; text-align:center; overflow-wrap:anywhere; font-size:8px; line-height:1.35; }.package-iqc-sheet th:last-child,.package-iqc-sheet td:last-child { border-right:0; }
.package-iqc-sheet > .incoming-sheet-code { right:auto; left:7px; }.package-iqc-meta-lines { display:grid; grid-template-columns:1fr 1fr 1fr; border-bottom:1px solid #111; }.package-iqc-meta-lines span { min-height:25px; padding:6px 8px; border-right:1px solid #111; font-size:8px; }.package-iqc-meta-lines span:nth-child(3),.package-iqc-meta-lines span:last-child { border-right:0; }.package-iqc-meta-lines span:nth-child(4),.package-iqc-meta-lines span:nth-child(5) { border-top:1px solid #111; }.package-iqc-meta-lines span:nth-child(4) { grid-column:1 / 2; }.package-iqc-meta-lines span:nth-child(5) { grid-column:2 / 4; }
.package-iqc-aql-full { border-bottom:1px solid #111; }.package-iqc-aql-full th,.package-iqc-aql-full td { height:18px; padding:1px; font-size:5.4px; line-height:1.1; }.package-iqc-aql-full .aql-vertical { width:20px; font-size:7px; }.package-iqc-aql-full .active-aql-column { font-weight:900; box-shadow:inset 0 0 0 1px #111; }
.package-iqc-control-table { display:grid; grid-template-columns:30% 54% 16%; border-bottom:1px solid #111; }.package-iqc-control-table > h4 { margin:0; padding:7px 4px; border-right:1px solid #111; border-bottom:1px solid #111; text-align:center; font-size:10px; }.package-iqc-control-table > h4:nth-child(3) { border-right:0; }.package-iqc-control-table > div { min-height:260px; padding:7px 5px; border-right:1px solid #111; font-size:9px; }.package-iqc-control-table > div:last-child { border-right:0; }
.package-iqc-control-type { display:flex; flex-direction:column; justify-content:space-between; }.package-iqc-control-type p,.package-iqc-control-basis p { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0; }.package-iqc-control-type > label,.package-iqc-control-type > div { display:grid; gap:8px; }.package-iqc-control-type > div label { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:7px; }
.package-iqc-control-standard { display:flex; flex-direction:column; gap:18px; }.package-iqc-control-standard > p { display:flex; justify-content:space-around; margin:0; }.package-iqc-control-standard > div { display:grid; gap:8px; text-align:center; }.package-iqc-control-standard label { display:flex; align-items:center; justify-content:center; gap:8px; }
.package-iqc-control-basis { display:flex; flex-direction:column; justify-content:space-between; }.template-mark-control { width:24px; min-width:24px; height:24px; min-height:24px; padding:0; border:1px solid #777; border-radius:0; color:#111; background:#fff; font-size:16px; font-weight:800; line-height:22px; cursor:pointer; }.template-mark-control:hover:not(:disabled),.template-mark-control:focus-visible:not(:disabled) { border-color:#dc4d84; color:#b82e62; background:#fff2f7; }.template-mark-control:disabled { opacity:1; cursor:default; }.template-write-control { display:inline-block; width:82px; height:25px; min-height:25px; padding:2px 5px; border:1px solid #888; border-radius:0; color:#111; background:#fff; font:inherit; text-align:center; }.template-write-control:focus { border-color:#dc4d84; outline:2px solid #ffd1e1; }.template-write-control[readonly] { cursor:default; }
.package-iqc-results th:first-child { width:9%; }.package-iqc-results th:nth-child(2) { width:25%; }.package-iqc-results th:nth-last-child(1) { width:18%; }.package-iqc-results td { min-height:29px; }
.package-iqc-conclusion { display:grid; grid-template-columns:repeat(4,1fr); }.package-iqc-conclusion span { padding:7px 5px; border-right:1px solid #111; font-size:9px; }.package-iqc-conclusion span:last-child { border-right:0; }.package-iqc-conclusion img { display:block; max-width:88px; max-height:28px; margin:3px auto 0; object-fit:contain; }.package-iqc-note { margin:0; padding:5px 7px; border-top:1px solid #111; font-size:7px; }
.package-iqc-decision-cell { display:flex; flex-wrap:wrap; align-items:center; gap:5px 9px; }.package-iqc-decision-cell label { display:flex; align-items:center; gap:4px; }.package-iqc-decision-cell em { width:100%; color:#a93461; font-style:normal; font-weight:800; }
.raw-material-iqc-sheet { position:relative; overflow:hidden; border:1.5px solid #171717; color:#111; background:#fff; font-family:"Songti SC","SimSun",serif; }
.raw-material-iqc-sheet h2 { margin:15px 70px 2px; text-align:center; font-size:21px; line-height:1.25; }.raw-material-iqc-sheet h3 { margin:0; padding:3px; border-top:1.5px solid #111; border-bottom:1.5px solid #111; text-align:center; font-size:19px; }
.raw-iqc-meta-grid,.raw-report-meta-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }.raw-iqc-meta-grid span,.raw-report-meta-grid span { min-height:34px; padding:5px 6px; border-right:1px solid #111; border-bottom:1px solid #111; font-size:7.5px; line-height:1.35; overflow-wrap:anywhere; }.raw-iqc-meta-grid span:nth-child(4n) { border-right:0; }
.raw-report-meta-grid span:nth-child(1) { grid-column:span 2; }.raw-report-meta-grid span:nth-child(2) { grid-column:span 1; }.raw-report-meta-grid span:nth-child(3) { border-right:0; }.raw-report-meta-grid span:nth-child(4),.raw-report-meta-grid span:nth-child(5),.raw-report-meta-grid span:nth-child(6),.raw-report-meta-grid span:nth-child(7) { grid-column:span 1; }.raw-report-meta-grid span:nth-child(7) { border-right:0; }.raw-report-meta-grid span:nth-child(8) { grid-column:span 3; }.raw-report-meta-grid span:nth-child(9) { grid-column:span 1; border-right:0; }
.raw-material-iqc-sheet table { width:100%; table-layout:fixed; border-collapse:collapse; }.raw-material-iqc-sheet th,.raw-material-iqc-sheet td { padding:4px 3px; border-right:1px solid #111; border-bottom:1px solid #111; text-align:center; overflow-wrap:anywhere; font-size:6.5px; line-height:1.35; white-space:pre-wrap; }.raw-material-iqc-sheet th:last-child,.raw-material-iqc-sheet td:last-child { border-right:0; }.raw-material-iqc-sheet th { font-weight:800; background:#fafafa; }
.raw-iqc-results th:nth-child(1) { width:8%; }.raw-iqc-results th:nth-child(2) { width:9%; }.raw-iqc-results th:nth-child(3) { width:7%; }.raw-iqc-results th:nth-child(4) { width:12%; }.raw-iqc-results th:nth-child(5) { width:16%; }.raw-iqc-results th:nth-child(6) { width:11%; }.raw-iqc-results th:nth-child(7) { width:18%; }.raw-iqc-results th:nth-child(8) { width:9%; }.raw-iqc-results th:nth-child(9) { width:10%; }
.raw-iqc-report-results th:nth-child(1) { width:6%; }.raw-iqc-report-results th:nth-child(2) { width:13%; }.raw-iqc-report-results th:nth-child(3) { width:19%; }.raw-iqc-report-results th:nth-child(4) { width:15%; }.raw-iqc-report-results th:nth-child(5) { width:18%; }.raw-iqc-report-results th:nth-child(6) { width:18%; }.raw-iqc-report-results th:nth-child(7) { width:11%; }
.raw-iqc-choice-cell span { display:inline-block; margin:1px 2px; white-space:nowrap; }.raw-iqc-conclusion { display:grid; grid-template-columns:1.4fr 1fr; }.raw-iqc-conclusion > span { min-height:40px; padding:7px; border-right:1px solid #111; border-bottom:1px solid #111; font-size:8px; }.raw-iqc-conclusion > span:last-child { border-right:0; }
.raw-iqc-signatures { display:grid; grid-template-columns:1fr 1fr; }.raw-iqc-signatures span { min-height:38px; padding:8px; border-right:1px solid #111; font-size:9px; }.raw-iqc-signatures span:last-child { border-right:0; }.raw-iqc-signatures img { display:block; max-width:100px; max-height:30px; margin:3px auto 0; object-fit:contain; }
.rejected-material-workflow { margin-bottom:20px; border:1px solid #efb8c9; }.task-count-badge { padding:7px 11px; border-radius:999px; color:#a72f5c; background:#ffe8f0; font-size:12px; }
.package-iqc-entry-table { display:grid; gap:10px; margin-top:12px; }.package-iqc-entry-row { display:grid; grid-template-columns:72px minmax(150px,2fr) repeat(4,minmax(58px,.55fr)) minmax(90px,.8fr) minmax(90px,.8fr) minmax(150px,1.4fr); gap:8px; align-items:end; padding:10px; border:1px solid #f0cbd9; border-radius:12px; background:#fffafd; }.package-iqc-entry-row h4 { align-self:center; margin:0; color:#b7376a; }.package-iqc-entry-row label { min-width:0; }.package-iqc-entry-row input,.package-iqc-entry-row select { min-width:0; }.package-iqc-entry-table > label.full { display:grid; gap:6px; }
.raw-iqc-entry-table { display:grid; gap:10px; margin-top:12px; }.raw-iqc-entry-row { display:grid; grid-template-columns:95px minmax(150px,1.2fr) minmax(130px,.8fr) minmax(210px,1.7fr) minmax(100px,.7fr) minmax(100px,.7fr); gap:8px; align-items:end; padding:10px; border:1px solid #f0cbd9; border-radius:12px; background:#fffafd; }.raw-iqc-entry-row h4 { align-self:center; margin:0; color:#b7376a; }.raw-iqc-entry-row label { min-width:0; }.raw-iqc-entry-row input,.raw-iqc-entry-row select,.raw-iqc-entry-row textarea { min-width:0; }.raw-iqc-entry-row textarea { min-height:58px; }
@media(max-width:1450px) { .package-iqc-entry-row { grid-template-columns:72px repeat(4,minmax(70px,1fr)); }.package-iqc-entry-row .package-iqc-result,.package-iqc-entry-row .package-iqc-defect { grid-column:span 2; }.raw-iqc-entry-row { grid-template-columns:90px repeat(2,minmax(120px,1fr)); }.raw-iqc-entry-row .raw-iqc-record { grid-column:span 2; } }
@media(max-width:1050px) { .incoming-inspection-form-layout { display:block; }.incoming-inspection-form-layout > .incoming-inspection-preview-stack { position:static; max-height:none; margin:14px 0 20px; overflow:visible; }.incoming-inspection-sheet h2,.package-iqc-sheet h2,.raw-material-iqc-sheet h2 { font-size:18px; } }
@media(max-width:720px) { .inspection-preview-navigator div { grid-template-columns:1fr; }.raw-iqc-entry-row { grid-template-columns:1fr; }.raw-iqc-entry-row .raw-iqc-record { grid-column:auto; }.raw-iqc-meta-grid,.raw-report-meta-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.raw-iqc-meta-grid span,.raw-report-meta-grid span { grid-column:span 1!important; border-right:1px solid #111!important; }.raw-iqc-meta-grid span:nth-child(2n),.raw-report-meta-grid span:nth-child(2n) { border-right:0!important; } }
.tracked-order-card { margin:0 0 20px; overflow:hidden; border:1px solid #f0c3d4; border-radius:16px; background:linear-gradient(145deg,#fff8fb,#fff); box-shadow:0 10px 28px rgba(203,76,124,.08); }
.tracked-order-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 20px; border-bottom:1px solid #f3d8e2; background:#fff1f6; }
.tracked-order-head span { color:var(--green-2); font-size:11px; font-weight:800; letter-spacing:.12em; }
.tracked-order-head h3 { margin:3px 0 0; font-size:21px; }
.tracked-order-head i { padding:5px 10px; border-radius:999px; color:#9b3f65; background:#fff; font-size:11px; font-style:normal; }
.tracked-order-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; background:#f3dfe7; }
.tracked-order-item { min-width:0; padding:13px 16px; background:rgba(255,255,255,.96); }
.tracked-order-item--wide { grid-column:1 / -1; }
.tracked-order-item small,.tracked-order-item span { display:block; color:var(--muted); font-size:11px; }
.tracked-order-item strong { display:block; margin:4px 0 1px; font-size:14px; white-space:normal; overflow-wrap:anywhere; }
.tracked-sku-usage { padding:16px 20px; border-top:1px solid #f3d8e2; background:#fff; }
.tracked-sku-usage h4 { margin:0 0 8px; }
.tracked-sku-usage > p { margin:8px 0; color:var(--muted); font-size:12px; }
.tracked-sku-usage .data-table { min-width:640px; width:100%; table-layout:fixed; }
.tracked-sku-usage .data-table th,.tracked-sku-usage .data-table td { white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
.tracked-sku-usage .data-table th:last-child { width:26%; }
.engineer-bom-section { margin-top:18px; }
.engineer-bom-section .form-grid { align-items:start; }
.engineer-bom-table { margin:12px 0; border:1px solid #eadde7; border-radius:12px; }
.engineer-bom-table input,.engineer-bom-table select { min-width:110px; }
.engineer-bom-table td { min-width:150px; vertical-align:top; }
.engineer-bom-table td small { display:block; margin:5px 0 3px; color:#8a6d79; font-weight:700; }
.engineer-bom-table label { display:grid; gap:7px; margin-bottom:10px; }
.engineer-bom-table input:not([type=hidden]),.engineer-bom-table select { width:100%; box-sizing:border-box; border:1px solid #d9cbd1; border-radius:9px; padding:10px; font:inherit; background:#fff; }
.engineer-bom-table input[readonly] { background:#f5f8f6; }
.engineer-bom-status { margin:10px 0; color:#716873; font-size:12px; }
.engineer-bom-intro { font-size:13px; line-height:1.7; color:#847987; }
.engineer-bom-status summary,.engineer-material-summary summary { cursor:pointer; }
.engineer-material-summary { margin:18px 0 24px; border:1px solid #e6e2e9; border-radius:12px; overflow:hidden; background:#fff; }
.engineer-material-summary header { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 18px; }
.engineer-material-summary h3 { margin:0; font-size:16px; color:#352c3b; }
.engineer-material-summary header p,.engineer-material-summary header>span { margin:5px 0 0; font-size:12px; color:#847987; }
.engineer-demand-scroll { overflow-x:auto; }
dialog form .engineer-demand-table { width:100%; min-width:630px; border-collapse:collapse; table-layout:fixed; }
dialog form .engineer-demand-table th,dialog form .engineer-demand-table td { padding:12px 16px; border:0; border-top:1px solid #eeebf0; text-align:right; font-size:13px; vertical-align:top; font-variant-numeric:tabular-nums; }
dialog form .engineer-demand-table th { background:#f8f7fa; color:#786d7d; font-size:12px; font-weight:500; }
dialog form .engineer-demand-table th:first-child,dialog form .engineer-demand-table td:first-child { width:27%; text-align:left; }
dialog form .engineer-demand-table th:last-child,dialog form .engineer-demand-table td:last-child { width:24%; text-align:left; }
.engineer-demand-table td>small { display:block; margin-top:4px; font-size:11px; color:#938a98; overflow-wrap:anywhere; }
.engineer-demand-table td>strong { color:#493451; font-weight:650; white-space:nowrap; }
.engineer-demand-pending { font-size:12px; color:#958797; white-space:nowrap; }
.engineer-stock-empty { color:#847987; }
.engineer-demand-table summary { color:#7d598f; font-size:12px; }
.engineer-demand-breakdown { margin-top:10px; font-size:12px; }
.engineer-demand-breakdown p { margin:7px 0; overflow-wrap:anywhere; }
.engineer-demand-breakdown p:not(.engineer-demand-explanation) { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; }
.engineer-demand-breakdown b { white-space:nowrap; font-weight:500; }
.engineer-demand-explanation { color:#928194; line-height:1.6; }
.engineer-material-summary footer { padding:12px 18px; border-top:1px solid #eeebf0; font-size:11px; line-height:1.6; color:#918593; }
@media(max-width:600px) {
  .engineer-material-summary header { align-items:flex-start; flex-direction:column; gap:4px; padding:14px; }
  .engineer-material-summary footer { padding:12px 14px; }
  dialog form .engineer-demand-table { min-width:0; display:block; }
  .engineer-demand-table thead { display:none; }
  .engineer-demand-table tbody { display:block; }
  .engineer-demand-table tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:12px 14px; gap:12px 6px; border-top:1px solid #eeebf0; }
  dialog form .engineer-demand-table td { display:block; padding:0; border:0; text-align:left; }
  dialog form .engineer-demand-table td:first-child,dialog form .engineer-demand-table td:last-child { width:auto; grid-column:1 / -1; }
  .engineer-demand-table [data-bom-demand]::before,.engineer-demand-table [data-bom-stock]::before,.engineer-demand-table [data-bom-shortage]::before { display:block; margin-bottom:6px; font-size:11px; color:#847987; }
  .engineer-demand-table [data-bom-demand]::before { content:'SKU 需求合计'; }
  .engineer-demand-table [data-bom-stock]::before { content:'仓库可用'; }
  .engineer-demand-table [data-bom-shortage]::before { content:'建议补购'; }
  .engineer-demand-table td>strong { white-space:normal; overflow-wrap:anywhere; }
}
@media(max-width:600px) {
  .engineer-bom-table table,.engineer-bom-table tbody,.engineer-bom-table tr,.engineer-bom-table td { display:block; width:100%; min-width:0; box-sizing:border-box; }
  .engineer-bom-table thead { display:none; }
  .engineer-bom-table tr { padding:12px; border-bottom:2px solid #eadde7; }
  .engineer-bom-table td { padding:8px 0; }
  .engineer-bom-table .inline-inputs { min-width:0; }
}
#quickDialog details[data-sku-technical] { margin:20px 0; padding:22px; border:1px solid #eadde7; border-radius:18px; background:#fff; }
#quickDialog details[data-sku-technical] > summary { cursor:pointer; color:#493643; font-size:16px; }
#quickDialog details[data-sku-technical] > .form-grid { margin-top:20px; }
#quickDialog [data-sku-guide] { padding:20px; margin:16px 0; border:1px solid #eadde7; border-radius:16px; background:#fff9fc; }
#quickDialog [data-rd-material-preview] { margin-top:10px; white-space:normal; overflow-wrap:anywhere; }
.sku-technical-dialog { width:min(1500px,96vw); max-width:96vw; height:92vh; max-height:92vh; padding:0; border:1px solid #eadde7; border-radius:22px; overflow:hidden; color:#352a32; background:#fff; }
.sku-technical-dialog::backdrop { background:rgba(35,25,38,.55); backdrop-filter:blur(3px); }
.sku-technical-dialog > form { height:100%; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto; margin:0; }
.sku-editor-head { display:flex; justify-content:space-between; align-items:start; gap:20px; padding:20px 28px; border-bottom:1px solid #eadde7; }
.client-update-notice { position:fixed; right:24px; bottom:24px; z-index:1200; width:min(420px,calc(100vw - 32px)); box-sizing:border-box; padding:20px; background:#fff; color:#422e3a; border:1px solid #e6c5d6; border-radius:18px; box-shadow:0 12px 44px #30202f28; }
.client-update-notice p,.client-update-notice small { display:block; margin:10px 0; line-height:1.6; color:#76616d; }
.client-update-notice small:empty { display:none; }
@media print { .client-update-notice { display:none!important; } }
.sku-editor-head small { color:#ac3868; letter-spacing:.1em; }
.sku-editor-head h2 { margin:6px 0; font-size:23px; }
.sku-editor-head p,.sku-editor-footer span { color:#82747d; font-size:13px; margin:0; }
.sku-editor-layout { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); min-height:0; }
.sku-editor-preview,.sku-editor-fields { min-width:0; overflow:auto; padding:24px; }
.sku-editor-preview { background:#f3f1f4; border-right:1px solid #eadde7; }
.sku-preview-paper { padding:26px; background:#fff; box-shadow:0 5px 24px #352a3210; min-height:100%; }
.sku-preview-paper h2 { text-align:center; font-size:23px; margin:18px 0; }
.sku-preview-paper small { font-size:12px; color:#82747d; }
.sku-preview-paper dl { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:22px; }
.sku-preview-paper dt { color:#82747d; font-size:12px; }
.sku-preview-paper dd { margin:5px 0 0; overflow-wrap:anywhere; }
.sku-preview-paper table { width:100%; border-collapse:collapse; font-size:12px; }
.sku-preview-paper th,.sku-preview-paper td { border:1px solid #d9d2d7; padding:9px; overflow-wrap:anywhere; }
.sku-preview-paper th { background:#f7f5f7; }
.sku-preview-paper p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; min-height:60px; }
.sku-preview-paper h3 { font-size:15px; margin-top:24px; border-bottom:1px solid #ded7dc; padding-bottom:10px; }
.sku-editor-fields .form-grid { gap:18px; }
.sku-editor-fields .form-grid > .full { grid-column:1 / -1; min-width:0; }
.sku-editor-fields [data-sku-demand-source] { padding:16px; border:1px solid #eadde7; border-radius:14px; }
.sku-editor-fields [data-sku-demand-source] p { margin:0; }
.sku-editor-fields .sku-recipe-panel { grid-column:1 / -1; min-width:0; margin:8px 0; padding:16px; border:1px solid #eadde7; border-radius:14px; }
.sku-recipe-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; gap:10px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid #eee; }
.sku-recipe-row label:has([data-sku-recipe-code]) { grid-column:1 / -1; }
.sku-source-note { font-size:13px; color:#66515e; margin-bottom:16px; }
.sku-source-pages { zoom:var(--sku-sheet-scale,1); }
.sku-preview-fullsize .sku-source-pages { zoom:1; }
.sku-source-page { margin-bottom:28px; background:white; color:black; }
.sku-source-page p { font-size:18px; padding:12px; }
.sku-source-page table { table-layout:fixed; border-collapse:collapse; }
.sku-source-page td { padding:3px; white-space:pre-wrap!important; overflow-wrap:anywhere!important; }
.sku-recipe-row input { min-width:0; width:100%; }
.sku-recipe-row button { margin-top:25px; }
.sku-recipe-panel output { display:block; margin-top:16px; font-weight:700; color:#a83768; }
.sku-editor-footer { display:flex; align-items:center; justify-content:flex-end; gap:12px; padding:16px 24px; border-top:1px solid #eadde7; background:#fff; }
.sku-editor-footer span { margin-right:auto; max-width:60%; }
@media(max-width:900px) {
  .sku-editor-layout { grid-template-columns:1fr; overflow:auto; }
  .sku-editor-preview,.sku-editor-fields { overflow:visible; padding:16px; }
  .sku-editor-preview { border-right:0; border-bottom:1px solid #eadde7; }
  .sku-editor-footer { flex-wrap:wrap; padding:12px; }
  .sku-editor-footer span { max-width:none; width:100%; }
}
.engineer-bom-table .inline-inputs { display:flex; align-items:center; gap:6px; min-width:220px; }
.engineer-bom-table .inline-inputs input,.engineer-bom-table .inline-inputs select { min-width:0; flex:1; }
.engineer-add-material { margin-top:2px; }
@media(max-width:1000px) { .tracked-order-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .tracked-order-head { align-items:flex-start; flex-direction:column; }.tracked-order-grid { grid-template-columns:1fr; } }
.form-draft-status { align-self: center; margin-right: auto; color: var(--muted); font-size: 12px; }
.form-draft-status[data-tone="saved"] { color: #476f61; }
.form-draft-status[data-tone="pending"] { color: #8a692c; }
.form-draft-status[data-tone="error"] { color: #a34456; }
.form-draft-recovery { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:12px 0; padding:12px 14px; border:1px solid #efc56a; border-radius:14px; background:#fff9e9; color:#5f4515; }
.form-draft-recovery>div:first-child { display:grid; gap:3px; }
.form-draft-recovery small { color:#806832; }
.form-draft-recovery>div:last-child { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.form-draft-recovery button { min-height:38px; padding:7px 13px; }
@media (max-width:760px) {
  .form-draft-recovery { align-items:stretch; flex-direction:column; }
  .form-draft-recovery>div:last-child { justify-content:stretch; }
  .form-draft-recovery button { flex:1 1 auto; }
}
.draft-choice-layer { width: min(520px,calc(100% - 32px)); max-width: none; padding: 0; border: 0; overflow: visible; background: transparent; box-shadow: none; }
.draft-choice-layer::backdrop { background: rgba(24,12,31,.58); backdrop-filter: blur(4px); }
.draft-choice-card { width: min(480px,100%); padding: 24px; border: 1px solid rgba(77,49,92,.18); border-radius: 18px; background: #fff; box-shadow: 0 28px 90px rgba(24,12,31,.32); }
.draft-choice-card small { color: var(--green-2); letter-spacing: .16em; }
.draft-choice-card h3 { margin: 6px 0 10px; font: 700 24px Georgia, serif; color: #24182b; }
.draft-choice-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.draft-choice-card > div { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.draft-choice-card button { min-height: 40px; }
.danger-soft { border: 1px solid #d7a8b2; border-radius: 8px; padding: 9px 14px; color: #8d3548; background: #fff3f5; }
.detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 22px; }
.detail-summary > div { min-width: 0; padding: 12px; border-radius: 9px; background: #f4f7f5; }
.detail-summary span, .detail-summary strong { display: block; }
.detail-summary span { margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.detail-summary strong { overflow: hidden; text-overflow: ellipsis; }
.business-detail { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 18px 0 22px; }
.business-detail > div { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfa; }
.business-detail span, .business-detail strong { display: block; }
.business-detail span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.business-detail strong { white-space: pre-wrap; overflow-wrap: anywhere; }
.org-panel { overflow: hidden; }
.org-chart { padding: 20px 12px 10px; text-align: center; }
.org-tools { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.org-node { width: 190px; margin: 0 auto; padding: 14px 18px; border-radius: 12px; color: #fff; background: var(--green); font-weight: 700; box-shadow: var(--shadow); cursor: pointer; list-style: none; }
.org-node::-webkit-details-marker, .org-department summary::-webkit-details-marker { display: none; }
.org-node strong { display: block; margin-top: 3px; color: #d7e9e1; font-size: 11px; }
.org-node i { display: inline-block; margin-left: 8px; font-style: normal; transition: transform .2s ease; }
.org-trunk:not([open]) > .org-node i, .org-department:not([open]) summary i { transform: rotate(-90deg); }
.org-node.top { background: #173d31; }
.org-node.executive { background: var(--green-2); }
.org-line { width: 2px; height: 25px; margin: 0 auto; background: #a9bdb4; }
.org-branches { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.org-branches::before { content: ""; position: absolute; top: -18px; left: 16.66%; right: 16.66%; height: 1px; background: #a9bdb4; }
.org-department { position: relative; min-height: 66px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; text-align: left; transition: border-color .2s ease, box-shadow .2s ease; }
.org-department[open] { border-color: #a9bdb4; box-shadow: 0 8px 20px rgba(26, 69, 55, .08); }
.org-department::before { content: ""; position: absolute; top: -19px; left: 50%; width: 1px; height: 18px; background: #a9bdb4; }
.org-department summary { min-height: 66px; display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 12px; cursor: pointer; list-style: none; }
.org-department summary span { color: var(--ink); font-weight: 650; }
.org-department summary strong { color: var(--green-2); font-size: 11px; white-space: nowrap; }
.org-department summary i { color: var(--muted); font-style: normal; transition: transform .2s ease; }
.org-projects { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 13px; }
.org-projects small { width: 100%; color: var(--muted); }
.org-projects span { padding: 4px 7px; border-radius: 12px; color: #315b4d; background: #e8f1ed; font-size: 10px; }
.org-independent { width: min(360px, 90%); margin: 22px auto 0; padding: 11px 15px; border: 1px dashed #b68743; border-radius: 10px; color: #704c1f; background: #fff9ef; }
.org-independent strong, .org-independent span { display: block; }
.org-independent span { margin-top: 3px; font-size: 10px; }
.compliance-warning { margin-bottom: 16px; padding: 14px 16px; border: 1px solid #e5d2b4; border-radius: 10px; color: #6d4d22; background: #fff9ef; }
.compliance-warning p { margin: 4px 0 0; }
.compliance-blocker { margin-bottom: 12px; padding: 15px 17px; border: 1px solid #d8a8a1; border-left: 4px solid var(--red); border-radius: 10px; color: #793a34; background: #fff5f3; }
.compliance-blocker strong { display: block; }
.compliance-blocker p { margin: 5px 0 0; }
.compliance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.compliance-card { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; padding: 14px; text-align: left; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.compliance-card > i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-style: normal; }
.compliance-card.covered > i { color: #fff; background: var(--green-2); }
.compliance-card.missing { border-color: #ead7c7; background: #fffdf9; }
.compliance-card.missing > i { color: #fff; background: #b97843; }
.compliance-card strong, .compliance-card span { display: block; }
.compliance-card p { margin: 4px 0 7px; color: var(--muted); font-size: 10px; }
.compliance-card span { color: var(--green-2); font-size: 10px; }
.compliance-card.missing span { color: #9a5f30; }
.compliance-card > b { color: #9aa69f; font-size: 19px; }
.settings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 18px; }
.setting-card { min-height: 112px; padding: 16px; display: grid; grid-template-columns: 40px 1fr auto; gap: 11px; align-items: start; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.setting-card:hover { border-color: #91ad9f; box-shadow: var(--shadow); transform: translateY(-1px); }
.setting-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--green); background: var(--mint); font-size: 18px; }
.setting-card strong { display: block; margin-top: 2px; color: var(--ink); }
.setting-card strong em { margin-left: 6px; padding: 2px 6px; border-radius: 8px; color: #8b5420; background: #f6e8d6; font-size: 9px; font-style: normal; font-weight: 650; }
.setting-card p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.setting-card b { color: #9aa69f; font-size: 21px; font-weight: 400; }
.setting-card.sensitive { border-color: #eadbc9; background: #fffdf9; }
.setting-card.sensitive .setting-icon { color: #825824; background: #f6ead9; }
.settings-section-head { display: flex; align-items: end; justify-content: space-between; margin: 20px 0 10px; }
.settings-section-head:first-of-type { margin-top: 0; }
.settings-section-head h2 { margin: 0; font: 700 17px Georgia, "Songti SC", serif; }
.settings-section-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.settings-section-head > span { color: var(--green); font-weight: 650; }
.business-settings { margin-bottom: 24px; }
.settings-history { margin-top: 0 !important; }
.data-panel.flat { border: 0; border-radius: 0; }
.security-note { margin: 20px 0; padding: 17px; border: 1px solid #e8dbc3; border-radius: 10px; background: #fff9ef; }
.security-note strong { color: #76541f; }
.security-note p { margin: 6px 0 0; color: #705f47; }
.account-code,.generated-account { color:#5f3970; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.03em; }
.generated-account { display:block; padding:11px 13px; border:1px dashed #bba7c3; border-radius:8px; background:#faf7fb; }
.captcha-code { display:inline-block; margin-top:12px; padding:10px 18px; border:1px solid #c9b1d1; border-radius:8px; color:#4f2860; background:repeating-linear-gradient(-12deg,#f8f1fa,#f8f1fa 7px,#eee2f1 8px,#eee2f1 9px); font:800 24px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.28em; user-select:none; }
.row-actions button.danger { color:#953e47; border-color:#dfb9be; background:#fff8f8; }
.check-list { margin-top: 20px; }
.check-list > div { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.check-list i { width: 29px; height: 29px; display: grid; place-items: center; flex: none; border-radius: 50%; font-style: normal; }
.check-list span, .check-list strong, .check-list small { display: block; }
.check-list small { color: var(--muted); }
.checking { background: #e8eeeb; }
.check-ok { color: #fff; background: var(--green-2); }
.check-bad { color: #fff; background: var(--red); }
.section-title { margin: 0 0 12px; font-size: 14px; }
.timeline { padding-left: 5px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding-bottom: 18px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: -1px; width: 1px; background: #cbd8d2; }
.timeline-item > i { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 4px; border: 2px solid #fff; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 1px #8fb1a2; }
.timeline-item strong, .timeline-item span { display: block; }
.timeline-item span { color: var(--muted); font-size: 10px; }
.timeline-item p { margin: 6px 0 0; padding: 8px 10px; border-radius: 7px; background: #f5f7f6; font-size: 11px; }
.signature-notice { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; color: #65512f; background: #fff8e9; }
.signature-field > span { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 650; }
.form-grid > .signature-field.full { grid-column:1 / -1; min-width:0; }
.signature-pad { display: block; width: 100%; height: 150px; border: 1px dashed #78968a; border-radius: 10px; background: linear-gradient(#fff,#fbfdfc); touch-action: none; cursor: crosshair; }
.signature-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; color: var(--muted); }
.signature-tools button { min-height: 32px; }
.audit-signature { display: flex; align-items: center; gap: 12px; width: min(520px,100%); margin: 8px 0; padding: 8px; border: 1px solid #dce7e2; border-radius: 9px; background: #fbfdfc; }
.audit-signature img { width: 128px; height: 54px; object-fit: contain; border-right: 1px solid #e4eae7; }
.audit-signature b,.audit-signature small { display: block; }
.audit-technical { width:min(560px,100%); margin-top:7px; color:var(--muted); font-size:10px; }
.audit-technical summary { width:max-content; max-width:100%; cursor:pointer; color:#66516f; font-weight:650; }
.audit-technical small { margin-top:4px; overflow-wrap:anywhere; }
.form-grid input[readonly] { color: #5d6b65; background: #eef2ef; }
.formula-entry-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; align-items:end; padding:12px; margin-bottom:10px; border:1px solid #e1e7e4; border-radius:10px; background:#f8faf9; }
.formula-entry-row label { min-width:0; }
.formula-entry-row label:nth-child(3) { grid-column:1 / -1; }
.formula-entry-row label > span { display:block; margin-bottom:5px; color:#4f5c57; font-size:12px; font-weight:650; }
.formula-entry-row input,.formula-entry-row select { width:100%; border:1px solid #d5dcd8; border-radius:8px; padding:9px 10px; background:#fff; }
.formula-entry-row input[readonly] { background:#eef2ef; color:#5d6b65; }
.submission-signature { position: relative; padding: 10px; border: 1px dashed #78968a; border-radius: 10px; background: #fff; }
.submission-signature-stage { position: relative; }
.submission-signature-canvas { display: block; width: 100%; height: 180px; border-radius: 7px; background: linear-gradient(to bottom,transparent 74%,#e8eeeb 75%,transparent 76%); cursor: crosshair; touch-action: none; }

.compounding-controlled-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:22px; padding:28px 32px; border:1px solid #f1bfd2; border-radius:24px; background:linear-gradient(135deg,#fff8fb,#fff); box-shadow:0 16px 40px rgba(211,75,125,.08); }
.compounding-controlled-hero small { color:#d4477a; font-weight:800; letter-spacing:.08em; }
.compounding-controlled-hero h2 { margin:8px 0; font-size:clamp(24px,2.5vw,38px); }
.compounding-controlled-hero p { margin:0; color:#64706c; max-width:980px; line-height:1.75; }
.compounding-controlled-hero > strong { flex:0 0 auto; color:#d4477a; font-size:30px; white-space:nowrap; }
.compounding-step-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-bottom:20px; }
.compounding-step-card { display:grid; grid-template-columns:64px 1fr; gap:18px; width:100%; min-height:220px; padding:24px; text-align:left; border:1px solid #efc4d4; border-radius:22px; background:#fff; box-shadow:0 12px 30px rgba(139,62,91,.07); transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.compounding-step-card:hover { transform:translateY(-3px); border-color:#e55b8d; box-shadow:0 18px 38px rgba(139,62,91,.13); }
.compounding-step-card > span { display:grid; place-items:center; width:58px; height:58px; border-radius:18px; color:#fff; background:linear-gradient(135deg,#ee6b9a,#d83e78); font:800 27px/1 sans-serif; }
.compounding-step-card small,.compounding-step-card p,.compounding-step-card em { display:block; }
.compounding-step-card small { min-height:42px; color:#8a6d79; font-weight:700; }
.compounding-step-card strong { display:block; margin:8px 0; font-size:25px; color:#252021; }
.compounding-step-card p { min-height:56px; margin:0 0 16px; color:#66706d; line-height:1.55; }
.compounding-step-card em { color:#d4477a; font-style:normal; font-weight:800; }
@media (max-width:1000px) { .compounding-step-grid { grid-template-columns:1fr; } .compounding-step-card { min-height:0; } .compounding-controlled-hero { align-items:flex-start; flex-direction:column; } }
.submission-signature-preview { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 180px; object-fit: fill; border-radius: 7px; pointer-events: none; }
.submission-signature-preview[hidden] { display: none; }
.submission-signature .signature-hint { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; color: #9aa8a2; pointer-events: none; }
.submission-signature.signed .signature-hint { display: none; }
.submission-signature-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 8px 5px 0; }.submission-signature-tools>div { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.submission-signature-status { color: #71817a; pointer-events: none; }
.submission-signature.signed .submission-signature-status { color: #276a51; }
.submission-signature-tools button { position: static; min-height: 32px; background: #fff; }
.signature-safety-note { display:block; padding:4px 5px 0; color:#7a8580; line-height:1.5; }.signature-preview span small,.audit-signature small { display:block; margin-top:4px; color:#6f7b76; font-weight:500; }
.signature-preview { width: min(280px,100%); display: block; margin: 8px 0; padding: 8px; border: 1px solid #dce7e2; border-radius: 9px; color: var(--green); background: #fff; text-decoration: none; }
.signature-preview img { display: block; width: 100%; height: 76px; object-fit: contain; }
.signature-preview span { margin-top: 5px; overflow-wrap: anywhere; }
.legacy-signature { display: block; margin: 5px 0; color: #9a6532; }
.approval-signature-tools>div { display:flex; flex-wrap:wrap; gap:7px; }
.approval-signature-workspace.has-project-context { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(260px,.75fr); gap:14px; align-items:start; }
.approval-signature-main { min-width:0; }
.approval-signature-context { position:sticky; top:8px; padding:14px; border:1px solid #efbfd0; border-radius:11px; background:linear-gradient(145deg,#fff7fa,#fff); box-shadow:0 8px 24px rgba(190,48,96,.08); }
.approval-signature-context>small { color:#c13b68; font-weight:900; }
.approval-signature-context h3 { margin:5px 0 12px; color:#352b30; font-size:17px; overflow-wrap:anywhere; }
.approval-signature-context dl { display:grid; gap:8px; margin:0; }
.approval-signature-context dl>div { padding-bottom:7px; border-bottom:1px solid #f1e1e7; }
.approval-signature-context dt { color:#8a747d; font-size:9px; }
.approval-signature-context dd { margin:2px 0 0; color:#3b3236; font-size:11px; font-weight:800; overflow-wrap:anywhere; }
.approval-signature-materials { display:grid; gap:5px; max-height:180px; margin-top:10px; padding:9px; overflow:auto; border-radius:8px; background:#fff0f5; }
.approval-signature-materials strong { color:#af355f; font-size:10px; }
.approval-signature-materials span { color:#55464c; font-size:9px; overflow-wrap:anywhere; }
.approval-signature-history { margin-top:10px; padding:10px; border:1px solid #f0ccd9; border-radius:10px; background:#fff8fb; }
.approval-signature-history>strong,.approval-signature-history>span { display:block; color:#735b65; font-size:10px; }
.approval-signature-history>header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.approval-signature-history>header strong { color:#735b65; font-size:10px; }
.approval-signature-history>header button { min-height:30px; padding:5px 9px; font-size:9px; }
.approval-signature-history>div { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:8px; margin-top:8px; }
.approval-signature-history article { display:grid; grid-template-columns:1fr auto; gap:6px; align-items:stretch; }
.approval-signature-history article>[data-use-approval-signature] { display:grid; grid-template-columns:1fr auto; gap:3px 8px; align-items:center; min-height:84px; padding:8px; border:1px solid #efc6d5; background:#fff; text-align:left; }
.approval-signature-history article>[data-use-approval-signature]:hover { border-color:#df668f; background:#fff2f7; }
.approval-signature-history .approval-signature-delete { min-width:48px; padding:6px; border:1px solid #efc6d5; background:#fff5f7; color:#b32652; font-size:9px; }
.approval-signature-history .approval-signature-delete:hover { border-color:#c83f69; background:#ffe7ee; }
.approval-signature-history img { grid-column:1/-1; width:100%; height:48px; object-fit:contain; border-bottom:1px solid #f2e2e8; }
.approval-signature-history button span { color:#78666d; font-size:8px; }
.approval-signature-history button b { color:#c13867; font-size:9px; }
@media(max-width:900px) { .approval-signature-workspace.has-project-context { grid-template-columns:1fr; }.approval-signature-context { position:static; } }
.toast { position: fixed; inset:auto 24px 24px auto; z-index:2147483647; width:min(410px,calc(100vw - 32px)); max-width:410px; margin:0; padding:14px 17px; border:1px solid rgba(255,255,255,.2); border-radius:11px; color:#fff; background:#4b245b; box-shadow:0 18px 55px rgba(34,15,43,.34); opacity:0; transform:translateY(15px); pointer-events:none; transition:opacity .2s ease,transform .2s ease; }
.toast::backdrop { display:none; }
.toast[data-tone="success"] { background:#4b245b; box-shadow:0 18px 55px rgba(34,15,43,.34); }
.toast[data-tone="error"] { background:#a52f3f; border-color:rgba(255,222,226,.55); box-shadow:0 18px 55px rgba(112,20,35,.4); }
.toast.show { opacity: 1; transform: translateY(0); pointer-events:auto; }
.toast.dismiss-immediate { opacity:0!important; transform:none!important; transition:none!important; pointer-events:none!important; }
.toast strong,.toast span,.toast small { display:block; }
.toast strong { margin-bottom:4px; font-size:14px; }
.toast span { line-height:1.55; }
.toast small { margin-top:5px; color:#eadced; line-height:1.45; }
.toast[data-tone="error"] small { color:#ffe0e4; }
.auth-gate[hidden] { display: none; }
.auth-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: #f2f5f3; }
.auth-card { width: min(420px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(20,55,43,.14); }
.auth-card img { display: block; width: 190px; height: 58px; margin: 0 auto 24px; object-fit: contain; }
.auth-card h1 { margin: 0; text-align: center; font: 700 24px Georgia, "Songti SC", serif; }
.auth-card > p { margin: 8px 0 24px; color: var(--muted); text-align: center; line-height: 1.7; }
.website-return { display:inline-block; padding:10px 12px; font-size:14px; color:var(--ink); text-decoration:none; white-space:nowrap; }
.website-return:hover { text-decoration:underline; }
.website-return:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.auth-card > .website-return { display:block; text-align:center; margin-top:12px; }
.auth-card label { display: block; margin-top: 14px; }
.auth-card label[hidden] { display: none; }
.auth-card label span { display: block; margin-bottom: 6px; color: var(--ink); font-size: 12px; font-weight: 650; }
.auth-card input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.auth-card button { width: 100%; margin-top: 22px; padding: 12px; border: 0; border-radius: 9px; color: #fff; background: var(--green); font-weight: 700; }

.metric-clickable { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.metric-clickable:hover, .metric-clickable:focus { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(24, 31, 36, .1); outline: 2px solid rgba(21, 82, 69, .18); }

.regulatory-guidance { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 14px 0 18px; }
.regulatory-guidance>div { background: #f4f7f5; border: 1px solid #dfe9e4; border-radius: 10px; padding: 12px; }
.regulatory-guidance b { color: #155245; font-size: 12px; }
.regulatory-guidance p { margin: 6px 0 0; line-height: 1.65; font-size: 13px; }
.template-field-list,.check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.template-field-list span,.check-grid label,.check-list.compact label { display: flex; gap: 8px; align-items: flex-start; padding: 9px; border: 1px solid #e3e9e6; border-radius: 8px; background: #fff; }
.template-field-list b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: #e7f0ec; color: #155245; }
.check-list.compact { max-height: 230px; overflow: auto; display: grid; gap: 6px; }
.check-list.compact span { display: grid; gap: 2px; font-size: 13px; }
@media (max-width: 720px) { .regulatory-guidance,.template-field-list,.check-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .formula-entry-row { grid-template-columns:1fr 1fr; } .formula-entry-row label:nth-child(3) { grid-column:1 / -1; } }
.personal-home-card { max-width:980px; display:grid; gap:18px; padding:24px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow); }
.personal-home-identity { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.personal-home-avatar { width:62px; height:62px; display:grid; place-items:center; border-radius:20px; color:#fff; background:linear-gradient(135deg,#ef7da3,#d84070); box-shadow:0 9px 24px rgba(218,73,119,.22); font-size:24px; font-weight:760; }
.personal-home-identity small,.personal-home-identity p { color:var(--muted); }.personal-home-identity h2 { margin:3px 0; font-size:24px; }.personal-home-identity p { margin:0; font-size:12px; }
.personal-home-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.personal-home-grid>div { min-height:82px; padding:14px 16px; border:1px solid #efe0e7; border-radius:13px; background:#fffbfd; }
.personal-home-grid span { display:block; margin-bottom:7px; color:var(--muted); font-size:11px; }.personal-home-grid strong { font-size:14px; line-height:1.55; }
@media (max-width:720px) { .personal-home-grid { grid-template-columns:1fr; }.personal-home-identity { grid-template-columns:auto minmax(0,1fr); }.personal-home-identity>i { grid-column:1/-1; justify-self:start; } }
.auth-card > strong { display: block; min-height: 20px; margin-top: 10px; color: var(--red); text-align: center; }
.unread-note { padding: 12px; border-radius: 8px; color: #8a6844; background: #fff8ed; }
.smart-radar { margin-top: 18px; padding: 20px; border: 1px solid #cddbd5; border-radius: 15px; background: linear-gradient(135deg, #f8fcfa, #fff); box-shadow: 0 10px 30px rgba(29,71,56,.06); }
.smart-radar-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.smart-kicker { color: var(--green-2); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.smart-radar h2 { margin: 5px 0 3px; font: 700 20px Georgia, "Songti SC", serif; }
.smart-radar-head p { margin: 0; color: var(--muted); font-size: 11px; }
.smart-score { width: 88px; height: 88px; display: grid; place-content: center; flex: none; border: 7px solid #73a28e; border-radius: 50%; text-align: center; background: #fff; }
.smart-score.attention { border-color: #d5a35e; }.smart-score.danger { border-color: #c96c61; }
.smart-score strong, .smart-score span { display: block; }.smart-score strong { font-size: 25px; }.smart-score span { color: var(--muted); font-size: 9px; }
.smart-stats { display: flex; align-items: center; gap: 9px; margin: 17px 0 10px; padding-top: 13px; border-top: 1px solid var(--line); }
.smart-stats span { padding: 6px 10px; border-radius: 15px; background: #edf4f1; font-size: 10px; }.smart-stats b { color: var(--green); }
.smart-stats small { margin-left: auto; color: var(--muted); }
.smart-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.smart-item { display: grid; grid-template-columns: 31px 1fr auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-left: 3px solid #d5a35e; border-radius: 9px; background: #fff; }
.smart-item.critical { border-left-color: #c96c61; background: #fffafa; }.smart-item > i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #855a21; background: #fff3df; font-style: normal; font-weight: 800; }
.smart-item.critical > i { color: #8c3932; background: #fde9e7; }.smart-item span, .smart-item strong { display: block; }.smart-item span { color: var(--muted); font-size: 9px; }.smart-item strong { margin: 2px 0; }
.smart-item p { margin: 0; color: #58655f; font-size: 10px; line-height: 1.5; }.smart-item button { border: 0; color: var(--green-2); background: transparent; white-space: nowrap; font-size: 10px; }
.duty-notice { margin-bottom: 15px; padding: 14px 16px; border: 1px solid #d9ccb7; border-radius: 10px; color: #654d2f; background: #fffaf1; }.duty-notice p { margin: 4px 0 0; line-height: 1.6; }
.duty-list { display: grid; gap: 10px; }.duty-card { display: grid; grid-template-columns: 120px 1fr 150px; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-left: 4px solid #d4a55e; border-radius: 11px; background: #fff; }.duty-card.done { border-left-color: var(--green-2); background: #fbfefc; }
.duty-frequency { text-align: center; }.duty-frequency strong, .duty-frequency span { display: block; }.duty-frequency strong { font-size: 16px; }.duty-frequency span { margin-top: 5px; color: var(--muted); font-size: 9px; }
.duty-body small { color: var(--green-2); }.duty-body h3 { margin: 4px 0; font-size: 14px; }.duty-body p { margin: 0; color: #58655f; font-size: 11px; line-height: 1.6; }.duty-evidence { margin-top: 7px; color: #6b5a43; font-size: 10px; }.duty-evidence b { margin-right: 6px; }
.duty-assignment { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; align-items: center; margin-top: 10px; padding: 9px 11px; border: 1px solid #c9d9d1; border-radius: 8px; background: #f4f8f6; }.duty-assignment b { grid-row: span 3; color: var(--green-2); font-size: 10px; }.duty-assignment strong { color: var(--green); font-size: 12px; }.duty-assignment span,.duty-assignment small { color: var(--muted); font-size: 10px; }.duty-assignment p { grid-column: 2; margin-top: 2px; }.duty-assignment.unassigned { border-style: dashed; background: #fbfaf7; }.duty-assignment.unassigned b { grid-row: auto; color: #9b661e; }.duty-assignment.unassigned span { grid-column: 2; }
.duty-action { display: grid; gap: 6px; justify-items: stretch; }.duty-action i { color: var(--green-2); font-style: normal; font-weight: 700; }.duty-action i.pending { color: #9b661e; }.duty-action i.trigger { color: #686f6c; }.duty-action small { color: var(--muted); }.duty-action button { padding: 7px 9px; border: 1px solid #b9cbc3; border-radius: 7px; color: var(--green); background: #fff; font-size: 10px; }.duty-action button.text-action { padding: 2px; border: 0; text-align: left; }
.record-tools button { padding: 9px 11px; border: 1px solid #c7d4ce; border-radius: 8px; color: var(--green); background: #fff; white-space: nowrap; }.controlled-edit-note { margin-bottom: 12px; padding: 10px 13px; border-left: 3px solid var(--green-2); color: #51615a; background: #f2f7f5; font-size: 10px; }
.record-tools .request-kind { border-color:#765184; color:#fff; background:#624170; font-weight:700; }.record-tools .request-kind.item { border-color:#8b6a96; background:#795584; }.record-tools .request-kind.equipment { border-color:#927640; background:#8a713f; }
.permission-groups { margin-bottom: 18px; }.permission-group-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }.permission-group-grid>div { padding: 12px; border: 1px solid #e4dbea; border-radius: 9px; background: #fbf8fc; }.permission-group-grid strong,.permission-group-grid span,.permission-group-grid small { display: block; }.permission-group-grid span { margin-top: 4px; color: #61426d; }.permission-group-grid small { color: var(--muted); }.permission-module-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; }.permission-module-summary span { padding: 5px 9px; border-radius: 12px; color: #60476a; background: #f0e8f3; font-size: 10px; }.permission-module-summary b { margin-right: 5px; }.permission-table .permission-allowed { background: #f8fcf9; }.permission-table .permission-denied { color: #7e8581; background: #fafafa; }.permission-state { color: #8a9290; }.permission-allowed .permission-state { color: #28704f; }.scope-badge { display: inline-block; padding: 2px 7px; border-radius: 10px; color: #765018; background: #fff2d9; font-size: 9px; font-style: normal; }.scope-badge.line { color: #4b3974; background: #eee8fa; }

.flow-command { display:grid; grid-template-columns:minmax(0,1fr); gap:18px; align-items:start; margin-bottom:16px; padding:22px 24px; overflow:hidden; border-radius:15px; color:#fff; background:linear-gradient(135deg,#2f173c,#5d386d); box-shadow:0 14px 36px rgba(53,25,67,.18); }
.flow-command>div:first-child { min-width:0; max-width:100%; }
.flow-command .head-tools { width:100%; max-width:100%; margin:0; justify-content:flex-end; }
.flow-command small { color:#d9bfdc; letter-spacing:.16em; }.flow-command h2 { margin:5px 0; font:700 23px Georgia,"Songti SC",serif; }.flow-command p { margin:0; max-width:100%; overflow-wrap:anywhere; color:#eadfea; font-size:12px; }.flow-command button { flex:0 1 auto; max-width:100%; white-space:normal; }
.flow-responsibility { margin:0 0 16px; padding:14px 16px; border:1px solid #ded2e2; border-radius:13px; background:#fff; }.flow-responsibility summary { display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; color:#563461; font-weight:700; list-style:none; }.flow-responsibility summary::-webkit-details-marker { display:none; }.flow-responsibility summary::after { content:"展开 ↓"; color:#85648f; font-size:10px; font-weight:600; }.flow-responsibility[open] summary::after { content:"收起 ↑"; }.flow-matrix { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }.flow-matrix>div { display:grid; grid-template-columns:100px 1fr; gap:3px 10px; padding:10px 12px; border-radius:9px; background:#f8f5f9; }.flow-matrix strong { grid-row:1/3; color:#694578; }.flow-matrix span { color:#303834; font-size:11px; }.flow-matrix small { color:#8a778e; font-size:9px; }
.department-flow-scope { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin:0 0 14px; }.department-flow-scope>div { min-width:0; padding:12px 14px; border:1px solid #f0d5df; border-radius:11px; background:#fff8fb; }.department-flow-scope small,.department-flow-scope strong { display:block; }.department-flow-scope small { margin-bottom:5px; color:#c5547a; font-size:9px; font-weight:750; }.department-flow-scope strong { color:#44373c; font-size:11px; line-height:1.55; }
.department-flow-actions { margin:0 0 16px; padding:15px; border:1px solid #efcbd9; border-radius:14px; background:linear-gradient(135deg,#fff,#fff6f9); box-shadow:0 9px 24px rgba(200,70,113,.06); }.department-flow-actions-head { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:10px; }.department-flow-actions-head small { color:#ca527a; font-weight:750; letter-spacing:.08em; }.department-flow-actions-head h3 { margin:2px 0 0; font-size:16px; }.department-flow-actions-head>span { color:#8a737c; font-size:9px; }.department-flow-action-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:8px; }.department-flow-action-grid article { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 12px; border:1px solid #efdee5; border-radius:11px; background:#fff; }.department-flow-action-grid article.in_progress,.department-flow-action-grid article.waiting { border-color:#ed9cba; box-shadow:inset 4px 0 #e95787; }.department-flow-action-grid article.complete { background:#fbfffd; }.department-flow-action-grid article>div:first-child { min-width:0; display:grid; gap:2px; }.department-flow-action-grid small { color:#b4768c; font-size:8px; }.department-flow-action-grid strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }.department-flow-action-grid span { color:#81757a; font-size:9px; }.department-flow-action-grid article>div:last-child { flex:none; display:flex; gap:6px; }.department-flow-action-grid button { min-height:32px; padding:0 9px; border:1px solid #edc6d5; border-radius:8px; color:#bd4b72; background:#fff; font-size:9px; font-weight:700; }.department-flow-action-grid button.primary { color:#fff; border-color:#df4e7b; background:linear-gradient(135deg,#ef739d,#dc4877); }
.procurement-subflow { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin:0 0 15px; }.procurement-subflow>div { position:relative; display:grid; gap:3px; padding:12px 10px 12px 38px; border:1px solid #e0d5e3; border-radius:10px; background:#fff; }.procurement-subflow b { position:absolute; left:10px; top:12px; width:21px; height:21px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#684475; }.procurement-subflow strong { color:#52325e; font-size:11px; }.procurement-subflow span { color:#89768e; font-size:8px; line-height:1.4; }.pr-review-row { display:flex; flex-wrap:wrap; gap:3px; margin-top:6px; }.pr-review-chip { padding:2px 5px; border-radius:8px; color:#7a687f; background:#f0ebf2; font-size:8px; font-style:normal; }.pr-review-chip.done { color:#2c6c52; background:#e5f2eb; }.pr-review-chip.rejected { color:#9b433d; background:#f8e9e7; }
.purchase-batch-detail { width:min(1500px,calc(100vw - 30px)); }.purchase-progress { display:flex; align-items:center; gap:18px; margin:16px 0; padding:14px 16px; border:1px solid #d9ccde; border-radius:11px; background:#f8f4f9; }.purchase-progress strong { color:#5b3568; font-size:25px; }.purchase-progress span { color:#645b67; }.purchase-check { width:24px; height:24px; display:inline-grid; place-items:center; border:2px solid #c8bccb; border-radius:6px; color:#fff; background:#fff; font-weight:900; }.purchase-check.checked { border-color:#664273; background:#664273; }.warehouse-progress-row { background:#fcf9fd; }.warehouse-progress-row td:first-child { border-left:4px solid #845b91; }
.warehouse-project-group td { padding:16px 18px; background:#fff3f7; border-top:2px solid #efadc2; border-bottom:1px solid #f4ccda; }
.warehouse-project-group strong { display:block; color:#b83261; font-size:17px; letter-spacing:.02em; }
.warehouse-project-group span { display:block; margin-top:4px; color:#756971; font-size:13px; }
.warehouse-state-map { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:16px 0; }
.warehouse-state-card { position:relative; display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:10px; align-items:center; min-width:0; padding:14px; border:1px solid #ead5dd; border-radius:14px; color:#493b41; background:#fff; box-shadow:0 7px 20px rgba(146,55,88,.05); text-decoration:none; }
.warehouse-state-card:hover { border-color:#e78caf; transform:translateY(-1px); }
.warehouse-state-card.has-work { border-color:#efb1c7; background:linear-gradient(145deg,#fff7fa,#fff); }
.warehouse-state-card>b { display:grid; width:36px; height:36px; place-items:center; border-radius:11px; color:#b73c68; background:#fff0f5; font-size:12px; }
.warehouse-state-card div { min-width:0; }.warehouse-state-card strong,.warehouse-state-card span { display:block; overflow-wrap:anywhere; }
.warehouse-state-card strong { font-size:14px; }.warehouse-state-card span { margin-top:3px; color:#89757d; font-size:11px; line-height:1.45; }
.warehouse-state-card em { padding:4px 8px; border-radius:999px; color:#8d6976; background:#f7f1f3; font-size:10px; font-style:normal; font-weight:800; white-space:nowrap; }
.warehouse-state-card.has-work em { color:#b52f60; background:#ffe6ef; }.warehouse-state-card>i { position:absolute; right:-10px; z-index:2; color:#cf9aab; font-style:normal; }
.warehouse-governance-note { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 20px; align-items:center; margin:0 0 16px; padding:14px 16px; border-left:4px solid #df628d; border-radius:0 12px 12px 0; background:#f8f5f6; }
.warehouse-governance-note strong { color:#6d3d4e; }.warehouse-governance-note p { margin:4px 0 0; color:#6f6267; font-size:12px; line-height:1.6; }.warehouse-governance-note>div { display:flex; flex-wrap:wrap; gap:7px; }
.warehouse-stage-panel { scroll-margin-top:12px; }.warehouse-stage-panel .eyebrow { margin-bottom:5px; }
.warehouse-state-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:16px 0; }
.warehouse-state-summary article { padding:13px 15px; border:1px solid #e8dce1; border-radius:12px; background:#fff; }.warehouse-state-summary span,.warehouse-state-summary strong,.warehouse-state-summary small { display:block; }.warehouse-state-summary span { color:#806c74; font-size:11px; }.warehouse-state-summary strong { margin:4px 0; font-size:25px; }.warehouse-state-summary small { color:#8e8085; }.warehouse-state-summary .exception strong { color:#b52d4d; }
.data-table tr.warehouse-data-issue td { background:#fff8ed; }
.data-table tr.warehouse-data-issue td:first-child { box-shadow:inset 4px 0 #e88b35; }
.data-table tr.warehouse-data-issue .status.bad { display:block; width:max-content; max-width:300px; margin-top:6px; white-space:normal; line-height:1.45; }
.warehouse-archive { margin:16px 0; overflow:hidden; border:1px solid #e8d8de; border-radius:14px; background:#fff; }.warehouse-archive>summary { display:flex; justify-content:space-between; gap:14px; padding:16px 18px; cursor:pointer; list-style:none; background:#fff8fa; }.warehouse-archive>summary::-webkit-details-marker { display:none; }.warehouse-archive>summary strong,.warehouse-archive>summary span { display:block; }.warehouse-archive>summary span { margin-top:4px; color:#8a777e; font-size:10px; }.warehouse-archive>summary>b { align-self:center; color:#bd406b; font-size:10px; white-space:nowrap; }.warehouse-archive>.table-scroll { border-top:1px solid #eadde2; }
.warehouse-arrival-source { display:grid; grid-template-columns:190px 190px minmax(260px,1fr); gap:10px; align-items:stretch; margin:16px 0; }.warehouse-arrival-source>div,.warehouse-arrival-source>p { margin:0; padding:14px 16px; border:1px solid #eadbe1; border-radius:14px; background:#fff; }.warehouse-arrival-source>div:first-child { border-color:#bfe6dc; background:linear-gradient(145deg,#f2fffb,#fff); }.warehouse-arrival-source>div:nth-child(2) { border-color:#f0cad8; background:linear-gradient(145deg,#fff6fa,#fff); }.warehouse-arrival-source small,.warehouse-arrival-source strong,.warehouse-arrival-source span { display:block; }.warehouse-arrival-source>div>strong { margin:2px 0; color:#b53564; font-size:28px; }.warehouse-arrival-source span,.warehouse-arrival-source p { color:#796b71; font-size:11px; line-height:1.55; }.warehouse-arrival-source p { display:flex; flex-direction:column; justify-content:center; background:#faf8f9; }.warehouse-arrival-source p strong { margin-bottom:4px; color:#593b47; font-size:12px; }
.warehouse-arrival-workspace { margin-bottom:18px; }.warehouse-arrival-category-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; margin:0 0 12px; }.warehouse-arrival-category { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:8px; align-items:center; min-width:0; min-height:72px; padding:10px; border:1px solid #e9dce1; border-radius:13px; color:#59434c; text-align:left; background:#fff; box-shadow:0 6px 18px rgba(107,54,75,.05); }.warehouse-arrival-category:hover { border-color:#e78bab; transform:translateY(-1px); }.warehouse-arrival-category.active { color:#fff; border-color:#d94777; background:linear-gradient(135deg,#ee6a94,#d94274); box-shadow:0 9px 24px rgba(207,57,106,.2); }.warehouse-arrival-category>b { display:grid; width:32px; height:32px; place-items:center; border-radius:10px; color:#b43965; background:#fff0f5; font-size:11px; }.warehouse-arrival-category.active>b { color:#cf3c6d; background:#fff; }.warehouse-arrival-category span { min-width:0; }.warehouse-arrival-category strong,.warehouse-arrival-category small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.warehouse-arrival-category strong { font-size:11px; }.warehouse-arrival-category small { margin-top:3px; color:#8c7a81; font-size:8px; }.warehouse-arrival-category.active small { color:#ffe6ee; }.warehouse-arrival-category em { min-width:23px; padding:3px 6px; border-radius:999px; color:#a94a6c; text-align:center; background:#fff0f5; font-size:9px; font-style:normal; font-weight:800; }.warehouse-arrival-category.active em { color:#c23b68; background:#fff; }.warehouse-arrival-tools { justify-content:space-between; margin-bottom:10px; }.warehouse-arrival-tools input { flex:1; min-width:240px; }.warehouse-arrival-tools>span { color:#806c74; font-size:11px; }.warehouse-arrival-table td>strong,.warehouse-arrival-table td>span { display:block; }.warehouse-arrival-table td>.status+strong { margin-top:7px; }.warehouse-arrival-table tr[hidden] { display:none; }
@media(max-width:1050px) { .warehouse-state-map { grid-template-columns:repeat(2,minmax(0,1fr)); }.warehouse-state-card>i { display:none; } }
@media(max-width:1180px) { .warehouse-arrival-category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:700px) { .warehouse-state-map,.warehouse-state-summary,.warehouse-arrival-source { grid-template-columns:1fr; }.warehouse-governance-note { grid-template-columns:1fr; }.warehouse-archive>summary { display:grid; }.warehouse-arrival-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.warehouse-arrival-category:first-child { grid-column:1/-1; }.warehouse-arrival-tools { align-items:stretch; }.warehouse-arrival-tools input { min-width:0; width:100%; } }
.purchase-overview { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(320px,.75fr); gap:14px; margin:16px 0; }.purchase-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }.purchase-metrics article { padding:13px 14px; border:1px solid #f0d9e2; border-radius:13px; background:#fffafb; }.purchase-metrics small,.purchase-metrics span { display:block; color:#8b737d; font-size:11px; }.purchase-metrics strong { display:block; margin:3px 0; color:#332a2e; font-size:27px; }.purchase-metrics .submitted { border-color:#ebc9d7; background:#fff8fb; }.purchase-metrics .submitted strong { color:#a84d70; }.purchase-metrics .confirmed { border-color:#f0a8bf; background:#fff0f5; }.purchase-metrics .confirmed strong { color:#c44772; }.purchase-metrics .remaining strong { color:#a56b20; }.purchase-overview .purchase-progress { margin:10px 0 0; }.purchase-overview .purchase-progress strong { font-size:20px; }.purchased-summary { overflow:hidden; border:1px solid #efcad7; border-radius:14px; background:#fff; }.purchased-summary > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; color:#563546; background:#fff1f6; }.purchased-summary header small,.purchased-summary header strong { display:block; }.purchased-summary header > span { padding:4px 9px; border-radius:999px; color:#bd456f; background:#fff; font-size:11px; font-weight:800; }.purchased-summary ol { max-height:190px; overflow:auto; margin:0; padding:6px 12px 10px; list-style:none; }.purchased-summary li { display:grid; grid-template-columns:25px minmax(0,1fr) auto; gap:9px; align-items:center; padding:9px 2px; border-bottom:1px solid #f3e6eb; }.purchased-summary li:last-child { border-bottom:0; }.purchased-summary li > b { display:grid; width:23px; height:23px; place-items:center; border-radius:50%; color:#fff; background:#e15783; font-size:11px; }.purchased-summary li strong,.purchased-summary li small { display:block; overflow-wrap:anywhere; }.purchased-summary li small { margin-top:2px; color:#8d7b83; font-size:10px; }.purchased-summary li > i { color:#bd456f; font-size:11px; font-style:normal; font-weight:800; }.purchased-summary li.empty { grid-template-columns:1fr; padding:17px 3px; text-align:center; }
.purchase-step-banner { display:flex; align-items:center; justify-content:center; gap:10px; margin:14px 0 18px; padding:13px 16px; border:1px solid #f2c4d3; border-radius:14px; background:#fff7fa; color:#815065; font-weight:800; }.purchase-step-banner b { width:27px; height:27px; display:grid; place-items:center; border-radius:50%; background:#e85d89; color:#fff; }.purchase-step-banner i { color:#d99ab0; font-style:normal; }
.purchase-card-list { display:grid; gap:14px; margin-top:14px; }.purchase-item-card { overflow:hidden; border:1px solid #eadce2; border-radius:16px; background:#fff; box-shadow:0 7px 22px rgba(98,56,76,.07); }.purchase-item-card.invalid { border-color:#efadbc; background:#fffafb; }.purchase-item-card header,.purchase-item-card footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 16px; background:#fff8fb; }.purchase-item-card footer { border-top:1px solid #f0e4e8; background:#fff; }.purchase-item-number { display:flex; align-items:center; gap:10px; }.purchase-item-number small,.purchase-item-number strong { display:block; }.purchase-item-number small,.purchase-card-order small,.purchase-card-material small { color:#8f7f86; font-size:10px; }.purchase-card-order { display:grid; grid-template-columns:1fr 1.6fr 1fr; gap:10px; padding:12px 16px; border-top:1px solid #f2e8ec; border-bottom:1px solid #f2e8ec; background:#fffcfd; }.purchase-card-order strong,.purchase-card-order span,.purchase-card-material strong,.purchase-card-material span { display:block; overflow-wrap:anywhere; }.purchase-card-order span,.purchase-card-material span,.purchase-card-material p { margin:3px 0 0; color:#7c7075; font-size:11px; }.purchase-card-material { display:grid; grid-template-columns:1.2fr 1.5fr .7fr; gap:16px; align-items:start; padding:17px 16px; }.purchase-material-name h3 { margin:5px 0 2px; color:#252123; font-size:19px; }.purchase-category { display:inline-block!important; width:max-content; margin-bottom:7px!important; padding:3px 9px; border-radius:12px; color:#c23e68!important; background:#ffe9f0; font-size:10px!important; font-weight:800; }.purchase-quantity strong { color:#bd456f; font-size:22px; }.purchase-card-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }.purchase-card-actions button { min-height:40px; }.purchase-data-warning { margin-top:7px!important; padding:6px 8px; border-radius:7px; color:#a32645!important; background:#ffe0e7; font-size:11px!important; font-weight:800; }
.request-group-detail { width:min(1500px,calc(100vw - 30px)); }.request-group-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:16px 0; }.request-group-summary>div { padding:13px 15px; border:1px solid #ddd2e1; border-radius:10px; background:#faf7fb; }.request-group-summary span,.request-group-summary strong { display:block; }.request-group-summary span { color:#7d7081; font-size:10px; }.request-group-summary strong { margin-top:4px; color:#52325e; font-size:15px; }
.flow-order-bar { margin-bottom:16px; padding:15px; border:1px solid #e1d5e5; border-radius:13px; background:#fff; }.flow-order-list { display:flex; gap:8px; overflow-x:auto; padding-bottom:9px; }.flow-order-choice { min-width:185px; padding:10px 12px; border:1px solid #ddd2e1; border-radius:9px; text-align:left; color:#53365f; background:#faf8fb; }.flow-order-choice.active { border-color:#765184; color:#fff; background:#624170; }.flow-order-choice strong,.flow-order-choice span { display:block; }.flow-order-choice span { margin-top:3px; font-size:9px; opacity:.8; }
.flow-workspace { position:relative; min-height:360px; overflow-anchor:none; }
.flow-workspace::after { content:"正在刷新当前订单…"; position:absolute; z-index:4; top:8px; right:8px; padding:7px 11px; border:1px solid #d9cde0; border-radius:8px; color:#624170; background:rgba(255,255,255,.96); box-shadow:0 8px 24px rgba(66,41,75,.12); opacity:0; pointer-events:none; transform:translateY(-4px); transition:.15s ease; }
.flow-workspace.is-refreshing::after { opacity:1; transform:translateY(0); }
.flow-workspace.is-refreshing .turnover-flow,.flow-workspace.is-refreshing .flow-order-summary { opacity:.68; transition:opacity .15s ease; }
.flow-zero-state { display:grid; grid-template-columns:74px minmax(0,1fr); gap:22px; align-items:center; margin:18px 0; padding:34px; border:1px solid #f2cddd; border-radius:22px; background:linear-gradient(135deg,#fff 0%,#fff5f9 100%); box-shadow:0 14px 34px rgba(201,76,124,.10); }
.flow-zero-icon { display:grid; place-items:center; width:74px; height:74px; border-radius:24px; color:#fff; background:linear-gradient(135deg,var(--green),var(--green-2)); font-size:42px; font-weight:300; box-shadow:0 10px 24px rgba(75,36,91,.22); }
.flow-zero-copy small { color:var(--green-2); font-weight:800; letter-spacing:.08em; }.flow-zero-copy h2 { margin:4px 0 7px; font:700 27px Georgia,"Songti SC",serif; }.flow-zero-copy p { max-width:820px; margin:0; color:var(--muted); }
.flow-zero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:20px; }.flow-zero-actions button { min-height:46px; padding:0 22px; }
.flow-zero-wait { display:grid; gap:3px; margin-top:17px; padding:13px 16px; border-left:4px solid var(--green-2); border-radius:8px; background:#fff; }.flow-zero-wait span { color:var(--muted); }
.flow-zero-guide { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }.flow-zero-guide>div { display:grid; grid-template-columns:34px minmax(0,1fr); column-gap:10px; padding:18px; border:1px solid #e1d8e4; border-radius:16px; background:#fff; }.flow-zero-guide b { grid-row:1/3; display:grid; place-items:center; width:32px; height:32px; border-radius:50%; color:#fff; background:var(--green-2); }.flow-zero-guide strong,.flow-zero-guide span { min-width:0; }.flow-zero-guide span { color:var(--muted); font-size:12px; }
@media(max-width:760px) { .flow-zero-state { grid-template-columns:1fr; padding:24px 18px; }.flow-zero-guide { grid-template-columns:1fr; }.flow-zero-actions button { width:100%; }.flow-zero-icon { width:58px; height:58px; border-radius:18px; font-size:34px; } }
.flow-order-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:7px; }.flow-order-summary>div { padding:10px; border-radius:8px; background:#f6f2f7; }.flow-order-summary span,.flow-order-summary strong { display:block; }.flow-order-summary span { color:var(--muted); font-size:9px; }.flow-order-summary strong { margin-top:3px; font-size:12px; }.flow-progress { height:7px; margin-top:12px; overflow:hidden; border-radius:9px; background:#eee8f0; }.flow-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#694578,#9b72a5); }
.turnover-flow { display:grid; gap:9px; }.turnover-stage { display:grid; grid-template-columns:46px 1fr 120px; gap:13px; align-items:center; padding:14px 15px; border:1px solid var(--line); border-left:4px solid #c8bdcc; border-radius:11px; background:#fff; }.turnover-stage.complete { border-left-color:#49816b; }.turnover-stage.in_progress { border-left-color:#b47e30; background:#fffdf8; }.turnover-stage.blocked { opacity:.64; background:#fafafa; }.stage-index { align-self:stretch; display:grid; justify-items:center; grid-template-rows:30px 1fr; }.stage-index b { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#73507e; }.stage-index i { width:1px; margin-top:5px; background:#ddd3e0; }.turnover-stage:last-child .stage-index i { display:none; }.stage-title { display:flex; gap:10px; align-items:center; }.stage-title span { min-width:105px; color:#765184; font-size:10px; }.stage-title h3 { flex:1; margin:0; font-size:14px; }.stage-title em { padding:3px 8px; border-radius:12px; color:#6d5b73; background:#f0e9f2; font-size:9px; font-style:normal; }.complete .stage-title em { color:#2d6b53; background:#e8f3ed; }.in_progress .stage-title em { color:#8c5a18; background:#fff1d9; }.stage-main p { margin:5px 0; color:#56615d; font-size:11px; line-height:1.55; }.stage-main small { color:#8b7b90; }.stage-actions { text-align:right; }.stage-actions button { padding:7px 9px; border:1px solid #c9bacf; border-radius:7px; color:#654272; background:#fff; }.stage-actions span { color:var(--muted); font-size:10px; }.flow-records { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }.flow-records button { display:flex; gap:7px; padding:5px 7px; border:1px solid #e1d8e4; border-radius:7px; color:#594361; background:#faf8fb; font-size:9px; }.flow-records b { color:#7b6e80; }
.stage-account-trace { margin-top:9px; padding:9px 10px; border:1px solid #eadce4; border-radius:9px; background:#fff; }
.stage-account-trace>strong { display:block; margin-bottom:6px; color:#765184; font-size:10px; }
.stage-account-trace>div { display:flex; flex-wrap:wrap; gap:6px; }
.stage-account-trace span { display:grid; grid-template-columns:auto auto; gap:2px 8px; padding:6px 8px; border-radius:7px; background:#f8f5f9; }
.stage-account-trace span b { color:#392f3b; font-size:10px; }
.stage-account-trace span i { color:#b1426b; font-size:9px; font-style:normal; }
.stage-account-trace span small { grid-column:1/-1; color:#7e737f; font-size:9px; }
.stage-account-trace em { align-self:center; color:#7c6e7c; font-size:9px; font-style:normal; }
.stage-account-trace.complete { border-color:#cfe4d9; background:#f6fbf8; }
.stage-account-trace.pending { border-color:#efd6df; background:#fff9fb; }

.workflow-test-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:14px; padding:24px 26px; overflow:hidden; border-radius:16px; color:#fff; background:linear-gradient(135deg,#281532,#694578); box-shadow:0 14px 36px rgba(53,25,67,.18); }
.workflow-test-hero>div { min-width:0; }.workflow-test-hero small { color:#dcc6e1; letter-spacing:.14em; }.workflow-test-hero h1 { margin:6px 0; font:700 25px Georgia,"Songti SC",serif; }.workflow-test-hero p { max-width:880px; margin:0; color:#eee4f0; line-height:1.65; }.workflow-test-hero button { flex:none; padding:11px 15px; border:1px solid rgba(255,255,255,.55); border-radius:9px; color:#4c2d59; background:#fff; font-weight:750; }
.workflow-test-summary { display:grid; grid-template-columns:2fr repeat(3,1fr); gap:9px; margin-bottom:14px; }.workflow-test-summary>div:not(.workflow-test-progress) { min-width:0; padding:13px 15px; border:1px solid #ddd3e1; border-radius:10px; background:#fff; }.workflow-test-summary span,.workflow-test-summary strong { display:block; }.workflow-test-summary span { color:var(--muted); font-size:9px; }.workflow-test-summary strong { margin-top:4px; overflow-wrap:anywhere; color:#54325f; }.workflow-test-progress { grid-column:1/-1; height:7px; overflow:hidden; border-radius:10px; background:#e9e2ec; }.workflow-test-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#5f3d6c,#9d74a7); transition:width .25s ease; }
.workflow-test-history { margin-bottom:14px; padding:12px 14px; border:1px solid #ded4e1; border-radius:10px; background:#fff; }.workflow-test-history summary { cursor:pointer; color:#60406b; font-weight:700; }.workflow-test-history>div { display:flex; gap:8px; overflow-x:auto; margin-top:10px; padding-bottom:5px; }.test-run-choice { min-width:235px; padding:9px 11px; border:1px solid #ddd2e1; border-radius:8px; text-align:left; color:#60446a; background:#faf8fb; }.test-run-choice.active { color:#fff; border-color:#674574; background:#674574; }.test-run-choice strong,.test-run-choice span { display:block; }.test-run-choice span { margin-top:3px; font-size:9px; opacity:.78; }
.workflow-test-chain { display:grid; gap:9px; }.workflow-test-step { display:grid; grid-template-columns:48px minmax(0,1fr) 150px; gap:13px; align-items:center; padding:15px 16px; border:1px solid var(--line); border-left:4px solid #cbc2ce; border-radius:11px; background:#fff; }.workflow-test-step.completed { border-left-color:#6b4778; }.workflow-test-step.current { border-color:#b79abd; border-left:4px solid #6b4778; background:#fcf9fd; box-shadow:0 8px 25px rgba(73,42,83,.08); }.workflow-test-step.locked { opacity:.58; background:#fafafa; }.workflow-test-index { align-self:stretch; display:grid; justify-items:center; grid-template-rows:31px 1fr; }.workflow-test-index b { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#74507f; }.workflow-test-index i { width:1px; margin-top:5px; background:#ddd3e0; }.workflow-test-step:last-child .workflow-test-index i { display:none; }.workflow-test-title { display:flex; align-items:center; gap:10px; }.workflow-test-title span { min-width:120px; color:#765184; font-size:10px; }.workflow-test-title h3 { flex:1; margin:0; }.workflow-test-title em { padding:3px 8px; border-radius:12px; color:#6b5571; background:#f0e9f2; font-size:9px; font-style:normal; }.workflow-test-step.current em { color:#fff; background:#674574; }.workflow-test-body p { margin:5px 0; color:#56615d; font-size:11px; line-height:1.55; }.workflow-test-body>small { color:#8b7b90; }.workflow-test-result { display:grid; gap:3px; margin-top:9px; padding:9px 11px; border-radius:8px; background:#f5f0f7; }.workflow-test-result strong { color:#563361; font-size:10px; }.workflow-test-result span { overflow-wrap:anywhere; color:#736678; font-size:9px; }.workflow-test-actions { display:grid; gap:5px; text-align:center; }.workflow-test-actions button { padding:8px 10px; border:1px solid #cbbacf; border-radius:8px; color:#654272; background:#fff; }.workflow-test-actions button.primary { color:#fff; border-color:#654272; background:#654272; }.workflow-test-actions small,.workflow-test-actions span { color:var(--muted); font-size:9px; }
.workflow-test-detail-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin:16px 0; }.workflow-test-detail-grid>div { min-width:0; padding:11px 12px; border:1px solid #ddd4e0; border-radius:8px; background:#faf8fb; }.workflow-test-detail-grid span,.workflow-test-detail-grid strong { display:block; }.workflow-test-detail-grid span { color:var(--muted); font-size:9px; }.workflow-test-detail-grid strong { margin-top:4px; overflow-wrap:anywhere; }.workflow-test-data { margin-bottom:18px; table-layout:fixed; border:1px solid var(--line); }.workflow-test-data th { width:190px; color:#654272; }.workflow-test-data td { overflow-wrap:anywhere; }.workflow-test-routing { display:grid; gap:7px; margin-bottom:18px; }.workflow-test-routing>div { display:grid; grid-template-columns:55px 1fr; gap:10px; padding:9px 11px; border:1px solid #d4ded9; border-radius:8px; background:#f7faf8; }.workflow-test-routing>div.warning { border-color:#e4cda9; background:#fff9ef; }.workflow-test-routing b { color:#654272; }.workflow-test-checks { display:grid; gap:6px; padding-left:22px; color:#4d5953; }.workflow-test-checks li::marker { color:#654272; }

.batch-center-intro { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:16px; padding:22px 24px; border-radius:15px; color:#fff; background:linear-gradient(135deg,#2f173c,#634174); box-shadow:0 14px 36px rgba(53,25,67,.18); }
.batch-center-intro small { color:#ddc8e1; letter-spacing:.15em; }.batch-center-intro h2 { margin:5px 0; font:700 23px Georgia,"Songti SC",serif; }.batch-center-intro p { margin:0; color:#eee5f0; }.batch-center-intro>strong { min-width:90px; font-size:32px; text-align:center; }.batch-center-intro>strong span { display:block; font-size:10px; font-weight:500; }
.batch-export-panel { border-color:#d7c4df; background:linear-gradient(180deg,#fff,#fbf8fc); }.batch-export-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.batch-export-grid label { min-width:0; padding:16px; border:1px solid #e1d7e5; border-radius:12px; background:#fff; }.batch-export-grid label>span,.batch-export-grid label>small { display:block; }.batch-export-grid label>span { margin-bottom:8px; font-weight:750; }.batch-export-grid label>small { min-height:34px; margin:8px 0 12px; color:var(--muted); }.batch-export-grid select,.batch-export-grid button { width:100%; max-width:100%; }.batch-export-panel .controlled-edit-note { margin-top:14px; }
.batch-template-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:20px; }.batch-template-card { display:grid; grid-template-columns:38px 1fr auto; gap:12px; align-items:center; padding:14px; border:1px solid #ddd2e1; border-radius:11px; text-align:left; color:#343039; background:#fff; box-shadow:0 5px 16px rgba(58,34,67,.04); }.batch-template-card:hover { border-color:#8e6b99; transform:translateY(-1px); }.batch-template-card>span { width:34px; height:34px; display:grid; place-items:center; border-radius:9px; color:#fff; background:#674575; font-size:11px; font-weight:800; }.batch-template-card strong,.batch-template-card small { display:block; }.batch-template-card strong { line-height:1.35; }.batch-template-card small { margin-top:4px; color:var(--muted); font-size:9px; }.batch-template-card>b { color:#714e7d; font-size:10px; white-space:nowrap; }
.batch-editor-panel { padding:20px; border:1px solid #ded4e1; border-radius:14px; background:#f8f6f9; }.batch-record-meta { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:14px 0; padding:14px; border:1px solid #ddd3e0; border-radius:10px; background:#fff; }.batch-record-meta label { display:grid; gap:5px; }.batch-record-meta span { color:#62466b; font-size:10px; font-weight:700; }.batch-record-meta input,.batch-record-meta select { width:100%; padding:9px 10px; border:1px solid #cfc4d3; border-radius:7px; background:#fff; }
.batch-editor-panel,#batchRecordForm,.batch-critical-fields { min-width:0; max-width:100%; box-sizing:border-box; }.batch-editor-panel,#batchRecordForm { width:100%; overflow-x:hidden; }.batch-critical-fields { width:100%; margin:16px 0; overflow:hidden; border:1px solid #d8cfdc; border-radius:10px; background:#fff; }.batch-critical-fields legend { color:#563763; font-weight:750; }.batch-critical-fields .table-scroll { display:block; width:100%; max-width:100%; overflow-x:auto; }.batch-critical-fields .data-table { min-width:900px; }.batch-critical-fields small { display:block; margin-top:8px; color:var(--muted); }
.batch-editor-panel.batch-editor-readonly input,.batch-editor-panel.batch-editor-readonly textarea,.batch-editor-panel.batch-editor-readonly select { pointer-events:none; background:#f3f1f4; color:#6f6873; }
.batch-sheet { margin:16px 0; padding:14px; border:1px solid #f2bfd2; border-radius:14px; background:#fff; }.batch-sheet-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:10px; }.batch-sheet-head small { color:#d64679; letter-spacing:.12em; }.batch-sheet-head h3 { margin:3px 0 0; }.batch-sheet-head>span { color:var(--muted); font-size:10px; }.batch-source-paragraphs { margin-bottom:10px; text-align:center; }.batch-source-paragraphs p { margin:3px; white-space:pre-wrap; }.batch-table-scroll { width:100%; overflow:auto; max-height:72vh; border:1px solid #c8bfc3; background:#fff; }.batch-table-fit { width:calc(var(--batch-width) * var(--batch-fit)); height:max-content; min-height:32px; overflow:visible; }.batch-source-table { table-layout:fixed; border-collapse:collapse; transform:scale(var(--batch-fit)); transform-origin:top left; color:#161616; font-family:"Songti SC","SimSun",serif; background:#fff; }.batch-source-table td { position:relative; padding:3px 5px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.35; }.batch-static-text { display:block; }.batch-cell-input { display:block; width:100%; min-width:24px; min-height:24px; height:100%; padding:3px; resize:vertical; border:1px dashed #df7da0; border-radius:3px; color:#241b27; background:#fffafb; font:inherit; }.batch-inline-input { width:100%; min-height:24px; margin-top:4px; padding:3px 5px; border:0; border-bottom:1px solid #df7da0; background:#fffafb; font:inherit; }.batch-choice-prefix { display:block; margin-bottom:4px; }.batch-choice-list { display:flex; flex-wrap:wrap; gap:5px 9px; }.batch-choice-list label { display:inline-flex; align-items:flex-start; gap:4px; cursor:pointer; }.batch-choice-list input { position:absolute; opacity:0; pointer-events:none; }.batch-choice-list i { width:16px; height:16px; display:inline-grid; place-items:center; flex:none; border:1px solid #333; color:transparent; background:#fff; font-size:12px; font-style:normal; line-height:1; }.batch-choice-list input:checked+i { color:#fff; border-color:#e65285; background:#e65285; }.batch-choice-list span { white-space:pre-wrap; }.batch-save-bar { position:sticky; bottom:10px; z-index:3; display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:18px; padding:13px 16px; border:1px solid #efb8ca; border-radius:10px; background:rgba(255,255,255,.96); box-shadow:0 10px 28px rgba(126,53,80,.15); }.batch-save-bar strong,.batch-save-bar span { display:block; }.batch-save-bar span { margin-top:3px; color:var(--muted); font-size:10px; }
.batch-template-category { margin:18px 0; padding:16px; border:1px solid #f0c6d4; border-radius:18px; background:linear-gradient(180deg,#fffafd,#fff); }.batch-template-category>.panel-head { margin-bottom:12px; }.batch-template-category .batch-template-grid { margin:0; }
.batch-project-workspace { margin-top:20px; }
.batch-project-workspace>.panel-head { align-items:center; }
.batch-project-card { margin:14px 0; overflow:hidden; border:1px solid #edd0da; border-radius:18px; background:#fff; box-shadow:0 10px 28px rgba(91,45,62,.06); }
.batch-project-card.has-pending { border-color:#e77aa1; box-shadow:0 12px 30px rgba(209,58,111,.10); }
.batch-project-card-head { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:20px 22px; }
.batch-project-card-head>div:first-child { min-width:0; }
.batch-project-card-head span { color:#ca3f72; font-size:12px; font-weight:800; letter-spacing:.08em; }
.batch-project-card-head h3 { margin:5px 0 7px; overflow-wrap:anywhere; font-size:21px; }
.batch-project-card-head p { margin:0; color:var(--muted); font-size:13px; }
.batch-project-card-head .batch-project-next-task { margin-top:8px; color:#a72f5b; font-weight:750; }
.batch-project-summary-status { display:grid; justify-items:end; gap:4px; flex:none; }
.batch-project-summary-status>strong { display:inline-flex; align-items:center; gap:7px; color:#b52f61; font-size:14px; }
.batch-project-summary-status>strong>i { width:8px; height:8px; border-radius:50%; background:#e64278; box-shadow:0 0 0 5px rgba(230,66,120,.12); animation:task-pulse 1.7s ease-in-out infinite; }
.batch-project-summary-status>strong.done { color:#557168; }
.batch-project-summary-status>small { color:var(--muted); }
.batch-project-open-button { display:inline-block; margin-top:5px; padding:9px 13px; border:1px solid #edb7ca; border-radius:10px; color:#b93264; background:#fff; font-size:12px; font-weight:800; cursor:pointer; }
.batch-project-open-button:hover,.batch-project-open-button:focus-visible { border-color:#df5b8b; background:#fff3f8; box-shadow:0 0 0 3px rgba(223,91,139,.14); }
.batch-project-card.is-open .batch-project-open-button { color:#66736f; border-color:#dbe4e0; background:#f5f8f7; }
.batch-project-task-list { padding:0 18px 18px; border-top:1px solid #f2dce4; }
.batch-project-task-list .data-table td:first-child strong { display:block; margin-bottom:4px; }
.batch-project-task-list .data-table td small { display:block; margin-top:4px; color:var(--muted); }
.batch-duplicate-note { margin:12px 0; }
.batch-flow-awaiting-note { display:flex; align-items:center; gap:14px; margin:12px 0; }
.batch-flow-awaiting-note>p { min-width:0; flex:1; }
.batch-flow-awaiting-note>button { flex:none; }
.task-count-badge.has-task { color:#fff; border-color:#df4e7b; background:linear-gradient(135deg,#ec6b96,#db4776); box-shadow:0 7px 18px rgba(210,61,108,.18); }
.task-count-badge.is-clear { color:#477064; border-color:#cfe2db; background:#f3faf7; }
.compounding-workbench-guide { margin:18px 0; overflow:hidden; border:1px solid #edc2d1; border-radius:20px; background:#fff; box-shadow:0 14px 35px rgba(151,52,87,.08); }
.compounding-workbench-guide>header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px 22px; border-bottom:1px solid #f1d7e0; background:linear-gradient(135deg,#fff8fb,#fff); }
.compounding-workbench-guide>header small { color:#c33c6d; font-weight:800; letter-spacing:.12em; }
.compounding-workbench-guide>header h2 { margin:5px 0; font-size:22px; }
.compounding-workbench-guide>header p { margin:0; color:var(--muted); }
.compounding-workbench-guide>header button { flex:none; }
.compounding-workbench-guide>ol { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin:0; padding:0; list-style:none; }
.compounding-workbench-guide li { display:grid; grid-template-columns:34px minmax(0,1fr); gap:10px; min-height:104px; padding:17px 18px; border-right:1px solid #f2e0e6; border-bottom:1px solid #f2e0e6; }
.compounding-workbench-guide li:nth-child(3n) { border-right:0; }
.compounding-workbench-guide li>b { width:31px; height:31px; display:grid; place-items:center; border-radius:10px; color:#c33869; background:#ffe8f0; font-size:13px; }
.compounding-workbench-guide li>span { font-weight:800; }
.compounding-workbench-guide li small { display:block; margin-top:5px; color:#7e7176; font-size:11px; font-weight:500; line-height:1.55; }
.compounding-workbench-guide>footer { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:13px 18px; background:#fff8fa; }
.compounding-workbench-guide>footer span { padding:5px 8px; border-radius:8px; color:#9a5a70; background:#fff; font-size:10px; }
.compounding-workbench-guide>footer strong { margin-left:auto; color:#537166; font-size:10px; }
.batch-center-collapsible { margin:18px 0; border:1px solid #efd5df; border-radius:16px; background:#fff; }
.batch-center-collapsible>header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 20px; }
.batch-center-collapsible>header span { display:grid; gap:3px; }
.batch-center-collapsible>header strong { font-size:17px; }
.batch-center-collapsible>header small { color:var(--muted); }
.batch-center-collapsible>header button { padding:9px 13px; border:1px solid #edb7ca; border-radius:10px; color:#bd3868; background:#fff; font-size:13px; font-weight:800; cursor:pointer; }
.batch-center-collapsible>header button:hover,.batch-center-collapsible>header button:focus-visible { border-color:#df5b8b; background:#fff3f8; box-shadow:0 0 0 3px rgba(223,91,139,.14); }
.batch-center-collapsible.is-open>header { border-bottom:1px solid #f2dce4; }
.batch-center-collapsible [data-batch-collapsible-panel]>section.data-panel { margin:0; border:0; border-radius:0 0 16px 16px; box-shadow:none; }
.batch-template-library>div { padding:0 16px 16px; }
@media (max-width:760px) {
  .batch-project-card-head { align-items:flex-start; flex-direction:column; gap:12px; padding:17px; }
  .batch-project-summary-status { justify-items:start; width:100%; }
  .batch-project-open-button { width:100%; text-align:center; }
  .batch-flow-awaiting-note,.compounding-workbench-guide>header { align-items:stretch; flex-direction:column; }
  .compounding-workbench-guide>header button { width:100%; }
  .compounding-workbench-guide>ol { grid-template-columns:1fr; }
  .compounding-workbench-guide li { border-right:0; }
  .compounding-workbench-guide>footer strong { width:100%; margin-left:0; }
}

.semi-release-evidence { margin:14px; overflow:hidden; border:1px solid #ecd2dc; border-radius:14px; background:#fff; }
.semi-release-evidence>header { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; background:#fff7fa; }
.semi-release-evidence>header small { margin:0; }
.semi-release-evidence>header h3 { margin:4px 0 0; }
.semi-release-evidence-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; background:#eadfe3; }
.semi-release-evidence-list article { display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:10px; align-items:center; min-width:0; padding:12px; background:#fff; }
.semi-release-evidence-list article>b { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:#f4eef1; }
.semi-release-evidence-list article div { min-width:0; }
.semi-release-evidence-list article strong,.semi-release-evidence-list article small { display:block; overflow-wrap:anywhere; }
.semi-release-evidence-list article small { margin:3px 0 0; }
.semi-release-evidence-list article>span { max-width:180px; text-align:right; font-size:12px; font-weight:750; }
.semi-release-evidence-list .is-ready>span { color:#277354; }
.semi-release-evidence-list .is-blocked { background:#fff7f7; }
.semi-release-evidence-list .is-blocked>span { color:#b12f47; }
@media (max-width:900px) {
  .semi-release-evidence-list { grid-template-columns:1fr; }
  .semi-release-evidence-list article { grid-template-columns:34px minmax(0,1fr); }
  .semi-release-evidence-list article>span { grid-column:2; max-width:none; text-align:left; }
}
.batch-template-preview-only { width:100%; max-width:none; overflow:hidden; background:#fff; }.batch-template-preview-head { position:sticky; top:0; z-index:4; padding:4px 0 14px; border-bottom:1px solid #efd6df; background:rgba(255,255,255,.96); backdrop-filter:blur(10px); }.batch-template-preview-note { margin:16px 0; }.batch-template-preview-sheets { display:grid; gap:18px; min-width:0; }.batch-template-preview-sheets .batch-sheet { margin:0; }.batch-template-preview-sheets .batch-table-scroll { max-height:calc(100dvh - 260px); }.batch-template-preview-only input:disabled,.batch-template-preview-only textarea:disabled,.batch-template-preview-only select:disabled { opacity:1; color:#111; -webkit-text-fill-color:#111; }.batch-template-preview-only .batch-cell-input:disabled,.batch-template-preview-only .batch-inline-input:disabled { background:#fff; }
.batch-form-canvas .batch-cell-input { border:0; border-bottom:1px solid #80668a; border-radius:0; background:#faf6fb; }
.batch-form-canvas .batch-inline-input { background:#faf6fb; }
.batch-form-canvas .batch-cell-input:focus,.batch-form-canvas .batch-inline-input:focus { outline:2px solid rgba(95,60,107,.3); outline-offset:1px; background:#fff; }
.batch-online-form { display:grid; gap:16px; margin:18px 0; }.batch-online-intro { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; border:1px solid #f1c5d4; border-radius:14px; background:linear-gradient(135deg,#fff 0%,#fff6fa 100%); }.batch-online-intro small { color:#d64679; font-weight:800; letter-spacing:.12em; }.batch-online-intro h3 { margin:4px 0 0; }.batch-online-intro>span { max-width:520px; color:var(--muted); line-height:1.65; }.batch-online-section { min-width:0; margin:0; padding:20px; border:1px solid #efd2dd; border-radius:14px; background:#fff; }.batch-online-section legend { padding:0 10px; color:#c83f70; font-size:15px; font-weight:800; }.batch-online-guidance { margin:0 0 16px; padding:10px 14px; border-left:4px solid #ed7da4; background:#fff7fa; color:#665d62; }.batch-online-guidance p { margin:3px 0; }.batch-online-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 20px; }.batch-online-field { display:grid; align-content:start; gap:7px; min-width:0; }.batch-online-field.full { grid-column:1/-1; }.batch-online-field>span { color:#4e464a; font-weight:750; }.batch-online-field>small { color:#998c92; font-size:10px; }.batch-online-field input,.batch-online-field textarea,.batch-online-field select { width:100%; min-width:0; box-sizing:border-box; padding:13px 14px; border:1px solid #d8d1d4; border-radius:10px; color:#282225; background:#fff; font:inherit; }.batch-online-field textarea { resize:vertical; }.batch-online-field input:focus,.batch-online-field textarea:focus,.batch-online-field select:focus { outline:3px solid rgba(230,82,133,.16); border-color:#e65285; }.batch-online-field input[readonly],.batch-online-field textarea[readonly] { color:#6a5e63; background:#f4f7f5; cursor:not-allowed; }.batch-online-field .batch-choice-list { min-height:48px; align-items:center; padding:10px 12px; border:1px solid #d8d1d4; border-radius:10px; background:#fff; }.batch-online-field .batch-cell-input,.batch-online-field .batch-inline-input { min-height:48px; padding:13px 14px; border:1px solid #d8d1d4; border-radius:10px; background:#fff; }.batch-online-field .batch-static-text { color:#5c5257; }.batch-online-field .complaint-product-analysis { width:100%; }
.batch-split-editor { display:grid; grid-template-columns:minmax(440px,1.05fr) minmax(480px,.95fr); gap:18px; align-items:start; min-width:0; }.batch-preview-pane,.batch-entry-pane { min-width:0; max-height:calc(100vh - 150px); overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }.batch-preview-pane { position:sticky; top:14px; padding:12px; border:1px solid #f0cbd8; border-radius:16px; background:#fff; }.batch-preview-pane .batch-sheet { margin:10px 0 0; padding:8px; }.batch-preview-pane .batch-table-scroll { max-height:none; overflow:visible; }.batch-preview-pane input:disabled,.batch-preview-pane textarea:disabled,.batch-preview-pane select:disabled { opacity:1; color:#111; -webkit-text-fill-color:#111; background:#fff; }.batch-entry-pane { overflow-anchor:none; padding:2px 8px 90px 2px; }.batch-entry-pane .batch-critical-fields .data-table input,.batch-entry-pane .batch-critical-fields .data-table select { min-width:105px; }.batch-entry-pane .batch-critical-fields .data-table small { margin-top:3px; }
dialog:has(.batch-sampling-layout) { width:calc(100vw - 24px); max-height:calc(100dvh - 20px); }
.batch-sampling-layout { grid-template-columns:minmax(0,1.15fr) minmax(440px,.85fr); }
.batch-sampling-layout .batch-preview-pane,.batch-sampling-layout .batch-entry-pane { max-height:calc(100dvh - 145px); }
.batch-sampling-layout .batch-generated-sheet { margin-top:8px; }
.batch-sampling-layout .batch-table-scroll { overflow:hidden; }
.batch-sampling-layout .batch-source-table { table-layout:fixed; }
.batch-sampling-layout .batch-generated-value { overflow-wrap:anywhere; }
.sampling-signature-live-panel { position:sticky; top:0; z-index:6; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 14px; align-items:center; margin:-2px -2px 10px; padding:12px 14px; border:1px solid #efb8cc; border-radius:13px; background:rgba(255,249,251,.97); box-shadow:0 8px 22px rgba(192,65,111,.12); backdrop-filter:blur(9px); }
.sampling-signature-live-panel>div:first-child strong,.sampling-signature-live-panel>div:first-child span { display:block; }.sampling-signature-live-panel>div:first-child strong { color:#b72f61; }.sampling-signature-live-panel>div:first-child span { margin-top:3px; color:var(--muted); font-size:10px; }
.sampling-signature-live-grid { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.sampling-signature-live-grid article { display:grid; grid-template-columns:90px minmax(0,1fr); align-items:center; min-height:62px; padding:8px 10px; border:1px solid #f0d4de; border-radius:10px; background:#fff; }.sampling-signature-live-grid small { color:#8c596d; font-weight:800; }.sampling-signature-live-grid article>div { display:flex; align-items:center; gap:10px; min-width:0; }.sampling-signature-live-grid img { width:118px; height:44px; object-fit:contain; border-bottom:1px solid #df96b0; background:#fff; }.sampling-signature-live-grid span { color:var(--muted); font-size:9px; }.sampling-signature-live-grid strong { color:#997681; }
.sampling-signature-located { animation:samplingSignaturePulse 1.8s ease; }
@keyframes samplingSignaturePulse { 0%,100% { box-shadow:none; } 20%,70% { box-shadow:inset 0 0 0 4px #e65285; background:#fff0f5; } }
.batch-editor-panel.batch-editor-fullscreen { position:fixed!important; inset:0!important; z-index:2147482000; display:flex; flex-direction:column; width:100vw!important; max-width:none!important; height:100dvh!important; margin:0!important; padding:16px 20px; overflow:hidden!important; border:0; border-radius:0; background:#fff9fb; }
.batch-editor-fullscreen>.panel-head { flex:none; margin-bottom:12px; padding-bottom:12px; }
.batch-editor-fullscreen>#batchRecordForm { flex:1; min-height:0; overflow:hidden; }
.batch-editor-fullscreen .batch-split-editor { height:100%; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); align-items:stretch; }
.batch-editor-fullscreen .batch-preview-pane,.batch-editor-fullscreen .batch-entry-pane { position:static; height:100%; max-height:none; overflow:auto; }
.batch-editor-fullscreen .batch-preview-pane .batch-table-scroll { max-height:none; overflow:auto; }
.batch-editor-fullscreen .batch-entry-pane { padding:2px 10px 28px 2px; }
.batch-editor-fullscreen .batch-entry-pane .batch-save-bar { position:static; margin:20px 0 6px; }
.weighing-workbench { padding:0 14px 18px; background:#fffdfd; }
.weighing-workbench-head { position:sticky; top:0; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 -14px 16px; padding:16px 18px; border-bottom:1px solid #f1d1dd; background:rgba(255,253,253,.97); backdrop-filter:blur(10px); }
.weighing-workbench-head strong { font-size:18px; }.weighing-workbench-head p { margin:5px 0; color:var(--muted); }.weighing-workbench-head small { color:#b54a70; }
.weighing-person-name { display:grid; gap:7px; margin:0 0 16px; padding:14px; border:1px solid #efbfd0; border-radius:13px; background:#fff8fb; }
.weighing-person-name>span { color:#ac315f; font-weight:850; }
.weighing-person-name input { width:100%; box-sizing:border-box; padding:12px 13px; border:1px solid #d995ad; border-radius:9px; background:#fff; font:inherit; }
.weighing-person-name small { color:var(--muted); }
.weighing-item-switcher { position:sticky; top:96px; z-index:4; display:grid; grid-template-columns:auto minmax(220px,1fr) auto auto; gap:10px; align-items:end; margin:0 0 16px; padding:12px; border:1px solid #edbfd0; border-radius:14px; background:rgba(255,248,251,.98); box-shadow:0 8px 22px rgba(126,53,80,.08); }
.weighing-item-switcher[hidden] { display:none; }.weighing-item-switcher label { display:grid; gap:5px; }.weighing-item-switcher label span { color:#a93b64; font-size:11px; font-weight:800; }.weighing-item-switcher select { width:100%; min-height:44px; font-weight:750; }.weighing-item-switcher output { align-self:center; color:#8b6170; font-size:11px; font-weight:750; white-space:nowrap; }
.weighing-material-list { display:grid; gap:14px; }
.weighing-material-list.is-filtered .weighing-material-card:not(.is-selected) { display:none; }
.weighing-material-card { scroll-margin-top:100px; padding:16px; border:1px solid #ecc9d6; border-left:6px solid #e6a9bf; border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(126,53,80,.07); transition:border-color .18s,box-shadow .18s,background .18s; }
.weighing-material-card:focus-within { border-color:#e45287; box-shadow:0 10px 28px rgba(218,75,126,.16); }.weighing-material-card.is-complete { border-left-color:#4f9d7c; background:#fbfffd; }.weighing-material-card.has-error { border-left-color:#c9344f; background:#fff8f9; }
.weighing-material-card>header { display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:12px; align-items:center; margin-bottom:14px; }.weighing-material-card>header>span { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#ffe7f0; color:#c73f70; font-weight:850; }.weighing-material-card>header small,.weighing-material-card>header strong { display:block; }.weighing-material-card>header small { color:var(--muted); }.weighing-material-card>header strong { margin-top:3px; font-size:17px; }.weighing-material-card>header output { padding:6px 10px; border-radius:999px; background:#fff0f5; color:#b64068; font-weight:750; }.weighing-material-card.is-complete>header output { background:#e8f5ef; color:#267253; }.weighing-material-card.has-error>header output { background:#fde7eb; color:#a6263e; }
.weighing-material-card dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 14px; }.weighing-material-card dl>div { padding:10px 12px; border-radius:12px; background:#f5f7f6; }.weighing-material-card dt { color:var(--muted); font-size:12px; }.weighing-material-card dd { margin:5px 0 0; }.weighing-material-card dd input { width:100%; padding:0!important; border:0!important; background:transparent!important; font-weight:800; }
.weighing-entry-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.weighing-entry-grid label { display:grid; gap:7px; }.weighing-entry-grid input,.weighing-entry-grid select { width:100%; min-height:48px; font-size:16px; }
.weighing-balance { margin-top:12px; padding:10px 12px; border-radius:10px; background:#fff3f7; color:#8a566a; font-weight:650; }.weighing-material-card.is-complete .weighing-balance { background:#eaf6f0; color:#276f54; }.weighing-material-card.has-error .weighing-balance { background:#fde8ec; color:#a42c44; }
.weighing-site-checks { margin-top:18px; padding:14px; border:1px solid #efceda; border-radius:16px; background:#fffafd; }.weighing-site-checks>header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:12px; }.weighing-site-checks>header small { color:#c64773; font-weight:800; }.weighing-site-checks>header h3 { margin:3px 0 0; }.weighing-site-checks>header output { min-width:64px; padding:8px 12px; border-radius:999px; background:#ffe6ef; color:#bd3d6b; text-align:center; font-weight:850; }.weighing-site-checks .batch-weighing-checks { margin:0; }.weighing-site-checks .batch-weighing-checks label span { display:flex; align-items:flex-start; gap:10px; }.weighing-site-checks .batch-weighing-checks label b { display:grid; place-items:center; flex:none; width:24px; height:24px; border-radius:50%; background:#ffe3ed; color:#bd3d6b; }
.batch-preview-pane .preview-active-row>td { background:#fff!important; box-shadow:inset 0 2px #e65285,inset 0 -2px #e65285; }
.batch-preview-pane .preview-active-row>td:first-child { box-shadow:inset 4px 0 #e65285,inset 0 2px #e65285,inset 0 -2px #e65285; }
.batch-weighing-layout .batch-preview-pane { display:flex; flex-direction:column; overflow:hidden; }
.batch-weighing-layout .batch-preview-pane>.batch-online-intro { flex:none; padding:11px 13px; }
.batch-weighing-layout .batch-preview-pane>.batch-sheet { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.batch-weighing-layout .batch-preview-pane .batch-sheet-head { flex:none; }
.batch-weighing-layout .batch-preview-pane .batch-table-scroll { flex:1; min-height:0; min-width:0; display:block; overflow:auto; }
.batch-weighing-layout .batch-preview-pane .batch-table-fit { flex:none; }
.batch-weighing-layout .batch-preview-pane.preview-zoomed .batch-table-scroll { display:block; overflow:auto; }
.batch-weighing-layout .batch-preview-pane.preview-zoomed .batch-table-fit { margin:0; }
.batch-editor-head-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
.batch-split-editor.entry-focus { grid-template-columns:1fr!important; }
.batch-split-editor.entry-focus .batch-preview-pane { display:none; }
.batch-live-signature { min-height:62px; display:grid; grid-template-columns:minmax(80px,1fr) auto; align-items:end; gap:6px; padding:3px; }
.batch-live-signature[hidden] { display:none; }
.batch-live-signature { justify-items:center; text-align:center; }
.batch-live-signature img,.batch-live-signature canvas { width:100%; max-width:170px; height:52px; object-fit:contain; object-position:center; }
.batch-live-signature canvas { display:block; }
.batch-live-signature small { display:none; }
.batch-pending-signature { min-height:58px; display:grid; place-content:center; gap:4px; padding:4px; color:#8a727d; text-align:center; }
.batch-pending-signature strong { color:#b13b68; font-size:12px; }.batch-pending-signature small { font:10px/1.35 sans-serif; }
.batch-generated-signature { min-height:58px; display:flex; align-items:center; justify-content:center; gap:6px; text-align:center; }
.batch-generated-signature img { display:block; width:100%; max-width:170px; height:48px; margin:auto; object-fit:contain; object-position:center; }
.batch-generated-signature span,.batch-generated-signature time { display:none; }
.batch-report-signatures { display:flex; align-items:center; justify-content:space-between; gap:14px; width:100%; min-height:46px; }
.batch-report-signature { display:inline-flex; align-items:center; justify-content:center; gap:7px; flex:1; min-width:0; }
.batch-report-signature b { white-space:nowrap; font-weight:600; }
.batch-report-signature .batch-signature-ink { display:inline-flex; align-items:center; justify-content:center; min-width:72px; min-height:30px; }
.batch-report-signature img { display:block; max-width:112px; max-height:32px; object-fit:contain; }
.batch-report-signature small { white-space:nowrap; color:#756a70; font-size:11px; }
.batch-report-source-signature { display:flex; flex-direction:column; width:100%; max-width:100%; gap:2px; }
.batch-report-source-signature .batch-signature-ink { min-width:0; width:100%; }
.batch-report-source-signature img { width:100%; max-width:100%; height:auto; }
.batch-report-source-signature small { white-space:normal; overflow-wrap:anywhere; font-size:9px; }
[data-report-signature] { display:block; width:100%; }
.batch-review-live-signature { display:block; width:100%; max-width:170px; height:48px; margin:auto; object-fit:contain; object-position:center; }
.batch-formal-signature { align-content:center; justify-content:center; padding:2px 0; color:#111; }
.batch-formal-signature .batch-signature-role,.batch-formal-signature .batch-signature-name,.batch-formal-signature time { display:none; }
.batch-formal-signature .batch-signature-ink { display:flex; align-items:center; justify-content:center; width:100%; min-height:38px; }
.batch-formal-signature .batch-signature-ink img { width:100%; max-width:120px; height:34px; object-fit:contain; object-position:center; }
.batch-preview-pane .batch-form-canvas .batch-cell-input,
.batch-preview-pane .batch-form-canvas .batch-inline-input { min-height:0; padding:0 2px; border:0; border-radius:0; background:transparent; resize:none; box-shadow:none; }
.batch-preview-pane .batch-form-canvas .batch-choice-list i { border-color:#222; background:#fff; }
.batch-preview-pane .batch-form-canvas .batch-choice-list input:checked+i { color:#111; border-color:#222; background:#fff; }
/* Entry controls must have their own layout box. Off-flow, invisible inputs
   made Safari scroll outside the editor when tabbing to a judgement. Keep
   the source preview's printed checkboxes unchanged. */
.batch-online-form .batch-choice-list input {
  position:static; display:inline-block; opacity:1; pointer-events:auto;
  width:18px; min-width:18px; max-width:18px; height:18px; min-height:18px;
  padding:0; margin:0; flex:none; appearance:auto; accent-color:#db467d;
}
.batch-online-form .batch-choice-list input + i { display:none; }
.batch-online-form .batch-choice-list input:focus-visible { outline:2px solid #825394; outline-offset:2px; }
.batch-paper-sheet .batch-table-scroll { width:100%; max-height:none; overflow:visible; border:0; background:#fff; }
.batch-paper-sheet .batch-table-fit { width:var(--batch-source-width); height:auto; min-height:0; margin:0 auto; overflow:visible; }
.batch-paper-sheet .batch-source-table { width:var(--batch-source-width)!important; min-width:var(--batch-source-width)!important; max-width:none; margin:0; transform:scale(var(--batch-fit,1)); transform-origin:top left; table-layout:fixed; border-collapse:collapse; }
.batch-paper-sheet .batch-source-table td { box-sizing:border-box; min-width:0; padding:1px 2px; word-break:normal; }
.batch-paper-sheet .batch-generated-blank { min-height:0; border:0; background:transparent; }
.batch-paper-sheet .batch-generated-value { min-height:0; padding:0; border:0; background:transparent; color:inherit; font:inherit; line-height:inherit; }
.batch-paper-sheet .batch-cell-input,
.batch-paper-sheet .batch-inline-input { min-height:0; padding:0; border:0; border-radius:0; outline:0; background:transparent; color:inherit; font:inherit; line-height:inherit; resize:none; box-shadow:none; }
.batch-paper-sheet .batch-cell-input:focus,
.batch-paper-sheet .batch-inline-input:focus { outline:2px solid rgba(230,82,133,.45); outline-offset:-2px; background:rgba(255,255,255,.72); }
.batch-paper-sheet .batch-choice-list { gap:2px 8px; }
.batch-paper-sheet .batch-choice-list i { width:13px; height:13px; border-color:#111; background:#fff; color:transparent; font-size:10px; }
.batch-paper-sheet .batch-choice-list input:checked+i { border-color:#111; background:#fff; color:#111; }
.batch-paper-sheet .batch-source-table .batch-static-text { max-width:100%; white-space:inherit; overflow-wrap:inherit; }
.batch-preview-pane.preview-zoomed .batch-paper-sheet .batch-table-scroll { overflow:auto; }
.batch-preview-pane.preview-zoomed .batch-paper-sheet .batch-table-fit { width:var(--batch-source-width); }
.batch-preview-pane.preview-zoomed .batch-paper-sheet .batch-source-table { width:var(--batch-source-width)!important; max-width:none; }
.batch-prestart-signatures { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; width:100%; min-height:74px; }
.batch-prestart-signatures>div { min-width:0; padding:6px 9px; border:1px dashed #dfb5c5; border-radius:8px; background:#fffafd; }
.batch-prestart-signatures>div>strong { display:block; color:#aa3762; font:700 11px/1.3 sans-serif; }
.batch-prestart-signatures>div>small { display:block; margin-top:5px; color:#806b74; font:10px/1.35 sans-serif; }
.batch-prestart-signatures .batch-live-signature,.batch-prestart-signatures .batch-generated-signature { min-height:52px; }
.batch-prestart-signatures [data-prestart-qa-signature] { grid-template-columns:minmax(72px,1fr) auto; }
.batch-prestart-signatures [data-prestart-qa-comment] { grid-column:1/-1; margin-top:4px; color:#7b5867; font:10px/1.45 sans-serif; white-space:normal; overflow-wrap:anywhere; }
.batch-prestart-signature-line { display:grid; grid-template-columns:auto minmax(150px,1fr) auto minmax(150px,1fr); align-items:center; gap:4px 8px; width:100%; min-height:54px; text-align:left; }
.batch-prestart-signature-line>strong { color:#241d21; font:700 13px/1.2 sans-serif; white-space:nowrap; }
.batch-inline-signature-slot { display:grid; place-items:center; min-width:0; min-height:48px; padding:0 3px; border-bottom:1px solid #4b4145; text-align:center; }
.batch-inline-signature-slot>img { display:block; width:100%; max-width:155px; height:38px; margin:auto; object-fit:contain; object-position:center; }
.batch-inline-signature-slot>small { display:none; }
.batch-inline-signature-slot .batch-live-signature { min-height:40px; padding:0; }
.batch-inline-signature-slot .batch-live-signature img { height:36px; }
.batch-inline-signature-slot [data-prestart-qa-comment] { margin-top:2px; color:#7b5867; }
.batch-qa-review-preview { margin-bottom:18px; padding:12px; border:1px solid #efbfd0; border-radius:16px; background:#fff9fb; }
.batch-qa-review-preview .batch-table-scroll { max-height:46vh; overflow:auto; }
.batch-full-review-preview { margin:0 0 22px; padding:14px; border:2px solid #e9a9c0; border-radius:18px; background:#fff9fb; }
.batch-full-review-preview>.section-title { margin:16px 0 8px; }
.batch-full-review-preview .batch-sheet { margin:12px 0 0; padding:10px; background:#fff; }
.batch-full-review-preview .batch-table-scroll { max-height:64vh; overflow:auto; scrollbar-gutter:stable; }
.batch-full-review-preview .batch-paper-sheet .batch-source-table { max-width:none; }
dialog:has(.batch-full-review-preview) { width:min(1580px,calc(100vw - 24px)); max-height:calc(100dvh - 20px); }
dialog:has(.batch-full-review-preview) form { max-width:none; }
.batch-review-split { display:grid; grid-template-columns:minmax(0,1fr) minmax(440px,.86fr); gap:18px; align-items:start; }
.batch-review-preview-pane,.batch-review-entry-pane { min-width:0; }
.batch-review-preview-pane { position:sticky; top:0; }
.batch-review-preview-pane .batch-full-review-preview { margin:0; }
.batch-review-entry-pane .warehouse-responsibility-panel { margin:0; }
@media (min-width:901px) {
  /* Keep the original visible when a long continuation form reaches signatures. */
  .batch-review-split { max-height:68dvh; overflow:hidden; }
  .batch-review-split>.batch-review-preview-pane,
  .batch-review-split>.batch-review-entry-pane {
    position:static; max-height:68dvh; overflow:auto; overscroll-behavior:contain;
  }
  .batch-review-entry-pane>label { display:grid; gap:6px; margin-block:12px; }
  .batch-review-entry-pane>label>textarea { width:100%; min-height:80px; }
}
.warehouse-responsibility-panel { padding:18px; border-color:#e8c8d4; background:linear-gradient(145deg,#fffafd,#f9fffe); }
.warehouse-issue-workbench { display:grid; gap:14px; }
.warehouse-workbench-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 18px; border-left:6px solid #e93f80; border-radius:16px; background:linear-gradient(105deg,#fff0f6 0%,#fff 54%,#effcf9 100%); box-shadow:0 8px 24px rgba(194,54,109,.08); }
.warehouse-workbench-head>div { min-width:0; }
.warehouse-workbench-head small { color:#c02c65; font-weight:850; letter-spacing:.06em; }
.warehouse-workbench-head h3 { margin:4px 0 3px; font-size:20px; }
.warehouse-workbench-head p { margin:0; color:#71656b; line-height:1.55; }
.warehouse-workbench-progress { flex:0 0 auto; display:grid; place-items:center; min-width:92px; padding:10px 15px; border:1px solid #efb6ca; border-radius:15px; color:#a82d5b; background:#fff; }
.warehouse-workbench-progress strong { font-size:21px; font-variant-numeric:tabular-nums; }
.warehouse-workbench-progress span { color:#89727c; font-size:11px; }
.warehouse-step-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.warehouse-step-metrics>div { display:grid; grid-template-columns:auto auto; align-items:end; justify-content:start; gap:2px 6px; padding:12px 14px; border:1px solid #eadfe3; border-radius:13px; background:#fff; }
.warehouse-step-metrics small { grid-column:1/-1; color:#88747c; font-size:10px; }
.warehouse-step-metrics strong { color:#36252c; font-size:23px; line-height:1; font-variant-numeric:tabular-nums; }
.warehouse-step-metrics span { color:#88747c; font-size:10px; }
.warehouse-step-track { position:relative; height:8px; overflow:hidden; border-radius:999px; background:#eee8eb; }
.warehouse-step-track>span { display:block; width:var(--warehouse-progress); height:100%; border-radius:inherit; background:linear-gradient(90deg,#e63e7c,#ff9432,#39c8ac); transition:width .24s ease; }
.warehouse-issue-cards { display:block; }
.warehouse-issue-card { min-width:0; padding:15px; border:1px solid #e8dce1; border-top:5px solid #8bded0; border-radius:16px; background:#fff; box-shadow:0 7px 20px rgba(57,39,47,.06); transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease; }
.warehouse-issue-card.is-current { border-color:#7ed9c8; box-shadow:0 14px 34px rgba(34,151,129,.13); }
.warehouse-issue-card:focus-within { border-color:#d76a93; box-shadow:0 10px 28px rgba(201,61,114,.13); transform:translateY(-1px); }
.warehouse-issue-card.is-complete { border-top-color:#32b889; background:linear-gradient(145deg,#fff,#f1fcf8); }
.warehouse-issue-card.has-shortage:not(.is-complete) { border-top-color:#f19a38; }
.warehouse-issue-card.stock-blocked { border-top-color:#d95a67; background:#fff8f8; }
.warehouse-issue-card>header { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:10px; margin-bottom:12px; }
.warehouse-issue-card>header>span { display:grid; place-items:center; width:32px; height:32px; border-radius:11px; color:#fff; background:#ca3c72; font-weight:850; }
.warehouse-issue-card>header div { display:grid; min-width:0; }
.warehouse-issue-card>header small { color:#947b85; font-size:10px; overflow-wrap:anywhere; }
.warehouse-issue-card>header strong { overflow-wrap:anywhere; font-size:16px; }
.warehouse-issue-card>header output { padding:6px 9px; border-radius:999px; color:#a52e5b; background:#fff0f5; font-size:11px; font-weight:800; white-space:nowrap; }
.warehouse-issue-card.is-complete>header output { color:#087754; background:#dcf8ed; }
.warehouse-issue-card.has-shortage:not(.is-complete)>header output { color:#935100; background:#fff0d7; }
.warehouse-issue-card dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0 0 12px; }
.warehouse-issue-card dl div { padding:9px 11px; border-radius:11px; background:#f8f6f7; }
.warehouse-issue-card dt { color:#8b7981; font-size:10px; }
.warehouse-issue-card dd { margin:3px 0 0; font-weight:800; }
.warehouse-code-qr-pair { display:grid; grid-template-columns:minmax(0,1fr) 132px; gap:14px; align-items:center; margin:0 0 12px; padding:14px; border:1px solid #91dccd; border-radius:14px; background:linear-gradient(125deg,#effbf8,#fff); }
.warehouse-code-qr-pair>div:first-child { display:grid; gap:6px; min-width:0; }
.warehouse-code-qr-pair small { color:#168365; font-size:10px; font-weight:850; letter-spacing:.06em; }
.warehouse-code-qr-pair strong { overflow-wrap:anywhere; color:#173f35; font-size:16px; }
.warehouse-code-qr-pair p { margin:0; color:#65756f; font-size:11px; line-height:1.55; }
.warehouse-material-qr { display:grid; justify-items:center; gap:5px; margin:0; padding:8px; border:1px solid #d9eee9; border-radius:12px; color:#355f55; background:#fff; cursor:zoom-in; }
.warehouse-material-qr img { display:block; width:104px; height:104px; }
.warehouse-material-qr small { color:#5d756e; font-size:9px; text-align:center; }
.material-qr-button { display:inline-grid; justify-items:center; gap:4px; min-width:70px; padding:6px; border:1px solid #d9eee9; border-radius:10px; color:#39675d; background:#fff; cursor:zoom-in; }
.material-qr-button img { display:block; width:58px; height:58px; }
.material-qr-button small { font-size:9px; }
.material-qr-overlay { position:fixed; inset:0; z-index:10050; display:grid; place-items:center; padding:18px; background:rgba(24,17,21,.72); backdrop-filter:blur(7px); }
.material-qr-viewer { display:grid; grid-template-rows:auto minmax(260px,70vh) auto; width:min(680px,calc(100vw - 28px)); max-height:calc(100dvh - 28px); overflow:hidden; border:1px solid #f2c6d7; border-radius:24px; background:#fff; box-shadow:0 30px 90px rgba(0,0,0,.3); }
.material-qr-viewer>header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 20px; border-bottom:1px solid #f0dce4; }
.material-qr-viewer>header>div { display:grid; gap:3px; min-width:0; }
.material-qr-viewer>header small { color:#be3266; font-weight:800; }
.material-qr-viewer>header strong { overflow-wrap:anywhere; }
.material-qr-viewer>header button { display:grid; place-items:center; width:42px; height:42px; padding:0; border-radius:50%; font-size:28px; }
.material-qr-stage { display:grid; place-items:center; overflow:auto; padding:28px; background:linear-gradient(135deg,#fff8fb,#effbf8); }
.material-qr-stage img { display:block; width:240px; height:240px; max-width:none; transition:width .16s ease,height .16s ease; }
.material-qr-viewer>footer { display:flex; align-items:center; justify-content:center; gap:12px; padding:14px 18px; border-top:1px solid #f0dce4; }
.material-qr-viewer>footer output { min-width:70px; text-align:center; font-weight:800; font-variant-numeric:tabular-nums; }
.warehouse-internal-code-rule { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:4px 9px; margin:0 0 12px; padding:10px 12px; border:1px solid #91dccd; border-radius:11px; background:#effbf8; }
.warehouse-internal-code-rule b { padding:4px 7px; border-radius:999px; color:#08765a; background:#d6f4eb; font-size:9px; }
.warehouse-internal-code-rule span { overflow-wrap:anywhere; color:#173f35; font-weight:850; }
.warehouse-internal-code-rule small { grid-column:1/-1; color:#5d756e; font-size:10px; }
.warehouse-issue-card > label { display:grid; gap:6px; margin:12px 0; min-width:0; }
.warehouse-quantity-confirm { display:grid; grid-template-columns:auto minmax(0,1fr)!important; gap:10px; align-items:center; padding:12px 14px; border:1px solid #efc7d5; border-radius:12px; background:#fff8fb; cursor:pointer; }
.warehouse-quantity-confirm > span { display:grid; gap:4px; min-width:0; }
.warehouse-quantity-confirm input { width:20px!important; height:20px; margin:0; accent-color:#d83975; }
.warehouse-confirm-code { display:grid; gap:6px; padding:14px; border:1px solid #e6d9de; border-radius:12px; background:#fff; }
.warehouse-confirm-code>span { color:#4f4046; font-weight:800; }
.warehouse-confirm-code input { width:100%; min-height:46px; padding:10px 12px; border:1px solid #d9cbd1; border-radius:10px; text-align:center; font-size:17px; font-weight:850; letter-spacing:.3em; }
.warehouse-confirm-code input:focus { outline:3px solid rgba(216,57,117,.14); border-color:#d83975; }
.warehouse-next-only { width:100%; min-height:52px; }
.warehouse-issue-entry { display:grid; gap:11px; }
.warehouse-issue-entry>label { display:grid; gap:6px; min-width:0; }
.warehouse-issue-entry>label>span { color:#4f4046; font-size:12px; font-weight:750; }
.warehouse-issue-entry :is(select,input) { width:100%; min-width:0; box-sizing:border-box; }
.warehouse-issue-entry select { text-overflow:ellipsis; }
.warehouse-allocation-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.warehouse-allocation-head>span { color:#4f4046; font-size:12px; font-weight:800; }
.warehouse-allocation-head button { flex:0 0 auto; padding:7px 11px; white-space:nowrap; }
.warehouse-lot-allocations { display:grid; gap:7px; max-height:260px; padding-right:3px; overflow:auto; scrollbar-gutter:stable; }
.warehouse-lot-allocation { display:grid; grid-template-columns:minmax(0,1fr) minmax(118px,150px); align-items:center; gap:12px; padding:10px 11px; border:1px solid #e9dce1; border-radius:12px; background:#fff; }
.warehouse-lot-allocation:first-child { border-color:#86d9ca; background:#f3fcfa; }
.warehouse-lot-allocation>span { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:2px 7px; min-width:0; }
.warehouse-lot-allocation b { padding:3px 6px; border-radius:999px; color:#087758; background:#daf6ed; font-size:9px; white-space:nowrap; }
.warehouse-lot-allocation strong { min-width:0; overflow-wrap:anywhere; font-size:12px; }
.warehouse-lot-allocation small { grid-column:1/-1; color:#83737a; font-size:10px; overflow-wrap:anywhere; }
.warehouse-lot-allocation input { min-height:40px; text-align:right; font-weight:800; font-variant-numeric:tabular-nums; }
.warehouse-quantity-control { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.warehouse-quantity-control button { padding-inline:12px; white-space:nowrap; }
.warehouse-issue-entry small { color:#83737a; }
.warehouse-step-actions { display:grid; grid-template-columns:minmax(150px,.38fr) minmax(260px,.62fr); gap:10px; margin-top:4px; }
.warehouse-step-actions button { min-height:48px; }
.warehouse-step-rule { padding:9px 11px; border-radius:9px; color:#77666d!important; background:#f8f5f6; }
.warehouse-step-finished { display:grid; grid-template-columns:50px minmax(0,1fr) auto; align-items:center; gap:14px; padding:18px; border:1px solid #72d6bf; border-radius:16px; background:linear-gradient(110deg,#edfcf7,#fff 68%); box-shadow:0 10px 25px rgba(28,139,113,.1); }
.warehouse-step-finished>span { display:grid; width:46px; height:46px; place-items:center; border-radius:15px; color:#fff; background:#24a980; font-size:24px; font-weight:900; }
.warehouse-step-finished>div { display:grid; gap:3px; }
.warehouse-step-finished small { color:#168365; font-weight:800; }
.warehouse-step-finished strong { font-size:17px; }
.warehouse-step-finished p { margin:0; color:#74666c; line-height:1.55; }
.warehouse-final-confirmation { display:grid; gap:14px; margin-top:18px; padding:18px; border:2px solid #e7598b; border-radius:18px; background:linear-gradient(145deg,#fff5f8,#fff); box-shadow:0 14px 34px rgba(198,47,104,.1); }
.warehouse-final-head { display:grid; gap:4px; padding-bottom:12px; border-bottom:1px solid #f0ccd9; }
.warehouse-final-head small { color:#c9366c; font-weight:850; letter-spacing:.08em; }
.warehouse-final-head strong { font-size:19px; }
.warehouse-final-head p { margin:0; color:#77676e; }
.warehouse-original-preview { margin:18px 0 0; border:1px solid #e5ccd5; border-radius:16px; background:#fff; }
.warehouse-original-preview>summary { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 18px; color:#7d2850; cursor:pointer; list-style:none; }
.warehouse-original-preview>summary::-webkit-details-marker { display:none; }
.warehouse-original-preview>summary::after { content:"展开原表 ↓"; flex:0 0 auto; padding:6px 10px; border-radius:999px; background:#fff0f5; font-size:11px; font-weight:800; }
.warehouse-original-preview[open]>summary::after { content:"收起原表 ↑"; }
.warehouse-original-preview>summary span { font-weight:850; }
.warehouse-original-preview>summary small { flex:1; color:#8f7a82; }
.warehouse-original-preview>.batch-full-review-preview { margin:0 12px 12px; }
@media (max-width:900px) {
  .batch-review-split { grid-template-columns:1fr; }
  .batch-review-preview-pane { position:static; }
  .warehouse-workbench-head { align-items:flex-start; }
  .warehouse-original-preview>summary { align-items:flex-start; flex-wrap:wrap; }
  .warehouse-original-preview>summary small { flex-basis:70%; }
}
@media (max-width:560px) {
  .warehouse-responsibility-panel { padding:11px; }
  .warehouse-workbench-head { padding:13px; }
  .warehouse-workbench-head p { display:none; }
  .warehouse-quantity-control { grid-template-columns:1fr; }
  .warehouse-allocation-head { align-items:flex-start; flex-direction:column; }
  .warehouse-allocation-head button { width:100%; }
  .warehouse-lot-allocation { grid-template-columns:1fr; }
  .warehouse-code-qr-pair { grid-template-columns:1fr; }
  .warehouse-step-metrics { grid-template-columns:1fr 1fr 1fr; }
  .warehouse-step-actions { grid-template-columns:1fr; }
  .warehouse-step-finished { grid-template-columns:46px minmax(0,1fr); }
  .warehouse-step-finished button { grid-column:1/-1; width:100%; }
}
.batch-number-explainer { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:14px; align-items:center; margin:16px 0; padding:14px; border:1px solid #efc1d1; border-radius:16px; background:#fff; }.batch-number-explainer div { display:grid; gap:3px; padding:10px 12px; border-radius:12px; background:#fff7fa; }.batch-number-explainer strong { color:#b53463; }.batch-number-explainer span { color:var(--muted); }.batch-number-explainer>b { color:#d64c7e; font-size:22px; }.compounding-project-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(360px,1fr)); gap:16px; }.compounding-project-card { display:grid; gap:14px; padding:18px; border:1px solid #f0cbd8; border-radius:18px; background:#fff; box-shadow:0 10px 28px rgba(210,77,126,.08); }.compounding-project-head { display:flex; justify-content:space-between; gap:16px; }.compounding-project-head small { color:#cc4b79; font-weight:800; }.compounding-project-head h3 { margin:5px 0; font-size:20px; }.compounding-project-head p { margin:0; color:var(--muted); }.compounding-project-head>span { display:grid; grid-template-columns:auto auto; place-content:center; align-self:start; min-width:64px; height:58px; border-radius:16px; background:#fff0f6; color:#cc3e72; font-weight:800; }.compounding-project-head>span b { font-size:22px; }.compounding-project-head>span small { grid-column:1/-1; color:#9b7584; font-size:9px; text-align:center; }.compounding-current-step { display:grid; gap:4px; padding:13px 15px; border-left:5px solid #e65285; border-radius:12px; background:#fff2f7; }.compounding-current-step small { color:#c53c6e; font-weight:850; }.compounding-current-step strong { font-size:17px; }.compounding-current-step span { color:var(--muted); }.compounding-project-card dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }.compounding-project-card dl div { min-width:0; padding:10px; border-radius:12px; background:#f7f8f7; }.compounding-project-card dt { color:var(--muted); font-size:12px; }.compounding-project-card dd { margin:5px 0 0; overflow-wrap:anywhere; font-weight:750; }.project-complete-mark { color:#a63c68; }.batch-project-identity { position:sticky; top:0; z-index:4; display:flex; justify-content:space-between; gap:18px; align-items:center; margin:0 0 14px; padding:14px 16px; border:1px solid #efb7ca; border-radius:16px; background:rgba(255,248,251,.97); box-shadow:0 8px 24px rgba(210,77,126,.1); backdrop-filter:blur(10px); }.batch-project-identity small { color:#c84272; font-weight:800; }.batch-project-identity h3 { margin:4px 0; font-size:18px; }.batch-project-identity p { margin:0; color:var(--muted); }.batch-source-remark { position:relative; z-index:1; display:grid; gap:7px; margin:14px; }.batch-editor-editable .batch-source-remark textarea { position:relative; z-index:2; width:100%; min-height:88px; padding:12px 14px; border:1px solid #d9cbd1; border-radius:10px; color:#24162c; caret-color:#d4477a; background:#fff; pointer-events:auto; user-select:text; -webkit-user-select:text; touch-action:manipulation; resize:vertical; }.batch-editor-editable .batch-source-remark textarea:focus { outline:3px solid rgba(218,75,125,.18); border-color:#d84d7e; box-shadow:0 0 0 1px #d84d7e; }.batch-weighing-checks { display:grid; gap:10px; margin:14px; }.batch-weighing-checks label { display:grid; grid-template-columns:minmax(0,1fr) 150px; gap:12px; align-items:center; padding:12px; border:1px solid #f1d4df; border-radius:12px; background:#fffafd; }.batch-entry-pane .batch-critical-fields { overflow:visible; }.batch-entry-pane .batch-critical-fields>.table-scroll { max-height:50vh; overflow:auto; scrollbar-gutter:stable; }.batch-entry-pane .compact-table th { position:sticky; top:0; z-index:2; background:#fff2f7; }
.batch-locked-bom-table { table-layout:fixed; }
.batch-locked-bom-table th:first-child,.batch-locked-bom-table td:first-child { width:70px; text-align:center; }
.batch-locked-bom-table th:nth-child(2) { width:190px; }
.batch-locked-bom-table th:nth-child(4) { width:90px; }
.batch-locked-bom-table th:nth-child(5) { width:130px; }
.locked-bom-value { display:block; min-height:38px; padding:9px 10px; border:1px solid #eadfe3; border-radius:9px; color:#4e4348; background:#f8f6f7; line-height:1.45; overflow-wrap:anywhere; }
.locked-bom-value::after { content:"已锁定"; float:right; margin-left:8px; padding:1px 6px; border-radius:999px; color:#986579; background:#f2e7ec; font-size:9px; font-weight:750; }
.locked-bom-index { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:10px; color:#fff; background:#6d3b7b; }
.batch-edit-scope { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:14px; padding:16px 18px; border:1px solid #bce9dd; border-left:6px solid #39bfa4; border-radius:14px; background:linear-gradient(120deg,#f3fffb,#fff8fb); }
.batch-edit-scope div { min-width:0; }
.batch-edit-scope small { margin:0 0 3px; color:#277a69; font-weight:800; letter-spacing:.08em; }
.batch-edit-scope strong { display:block; color:#282126; font-size:17px; }
.batch-edit-scope p { margin:5px 0 0; color:#6f6469; line-height:1.6; }
.batch-edit-scope>span { display:grid; place-items:center; flex:0 0 auto; min-width:58px; height:58px; border-radius:18px; color:#fff; background:linear-gradient(135deg,#40c9ad,#6d3b7b); font-weight:850; box-shadow:0 8px 20px rgba(74,136,126,.2); }
.batch-material-issue-entry .batch-source-remark { padding:14px; border:1px solid #efc4d4; border-radius:14px; background:#fffafd; }
.batch-material-issue-entry .batch-source-remark>span { color:#382d33; font-weight:800; }
.batch-locked-reference { margin:16px 14px 14px; border:1px solid #e7dde1; border-radius:14px; background:#fbfafb; overflow:hidden; }
.batch-locked-reference>summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; cursor:pointer; list-style:none; }
.batch-locked-reference>summary::-webkit-details-marker { display:none; }
.batch-locked-reference>summary span { display:grid; gap:2px; }
.batch-locked-reference>summary small { margin:0; color:#8a7b82; font-weight:500; }
.batch-locked-reference>summary em { flex:0 0 auto; padding:5px 9px; border-radius:999px; color:#765d68; background:#eee8eb; font-size:10px; font-style:normal; font-weight:800; }
.batch-locked-reference[open]>summary { border-bottom:1px solid #e7dde1; }
.batch-locked-reference .controlled-edit-note { margin:12px; }
.batch-locked-reference .table-scroll { margin:0 12px 12px; width:calc(100% - 24px); }
.batch-bom-loading-row td { height:82px; text-align:center; }
.batch-bom-loading { display:inline-flex; align-items:center; gap:9px; color:#806c75; }
.batch-bom-loading::before { content:""; width:10px; height:10px; border:2px solid #efb7ca; border-top-color:#d84d7e; border-radius:50%; animation:batch-bom-spin .8s linear infinite; }
@keyframes batch-bom-spin { to { transform:rotate(360deg); } }
.compounding-batch-lock { display:grid; grid-template-columns:minmax(190px,.55fr) minmax(260px,1fr); gap:10px 14px; align-items:center; padding:14px; border:1px solid #efb4c9; border-radius:13px; background:#fff7fa; }.compounding-batch-lock>div { display:grid; gap:3px; }.compounding-batch-lock span { color:#a8305c; font-weight:850; }.compounding-batch-lock input { width:100%; min-width:0; box-sizing:border-box; padding:12px 13px; border:1px solid #d98aa8; border-radius:9px; background:#fff; font:inherit; font-weight:800; text-transform:uppercase; }.compounding-batch-lock small,.compounding-batch-lock p { color:var(--muted); }.compounding-batch-lock p { grid-column:1/-1; margin:0; font-size:11px; line-height:1.55; }
.compounding-project-head>span { display:inline-flex; align-items:center; min-width:auto; height:auto; padding:8px 12px; border-radius:999px; font-size:12px; }.compounding-stepper { display:grid; grid-template-columns:auto minmax(20px,1fr) auto minmax(20px,1fr) auto; align-items:center; gap:8px; padding:12px 4px; }.compounding-stepper span { display:flex; align-items:center; gap:7px; color:#9b8d93; font-size:12px; font-weight:750; white-space:nowrap; }.compounding-stepper span b { display:grid; place-items:center; width:25px; height:25px; border:1px solid #decbd3; border-radius:50%; background:#fff; color:#8e7b83; }.compounding-stepper span.reached b { border-color:#e46b96; background:#fff0f6; color:#c83f70; }.compounding-stepper span.current { color:#a72d59; }.compounding-stepper span.current b { background:#e65285; color:#fff; box-shadow:0 0 0 4px #fde7ef; }.compounding-stepper i { height:2px; background:#eadce2; }.compounding-project-card dl { grid-template-columns:repeat(3,minmax(0,1fr)); }.compounding-project-action { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; padding:14px; border-radius:14px; background:#fff4f8; }.compounding-project-action>div { display:grid; gap:3px; }.compounding-project-action small { color:#c33d6d; font-weight:850; }.compounding-project-action strong { font-size:17px; }.compounding-project-action p { margin:0; color:var(--muted); font-size:11px; }.compounding-project-action button { min-width:230px; }.batch-number-entry { display:grid; gap:8px; margin:0 0 14px; padding:16px; border:1px solid #e9aac1; border-radius:15px; background:#fff7fa; }.batch-number-entry span { color:#a72d59; font-size:15px; font-weight:850; }.batch-number-entry input { width:100%; box-sizing:border-box; padding:13px 14px; border:1px solid #d37c9c; border-radius:10px; background:#fff; font:inherit; font-weight:800; text-transform:uppercase; }.batch-number-entry small { color:var(--muted); line-height:1.55; }

.batch-auto-identity { padding:10px 12px; border:1px solid #d7c3df; border-radius:8px; background:#f8f1fa; }
.batch-auto-cell,[data-batch-auto][readonly] { color:#4f245d; font-weight:700; background:#f6edf8; border-color:#8b5799; cursor:not-allowed; }
.batch-generated-sheet { border-color:#bca2c4; box-shadow:0 8px 22px rgba(64,34,73,.08); }
.batch-generated-value { display:block; min-height:20px; padding:2px 4px; color:#241d21; background:transparent; text-align:center; white-space:pre-wrap; overflow-wrap:anywhere; }
.batch-generated-blank { display:block; width:100%; min-height:20px; margin:0; background:transparent; }
.instruction-electronic-sheet { border:2px solid #65406f; border-radius:6px; box-shadow:0 12px 30px rgba(64,34,73,.12); }
.instruction-electronic-sheet .batch-table-scroll { max-height:none; overflow-x:auto; border:1px solid #2f2531; }
.production-instruction-online-table { width:100%; min-width:980px; transform:none; table-layout:fixed; }
.production-instruction-online-table th,.production-instruction-online-table td { min-height:34px; padding:7px 9px; border:1px solid #292329; text-align:center; vertical-align:middle; }
.production-instruction-online-table th { font-weight:700; background:#fff; }
.production-instruction-online-table .instruction-code { padding:4px 8px; text-align:left; font-size:11px; }
.production-instruction-online-table .instruction-company { padding:10px; font-size:23px; letter-spacing:.08em; }
.production-instruction-online-table .instruction-title { padding:8px; font-size:20px; letter-spacing:.35em; }
.production-instruction-online-table .instruction-section { padding:8px; font-size:16px; letter-spacing:.1em; background:#fffafc; }
.instruction-electronic-signatures { margin:16px 0 8px; padding:16px; border:1px solid #bca2c4; border-radius:10px; background:#fbf8fc; }
.instruction-electronic-signatures h4 { margin:0 0 12px; }
.instruction-signature-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.instruction-signature-grid article { display:grid; align-content:start; min-height:145px; padding:12px; border:1px solid #d7cbd9; background:#fff; }
.instruction-signature-grid span,.instruction-signature-grid small { color:var(--muted); }
.instruction-signature-grid img { display:block; width:100%; height:72px; margin:8px 0; object-fit:contain; border-bottom:1px solid #ddd; }
.instruction-signature-grid b { margin-top:6px; }
@media (max-width:760px) { .instruction-signature-grid { grid-template-columns:1fr; } }

@media (max-width: 1100px) {
  .workflow-test-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workflow-test-detail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .business-detail { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .batch-template-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.batch-record-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .permission-group-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .smart-list { grid-template-columns: 1fr; }
  .duty-card { grid-template-columns: 100px 1fr 140px; }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: repeat(2, 1fr); }
  .compliance-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .workflow-test-hero { align-items:flex-start; flex-direction:column; padding:19px 16px; }
  .workflow-test-hero button { width:100%; }
  .workflow-test-summary { grid-template-columns:1fr; }
  .workflow-test-progress { grid-column:1; }
  .workflow-test-step { grid-template-columns:38px minmax(0,1fr); }
  .workflow-test-actions { grid-column:2; text-align:left; }
  .workflow-test-title { flex-wrap:wrap; }
  .workflow-test-title span { min-width:0; }
  .workflow-test-detail-grid { grid-template-columns:1fr; }
  dialog { width:calc(100vw - 12px); max-height:calc(100dvh - 12px); border-radius:12px; }
  dialog form,.receipt-detail { padding:18px 14px; }
  .batch-template-grid,.batch-record-meta,.batch-export-grid,.request-group-summary,.batch-online-grid { grid-template-columns:1fr; }.batch-center-intro,.batch-save-bar,.batch-online-intro { align-items:flex-start; flex-direction:column; }.batch-editor-panel { padding:10px; }.batch-sheet,.batch-online-section { padding:12px; }
  .permission-group-grid { grid-template-columns: 1fr; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 20; left: 0; transform: translateX(-100%); transition: .2s ease; width: 252px; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.2); }
  .topbar { padding: 0 14px; }
  .mobile-menu { display: block; border: 0; background: transparent; font-size: 20px; }
  .breadcrumb span, .breadcrumb b, .global-search, .icon-button { display: none; }
  main { padding: 20px 14px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .metrics, .module-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .flow-step:nth-child(3)::after { display: none; }
  .data-panel { overflow-x: auto; }
  .data-table { min-width: 760px; }
  .workspace::before { inset:64px 0 0; }
  .topbar::after { display:none; }
  .message-inbox-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .message-inbox-toolbar { align-items:stretch; flex-direction:column; }
  .message-inbox-tools { align-items:stretch; flex-direction:column; }
  .message-search { width:100%; }
  .message-inbox-caption { align-items:flex-start; flex-direction:column; }
  .message-inbox-item { grid-template-columns:10px minmax(0,1fr); padding:14px 12px; }
  .message-inbox-state { grid-column:2; min-width:0; display:flex; align-items:center; gap:8px; justify-content:flex-end; justify-items:stretch; }
  .message-inbox-title { align-items:flex-start; flex-wrap:wrap; }
  .message-inbox-title strong { width:100%; white-space:normal; }
  .message-preview { display:-webkit-box; white-space:normal; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  .toolbar { flex-wrap: wrap; }
  .quick-grid { grid-template-columns: 1fr; }
  .form-grid, .detail-summary, .business-detail { grid-template-columns: 1fr; }
  .org-branches { grid-template-columns: 1fr; margin-top: 20px; }
  .org-branches::before, .org-department::before { display: none; }
  .org-tools { justify-content: flex-start; }
  .compliance-grid { grid-template-columns: 1fr; }
  .smart-radar-head { align-items: flex-start; }.smart-stats { align-items: flex-start; flex-wrap: wrap; }.smart-stats small { width: 100%; margin-left: 0; }.smart-item { grid-template-columns: 31px 1fr; }.smart-item button { grid-column: 2; justify-self: start; padding: 0; }
  .duty-card { grid-template-columns: 1fr; }.duty-frequency { text-align: left; }.duty-action { justify-items: start; }
  .flow-command { align-items:start; padding:18px 16px; }.flow-command .head-tools { justify-content:stretch; }.flow-command .head-tools button { flex:1 1 220px; }.flow-matrix { grid-template-columns:1fr; }.flow-matrix>div { grid-template-columns:80px 1fr; }.procurement-subflow { grid-template-columns:1fr 1fr; }.flow-order-summary { grid-template-columns:1fr 1fr; }.turnover-stage { grid-template-columns:38px 1fr; }.stage-actions { grid-column:2; text-align:left; }.stage-title { flex-wrap:wrap; }.stage-title span { min-width:0; }
  .purchase-overview { grid-template-columns:1fr; }.purchase-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.purchase-progress { align-items:flex-start; flex-direction:column; gap:4px; }.purchase-card-order,.purchase-card-material { grid-template-columns:1fr; }.purchase-item-card footer { align-items:stretch; flex-direction:column; }.purchase-card-actions { justify-content:stretch; }.purchase-card-actions button { flex:1 1 100%; width:100%; }.purchase-batch-detail { width:calc(100vw - 14px); }
}
@media (max-width: 1180px) {
  .batch-split-editor { grid-template-columns:1fr; }
  .batch-preview-pane,.batch-entry-pane { position:static; max-height:none; overflow:visible; }
  .batch-editor-fullscreen .batch-split-editor { grid-template-columns:1fr; grid-template-rows:minmax(220px,42%) minmax(0,58%); }
  .batch-editor-fullscreen .batch-preview-pane,.batch-editor-fullscreen .batch-entry-pane { overflow:auto; }
  .batch-split-editor.entry-focus { grid-template-rows:1fr!important; }
  .weighing-workbench-head { align-items:stretch; flex-direction:column; }
  .weighing-workbench-head button { width:100%; }
  .weighing-item-switcher { position:static; grid-template-columns:1fr 1fr; }
  .weighing-item-switcher label,.weighing-item-switcher output { grid-column:1/-1; }
  .weighing-entry-grid { grid-template-columns:1fr; }
  .weighing-site-checks .batch-weighing-checks label { grid-template-columns:1fr; }
}
.pmc-form-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 2px;
  padding: 12px 16px;
  border: 1px solid #b9a7c4;
  border-left: 5px solid #5d2f6f;
  background: #f7f2f9;
  color: #321b3b;
}

.pmc-form-section-title span {
  font-size: 1.05rem;
  font-weight: 800;
}

.pmc-form-section-title small {
  color: #6f6471;
}

.pmc-instruction-workspace {
  display:grid;
  /* The two panes must shrink with the dialog.  Fixed minimum column widths
     pushed the entry fields outside the viewport at browser zoom levels. */
  grid-template-columns:minmax(0,.86fr) minmax(0,1.14fr);
  gap:18px;
  align-items:stretch;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  min-width:0;
}

.pmc-instruction-preview-pane,
.pmc-instruction-entry-pane {
  min-width:0;
  min-height:0;
  height:100%;
  max-height:none;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

dialog:has(> .pmc-instruction-form) { overflow:hidden; }

.pmc-instruction-form {
  display:flex;
  flex-direction:column;
  height:calc(100dvh - 32px);
  max-height:calc(100dvh - 32px);
  overflow:hidden;
}

.pmc-instruction-form>.dialog-head,
.pmc-instruction-form>p,
.pmc-instruction-form>.form-actions { flex:0 0 auto; }

.pmc-instruction-preview-pane {
  position:relative;
  z-index:2;
  padding:14px;
  border:1px solid #efb7ca;
  border-radius:14px;
  background:#fffafb;
  box-shadow:0 12px 30px rgba(176,46,94,.08);
}

.pmc-instruction-entry-pane {
  padding:14px;
  border:1px solid #edd8e0;
  border-radius:14px;
  background:#fff;
  scroll-padding-top:132px;
}

.pmc-instruction-preview-pane::-webkit-scrollbar,
.pmc-instruction-entry-pane::-webkit-scrollbar { width:13px; }
.pmc-instruction-preview-pane::-webkit-scrollbar-track,
.pmc-instruction-entry-pane::-webkit-scrollbar-track { border-radius:999px; background:#f9eaf0; }
.pmc-instruction-preview-pane::-webkit-scrollbar-thumb,
.pmc-instruction-entry-pane::-webkit-scrollbar-thumb { border:3px solid #f9eaf0; border-radius:999px; background:#de6e96; }

.pmc-entry-sticky-head {
  position:sticky;
  top:0;
  z-index:7;
  display:grid;
  gap:10px;
  margin:0 0 16px;
  padding:14px;
  border-bottom:1px solid #efc5d4;
  background:rgba(255,250,252,.97);
  box-shadow:0 8px 18px rgba(173,55,98,.08);
  backdrop-filter:blur(8px);
}
.pmc-entry-sticky-head>div { display:grid; grid-template-columns:auto 1fr; align-items:baseline; gap:4px 10px; }
.pmc-entry-sticky-head small { color:#c43e70; font-weight:850; letter-spacing:.08em; }
.pmc-entry-sticky-head strong { color:#2f252a; font-size:17px; }
.pmc-entry-sticky-head span { grid-column:1/-1; color:#817177; font-size:11px; }
.pmc-entry-sticky-head nav { display:flex; flex-wrap:nowrap; gap:6px; max-width:100%; overflow-x:auto; scrollbar-width:thin; }
.pmc-entry-sticky-head nav button { flex:0 0 auto; }
.pmc-entry-sticky-head button { min-height:32px; padding:6px 10px; border:1px solid #ebbbcd; border-radius:999px; color:#a83961; background:#fff; font-size:11px; font-weight:800; }
.pmc-entry-sticky-head button:hover,
.pmc-entry-sticky-head button.active { color:#fff; border-color:#db4b7d; background:#db4b7d; }

.pmc-instruction-entry-pane .regulatory-guidance.compact { grid-template-columns:1fr; gap:8px; }
.pmc-instruction-entry-pane fieldset { margin:0 0 16px; padding:18px; border-color:#edcada; background:#fffdfd; }
.pmc-instruction-entry-pane fieldset>legend { padding:0 10px; color:#c53f70; font-size:14px; }
.pmc-instruction-entry-pane .form-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
.pmc-instruction-entry-pane .form-grid>label { display:grid; gap:7px; }
.pmc-instruction-entry-pane .form-grid>label>span { color:#4b3e43; font-size:12px; font-weight:800; }
.pmc-instruction-entry-pane input,
.pmc-instruction-entry-pane select,
.pmc-instruction-entry-pane textarea { width:100%; min-width:0; font-size:15px; }
.pmc-instruction-entry-pane input,
.pmc-instruction-entry-pane select { min-height:46px; }
.pmc-instruction-entry-pane textarea { min-height:110px; resize:vertical; }
.pmc-instruction-entry-pane input:focus,
.pmc-instruction-entry-pane select:focus,
.pmc-instruction-entry-pane textarea:focus { outline:3px solid rgba(218,75,125,.18); border-color:#d84d7e; box-shadow:0 0 0 1px #d84d7e; }
.pmc-instruction-entry-pane input[readonly] { color:#75666b; background:#f5f1f3; }
.pmc-entry-section-marker { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0 0; padding:11px 13px; border-left:5px solid #df4f80; border-radius:9px; color:#ae315f; background:#fff0f5; }
.pmc-entry-section-marker span { font-size:14px; font-weight:900; }
.pmc-entry-section-marker small { color:#8a747c; font-size:10px; }

.pmc-live-sheet-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.pmc-live-sheet-head div { display:grid; gap:2px; }
.pmc-live-sheet-head small { color:#c33d6f; font-weight:800; letter-spacing:.08em; }
.pmc-live-sheet-head strong { font-size:18px; }
.pmc-live-sheet-head>span { padding:5px 9px; border-radius:999px; color:#a42d59; background:#ffe7ef; font-size:11px; font-weight:750; }
.pmc-live-table-wrap { overflow:hidden; border:1px solid #2f2531; background:#fff; }
.pmc-live-table { min-width:0; font-size:10px; }
.pmc-live-table th,.pmc-live-table td { padding:5px 6px; line-height:1.35; overflow-wrap:anywhere; }
.pmc-live-table .instruction-company { font-size:16px; }
.pmc-live-table .instruction-title { font-size:15px; }
.pmc-live-table .instruction-section { font-size:12px; }
.pmc-live-table .instruction-section em { float:right; color:#c33d6f; font-size:9px; font-style:normal; font-weight:700; letter-spacing:0; }
.pmc-live-value { display:block; min-height:14px; color:#2d2529; font-weight:700; white-space:pre-wrap; }
.pmc-live-sheet-note { margin:10px 2px 0; color:#796d72; font-size:11px; line-height:1.6; }
.pmc-live-signature-slot { display:flex; align-items:center; justify-content:center; width:100%; min-height:24px; }
.pmc-live-signature-slot img { display:block; width:auto; max-width:92%; height:22px; object-fit:contain; }

.instruction-review-live-workspace { display:grid; grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr); gap:18px; align-items:start; }
.instruction-review-live-preview { min-width:0; max-height:calc(100dvh - 260px); padding:12px; overflow:auto; border:1px solid #efb7ca; border-radius:14px; background:#fffafb; }
.instruction-review-live-entry { min-width:0; }
.instruction-review-live-entry fieldset { margin-top:0; }

@media (max-width: 1180px) {
  dialog:has(> .pmc-instruction-form) { overflow-y:auto; }
  .pmc-instruction-form { height:auto; max-height:none; overflow:visible; }
  .pmc-instruction-workspace { grid-template-columns:1fr; overflow:visible; }
  .pmc-instruction-preview-pane,
  .pmc-instruction-entry-pane { height:min(68dvh,720px); min-height:420px; }
  .instruction-review-live-workspace { grid-template-columns:1fr; }
  .instruction-review-live-preview { max-height:55dvh; }
}

@media (max-width: 900px) {
  .pmc-form-section-title,
  .pmc-plan-title { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* 订单周转智能选择与当前办理摘要 */
.flow-order-bar { padding:18px; overflow:hidden; }
.flow-order-tools { display:grid; grid-template-columns:minmax(250px,1.6fr) minmax(150px,.65fr) minmax(150px,.65fr) auto; gap:10px; align-items:end; margin-bottom:12px; }
.flow-order-tools label { display:grid; gap:5px; min-width:0; }
.flow-order-tools label>span { color:#75677a; font-size:9px; font-weight:700; }
.flow-order-tools input,.flow-order-tools select { width:100%; min-width:0; height:40px; padding:0 12px; border:1px solid #d8ccdc; border-radius:9px; color:#382d3c; background:#fff; }
.flow-order-tools input:focus,.flow-order-tools select:focus { outline:2px solid rgba(105,69,120,.18); border-color:#7c5888; }
.flow-order-tools output { align-self:center; padding-top:14px; color:#765184; font-size:10px; font-weight:700; white-space:nowrap; }
.flow-order-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(235px,1fr)); gap:9px; max-height:305px; overflow-x:hidden; overflow-y:auto; padding:2px 3px 10px 2px; scrollbar-color:#b49fbb #f1ecf3; }
.flow-order-list.is-empty::after { content:"没有符合条件的订单，请调整搜索或筛选条件"; grid-column:1/-1; padding:28px; border:1px dashed #d9cedd; border-radius:10px; color:#807284; text-align:center; background:#fbf9fc; }
.flow-order-choice { display:grid; gap:5px; min-width:0; min-height:105px; padding:12px 14px; border-radius:11px; transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease; }
.flow-order-choice[hidden] { display:none !important; }
.flow-order-choice:hover { border-color:#9d83a6; transform:translateY(-1px); box-shadow:0 8px 20px rgba(69,42,78,.08); }
.flow-order-choice-top { display:flex !important; align-items:center; justify-content:space-between; gap:8px; margin:0 !important; opacity:1 !important; }
.flow-order-choice-top strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.flow-order-choice-top em { flex:none; padding:3px 7px; border-radius:11px; color:#47705e; background:#e9f3ee; font-size:8px; font-style:normal; font-weight:700; }
.flow-order-choice-top em.due-soon { color:#8a5c1d; background:#fff0d9; }
.flow-order-choice-top em.overdue { color:#9a3e3a; background:#fde8e6; }
.flow-order-choice>b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#29242b; font-size:11px; text-align:left; }
.flow-order-choice>span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#766d79; font-size:9px; opacity:1; }
.flow-order-choice.active .flow-order-choice-top em { color:#fff; background:rgba(255,255,255,.18); }
.flow-order-choice.active>b,.flow-order-choice.active>span:last-child { color:#fff; }
.flow-selected-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:15px; padding-top:15px; border-top:1px solid #e8e0ea; }
.flow-selected-head small { color:#806d86; letter-spacing:.08em; }
.flow-selected-head h2 { margin:3px 0 2px; color:#38243f; font-size:19px; }
.flow-selected-head p { margin:0; color:#7c717f; font-size:10px; }
.flow-selected-badges { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.flow-selected-badges span { padding:5px 9px; border-radius:14px; color:#654272; background:#eee7f1; font-size:9px; font-weight:700; }
.flow-selected-badges span.ok { color:#28664e; background:#e6f2ec; }.flow-selected-badges span.warning { color:#8a5c1d; background:#fff0d9; }.flow-selected-badges span.danger { color:#963e39; background:#fde8e6; }
.flow-order-summary { grid-template-columns:repeat(5,minmax(0,1fr)); margin-top:12px; }
.flow-order-summary>div { min-width:0; min-height:76px; display:flex; flex-direction:column; justify-content:center; padding:12px 14px; }
.flow-order-summary strong,.flow-order-summary small { overflow-wrap:anywhere; }
.flow-order-summary small { margin-top:4px; color:#8d818f; font-size:8px; }
.flow-smart-current { display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:13px; align-items:center; margin-top:14px; padding:14px 16px; border:1px solid #d6c4dc; border-left:4px solid #6a4678; border-radius:11px; background:linear-gradient(105deg,#faf6fb,#fff); }
.flow-smart-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; color:#fff; background:#694578; font-size:20px; font-weight:800; }
.flow-smart-current small { color:#775882; font-weight:700; }.flow-smart-current h3 { margin:3px 0; color:#302534; font-size:15px; }.flow-smart-current p { margin:0; color:#626965; font-size:10px; }
.flow-smart-notes { display:flex; flex-wrap:wrap; gap:6px; margin-top:7px; }.flow-smart-notes span { padding:3px 7px; border-radius:10px; color:#68546f; background:#eee7f1; font-size:8px; }.flow-smart-notes span.ok { color:#28664e; background:#e5f2eb; }.flow-smart-notes span.warning { color:#8a5c1d; background:#fff0d9; }
.flow-smart-current>button { padding:9px 12px; border:1px solid #765184; border-radius:8px; color:#fff; background:#694578; white-space:nowrap; }
.turnover-stage.is-highlighted { border-color:#7b5688; box-shadow:0 0 0 4px rgba(105,69,120,.15),0 12px 30px rgba(69,42,78,.12); transition:.2s ease; }
.flow-arrival-status { display:grid; grid-template-columns:112px minmax(0,1fr) auto; gap:18px; align-items:center; margin-top:15px; padding:18px; border:2px solid #ed7ca2; border-left:7px solid #e34f7d; border-radius:14px; background:linear-gradient(105deg,#fff0f6,#fff); box-shadow:0 10px 28px rgba(201,58,105,.11); }
.flow-arrival-step { align-self:stretch; display:flex; flex-direction:column; justify-content:center; padding:12px; border-radius:11px; color:#fff; background:linear-gradient(135deg,#ef739d,#d94675); text-align:center; }.flow-arrival-step small { color:#fff; opacity:.9; font-weight:700; }.flow-arrival-step b { margin-top:5px; font-size:19px; }
.flow-arrival-main>small { color:#c1436f; font-weight:800; letter-spacing:.08em; }.flow-arrival-main>h3 { margin:3px 0; color:#2e2228; font-size:19px; }.flow-arrival-main>p { margin:0; color:#65605f; font-size:10px; }
.flow-arrival-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:12px; }.flow-arrival-grid>div { min-width:0; padding:9px 10px; border:1px solid #f1d8e2; border-radius:9px; background:#fff; }.flow-arrival-grid span,.flow-arrival-grid strong,.flow-arrival-grid small { display:block; overflow-wrap:anywhere; }.flow-arrival-grid span { color:#9a7784; font-size:8px; }.flow-arrival-grid strong { margin-top:3px; color:#392e33; font-size:10px; }.flow-arrival-grid small { margin-top:2px; color:#8e8588; font-size:8px; }
.flow-arrival-actions { align-self:stretch; display:flex; flex-direction:column; justify-content:center; gap:8px; min-width:158px; }.flow-arrival-actions button { width:100%; padding:10px 13px; border:1px solid #e1a8bb; border-radius:9px; color:#b23f67; background:#fff; white-space:nowrap; }.flow-arrival-actions button.primary { border-color:#dd4775; color:#fff; background:linear-gradient(135deg,#ef739d,#dc4776); box-shadow:0 7px 18px rgba(220,71,118,.18); }
.flow-arrival-status.finished { border-color:#a9d5c1; border-left-color:#4a9874; background:linear-gradient(105deg,#effaf5,#fff); }.flow-arrival-status.finished .flow-arrival-step { background:linear-gradient(135deg,#64ad8b,#378464); }
.flow-live-activity { margin-top:12px; padding:11px; border:1px solid #f0d3df; border-radius:11px; background:rgba(255,255,255,.82); }
.flow-live-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }.flow-live-head div>* { display:block; }.flow-live-head small { color:#c1436f; font-size:8px; font-weight:800; letter-spacing:.08em; }.flow-live-head strong { margin-top:2px; color:#372b31; font-size:11px; }.flow-live-head>span { padding:4px 7px; border-radius:10px; color:#8d6f7b; background:#fff1f6; font-size:8px; white-space:nowrap; }
.flow-live-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }.flow-live-list article { min-width:0; display:grid; grid-template-columns:10px minmax(0,1fr); gap:9px; align-items:start; padding:9px 10px; border:1px solid #f2e1e8; border-radius:9px; background:#fff; }.flow-live-list article>i { width:9px; height:9px; margin-top:4px; border-radius:50%; background:#42a978; box-shadow:0 0 0 4px rgba(66,169,120,.14); animation:flow-live-pulse 1.8s ease-in-out infinite; }.flow-live-list article>div>* { display:block; overflow-wrap:anywhere; }.flow-live-list article strong { color:#30262b; font-size:10px; }.flow-live-list article span { margin-top:1px; color:#8a7c82; font-size:8px; }.flow-live-list article b { margin-top:5px; color:#d14170; font-size:10px; }.flow-live-list article small { margin-top:3px; color:#94878c; font-size:8px; }.flow-live-list article.idle>i { background:#d4a14f; box-shadow:0 0 0 4px rgba(212,161,79,.14); animation:none; }.flow-live-list article.idle b { color:#806b74; }
@keyframes flow-live-pulse { 0%,100% { transform:scale(.82); opacity:.7; } 50% { transform:scale(1.12); opacity:1; } }
.turnover-stage.current-arrival { position:relative; border:2px solid #ed7ca2; border-left:7px solid #e34f7d; background:#fff6f9; box-shadow:0 9px 26px rgba(201,58,105,.10); }.stage-arrival-marker { display:inline-flex; margin-bottom:7px; padding:4px 9px; border-radius:12px; color:#fff; background:#e34f7d; font-size:9px; letter-spacing:.04em; }

/* 原料效期雷达：90/60/30天分级预警 */
.material-radar { margin-top:18px; padding:20px; border:1px solid #dfd4e3; border-radius:15px; background:linear-gradient(135deg,#fff,#fbf8fc); box-shadow:0 10px 30px rgba(53,25,67,.06); }
.material-radar-head { display:flex; align-items:center; justify-content:space-between; gap:22px; }
.material-radar-head small { color:#70457d; font-weight:800; letter-spacing:.14em; }
.material-radar-head h2 { margin:5px 0 3px; font:700 21px Georgia,"Songti SC",serif; }
.material-radar-head p { max-width:760px; margin:0; color:var(--muted); font-size:10px; line-height:1.6; }
.material-radar-total { min-width:112px; padding:12px 16px; border-radius:12px; text-align:center; color:#fff; background:#5e3a6b; }
.material-radar-total strong,.material-radar-total span { display:block; }.material-radar-total strong { font-size:25px; }.material-radar-total span { font-size:8px; opacity:.8; }
.material-radar-levels { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:16px 0 11px; }
.material-radar-levels>div { display:flex; align-items:center; gap:10px; padding:10px 13px; border-radius:10px; }
.material-radar-levels b { font-size:21px; }.material-radar-levels span { font-size:10px; font-weight:700; }
.material-radar-levels .yellow { color:#76590a; background:#fff4bd; }.material-radar-levels .orange { color:#8a4514; background:#ffe1be; }.material-radar-levels .red { color:#8d302d; background:#fbd5d2; }
.material-radar-list { display:grid; gap:8px; }
.material-radar-list article { display:grid; grid-template-columns:12px minmax(0,1fr) 150px auto; gap:12px; align-items:center; padding:12px 14px; border:1px solid #e1d9e4; border-left:4px solid #d9b932; border-radius:10px; background:#fff; content-visibility:auto; contain-intrinsic-size:70px; }
.material-radar-list article.orange { border-left-color:#e18331; }.material-radar-list article.red { border-left-color:#c9514b; background:#fffafa; }
.material-radar-dot { width:9px; height:9px; border-radius:50%; background:#d9b932; box-shadow:0 0 0 4px #fff4bd; }
.orange .material-radar-dot { background:#e18331; box-shadow:0 0 0 4px #ffe8ce; }.red .material-radar-dot { background:#c9514b; box-shadow:0 0 0 4px #fde1df; }
.material-radar-list small { color:#8b6d24; font-weight:700; }.material-radar-list .orange small { color:#9a531e; }.material-radar-list .red small { color:#a33f3a; }
.material-radar-list h3 { margin:3px 0; color:#35293a; font-size:14px; }.material-radar-list p { margin:0; color:#717975; font-size:9px; }
.material-radar-due { text-align:right; }.material-radar-due strong,.material-radar-due span { display:block; }.material-radar-due strong { color:#593963; }.material-radar-due span { margin-top:3px; color:var(--muted); font-size:8px; }
.material-radar-list button { padding:8px 10px; border:1px solid #765184; border-radius:8px; color:#654272; background:#fff; white-space:nowrap; }
.material-radar-scope { padding:5px 8px; border-radius:10px; color:#69566f; background:#f0e9f2; font-size:8px; white-space:nowrap; }


/* 岗位专用业务工作台：客户、订单、打样和业务状况不再共用难读的大表格。 */
.smart-work-hero { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:14px; padding:18px 20px; overflow:hidden; border:1px solid #efc9d7; border-radius:15px; background:linear-gradient(120deg,#fff,#fff0f5); box-shadow:0 9px 25px rgba(207,70,115,.08); }
.smart-work-hero>div:first-child { min-width:0; display:flex; align-items:center; gap:14px; }.smart-work-hero>div:first-child>span { width:48px; height:48px; flex:none; display:grid; place-items:center; border-radius:15px 15px 15px 6px; color:#fff; background:linear-gradient(135deg,#f27ba2,#dc4675); box-shadow:0 8px 18px rgba(213,66,112,.18); font-size:21px; }.smart-work-hero small { color:#d35a82; font-weight:750; letter-spacing:.08em; }.smart-work-hero h2 { margin:2px 0; font:750 21px Georgia,"Songti SC",serif; }.smart-work-hero p { margin:0; color:var(--muted); font-size:11px; }.smart-work-hero .head-tools>button:not(.primary) { min-height:38px; padding:0 13px; border:1px solid #edbfd0; border-radius:9px; color:#c64973; background:#fff; font-weight:650; }
.smart-work-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }.smart-work-metrics article { min-width:0; padding:13px 15px; border:1px solid #efdce4; border-radius:12px; background:#fff; box-shadow:0 7px 19px rgba(196,73,114,.05); }.smart-work-metrics span,.smart-work-metrics small { display:block; color:var(--muted); }.smart-work-metrics strong { display:block; margin:3px 0; color:#d24676; font:750 23px/1.1 Georgia,serif; }.smart-work-metrics small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9px; }
.smart-work-panel { overflow:hidden; border:1px solid #efd8e2; border-radius:15px; background:#fff; box-shadow:0 12px 30px rgba(190,66,108,.07); }.smart-work-toolbar { display:flex; align-items:center; gap:9px; padding:13px 15px; border-bottom:1px solid #f1e4ea; background:#fffafd; }.smart-work-toolbar>label { min-width:240px; flex:1; min-height:40px; display:flex; align-items:center; gap:8px; padding:0 11px; border:1px solid #eddae2; border-radius:10px; background:#fff; }.smart-work-toolbar>label span { color:#de668e; font-size:17px; }.smart-work-toolbar input { min-width:0; width:100%; border:0; outline:0; background:transparent; }.smart-work-toolbar select { min-width:180px; min-height:40px; padding:0 10px; border:1px solid #eddae2; border-radius:10px; color:#714f5c; background:#fff; }.smart-work-toolbar output { color:#ba5d7d; font-size:10px; white-space:nowrap; }.smart-work-toolbar>button { min-height:36px; padding:0 10px; border:1px solid #ecc5d4; border-radius:8px; color:#c74c74; background:#fff; font-size:10px; }
.smart-work-guidance { display:flex; align-items:center; gap:9px; padding:9px 15px; color:#895d6c; background:#fff4f8; font-size:10px; }.smart-work-guidance b { padding:3px 8px; border-radius:999px; color:#fff; background:#ee729b; white-space:nowrap; }
.smart-work-list { display:grid; }.smart-work-list::after { content:"没有符合条件的记录，请调整搜索或筛选条件"; display:none; padding:38px 20px; color:var(--muted); text-align:center; }.smart-work-panel.is-empty-result .smart-work-list::after { display:block; }
.smart-work-item { display:grid; grid-template-columns:40px minmax(0,1fr) minmax(180px,auto); gap:13px; align-items:center; padding:14px 16px; border-top:1px solid #f2e8ec; background:#fff; transition:.15s ease; }.smart-work-item[hidden] { display:none; }.smart-work-item:first-child { border-top:0; }.smart-work-item:hover { z-index:1; background:#fff9fb; box-shadow:inset 4px 0 #ef7199; }.smart-work-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; color:#d64c79; background:#ffe8f0; font-size:16px; }.smart-work-main { min-width:0; display:grid; gap:4px; }.smart-work-main>div { min-width:0; display:flex; align-items:center; gap:8px; }.smart-work-main strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }.smart-work-main span { color:#8b7c81; font-size:10px; }.smart-work-main p { margin:0; overflow:hidden; color:#62595c; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }.smart-work-side { display:grid; justify-items:end; gap:7px; }.smart-work-side time { color:#a06a7c; font-size:10px; }.smart-work-side>div { display:flex; gap:6px; }.smart-work-side button { min-height:31px; padding:0 9px; border:1px solid #ecc9d6; border-radius:8px; color:#c54a73; background:#fff; font-size:10px; font-weight:650; }.smart-work-side button.primary { color:#fff; border-color:#de4a78; background:linear-gradient(135deg,#ef7099,#dc4775); }

@media(max-width:900px) { .smart-work-toolbar { align-items:stretch; flex-wrap:wrap; }.smart-work-toolbar>label { min-width:100%; }.smart-work-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) { .smart-work-hero { align-items:flex-start; flex-direction:column; }.smart-work-hero .head-tools,.smart-work-hero .head-tools button { width:100%; }.smart-work-toolbar select { min-width:0; flex:1; }.smart-work-item { grid-template-columns:36px minmax(0,1fr); padding:13px 12px; }.smart-work-side { grid-column:2; justify-items:stretch; }.smart-work-side>div { justify-content:flex-end; }.smart-work-main>div { align-items:flex-start; flex-wrap:wrap; }.smart-work-main strong { width:100%; white-space:normal; }.smart-work-main p { display:-webkit-box; white-space:normal; -webkit-box-orient:vertical; -webkit-line-clamp:2; } }

/* 岗位导航按高频任务与业务领域分组，避免长菜单把日常入口淹没。 */
.nav-primary { padding-bottom:7px; border-bottom:1px solid rgba(222,91,136,.14); }
.nav-role-groups { display:grid; gap:5px; padding-top:5px; }
.sidebar .nav-section-label { margin:12px 10px 7px; color:#bda7b4; font-size:10px; font-weight:600; letter-spacing:.08em; }
.sidebar .nav-primary .nav-section-label { margin-top:4px; }
.nav-role-section { margin-top:0; border:1px solid transparent; border-radius:11px; transition:.15s ease; }
.nav-role-section[open] { border-color:rgba(231,111,151,.15); background:rgba(255,255,255,.2); }
.nav-role-section>.nav-group-title { min-height:34px; padding:7px 9px; letter-spacing:.04em; }
.nav-role-section>.nav-group-title span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-section-items { padding:3px 4px 6px; }
.nav-section-items .nav-item { min-height:35px; margin:1px 0; padding:7px 8px; font-size:11px; }
.nav-access-tag { margin-left:auto!important; padding:2px 6px!important; border:1px solid #f0b9cc; border-radius:999px!important; color:#c75279!important; background:#fff5f8!important; font-size:8px!important; font-style:normal; }
.nav-item.active .nav-access-tag { color:#c5416d!important; border-color:#fff!important; background:#fff!important; }
.nav-item.active::after { flex:none; }
.nav-task-badge { display:inline-flex; flex:none; align-items:center; gap:4px; margin-left:auto; padding:3px 7px; border:1px solid #f19ab7; border-radius:999px; color:#b92f5d; background:#fff0f5; box-shadow:0 3px 10px rgba(218,69,115,.13); font-size:8px; font-weight:900; white-space:nowrap; }
.nav-task-badge i,.nav-group-task i { width:6px; height:6px; flex:none; border-radius:50%; background:#e64278; box-shadow:0 0 0 4px rgba(230,66,120,.12); animation:task-pulse 1.7s ease-in-out infinite; }
.sidebar .nav-item:not(.active),
.sidebar .nav-item.has-task:not(.active):hover { color:#ead8df; background:transparent; box-shadow:none; }
.sidebar .nav-item:not(.active):focus-visible { outline:2px solid #88e7d2; outline-offset:-2px; }
.nav-item.active .nav-task-badge { color:#c03665; border-color:#fff; background:#fff; }
.nav-item.active.has-task::after { display:none; }
.nav-group-task { display:inline-flex; align-items:center; gap:4px; margin-left:auto; margin-right:7px; padding:2px 6px; border-radius:999px; color:#b32f5c; background:#ffe7ef; font-size:8px; font-weight:900; white-space:nowrap; }
.sidebar .nav-role-section.has-task>.nav-group-title { color:#d9b5c4; border:1px solid transparent; background:rgba(255,255,255,.055); }
@keyframes task-pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.55; transform:scale(.82); } }
.approval-project-table td { vertical-align:middle; }.approval-request-names { display:block; margin-top:5px; color:#b2335c; font-size:10px; font-weight:800; overflow-wrap:anywhere; }.approval-record-nos { display:flex; flex-wrap:wrap; gap:4px; }.approval-record-nos i { padding:3px 7px; border-radius:999px; color:#a43d62; background:#fff0f5; font-size:9px; font-style:normal; }.approval-project-detail { width:min(1450px,calc(100vw - 28px)); }.approval-project-summary { display:grid; grid-template-columns:1.2fr 1fr .55fr 1.3fr; gap:10px; margin:14px 0; }.approval-project-summary>div { padding:12px 14px; border:1px solid #efd5df; border-radius:12px; background:#fffafb; }.approval-project-summary .approval-project-requested { grid-column:1/-1; border-color:#efb8cb; background:#fff1f6; }.approval-project-summary span,.approval-project-summary strong { display:block; overflow-wrap:anywhere; }.approval-project-summary span { margin-bottom:4px; color:#8b7780; font-size:10px; }.approval-record-list { display:grid; gap:12px; }.approval-record-card { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:12px; align-items:center; padding:14px; border:1px solid #efd8e1; border-radius:14px; background:#fff; box-shadow:0 6px 18px rgba(171,61,99,.06); }.approval-record-index { display:grid; width:30px; height:30px; place-items:center; border-radius:50%; color:#fff; background:#e15783; font-weight:900; }.approval-record-body { display:grid; grid-template-columns:.8fr 1.35fr 1fr .85fr; gap:12px; }.approval-record-body>div small,.approval-record-body>div strong,.approval-record-body>div span { display:block; overflow-wrap:anywhere; }.approval-record-body>div small { margin-bottom:3px; color:#907b84; font-size:9px; }.approval-record-body>div span { margin-top:3px; color:#7c6d73; font-size:10px; }.approval-record-body .approval-material-summary { grid-column:1/-1; padding:8px 10px; border-radius:8px; background:#fff4f7; }.approval-record-actions { display:flex; flex-direction:column; gap:7px; min-width:120px; }.approval-record-actions button { width:100%; }
.material-radar-empty { display:flex; align-items:center; justify-content:center; gap:9px; padding:24px; border:1px dashed #cfded6; border-radius:10px; color:#386d57; background:#f8fcfa; }.material-radar-empty b { font-size:18px; }
.turnover-stage { content-visibility:auto; contain-intrinsic-size:105px; }
details.turnover-stage { display:block; padding:0; scroll-margin-top:90px; contain-intrinsic-size:80px; }
.stage-summary { display:grid; grid-template-columns:36px minmax(0,1fr) 64px; align-items:center; gap:12px; padding:16px; cursor:pointer; list-style:none; }
.stage-summary::-webkit-details-marker { display:none; }
.stage-summary:focus-visible { outline:2px solid #73507e; outline-offset:3px; border-radius:10px; }
.stage-summary .stage-index { align-self:center; display:block; }
.stage-summary .stage-index i { display:none; }
.stage-toggle-label { color:#73507e; font-size:12px; text-align:right; }
.stage-toggle-label::after { content:"展开 ＋"; }
details[open] > .stage-summary .stage-toggle-label::after { content:"收起 −"; }
.stage-detail { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; padding:16px 20px 20px 64px; border-top:1px solid var(--line); }
.flow-current-progress { margin:16px 0; border:1px solid #dbcbe2; border-left:4px solid #73507e; border-radius:12px; padding:16px; background:#fff; }
.flow-current-progress header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.flow-current-progress h3 { margin:0; font-size:16px; }
.flow-current-progress article { display:grid; grid-template-columns:minmax(100px,.7fr) minmax(140px,1fr) minmax(220px,2fr) auto; align-items:center; gap:16px; padding:12px 0; border-top:1px solid var(--line); }
.flow-current-progress small,.flow-current-progress strong,.flow-current-progress article span { display:block; }
.flow-current-progress small { color:var(--muted); margin-bottom:5px; }
.flow-current-progress p { margin:6px 0 0; font-size:12px; color:var(--muted); line-height:1.6; }
.flow-current-progress button { white-space:nowrap; }
.flow-department-details > summary { padding:16px; margin:12px 0; border:1px solid var(--line); border-radius:10px; cursor:pointer; font-weight:600; background:#fff; }
@media(max-width:760px) {
  .stage-summary { grid-template-columns:30px minmax(0,1fr) 52px; padding:12px; gap:8px; }
  .stage-detail { grid-template-columns:1fr; padding:12px; }
  .stage-detail .stage-actions { grid-column:auto; text-align:left; }
  .flow-current-progress article { grid-template-columns:1fr; gap:12px; }
}
.flow-order-choice { contain:layout paint style; }

@media (max-width:760px) {
  .material-radar { padding:14px; }.material-radar-head { align-items:flex-start; flex-direction:column; }.material-radar-total { width:100%; box-sizing:border-box; }
  .material-radar-levels { grid-template-columns:1fr; }.material-radar-list article { grid-template-columns:12px minmax(0,1fr); }.material-radar-due,.material-radar-list button,.material-radar-scope { grid-column:2; text-align:left; justify-self:start; }
}

@media (max-width:900px) {
  .approval-project-summary { grid-template-columns:1fr 1fr; }.approval-record-card { grid-template-columns:30px minmax(0,1fr); }.approval-record-body { grid-template-columns:1fr 1fr; }.approval-record-actions { grid-column:1/-1; display:grid; grid-template-columns:repeat(3,1fr); }.approval-project-detail { width:calc(100vw - 14px); }
}
@media (max-width:560px) {
  .approval-project-summary,.approval-record-body { grid-template-columns:1fr; }.approval-record-actions { grid-template-columns:1fr; }.approval-project-table { min-width:760px; }
}


@media (max-width:1100px) {
  .flow-order-tools { grid-template-columns:repeat(3,minmax(0,1fr)); }.flow-order-tools label:first-child { grid-column:1/-1; }.flow-order-tools output { padding:0; }
  .flow-order-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .flow-order-bar { padding:12px; }.flow-order-tools { grid-template-columns:1fr 1fr; }.flow-order-tools label:first-child { grid-column:1/-1; }.flow-order-tools output { grid-column:1/-1; }
  .flow-order-list { grid-template-columns:1fr; max-height:335px; }.flow-selected-head { align-items:flex-start; flex-direction:column; }.flow-selected-badges { justify-content:flex-start; }
  .flow-order-summary { grid-template-columns:1fr 1fr; }.flow-order-summary>div { min-height:64px; }.flow-order-summary>div:last-child { grid-column:1/-1; }
  .department-flow-scope { grid-template-columns:1fr 1fr; }.department-flow-actions-head { align-items:flex-start; flex-direction:column; }.department-flow-action-grid { grid-template-columns:1fr; }.department-flow-action-grid article { align-items:flex-start; flex-direction:column; }.department-flow-action-grid article>div:last-child,.department-flow-action-grid button { width:100%; }.department-flow-action-grid article>div:last-child { display:grid; grid-template-columns:1fr 1fr; }
  .flow-smart-current { grid-template-columns:38px 1fr; }.flow-smart-current>button { grid-column:1/-1; width:100%; }.flow-smart-icon { width:34px; height:34px; }
  .flow-arrival-status { grid-template-columns:86px minmax(0,1fr); padding:13px; }.flow-arrival-actions { grid-column:1/-1; width:100%; }.flow-arrival-grid { grid-template-columns:1fr 1fr; }.flow-live-list { grid-template-columns:1fr; }
}

@media (max-width:520px) {
  .flow-arrival-status { grid-template-columns:1fr; }.flow-arrival-step { min-height:60px; }.flow-arrival-grid,.department-flow-scope { grid-template-columns:1fr; }
}
.batch-live-value{display:block;margin-top:6px;padding:4px 8px;border-bottom:1px solid #ef6b9a;color:#24182b;font-weight:700;white-space:pre-wrap}
.batch-live-signature{display:block;max-width:150px;max-height:54px;object-fit:contain;margin:4px auto}
.batch-source-entry{margin-top:24px;border:1px solid #f1bfd0;border-radius:22px;background:#fff;padding:0 18px 20px}
.batch-source-entry>summary{cursor:pointer;padding:18px 4px;color:#bd3567;font-weight:800;font-size:18px}
.batch-source-entry[open]>summary{border-bottom:1px solid #f7dce6;margin-bottom:18px}
.embedded-return-preview {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 3px solid var(--accent, #e74c83);
}
.embedded-return-preview[hidden] { display: none !important; }
.material-return-choice > label { display: block; margin-bottom: 16px; }
.material-return-choice [data-material-return-editor] .data-table input {
  min-width: 110px;
  width: 100%;
}
.material-return-choice [data-material-return-editor] td:nth-child(2),
.material-return-choice [data-material-return-editor] td:nth-child(5) { min-width: 180px; }
.embedded-return-preview .batch-live-signature img {
  display: block;
  width: 120px;
  max-height: 54px;
  object-fit: contain;
  object-position: left center;
}

/* Shared source-form viewer: every batch template keeps its original grid while remaining readable and navigable. */
.batch-sheet-head { flex-wrap:wrap; align-items:flex-start; }
.batch-sheet-head>div:first-child { flex:1 0 180px; min-width:0; }
.batch-sheet-head>.batch-sheet-head-actions { flex:1 1 260px; }
.batch-overview-open { overflow:hidden!important; }
.batch-sheet-head-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:8px 12px; min-width:0; }
.batch-sheet-head-actions>span { color:var(--muted); font-size:11px; line-height:1.45; text-align:right; }
.batch-overview-toggle { flex:none; min-height:38px; padding:8px 14px!important; border-color:#e89fba!important; color:#ae315f!important; background:#fff!important; font-weight:800; white-space:nowrap; }
.batch-overview-toggle:hover { border-color:#df5d8d!important; background:#fff3f7!important; }
.batch-redaction-banner {
  margin:12px 0 14px;
  padding:13px 16px;
  border:1px solid #d7c7a6;
  border-left:5px solid #b78a34;
  border-radius:8px;
  color:#3d3321;
  background:#fffaf0;
}
.batch-redaction-banner strong { display:block; margin-bottom:4px; }
.batch-redaction-banner p { margin:0; line-height:1.65; }

.batch-paper-sheet .batch-table-scroll {
  position:relative;
  width:100%;
  max-height:min(72vh,900px);
  overflow:auto;
  border:1px solid #d8cdd1;
  background:#fff;
  cursor:grab;
  overscroll-behavior:contain;
  scrollbar-gutter:stable both-edges;
  touch-action:pan-x pan-y;
  -webkit-overflow-scrolling:touch;
}
.batch-paper-sheet .batch-table-scroll.is-dragging { cursor:grabbing; user-select:none; }
.batch-paper-sheet .batch-table-scroll.is-dragging * { user-select:none!important; }
.batch-paper-sheet .batch-table-scroll :is(input,textarea,select,button,label,a) { cursor:auto; }
.batch-paper-sheet .batch-table-fit { margin:0 auto; }
.batch-paper-sheet .batch-source-table td {
  overflow:hidden;
  /* Source cells are paper geometry, not padded application cards. */
  padding:1px 2px;
  line-height:1.2;
}
.batch-paper-sheet .batch-source-table .batch-static-text { display:block; max-width:100%; overflow:hidden; }
.batch-paper-sheet .batch-choice-list { align-items:center; gap:6px 14px; min-height:22px; }
.batch-paper-sheet .batch-choice-list label { align-items:center; gap:5px; min-height:22px; white-space:nowrap; line-height:1.25; }
.batch-paper-sheet .batch-choice-list i { flex:none; width:16px; height:16px; font-size:11px; }

.batch-paper-sheet.batch-sheet-overview {
  position:fixed!important;
  inset:0!important;
  z-index:2147483600!important;
  display:flex!important;
  flex-direction:column;
  width:100vw!important;
  max-width:none!important;
  height:100dvh!important;
  margin:0!important;
  padding:14px 18px 18px!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:#fff9fb!important;
  box-shadow:none!important;
}
.batch-paper-sheet.batch-sheet-overview>.batch-sheet-head { flex:none; margin:0 0 10px; padding:4px 2px 12px; border-bottom:1px solid #efc6d5; }
.batch-paper-sheet.batch-sheet-overview>.batch-source-paragraphs { flex:none; max-height:16vh; overflow:auto; }
.batch-paper-sheet.batch-sheet-overview>.batch-table-scroll {
  display:block!important;
  flex:1;
  min-height:0;
  max-height:none!important;
  overflow:auto!important;
  border:1px solid #c9bcc1!important;
  border-radius:8px;
  background:#fff;
}
.batch-paper-sheet.batch-sheet-overview .batch-table-fit { margin:0; }
.batch-paper-sheet.batch-sheet-overview .batch-source-table { max-width:none!important; }

.batch-current-task-row { background:#fff7fa; box-shadow:inset 4px 0 #e54f86; }
.batch-current-task-badge { display:inline-flex; align-items:center; gap:6px; margin:0 0 5px; padding:4px 8px; border-radius:999px; color:#b62f5d; background:#ffe5ee; font-size:10px; white-space:nowrap; }
.batch-current-task-badge i { width:7px; height:7px; flex:none; border-radius:50%; background:#e64278; box-shadow:0 0 0 4px rgba(230,66,120,.12); animation:task-pulse 1.7s ease-in-out infinite; }
.batch-current-task-badge+small,.batch-current-task-badge~small { display:block; }

/*
 * 受控电子表单统一视觉规范：白底、黑线。
 * 原 Excel 的合并关系、无边框区域、边框粗细及线型仍由内联源格式决定；
 * 此处只移除业务主题色和源文件填充色，不改变表格结构。
 */
.batch-paper-sheet,
.batch-paper-sheet .batch-table-scroll,
.batch-paper-sheet .batch-table-fit,
.batch-paper-sheet .batch-source-table,
.batch-paper-sheet .batch-source-table :is(thead,tbody,tr,th,td),
.batch-paper-sheet .batch-cell-input,
.batch-paper-sheet .batch-inline-input,
.batch-paper-sheet .batch-generated-value,
.batch-paper-sheet .batch-generated-blank,
.incoming-inspection-sheet,
.incoming-inspection-sheet :is(table,thead,tbody,tr,th,td),
.package-iqc-sheet,
.package-iqc-sheet :is(table,thead,tbody,tr,th,td),
.package-iqc-meta-lines span,
.package-iqc-control-table > :is(h4,div),
.package-iqc-conclusion span,
.raw-material-iqc-sheet,
.raw-material-iqc-sheet :is(table,thead,tbody,tr,th,td),
.raw-iqc-meta-grid span,
.raw-report-meta-grid span,
.raw-iqc-conclusion > span,
.raw-iqc-signatures span {
  background:#fff!important;
}
.batch-paper-sheet .batch-source-table,
.batch-paper-sheet .batch-source-table :is(th,td),
.incoming-inspection-sheet,
.incoming-inspection-sheet :is(th,td),
.package-iqc-sheet,
.package-iqc-sheet :is(th,td),
.package-iqc-meta-lines span,
.package-iqc-control-table > :is(h4,div),
.package-iqc-conclusion span,
.raw-material-iqc-sheet,
.raw-material-iqc-sheet :is(th,td),
.raw-iqc-meta-grid span,
.raw-report-meta-grid span,
.raw-iqc-conclusion > span,
.raw-iqc-signatures span {
  border-color:#000!important;
}
.batch-paper-sheet .batch-cell-input,
.batch-paper-sheet .batch-inline-input {
  background:#fff!important;
}
.batch-paper-sheet .batch-cell-input:focus,
.batch-paper-sheet .batch-inline-input:focus {
  background:#fff!important;
  outline-color:#000!important;
}
.batch-paper-sheet .batch-choice-list i,
.incoming-inspection-sheet .template-mark-control,
.package-iqc-sheet .template-mark-control,
.raw-material-iqc-sheet .template-mark-control {
  border-color:#000!important;
  color:transparent;
  background:#fff!important;
}
.batch-paper-sheet .batch-choice-list input:checked+i {
  border-color:#000!important;
  color:#000!important;
  background:#fff!important;
}
.batch-paper-sheet.batch-sheet-overview {
  background:#fff!important;
}
/* A top-layer dialog clips fixed descendants in Safari. Expand the dialog too,
   otherwise archive overview hides the first columns and its exit control. */
dialog:has(.batch-sheet-overview) {
  width:100vw!important; height:100dvh!important;
  max-width:none!important; max-height:none!important;
  inset:0!important; margin:0!important; border:0!important;
  border-radius:0!important; overflow:visible!important;
}
dialog:has(.batch-sheet-overview) :is(form,.receipt-detail) { overflow:visible!important; }
.batch-paper-sheet.batch-sheet-overview>.batch-table-scroll {
  border-color:#000!important;
  background:#fff!important;
}

@media (max-width:760px) {
  .batch-sheet-head { align-items:flex-start; flex-direction:column; }
  .batch-sheet-head-actions { width:100%; justify-content:space-between; }
  .batch-sheet-head-actions>span { flex:1; text-align:left; }
  .batch-paper-sheet.batch-sheet-overview { padding:10px!important; }
}

/*
 * 整站界面字体系统。
 * 仅调整应用导航、工作台、数据表、卡片和弹窗；原始 Excel/Word 批记录已经在
 * .batch-source-table、.incoming-inspection-sheet 等源表容器中锁定字体，不受此处影响。
 */
:root {
  --font-ui:"PingFang SC","HarmonyOS Sans SC","Noto Sans CJK SC","Microsoft YaHei UI","Microsoft YaHei",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-display:"PingFang SC","HarmonyOS Sans SC","Noto Sans CJK SC","Microsoft YaHei UI",system-ui,sans-serif;
  --font-number:"SF Pro Display","DIN Alternate","Segoe UI Variable Display","PingFang SC",system-ui,sans-serif;
  --font-code:"SFMono-Regular","Cascadia Code","Roboto Mono",Menlo,Consolas,monospace;
}
body {
  font-family:var(--font-ui);
  font-size:14px;
  line-height:1.62;
  letter-spacing:.005em;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-synthesis:none;
}
button,input,select,textarea { font-family:var(--font-ui); letter-spacing:.005em; }
button { font-weight:680; }
small { line-height:1.55; }
.page-head h1,
.panel-head h2,
.settings-section-head h2,
.dialog-head h2,
.auth-card h1,
.smart-radar h2,
.flow-command h2,
.flow-zero-copy h2,
.workflow-test-hero h1,
.batch-center-intro h2,
.material-radar-head h2,
.smart-work-hero h2,
.draft-choice-card h3 {
  font-family:var(--font-display);
  font-style:normal;
  font-weight:760;
  letter-spacing:-.022em;
}
.page-head h1 { font-size:clamp(27px,3vw,36px); line-height:1.22; }
.panel-head h2,.settings-section-head h2 { font-size:18px; line-height:1.35; }
.dialog-head h2 { font-size:27px; line-height:1.3; }
.breadcrumb span { font-family:var(--font-display); font-weight:720; letter-spacing:.035em; }
.brand,.sidebar-foot strong,.role-picker strong { letter-spacing:.01em; }
.nav-group-title { font-size:11px; font-weight:720; letter-spacing:.075em; }
.nav-item { font-size:13px; font-weight:590; line-height:1.42; }
.nav-item.active { font-weight:720; }
.role-tree-role>span { font-size:11px; font-weight:680; line-height:1.35; }
.page-head p,.panel-head p,.smart-work-hero p { line-height:1.7; }
.metric strong,
.module-card .count,
.message-inbox-summary strong,
.smart-work-metrics strong,
.batch-center-intro>strong {
  font-family:var(--font-number);
  font-style:normal;
  font-variant-numeric:tabular-nums;
  font-weight:720;
  letter-spacing:-.025em;
}
.metric strong { font-size:30px; line-height:1.05; }
.code,.account-code,.generated-account { font-family:var(--font-code); font-variant-numeric:tabular-nums; letter-spacing:.015em; }
.data-table th { color:#695b62; font-size:11px; font-weight:720; letter-spacing:.045em; line-height:1.45; }
.data-table td { font-size:13px; line-height:1.58; }
.data-table td :is(strong,b) { font-weight:700; }
.subtle { line-height:1.52; }
.metric span,.module-card small,.setting-card small { line-height:1.55; }
fieldset>legend { font-family:var(--font-display); font-weight:740; letter-spacing:-.01em; }
.form-grid label>span { font-size:12px; font-weight:680; letter-spacing:.008em; }
.form-grid input,.form-grid select,.form-grid textarea { line-height:1.5; }
.pmc-form-section-title span { font-family:var(--font-display); font-weight:760; letter-spacing:-.012em; }
.status,.pr-review-chip,.approval-record-nos i { font-weight:680; letter-spacing:.01em; }
.primary { font-weight:720; letter-spacing:.012em; }

/* 源文件预览继续严格继承模板中的字体、字号和行高。 */
.batch-source-table,
.batch-source-table :is(th,td,input,textarea,select,button),
.batch-paper-sheet .batch-source-table,
.incoming-inspection-sheet,
.incoming-inspection-sheet :is(th,td,input,textarea,select,button),
.package-iqc-sheet,
.package-iqc-sheet :is(th,td,input,textarea,select,button),
.raw-material-iqc-sheet,
.raw-material-iqc-sheet :is(th,td,input,textarea,select,button) {
  letter-spacing:normal;
  text-rendering:auto;
  -webkit-font-smoothing:auto;
  font-synthesis:weight style;
}

/*
 * 2026 整站精修：统一应用外壳、页头、卡片、按钮、表格和弹窗的比例与层级。
 * 原始 Excel / Word 电子表单由下方排除规则隔离，继续保持原文件的字体、黑线和白底。
 */
:root {
  --ui-berry:#d94878;
  --ui-berry-dark:#b82f60;
  --ui-berry-soft:#fff0f5;
  --ui-plum:#593361;
  --ui-surface:rgba(255,255,255,.94);
  --ui-line:#eadbe2;
  --ui-line-strong:#dfc7d1;
  --ui-radius-sm:10px;
  --ui-radius:16px;
  --ui-radius-lg:22px;
  --ui-shadow-sm:0 6px 18px rgba(91,42,66,.055);
  --ui-shadow:0 14px 40px rgba(91,42,66,.085);
  --ui-shadow-hover:0 20px 48px rgba(91,42,66,.13);
  --ui-focus:0 0 0 4px rgba(217,72,120,.13);
}

body {
  background:
    radial-gradient(circle at 88% 2%,rgba(239,111,158,.095),transparent 25rem),
    radial-gradient(circle at 28% 82%,rgba(109,59,123,.055),transparent 30rem),
    linear-gradient(145deg,#f8f5f7 0%,#fffafb 44%,#f7f3f7 100%);
}
.workspace::before { opacity:.2; }
main { padding:30px clamp(22px,2.55vw,42px) 48px; }

.topbar {
  height:68px;
  padding:0 clamp(22px,2.55vw,42px);
  border-bottom-color:rgba(225,194,207,.82);
  background:rgba(255,252,253,.88);
  box-shadow:0 7px 24px rgba(104,49,76,.055);
  backdrop-filter:blur(18px) saturate(1.18);
}
.topbar::after { top:18px; box-shadow:0 5px 15px rgba(219,76,124,.12); }
.breadcrumb { gap:10px; }
.breadcrumb strong { font-weight:720; }
.global-search {
  height:42px;
  border-color:var(--ui-line);
  border-radius:12px;
  background:rgba(255,255,255,.9);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8),var(--ui-shadow-sm);
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.global-search:focus-within { border-color:#df7ca0; background:#fff; box-shadow:var(--ui-focus); }
.icon-button,.quick-button { min-width:42px; height:42px; border-radius:12px; }

.sidebar {
  border-right-color:#edc3d2;
  background:linear-gradient(180deg,#fff9fb 0%,#ffedf4 54%,#ffe5ef 100%);
  box-shadow:10px 0 34px rgba(158,58,94,.095);
}
.brand { height:80px; padding-inline:15px; }
.role-picker {
  margin:10px 12px;
  padding:14px;
  border-color:rgba(222,101,143,.24);
  border-radius:15px;
  background:rgba(255,255,255,.6);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 8px 20px rgba(175,56,101,.045);
}
.role-tree-trigger { min-height:40px; padding:8px 10px; border-radius:11px; background:#fff; box-shadow:0 4px 12px rgba(120,51,79,.045); }
nav { padding:8px 9px 20px; }
.nav-item { min-height:39px; margin:3px 0; padding:9px 11px; border-radius:11px; transition:color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease; }
.nav-item:hover { transform:translateX(2px); box-shadow:0 5px 14px rgba(176,63,105,.06); }
.nav-item.active { box-shadow:inset 4px 0 rgba(255,255,255,.96),0 9px 20px rgba(214,70,116,.2); }
.nav-group-title { min-height:38px; border-radius:11px; }
.nav-role-section[open] { border-radius:13px; }
.sidebar-foot { min-height:88px; padding:12px; border-top-color:#eebdce; backdrop-filter:blur(10px); }
.sidebar-account-card { padding:8px; border-radius:13px; }
.sidebar-account-card:hover { background:#fff; box-shadow:0 8px 20px rgba(117,48,78,.08); }
.sidebar-logout { width:34px; height:34px; border-radius:10px; }

.page-head {
  min-height:142px;
  align-items:center;
  margin-bottom:24px;
  padding:24px 116px 24px 26px;
  overflow:hidden;
  border:1px solid rgba(232,204,215,.92);
  border-radius:var(--ui-radius-lg);
  background:
    linear-gradient(118deg,rgba(255,255,255,.98) 0%,rgba(255,249,252,.96) 64%,rgba(255,238,245,.92) 100%);
  box-shadow:var(--ui-shadow);
}
.page-head::after { right:20px; top:50%; width:82px; height:82px; transform:translateY(-50%); opacity:.76; }
.page-head::before { right:98px; top:27px; }
.page-head>div:first-child { position:relative; z-index:1; max-width:880px; }
.page-head h1 { margin:7px 0 6px; color:#30272c; font-size:clamp(28px,2.6vw,38px); }
.page-head h1::after { opacity:.72; }
.page-head p { max-width:780px; color:#776b71; font-size:13px; }
.eyebrow {
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:5px 9px;
  border:1px solid #f0cfdb;
  border-radius:999px;
  color:#bc3a68;
  background:rgba(255,255,255,.78);
  font-size:9px;
  letter-spacing:.12em;
}
.eyebrow::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--ui-berry); box-shadow:0 0 0 4px rgba(217,72,120,.1); }
.head-tools { position:relative; z-index:2; align-items:center; justify-content:flex-end; }

.secondary,.primary,
.head-tools button,
.panel-head button,
.row-actions button,
.toolbar button,
.stage-actions button,
.form-actions button,
.message-alert-actions button,
.org-tools button,
.batch-editor-head-actions button {
  min-height:42px;
  padding:0 16px;
  border-radius:12px;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease,color .16s ease;
}
.primary,.quick-button {
  border-color:#d94375;
  background:linear-gradient(135deg,#ef6794 0%,#db3f72 60%,#c83267 100%);
  box-shadow:0 9px 20px rgba(209,55,105,.22),inset 0 1px 0 rgba(255,255,255,.24);
}
.primary:hover,.quick-button:hover { transform:translateY(-1px); box-shadow:0 13px 27px rgba(196,48,96,.28),inset 0 1px 0 rgba(255,255,255,.24); }
.secondary,
.panel-head button,
.row-actions button,
.toolbar button,
.stage-actions button:not(.primary),
.org-tools button {
  color:#683a4d;
  border:1px solid var(--ui-line-strong);
  background:linear-gradient(180deg,#fff,#fff9fb);
  box-shadow:0 4px 12px rgba(93,47,67,.045);
}
.secondary:hover,
.panel-head button:hover,
.row-actions button:hover,
.toolbar button:hover,
.stage-actions button:not(.primary):hover,
.org-tools button:hover { transform:translateY(-1px); border-color:#df8eac; color:#b42f61; background:#fff2f7; box-shadow:0 8px 18px rgba(139,53,87,.09); }
button:focus-visible { outline:0; box-shadow:var(--ui-focus); }

.metrics { gap:16px; margin-bottom:20px; }
.metric,.module-card,.setting-card {
  border-color:var(--ui-line);
  border-radius:var(--ui-radius);
  background:linear-gradient(145deg,#fff 0%,#fffbfd 100%);
  box-shadow:var(--ui-shadow-sm);
}
.metric { min-height:132px; padding:20px; }
.metric-icon,.module-card .big-icon,.setting-icon { border:1px solid #f2d2de; box-shadow:inset 0 1px 0 #fff; }
.metric-clickable:hover,.metric-clickable:focus { transform:translateY(-3px); border-color:#e5b7c8; box-shadow:var(--ui-shadow-hover); outline:0; }
.module-grid { gap:18px; }
.module-card { min-height:168px; padding:21px; }
.module-card:hover { transform:translateY(-3px); border-color:#e5b7c8; box-shadow:var(--ui-shadow-hover); }

.panel,.data-panel,.message-inbox-shell {
  border-color:var(--ui-line);
  border-radius:var(--ui-radius-lg);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow);
}
.panel + .panel { margin-top:22px; }
.panel-head {
  min-height:72px;
  padding:16px 20px;
  border-bottom-color:#f0e2e8;
  background:linear-gradient(180deg,#fff,#fffafd);
}
.panel-head h2 { color:#352c31; font-size:19px; }
.panel-head p { max-width:760px; color:#85777e; }
.panel-head button { flex:none; }
.dashboard-grid { gap:22px; }

.toolbar {
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-bottom:16px;
  padding:12px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius);
  background:rgba(255,255,255,.86);
  box-shadow:var(--ui-shadow-sm);
}
.filter-search,.filter-select,.time-sort-control {
  min-height:42px;
  border-color:var(--ui-line-strong);
  border-radius:11px;
  background:#fff;
  transition:border-color .18s ease,box-shadow .18s ease;
}
.filter-search:focus,.filter-select:focus,.time-sort-control:focus-within { border-color:#df7ca0; box-shadow:var(--ui-focus); }

.data-panel { overflow:auto; }
.data-panel>.data-table { min-width:760px; }
.data-panel .data-table th {
  padding:13px 16px;
  border-bottom:1px solid #eadde3;
  color:#66575e;
  background:linear-gradient(180deg,#fffafd,#fff5f9);
}
.data-panel .data-table td { padding:16px; border-top-color:#f0e5e9; }
.data-panel .data-table tbody tr:nth-child(even) td { background:rgba(255,250,252,.48); }
.data-panel .data-table tbody tr:hover td { background:#fff2f7; }
.row-actions { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.row-actions button { min-height:34px; padding:0 11px; border-radius:9px; font-size:11px; white-space:nowrap; }
.data-panel .data-table td>button,
.panel .data-table td>button {
  min-height:34px;
  padding:0 11px;
  border:1px solid var(--ui-line-strong);
  border-radius:9px;
  color:#a73560;
  background:linear-gradient(180deg,#fff,#fff8fb);
  box-shadow:0 4px 11px rgba(96,45,67,.045);
  font-size:11px;
  white-space:nowrap;
}
.data-panel .data-table td>button:hover,
.panel .data-table td>button:hover { transform:translateY(-1px); border-color:#dc83a4; background:#fff0f5; box-shadow:0 7px 16px rgba(139,53,87,.09); }
.status { padding:5px 10px; border:1px solid transparent; font-size:10px; }
.status.pending { border-color:#ead3ac; }.status.ok { border-color:#cbe6d8; }.status.bad { border-color:#efc9c7; }.status.info { border-color:#f1c7d7; }
.empty-state { padding:52px 24px; }
.empty-icon { width:54px; height:54px; border:1px solid #f0cfdb; border-radius:18px; box-shadow:var(--ui-shadow-sm); }

dialog {
  border:1px solid rgba(238,195,211,.92);
  border-radius:24px;
  background:#fffdfd;
  box-shadow:0 34px 100px rgba(83,30,52,.3);
}
dialog::backdrop { background:rgba(73,34,50,.38); backdrop-filter:blur(7px); }
dialog form,.receipt-detail { padding:30px clamp(24px,3vw,42px) 36px; }
.dialog-head { align-items:flex-start; gap:20px; padding-bottom:18px; border-bottom:1px solid #f0e0e7; }
.dialog-head h2 { margin-top:5px; color:#30272c; }
.dialog-head button { flex:none; width:38px; height:38px; border:1px solid #efc9d7; background:#fff5f8; box-shadow:0 4px 12px rgba(118,40,71,.06); }
fieldset { margin:22px 0; padding:20px; border-color:var(--ui-line); border-radius:16px; background:rgba(255,252,253,.72); }
fieldset>legend { padding:0 9px; color:#9f315b; }
.form-grid { gap:17px 16px; }
.form-grid label>span { margin-bottom:7px; color:#5b4d54; }
.form-grid input,.form-grid select,.form-grid textarea {
  min-height:44px;
  padding:10px 12px;
  border-color:#d9cbd1;
  border-radius:11px;
  background:#fff;
  box-shadow:inset 0 1px 2px rgba(70,36,50,.025);
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.form-grid textarea { min-height:96px; }
.form-grid input:hover,.form-grid select:hover,.form-grid textarea:hover { border-color:#cfaebc; }
.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus { border-color:#df7ca0; box-shadow:var(--ui-focus); }

.auth-gate {
  overflow:hidden;
  background:
    radial-gradient(circle at 18% 18%,rgba(238,111,158,.18),transparent 24rem),
    radial-gradient(circle at 86% 78%,rgba(89,51,97,.12),transparent 28rem),
    linear-gradient(145deg,#fff8fb,#f7f1f7);
}
.auth-gate::before,.auth-gate::after { content:""; position:absolute; border:1px solid rgba(220,82,128,.14); border-radius:50%; pointer-events:none; }
.auth-gate::before { width:440px; height:440px; left:-180px; top:-170px; box-shadow:0 0 0 45px rgba(255,255,255,.18); }
.auth-gate::after { width:360px; height:360px; right:-130px; bottom:-150px; box-shadow:0 0 0 42px rgba(255,255,255,.16); }
.auth-card {
  position:relative;
  z-index:1;
  width:min(440px,100%);
  padding:40px;
  border-color:rgba(231,193,207,.92);
  border-radius:26px;
  background:rgba(255,255,255,.9);
  box-shadow:0 34px 100px rgba(91,42,66,.16),inset 0 1px 0 #fff;
  backdrop-filter:blur(18px) saturate(1.08);
}
.auth-card img { width:205px; height:62px; margin-bottom:26px; }
.auth-card h1 { color:#352a30; font-size:27px; }
.auth-card>p { margin:9px 0 27px; color:#7a6d74; }
.auth-card label span { margin-bottom:8px; color:#5c4c54; }
.auth-card input { min-height:47px; padding:11px 13px; border-color:#dccbd2; border-radius:12px; background:#fff; outline:0; transition:border-color .18s ease,box-shadow .18s ease; }
.auth-card input:focus { border-color:#df7ca0; box-shadow:var(--ui-focus); }
.auth-card button { min-height:48px; margin-top:24px; border-radius:13px; background:linear-gradient(135deg,#ee6895,#cf376c); box-shadow:0 12px 24px rgba(205,53,103,.23); }
.auth-card button:hover { transform:translateY(-1px); box-shadow:0 16px 30px rgba(190,43,93,.28); }

/* 岗位专用工作台沿用同一按钮节奏，避免页面间出现忽大忽小。 */
.smart-work-hero { padding:21px 23px; border-radius:18px; box-shadow:var(--ui-shadow); }
.smart-work-hero .head-tools>button:not(.primary) { min-height:42px; padding:0 15px; border-radius:11px; box-shadow:var(--ui-shadow-sm); }
.smart-work-metrics { gap:14px; margin-bottom:18px; }
.smart-work-metrics article { min-height:106px; padding:16px 18px; border-radius:15px; box-shadow:var(--ui-shadow-sm); }
.smart-work-panel { border-radius:18px; box-shadow:var(--ui-shadow); }
.smart-work-toolbar { padding:15px 17px; }
.smart-work-item { padding:16px 18px; }
.smart-work-side button { min-height:35px; padding:0 11px; border-radius:10px; box-shadow:0 4px 11px rgba(96,45,67,.045); }
.smart-work-side button:hover { transform:translateY(-1px); border-color:#dc83a4; box-shadow:0 7px 16px rgba(139,53,87,.09); }

/* 原文件预览中的输入框、勾选框、签名栏和按钮绝不套用整站精修。 */
:is(.batch-paper-sheet,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet,.batch-source-table)
  :is(button,input,select,textarea) {
  box-shadow:none;
  text-shadow:none;
  letter-spacing:normal;
}
:is(.batch-paper-sheet,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet,.batch-source-table)
  button:not(.batch-overview-toggle) {
  min-height:initial;
  padding:initial;
  border-radius:initial;
  transform:none;
}

@media (max-width:1100px) {
  .page-head { min-height:132px; padding-left:22px; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  main { padding:18px 14px 34px; }
  .topbar { height:60px; padding:0 14px; }
  .topbar::after { display:none; }
  .page-head { min-height:auto; align-items:flex-start; flex-direction:column; margin-bottom:18px; padding:20px 78px 20px 18px; border-radius:18px; }
  .page-head::after { right:9px; width:62px; height:62px; }
  .page-head::before { display:none; }
  .page-head h1 { font-size:27px; }
  .page-head p { font-size:12px; }
  .head-tools { width:100%; justify-content:flex-start; }
  .head-tools .primary,.head-tools .secondary { flex:1 1 160px; }
  .metrics,.module-grid,.dashboard-grid { grid-template-columns:1fr; gap:13px; }
  .metric { min-height:112px; }
  .panel,.data-panel { border-radius:16px; }
  .panel-head { min-height:64px; align-items:flex-start; gap:12px; padding:14px 15px; }
  .panel-head button { min-height:36px; padding-inline:11px; }
  .toolbar { align-items:stretch; flex-direction:column; padding:10px; }
  .toolbar>* { width:100%; }
  dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:18px; }
  dialog form,.receipt-detail { padding:22px 16px 28px; }
  .dialog-head h2 { font-size:23px; }
  .form-grid { grid-template-columns:1fr; }
  .form-grid label.full { grid-column:auto; }
  fieldset { padding:15px; }
  .auth-gate { padding:14px; }
  .auth-card { padding:30px 22px; border-radius:22px; }
}

/* 周转中心：物料到货/检验/库位与生产节点实时总览。 */
.flow-production-radar { display:grid; gap:14px; margin:18px 0; }
.flow-production-radar>header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:19px 21px; border:1px solid #e9cfda; border-radius:18px; background:linear-gradient(120deg,#fff,#fff5f9); box-shadow:var(--ui-shadow-sm); }
.flow-production-radar>header small { color:#c34570; font-size:9px; font-weight:820; letter-spacing:.12em; }
.flow-production-radar>header h2 { margin:3px 0; color:#352b30; font-size:20px; }
.flow-production-radar>header p { max-width:850px; margin:0; color:#766a70; font-size:11px; }
.flow-production-radar>header button { min-height:40px; flex:none; padding:0 14px; border:1px solid #e3a8bd; border-radius:11px; color:#ad365f; background:#fff; box-shadow:0 5px 14px rgba(106,46,70,.06); }
.flow-production-radar details { overflow:hidden; border:1px solid #ead8df; border-radius:18px; background:#fff; box-shadow:var(--ui-shadow-sm); }
.flow-production-radar summary { min-height:68px; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 18px; cursor:pointer; list-style:none; background:linear-gradient(180deg,#fff,#fffafd); }
.flow-production-radar summary::-webkit-details-marker { display:none; }
.flow-production-radar summary>div { display:flex; align-items:center; gap:10px; }
.flow-production-radar summary>div:first-child { display:grid; gap:2px; }
.flow-production-radar summary strong { color:#3f3238; font-size:15px; }
.flow-production-radar summary span { color:#85747b; font-size:10px; }
.flow-production-radar summary b { padding:5px 9px; border-radius:999px; color:#3b725c; background:#e9f6ef; font-size:9px; }
.flow-production-radar summary b.attention { color:#a54b31; background:#fff0e7; }
.flow-production-radar summary i { color:#b54a70; font-size:9px; font-style:normal; }
.flow-material-list { display:grid; border-top:1px solid #eee1e6; }
.flow-material-item { display:grid; grid-template-columns:30px minmax(220px,1.3fr) minmax(150px,.72fr) minmax(190px,1fr) minmax(170px,.9fr); gap:12px; align-items:center; padding:14px 17px; border-top:1px solid #f1e6ea; box-shadow:inset 4px 0 #d9c6ce; }
.flow-material-item:first-child { border-top:0; }
.flow-material-item.bad { box-shadow:inset 4px 0 #c94a4a; background:#fffafa; }
.flow-material-item.warning { box-shadow:inset 4px 0 #dc8e43; background:#fffdf9; }
.flow-material-item.pending { box-shadow:inset 4px 0 #ba9a65; }
.flow-material-item.info { box-shadow:inset 4px 0 #5d83b0; }
.flow-material-item.ok { box-shadow:inset 4px 0 #4f9577; background:#fbfefc; }
.flow-material-item>b { width:26px; height:26px; display:grid; place-items:center; border-radius:9px; color:#a74367; background:#fff0f5; font-size:10px; }
.flow-material-item>div { min-width:0; display:grid; gap:2px; }
.flow-material-item span,.flow-material-item small { color:#8b7c82; font-size:9px; line-height:1.45; }
.flow-material-item strong { overflow-wrap:anywhere; color:#463a40; font-size:11px; line-height:1.48; }
.flow-material-name>strong { font-size:13px; }
.flow-material-state { align-content:start; }
.material-arrival-flag { justify-self:start; margin-bottom:3px; padding:3px 7px; border-radius:999px; font-weight:820; }
.material-arrival-flag.arrived { color:#2d7255; background:#e4f5ec; }
.material-arrival-flag.not-arrived { color:#9f5037; background:#fff0e8; }
.flow-material-location { padding:9px 10px; border-radius:10px; background:#f8f4f6; }
.flow-production-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding:12px; border-top:1px solid #eee1e6; background:#fffafd; }
.flow-production-item { display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:10px; align-items:center; min-height:88px; padding:11px 12px; border:1px solid #eadce2; border-radius:13px; background:#fff; }
.flow-production-item>i { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; color:#8e6c7a; background:#f4edf0; font-size:10px; font-style:normal; font-weight:800; }
.flow-production-item.complete>i { color:#fff; background:#559778; }
.flow-production-item.in_progress { border-color:#e4a4bb; box-shadow:inset 3px 0 #df4f81; }
.flow-production-item.in_progress>i { color:#fff; background:#df4f81; }
.flow-production-item.waiting>i { color:#9d6123; background:#fff0d9; }
.flow-production-item>div { min-width:0; display:grid; gap:2px; }
.flow-production-item>div:first-of-type small { color:#b3476d; font-size:9px; }
.flow-production-item strong { color:#44373d; font-size:12px; }
.flow-production-item span { overflow:hidden; color:#817278; text-overflow:ellipsis; white-space:nowrap; font-size:9px; }
.flow-production-item>div:last-child { justify-items:end; text-align:right; }
.flow-production-item em { padding:3px 7px; border-radius:999px; color:#725963; background:#f6eef1; font-size:9px; font-style:normal; font-weight:760; }
.flow-production-item.complete em { color:#37725a; background:#e8f5ee; }
.flow-production-item.in_progress em { color:#b33461; background:#ffe8f0; }
.flow-production-item>div:last-child small,.flow-production-item>div:last-child b { color:#8b7c82; font-size:8px; font-weight:560; }

@media (max-width:1120px) {
  .flow-material-item { grid-template-columns:28px minmax(190px,1fr) minmax(145px,.7fr) minmax(180px,1fr); }
  .flow-material-location { grid-column:2/-1; }
}
@media (max-width:760px) {
  .flow-production-radar>header { align-items:flex-start; flex-direction:column; padding:16px; }
  .flow-production-radar>header button { width:100%; }
  .flow-production-radar summary { align-items:flex-start; flex-direction:column; gap:9px; padding:13px 14px; }
  .flow-production-radar summary>div { flex-wrap:wrap; }
  .flow-material-item { grid-template-columns:28px minmax(0,1fr); gap:8px 10px; padding:13px 12px; }
  .flow-material-item>div { grid-column:2; }
  .flow-material-location { grid-column:2; }
  .flow-production-list { grid-template-columns:1fr; padding:9px; }
  .flow-production-item { grid-template-columns:30px minmax(0,1fr); }
  .flow-production-item>div:last-child { grid-column:2; justify-items:start; text-align:left; }
}

/* ========================================================================== */
/* 2026 feminine dopamine system                                               */
/* Sweet-cool application chrome with restrained, compliance-safe documents.  */
/* ========================================================================== */
:root {
  --ink:#242126;
  --muted:#756b70;
  --line:#ead8df;
  --paper:#fff8fb;
  --panel:#fff;
  --green:#e93f80;
  --green-2:#a82f4f;
  --mint:#def8f2;
  --gold:#ff9432;
  --red:#b92f50;
  --shadow:0 16px 42px rgba(87,39,58,.11);
  --dopamine-violet:#e93f80;
  --dopamine-violet-dark:#1e1e22;
  --dopamine-pink:#e93f80;
  --dopamine-cyan:#88e7d2;
  --dopamine-blue:#2078a8;
  --dopamine-yellow:#f7d56b;
  --dopamine-orange:#ff9432;
  --dopamine-green:#44d1bd;
  --dopamine-red:#a82f4f;
  --dopamine-navy:#1e1e22;
  --dopamine-lilac:#b794d8;
  --ui-berry:var(--dopamine-pink);
  --ui-berry-dark:#a82f4f;
  --ui-berry-soft:#fff0f6;
  --ui-plum:var(--dopamine-violet-dark);
  --ui-surface:rgba(255,255,255,.96);
  --ui-line:#f0dbe4;
  --ui-line-strong:#e6c5d2;
  --ui-shadow-sm:0 8px 22px rgba(87,39,58,.07);
  --ui-shadow:0 18px 48px rgba(87,39,58,.1);
  --ui-shadow-hover:0 22px 52px rgba(87,39,58,.15);
  --ui-focus:0 0 0 4px rgba(233,63,128,.15);
}

html { background:var(--paper); }
body {
  color:var(--ink);
  background:
    radial-gradient(circle at 8% 5%,rgba(233,63,128,.12),transparent 22rem),
    radial-gradient(circle at 88% 14%,rgba(136,231,210,.19),transparent 24rem),
    radial-gradient(circle at 76% 88%,rgba(183,148,216,.13),transparent 25rem),
    linear-gradient(145deg,#fff9fb 0%,#fff 45%,#f3fcfa 100%);
}

/* Application shell and navigation */
.sidebar {
  color:#fff;
  border-right:0;
  background:
    radial-gradient(circle at 10% 7%,rgba(233,63,128,.34),transparent 10rem),
    radial-gradient(circle at 95% 48%,rgba(136,231,210,.12),transparent 13rem),
    linear-gradient(180deg,#29252a 0%,#1e1e22 72%,#171719 100%);
  box-shadow:12px 0 38px rgba(30,30,34,.18);
}
.brand { border-bottom-color:rgba(255,255,255,.13); }
.brand-logo-frame {
  border-color:rgba(233,63,128,.82);
  border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.25),0 0 0 3px rgba(233,63,128,.14);
}
.brand .brand-subtitle { color:#f1d2de; font-weight:720; }
.role-picker {
  border-color:rgba(255,255,255,.17);
  background:linear-gradient(135deg,rgba(255,255,255,.14),rgba(255,255,255,.07));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 12px 30px rgba(4,3,25,.16);
}
.role-picker label,.role-picker p { color:#f2cbd9; }
.role-tree-trigger { border-color:transparent; background:#fff; color:#31282c; }
.role-tree-trigger span { color:var(--dopamine-pink); }
.nav-group-title { color:#d9b5c4; background:rgba(255,255,255,.055); }
.nav-group-title:hover { color:#fff; background:rgba(255,255,255,.1); }
.nav-group-title::after,.nav-group-title em { color:#e7bfd0; }
.nav-level>summary,.nav-level-2>summary { color:#d4afbe; }
.nav-level>summary::before,.nav-item .nav-branch { color:var(--dopamine-cyan); }
.nav-item,.nav-item.nav-child,.nav-item.nav-function { color:#ead8df; }
.nav-item:hover { color:#fff; background:rgba(255,255,255,.1); }
.nav-item.active {
  color:#111;
  background:linear-gradient(100deg,#f36b9f,var(--dopamine-pink));
  box-shadow:inset 4px 0 var(--dopamine-cyan),0 12px 26px rgba(233,63,128,.25);
}
.nav-item.active .nav-icon { color:#111; }
.nav-item em { color:var(--dopamine-navy); background:var(--dopamine-cyan); font-weight:850; }
.nav-item.nav-child::before { border-color:rgba(136,231,210,.58); }
.sidebar-foot { border-top-color:rgba(255,255,255,.14); background:rgba(0,0,0,.18); }
.sidebar-account-card:hover { background:rgba(255,255,255,.11); box-shadow:none; }
.sidebar-account-card .avatar,.avatar {
  color:var(--dopamine-navy);
  background:linear-gradient(145deg,var(--dopamine-cyan),var(--dopamine-pink));
  box-shadow:0 5px 14px rgba(233,63,128,.26);
}
.sidebar-account-copy span,.sidebar-account-copy small { color:#efd3de; }
.sidebar-logout { color:#e9c5d3; }
.sidebar-logout:hover { color:#fff; background:var(--dopamine-red); }

.workspace::before {
  opacity:.8;
  background-image:
    radial-gradient(circle at 12% 8%,rgba(233,63,128,.16) 0 6px,transparent 7px),
    radial-gradient(circle at 88% 14%,rgba(136,231,210,.22) 0 9px,transparent 10px),
    radial-gradient(circle at 78% 86%,rgba(183,148,216,.13) 0 7px,transparent 8px);
  background-size:220px 220px,280px 280px,170px 170px;
}
.topbar {
  border-bottom:1px solid rgba(168,47,79,.12);
  background:rgba(255,255,255,.84);
  box-shadow:0 8px 28px rgba(87,39,58,.07);
  backdrop-filter:blur(18px) saturate(1.16);
}
.breadcrumb span { color:var(--dopamine-violet); }
.breadcrumb b { color:var(--dopamine-pink); }
.global-search { border-color:#ead8df; background:#fff9fb; }
.global-search:focus-within { border-color:var(--dopamine-violet); background:#fff; box-shadow:var(--ui-focus); }
.quick-button,.primary {
  color:#111;
  border-color:transparent;
  background:linear-gradient(120deg,#f36b9f 0%,var(--dopamine-pink) 100%);
  box-shadow:0 11px 24px rgba(233,63,128,.24),inset 0 1px 0 rgba(255,255,255,.34);
}
.quick-button:hover,.primary:hover { color:#fff; background:var(--dopamine-red); box-shadow:0 15px 30px rgba(168,47,79,.27); }
.message-button i,.icon-button i { background:var(--dopamine-red); }

/* Hero areas */
.page-head,.smart-work-hero,.flow-production-radar>header {
  border-color:rgba(168,47,79,.15);
  background:
    radial-gradient(circle at 93% 20%,rgba(233,63,128,.18) 0 2.8rem,transparent 2.9rem),
    radial-gradient(circle at 86% 78%,rgba(136,231,210,.34) 0 4rem,transparent 4.1rem),
    linear-gradient(118deg,#fff 0%,#fff4f8 55%,#effbf8 100%);
  box-shadow:var(--ui-shadow);
}
.page-head { border-top:6px solid var(--dopamine-violet); }
.page-head::before { background:var(--dopamine-pink); box-shadow:28px 15px 0 var(--dopamine-cyan),56px -2px 0 var(--dopamine-yellow); }
.page-head h1,.smart-work-hero h2 { color:#2f282c; }
.page-head h1::after { background:linear-gradient(90deg,var(--dopamine-pink),var(--dopamine-cyan)); }
.eyebrow {
  color:var(--dopamine-violet-dark);
  border-color:rgba(168,47,79,.18);
  background:#fff;
  box-shadow:0 5px 14px rgba(87,39,58,.06);
}
.eyebrow::before { background:var(--dopamine-pink); box-shadow:0 0 0 4px rgba(255,79,154,.12); }
.smart-work-hero>div:first-child>span { color:var(--dopamine-navy); background:linear-gradient(135deg,var(--dopamine-cyan),#b2e8dd); }

/* Dashboards and content cards */
.metrics { gap:18px; }
.metric,.module-card,.setting-card,.smart-work-metrics article {
  position:relative;
  overflow:hidden;
  border-color:#eadde2;
  background:#fff;
  box-shadow:var(--ui-shadow-sm);
}
.metric::before,.module-card::before,.smart-work-metrics article::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:6px;
  background:var(--card-accent,var(--dopamine-violet));
}
.metric:nth-child(4n+1),.module-card:nth-child(4n+1),.smart-work-metrics article:nth-child(4n+1) { --card-accent:var(--dopamine-pink); }
.metric:nth-child(4n+2),.module-card:nth-child(4n+2),.smart-work-metrics article:nth-child(4n+2) { --card-accent:var(--dopamine-cyan); }
.metric:nth-child(4n+3),.module-card:nth-child(4n+3),.smart-work-metrics article:nth-child(4n+3) { --card-accent:var(--dopamine-lilac); }
.metric:nth-child(4n),.module-card:nth-child(4n),.smart-work-metrics article:nth-child(4n) { --card-accent:var(--dopamine-orange); }
.metric::after,.module-card::after {
  content:"";
  position:absolute;
  right:-22px;
  bottom:-24px;
  width:76px;
  height:76px;
  border:14px solid color-mix(in srgb,var(--card-accent) 13%,transparent);
  border-radius:50%;
}
.metric-icon,.module-card .big-icon,.setting-icon {
  color:var(--card-accent,var(--dopamine-violet));
  border-color:color-mix(in srgb,var(--card-accent,var(--dopamine-violet)) 24%,white);
  background:color-mix(in srgb,var(--card-accent,var(--dopamine-violet)) 11%,white);
}
.metric strong,.smart-work-metrics strong { color:var(--dopamine-navy); }
.metric-clickable:hover,.module-card:hover { border-color:color-mix(in srgb,var(--card-accent) 42%,white); transform:translateY(-4px); box-shadow:var(--ui-shadow-hover); }

.panel,.data-panel,.message-inbox-shell,.smart-work-panel {
  border-color:#eadde2;
  background:rgba(255,255,255,.97);
  box-shadow:var(--ui-shadow);
}
.panel-head {
  border-bottom-color:#f0e2e7;
  background:linear-gradient(100deg,#fff 0%,#fff6f9 68%,#effbf8 100%);
}
.panel-head::before { content:""; width:5px; align-self:stretch; flex:none; border-radius:999px; background:linear-gradient(var(--dopamine-pink),var(--dopamine-cyan)); }
.panel-head h2 { color:#31282d; }

/* Tables, filters and actions */
.toolbar { border-color:#eadde2; background:rgba(255,255,255,.91); }
.filter-search,.filter-select,.time-sort-control { border-color:#e6d5dc; background:#fff; }
.filter-search:focus,.filter-select:focus,.time-sort-control:focus-within { border-color:var(--dopamine-violet); }
.data-panel .data-table th {
  color:#4d3d43;
  border-bottom-color:#ead7df;
  background:linear-gradient(180deg,#fff7fa,#f8edf2);
}
.data-panel .data-table tbody tr:nth-child(even) td { background:#fffbfc; }
.data-panel .data-table tbody tr:hover td { background:#fff1f6; }
.secondary,.panel-head button,.row-actions button,.toolbar button,.stage-actions button:not(.primary),.org-tools button,
.data-panel .data-table td>button,.panel .data-table td>button {
  color:var(--dopamine-violet-dark);
  border-color:#e5d2da;
  background:#fff;
  box-shadow:0 5px 13px rgba(87,39,58,.06);
}
.secondary:hover,.panel-head button:hover,.row-actions button:hover,.toolbar button:hover,.stage-actions button:not(.primary):hover,.org-tools button:hover,
.data-panel .data-table td>button:hover,.panel .data-table td>button:hover {
  color:#fff;
  border-color:var(--dopamine-violet);
  background:var(--dopamine-violet);
  box-shadow:0 9px 20px rgba(168,47,79,.2);
}
.status { font-weight:820; }
.status.pending { color:#7d5500; border-color:#f0c64f; background:#fff4bd; }
.status.ok { color:#087343; border-color:#8ee0b7; background:#ddf8ea; }
.status.bad { color:#a51d3b; border-color:#f3a8b6; background:#ffe5eb; }
.status.info { color:#1f55a5; border-color:#a9ccff; background:#e7f1ff; }
.status.warning { color:#9b4a0e; border-color:#ffbe8d; background:#fff0e4; }

/* Forms, dialogs and feedback */
dialog { border-color:rgba(168,47,79,.2); background:#fff; box-shadow:0 36px 110px rgba(48,27,36,.28); }
dialog::backdrop { background:rgba(30,30,34,.46); backdrop-filter:blur(9px) saturate(.8); }
.dialog-head { border-bottom-color:#efe0e6; }
.dialog-head h2 { color:#31282d; }
.dialog-head button { color:var(--dopamine-pink); border-color:#ffd0e4; background:#fff1f8; }
fieldset { border-color:#ead9e0; background:#fffbfc; }
fieldset>legend { color:var(--dopamine-violet-dark); }
.form-grid label>span { color:#504967; }
.form-grid input,.form-grid select,.form-grid textarea,
.batch-online-field input,.batch-online-field select,.batch-online-field textarea {
  border-color:#e5d3da;
  background:#fff;
}
.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,
.batch-online-field input:focus,.batch-online-field select:focus,.batch-online-field textarea:focus {
  border-color:var(--dopamine-violet);
  box-shadow:var(--ui-focus);
}
.form-actions { border-top-color:#eee0e5; background:rgba(255,255,255,.93); }
.toast { border-color:rgba(255,255,255,.22); background:linear-gradient(120deg,#1e1e22,#4a382e); box-shadow:0 20px 55px rgba(30,30,34,.3); }
.toast.success { background:linear-gradient(120deg,#08643e,#0a7b4c); }
.toast.error { background:linear-gradient(120deg,#861b38,var(--dopamine-red)); }
.message-alert { border-color:#ead3dc; box-shadow:0 22px 60px rgba(87,39,58,.18); }
.message-alert-head span { background:var(--dopamine-red); }

.auth-gate {
  background:
    radial-gradient(circle at 15% 16%,rgba(233,63,128,.22),transparent 20rem),
    radial-gradient(circle at 84% 18%,rgba(136,231,210,.4),transparent 23rem),
    radial-gradient(circle at 74% 84%,rgba(183,148,216,.25),transparent 25rem),
    linear-gradient(145deg,#fff3f8,#fff 52%,#effbf8);
}
.auth-card { border-color:rgba(168,47,79,.18); box-shadow:0 36px 110px rgba(87,39,58,.17); }
.auth-card h1 { color:#31282d; }
.auth-card input:focus { border-color:var(--dopamine-violet); box-shadow:var(--ui-focus); }
.auth-card button { color:#111; background:linear-gradient(120deg,#f36b9f,var(--dopamine-pink)); }

/* Workflow and project areas */
.batch-project-card,.compounding-project-card {
  border-color:#ead9e0;
  background:#fff;
  box-shadow:var(--ui-shadow-sm);
}
.batch-project-card:nth-child(3n+1),.compounding-project-card:nth-child(3n+1) { border-top:6px solid var(--dopamine-violet); }
.batch-project-card:nth-child(3n+2),.compounding-project-card:nth-child(3n+2) { border-top:6px solid var(--dopamine-cyan); }
.batch-project-card:nth-child(3n),.compounding-project-card:nth-child(3n) { border-top:6px solid var(--dopamine-lilac); }
.compounding-project-card.is-flow-focus {
  outline:3px solid rgba(233,63,128,.24);
  outline-offset:3px;
  box-shadow:0 18px 46px rgba(168,47,79,.18);
}
.compounding-current-step { border-left-color:var(--dopamine-pink); background:#fff0f8; }
.compounding-current-step small { color:#c82872; }
.compounding-project-action { background:linear-gradient(100deg,#fff0f6,#effbf8); }
.compounding-stepper span.current b { background:var(--dopamine-violet); box-shadow:0 0 0 4px #ffe0ec; }
.compounding-stepper span.reached b { color:#087343; border-color:#8ee0b7; background:#ddf8ea; }
.batch-project-identity { border-color:#e8d4dc; background:rgba(255,248,251,.96); box-shadow:0 10px 26px rgba(87,39,58,.09); }
.batch-project-identity small { color:var(--dopamine-violet); }
.batch-number-entry,.compounding-batch-lock { border-color:#e7d3db; background:#fff7fa; }
.batch-number-entry span,.compounding-batch-lock span { color:var(--dopamine-violet-dark); }

.flow-production-radar>header { border-top:6px solid var(--dopamine-cyan); }
.flow-production-radar details { border-color:#eadbe1; }
.flow-production-radar summary { background:linear-gradient(90deg,#fff,#fff5f8); }
.flow-production-radar summary b { color:#087343; background:#ddf8ea; }
.flow-production-radar summary b.attention { color:#8a4e00; background:#fff1b8; }
.flow-material-item.bad { box-shadow:inset 6px 0 var(--dopamine-red); }
.flow-material-item.warning { box-shadow:inset 6px 0 var(--dopamine-orange); }
.flow-material-item.pending { box-shadow:inset 6px 0 var(--dopamine-yellow); }
.flow-material-item.info { box-shadow:inset 6px 0 var(--dopamine-blue); }
.flow-material-item.ok { box-shadow:inset 6px 0 var(--dopamine-green); }
.flow-production-item.complete>i { background:var(--dopamine-green); }
.flow-production-item.in_progress { border-color:#f1bdd0; box-shadow:inset 4px 0 var(--dopamine-violet); }
.flow-production-item.in_progress>i { background:var(--dopamine-violet); }
.flow-production-item.waiting>i { color:#765200; background:#fff1b8; }

/* Preserve every controlled Excel/Word source preview: exact white paper, black grid. */
:is(.batch-paper-sheet,.batch-source-table,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet) {
  --ink:#111;
  --muted:#555;
  --line:#111;
  color:#111;
  background:#fff;
  box-shadow:none;
  filter:none;
}
:is(.batch-paper-sheet,.batch-source-table,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet)
  :is(table,thead,tbody,tr,th,td) { color:#111; background:#fff; }
:is(.batch-paper-sheet,.batch-source-table,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet)
  :is(input,select,textarea) { color:#111; background:#fff; }

@media (prefers-reduced-motion:no-preference) {
  .metric,.module-card,.panel,.data-panel,.smart-work-item,.batch-project-card,.compounding-project-card { animation:dopamine-rise .28s ease both; }
  @keyframes dopamine-rise { from { opacity:.76; transform:translateY(5px); } to { opacity:1; transform:none; } }
}

/* Layout rhythm: stable placement, readable line lengths and predictable grids. */
main { width:100%; max-width:1780px; margin:0 auto; padding:32px clamp(24px,2.8vw,48px) 56px; }
.metrics { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
.module-grid { grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); }
.settings-grid { grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); }
.dashboard-grid { align-items:start; gap:24px; }
.page-head,.panel,.data-panel,.toolbar,.smart-work-hero,.smart-work-panel { width:100%; }
.page-head { margin-bottom:26px; }
.panel + .panel { margin-top:24px; }
.panel-head { gap:16px; }
.panel-head>div { min-width:0; flex:1; }
.panel-head h2,.panel-head p { overflow-wrap:anywhere; }
.data-table th,.data-table td { line-height:1.55; }
.row-actions { justify-content:flex-start; }
.form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.form-grid label { min-width:0; }
.form-actions { position:sticky; z-index:3; bottom:-1px; padding:15px 0 2px; backdrop-filter:blur(12px); }

/* Repeated component semantics: the same position always carries the same hue. */
.regulatory-guidance { gap:12px; }
.regulatory-guidance>div {
  position:relative;
  overflow:hidden;
  border-color:#eadbe1;
  border-radius:14px;
  background:#fff;
  box-shadow:var(--ui-shadow-sm);
}
.regulatory-guidance>div::before { content:""; position:absolute; inset:0 0 auto; height:5px; }
.regulatory-guidance>div:nth-child(1)::before { background:var(--dopamine-pink); }
.regulatory-guidance>div:nth-child(2)::before { background:var(--dopamine-cyan); }
.regulatory-guidance>div:nth-child(3)::before { background:var(--dopamine-lilac); }
.regulatory-guidance>div:nth-child(1) b { color:#a52261; }
.regulatory-guidance>div:nth-child(2) b { color:#08717a; }
.regulatory-guidance>div:nth-child(3) b { color:#694a86; }
.controlled-edit-note {
  border-color:#e7d4dc;
  border-left:5px solid var(--dopamine-violet);
  background:linear-gradient(100deg,#fff1f6,#fffbfc);
}
.controlled-edit-note.warning,.compliance-warning,.security-note,.signature-notice {
  color:#624600;
  border-color:#efd98c;
  border-left-color:var(--dopamine-yellow);
  background:#fff9dc;
}
.compliance-blocker { border-color:#efb8c5; border-left-color:var(--dopamine-red); background:#fff1f4; }
.empty-icon { color:var(--dopamine-navy); border-color:#f0d269; background:#fff3bd; }
.text-action { color:var(--dopamine-red); }
.quick-option { border-color:#eadbe1; border-radius:13px; box-shadow:var(--ui-shadow-sm); }
.quick-option:hover { border-color:#efaec6; background:#fff6f9; }
.quick-option span { color:#9f285b; background:#ffe5ef; }
.quick-option:nth-child(even) span { color:#116d65; background:#def8f2; }
.timeline-item>i { background:var(--dopamine-violet); box-shadow:0 0 0 1px #d66891; }
.timeline-item:not(:last-child)::before { background:#e8ccd7; }
.timeline-item p { background:#fff3f7; }
.message-inbox-summary article { border-color:#eadbe1; background:#fff; }
.message-inbox-summary article:nth-child(4n+1) { border-top:5px solid var(--dopamine-violet); }
.message-inbox-summary article:nth-child(4n+2) { border-top:5px solid var(--dopamine-cyan); }
.message-inbox-summary article:nth-child(4n+3) { border-top:5px solid var(--dopamine-lilac); }
.message-inbox-summary article:nth-child(4n) { border-top:5px solid var(--dopamine-orange); }
.message-filter-tabs button.active { color:#111; background:var(--dopamine-pink); box-shadow:0 7px 17px rgba(233,63,128,.22); }
.org-node.top { background:var(--dopamine-navy); }
.org-node.executive { color:#111; background:var(--dopamine-pink); }
.org-line,.org-branches::before,.org-department::before { background:#dfb7c6; }
.org-department { border-color:#eadbe1; background:#fff; }
.org-department:nth-child(3n+1) { border-top:5px solid var(--dopamine-violet); }
.org-department:nth-child(3n+2) { border-top:5px solid var(--dopamine-cyan); }
.org-department:nth-child(3n) { border-top:5px solid var(--dopamine-lilac); }
.org-projects span { color:#9c2859; background:#ffe6ef; }
.setting-card:nth-child(4n+1) { border-top:5px solid var(--dopamine-violet); }
.setting-card:nth-child(4n+2) { border-top:5px solid var(--dopamine-cyan); }
.setting-card:nth-child(4n+3) { border-top:5px solid var(--dopamine-lilac); }
.setting-card:nth-child(4n) { border-top:5px solid var(--dopamine-orange); }
.setting-card:hover { border-color:#e9abc2; box-shadow:var(--ui-shadow-hover); }
.check-ok { background:var(--dopamine-green); }
.check-bad { background:var(--dopamine-red); }
.record-number-label em,.task-count-badge { color:#9f285a; background:#ffe4ef; }
.batch-online-intro { border-color:#ead4dc; background:linear-gradient(120deg,#fff,#fff2f7); }
.batch-online-section,.batch-critical-fields { border-color:#eadbe1; background:#fff; }
.batch-online-section legend,.batch-critical-fields legend { color:var(--dopamine-violet-dark); }
.batch-save-bar { border-color:#e6cad5; box-shadow:0 12px 30px rgba(87,39,58,.12); }
.signature-pad,.submission-signature { border-color:#cf7698; background:#fff; }
.batch-center-intro {
  border-bottom:6px solid var(--dopamine-cyan);
  background:
    radial-gradient(circle at 92% 24%,rgba(136,231,210,.2),transparent 9rem),
    linear-gradient(112deg,var(--dopamine-navy) 0 48%,var(--dopamine-red) 100%);
  box-shadow:0 18px 42px rgba(61,29,41,.2);
}
.batch-center-intro small,.batch-center-intro p { color:#f8eaf0; }
.compounding-workbench-guide { border-color:#ead8df; box-shadow:var(--ui-shadow); }
.compounding-workbench-guide>header { border-bottom-color:#eee0e5; background:linear-gradient(105deg,#fff,#fff1f6 62%,#effbf8); }
.compounding-workbench-guide>header small { color:var(--dopamine-red); }
.compounding-workbench-guide li { border-color:#f0e4e8; }
.compounding-workbench-guide li>b { color:#111; background:var(--dopamine-pink); }
.compounding-workbench-guide li:nth-child(3n+2)>b { color:#fff; background:var(--dopamine-red); }
.compounding-workbench-guide li:nth-child(3n)>b { color:var(--dopamine-navy); background:var(--dopamine-cyan); }
.compounding-workbench-guide>footer { background:#fff8fa; }
.compounding-workbench-guide>footer span { color:#9b2857; background:#ffe4ee; }

/* Structured sales-order BOM: conditional groups, reference images and dense material rows. */
.sales-conditional-section { display:grid; gap:14px; padding:20px; border:1px solid #edd4df; border-radius:18px; background:linear-gradient(125deg,#fff9fc 0%,#fff 50%,#f3fcfa 100%); box-shadow:0 10px 28px rgba(116,48,75,.055); }
.field-group-label { color:#402f37; font-size:14px; font-weight:850; letter-spacing:.01em; }
.sales-order-form .check-grid.compact { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.sales-order-form .check-grid.compact label { --choice-accent:#e93f80; display:grid; grid-template-columns:24px minmax(0,1fr); align-items:center; gap:12px; min-width:0; min-height:68px; margin:0; padding:14px 16px; overflow:hidden; border:1px solid #eadce2; border-radius:15px; color:#493a41; background:linear-gradient(145deg,#fff 0%,#fff9fc 100%); box-shadow:0 7px 18px rgba(73,41,54,.055); cursor:pointer; transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease; }
.sales-order-form .check-grid.compact label:nth-child(3n+2) { --choice-accent:#25a895; }
.sales-order-form .check-grid.compact label:nth-child(3n) { --choice-accent:#8a62c6; }
.sales-order-form .check-grid.compact label:hover { border-color:color-mix(in srgb,var(--choice-accent) 50%,white); box-shadow:0 11px 24px color-mix(in srgb,var(--choice-accent) 13%,transparent); transform:translateY(-2px); }
.sales-order-form .check-grid.compact label:has(input:checked) { border-color:var(--choice-accent); background:color-mix(in srgb,var(--choice-accent) 8%,white); box-shadow:0 0 0 3px color-mix(in srgb,var(--choice-accent) 13%,transparent),0 10px 23px color-mix(in srgb,var(--choice-accent) 11%,transparent); }
.sales-order-form .check-grid.compact input[type="checkbox"] { appearance:auto; flex:none; width:21px!important; min-width:21px; height:21px!important; min-height:21px!important; margin:0; padding:0!important; border:0; border-radius:6px; accent-color:var(--choice-accent); box-shadow:none!important; }
.sales-order-form .check-grid.compact label>span { display:block; min-width:0; margin:0!important; color:inherit; font-size:14px; font-weight:780; line-height:1.45; overflow-wrap:normal; word-break:keep-all; white-space:normal; writing-mode:horizontal-tb; }
.sales-order-form .sales-conditional-section>small { color:#89747d; font-size:11px; line-height:1.6; }
@media(max-width:900px) { .sales-order-form .check-grid.compact { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) { .sales-conditional-section { padding:15px; }.sales-order-form .check-grid.compact { grid-template-columns:1fr; gap:9px; }.sales-order-form .check-grid.compact label { min-height:58px; padding:12px 14px; } }
.business-material-row.enhanced { align-items:start; padding:18px; border-color:#ead3dc; background:linear-gradient(135deg,#fffafd,#f7fffd); box-shadow:0 10px 25px rgba(87,39,58,.06); }
.business-material-row .material-row-head { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; padding-bottom:10px; border-bottom:1px solid #eadde3; }
.business-material-row .material-row-head strong { color:#4b245b; font-size:16px; }.business-material-row .material-row-head span { padding:6px 10px; border-radius:999px; color:#9f2455; background:#ffe8f1; font-size:12px; font-weight:800; }
.business-material-row .material-status { grid-column:span 3; }.business-material-row .material-arrived { grid-column:span 3; }
.business-material-row.collapsible { display:block; padding:0; overflow:hidden; }
.business-material-fields { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:10px 12px; align-items:start; padding:18px; border-top:1px solid #eadde3; }
.business-material-fields[hidden] { display:none; }
.business-material-fields>.full { grid-column:1/-1; }
.material-card-summary { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; width:100%; min-width:0; margin:0; padding:18px; border:0; border-radius:0; background:transparent; color:#493840; text-align:left; font:inherit; cursor:pointer; box-shadow:none; }
.material-card-summary:hover { background:rgba(255,238,246,.55); transform:none; }
.material-card-summary:focus-visible { outline:2px solid #b8336b; outline-offset:-3px; }
.material-card-overview { display:grid; gap:8px; min-width:0; flex:1; overflow-wrap:anywhere; }
.material-card-eyebrow { color:#967586; font-size:11px; font-weight:650; }
.material-card-overview>strong { color:#473144; font-size:17px; line-height:1.45; font-weight:750; }
.material-card-meta { display:flex; flex-wrap:wrap; gap:7px 18px; color:#82717b; font-size:12px; line-height:1.7; }
.material-card-meta [data-material-summary-quantity] { color:#5b3c4d; font-weight:700; }
.material-card-actions { display:grid; justify-items:end; gap:12px; flex:0 0 auto; }
.material-card-status { padding:5px 10px; border-radius:999px; color:#9f2455; background:#ffe8f1; font-size:12px; line-height:1.5; font-weight:700; }
.material-card-toggle-label { display:inline-flex; align-items:center; gap:7px; color:#9f4b70; font-size:12px; }
.material-card-chevron { display:inline-block; transition:transform .15s; }
.material-card-summary[aria-expanded="false"] .material-card-chevron { transform:rotate(180deg); }
@media(prefers-reduced-motion:reduce) { .material-card-chevron { transition:none; } }
@media(max-width:600px) {
  .business-material-fields { grid-template-columns:minmax(0,1fr); padding:14px; gap:14px; }
  .business-material-fields>* { grid-column:1/-1!important; }
  .material-card-summary { padding:14px; gap:10px; flex-wrap:wrap; }
  .material-card-overview { flex-basis:100%; }
  .material-card-overview>strong { font-size:16px; }
  .material-card-actions { display:flex; align-items:center; justify-content:space-between; width:100%; }
}
.business-material-summary { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:12px 14px; border:1px solid #d8ebe6; border-radius:12px; background:#f5fffc; color:#4f4651; }
.business-material-summary strong { margin-right:auto; color:#4b245b; }.business-material-summary span { padding:5px 9px; border-radius:999px; background:#fff; border:1px solid #e3dce5; font-size:12px; font-weight:700; }
.business-material-row .material-weight { grid-column:span 2; }
.business-material-row .material-incoming,.business-material-row .material-loss { grid-column:span 6; }
.business-material-row .material-reference-image,.business-material-row .material-remark { grid-column:1/-1; }
.business-material-row [data-material-inkjet],.business-material-row [data-material-pasting],.business-material-row [data-agency-detail] { grid-column:span 6; }
.material-reference-image input[type="file"],.order-reference-upload input[type="file"] { height:auto; padding:12px; border-style:dashed; background:#fff8fb; }
.order-image-strip { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.order-image-strip img { width:46px; height:46px; border:1px solid #ead3dc; border-radius:8px; object-fit:cover; }
.order-reference-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px; margin:14px 0 22px; }
.order-reference-gallery a { display:grid; gap:7px; padding:8px; color:#4d3740; text-decoration:none; border:1px solid #ead5dd; border-radius:12px; background:#fff; box-shadow:var(--ui-shadow-sm); }
.order-reference-gallery img { width:100%; aspect-ratio:4/3; border-radius:8px; object-fit:cover; }
.order-reference-gallery span { overflow:hidden; font-size:11px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.change-request-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0 0 20px; }
.change-request-summary>div { display:grid; gap:7px; min-width:0; padding:15px 16px; border:1px solid #ead5dd; border-radius:14px; background:linear-gradient(135deg,#fff,#fff5f8); }
.change-request-summary>div:nth-child(3),.change-request-summary>div:nth-child(4) { grid-column:1/-1; }
.change-request-summary span { color:#8c6f7b; font-size:12px; font-weight:750; }
.change-request-summary strong { color:#342a2e; font-size:14px; line-height:1.7; overflow-wrap:anywhere; white-space:pre-wrap; }

@media (max-width:760px) {
  main { padding:20px 14px 38px; }
  .sidebar { box-shadow:14px 0 38px rgba(30,30,34,.24); }
  .page-head,.smart-work-hero,.flow-production-radar>header { background:linear-gradient(135deg,#fff,#fff1f6 60%,#effbf8); }
  .page-head { border-top-width:5px; }
  .panel-head::before { width:4px; }
  .metric::before,.module-card::before,.smart-work-metrics article::before { width:5px; }
  .metrics,.module-grid,.settings-grid,.form-grid { grid-template-columns:1fr; }
  .business-material-row.enhanced>* { grid-column:1/-1!important; }
  .change-request-summary { grid-template-columns:1fr; }
  .change-request-summary>div { grid-column:1!important; }
}

/* ========================================================================== */
/* 2026 enterprise dopamine layout v2                                         */
/* Color identifies ownership and state; spacing and hierarchy carry the UI.  */
/* Controlled source-document previews above remain black-grid white-paper.    */
/* ========================================================================== */
body {
  --role-accent:#e93f80;
  --role-accent-2:#88e7d2;
  --role-accent-3:#b794d8;
  --role-ink:#2a2025;
  --role-tint:#fff1f6;
  --role-tint-2:#effbf8;
}
body[data-role="management"],body[data-role="admin"] {
  --role-accent:#e93f80; --role-accent-2:#1e1e22; --role-accent-3:#88e7d2;
  --role-ink:#1e1e22; --role-tint:#fff0f6; --role-tint-2:#f2fbf9;
}
body[data-role="business_manager"],body[data-role="business_staff"] {
  --role-accent:#e93f80; --role-accent-2:#28a997; --role-accent-3:#ff9432;
  --role-ink:#3d2130; --role-tint:#fff0f6; --role-tint-2:#ecfbf7;
}
body[data-role="planning"],body[data-role="purchaser"],body[data-role="rd"],body[data-role="rd_manager"] {
  --role-accent:#8057bd; --role-accent-2:#ff9432; --role-accent-3:#e93f80;
  --role-ink:#302442; --role-tint:#f5effc; --role-tint-2:#fff5e9;
}
body[data-role="warehouse_manager"] {
  --role-accent:#2078a8; --role-accent-2:#44d1bd; --role-accent-3:#f3b742;
  --role-ink:#17384a; --role-tint:#eef8fd; --role-tint-2:#ebfbf7;
}
body[data-role="production_manager"],body[data-role="compounding_operator"],body[data-role="compounding_worker"],
body[data-role="filling_manager"],body[data-role="filling_operator"],body[data-role="packaging_manager"],body[data-role="packaging_operator"] {
  --role-accent:#e45a32; --role-accent-2:#2078a8; --role-accent-3:#f2c84b;
  --role-ink:#46271e; --role-tint:#fff3ed; --role-tint-2:#eef8fd;
}
body[data-role="quality"],body[data-role="quality_safety_manager"],body[data-role="iqc"],body[data-role="ipqc"],
body[data-role="qc"],body[data-role="microbiology_inspector"],body[data-role="regulatory"] {
  --role-accent:#168f83; --role-accent-2:#9b68c7; --role-accent-3:#e93f80;
  --role-ink:#193b38; --role-tint:#ebfaf6; --role-tint-2:#f6f0fb;
}
body[data-role="finance"],body[data-role="hr"] {
  --role-accent:#a82f4f; --role-accent-2:#d49b2d; --role-accent-3:#8057bd;
  --role-ink:#40262e; --role-tint:#fff1f4; --role-tint-2:#fff8e8;
}

/* Page canvas: a predictable 8px rhythm and clear vertical sections. */
main#mainContent { display:block; }
main#mainContent > * + * { margin-top:24px; }
main#mainContent > .page-head + * { margin-top:0; }
.page-head {
  min-height:164px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:32px;
  padding:30px 40px 30px 34px;
  border:1px solid color-mix(in srgb,var(--role-accent) 22%,white);
  border-top:0;
  border-left:8px solid var(--role-accent);
  border-radius:24px;
  background:
    linear-gradient(90deg,color-mix(in srgb,var(--role-tint) 86%,white),rgba(255,255,255,.98) 48%,color-mix(in srgb,var(--role-tint-2) 78%,white)),
    #fff;
  box-shadow:0 20px 52px color-mix(in srgb,var(--role-accent) 10%,transparent);
  isolation:isolate;
}
.page-head::after {
  content:"";
  position:absolute;
  z-index:-1;
  right:34px;
  top:24px;
  width:110px;
  height:110px;
  border:18px solid color-mix(in srgb,var(--role-accent-2) 17%,transparent);
  border-radius:36px 50% 36px 50%;
  transform:rotate(14deg);
  opacity:1;
}
.page-head::before {
  content:"";
  position:absolute;
  z-index:-1;
  right:128px;
  top:32px;
  width:18px;
  height:18px;
  border-radius:7px;
  background:var(--role-accent);
  box-shadow:28px 22px 0 var(--role-accent-2),54px -4px 0 var(--role-accent-3);
}
.page-head>div:first-child { max-width:920px; }
.page-head h1 { max-width:18em; margin:10px 0 8px; color:var(--role-ink); font-size:clamp(30px,2.5vw,42px); line-height:1.16; letter-spacing:-.025em; }
.page-head h1::after { width:72px; height:5px; margin-top:12px; border-radius:999px; background:linear-gradient(90deg,var(--role-accent),var(--role-accent-2)); }
.page-head p { max-width:820px; color:#6f6268; font-size:13px; line-height:1.75; }
.eyebrow { color:color-mix(in srgb,var(--role-accent) 84%,#272027); border-color:color-mix(in srgb,var(--role-accent) 24%,white); background:rgba(255,255,255,.86); box-shadow:0 5px 14px color-mix(in srgb,var(--role-accent) 8%,transparent); }
.eyebrow::before { background:var(--role-accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--role-accent) 12%,transparent); }
.head-tools { gap:10px; }

/* Dashboard summaries: strong scan order without turning the page into a poster. */
.metrics,.smart-work-metrics { gap:16px; margin-bottom:24px; }
.metric,.module-card,.setting-card,.smart-work-metrics article {
  --card-accent:var(--role-accent);
  position:relative;
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--card-accent) 19%,#eee5e9);
  border-radius:20px;
  background:linear-gradient(150deg,#fff 0%,#fff 63%,color-mix(in srgb,var(--card-accent) 7%,white) 100%);
  box-shadow:0 13px 34px rgba(54,38,45,.075);
}
.metric:nth-child(4n+2),.module-card:nth-child(4n+2),.setting-card:nth-child(4n+2),.smart-work-metrics article:nth-child(4n+2) { --card-accent:var(--role-accent-2); }
.metric:nth-child(4n+3),.module-card:nth-child(4n+3),.setting-card:nth-child(4n+3),.smart-work-metrics article:nth-child(4n+3) { --card-accent:var(--role-accent-3); }
.metric:nth-child(4n),.module-card:nth-child(4n),.setting-card:nth-child(4n),.smart-work-metrics article:nth-child(4n) { --card-accent:#ff9432; }
.metric::before,.module-card::before,.smart-work-metrics article::before { width:7px; background:var(--card-accent); }
.metric::after,.module-card::after {
  content:"";
  position:absolute;
  right:-22px;
  bottom:-30px;
  width:90px;
  height:90px;
  border:14px solid color-mix(in srgb,var(--card-accent) 9%,transparent);
  border-radius:32px 50% 32px 50%;
  transform:rotate(18deg);
  pointer-events:none;
}
.metric { min-height:126px; padding:20px 22px 18px 24px; }
.metric-top { gap:12px; color:#6d6267; font-weight:720; }
.metric-icon,.module-card .big-icon,.setting-icon {
  color:color-mix(in srgb,var(--card-accent) 76%,#222);
  border:1px solid color-mix(in srgb,var(--card-accent) 22%,white);
  background:color-mix(in srgb,var(--card-accent) 10%,white);
}
.metric strong,.smart-work-metrics strong { color:var(--role-ink); font-family:ui-rounded,"SF Pro Rounded","PingFang SC",sans-serif; font-variant-numeric:tabular-nums; }
.metric small { display:block; max-width:85%; margin-top:5px; color:#82777c; }
.module-grid { grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:18px; }
.module-card { min-height:178px; padding:24px 24px 22px 26px; text-align:left; }
.module-card .big-icon { width:48px; height:48px; border-radius:16px; font-size:20px; }
.module-card h3 { margin:20px 0 7px; color:var(--role-ink); font-size:17px; letter-spacing:-.01em; }
.module-card p { max-width:33em; color:#766c71; line-height:1.7; }
.metric-clickable:hover,.module-card:hover,.setting-card:hover { transform:translateY(-4px); border-color:color-mix(in srgb,var(--card-accent) 42%,white); box-shadow:0 22px 50px color-mix(in srgb,var(--card-accent) 15%,transparent); }

/* Panels and work areas: title, controls, then data. */
.panel,.data-panel,.smart-work-panel,.message-inbox-shell {
  overflow:hidden;
  border:1px solid #e9dfe3;
  border-radius:22px;
  background:rgba(255,255,255,.98);
  box-shadow:0 16px 42px rgba(55,38,45,.075);
}
.panel-head {
  position:relative;
  min-height:82px;
  gap:18px;
  padding:18px 22px 18px 28px;
  border-bottom:1px solid #eee3e7;
  background:linear-gradient(100deg,color-mix(in srgb,var(--role-tint) 62%,white),#fff 58%,color-mix(in srgb,var(--role-tint-2) 55%,white));
}
.panel-head::before { width:7px; background:linear-gradient(180deg,var(--role-accent),var(--role-accent-2)); }
.panel-head h2 { color:var(--role-ink); font-size:19px; letter-spacing:-.01em; }
.panel-head p { margin-top:4px; color:#7d7177; line-height:1.65; }
.section-title {
  display:flex;
  align-items:center;
  gap:12px;
  margin:30px 0 14px;
  color:var(--role-ink);
  font-size:17px;
}
.section-title::before { content:""; width:8px; height:24px; border-radius:5px; background:var(--role-accent); box-shadow:8px 8px 0 color-mix(in srgb,var(--role-accent-2) 55%,white); }
.section-title::after { content:""; height:1px; flex:1; background:linear-gradient(90deg,color-mix(in srgb,var(--role-accent) 28%,white),transparent); }

/* Toolbars and buttons use compact, consistent affordances. */
.toolbar {
  gap:10px;
  padding:14px;
  border:1px solid #e9dfe3;
  border-left:6px solid var(--role-accent-2);
  border-radius:17px;
  background:rgba(255,255,255,.94);
  box-shadow:0 10px 27px rgba(55,38,45,.055);
}
/* Keep critical actions visible in older Chromium/360 engines. A declaration
   containing var() + unsupported color-mix() becomes invalid at computed-value
   time and can reset background to transparent instead of using an earlier rule.
   Gate the enhancement itself, not just a preceding fallback declaration. */
.primary,.quick-button { color:#fff; border-color:var(--role-accent,#e93f80); background:var(--role-accent,#e93f80); box-shadow:0 10px 22px rgba(55,38,45,.18); }
.primary:hover,.quick-button:hover { color:#fff; border-color:var(--role-accent,#e93f80); background:var(--role-accent,#e93f80); box-shadow:0 14px 28px rgba(55,38,45,.22); }
@supports (color:color-mix(in srgb,red,blue)) {
  .primary,.quick-button { border-color:transparent; background:linear-gradient(125deg,var(--role-accent),color-mix(in srgb,var(--role-accent) 78%,#1e1e22)); box-shadow:0 10px 22px color-mix(in srgb,var(--role-accent) 24%,transparent); }
  .primary:hover,.quick-button:hover { border-color:transparent; background:color-mix(in srgb,var(--role-accent) 82%,#1e1e22); box-shadow:0 14px 28px color-mix(in srgb,var(--role-accent) 29%,transparent); }
}
.secondary,.panel-head button,.row-actions button,.toolbar button,.stage-actions button:not(.primary),.org-tools button,
.data-panel .data-table td>button,.panel .data-table td>button {
  color:var(--role-ink);
  border-color:#e5d8de;
  background:#fff;
}
.secondary:hover,.panel-head button:hover,.row-actions button:hover,.toolbar button:hover,.stage-actions button:not(.primary):hover,.org-tools button:hover,
.data-panel .data-table td>button:hover,.panel .data-table td>button:hover { color:#fff; border-color:var(--role-accent); background:var(--role-accent); }

/* Tables stay restrained: dopamine appears only in ownership and status cues. */
.data-panel { overflow:auto; }
.data-panel .data-table { border-collapse:separate; border-spacing:0; }
.data-panel .data-table th {
  position:sticky;
  z-index:2;
  top:0;
  padding:14px 16px;
  color:#54494e;
  border-bottom:1px solid color-mix(in srgb,var(--role-accent) 18%,#e7dde1);
  background:linear-gradient(180deg,color-mix(in srgb,var(--role-tint) 62%,white),#fff);
  font-size:11px;
  letter-spacing:.02em;
}
.data-panel .data-table td { padding:16px; border-top:1px solid #f0e8eb; background:#fff; }
.data-panel .data-table tbody tr:nth-child(even) td { background:#fffcfd; }
.data-panel .data-table tbody tr:hover td { background:color-mix(in srgb,var(--role-tint) 64%,white); }
.data-panel .data-table tbody tr:hover td:first-child { box-shadow:inset 5px 0 var(--role-accent); }
.code { color:color-mix(in srgb,var(--role-accent) 82%,#222); font-weight:780; }
.status { border-radius:999px; }

/* Forms: fieldsets become readable chapters; source previews are excluded below. */
dialog:not(:has(.batch-paper-sheet,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet)) {
  border:1px solid color-mix(in srgb,var(--role-accent) 22%,white);
  border-radius:26px;
}
dialog:not(:has(.batch-paper-sheet,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet)) .dialog-head {
  margin:-30px clamp(-42px,-3vw,-24px) 26px;
  padding:25px clamp(24px,3vw,42px) 20px;
  border-bottom:1px solid #eee1e6;
  background:linear-gradient(105deg,var(--role-tint),#fff 58%,var(--role-tint-2));
}
dialog:not(:has(.batch-paper-sheet,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet)) fieldset {
  position:relative;
  margin:24px 0;
  padding:24px 22px 22px;
  border:1px solid #eadde2;
  border-left:6px solid var(--role-accent);
  border-radius:18px;
  background:linear-gradient(145deg,#fff,#fffcfd);
  box-shadow:0 10px 28px rgba(55,38,45,.045);
}
dialog:not(:has(.batch-paper-sheet,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet)) fieldset:nth-of-type(even) { border-left-color:var(--role-accent-2); }
dialog:not(:has(.batch-paper-sheet,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet)) fieldset>legend {
  padding:6px 12px;
  border:1px solid color-mix(in srgb,var(--role-accent) 20%,white);
  border-radius:999px;
  color:var(--role-ink);
  background:#fff;
  box-shadow:0 5px 14px rgba(55,38,45,.055);
  font-size:13px;
}
.form-grid { gap:20px 18px; }
.form-grid label>span { margin-bottom:8px; color:#554950; font-size:12px; font-weight:760; }
.form-grid input,.form-grid select,.form-grid textarea { border-color:#dfd2d8; border-radius:12px; background:#fff; }
.form-grid input:hover,.form-grid select:hover,.form-grid textarea:hover { border-color:color-mix(in srgb,var(--role-accent) 45%,#d9cdd2); }
.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus { border-color:var(--role-accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--role-accent) 14%,transparent); }
.form-actions { gap:10px; padding-top:18px; }
.controlled-edit-note { border-left-color:var(--role-accent); background:linear-gradient(100deg,var(--role-tint),#fff); }
.empty-state { min-height:220px; display:grid; place-content:center; justify-items:center; padding:48px 24px; }
.empty-icon { width:62px; height:62px; border-radius:21px; color:var(--role-ink); border-color:color-mix(in srgb,var(--role-accent-2) 30%,white); background:color-mix(in srgb,var(--role-accent-2) 16%,white); transform:rotate(-4deg); }

/* Work queues and department handoff cards share the same interaction grammar. */
.smart-work-hero { border-left:8px solid var(--role-accent); background:linear-gradient(105deg,var(--role-tint),#fff 58%,var(--role-tint-2)); }
.smart-work-hero>div:first-child>span { color:#fff; background:linear-gradient(135deg,var(--role-accent),var(--role-accent-2)); box-shadow:0 10px 23px color-mix(in srgb,var(--role-accent) 22%,transparent); }
.smart-work-item:hover { background:var(--role-tint); box-shadow:inset 5px 0 var(--role-accent); }
.smart-work-icon { color:var(--role-ink); background:color-mix(in srgb,var(--role-accent) 12%,white); }
.department-flow-actions,.flow-production-radar>header,.compounding-workbench-guide,.batch-center-intro { border-radius:22px; }
.department-flow-action-grid>* { border-radius:16px; }

/* Responsive hierarchy: 3/2/1 columns, never compressed vertical labels. */
@media (max-width:1180px) {
  .page-head { min-height:150px; padding:26px 112px 26px 28px; }
  .module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  main#mainContent > * + * { margin-top:18px; }
  .page-head { grid-template-columns:1fr; gap:20px; min-height:auto; padding:24px 74px 24px 20px; border-left-width:6px; border-radius:20px; }
  .page-head::after { right:10px; top:22px; width:58px; height:58px; border-width:10px; }
  .page-head::before { display:none; }
  .page-head h1 { font-size:29px; }
  .head-tools { width:100%; justify-content:flex-start; }
  .module-grid { grid-template-columns:1fr; }
  .module-card { min-height:150px; padding:20px; }
  .panel,.data-panel,.smart-work-panel,.message-inbox-shell { border-radius:17px; }
  .panel-head { min-height:72px; padding:16px; }
  .panel-head::before { width:5px; }
  .toolbar { align-items:stretch; border-left-width:5px; }
  dialog:not(:has(.batch-paper-sheet,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet)) .dialog-head { margin:-22px -16px 22px; padding:20px 16px 16px; }
  dialog:not(:has(.batch-paper-sheet,.incoming-inspection-sheet,.package-iqc-sheet,.raw-material-iqc-sheet)) fieldset { padding:18px 14px 16px; border-left-width:5px; }
}

/* 配制项目任务台：工作优先、项目归组、完成后进入历史。 */
.compounding-workspace-head {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:center;
  margin-bottom:14px;
  padding:22px 24px;
  overflow:hidden;
  border:1px solid #eadce2;
  border-left:7px solid var(--role-accent);
  border-radius:20px;
  background:
    radial-gradient(circle at 92% 18%,color-mix(in srgb,var(--role-accent-2) 18%,transparent),transparent 13rem),
    linear-gradient(112deg,var(--role-tint),#fff 58%,var(--role-tint-2));
  box-shadow:var(--ui-shadow-sm);
}
.compounding-workspace-head small,.section-kicker { color:var(--role-ink); font-size:11px; font-weight:850; letter-spacing:.08em; }
.compounding-workspace-head h1 { margin:5px 0 4px; color:#33272d; font-size:clamp(24px,2.1vw,34px); letter-spacing:-.035em; }
.compounding-workspace-head p { max-width:850px; margin:0; color:#74656c; line-height:1.6; }
.compounding-head-metrics { display:flex; gap:8px; }
.compounding-head-metrics span { display:grid; min-width:94px; padding:11px 13px; border:1px solid rgba(255,255,255,.8); border-radius:14px; color:#796871; background:rgba(255,255,255,.78); box-shadow:0 7px 18px rgba(67,42,53,.055); font-size:11px; }
.compounding-head-metrics b { color:#30262b; font-size:22px; line-height:1.1; }
.compounding-flow-strip { display:grid; grid-template-columns:auto 1fr auto 1fr auto 1fr auto 1fr auto; gap:10px; align-items:center; margin:0 0 14px; padding:12px 18px; border:1px solid #eadfe3; border-radius:16px; background:#fff; box-shadow:0 8px 22px rgba(67,42,53,.04); }
.compounding-flow-strip span { display:flex; gap:7px; align-items:center; color:#66575e; font-size:12px; font-weight:780; white-space:nowrap; }
.compounding-flow-strip b { display:grid; place-items:center; width:24px; height:24px; border-radius:8px; color:#fff; background:var(--role-accent); }
.compounding-flow-strip i { height:2px; background:linear-gradient(90deg,color-mix(in srgb,var(--role-accent) 48%,white),color-mix(in srgb,var(--role-accent-2) 48%,white)); }
.compounding-id-guide { margin:0 0 18px; border:1px solid #e9dde2; border-radius:14px; background:#fff; }
.compounding-id-guide summary { padding:11px 16px; color:#6f5e66; font-size:12px; font-weight:760; cursor:pointer; }
.compounding-id-guide>div { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:0 14px 14px; }
.compounding-id-guide p { margin:0; padding:10px 12px; border-radius:10px; background:#faf7f8; color:#71636a; font-size:11px; }
.compounding-id-guide strong { color:var(--role-ink); }
.compounding-active-panel,.compounding-history-panel { overflow:hidden; }
.compounding-active-panel>.panel-head,.compounding-history-panel>.panel-head { min-height:74px; padding:16px 20px; }
.compounding-active-panel>.panel-head h2,.compounding-history-panel>.panel-head h2 { margin:2px 0; font-size:21px; }
.compounding-active-panel>.panel-head p,.compounding-history-panel>.panel-head p { font-size:11px; }
.compounding-project-grid.compact { display:grid; grid-template-columns:1fr; gap:10px; padding:12px; }
.compounding-project-card.compact {
  display:grid;
  grid-template-columns:minmax(300px,1fr) minmax(330px,1.15fr) minmax(210px,.72fr);
  gap:0;
  align-items:stretch;
  padding:0;
  overflow:hidden;
  border:1px solid #e9dfe3;
  border-top:1px solid #e9dfe3!important;
  border-left:5px solid var(--role-accent);
  border-radius:16px;
  box-shadow:0 7px 20px rgba(65,41,51,.045);
}
.compounding-project-card.compact:hover { border-color:color-mix(in srgb,var(--role-accent) 32%,#e9dfe3); box-shadow:0 12px 28px rgba(65,41,51,.085); }
.compounding-project-summary { display:grid; gap:12px; min-width:0; padding:16px 18px; }
.compounding-project-card.compact .compounding-project-head h3 { margin:3px 0; font-size:18px; }
.compounding-project-card.compact .compounding-project-head p { font-size:12px; }
.compounding-project-head>span.ready { color:#8c2552; background:#ffe2ed; }
.compounding-project-head>span.waiting { color:#6f625f; background:#f3f0ee; }
.compounding-project-card.compact dl { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.compounding-project-card.compact dl div { padding:8px 9px; border-radius:9px; }
.compounding-project-card.compact dt { font-size:10px; }
.compounding-project-card.compact dd { margin-top:3px; font-size:11px; line-height:1.4; }
.compounding-project-card.compact .compounding-current-step { align-content:center; margin:0; padding:16px 18px; border:0; border-left:1px solid #efe4e8; border-radius:0; background:linear-gradient(110deg,#fff9fb,#fff); }
.compounding-project-card.compact .compounding-current-step strong { font-size:14px; line-height:1.55; }
.compounding-project-card.compact .compounding-current-step span { font-size:10px; line-height:1.5; }
.compounding-project-card.compact .compounding-project-action { grid-template-columns:1fr; align-content:center; gap:10px; margin:0; padding:16px; border-left:1px solid #efe4e8; border-radius:0; background:linear-gradient(135deg,var(--role-tint),#fff); }
.compounding-project-card.compact .compounding-project-action strong { font-size:14px; }
.compounding-project-card.compact .compounding-project-action button { width:100%; min-width:0; padding:10px 12px; }
.compounding-project-records { grid-column:1/-1; border-top:1px solid #eee3e7; background:#fcfafb; }
.compounding-project-records summary,.compounding-unlinked-records summary { padding:10px 18px; color:#705f67; font-size:11px; font-weight:780; cursor:pointer; }
.compounding-project-records summary b,.compounding-unlinked-records summary b { display:inline-grid; place-items:center; min-width:22px; height:22px; margin-left:5px; border-radius:999px; color:var(--role-ink); background:var(--role-tint); }
.compounding-record-row { display:grid; grid-template-columns:minmax(250px,1.3fr) minmax(130px,.65fr) minmax(160px,.8fr) auto; gap:12px; align-items:center; padding:11px 18px; border-top:1px solid #eee5e8; background:#fff; }
.compounding-record-row>div { display:grid; min-width:0; gap:2px; }
.compounding-record-row strong,.compounding-record-row span { overflow-wrap:anywhere; font-size:12px; }
.compounding-record-row small { color:#8b7d83; font-size:10px; }
.compounding-record-row>div:last-child { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.compounding-record-row button { padding:7px 10px; font-size:11px; }
.compounding-history-panel { margin-top:16px; }
.compounding-history-project { border-top:1px solid #eee3e7; background:#fff; }
.compounding-history-project>summary { display:flex; justify-content:space-between; gap:18px; align-items:center; padding:14px 20px; cursor:pointer; }
.compounding-history-project>summary>div { display:grid; gap:2px; }
.compounding-history-project>summary>div:last-child { grid-template-columns:auto auto auto; gap:12px; align-items:center; text-align:right; }
.compounding-history-project summary small { color:#81727a; font-size:10px; }
.compounding-history-project summary strong { color:#392d33; font-size:15px; }
.compounding-history-project summary span { color:#7d6f76; font-size:11px; }
.compounding-history-project summary b { color:#287662; font-size:11px; }
.compounding-history-project summary i { color:var(--role-ink); font-size:11px; font-style:normal; }
.compounding-history-records { background:#faf8f9; }
.compounding-unlinked-records { border-top:1px solid #eadde2; background:#fffaf4; }
.compounding-unlinked-records>p { margin:0; padding:0 18px 10px; color:#8a684f; font-size:11px; }

@media (max-width:1180px) {
  .compounding-workspace-head { grid-template-columns:1fr; }
  .compounding-head-metrics { justify-content:flex-start; }
  .compounding-project-card.compact { grid-template-columns:minmax(280px,.9fr) minmax(330px,1.1fr); }
  .compounding-project-card.compact .compounding-project-action { grid-column:1/-1; grid-template-columns:minmax(0,1fr) 210px; border-top:1px solid #efe4e8; border-left:0; }
}
@media (max-width:760px) {
  .compounding-workspace-head { padding:18px; }
  .compounding-head-metrics { display:grid; grid-template-columns:repeat(3,1fr); }
  .compounding-head-metrics span { min-width:0; }
  .compounding-flow-strip { display:flex; overflow-x:auto; }
  .compounding-flow-strip i { flex:0 0 26px; }
  .compounding-id-guide>div { grid-template-columns:1fr; }
  .compounding-project-card.compact { grid-template-columns:1fr; }
  .compounding-project-card.compact .compounding-current-step,.compounding-project-card.compact .compounding-project-action { grid-column:1; border-top:1px solid #efe4e8; border-left:0; }
  .compounding-project-card.compact .compounding-project-action { grid-template-columns:1fr; }
  .compounding-project-card.compact dl { grid-template-columns:1fr; }
  .compounding-record-row { grid-template-columns:1fr; }
  .compounding-record-row>div:last-child { justify-content:flex-start; }
  .compounding-history-project>summary { align-items:flex-start; flex-direction:column; }
  .compounding-history-project>summary>div:last-child { text-align:left; }
}

/* 2号物料领料单线上预览：原Excel合并、行列和黑线不变，只统一文字排版。 */
.batch-paper-sheet.batch-template-batch_02 .batch-source-table td {
  vertical-align:middle!important;
  text-align:center!important;
}
.batch-paper-sheet.batch-template-batch_02 .batch-source-table :is(.batch-static-text,.batch-generated-value,.batch-generated-blank) {
  display:block;
  width:100%;
  margin:0 auto;
  text-align:center!important;
  line-height:1.45;
}
.batch-paper-sheet.batch-template-batch_02 .batch-source-table :is(.batch-cell-input,.batch-inline-input) {
  width:100%;
  margin:0 auto;
  text-align:center!important;
  text-align-last:center;
  line-height:1.45;
}
.batch-paper-sheet.batch-template-batch_02 .batch-source-table textarea.batch-cell-input {
  align-content:center;
  overflow:hidden;
}
.batch-paper-sheet.batch-template-batch_02 .batch-choice-list {
  justify-content:center;
  align-items:center;
  width:100%;
  margin:0 auto;
  text-align:center;
}
.batch-paper-sheet.batch-template-batch_02 .batch-live-signature,
.batch-paper-sheet.batch-template-batch_02 img.batch-live-signature,
.batch-paper-sheet.batch-template-batch_02 canvas {
  margin-right:auto;
  margin-left:auto;
  object-position:center;
}
.batch-paper-sheet.batch-template-batch_02 div.batch-live-signature[hidden] {
  /* Keep the original signature row at a constant height before and after the
     live ink appears. Removing this box made the split editor reflow on pen-up. */
  display:block!important;
  visibility:hidden;
}
.stocktake-board{display:grid;gap:18px;margin-bottom:24px}.stocktake-card{background:linear-gradient(135deg,#fff 0%,#fffaf7 52%,#f4fffc 100%);border:1px solid rgba(37,164,128,.24);border-top:5px solid #25a480;border-radius:24px;padding:22px;box-shadow:0 14px 36px rgba(53,36,48,.08);margin:16px 0}.stocktake-card.is-expired{border-color:#db3f69;border-top-color:#db3f69}.stocktake-card>header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.stocktake-card h2{margin:5px 0 7px}.stocktake-card p{margin:0;color:var(--muted)}.stocktake-metrics{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;margin:18px 0 12px}.stocktake-metrics>div{background:rgba(255,255,255,.82);border:1px solid rgba(62,43,54,.1);border-radius:16px;padding:13px 15px;display:grid;gap:5px}.stocktake-metrics small,.stocktake-table td small{display:block;color:var(--muted);margin-top:5px}.stocktake-metrics strong{font-size:1.22rem}.stocktake-progress{height:9px;background:#f0e7eb;border-radius:99px;overflow:hidden;margin-bottom:18px}.stocktake-progress i{display:block;height:100%;background:linear-gradient(90deg,#ff7538,#e93f80,#25b99a);border-radius:inherit}.stocktake-entry{display:grid;grid-template-columns:minmax(100px,.55fr) minmax(150px,1fr) auto;gap:8px;align-items:center}.stocktake-entry input{min-width:0}.stocktake-table td{vertical-align:middle}@media(max-width:900px){.stocktake-metrics{grid-template-columns:repeat(2,1fr)}.stocktake-entry{grid-template-columns:1fr}.stocktake-card{padding:16px}.stocktake-card>header{display:grid}}
.audit-asset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:13px;margin:18px 0 24px}.audit-asset-card{display:grid;text-align:left;gap:6px;padding:18px;border:1px solid rgba(92,53,111,.15);border-radius:19px;background:linear-gradient(145deg,#fff8fb,#f4fffc);box-shadow:0 10px 26px rgba(62,38,55,.07);color:var(--text)}.audit-asset-card:hover{transform:translateY(-2px);border-color:#e93f80}.audit-asset-card span{font-weight:800}.audit-asset-card strong{font-size:1.8rem;color:#d93472}.audit-asset-card small{color:var(--muted);line-height:1.5}
.asset-timeline{position:relative;display:grid;gap:14px;padding-left:28px}.asset-timeline:before{content:"";position:absolute;left:9px;top:8px;bottom:8px;width:2px;background:linear-gradient(#e93f80,#25b99a)}.asset-timeline article{position:relative;background:#fff;border:1px solid rgba(84,59,73,.12);border-radius:18px;padding:17px 18px;box-shadow:0 9px 24px rgba(62,38,55,.06)}.asset-timeline article>i{position:absolute;left:-27px;top:22px;width:15px;height:15px;border:3px solid #fff;border-radius:50%;background:#e93f80;box-shadow:0 0 0 2px #e93f80}.asset-timeline article>i.calibration{background:#25a480;box-shadow:0 0 0 2px #25a480}.asset-timeline h3{margin:4px 0}.asset-timeline p{margin:5px 0;color:var(--text)}.asset-timeline small{color:var(--muted)}.asset-timeline button{float:right;margin-top:-28px}
.record-stepper{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;list-style:none;margin:0 0 22px;padding:0}.record-stepper li{position:relative;display:flex;align-items:center;gap:9px;min-height:54px;padding:10px 12px;border:1px solid #eadde6;border-radius:14px;background:#fff;color:#80747c}.record-stepper li:not(:last-child)::after{content:"";position:absolute;right:-11px;top:50%;width:10px;height:2px;background:#eadde6}.record-stepper b{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#f5eef3;color:#725b6b}.record-stepper span{font-weight:700;line-height:1.25}.record-stepper li.is-active{border-color:#e33c7d;background:#fff3f8;color:#9f2454;box-shadow:0 8px 22px rgba(227,60,125,.12)}.record-stepper li.is-active b{background:#e33c7d;color:#fff}.record-stepper li.is-done{border-color:#70d8bc;background:#effcf8;color:#18775f}.record-stepper li.is-done b{background:#32b890;color:#fff}.step-signature-field{margin-top:16px}.step-signature-pad{display:block;width:100%;height:150px;border:1px dashed #d9a9be;border-radius:14px;background:#fff;touch-action:none}.compounding-abnormal-entry{margin-top:14px;padding:12px;border:1px solid #f2c3b0;border-radius:14px;background:#fff8f4}.compounding-abnormal-entry summary{cursor:pointer;font-weight:800;color:#c64e2f}.compounding-current-material>label{display:grid;gap:7px;margin-top:14px}@media(max-width:760px){.record-stepper{grid-template-columns:1fr 1fr}.record-stepper li::after{display:none}}

/* Privacy-safe management ledgers: live blank-form preview on the left and controlled entry/signature on the right. */
dialog:has(.management-ledger-workspace){width:min(1680px,calc(100vw - 24px));max-height:calc(100dvh - 20px);overflow:hidden}
dialog:has(.management-ledger-workspace)>form{height:calc(100dvh - 20px);display:flex;flex-direction:column;overflow:hidden}
.management-ledger-workspace{display:grid;grid-template-columns:minmax(420px,.92fr) minmax(520px,1.08fr);gap:18px;min-height:0;flex:1;overflow:hidden}
.management-ledger-preview,.management-ledger-entry{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain}
.management-ledger-preview{padding:16px;border:1px solid #eadde4;border-radius:18px;background:linear-gradient(145deg,#fff7f1,#f3fbff)}
.management-ledger-paper{min-height:100%;padding:28px;background:#fff;border:1px solid #cabfc4;box-shadow:0 16px 40px rgba(58,35,45,.09);color:#272126}
.management-ledger-paper header{text-align:center;border-bottom:2px solid #3c3438;padding-bottom:18px;margin-bottom:16px}.management-ledger-paper header small{color:var(--role-accent);font-weight:800;letter-spacing:.1em}.management-ledger-paper header h3{margin:8px 0 4px;font-size:21px;line-height:1.35}.management-ledger-paper header p{margin:0;color:#8a7f84;font-size:11px}
.management-ledger-paper-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-left:1px solid #494045;border-top:1px solid #494045}.management-ledger-paper-grid>div{display:grid;grid-template-columns:minmax(92px,.38fr) minmax(0,.62fr);min-height:64px;border-right:1px solid #494045;border-bottom:1px solid #494045}.management-ledger-paper-grid span,.management-ledger-paper-grid b{display:flex;align-items:center;justify-content:center;padding:9px;text-align:center;overflow-wrap:anywhere}.management-ledger-paper-grid span{background:#faf7f8;font-size:12px;font-weight:750;border-right:1px solid #494045}.management-ledger-paper-grid b{font-size:12px;font-weight:600;color:#a4999e}.management-ledger-paper-grid b.is-filled{color:#211b1e}
.management-ledger-paper footer{display:grid;grid-template-columns:160px 1fr;min-height:88px;border:1px solid #494045;border-top:0}.management-ledger-paper footer>span,.management-ledger-paper footer>div{display:flex;align-items:center;justify-content:center;padding:10px;text-align:center}.management-ledger-paper footer>span{background:#faf7f8;border-right:1px solid #494045;font-weight:750}.management-ledger-paper footer b{color:#a4999e}.management-ledger-paper footer img{display:block;max-width:220px;max-height:68px;object-fit:contain}.management-ledger-entry{padding-right:6px}.management-ledger-entry>.controlled-edit-note{margin-top:0}
@media(max-width:980px){dialog:has(.management-ledger-workspace){overflow:auto}.management-ledger-workspace{grid-template-columns:1fr;overflow:visible}.management-ledger-preview,.management-ledger-entry{overflow:visible}.management-ledger-preview{max-height:520px;overflow:auto}dialog:has(.management-ledger-workspace)>form{height:auto;overflow:visible}.management-ledger-paper-grid{grid-template-columns:1fr}}

.ledger-source-workspace{grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:16px}
.ledger-source-workspace .management-ledger-preview{padding:0;background:#f6f4f5;display:flex;flex-direction:column;overflow:hidden}
.ledger-preview-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px 14px;background:#fff;border-bottom:1px solid #eadde4;font-size:12px}
.ledger-preview-toolbar strong{flex:1;min-width:150px;font-size:14px}.ledger-preview-toolbar label{display:flex;align-items:center;gap:5px}.ledger-preview-toolbar input[type=range]{width:90px;height:22px;padding:0}
.ledger-preview-scroll{overflow:auto;min-height:0;flex:1;padding:16px;overscroll-behavior:contain;overflow-anchor:none}
.ledger-original-document{width:max-content;transform-origin:top left;background:#fff;padding:14px}
.ledger-source-table{transform:none!important;color:#111!important;max-width:none!important;margin:0!important}
.ledger-source-table td{padding:2px!important;line-height:1.2!important;overflow:hidden;border-radius:0!important}
.ledger-original-sheet{padding:0 0 24px}.ledger-original-sheet h3{font-size:13px;color:#666;margin:0 0 12px}.ledger-source-paragraph{white-space:pre-wrap;text-align:center;color:#111;margin:6px 0}
.ledger-filled-cell{display:block;white-space:pre-wrap;overflow-wrap:anywhere;min-height:1em}.ledger-cell-signature{max-width:100%;height:28px;object-fit:contain;vertical-align:middle}
.ledger-inline-answer{white-space:pre-wrap;overflow-wrap:anywhere;color:inherit}
.ledger-template-choice{display:grid;gap:8px;margin-bottom:12px}.ledger-template-choice>span{font-size:13px;font-weight:650}.ledger-template-choice select{min-height:44px;padding:10px 12px;border:1px solid #e3d1dc;border-radius:12px;background:#fff;color:#332837;font:inherit}
#instrument-directory th{white-space:nowrap}#instrument-directory td{min-width:72px;max-width:260px;overflow-wrap:anywhere}
.ledger-original-page{position:relative;background:#fff;margin-bottom:18px;overflow:hidden}.ledger-page-background{position:absolute;inset:0;width:100%;height:100%}.ledger-page-value{position:absolute;display:flex;align-items:center;justify-content:center;white-space:pre-wrap;overflow:hidden;color:#111;font-size:8px;text-align:center}
.ledger-entry-navigation{position:sticky;top:0;z-index:2;padding:12px;background:#f4fbf9;border:1px solid #b8ded4;border-radius:12px;margin:12px 0}.ledger-entry-navigation label{display:grid;gap:6px}.ledger-entry-navigation output{display:block;font-size:11px;margin-top:6px;color:#42685c}
.ledger-source-workspace fieldset[hidden]{display:none!important}.ledger-source-workspace .form-grid{gap:12px}.ledger-source-workspace label{min-width:0}.ledger-source-workspace textarea,.ledger-source-workspace select,.ledger-source-workspace input:not([type=checkbox]):not([type=range]){width:100%;min-width:0;box-sizing:border-box}.ledger-source-workspace textarea{resize:vertical;min-height:64px}
.ledger-notes,.ledger-signature-position{display:grid;gap:6px;margin:16px 0}.ledger-source-workspace .management-ledger-entry{overflow-anchor:none;padding:0 10px 24px 0}
.ledger-source-workspace .ledger-choice-entry{min-width:0;padding:12px;border:1px solid #ded5df;border-radius:10px;box-shadow:none;background:transparent}
.ledger-source-workspace .ledger-choice-entry>fieldset{margin:8px 0;padding:8px;border:0;border-radius:0;box-shadow:none;background:transparent}
.ledger-source-workspace .ledger-choice-entry>fieldset>label{display:flex;align-items:center;gap:8px;margin:4px 0;min-height:36px;cursor:pointer}
.ledger-source-workspace .ledger-choice-entry input[type=radio],.ledger-source-workspace .ledger-choice-entry input[type=checkbox]{appearance:auto;width:18px;height:18px;min-width:18px;min-height:18px;flex:0 0 18px;padding:0;margin:0;box-shadow:none;accent-color:#87469a}
.ledger-signed-copy{display:flex;align-items:center;gap:12px;min-height:60px;margin-bottom:14px}.ledger-signed-copy img{max-width:180px;max-height:60px}.ledger-source-unavailable{font-size:12px;color:#995326;line-height:1.6;margin-top:14px}.ledger-shared-groups{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}.ledger-shared-groups label{display:flex;align-items:center;gap:5px}.ledger-shared-groups input{width:18px!important;height:18px!important}
.ledger-record-preview{margin:16px 0;border:1px solid #eadde4;border-radius:12px;overflow:hidden}.ledger-record-preview .ledger-preview-scroll{max-height:75vh}
@media(max-width:980px){.ledger-source-workspace{grid-template-columns:1fr}.ledger-source-workspace .management-ledger-preview{height:460px;min-height:320px}.ledger-entry-navigation{position:static}}
/* Keep the original and entry side by side on portrait as well as landscape tablets. */
@media(min-width:720px) and (max-width:980px){
  dialog:has(.ledger-source-workspace){overflow:hidden}
  dialog:has(.ledger-source-workspace)>form{height:calc(100dvh - 20px);overflow:hidden}
  .ledger-source-workspace{grid-template-columns:minmax(0,1fr) minmax(280px,1fr);overflow:hidden}
  .ledger-source-workspace .management-ledger-preview{height:auto;min-height:0;max-height:none}
  .ledger-source-workspace .management-ledger-entry{overflow:auto}
}

.batch-auto-fill-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}.batch-auto-fill-summary>div{min-width:0;padding:14px 16px;border:1px solid rgba(227,67,125,.2);border-radius:16px;background:linear-gradient(135deg,rgba(255,245,249,.96),rgba(239,252,250,.96))}.batch-auto-fill-summary small,.batch-auto-fill-summary strong{display:block}.batch-auto-fill-summary small{margin-bottom:6px;color:var(--muted)}.batch-auto-fill-summary strong{overflow-wrap:anywhere}@media(max-width:900px){.batch-auto-fill-summary{grid-template-columns:1fr}}
.project-progress { margin:12px 0; padding:10px 12px; border-radius:10px; background:rgba(136,231,210,.12); min-width:0; }
.project-progress-heading { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; font-size:12px; color:#544453; }
.project-progress-heading strong { color:#663874; font-size:13px; }
.project-progress progress { display:block; appearance:none; width:100%; height:8px; margin:8px 0; border:0; border-radius:8px; overflow:hidden; background:#e8e1eb; }
.project-progress progress::-webkit-progress-bar { background:#e8e1eb; border-radius:8px; }
.project-progress progress::-webkit-progress-value { background:linear-gradient(90deg,#88e7d2,#875294); border-radius:8px; }
.project-progress progress::-moz-progress-bar { background:#875294; }
.project-progress small { display:block; font-size:12px; line-height:1.6; overflow-wrap:anywhere; color:#544453; }
.project-progress .project-progress-sync { font-size:11px; color:#807580; }
#orderFlowWorkspace .flow-handle-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 18px; margin-top:8px; font-size:15px; font-weight:700; line-height:1.4; border:2px solid #a82f4f; border-radius:12px; background:#a82f4f; color:#fff; box-shadow:0 3px 10px rgba(168,47,79,.18); cursor:pointer; }
#orderFlowWorkspace .flow-handle-button:hover:not(:disabled) { background:#8e2642; border-color:#8e2642; color:#fff; }
#orderFlowWorkspace .flow-handle-button:focus-visible { outline:3px solid #88e7d2; outline-offset:3px; }
#orderFlowWorkspace .flow-handle-button:disabled { background:#e5e7eb; border-color:#d1d5db; color:#646b76; box-shadow:none; opacity:1; cursor:not-allowed; }
/* Department duty cards: scoped to preserve other production screens. */
.duty-filters { flex-wrap:wrap; gap:12px; align-items:end; }
.duty-filters label { display:grid; gap:6px; font-size:13px; }
.duty-task-card { display:grid!important; grid-template-columns:minmax(0,1fr) auto!important; gap:20px; padding:22px!important; cursor:pointer; transition:background .15s,border-color .15s; }
.duty-task-card:hover,.duty-task-card:focus-visible { background:#faf5fc; border-color:#b391bd; }
.duty-task-main { min-width:0; }
.duty-task-card h3 { margin:10px 0; font-size:18px; line-height:1.5; overflow-wrap:anywhere; }
.duty-task-card h3 small { font-size:13px; color:#776b7e; margin-right:8px; }
.duty-state,.duty-tag { display:inline-block; border-radius:8px; padding:4px 9px; font-size:12px; font-weight:600; }
.duty-state.unassigned,.duty-tag.per_event { background:#fff0f0; color:#ae293a; }
.duty-state.pending,.duty-tag.per_batch { background:#fff2de; color:#995313; }
.duty-state.done { background:#e3f5ec; color:#216a4b; }
.duty-tag.yearly { background:#e6f0ff; color:#245da3; }
.duty-tag.legal { background:#eee3fa; color:#653782; border:1px solid #c9afdf; }
.duty-tag.company { background:#eeedf0; color:#625b67; }
.duty-tags { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:13px; color:#69616e; }
.duty-summary { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.6; margin:12px 0 8px; }
.duty-task-description { font-size:13px; line-height:1.7; }
.duty-task-description summary { cursor:pointer; color:#794786; padding:6px 0; }
.duty-task-card .duty-action { align-self:center; display:flex; flex-direction:column; gap:10px; }
.duty-task-card .duty-action button { min-height:42px; }
.duty-detail-content { line-height:1.8; overflow-wrap:anywhere; }
@media(max-width:760px) { .duty-task-card { grid-template-columns:minmax(0,1fr)!important; padding:16px!important; } .duty-task-card .duty-action { flex-direction:row; flex-wrap:wrap; } .duty-filters label { flex:1 1 140px; } }
.batch-preview-zoom { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin:8px 0; color:#51435b; font-size:12px; }
.batch-preview-zoom label { display:flex; align-items:center; gap:8px; }
.batch-preview-zoom select { min-height:32px; padding:4px 8px; font-size:13px; width:auto; }
.batch-preview-zoom output { font-variant-numeric:tabular-nums; }
.finished-release-source-signatures { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:12px 0; }
.finished-release-source-signatures > div { min-width:0; font-size:13px; }
.finished-release-source-signatures [data-release-ink] { display:block; min-height:80px; font-size:12px; }
.finished-release-source-signatures img { display:block; margin:0 auto; max-width:100%; max-height:60px; object-fit:contain; }
.finished-release-source-signatures small { display:block; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
/* Each material owns two signature cells; keep handwriting legible at 100%. */
.batch-material-row-signature { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:68px; gap:1px; text-align:center; }
.batch-material-row-signature img { display:block; width:90px; max-width:100%; height:28px; object-fit:contain; }
.batch-material-row-signature span { font-size:11px; line-height:14px; }
.batch-material-row-signature time { font-size:10px; line-height:12px; white-space:normal; overflow-wrap:normal; }
/* Original page orientation controls the editor, not the device orientation. */
.batch-split-editor.source-layout-landscape,
.batch-editor-fullscreen .batch-split-editor.source-layout-landscape,
.batch-review-split.source-layout-landscape,
.ledger-source-workspace.source-layout-landscape {
  grid-template-columns:minmax(0,1fr); grid-template-rows:max-content max-content;
  align-items:start; align-content:start; overflow:auto; max-height:none;
}
.source-layout-landscape > .batch-preview-pane,
.source-layout-landscape > .batch-entry-pane,
.source-layout-landscape > .batch-review-preview-pane,
.source-layout-landscape > .batch-review-entry-pane,
.ledger-source-workspace.source-layout-landscape > .management-ledger-preview,
.ledger-source-workspace.source-layout-landscape > .management-ledger-entry {
  position:static; height:auto; min-height:0; max-height:none; overflow:visible;
}
.source-layout-landscape .batch-table-scroll { max-height:none; }
.source-layout-landscape > .batch-preview-pane { display:block; }
.source-layout-landscape > .batch-preview-pane > .batch-paper-sheet { display:block; flex:none; }
.source-layout-landscape .ledger-preview-scroll { flex:none; max-height:none; }
.batch-review-split.source-layout-landscape { max-height:68dvh; }
@media(min-width:720px) {
  .batch-split-editor.source-layout-portrait,
  .batch-editor-fullscreen .batch-split-editor.source-layout-portrait,
  .batch-review-split.source-layout-portrait,
  .ledger-source-workspace.source-layout-portrait {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:auto;
  }
}
/* The existing explicit “只看填写区” action still takes precedence. */
.batch-editor-fullscreen.batch-entry-focus .batch-split-editor.source-layout-landscape,
.batch-editor-fullscreen.batch-entry-focus .batch-split-editor.source-layout-portrait { grid-template-columns:minmax(0,1fr); }
.batch-entry-pane .batch-critical-fields .batch-prestart-entry-table { width:100%; min-width:0; table-layout:fixed; }
.batch-prestart-entry-table th:nth-child(1) { width:15%; }
.batch-prestart-entry-table th:nth-child(2) { width:43%; }
.batch-prestart-entry-table th:nth-child(3) { width:21%; }
.batch-prestart-entry-table th:nth-child(4) { width:21%; }
.batch-prestart-entry-table td { white-space:normal; vertical-align:top; }
.batch-prestart-entry-table .batch-prestart-standard { display:block; white-space:normal; overflow-wrap:anywhere; line-height:1.6; }
.batch-entry-pane .batch-critical-fields .batch-prestart-entry-table input,
.batch-entry-pane .batch-critical-fields .batch-prestart-entry-table select { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
/* Shared read-only routing summary, directly above the submit actions. */
.delivery-recipients { padding: 12px 16px; margin: 12px 0; background: #f7f3fa; border: 1px solid #e3d6eb; border-radius: 12px; color: #42364a; font-size: 14px; overflow-wrap: anywhere; }
.delivery-recipients > strong { display: block; margin-bottom: 6px; }
.delivery-recipients > div { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 10px; margin: 6px 0; }
.delivery-recipients small { display: block; color: #716778; margin-top: 3px; }
.password-visibility-field { position: relative; min-width: 0; width: 100%; }
.password-visibility-field input { width: 100%; box-sizing: border-box; padding-right: 48px; }
.password-visibility-field .password-visibility-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 40px; height: 40px; min-height: 0;
  padding: 8px; margin: 0; border: 0; border-radius: 8px;
  background: transparent; color: #707585; box-shadow: none; cursor: pointer;
}
.password-visibility-field .password-visibility-toggle:hover { background: #f3f4f7; color: #343846; transform: translateY(-50%); box-shadow: none; }
.password-visibility-field .password-visibility-toggle:active { transform: translateY(-50%); }
.password-visibility-field .password-visibility-toggle:focus-visible { outline: 2px solid #e94c90; outline-offset: -2px; }
.password-visibility-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.form-grid label > .workflow-account-control { display:flex; align-items:stretch; gap:8px; margin-bottom:0; min-width:0; }
.workflow-account-control > input, .workflow-account-control > select { flex:1 1 0; width:0; min-width:0; }
.workflow-account-control > .workflow-account-refresh { flex:0 0 auto; align-self:stretch; padding:8px 12px; white-space:nowrap; font-size:12px; }
.workflow-account-feedback { display:block; margin-top:6px; line-height:1.5; color:#665762; }
.workflow-account-feedback:empty { display:none; }
.account-role-grants { grid-column:1/-1; min-width:0; border:1px solid #eadde4; border-radius:12px; padding:14px 16px; background:#fffafd; }
.account-role-grants summary { cursor:pointer; font-weight:650; color:#754459; }
.account-role-grants p { font-size:12px; color:#796b74; line-height:1.6; }
.account-role-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
#quickDialog .account-role-options label { display:flex; align-items:center; gap:9px; padding:10px; margin:0; border:1px solid #efdee6; border-radius:8px; background:#fff; }
#quickDialog .account-role-options input { width:17px; height:17px; min-height:0; margin:0; padding:0; flex:0 0 17px; accent-color:#bc3266; }
#quickDialog .account-role-options label>span { margin:0; font-size:12px; font-weight:550; line-height:1.5; }
.account-role-options small { display:block; color:#8b7a84; font-weight:400; font-size:11px; }
.auth-role-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-height:50vh; overflow-y:auto; padding:4px; margin:16px -4px; }
.auth-card .auth-role-options button { position:relative; margin:0; padding:16px 30px 16px 14px; border:1px solid #ead0dc; border-radius:12px; text-align:left; color:#382c34; background:#fff8fb; box-shadow:none; }
.auth-role-options strong { display:block; font-size:14px; line-height:1.5; }
.auth-role-options span { color:#8a6b7a; font-size:12px; }
.auth-role-options .auth-role-arrow { position:absolute; right:12px; top:40%; color:#bc3266; }
.auth-card .auth-role-options button:hover { background:#fbeaf2; border-color:#bc3266; }
.auth-card .auth-role-options button:focus-visible { outline:2px solid #bc3266; outline-offset:2px; }
.auth-card .auth-role-picker>button { color:#754459; background:#fff; border:1px solid #ead0dc; box-shadow:none; }
@media(max-width:600px) { .account-role-options { grid-template-columns:minmax(0,1fr); } .auth-role-options { grid-template-columns:minmax(0,1fr); } }
/* Customer lookup is one compact, consistent control, including its results.
   Solid colours intentionally support the older Chromium engines used by staff. */
#quickDialog .sales-customer-picker { grid-column:1/-1; min-width:0; padding:22px 24px; border:1px solid #eadde4; border-radius:18px; background:linear-gradient(145deg,#fffafc,#fff 65%); box-shadow:0 4px 16px rgba(66,35,49,.035); }
#quickDialog .customer-picker-heading { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 0 8px; }
#quickDialog .customer-picker-heading h3 { margin:0; color:#382c34; font-size:17px; font-weight:650; line-height:1.5; letter-spacing:.02em; }
#quickDialog .customer-picker-badge { padding:3px 9px; border:1px solid #f1dce6; border-radius:6px; color:#9a4266; background:#fff0f6; font-size:11px; font-weight:500; line-height:1.5; }
#quickDialog .customer-picker-description { margin:0 0 18px; color:#80717c; font-size:13px; line-height:1.7; }
#quickDialog .customer-search-toolbar { display:flex; align-items:flex-end; gap:12px; }
#quickDialog .customer-search-field { flex:1 1 0; min-width:0; margin:0; gap:7px; }
#quickDialog .customer-search-label { margin:0; color:#665762; font-size:12px; font-weight:500; line-height:1.5; }
#quickDialog .customer-search-input { position:relative; display:block; margin:0; }
#quickDialog .customer-search-input>svg { position:absolute; left:15px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:#99848f; pointer-events:none; }
#quickDialog .customer-search-input>input { box-sizing:border-box; width:100%; height:48px; min-height:48px; margin:0; padding:11px 14px 11px 43px; border:1px solid #dccfd7; border-radius:10px; background:#fff; color:#382c34; font:inherit; font-size:14px; line-height:24px; box-shadow:0 1px 2px rgba(55,38,45,.025); }
#quickDialog .customer-search-input>input::placeholder { color:#a0939c; opacity:1; }
#quickDialog .customer-search-input>input:focus { outline:2px solid #e93f80; outline-offset:2px; border-color:#e93f80; box-shadow:none; }
#quickDialog .customer-picker-action { display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center; gap:14px; min-height:48px; margin:0; padding:12px 20px; border-radius:10px; font-size:14px; font-weight:600; line-height:22px; white-space:nowrap; box-shadow:0 4px 12px rgba(168,47,79,.14); }
#quickDialog .customer-picker-action svg { width:17px; height:17px; }
#quickDialog .customer-search-input svg,#quickDialog .customer-picker-action svg { fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
#quickDialog .customer-search-results { display:grid; gap:8px; margin-top:14px; }
#quickDialog .customer-search-results:empty { display:none; }
#quickDialog .customer-result-card { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; min-width:0; margin:0; padding:14px 16px; border:1px solid #eadde4; border-radius:10px; background:#fff; color:#382c34; text-align:left; box-shadow:none; }
#quickDialog .customer-result-card:hover { transform:none; border-color:#dc96b2; background:#fff7fa; }
#quickDialog .customer-result-card:focus-visible,#quickDialog .customer-picker-action:focus-visible { outline:2px solid #a82f4f; outline-offset:3px; }
#quickDialog .customer-result-info { display:grid; min-width:0; gap:5px; overflow-wrap:anywhere; }
#quickDialog .customer-result-info strong { font-size:14px; font-weight:600; line-height:1.5; }
#quickDialog .customer-result-info>span { color:#80717c; font-size:12px; font-weight:400; line-height:1.6; }
#quickDialog .customer-result-action { flex-shrink:0; color:#a82f4f; font-size:12px; font-weight:500; }
#quickDialog .customer-picker-status { display:flex; align-items:baseline; gap:8px; margin:16px 0 0; color:#74636f; font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
#quickDialog .customer-picker-status::before { content:""; flex:0 0 5px; width:5px; height:5px; border-radius:50%; background:#ba8299; }
#quickDialog .customer-picker-status:empty { display:none; }
#quickDialog .customer-contract-note { display:block; margin-top:16px; padding-top:12px; border-top:1px solid #eee4e9; color:#92818b; font-size:11px; line-height:1.7; }
#quickDialog .customer-create-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px; }
#quickDialog .customer-create-actions p { margin:0; }
@media(max-width:600px) {
  #quickDialog .sales-customer-picker { padding:18px 14px; border-radius:14px; }
  #quickDialog .customer-picker-heading { gap:8px; }
  #quickDialog .customer-picker-heading h3 { font-size:16px; }
  #quickDialog .customer-search-toolbar { flex-wrap:wrap; gap:10px; }
  #quickDialog .customer-search-field { flex-basis:100%; }
  #quickDialog .customer-picker-action { width:100%; gap:8px; padding-inline:12px; font-size:13px; }
  #quickDialog .customer-create-actions { flex-direction:column; align-items:stretch; gap:12px; }
  #quickDialog .customer-result-card { flex-wrap:wrap; gap:8px; padding:12px; }
}
@media(max-width:520px) {
  .workflow-account-control > .workflow-account-refresh { padding:8px; }
}

/* This confirmation has its own card; do not inherit the large form-dialog frame. */
dialog.draft-choice-layer[open] {
  width:min(480px,calc(100vw - 32px)); max-width:calc(100vw - 32px);
  max-height:calc(100vh - 32px); max-height:calc(var(--available-height,100vh) - 32px);
  inset:0; margin:auto; padding:0; border:0; border-radius:18px;
  background:transparent; overflow:auto; box-shadow:0 28px 90px rgba(24,12,31,.32);
}
dialog.draft-choice-layer > .draft-choice-card { width:100%; margin:0; box-shadow:none; }

.sales-commercial { min-width:0; }
.sales-commercial details { margin-top:16px; padding:16px; border:1px solid #ead8e2; border-radius:16px; background:#fffafd; }
.sales-commercial summary { cursor:pointer; font-weight:700; color:#94345f; }
.sales-commercial details p { line-height:1.7; color:#746774; font-size:14px; }
.sales-commercial details .form-grid { margin:14px 0; }
.sales-commercial button { min-height:42px; white-space:normal; }
.sales-commercial button.primary { color:#fff; background:#cf3475; border:1px solid #b72c64; }
.sales-commercial button.primary:hover { color:#fff; background:#b72c64; }
.sales-commercial button.primary:disabled { opacity:.55; cursor:wait; }
.sales-commercial select { width:100%; min-width:0; }
.crm-duplicates:not(:empty) { padding:14px; border:1px solid #e5bd82; background:#fff8e9; border-radius:12px; overflow-wrap:anywhere; }
#quickDialog pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.crm-duplicate-alert { max-width:min(540px,90vw); max-height:80vh; overflow:auto; padding:24px; border:1px solid #ead8e2; border-radius:18px; color:#413545; background:#fff; }
.crm-duplicate-alert::backdrop { background:rgba(40,25,45,.35); }

/* CRM design system. Deliberately scoped: other forms and navigation keep their styles. */
.crm-workspace,.crm-detail,.crm-quote-entry { --crm-ink:#342a35; --crm-muted:#786e79; --crm-line:#e9e2e8; --crm-accent:#b8336b; --crm-soft:#fcf4f8; color:var(--crm-ink); font-family:inherit; line-height:1.6; }
.crm-quote-entry .crm-detail-head { position:static; padding:0 0 20px; margin:0 0 20px; }
.crm-quote-entry .crm-detail-head h2 { margin:6px 0; font-size:23px; }
.crm-quote-entry .crm-detail-head p { margin:0; color:var(--crm-muted); font-size:13px; }
.crm-quote-entry .crm-close { display:flex; flex:none; align-items:center; gap:8px; min-width:76px; min-height:42px; padding:9px 12px; border:1px solid #deced8; border-radius:10px; color:#654958; background:#fff; white-space:nowrap; }
.crm-quote-entry .crm-close svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.65; }
.crm-workspace *, .crm-detail * { box-sizing:border-box; }
.crm-workspace [hidden],.crm-detail [hidden] { display:none !important; }
.crm-workspace svg,.crm-detail svg { width:18px; height:18px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.crm-workspace button,.crm-detail button { cursor:pointer; font-family:inherit; }
.crm-workspace button:focus-visible,.crm-detail button:focus-visible,.crm-workspace summary:focus-visible,.crm-detail summary:focus-visible { outline:2px solid var(--crm-accent); outline-offset:3px; }
.crm-workspace .crm-button,.crm-detail .crm-button { display:inline-flex; flex-shrink:0; align-items:center; justify-content:center; gap:8px; min-height:42px; height:auto; width:auto; margin:0; padding:9px 15px; border:1px solid #deced8; border-radius:10px; background:#fff; color:#654958; box-shadow:none; font-size:13px; font-weight:600; line-height:1.5; white-space:normal; text-align:center; transition:background .15s,border-color .15s; }
.crm-workspace .crm-button:hover,.crm-detail .crm-button:hover { transform:none; background:#fcf5f8; border-color:#c882a2; box-shadow:none; }
.crm-workspace .crm-button.is-primary,.crm-detail .crm-button.is-primary { background:var(--crm-accent); border-color:var(--crm-accent); color:#fff; box-shadow:0 4px 12px #b8336b15; }
.crm-workspace .crm-button.is-primary:hover,.crm-detail .crm-button.is-primary:hover { background:#982857; }
.crm-workspace .crm-button.quiet,.crm-detail .crm-button.quiet { color:var(--crm-muted); background:transparent; border-color:transparent; }
.crm-workspace .crm-button.quiet:hover,.crm-detail .crm-button.quiet:hover { background:#f4eef2; color:var(--crm-accent); }
.crm-workspace-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:20px; padding:4px 0 26px; }
.crm-eyebrow { display:block; color:#9a7187; font-size:10px; letter-spacing:.12em; font-weight:600; }
.crm-eyebrow>span { padding:0 8px; color:#c4acbb; }
.crm-workspace-head h1 { margin:8px 0 6px; color:var(--crm-ink); font-size:28px; font-weight:680; letter-spacing:-.02em; line-height:1.4; }
.crm-workspace-head p { margin:0; color:var(--crm-muted); font-size:13px; }
.crm-head-actions { display:flex; flex-wrap:wrap; gap:10px; }
.crm-workspace .crm-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0 0 28px; }
.crm-workspace .crm-metrics article { min-height:134px; padding:18px 20px; border:1px solid var(--crm-line); border-radius:16px; background:#fff; box-shadow:0 4px 16px #30203204; }
.crm-workspace .crm-metrics article::before { display:none; }
.crm-workspace .crm-metrics article:first-child { background:#fbf3f7; border-color:#edd5e1; }
.crm-stat-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.crm-workspace .crm-stat-heading>span { color:#665a67; font-size:12px; font-weight:550; }
.crm-stat-heading i { display:grid; flex:none; place-items:center; width:30px; height:30px; border-radius:9px; background:#f7f2f6; color:#98627d; }
.crm-metrics article:nth-child(2) i { color:#297c63; background:#eef7f2; }
.crm-metrics article:nth-child(4) i { color:#a37a38; background:#fcf6e9; }
.crm-workspace .crm-metrics strong { margin:7px 0 6px; color:var(--crm-ink); font-family:inherit; font-size:32px; font-weight:650; line-height:1.2; font-variant-numeric:tabular-nums; }
.crm-workspace .crm-metrics small { color:var(--crm-muted); font-size:11px; white-space:normal; overflow:visible; }
.crm-directory { padding:24px; border:1px solid var(--crm-line); border-radius:20px; background:#fff; box-shadow:0 8px 26px #35273804; }
.crm-directory-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:22px; }
.crm-directory-head h2 { margin:0 0 3px; font-size:18px; font-weight:650; }
.crm-directory-head p { margin:0; color:var(--crm-muted); font-size:12px; }
.crm-search-toolbar { display:grid; grid-template-columns:minmax(0,1fr) minmax(170px,220px); gap:14px; align-items:end; }
.crm-search-toolbar label,.crm-filters label { display:flex; flex-direction:column; gap:6px; margin:0; color:var(--crm-muted); font-size:11px; font-weight:500; }
.crm-search-toolbar .crm-search-field { position:relative; }
.crm-search-field>svg { position:absolute; top:15px; left:14px; color:#a08e9a; }
.crm-workspace input,.crm-workspace select { width:100%; min-width:0; height:46px; min-height:46px; margin:0; padding:10px 13px; border:1px solid #dfd5dd; border-radius:10px; color:#443845; background:#fff; font:inherit; font-size:13px; box-shadow:none; }
.crm-workspace .crm-search-field input { padding-left:42px; background:#fcfafc; }
.crm-workspace input:focus,.crm-workspace select:focus { outline:2px solid #eac0d3; outline-offset:1px; border-color:var(--crm-accent); }
.crm-workspace input::placeholder { color:#948993; }
.crm-tabs { display:flex; gap:6px; margin:20px 0 0; padding:0; border-bottom:1px solid var(--crm-line); }
.crm-tabs button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:48px; margin:0 0 -1px; padding:10px 14px; border:0; border-bottom:2px solid transparent; border-radius:0; color:#827382; background:transparent; font-size:13px; font-weight:550; box-shadow:none; }
.crm-tabs button:hover { background:#fdf8fa; transform:none; }
.crm-tabs button[aria-selected="true"] { border-bottom-color:var(--crm-accent); color:var(--crm-accent); }
.crm-tabs button>span { min-width:22px; padding:1px 6px; border-radius:6px; background:#f1edf1; color:#786a79; font-size:10px; }
.crm-tabs button[aria-selected="true"]>span { background:#f9e7ef; color:var(--crm-accent); }
.crm-filters { margin:0; padding:14px 0; border-bottom:1px solid #f0eaf0; }
.crm-filters summary { color:#6d586a; cursor:pointer; font-size:12px; }
.crm-filters summary>span { margin-left:12px; color:#9a8e98; font-size:11px; }
.crm-filters .form-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0 4px; }
.crm-list-caption { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin:20px 0 16px; }
.crm-list-caption output { flex:none; color:#66576a; font-size:12px; font-weight:600; }
.crm-list-caption p { margin:0; color:#988b96; font-size:11px; }
.crm-card-list { display:grid; gap:16px; }
.crm-workspace .crm-card { display:block; padding:0; border:1px solid var(--crm-line); border-radius:14px; background:#fff; overflow:hidden; animation:none; box-shadow:none; }
.crm-workspace .crm-card:hover { background:#fff; border-color:#dbbccc; box-shadow:0 5px 18px #61344606; }
.crm-workspace .crm-card[data-selected] { border-color:#bc6790; box-shadow:0 0 0 2px #fae9f1; }
.crm-card .smart-work-main { display:block; padding:20px 22px 16px; }
.crm-card-heading { display:flex; gap:13px; align-items:center; margin-bottom:20px; }
.crm-client-avatar { display:grid; flex:0 0 44px; place-items:center; width:44px; height:44px; border:1px solid #ecdce6; border-radius:13px; color:#a54e79; background:#faf0f5; font-size:18px; font-weight:600; }
.crm-card-title { flex:1; min-width:0; }
.crm-card .smart-work-main h3 { margin:0 0 4px; color:var(--crm-ink); font-size:17px; font-weight:650; line-height:1.5; overflow-wrap:anywhere; }
.crm-card .smart-work-main .crm-record-number,.crm-detail .crm-record-number { display:block; color:#9a8d98; font-size:10px; font-weight:400; letter-spacing:.02em; overflow-wrap:anywhere; }
.crm-badge,.crm-card .smart-work-main .crm-badge { display:inline-flex; align-items:center; flex:none; gap:6px; width:auto; padding:4px 9px; border:1px solid #e5e1e8; border-radius:7px; color:#77707c; background:#f6f4f7; font-size:11px; font-weight:500; white-space:nowrap; }
.crm-badge>span { width:5px; height:5px; background:currentColor; border-radius:50%; }
.crm-badge.is-active,.crm-card .smart-work-main .crm-badge.is-active { color:#267458; background:#f0f8f3; border-color:#d4eadc; }
.crm-card-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:0 0 16px; }
.crm-fact { min-width:0; }
.crm-fact dt { color:#938391; font-size:11px; font-weight:400; line-height:1.6; }
.crm-fact dd { margin:4px 0 0; color:#4b3c4c; font-size:13px; font-weight:550; line-height:1.65; overflow-wrap:anywhere; }
.crm-card .smart-work-main p { white-space:normal; overflow:visible; font-size:12px; overflow-wrap:anywhere; }
.crm-card .smart-work-main .crm-card-note { padding:11px 13px; border-radius:8px; background:#faf8fa; color:#81727e; }
.crm-card .smart-work-main .crm-card-note>span { display:inline-block; margin-right:12px; color:#9a8a96; font-size:11px; }
.crm-card .smart-work-main .crm-card-progress { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; margin-top:14px; }
.crm-card .smart-work-main .crm-card-progress>span { display:flex; align-items:center; gap:6px; color:#8a7c87; font-size:11px; }
.crm-card-progress svg { width:14px; height:14px; }
.crm-card .crm-card-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 22px; border-top:1px solid #f1eaf0; background:#fdfbfc; }
.crm-card-footer>small { color:#998493; font-size:11px; }
.crm-card-footer b { display:inline-block; margin-left:5px; padding:0 7px; border-radius:5px; color:#936281; background:#f2eaf0; font-size:12px; }
.crm-card .crm-card-footer>div { display:flex; gap:8px; }
.crm-card .crm-card-footer [aria-pressed="true"] { color:#a83265; background:#f9e9f0; border-color:#eed1de; }
.crm-selection:empty { display:none; }
.crm-selection { margin:0 0 16px; padding:14px 16px; border:1px solid #e8cfde; border-radius:12px; background:#fcf5f9; }
.crm-card .crm-selection { margin:0; padding:14px 22px; border:0; border-top:1px solid #ead4df; border-radius:0; }
.crm-selection-title { display:flex; align-items:center; gap:10px; }
.crm-selection-title>span { color:#a57690; font-size:11px; }
.crm-selection-title>strong { flex:1; min-width:0; font-size:13px; overflow-wrap:anywhere; }
.crm-selection-title .crm-button { min-height:32px; padding:5px; }
.crm-actions { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 0; }
.crm-empty { padding:30px 18px; text-align:center; border:1px dashed #e7dfe7; border-radius:12px; background:#fdfbfc; }
.crm-empty>svg { width:26px; height:26px; color:#b99cab; }
.crm-empty h3,.crm-empty h4 { margin:8px 0 5px; font-size:13px; font-weight:550; color:#7a6678; }
.crm-empty p { margin:0; font-size:12px; color:#a0909c; }

/* Customer detail: fixed identity header, profile column, task and record panels. */
#quickDialog .crm-detail { padding:0; min-width:0; background:#fcfafc; }
.crm-detail-head { position:sticky; top:0; z-index:3; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:24px 30px; background:#fff; border-bottom:1px solid var(--crm-line); }
.crm-detail-identity { display:flex; align-items:center; flex:1; min-width:0; gap:16px; }
.crm-detail-identity>div { min-width:0; }
.crm-detail-identity h2 { margin:5px 0 3px; color:var(--crm-ink); font-size:24px; font-weight:650; line-height:1.4; overflow-wrap:anywhere; }
.crm-detail-identity p { margin:0; }
.crm-detail .crm-close { flex:0 0 auto; min-width:76px; white-space:nowrap; }
.crm-detail-layout { display:grid; grid-template-columns:240px minmax(0,1fr); align-items:start; gap:24px; padding:24px 30px 30px; }
.crm-profile { min-width:0; padding:20px; border:1px solid var(--crm-line); border-radius:14px; background:#fff; }
.crm-profile-disclosure>summary { cursor:pointer; list-style:none; }
.crm-profile-disclosure>summary::-webkit-details-marker { display:none; }
.crm-profile-disclosure>summary:focus-visible { outline:2px solid var(--crm-accent); outline-offset:4px; border-radius:4px; }
.crm-profile-title { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.crm-profile-title strong { margin:0; font-size:14px; font-weight:650; }
.crm-profile-title>span { color:#9b7690; font-size:11px; }
.crm-profile-chevron { display:inline-block; margin-left:8px; font-size:15px; }
.crm-profile-disclosure[open] .crm-profile-chevron { transform:rotate(180deg); }
.crm-profile-contact { display:block; margin-top:6px; color:#93818e; font-size:11px; overflow-wrap:anywhere; }
.crm-profile-disclosure[open]>summary { padding-bottom:16px; border-bottom:1px solid #f2ecf1; }
.crm-profile-disclosure[open] .crm-profile-contact { display:none; }
.crm-profile dl { display:grid; gap:16px; margin:18px 0; }
.crm-profile-note { padding-top:16px; border-top:1px solid #f2ecf1; }
.crm-profile-note h4 { margin:0 0 7px; color:#938391; font-size:11px; font-weight:500; }
.crm-profile-note p { margin:0; color:#786878; font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.crm-detail .crm-audit-link { justify-content:flex-start; margin:20px 0 0; padding:10px 0 0; border-radius:0; border-top:1px solid #f2ecf1; font-size:11px; }
.crm-detail-main { min-width:0; }
.crm-action-section { margin:0 0 22px; }
.crm-section-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px; margin:0 0 15px; }
.crm-section-heading h3 { margin:0; font-size:15px; font-weight:650; color:#504051; }
.crm-section-heading>span { color:#9e8a9b; font-size:11px; }
.crm-action-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; }
.crm-action-tiles>button { display:flex; align-items:center; gap:12px; min-width:0; padding:16px; border:1px solid #e5dbe3; border-radius:12px; background:#fff; text-align:left; color:#91627e; box-shadow:none; }
.crm-action-tiles>button:first-child { border-color:#e6cad9; background:#fcf1f7; }
.crm-action-tiles>button:hover { transform:none; border-color:#c583a4; box-shadow:0 4px 14px #65405b08; }
.crm-action-icon { display:grid; flex:none; place-items:center; width:36px; height:36px; border-radius:10px; background:#f5e7ef; }
.crm-action-tiles>button>span:nth-child(2) { flex:1; min-width:0; }
.crm-action-tiles strong { display:block; font-size:13px; font-weight:650; line-height:1.5; color:#60405a; }
.crm-action-tiles small { display:block; margin-top:4px; color:#9b8194; font-size:10px; font-weight:400; line-height:1.6; }
.crm-action-tiles>button>svg { width:14px; height:14px; }
.crm-detail-tabs { display:flex; gap:4px; margin-bottom:22px; padding:5px; border:1px solid var(--crm-line); border-radius:11px; background:#f3eef3; }
.crm-detail-tabs button { flex:1; min-width:0; min-height:42px; padding:9px 8px; border:1px solid transparent; border-radius:8px; background:transparent; color:#887387; font-size:12px; font-weight:550; box-shadow:none; }
.crm-detail-tabs button[aria-selected="true"] { color:#9f3266; border-color:#eadbe4; background:#fff; box-shadow:0 2px 5px #58334a06; }
.crm-detail-tabs button:hover { transform:none; color:#9f3266; }
.crm-detail [role="tabpanel"] { min-width:0; padding:22px; border:1px solid var(--crm-line); border-radius:14px; background:#fff; }
.crm-overview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.crm-overview-grid>article { min-width:0; padding:16px; border:1px solid #eee4eb; border-radius:10px; background:#fdfafb; }
.crm-overview-grid article>span { display:block; color:#9a8394; font-size:11px; }
.crm-overview-grid strong { display:block; margin:7px 0; font-size:14px; font-weight:600; color:#574152; overflow-wrap:anywhere; }
.crm-overview-grid small { display:block; color:#9b8c97; font-size:10px; }
.crm-overview-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin:22px 0; }
.crm-history-links { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 22px; }
.crm-detail .crm-history-links .crm-button { font-size:11px; }
.crm-data-management { border-top:1px solid #f0e9ef; padding-top:15px; }
.crm-data-management summary { color:#988c96; cursor:pointer; font-size:11px; }
.crm-data-management summary svg { width:13px; height:13px; margin-right:5px; vertical-align:middle; }
.crm-data-management>div { margin-top:12px; padding:14px; border:1px solid #f2dfdf; border-radius:10px; background:#fffafa; }
.crm-data-management p { margin:0 0 12px; color:#967b80; font-size:12px; }
.crm-detail .crm-button.is-danger { color:#ae4856; background:#fff; border-color:#e9bec6; }
.crm-trace-note { display:flex; gap:8px; align-items:flex-start; margin-top:18px; color:#a2919e; }
.crm-trace-note svg { width:14px; height:14px; margin-top:3px; }
.crm-trace-note p { margin:0; font-size:10px; line-height:1.8; }
.crm-record-section+.crm-record-section { padding-top:24px; margin-top:24px; border-top:1px solid #f0e9ef; }
.crm-record-section .crm-empty { padding:20px 14px; }
.crm-linked-record { display:flex; align-items:flex-start; gap:12px; padding:16px 0; border-top:1px solid #f4edf2; }
.crm-linked-record>div { flex:1; min-width:0; }
.customer-select-field { display:grid; gap:8px; width:100%; min-width:0; }
.customer-select-field select { width:100%; min-width:0; max-width:100%; text-overflow:ellipsis; }
.customer-select-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.sales-saved-content { margin:18px 0; }
.sales-local-draft { margin:16px 0; padding:16px; border:1px solid #e5cbdc; border-radius:14px; background:#fff8fb; }
.sales-local-draft summary { color:#8a315e; font-weight:650; cursor:pointer; }
.sales-local-draft strong { overflow-wrap:anywhere; }
.crm-record-entry { display:flex; flex-direction:column; align-items:flex-end; gap:10px; max-width:260px; }
.crm-record-entry .crm-button { white-space:normal; }
@media(max-width:700px) { .crm-record-entry { width:100%; max-width:none; align-items:flex-start; padding-left:44px; } .crm-record-entry .crm-record-status { margin-left:0; } }
.sales-commercial [data-commercial-focus] { border:1px solid #e7c5d8; border-radius:14px; padding:16px; margin:12px 0; }
.sales-commercial [data-commercial-focus].is-current { background:#fff3f8; outline:2px solid #d64080; }
.crm-record-icon { flex:none; padding:8px; border-radius:9px; color:#a27592; background:#f7f1f5; }
.crm-linked-record strong { font-size:12px; font-weight:600; overflow-wrap:anywhere; color:#765269; }
.crm-linked-record p { margin:4px 0 6px; font-size:12px; color:#5d4f5d; overflow-wrap:anywhere; }
.crm-linked-record small { color:#9b8d98; font-size:10px; line-height:1.8; }
.crm-record-status { flex:none; max-width:110px; padding:3px 7px; border-radius:6px; background:#f4f1f5; color:#82717f; font-size:10px; overflow-wrap:anywhere; }
.crm-flow-caption { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:10px 13px; margin:0 0 22px; border-radius:9px; background:#faf4f8; color:#9b6888; font-size:11px; }
.crm-flow-caption b { color:#c3a7b8; }
.crm-timeline { margin-bottom:24px; }
.crm-timeline-item { display:flex; gap:12px; padding:18px 0; border-top:1px solid #f1eaf0; }
.crm-timeline-item>div { flex:1; min-width:0; }
.crm-timeline-icon { display:grid; flex:none; place-items:center; width:30px; height:30px; border-radius:50%; color:#9c6687; background:#f8edf4; }
.crm-timeline-icon svg { width:15px; height:15px; }
.crm-timeline-item header { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 12px; }
.crm-timeline-item strong { font-size:13px; color:#6b4960; }
.crm-timeline-item small { font-size:10px; color:#a2919e; }
.crm-timeline-item p { font-size:12px; color:#766371; overflow-wrap:anywhere; white-space:pre-wrap; }
.crm-inline-note { color:#a27e94; font-size:11px; }
.crm-quote-summary { padding:14px; border:1px solid #eae0e7; border-radius:10px; background:#fdfafb; }
.crm-quote-summary dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:0; }
.crm-quote-summary details { margin-top:16px; padding-top:12px; border-top:1px solid #ede3ea; }
.crm-quote-summary summary { color:#9e7191; font-size:11px; cursor:pointer; }
@media(min-width:1600px) {
  .crm-card-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .crm-card-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:1000px) {
  .crm-detail-layout { grid-template-columns:200px minmax(0,1fr); gap:18px; padding:20px; }
  .crm-detail-head { padding:20px; }
  .crm-profile { padding:16px; }
  .crm-detail [role="tabpanel"] { padding:18px; }
  .crm-action-tiles { grid-template-columns:1fr; }
  .crm-card-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .crm-filters .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px) {
  .crm-workspace-head { padding-bottom:22px; }
  .crm-workspace-head h1 { font-size:24px; }
  .crm-workspace .crm-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:20px; }
  .crm-workspace .crm-metrics article { padding:14px; min-height:128px; }
  .crm-stat-heading { align-items:flex-start; }
  .crm-stat-heading i { width:24px; height:24px; }
  .crm-stat-heading i svg { width:15px; height:15px; }
  .crm-workspace .crm-stat-heading>span { font-size:11px; }
  .crm-directory { padding:16px; border-radius:16px; }
  .crm-directory-head p { display:none; }
  .crm-search-toolbar { grid-template-columns:1fr; gap:12px; }
  .crm-search-toolbar>label:not(.crm-search-field) { flex-direction:row; align-items:center; gap:12px; }
  .crm-search-toolbar select { flex:1; width:auto; }
  .crm-workspace input,.crm-workspace select { font-size:16px; }
  .crm-tabs { gap:0; }
  .crm-tabs button { flex:1; flex-wrap:wrap; padding:10px 5px; font-size:11px; line-height:1.5; }
  .crm-filters summary>span { display:none; }
  .crm-list-caption { display:block; }
  .crm-list-caption p { margin-top:6px; }
  .crm-card .smart-work-main { padding:16px; }
  .crm-card-heading { flex-wrap:wrap; gap:10px; }
  .crm-client-avatar { flex-basis:36px; width:36px; height:36px; font-size:16px; border-radius:10px; }
  .crm-card .smart-work-main h3 { font-size:16px; }
  .crm-card-heading .crm-badge { margin-left:auto; }
  .crm-card .crm-card-footer { flex-wrap:wrap; padding:12px 14px; }
  .crm-card .crm-card-footer>div { margin-left:auto; }
  .crm-workspace .crm-card-footer .crm-button { font-size:12px; padding:8px 10px; }
  .crm-detail-head { padding:16px; gap:10px; }
  .crm-detail-identity { flex-wrap:wrap; gap:10px; }
  .crm-detail-identity .crm-client-avatar { display:none; }
  .crm-detail-identity h2 { font-size:20px; }
  .crm-detail-identity .crm-eyebrow { font-size:8px; }
  .crm-detail .crm-close { min-width:42px; padding:10px; }
  .crm-close>span { display:none; }
  .crm-detail-layout { display:flex; flex-direction:column; padding:16px; gap:20px; }
  .crm-profile,.crm-detail-main { width:100%; }
  .crm-profile dl { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .crm-detail-tabs { gap:0; }
  .crm-detail-tabs button { font-size:11px; padding:8px 3px; }
  .crm-detail [role="tabpanel"] { padding:16px; }
  .crm-overview-grid { grid-template-columns:1fr; }
  .crm-section-heading .crm-button { font-size:11px; padding:8px 10px; }
  .crm-quote-summary dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .crm-linked-record { flex-wrap:wrap; }
  .crm-linked-record .crm-record-status { margin-left:44px; }
  .crm-history-links .crm-button { width:100%; }
}
@media(prefers-reduced-motion:reduce) { .crm-workspace button,.crm-detail button { transition:none; } }

/* Account directory: a compact overview and responsive department grid. */
/* hidden creates a body scroll container and prevents viewport sticky positioning. */
body:has(.account-departments):not(.navigation-open) { overflow-x:clip; }
.account-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.account-overview article { min-width:0; padding:20px 24px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.account-overview article>span { color:#726575; font-size:13px; }
.account-overview strong { display:block; margin:8px 0 4px; font-size:30px; line-height:1.25; font-weight:650; font-variant-numeric:tabular-nums; }
.account-overview strong small { margin-left:8px; color:#877989; font-size:12px; font-weight:400; }
.account-overview p { margin:0; color:var(--muted); font-size:12px; }
.account-departments { min-width:0; margin:28px 0; }
.account-departments-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px 16px; flex-wrap:wrap; margin-bottom:12px; }
.account-departments-heading h2 { margin:0; font-size:18px; }
.account-departments-heading p { margin:0; color:var(--muted); font-size:12px; }
.account-directory-tools { position:sticky; top:68px; z-index:4; padding:16px; margin-bottom:16px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 4px 12px rgba(64,35,60,.04); }
.account-directory-filters { display:grid; grid-template-columns:minmax(160px,2fr) minmax(120px,1fr) minmax(110px,1fr) auto; align-items:end; gap:12px; }
.account-directory-filters label { display:grid; gap:6px; min-width:0; }
.account-directory-filters label>span { color:#746877; font-size:12px; }
.account-directory-filters input,.account-directory-filters select { width:100%; min-width:0; min-height:42px; padding:8px 10px; border:1px solid #ded5e0; border-radius:8px; color:var(--ink); background:#fcfbfd; font:inherit; }
.account-directory-filters select { appearance:none; -webkit-appearance:none; padding-right:30px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2384738c' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; }
.account-directory-filters input:focus,.account-directory-filters select:focus { outline:2px solid #a369a7; outline-offset:1px; background-color:#fff; }
.account-directory-filters button,.account-department-controls button { min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; color:#7e3d64; background:#fff; font:inherit; font-size:12px; cursor:pointer; }
.account-directory-tools button:hover:not(:disabled) { background:#fff1f6; border-color:#c96790; }
.account-directory-tools button:focus-visible { outline:2px solid #a369a7; outline-offset:2px; }
.account-directory-tools button:disabled { opacity:.45; cursor:default; }
.account-directory-results { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:12px; }
.account-directory-results output { color:#726575; font-size:12px; }
.account-department-controls { display:flex; gap:8px; flex:none; }
.account-department-controls button { min-height:32px; padding:5px 10px; }
.account-department-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); align-items:start; gap:16px; }
.account-department.data-panel { min-width:0; margin:0; overflow:hidden; border-color:#e5dce7; border-radius:12px; box-shadow:0 3px 12px rgba(64,35,60,.025); }
.account-department[open] { grid-column:1/-1; }
.account-department>summary { display:grid; grid-template-columns:16px minmax(0,1fr) auto; align-items:center; gap:4px 10px; padding:16px; cursor:pointer; list-style:none; background:#fff; }
.account-department>summary:hover,.account-department[open]>summary { background:#fcf8fc; }
.account-department>summary::-webkit-details-marker { display:none; }
.account-department>summary:focus-visible { outline:3px solid #b73772; outline-offset:-3px; }
.account-department>summary strong { overflow-wrap:anywhere; font-size:14px; }
.account-department-chevron { font-size:24px; color:#9b799e; line-height:1; text-align:center; transition:transform .15s; }
.account-department[open] .account-department-chevron { transform:rotate(90deg); }
.account-department-count { color:#827388; font-size:15px; font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }
.account-department-team .account-department-count { color:#8a3f78; font-size:21px; }
.account-department-roster { grid-column:2/-1; overflow:hidden; color:#867888; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.account-department-status { grid-column:2/-1; display:flex; flex-wrap:wrap; gap:6px; margin-top:5px; font-size:11px; }
.account-department-status:empty { display:none; }
.account-exception { padding:2px 7px; border-radius:5px; color:#875b21; background:#fff3dc; }
.account-exception.disabled,.account-exception.deleted { color:#a84660; background:#fbeaf0; }
.account-department-table { max-width:100%; overflow-x:auto; border-top:1px solid var(--line); }
.account-department-table .data-table { min-width:1050px; }
.account-department[hidden],.account-department tr[hidden],.account-directory-empty[hidden] { display:none; }
.account-directory-empty { padding:40px 16px; border:1px dashed var(--line); border-radius:12px; text-align:center; color:var(--muted); background:#fff; }
@media(min-width:1600px) { .account-department-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:767px) {
  .account-directory-tools { top:112px; }
  .account-directory-filters { grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:10px; }
  .account-directory-search { grid-column:1/-1; }
  .account-directory-filters input,.account-directory-filters select { font-size:16px; }
  .account-overview { gap:8px; }
  .account-overview article { padding:14px 10px; }
  .account-overview strong { font-size:25px; }
  .account-overview p { font-size:11px; }
  .account-directory-tools { padding:12px; }
  .account-department-controls { gap:4px; }
  .account-department-controls button { min-height:40px; padding:6px 8px; }
}
@media(prefers-reduced-motion:reduce) { .account-department-chevron { transition:none; } }
.engineer-material-review { width:min(1000px,94vw); max-height:90vh; padding:24px; overflow:auto; }
.engineer-material-review h2 { font-size:22px; }
.engineer-material-review header>p { color:var(--muted); line-height:1.7; }
.engineer-review-card { margin:16px 0; padding:18px; border:1px solid var(--line); border-radius:14px; }
.engineer-review-card label { display:flex; align-items:center; gap:9px; margin:14px 0; flex-wrap:wrap; }
.engineer-review-card select { padding:10px; border:1px solid var(--line); border-radius:8px; max-width:100%; }
.engineer-review-card dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.engineer-review-card dl>div { padding:10px; background:#fff8fb; border-radius:8px; min-width:0; }
.engineer-review-card dt { color:var(--muted); font-size:12px; }
.engineer-review-card dd { margin:5px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.engineer-material-review footer { display:flex; flex-wrap:wrap; gap:10px; padding-top:16px; }
.engineer-material-review footer button { padding:11px 16px; border-radius:10px; border:1px solid var(--line); }
.engineer-material-review [data-review-error] { color:#a01d45; }
@media(max-width:600px) {
  .engineer-material-review { padding:16px; }
  .engineer-review-card { padding:12px; }
  .engineer-review-card dl { grid-template-columns:1fr; }
  .engineer-material-review footer button { width:100%; }
}
/* Quality assistance uses the shared form layout, with compact scope checkboxes. */
#businessForm .quality-assistance-scopes { grid-column:1 / -1; }
#businessForm .quality-assistance-scopes label { display:flex; align-items:center; gap:8px; }
#businessForm .quality-assistance-scopes input[type="checkbox"] { width:18px; height:18px; min-height:18px; margin:0; flex:none; }
.form-grid > [data-quality-field].full { grid-column:1 / -1; }
[data-quality-field] [data-quality-label] { display:block; margin-bottom:8px; }
[data-quality-field] .check-grid label { display:flex; align-items:center; gap:8px; }
[data-quality-field] .check-grid input[type="checkbox"] { width:18px; height:18px; min-height:18px; margin:0; flex:none; }
[data-quality-checklist] { max-height:640px; overflow:auto; padding:8px; border:1px solid var(--line, #e4dce5); border-radius:12px; }
[data-quality-checklist] > details { padding:8px; border-bottom:1px solid var(--line, #e4dce5); }
[data-quality-checklist] summary { cursor:pointer; padding:6px 0; }
