/* Independent, neutral ERP interface. All colours and dimensions are project choices. */
:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-light: #eaf3ff;
  --bg: #f4f5f7;
  --surface: #fff;
  --text: #262b33;
  --muted: #7a828e;
  --line: #e1e4e9;
  --grid-line: #e7e9ed;
  --head: #f6f7f9;
  --selected: #eaf3ff;
  --nav: #fff;
  --nav-muted: #626b78;
  --green: #23975b;
  --orange: #b87917;
  --red: #d43838;
  --row: 36px;
  --body-size: 13px;
  --radius: 2px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: var(--body-size);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-offset: 3px; }
button { cursor: pointer; transition: background .12s, color .12s; }
button:disabled { cursor: not-allowed; color: #a7adb5 !important; background: #f5f6f8 !important; border-color: #e6e8ec !important; }
button:hover:not(:disabled) { filter: brightness(.98); }
a { color: var(--primary); text-decoration: none; }
input, select, textarea { height: 32px; min-width: 0; padding: 4px 9px; border: 1px solid #d4d8df; border-radius: 2px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 2px solid #1677ff18; }
input[type=checkbox] { width: 14px; height: 14px; margin: 0; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
input[type=number] { font-variant-numeric: tabular-nums; }
input[readonly] { background: #fafbfc; cursor: pointer; }
textarea { height: 64px; resize: vertical; }
.icon { display: inline-block; flex-shrink: 0; width: 16px; height: 16px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 32px; padding: 0 12px; border: 1px solid #d4d8df; border-radius: 2px; background: #fff; color: #49515e; white-space: nowrap; }
.btn:hover:not(:disabled) { color: var(--primary); border-color: #8ebfff; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn.danger { color: var(--red); }
.btn.link { padding: 0 5px; background: transparent; border: 0; color: var(--primary); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 2px; background: none; color: #7a828e; }
.icon-btn:hover { background: #f1f4f8; color: var(--primary); }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.flex { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.divider { width: 1px; height: 18px; margin: 0 4px; background: var(--line); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 2px; background: #f1f3f5; color: #737c89; font-size: 12px; line-height: 1.3; white-space: nowrap; }
.badge:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.green { background: #edf8f1; color: #23975b; }
.badge.blue { background: #edf4ff; color: #1677ff; }
.badge.orange { background: #fff7e8; color: #b87917; }
.badge.red { background: #fff0f0; color: #d43838; }
.badge.gray { background: #f1f3f5; color: #737c89; }
.hide { display: none !important; }

/* Application shell: blue top bar, white navigation, neutral business canvas. */
.shell { display: grid; grid-template-columns: 196px minmax(0, 1fr); grid-template-rows: 52px minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 20px; background: #1677ff; color: #fff; border-right: 1px solid #ffffff25; }
.brand-mark { width: 25px; height: 25px; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; }
.brand-name small { margin-left: 4px; color: #e7f1ff; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.topbar { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 0 18px; background: #1677ff; color: #fff; }
.topbar .icon-btn, .topbar .user-button { color: #fff; }
.topbar .icon-btn:hover { background: #ffffff18; }
.topbar .divider { background: #ffffff35; }
.company { font-weight: 500; white-space: nowrap; }
.demo-label { margin-left: 8px; padding: 2px 6px; border: 1px solid #ffffff50; border-radius: 2px; background: #ffffff10; color: #fff; font-size: 11px; font-weight: 400; }
.global-search { position: relative; width: 244px; margin-left: auto; }
.global-search input { width: 100%; padding-left: 30px; background: #ffffff18; border-color: #ffffff36; color: #fff; }
.global-search input::placeholder { color: #e4efff; }
.global-search input:focus { background: #fff; border-color: #fff; color: #262b33; }
.global-search input:focus::placeholder { color: #8a929e; }
.global-search .icon { position: absolute; left: 9px; top: 8px; color: #e5efff; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions > .btn { background: transparent; border-color: #ffffff60; color: #fff; }
.top-actions > .btn:hover:not(:disabled) { background: #ffffff14; border-color: #fff; color: #fff; }
.avatar { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #fff; color: #1677ff; font-weight: 600; }
.user-button { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #49515e; font-size: 12px; white-space: nowrap; }
.side { display: flex; flex-direction: column; min-height: 0; padding-top: 12px; border-right: 1px solid var(--line); background: #fff; color: #626b78; }
.nav-scroll { flex: 1; min-height: 0; padding: 0 8px; overflow-y: auto; scrollbar-width: thin; }
.nav-label { padding: 14px 14px 7px; color: #9aa1ac; font-size: 11px; }
.nav-main { display: flex; align-items: center; gap: 10px; width: 100%; height: 39px; padding: 0 13px; border: 0; border-radius: 2px; background: none; color: #505966; text-align: left; }
.nav-main:hover { background: #f5f7fa; }
.nav-main.active { background: #edf4ff; color: #1677ff; font-weight: 600; }
.nav-main .chevron { width: 12px; margin-left: auto; opacity: .65; }
.nav-main .icon { width: 17px; height: 17px; }
.nav-children { padding: 2px 0 6px; }
.nav-child { display: flex; align-items: center; gap: 7px; width: 100%; height: 34px; padding: 0 12px 0 40px; border: 0; border-radius: 2px; background: none; color: #7b8492; text-align: left; font-size: 12px; }
.nav-child:hover { background: #f7f9fc; }
.nav-child.active { background: #f6f9ff; color: #1677ff; }
.nav-child.active:before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #1677ff; }
.nav-count { margin-left: auto; padding: 1px 5px; border-radius: 2px; background: #e6effd; color: #1677ff; font-size: 10px; }
.side-bottom { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid #f0f1f4; color: #969eaa; font-size: 11px; }
.side-bottom .icon-btn { color: #969eaa; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tabs { display: flex; align-items: stretch; gap: 0; height: 38px; min-height: 38px; padding: 0 10px; border-bottom: 1px solid var(--line); background: #fff; overflow-x: auto; scrollbar-width: none; }
.tab { display: flex; align-items: center; gap: 15px; height: 38px; padding: 0 15px; border: 0; border-right: 1px solid #f1f2f4; background: #fff; color: #6e7784; white-space: nowrap; cursor: pointer; }
.tab > .row-link { color: inherit; }
.tab.active { color: #1677ff; font-weight: 500; box-shadow: inset 0 -2px #1677ff; }
.tab .icon { width: 13px; height: 13px; }
.tab-close { display: grid; place-items: center; padding: 1px; border: 0; background: none; color: #9da5b0; }
.tab-close .icon { width: 12px; height: 12px; }
.workspace { display: flex; flex: 1; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; padding: 0 16px 9px; overflow: auto; }
/* Wrapped filters must scroll with the page instead of collapsing the table. */
.workspace > .grid-card { flex: 1 0 360px; min-height: 360px; }
.workspace > .compact-subnav, .workspace > .module-return, .workspace > .page-heading,
.workspace > .filterbar, .workspace > .statusbar { flex-shrink: 0; }
@media(max-width:620px) { .workspace > .grid-card { flex-basis: 400px; min-height: 400px; } }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; min-height: 48px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: #8b939f; font-size: 12px; }
.breadcrumb strong { color: #313844; font-size: 15px; font-weight: 600; }
.breadcrumb .icon { width: 12px; height: 12px; color: #a3aab4; }
.page-actions { display: flex; gap: 8px; }
.statusbar { display: flex; align-items: center; justify-content: space-between; min-height: 12px; padding: 0 1px; color: #9098a4; font-size: 10px; }
.statusbar .dot { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: #23975b; }

/* Shared query, table, totals and pagination patterns. */
.filterbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span:first-child { color: #737c89; font-size: 12px; }
.field input, .field select { width: 100%; }
.field.keyword { flex: 1; min-width: 160px; }
.field.date { width: 142px; }
.field.status { width: 128px; }
.field.party { width: 170px; }
.filter-actions { display: flex; gap: 8px; }
.filter-actions .btn.primary { min-width: 76px; }
.lookup-control { display: flex; align-items: center; height: 32px; border: 1px solid #d4d8df; border-radius: 2px; background: #fff; overflow: hidden; }
.lookup-control input { width: 100%; height: 30px; border: 0; background: none; outline: none; }
.lookup-control button { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border: 0; border-left: 1px solid #eceef1; background: #fafbfc; color: #8b94a0; }
.lookup-control .icon { width: 14px; height: 14px; }
.grid-card { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 2px; background: #fff; overflow: hidden; }
.grid-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 44px; min-height: 44px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.grid-toolbar .btn { height: 28px; padding: 0 9px; font-size: 12px; }
.view-tabs { display: flex; align-items: center; gap: 23px; height: 44px; }
.view-tab { position: relative; height: 44px; padding: 0 2px; border: 0; background: none; color: #7a838f; font-size: 13px; white-space: nowrap; }
.view-tab.active { border-bottom: 2px solid var(--primary); color: var(--primary); font-weight: 500; }
.view-tab small { margin-left: 4px; color: #9ba3ae; font-size: 11px; }
.business-views { flex: none; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.business-view-tabs { display: flex; gap: 26px; padding: 0 14px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.business-view-tabs .view-tab { flex: none; font-size: 14px; }
.business-view-note { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 9px 14px; color: #778391; font-size: 12px; line-height: 1.6; }
.business-view-note label { display: flex; align-items: center; gap: 8px; color: #4c596b; }
.business-view-note select { height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: #354052; font: inherit; }
.row-action-links { display: flex; align-items: center; gap: 14px; }
@media(max-width:650px) { .business-view-tabs { gap: 18px; padding: 0 10px; } .business-view-note { padding: 8px 10px; } }
.selected-info { color: var(--primary); font-size: 12px; white-space: nowrap; }
.table-viewport { position: relative; flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #c5cbd5 #f7f8fa; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: var(--body-size); }
.data-table th { position: sticky; top: 0; z-index: 2; height: 36px; padding: 0 10px; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #dde1e7; background: var(--head); color: #646e7b; text-align: left; font-weight: 500; white-space: nowrap; user-select: none; }
.data-table th:last-child { border-right: 0; }
.data-table td { height: var(--row); padding: 0 10px; border-right: 1px solid #edf0f3; border-bottom: 1px solid #e9ecf0; background: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table tr:nth-child(even) td { background: #fcfcfd; }
.data-table tr:hover td { background: #f5f9ff; }
.data-table tr.selected td { background: var(--selected); }
.data-table th.check, .data-table td.check { width: 36px; padding: 0; text-align: center; }
.data-table th.row-no, .data-table td.row-no { width: 36px; padding: 0; color: #9ea5af; text-align: center; }
.data-table th.num, .data-table td.num { text-align: right; }
.col-label { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; overflow: hidden; cursor: pointer; }
.col-label .sort { color: #a1a9b4; font-size: 10px; }
.col-grip { display: inline-block; width: 8px; margin-right: 4px; color: #b6bdc7; font-size: 10px; cursor: grab; }
.resize-handle { position: absolute; right: -3px; top: 0; z-index: 4; width: 7px; height: 100%; cursor: col-resize; }
.resize-handle:hover { background: #1677ff35; }
.data-table .action-col { position: sticky; right: 0; z-index: 1; border-left: 1px solid #e5e7eb; box-shadow: -2px 0 5px #27374b05; }
.data-table th.action-col { z-index: 3; }
.row-link { padding: 0; border: 0; background: none; color: var(--primary); font: inherit; white-space: nowrap; }
.row-link:hover { text-decoration: underline; }
.row-more { border: 0; background: none; color: #738093; font-size: 15px; letter-spacing: 1px; }
.grid-total { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; min-height: 36px; padding: 0 14px; border-top: 1px solid #e3e6eb; background: #f8f9fb; color: #656f7d; font-size: 12px; }
.grid-total strong { color: #333d4c; font-size: 13px; font-variant-numeric: tabular-nums; }
.grid-total .total-label { color: #4f5967; font-weight: 600; }
.grid-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 45px; padding: 7px 12px; border-top: 1px solid var(--line); }
.export-actions { display: flex; gap: 8px; }
.export-actions .btn { height: 28px; font-size: 12px; }
.pagination { display: flex; align-items: center; gap: 7px; color: #86909e; font-size: 12px; }
.pagination select { height: 27px; padding: 1px 4px; font-size: 12px; }
.page-btn { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #d9dee6; border-radius: 2px; background: #fff; color: #7c8795; }
.page-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.page-jump { width: 36px; height: 27px; padding: 2px 4px; text-align: center; }
.empty-state { padding: 65px 20px; color: #959eab; text-align: center; }
.empty-state .icon { width: 34px; height: 34px; margin-bottom: 10px; color: #b8c1cf; }

/* Reusable business dashboard, without marketing-style hero cards. */
.dashboard { display: flex; flex: 1; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.greeting { font-size: 16px; font-weight: 600; }
.greeting-sub { margin-top: 6px; color: #9099a7; font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.metric-label { color: #7c8795; font-size: 12px; }
.metric-value { margin: 8px 0 5px; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-note { color: #9aa3af; font-size: 11px; }
.metric-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 2px; background: #f1f6ff; color: #5d94db; }
.metric-icon .icon { width: 20px; height: 20px; }
.dashboard-lower { display: grid; flex: 1; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 12px; min-height: 220px; }
.panel { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 2px; background: #fff; overflow: hidden; }
.panel-title { display: flex; align-items: center; justify-content: space-between; height: 43px; min-height: 43px; padding: 0 16px; border-bottom: 1px solid #eceef2; font-size: 13px; font-weight: 600; }
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 15px 14px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.process-step { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 5px 8px; border: 0; background: none; text-align: left; }
.step-icon { display: grid; place-items: center; flex-shrink: 0; width: 31px; height: 31px; border-radius: 2px; background: #edf4ff; color: #1677ff; }
.process-step small { display: block; margin-top: 4px; color: #9aa3af; font-size: 11px; }
.process-step > .icon { width: 12px; margin-left: auto; color: #b2bbc8; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th, .mini-table td { padding: 11px 15px; border-bottom: 1px solid #edf0f4; text-align: left; white-space: nowrap; }
.mini-table th { background: #f8f9fb; color: #8d97a5; font-size: 12px; font-weight: 500; }
.mini-table .num { text-align: right; }
.todo { display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px 15px; border: 0; border-bottom: 1px solid #f0f2f5; background: none; text-align: left; }
.todo-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 2px; background: #fff6e7; color: #bb882e; font-size: 12px; }
.todo small { display: block; margin-top: 5px; color: #939daa; font-size: 11px; }
.todo > .icon { width: 14px; margin-left: auto; color: #aeb8c7; }
.dashboard-bottom-note { margin-top: auto; padding: 13px 15px; background: #fafbfc; color: #949fac; font-size: 12px; }
.panel-scroll { flex: 1; min-height: 0; overflow: auto; }

/* Dialogs, document forms, lookups and detail drawers. */
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 28px; background: #15243b4d; }
.modal { display: flex; flex-direction: column; width: min(760px, 100%); min-width: 0; max-height: calc(100dvh - 56px); border-radius: 4px; background: #fff; box-shadow: 0 12px 48px #15243b28; }
.modal.small { width: min(440px, 100%); }
.modal.wide { width: min(1060px, 100%); }
.modal-header { display: flex; align-items: center; justify-content: space-between; min-height: 49px; padding: 0 18px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.modal-body { min-height: 0; padding: 18px; overflow: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.modal-desc { margin: 0 0 12px; color: #8b95a3; font-size: 12px; line-height: 1.8; }
.column-list { display: flex; flex-direction: column; gap: 5px; }
.column-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #e4e8ee; border-radius: 2px; cursor: grab; }
.column-item.drag-over { border-color: var(--primary); background: var(--primary-light); }
.column-item label { display: flex; flex: 1; align-items: center; gap: 8px; cursor: pointer; }
.column-item .icon-btn { width: 23px; height: 23px; }
.column-item small { color: #9da7b4; font-size: 11px; }
.details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 2px 0 20px; }
.detail-label { margin-bottom: 7px; color: #8b96a5; font-size: 12px; }
.detail-value { color: #364354; font-size: 13px; overflow-wrap: anywhere; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-end; background: #15243b38; }
.drawer { display: flex; flex-direction: column; width: min(720px, 92vw); height: 100%; background: #fff; box-shadow: -5px 0 30px #14283f18; }
.drawer .modal-body { flex: 1; }
.section-title { margin: 17px 0 12px; padding-left: 9px; border-left: 3px solid var(--primary); color: #465363; font-size: 13px; font-weight: 600; }
.timeline { display: flex; gap: 0; padding: 22px 3px 10px; }
.timeline-step { position: relative; flex: 1; color: #97a2b1; text-align: center; font-size: 12px; }
.timeline-step:before { content: ''; position: absolute; left: 50%; right: -50%; top: 9px; display: block; height: 1px; background: #dfe5ed; }
.timeline-step:last-child:before { display: none; }
.timeline-circle { position: relative; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; margin: 0 auto 7px; border-radius: 50%; background: #edf1f6; color: #a6b1bf; }
.timeline-step.done .timeline-circle { background: var(--primary); color: #fff; }
.timeline-step.done { color: var(--primary); }
.timeline-step small { display: block; margin-top: 6px; color: #a5afbd; font-size: 10px; }
.detail-note { padding: 12px; border: 1px solid #e5e9ef; border-radius: 2px; background: #f8f9fb; color: #7c899b; font-size: 12px; line-height: 1.8; }
.editor { display: flex; flex: 1; flex-direction: column; gap: 12px; min-height: 0; }
.document-head { display: grid; grid-template-columns: 1.25fr 1.5fr 1fr 1fr 1fr; gap: 14px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.required { padding-right: 3px; color: var(--red); }
.document-head .field > span:first-child { font-size: 12px; }
.doc-subtabs { display: flex; align-items: center; gap: 20px; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.doc-subtab { display: flex; align-items: center; height: 42px; color: #7d8b9d; font-size: 13px; cursor: pointer; }
.doc-subtab.active { border-bottom: 2px solid var(--primary); color: var(--primary); font-weight: 500; }
.editable-table td { height: 38px; padding: 3px 5px; }
.editable-table input, .editable-table select { width: 100%; height: 29px; border-color: transparent; background: transparent; font-size: 13px; }
.editable-table input:hover, .editable-table select:hover { border-color: #d6dfe9; background: #fff; }
.editable-table input:focus { background: #fff; }
.editable-table .readonly { padding: 0 9px; }
.document-bottom { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.doc-foot { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 2px; color: #9ca6b4; font-size: 11px; }
.grand-total { color: #334c6a; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lookup-table-wrap { height: 330px; margin-top: 12px; border: 1px solid var(--line); overflow: auto; }
.lookup-table-wrap .data-table { width: 100%; }
.lookup-table-wrap .data-table td { height: 36px; }
.toast-show { opacity: 1 !important; transform: translate(-50%, 0) !important; }
#toast { position: fixed; left: 50%; top: 65px; z-index: 50; max-width: 90vw; padding: 11px 18px; border: 1px solid #dce4ee; border-radius: 3px; background: #fff; color: #42566f; font-size: 13px; box-shadow: 0 5px 20px #22384a20; transform: translate(-50%, -8px); opacity: 0; pointer-events: none; transition: .18s; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.setting-box { padding: 15px; border: 1px solid var(--line); border-radius: 2px; }
.setting-box h3 { margin: 0 0 12px; font-size: 13px; }
.theme-swatch { width: 27px; height: 27px; padding: 0; border: 2px solid transparent; border-radius: 50%; outline-offset: 2px; }
.theme-swatch.active { outline: 2px solid #aab8ca; }
.help-list { display: flex; flex-direction: column; gap: 12px; }
.help-step { display: flex; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #edf1f5; }
.help-step b { color: var(--primary); font-size: 18px; }
.help-step strong { display: block; font-size: 13px; }
.help-step p { margin: 5px 0 0; color: #8694a7; font-size: 12px; line-height: 1.7; }

/* Order-to-delivery workspace; uses the same table and document vocabulary. */
.flow-workspace { display: flex; flex: 1; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; padding-bottom: 2px; overflow: auto; scrollbar-width: thin; scrollbar-color: #c5cbd5 #f4f5f7; }
.flow-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.flow-summary h2, .flow-summary h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.flow-summary p { margin: 4px 0 0; color: #8c97a6; font-size: 12px; line-height: 1.6; }
.flow-summary select { min-width: 215px; max-width: 100%; }
.flow-summary .flow-actions { margin-left: auto; }
.flow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: #7d8999; font-size: 12px; line-height: 1.7; }
.flow-meta strong { margin-left: 4px; color: #3d4a5c; font-weight: 500; }
.flow-steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 86px; padding: 0 10px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.flow-step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 12px 5px; border: 0; background: transparent; color: #939eac; text-align: center; font-size: 12px; }
.flow-step:not(:last-child):after { content: ''; position: absolute; top: 26px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 1px; background: #e4e8ee; }
.flow-step strong { color: #8793a2; font-size: 13px; font-weight: 500; }
.flow-step small { font-size: 11px; line-height: 1.5; color: #a0aab7; }
.flow-step .step-number, .flow-step .flow-step-number, .flow-step > .step-icon, .flow-step > b, .flow-step > span:first-child:not(.step-label) { z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; margin: 0 auto; border: 1px solid #dfe5ec; border-radius: 50%; background: #fff; color: #a5afbd; font-size: 12px; font-weight: 500; }
.flow-step.is-done, .flow-step.done { color: #23975b; }
.flow-step.is-done strong, .flow-step.done strong { color: #405a4c; }
.flow-step.is-done .step-number, .flow-step.is-done .flow-step-number, .flow-step.is-done > .step-icon, .flow-step.is-done > b, .flow-step.is-done > span:first-child:not(.step-label), .flow-step.done > b { border-color: #b9dfcb; background: #f2faf5; color: #23975b; }
.flow-step.is-done:after, .flow-step.done:after { background: #b9dfcb; }
.flow-step.is-current, .flow-step.current { color: var(--primary); }
.flow-step.is-current strong, .flow-step.current strong { color: var(--primary); font-weight: 600; }
.flow-step.is-current .step-number, .flow-step.is-current .flow-step-number, .flow-step.is-current > .step-icon, .flow-step.is-current > b, .flow-step.is-current > span:first-child:not(.step-label), .flow-step.current > b { border-color: var(--primary); background: var(--primary); color: #fff; }
.flow-content { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 12px; min-width: 0; }
.flow-content > * { min-width: 0; }
.flow-panel { min-width: 0; border: 1px solid var(--line); border-radius: 2px; background: #fff; overflow: hidden; }
.flow-panel + .flow-panel { margin-top: 12px; }
.flow-panel-body { padding: 16px; }
.flow-section-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 44px; margin: 0; padding: 11px 15px; border-bottom: 1px solid #e9edf2; color: #3e4a5b; font-size: 13px; font-weight: 600; }
.flow-section-title small { color: #95a0af; font-size: 11px; font-weight: 400; }
.flow-section-title .btn { height: 28px; font-size: 12px; font-weight: 400; }
.flow-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.flow-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.flow-row-actions .btn { height: 28px; padding: 0 8px; font-size: 12px; }
.flow-docs { display: flex; flex-direction: column; padding: 0 14px; }
.flow-doc-item { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 13px 0; border-bottom: 1px solid #edf0f4; }
.flow-doc-item:last-child { border-bottom: 0; }
.flow-doc-item strong { display: block; margin-bottom: 5px; color: #5b6879; font-size: 12px; font-weight: 500; }
.flow-doc-item small, .flow-doc-item p { display: block; margin: 5px 0 0; color: #97a2b0; font-size: 11px; line-height: 1.6; }
.flow-doc-item .badge { font-size: 11px; }
.flow-progress { height: 4px; overflow: hidden; background: #edf1f6; border-radius: 2px; }
.flow-progress > span, .flow-progress > i { display: block; height: 100%; background: var(--primary); }
.flow-notice { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 11px 14px; border: 1px solid #dbe9fc; border-radius: 2px; background: #f4f8ff; color: #6d87a9; font-size: 12px; line-height: 1.7; }
.flow-notice.warning { border-color: #f2e1bd; background: #fffaf0; color: #a17b37; }
.flow-notice.success { border-color: #cde9d9; background: #f4fbf7; color: #4e8466; }
.flow-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 14px 0; border-bottom: 1px solid #edf0f4; }
.flow-kpis > div { padding: 0 15px; border-right: 1px solid #e9edf2; }
.flow-kpis > div:last-child { border-right: 0; }
.flow-kpis small, .flow-kpis span { display: block; color: #909dab; font-size: 11px; }
.flow-kpis strong { display: block; margin-top: 6px; color: #3e5069; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.flow-empty { padding: 26px 18px; color: #9ba5b3; text-align: center; font-size: 12px; line-height: 1.8; }
.flow-table-wrap { min-width: 0; overflow: auto; }
.flow-bom-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.flow-bom-table th, .flow-bom-table td { padding: 9px 12px; border-bottom: 1px solid #e9edf2; text-align: left; }
.flow-bom-table th { background: #f7f8fa; color: #8592a3; font-weight: 500; white-space: nowrap; }
.flow-bom-table td { color: #566579; }
.flow-bom-table .num { text-align: right; }
.flow-bom-table input { width: 88px; height: 28px; text-align: right; font-size: 12px; }
.flow-bom-table tr:last-child td { border-bottom: 0; }
.flow-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.flow-action-block { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px; border-bottom: 1px solid #edf0f4; }
.flow-action-block:last-child { border-bottom: 0; }
.flow-action-block h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.flow-action-block p { margin: 0; color: #8a97a8; font-size: 12px; line-height: 1.7; }
.flow-side-note { margin: 0; padding: 12px 14px; color: #8c99aa; font-size: 11px; line-height: 1.7; }
.flow-tag { display: inline-block; padding: 2px 6px; border: 1px solid #dce7f7; border-radius: 2px; background: #f3f7fe; color: #6e91c2; font-size: 11px; }
.flow-action-note { margin-top: 9px; color: #8c99aa; font-size: 12px; line-height: 1.7; }

/* Layout details for the shared workflow markup. */
.flow-summary { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.flow-summary-top { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; padding: 15px 16px; }
.flow-summary-top > .field { min-width: 250px; }
.flow-summary-top > .field select { min-width: 250px; }
.flow-summary-top > .flow-meta { flex: 1; padding-top: 17px; }
.flow-summary-top > .badge { margin-top: 17px; }
.flow-summary > .flow-steps { width: 100%; border: 0; border-top: 1px solid #eceff3; border-radius: 0; }
.flow-step > span:last-child { display: block; line-height: 1.5; }
.flow-step > span:last-child > small { display: block; margin-top: 3px; }
.flow-step.is-current > span:last-child { color: var(--primary); font-weight: 500; }
.flow-step.is-done > span:last-child { color: #527663; }
.flow-main { display: flex; flex-direction: column; min-width: 0; }
.flow-task { padding: 17px 16px 16px; }
.flow-task h3 { margin: 0 0 8px; color: #3b4b60; font-size: 15px; font-weight: 600; }
.flow-task p { margin: 0 0 16px; color: #8b97a7; font-size: 12px; line-height: 1.7; }
.flow-task-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; width: 100%; padding: 12px 0; border-bottom: 1px solid #edf0f4; }
.flow-task-row:first-child { padding-top: 0; }
.flow-task-row:last-child { padding-bottom: 0; border-bottom: 0; }
.flow-task-row small { display: block; margin-top: 5px; color: #97a2b1; font-size: 11px; }
.flow-task-row .btn { height: 29px; font-size: 12px; }
.flow-actions-list { flex-direction: column; align-items: stretch; gap: 0; }
.flow-kpis { border-top: 1px solid #edf0f4; border-bottom: 0; background: #fcfdfe; }
.flow-kpis strong small { display: inline; margin-left: 3px; font-size: 11px; font-weight: 400; }
.flow-section-tabs { display: flex; align-items: center; gap: 23px; min-height: 44px; padding: 0 15px; border-bottom: 1px solid #e8ecf1; }
.flow-section-tabs > .row-link { font-size: 12px; }
.flow-table-scroll { min-width: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #c5cbd5 #f7f8fa; }
.flow-table-scroll .mini-table { min-width: 540px; }
.flow-table-scroll .mini-table th, .flow-table-scroll .mini-table td { padding: 10px 13px; }
.flow-table-scroll .mini-table input { width: 112px; height: 30px; text-align: right; }
.flow-table-scroll .mini-table select { width: 265px; height: 30px; }
.flow-table-scroll .section-title { margin-left: 15px; }
.flow-panel > .section-title { margin-left: 15px; }
.flow-panel > .flow-notice { margin: 0; padding: 10px 14px; border: 0; border-top: 1px solid #e6edf6; border-radius: 0; font-size: 11px; }
.flow-docs { padding: 0; }
.flow-docs > .flow-section-title { min-height: 44px; }
.flow-doc-group { min-width: 0; padding: 0 14px; }
.flow-doc-group + .flow-doc-group { border-top: 1px solid #e9edf2; }
.flow-doc-group > .flow-section-title { min-height: 32px; padding: 10px 0 4px; border: 0; color: #7c899a; font-size: 12px; font-weight: 400; }
.flow-doc-group > .flow-section-title .muted { color: #a5afbc; font-size: 11px; }
.flow-doc-group .flow-doc-item { gap: 6px; padding: 8px 0 12px; }
.flow-doc-group .row-link { font-size: 12px; }
.flow-doc-empty { padding: 6px 0 12px; color: #b0b8c4; font-size: 11px; }

/* Paper output remains monochrome and uses business document conventions. */
.print-sheet { padding: 28px 32px; background: #fff; color: #222; }
.print-sheet h1 { margin: 0 0 20px; font-size: 20px; font-weight: 500; text-align: center; }
.print-meta { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 10px; font-size: 11px; }
.print-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.print-table th, .print-table td { padding: 6px; border: 1px solid #777; text-align: left; }
.print-signatures { display: flex; justify-content: space-between; margin-top: 35px; font-size: 11px; }
#print-root { display: none; }
.compact { --row: 36px; --body-size: 13px; }
.comfortable { --row: 42px; --body-size: 14px; }
.collapsed { grid-template-columns: 62px minmax(0, 1fr); }
.collapsed .brand { justify-content: center; padding: 0; }
.collapsed .brand-name, .collapsed .nav-main > span, .collapsed .nav-label, .collapsed .nav-main .chevron, .collapsed .nav-children, .collapsed .side-bottom > span { display: none; }
.collapsed .nav-main { justify-content: center; padding: 0; }
.collapsed .side-bottom { justify-content: center; padding: 12px 8px; }
.collapsed .nav-scroll { padding: 0 6px; }

@media (max-width: 1150px) {
  .shell { grid-template-columns: 180px minmax(0, 1fr); }
  .collapsed { grid-template-columns: 62px minmax(0, 1fr); }
  .brand { padding: 0 15px; }
  .topbar { gap: 10px; padding: 0 12px; }
  .global-search { width: 190px; }
  .company { font-size: 12px; }
  .field.party { width: 150px; }
  .field.date { width: 132px; }
  .field.status { width: 116px; }
  .filterbar { gap: 10px; }
  .metrics { gap: 10px; }
  .metric { padding: 13px; }
  .metric-value { font-size: 22px; }
  .document-head { gap: 9px; }
  .top-actions .user-name { display: none; }
  .flow-content { grid-template-columns: minmax(0, 1fr) 270px; }
  .flow-step { font-size: 11px; }
  .flow-step strong { font-size: 12px; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 62px minmax(0, 1fr); }
  .brand { justify-content: center; padding: 0; }
  .brand-name, .nav-main > span, .nav-label, .nav-main .chevron, .nav-children, .side-bottom > span { display: none; }
  .nav-main { justify-content: center; padding: 0; }
  .nav-scroll { padding: 0 6px; }
  .side-bottom { justify-content: center; padding: 12px 8px; }
  .global-search { width: 175px; }
  .top-actions { gap: 4px; }
  .top-actions > .btn { font-size: 12px; padding: 0 8px; }
  .filterbar { row-gap: 10px; }
  .grid-toolbar { height: auto; min-height: 44px; flex-wrap: wrap; }
  .view-tabs { gap: 17px; }
  .document-head { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .document-bottom { grid-template-columns: 1fr 1fr; }
  .document-bottom .field:last-child { grid-column: 1 / -1; }
  .dashboard-lower { grid-template-columns: 1fr; }
  .metric-icon { display: none; }
  .process-step { padding: 3px; }
  .process-step > .icon { display: none; }
  .pagination { gap: 4px; }
  .statusbar > span:last-child { display: none; }
  .flow-content { grid-template-columns: minmax(0, 1fr); }
  .flow-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0; align-items: start; }
  .flow-docs > .flow-section-title { grid-column: 1 / -1; }
  .flow-doc-group { border-top: 1px solid #e9edf2; }
  .flow-summary-top > .flow-meta { padding-top: 0; }
  .flow-summary-top > .badge { margin-top: 0; }
  .flow-summary { align-items: flex-start; }
  .flow-steps { min-width: 650px; }
  .flow-workspace { overflow-x: auto; }
}
@media (max-width: 620px) {
  .company { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
  .demo-label, .global-search { display: none; }
  .top-actions { margin-left: auto; }
  .top-actions > .btn { display: none; }
  .workspace { gap: 8px; padding: 0 8px 8px; }
  .page-heading { height: auto; min-height: 46px; padding-top: 8px; align-items: flex-start; }
  .breadcrumb > span, .breadcrumb > .icon { display: none; }
  .page-actions { gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
  .page-actions .btn { padding: 0 7px; font-size: 12px; }
  .filterbar { gap: 8px; padding: 10px; }
  .field.date, .field.status, .field.party { width: calc(50% - 4px); }
  .field.keyword { min-width: 110px; }
  .filter-actions { flex: 0; }
  .filter-actions .btn.primary { min-width: 58px; }
  .grid-toolbar { padding: 0 8px; }
  .toolbar-extra { gap: 4px; }
  .toolbar-extra .divider { display: none; }
  .view-tabs { gap: 12px; }
  .grid-footer { flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px; }
  .pagination { align-self: flex-end; font-size: 10px; }
  .grid-total { gap: 12px; padding: 6px 10px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric { padding: 11px; }
  .metric-value { font-size: 20px; }
  .dashboard-header { padding: 12px; }
  .greeting { font-size: 14px; }
  .dashboard-header .btn { display: none; }
  .process { grid-template-columns: repeat(3, 1fr); padding: 8px; }
  .process-step:nth-child(n + 4) { display: none; }
  .document-head { grid-template-columns: 1fr 1fr; padding: 10px; }
  .document-head .field:first-child { grid-column: 1 / -1; }
  .document-bottom { padding: 10px; }
  .details-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .settings-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 12px; }
  .modal { max-height: calc(100dvh - 24px); }
  .modal-body, .modal-header { padding: 12px; }
  .print-sheet { padding: 15px; }
  .topbar { padding: 0 8px; }
  .side-bottom { font-size: 10px; }
  .flow-summary { padding: 0; }
  .flow-summary-top { padding: 12px; gap: 12px; }
  .flow-summary-top > .field, .flow-summary-top > .field select { min-width: 0; width: 100%; }
  .flow-summary select { min-width: 180px; width: 100%; }
  .flow-summary .flow-actions { width: 100%; margin-left: 0; }
  .flow-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .flow-kpis > div:nth-child(2) { border-right: 0; }
  .flow-docs { display: flex; }
  .flow-form-grid { grid-template-columns: 1fr; }
}
@media print {
  body > * { display: none !important; }
  #print-root { display: block !important; }
  .print-sheet { padding: 0; }
  .print-table thead { display: table-header-group; }
  .print-table tr { break-inside: avoid; }
  @page { size: A4 landscape; margin: 12mm; }
}

.form-error { color: #cf2a2a; font-size: 13px; line-height: 1.6; margin-top: 12px; }
.form-error:empty { display: none; }
.print-source { font-size: 11px; line-height: 1.8; }
/* Generic ERP extensions: common tables, master data, and business documents. */
.feature-workspace{padding:16px;overflow:auto;flex:1;min-height:0}.feature-workspace>.flow-notice{margin:0 0 16px}.sample-toolbar{display:flex;align-items:center;gap:12px;background:white;border:1px solid var(--border);padding:12px;margin-bottom:16px}.sample-toolbar input{max-width:320px;flex:1}.sample-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px}.sample-card{background:white;border:1px solid #dfe4eb;border-radius:4px;overflow:hidden}.sample-image{position:relative;background:#f1f3f7;height:174px}.sample-image img{width:100%;height:100%;object-fit:contain}.sample-image>span{position:absolute;bottom:8px;right:8px;padding:2px 7px;background:#ffffffde;color:#6b7789;font-size:11px}.sample-body{padding:14px}.sample-card-title{display:flex;justify-content:space-between;gap:8px}.sample-body>small{display:block;margin-top:6px;color:#7a8799}.sample-body dl{display:grid;grid-template-columns:83px 1fr;gap:7px;font-size:12px}.sample-body dt{color:#7a8799}.sample-body dd{margin:0}.sample-price{font-size:16px;color:var(--primary);margin:15px 0}.check-row{display:flex;flex-wrap:wrap;gap:20px;padding:18px 0}.check-field{display:flex;align-items:center;gap:6px}.photo-edit{display:flex;align-items:center;gap:20px;padding:15px;background:#f7f9fc}.photo-edit img{width:130px;height:100px;object-fit:contain;border:1px solid #e0e5ed}.photo-edit small{color:#8491a4;margin-top:8px}.coverage-summary{display:flex;align-items:center;gap:30px;padding:18px 24px;background:white;border:1px solid #dfe4eb;margin-bottom:16px}.coverage-summary>div{display:flex;flex-direction:column;gap:6px;min-width:70px}.coverage-summary strong{font-size:24px;color:var(--primary)}.coverage-summary p{color:#6b7789;line-height:1.7;max-width:650px;margin:0}.coverage-note{min-width:280px;max-width:420px;white-space:normal!important;line-height:1.65}.feature-workspace .mini-table td{white-space:normal;vertical-align:middle}.feature-workspace .mini-table th{white-space:nowrap}.reference-links{padding:20px 4px;color:#7b8799;line-height:1.9}.reference-links a{color:var(--primary);margin-right:15px}.feature-workspace .grid-card{display:block}.form-error:empty{display:none}.modal-body .mini-table select{min-width:170px;width:100%}.modal-body .mini-table input[type=number]{width:110px}.modal-body .mini-table{margin-top:12px}.document-head{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.flow-task .flow-actions-list>.btn{align-self:flex-start}.nav-scroll{padding-bottom:24px}.side-bottom{flex-shrink:0}
@media(max-width:1000px){.coverage-summary{gap:15px;flex-wrap:wrap}.coverage-summary p{flex-basis:100%}.sample-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}.feature-workspace{padding:12px}}

.compact-subnav{display:none}.collapsed .compact-subnav{display:block}.compact-subnav label{display:flex;align-items:center;gap:10px;color:#6b7789}.compact-subnav select{max-width:230px}@media(max-width:960px){.compact-subnav{display:block;padding-top:10px}}

.video-modal{width:min(1320px,96vw);max-width:96vw}.video-modal .modal-body{padding:16px}.video-guide{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px}.guide-player video{display:block;width:100%;max-height:63vh;background:#172132;border:1px solid #dce2eb;border-radius:4px}.guide-player-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px}.guide-player-tools label{display:flex;align-items:center;gap:10px}.guide-player-tools select{width:86px}.guide-description{font-size:12px;color:#7b8799;line-height:1.7;margin:12px 0 0}.guide-chapters{border:1px solid #e1e6ed;border-radius:4px;background:#fbfcfe;overflow:auto;max-height:68vh}.guide-chapters>.section-title{margin:0;padding:14px;border-bottom:1px solid #e1e6ed}.guide-chapter{display:flex;align-items:center;gap:10px;width:100%;padding:13px 12px;text-align:left;background:transparent;border:0;border-bottom:1px solid #edf0f5;cursor:pointer;color:#34415a}.guide-chapter>span{font-variant-numeric:tabular-nums;color:#8795aa;font-size:12px}.guide-chapter strong{display:block;font-weight:500;font-size:13px}.guide-chapter small{display:block;margin-top:5px;font-size:11px;color:#8795aa;line-height:1.5}.guide-chapter:hover,.guide-chapter.active{background:#eaf2ff;color:#1677ff}.guide-transcript{margin-top:14px;border-top:1px solid #e8ecf2;padding-top:12px;color:#65758c;font-size:12px;line-height:1.8}.guide-transcript summary{cursor:pointer;color:#1677ff}.guide-transcript ol{padding-left:24px}@media(max-width:1000px){.video-guide{grid-template-columns:1fr}.guide-chapters{max-height:210px}.guide-player video{max-height:52vh}.guide-chapter{padding:10px}}

/* V4: module → process map → document. */
.suite-shell{grid-template-columns:218px minmax(0,1fr);--body-size:14px}
.suite-shell .nav-main{min-height:44px;font-size:14px;font-weight:600}
.suite-shell .nav-child{min-height:34px;font-size:13px;display:flex;align-items:center;gap:5px}
.nav-state{margin-left:auto;font-size:10px;color:#9aa2af;font-weight:400}
.navigation-home,.suite-content{padding:24px;overflow:auto;min-height:0}
.navigation-home{background:#f5f7fa}
.navigation-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;gap:20px}
.eyebrow{color:#6f7d90;font-size:12px;letter-spacing:1px}
.navigation-heading h1,.map-title h1{font-size:24px;line-height:1.5;margin:7px 0;color:#243955;font-weight:600}
.navigation-heading p,.map-title p{margin:0;color:#718096;line-height:1.8}
.nav-context{display:flex;flex-direction:column;gap:8px;text-align:right;color:#6e7c8d;white-space:nowrap;font-size:12px}
.nav-context strong{font-size:14px;color:#334763}
.module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.module-card{background:#fff;border:1px solid #dfe5ed;border-radius:4px;min-height:116px;display:flex;align-items:center;text-align:left;padding:20px 18px;gap:15px;color:#30415b;box-shadow:0 1px 2px #1b3a5f04}
.module-card:hover{border-color:#79a9e8;box-shadow:0 3px 12px #1b3a5f0b;background:#fbfdff}
.module-icon,.map-icon{display:flex;align-items:center;justify-content:center;background:#eaf2ff;color:#2b6cc1;border:1px solid #d8e6fc;border-radius:8px;width:50px;height:50px;flex-shrink:0}
.module-icon .icon{width:27px;height:27px;stroke-width:1.4}
.module-info{display:flex;flex-direction:column;gap:7px;flex:1;min-width:0}
.module-info strong{font-size:17px;font-weight:600}.module-info small{font-size:12px;color:#78869a;line-height:1.6}.module-info>span{font-size:11px;color:#8491a3}
.home-favorites{background:white;border:1px solid #dfe5ed;border-top:3px solid #6b9fdf;border-radius:4px;padding:15px 18px;margin-bottom:22px}
.home-section-heading,.module-directory-heading{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.home-section-heading h2,.module-directory-heading h2{margin:0;color:#334763;font-size:16px;font-weight:600}
.home-section-heading>span,.module-directory-heading>span{font-size:12px;color:#8491a3}
.home-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}
.home-shortcuts .btn{gap:6px}.home-shortcuts .btn .icon{width:16px;height:16px;color:#4a79b6}
.module-directory-heading{margin-bottom:17px}
.module-section{margin-bottom:20px}.module-section h3{font-size:13px;font-weight:500;color:#60748d;border-left:3px solid #a8c5e9;padding-left:9px;margin:0 0 10px}
.module-section .module-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.module-section .module-card{min-height:100px;padding:15px 16px;gap:12px}.module-section .module-info{gap:5px}.module-section .module-icon{width:42px;height:42px}
.suite-shell .nav-label{margin-top:12px;padding-top:0}
@media(min-width:1250px){.module-section[data-module-group="manufacturing"] .module-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.module-section[data-module-group="manufacturing"] .module-card{padding:14px 12px;gap:9px}.module-section[data-module-group="manufacturing"] .module-card>.icon{display:none}.module-section[data-module-group="manufacturing"] .module-icon{width:36px;height:36px}}
@media(max-width:1100px){.module-section .module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.home-favorites{padding:13px;margin-bottom:18px}.home-section-heading>span{display:none}.home-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.home-shortcuts .btn{font-size:12px;padding:7px 9px}.module-section .module-grid{gap:10px}.module-section .module-card{padding:13px 10px;min-height:105px;gap:9px}.module-section .module-icon{width:32px;height:32px}.module-section .module-icon .icon{width:22px;height:22px}.module-section .module-info strong{font-size:15px}.module-directory-heading{gap:7px}.module-directory-heading>span{font-size:11px}.module-section{margin-bottom:17px}}
.availability-key{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;border-top:1px solid #e0e5ec;padding-top:18px;color:#7b8799}
.module-map{padding:28px;background:white;border:1px solid #e1e6ef;margin:0 18px 18px;overflow:auto;min-height:0}
.map-title{display:flex;gap:17px;align-items:center;padding-bottom:24px;border-bottom:1px solid #e9edf3}
.map-title h1{font-size:21px;margin:0 0 5px}
.map-lane{padding:24px 0;border-bottom:1px dashed #e4e9f1}
.lane-label{font-size:12px;color:#7e8c9f;margin-bottom:18px;border-left:3px solid #a9c6ec;padding-left:9px}
.map-lane-nodes{display:flex;align-items:stretch;gap:12px;flex-wrap:wrap}
.map-node-wrap{display:flex;align-items:center;flex:0 0 auto}
.map-node{width:154px;min-height:180px;display:flex;align-items:center;flex-direction:column;background:#fff;border:1px solid #dce4ef;border-radius:4px;padding:16px 10px;gap:10px;text-align:center;color:#2d405c}
.map-node:hover{border-color:#7aa6df;background:#f8fbff}
.map-icon{width:48px;height:48px;background:#f0f5fc;border:0}
.map-icon .icon{width:29px;height:29px;stroke-width:1.4}
.map-node strong{font-size:14px}.map-node small{font-size:11px;line-height:1.65;color:#7e8a9c;flex:1}
.node-badges{display:flex;gap:4px;justify-content:center;flex-wrap:wrap}.node-badges .badge{font-size:10px;padding:3px 4px}
.map-arrow{width:26px;flex-shrink:0;text-align:center;font-size:23px;color:#a5b7ce;margin-left:9px}
.map-node.no-access{opacity:.55}.map-note{color:#8a94a2;font-size:12px;padding-top:19px;line-height:1.8}
.module-return{display:flex;justify-content:space-between;padding:13px 20px 0;gap:10px;color:#969eaa;font-size:12px}
.role-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.role-card{display:flex;flex-direction:column;gap:9px;background:#fff;padding:18px 13px;text-align:left;border:1px solid #dfe4ec;border-radius:4px;color:#3a4a61}
.role-card.selected{border-color:#3e80d6;background:#edf5ff}.role-card strong{font-size:16px}.role-card span{font-size:12px}.role-card small{font-size:11px;color:#7b8796;line-height:1.6}
.suite-content .flow-notice{margin:0 0 18px;font-size:13px;line-height:1.8}.suite-content .data-table{font-size:13px;min-width:780px}
.suite-section-title{font-size:17px;color:#344861;margin:26px 0 16px}
.permission-yes{color:#238858}.block{display:block;margin-top:4px}
.feature-placeholder{max-width:780px;margin:35px auto;padding:40px;background:white;border:1px solid #e0e5ed;text-align:center;border-radius:4px}
.feature-placeholder>.module-icon{margin:auto}.feature-placeholder h1{font-size:24px;color:#334762}.feature-placeholder>p{color:#778496;line-height:1.8}
.placeholder-detail{background:#f6f8fb;padding:20px;text-align:left;margin:26px 0;color:#52637c;line-height:1.9}.placeholder-detail p{margin:8px 0 0;color:#818c9c}
.audit-search{display:flex;gap:10px;align-items:center;margin:0 0 18px}.audit-search input{width:340px}
.configuration-panel{background:white;border:1px solid #e0e5ed;border-radius:4px;padding:25px;max-width:900px}.configuration-panel h2{font-size:18px;color:#354961;margin:0 0 18px}.configuration-panel h2:not(:first-child){margin-top:28px}.configuration-panel>.field{max-width:300px}
.industry-summary{background:#f4f7fc;padding:16px 20px;margin-top:16px;line-height:1.7;color:#5d6c81}.industry-summary p{margin:7px 0;font-size:13px}
.module-checks{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.module-checks label{display:flex;gap:9px;align-items:center}.suite-content>.grid-card{flex:initial}
@media(min-width:1600px){.module-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.module-card{min-height:132px}}
@media(max-width:1100px){.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.role-grid{grid-template-columns:repeat(2,1fr)}.suite-shell .company{display:none}.suite-shell{grid-template-columns:195px minmax(0,1fr)}}
@media(max-width:760px){.suite-shell{grid-template-columns:minmax(0,1fr)}.navigation-home,.suite-content{padding:15px}.navigation-heading{align-items:flex-start}.navigation-heading h1{font-size:20px}.nav-context{display:none}.module-grid{gap:10px}.module-card{padding:14px 10px;gap:10px;min-height:125px}.module-info strong{font-size:15px}.module-card>.icon{display:none}.module-icon{width:38px;height:38px}.module-info small{font-size:11px}.module-map{margin:0 10px 12px;padding:17px}.map-node{width:140px}.map-lane-nodes{gap:12px}.role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.module-checks{grid-template-columns:repeat(2,1fr)}.suite-shell .top-actions .user-button{display:flex}.suite-shell .top-actions>.btn{display:none}.suite-shell .global-search{display:none}.suite-shell .compact-subnav{display:flex;gap:8px}.compact-subnav select{flex:1}.feature-placeholder{padding:25px 18px;margin:10px auto}.audit-search{flex-wrap:wrap}.audit-search input{width:100%}.availability-key{line-height:1.8}}
.suite-shell.collapsed{grid-template-columns:64px minmax(0,1fr)}
@media(min-width:761px) and (max-width:960px){.suite-shell{grid-template-columns:64px minmax(0,1fr)}}
@media(max-width:760px){.suite-shell,.suite-shell.collapsed{grid-template-columns:minmax(0,1fr);grid-template-rows:52px minmax(0,1fr)}.suite-shell>.brand,.suite-shell>.side{display:none}.suite-shell>.topbar{grid-column:1;grid-row:1;justify-content:space-between;padding:0 15px}.suite-shell>.main{grid-column:1;grid-row:2}.suite-shell .topbar>[data-action="collapse"]{display:none}.suite-shell .topbar .top-actions{margin-left:auto}.suite-shell .compact-subnav{padding:8px 12px}.suite-shell .compact-subnav select{max-width:none}.suite-shell .module-info>span{display:none}}

@media(max-width:760px){.suite-shell>.topbar::before{content:"工贸 ERP";font-size:16px;font-weight:600;color:white}}

.nav-main[aria-expanded="true"] .chevron { transform: rotate(180deg); }

@media(max-width:760px) { .suite-shell .top-actions > .btn[data-action="guide"] { display: inline-flex; padding: 0 8px; font-size: 12px; } }

/* Shared master-data fields and line-level business views. */
.unified-tools{display:flex;gap:8px;flex-wrap:wrap;flex-shrink:0}.unified-tools .btn{height:29px;font-size:12px}
.unified-document-fields{border-top:1px solid var(--line);padding-top:12px}
.workspace>.feature-workspace{flex:1;min-height:0}.feature-workspace>.grid-card{overflow:visible}
.feature-workspace .mini-table th,.feature-workspace .mini-table td{white-space:nowrap}.feature-workspace .coverage-note{white-space:normal!important}
#import-text{height:210px;width:100%;resize:vertical;font:13px/1.7 ui-monospace,monospace}
.import-result{margin-top:18px;padding:16px;border:1px solid #dce4ef;background:#fff;line-height:1.8;overflow-wrap:anywhere}
@media(max-width:760px){.sample-toolbar{flex-wrap:wrap}.unified-document-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.feature-workspace .mini-table{min-width:850px}}

.attribute-panel{border-top:1px solid var(--line);margin-top:18px;padding-top:14px}.attribute-panel summary{cursor:pointer;color:var(--primary);margin-bottom:14px}

.profit-workspace .mini-table th:last-child,.profit-workspace .mini-table td:last-child{position:sticky;right:0;background:#fff;box-shadow:-2px 0 5px #27374b10;min-width:215px}.profit-workspace .mini-table th:last-child{background:#f6f7f9;z-index:2}

.product-tabs { margin-bottom: 16px; }
.product-tabs [role=tab]:focus-visible { outline-offset: -3px; }
[data-product-panel][hidden] { display: none; }
.product-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 10px; }
.product-gallery figure { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #f7f9fc; }
.product-gallery img { display: block; width: 100%; height: 132px; object-fit: contain; }
.product-gallery figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 7px; background: white; }
.product-gallery figcaption span { margin-right: auto; }
.product-gallery figcaption .btn { height: auto; min-height: 26px; padding: 2px 6px; }
.product-photo-upload { margin-top: 16px; }
.product-photo-upload small { color: #637189; }
.product-estimate-fields { margin-top: 14px; }
.product-template-actions { gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.product-template-editor { padding: 0 12px 6px; border: 1px solid var(--line); border-radius: 6px; }
.product-template-editor .mini-table input { min-width: 95px; }
.product-template-editor .mini-table select { min-width: 84px; }
.product-cost-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(125px,1fr)); gap: 10px; margin-top: 14px; }
.product-cost-summary div { display: grid; gap: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9fc; }
.product-cost-summary span { color: #637189; }
.product-cost-summary strong { font-size: 15px; }

.order-example-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line); background: white; }
.order-example-shortcuts span { color: #55647a; }
.order-example-shortcuts small { color: #748196; }
.order-thumb { display: block; width: 70px; height: 48px; object-fit: contain; border: 1px solid var(--line); border-radius: 3px; }
