:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --panel: #fff;
  --canvas: #f5f5f7;
  --blue: #0071e3;
  --green: #16866c;
  --red: #bd2433;
  --amber: #9b6200;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 50% 15%, #fff 0, #f5f5f7 58%); }
.login-card { width: min(430px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 18px 54px #1d1d1f12; }
.brand { display: flex; align-items: center; gap: 13px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: #183f37; font-size: 18px; }
.eyebrow { margin: 26px 0 7px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.login-card .brand { margin-bottom: 30px; }
.login-card .eyebrow { margin: 0 0 8px; color: #52776e; font-size: 11px; letter-spacing: .14em; }
.login-card .subtle { margin: 0 0 20px; font-size: 14px; }
.login-card form { margin-top: 19px; }
.login-card .field { margin: 0 0 17px; }
.login-card .button.full { margin-top: 12px; }
.login-card form + .button.full { margin-top: 18px; }
h1, h2, h3, p { margin-top: 0; }
.login-card h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.3; letter-spacing: -.04em; }
.subtle { color: var(--muted); line-height: 1.6; }
.field { display: grid; gap: 7px; margin: 15px 0; color: #424245; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea, .toolbar input, .toolbar select { min-width: 0; width: 100%; border: 1px solid #d2d2d7; border-radius: 10px; background: #fff; padding: 11px 12px; color: var(--ink); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar input:focus, .toolbar select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #0071e322; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid transparent; border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 650; transition: .15s ease; }
.button.primary { color: #fff; background: var(--blue); }
.button.primary:hover { background: #0077ed; }
.button.secondary { color: #303034; background: #fff; border-color: #d2d2d7; }
.button.secondary:hover { background: #f7f7f9; }
.button.green { color: #fff; background: var(--green); }
.button.danger { color: #fff; background: var(--red); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.full { width: 100%; margin-top: 10px; }
.error { min-height: 20px; margin: 10px 0 0; color: var(--red); font-size: 13px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.side { display: flex; flex-direction: column; min-height: 100vh; padding: 23px 15px; background: #fff; border-right: 1px solid var(--line); }
.side .brand { padding: 0 10px 22px; border-bottom: 1px solid var(--line); }
.side nav { display: grid; gap: 5px; padding-top: 22px; }
.nav-button { display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; border: 0; border-radius: 10px; padding: 0 12px; text-align: left; color: #4b4b50; background: transparent; font-size: 14px; }
.nav-button:hover { background: #f5f5f7; }
.nav-button.active { color: var(--blue); background: #eaf3ff; font-weight: 650; }
.nav-icon { display: grid; place-items: center; width: 22px; color: inherit; font-size: 16px; }
.side-note { margin-top: auto; padding: 16px 10px 0; color: #8a8a90; font-size: 12px; line-height: 1.6; }
.main { min-width: 0; }
.topbar { position: sticky; z-index: 5; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 12px 30px; background: #ffffffed; border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.page-title { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.identity { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.identity strong { color: var(--ink); font-weight: 650; }
.content { width: min(1500px, 100%); margin: 0 auto; padding: 28px 30px 50px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 4px 16px #1d1d1f06; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: end; gap: 10px; padding: 18px 22px; flex-wrap: wrap; }
.toolbar .field { flex: 1 1 220px; margin: 0; }
.toolbar .field.small { flex: 0 1 190px; }
.status-strip { display: flex; gap: 8px; overflow-x: auto; padding: 14px 22px 0; }
.status-chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: #525258; background: #fff; white-space: nowrap; font-size: 13px; }
.status-chip.active { color: #075db5; border-color: #9bc9ff; background: #edf6ff; font-weight: 650; }
.hint { margin: 0; padding: 0 22px 16px; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: #6e6e73; background: #fafafc; font-size: 12px; font-weight: 650; text-align: left; }
th, td { padding: 13px 14px; border-bottom: 1px solid #ececf0; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfbfd; }
.id-link { border: 0; padding: 0; color: var(--blue); background: transparent; font-weight: 650; text-align: left; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; background: #f1f1f4; color: #55555b; font-size: 11px; white-space: nowrap; }
.pill.green { color: #116c57; background: #e7f5ef; }
.pill.blue { color: #075db5; background: #eaf3ff; }
.pill.amber { color: #8b5800; background: #fff3df; }
.pill.red { color: #a51e2b; background: #ffebed; }
.pill.purple { color: #6543a7; background: #f1ebfb; }
.muted { color: var(--muted); }
.empty { padding: 46px 22px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; }
.results { display: grid; gap: 12px; padding: 18px 22px 22px; }
.task-tree, .batch-tree { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.task-tree > summary, .batch-tree > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; }
.task-tree > summary::-webkit-details-marker, .batch-tree > summary::-webkit-details-marker { display: none; }
.task-tree > summary::before, .batch-tree > summary::before { content: "＋"; width: 20px; flex: 0 0 20px; color: var(--blue); font-weight: 600; }
.task-tree[open] > summary::before, .batch-tree[open] > summary::before { content: "−"; }
.task-tree > summary { background: #fafbfd; }
.task-tree[open] > summary { border-bottom: 1px solid var(--line); }
.tree-main { display: grid; gap: 4px; margin-right: auto; }
.tree-main b { color: #174f78; font-size: 14px; }
.tree-main span { color: var(--muted); font-size: 12px; }
.task-status-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.task-status-summary > span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.task-status-summary b { color: var(--ink); }
.task-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.task-detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 14px 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.task-detail-head > div > span { color: #187a65; font-size: 12px; font-weight: 650; }
.task-detail-head h2 { margin: 5px 0 0; font-size: 24px; }
.task-detail-head p { margin: 6px 0 0; color: var(--muted); }
.task-detail-counts { margin: 14px 0; }
.task-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.task-detail-grid > div { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.task-detail-grid span { color: var(--muted); font-size: 12px; }
.task-detail-grid strong { overflow-wrap: anywhere; }
.batch-tree { margin: 12px 16px; }
.batch-tree > summary { padding: 12px 15px; background: #f4f7fb; }
.batch-tree > summary > div:first-of-type { display: grid; gap: 3px; }
.batch-tree > summary > div:first-of-type span { color: var(--muted); font-size: 11px; }
.batch-tree[open] > summary { border-bottom: 1px solid var(--line); }
.task-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.task-summary { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(170px, 1fr) repeat(4, minmax(75px, .55fr)); gap: 14px; align-items: center; padding: 16px; background: #fcfcfd; }
.task-name { font-size: 14px; font-weight: 700; }
.task-meta { margin-top: 4px; color: var(--muted); font-size: 12px; }
.count-cell { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.count-cell strong { color: var(--ink); font-size: 16px; }
.batch-row { padding: 12px 16px; color: #525258; background: #f8f8fa; border-top: 1px solid var(--line); font-size: 12px; font-weight: 650; }
.compact-table th, .compact-table td { padding: 10px 12px; }
.action-list { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline { display: grid; gap: 0; padding: 6px 0; }
.section-title { margin: 20px 0 12px; font-size: 14px; }
.timeline-item { position: relative; margin-left: 8px; padding: 0 0 20px 22px; border-left: 1px solid #d7d7dc; }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; top: 3px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #eaf3ff; }
.timeline-title { margin: 0 0 3px; font-size: 13px; font-weight: 650; }
.timeline-meta { color: var(--muted); font-size: 12px; }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: #11182770; }
.modal { width: min(560px, 100%); max-height: min(86vh, 800px); overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 20px 70px #0003; }
.modal-head { display: flex; justify-content: space-between; align-items: start; padding: 21px 23px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 19px 23px 22px; }
.modal-foot { display: flex; justify-content: end; gap: 9px; padding-top: 14px; }
.modal-close { border: 0; color: #777; background: transparent; font-size: 22px; }
.check-row { display: flex; align-items: center; gap: 8px; color: #414146; font-size: 13px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 11px 18px; margin: 8px 0 14px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 24px; max-width: calc(100vw - 30px); transform: translateX(-50%); border-radius: 999px; padding: 11px 18px; color: #fff; background: #242428; box-shadow: 0 8px 28px #0003; font-size: 13px; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-note { margin: 20px 2px 0; color: #8a8a90; font-size: 11px; line-height: 1.6; }
@media (max-width: 900px) {
  .task-tree > summary, .batch-tree > summary { align-items: flex-start; flex-wrap: wrap; }
  .task-status-summary { justify-content: flex-start; }
  .task-facts { align-items: flex-start; flex-direction: column; gap: 7px; }
  .task-detail-grid { grid-template-columns: 1fr; }
  .batch-tree { margin: 8px; }
  .shell { grid-template-columns: 70px minmax(0, 1fr); }
  .side { padding: 15px 8px; }
  .side .brand { justify-content: center; padding: 0 0 16px; }
  .brand-title, .nav-label, .side-note { display: none; }
  .nav-button { justify-content: center; padding: 0; }
  .topbar { padding: 12px 18px; }
  .content { padding: 18px; }
  .identity .identity-detail { display: none; }
  .task-summary { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 580px) {
  .shell { display: block; padding-bottom: 65px; }
  .side { position: fixed; z-index: 8; inset: auto 0 0; min-height: auto; height: 62px; padding: 5px 8px; border-top: 1px solid var(--line); border-right: 0; }
  .side .brand, .side-note { display: none; }
  .side nav { display: flex; justify-content: space-around; padding: 0; }
  .nav-button { width: 56px; height: 50px; }
  .topbar { min-height: 64px; }
  .page-title { font-size: 19px; }
  .content { padding: 12px; }
  .panel-head { padding: 15px; }
  .toolbar { padding: 14px; }
  .status-strip { padding: 12px 14px 0; }
  .task-summary { grid-template-columns: 1fr 1fr; }
}

/* Match the local workbench shell while keeping the shared data client. */
.shell { --ink: #20242c; --muted: #687181; --line: #e7eaf0; --canvas: #f4f6f9; --blue: #086fdc; --panel: #fff; display: block; min-height: 100vh; background: var(--canvas); }
.shell .side { position: fixed; z-index: 10; inset: 0 auto 0 0; width: 208px; height: 100dvh; min-height: 0; padding: 18px 12px 12px; overflow-y: auto; background: #fcfcfd; }
.shell .side .brand { min-height: 58px; gap: 10px; padding: 0 10px 18px; font-size: 17px; white-space: nowrap; }
.shell .brand-mark { display: block; width: 32px; height: 32px; padding: 2px; border: 1px solid #e2e8f0; border-radius: 9px; background: #edf2f9; object-fit: contain; }
.shell .side nav { display: grid; gap: 3px; padding-top: 0; margin-top: 12px; }
.shell .nav-section { padding: 17px 13px 6px; color: #8a93a2; font-size: 10px; font-weight: 650; letter-spacing: .06em; }
.shell .nav-button { gap: 11px; min-height: 42px; padding: 11px 12px; border-radius: 8px; color: #5b6574; font-size: 13px; font-weight: 500; }
.shell .nav-button.active { color: #0867d0; background: #eaf2ff; font-weight: 650; }
.shell .nav-icon { width: 19px; height: 19px; flex: 0 0 19px; }
.shell .nav-icon svg { width: 19px; height: 19px; }
.shell .nav-active-dot { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: #0867d0; }
.shell .side-note { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding: 24px 8px 2px; font-size: 10px; white-space: nowrap; }
.shell .online-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #76a1ae; vertical-align: middle; }
.shell #density-toggle { padding: 4px 5px; border: 1px solid #dde3eb; border-radius: 5px; background: #fff; color: #58677d; font-size: 10px; }
.shell #density-toggle[aria-pressed="true"] { color: #0068d5; border-color: #8eb9ed; background: #edf5ff; }
body[data-density="compact"] .shell td { padding-top: 7px; padding-bottom: 7px; }
.shell .main { min-height: 100vh; margin-left: 208px; background: var(--canvas); }
.shell .topbar { min-height: 82px; padding: 14px 28px; background: #fff; }
.shell .page-group { display: block; margin-bottom: 4px; color: #8992a0; font-size: 10px; }
.shell .page-title { font-size: 22px; letter-spacing: -.025em; }
.shell .identity { gap: 12px; font-size: 13px; white-space: nowrap; }
.shell .identity .identity-detail { color: #7d8796; }
.shell .identity strong { font-weight: 650; }
.shell .identity .button { min-height: 36px; padding: 7px 13px; }
.shell .content { width: auto; max-width: 1840px; padding: 24px 28px 48px; }
.shell .panel, .shell .workbench-head, .shell .work-stat { border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 14px #18233a03; }
.shell .workbench-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 134px; padding: 20px 24px; }
.shell .workbench-head > div:first-child > span { color: #6f7d90; font-size: 11px; font-weight: 650; }
.shell .workbench-head h2 { margin: 5px 0; font-size: 23px; letter-spacing: -.02em; }
.shell .workbench-head p { margin: 5px 0 0; color: #7d8796; font-size: 11px; }
.shell .workbench-actions { display: flex; gap: 8px; }
.shell .workbench-actions .button { min-height: 36px; font-size: 12px; }
.shell .work-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 22px; }
.shell .work-stat { display: grid; align-content: start; min-height: 132px; padding: 17px 20px; }
.shell .work-stat span { color: var(--muted); font-size: 11px; }
.shell .work-stat strong { margin: 7px 0 3px; color: #20242c; font-size: 29px; line-height: 1.15; }
.shell .work-stat small { color: #8992a0; font-size: 10px; }
.shell .work-panel { min-height: 327px; }
.shell .work-panel .panel-head { min-height: 83px; padding: 18px 20px; }
.shell .work-panel .panel-head h2 { font-size: 17px; }
.shell .work-panel .panel-head p { font-size: 11px; }
.shell .work-filter { display: flex; width: min(255px, 45%); }
.shell .work-filter input { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid #e1e6ed; border-radius: 7px; outline: none; color: var(--ink); background: #fff; font-size: 11px; }
.shell .work-filter input:focus { border-color: var(--blue); }
.shell .work-filter button { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell .work-empty { display: grid; justify-items: center; align-content: center; min-height: 242px; padding: 34px 20px; font-size: 12px; }
.shell .work-empty .empty-icon { width: 37px; height: 44px; margin-bottom: 14px; color: #d2dcea; }
.shell .work-empty .empty-icon svg { width: 100%; height: 100%; }
.shell .work-empty strong { margin-bottom: 12px; font-size: 15px; }

/* Shared workflow pages use the same card, grid, and toolbar rhythm. */
.shell .button { min-height: 36px; border-radius: 7px; padding: 7px 13px; font-size: 12px; }
.shell .button.primary { background: #0873e1; }
.shell .button.primary:hover { background: #0064ca; }
.shell .button.secondary { color: #4a5668; border-color: #dce2eb; }
.shell .field { gap: 7px; margin: 0; min-width: 0; color: #4d5768; font-size: 12px; }
.shell .field input, .shell .field select, .shell .field textarea, .shell .toolbar input, .shell .toolbar select { min-height: 36px; border-radius: 7px; border-color: #dce2eb; padding: 8px 10px; font-size: 13px; }
.shell .toolbar { gap: 10px; padding: 18px 20px; }
.shell .toolbar .field { flex: 1 1 230px; }
.shell .toolbar .field.small { flex: 0 1 190px; }
.shell .panel-head { padding: 17px 20px; }
.shell .panel-head h2 { font-size: 16px; }
.shell .panel-head p { font-size: 11px; }
.shell .panel + .panel { margin-top: 18px; }
.shell .module-tabs { display: flex; gap: 18px; overflow-x: auto; max-width: 100%; margin: 0 0 18px; border-bottom: 1px solid #dfe5ed; }
.shell .module-tabs button { flex: 0 0 auto; min-height: 44px; padding: 12px 3px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: #667184; background: transparent; white-space: nowrap; font-size: 13px; }
.shell .module-tabs button.active { color: #0068d5; border-bottom-color: #0873e1; font-weight: 650; }
.shell .module-tabs button b { margin-left: 7px; padding: 2px 6px; border-radius: 5px; color: #627086; background: #e9edf3; font-size: 10px; }
.shell .module-tabs button.active b { color: #0068d5; background: #e6f0ff; }
.shell .dashboard-tabs { gap: 8px; border: 0; margin-bottom: 14px; }
.shell .dashboard-tabs button { min-height: 38px; padding: 8px 15px; border: 1px solid #e4e8ef; border-radius: 999px; background: #fff; }
.shell .dashboard-tabs button.active { border-color: #b8d7ff; background: #edf6ff; }
.shell .contract-picker { position: relative; width: 100%; color: var(--ink); font-weight: 400; }
.shell .contract-picker summary { overflow: hidden; min-height: 39px; padding: 10px 34px 10px 12px; border: 1px solid #dce2eb; border-radius: 9px; background: #fff; color: #4e5868; cursor: pointer; text-overflow: ellipsis; white-space: nowrap; }
.shell .contract-picker[open] summary { border-color: var(--blue); box-shadow: 0 0 0 3px #0071e322; }
.shell .contract-options { position: absolute; z-index: 7; top: calc(100% + 5px); left: 0; display: grid; gap: 2px; width: max(100%, 280px); max-height: 300px; overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 32px #17243a1c; }
.shell .contract-choice { display: flex; align-items: start; gap: 9px; padding: 8px; border-radius: 7px; color: #3f4a5c; cursor: pointer; font-size: 12px; font-weight: 500; }
.shell .contract-choice:hover { background: #f3f7fc; }
.shell .contract-choice input { margin: 2px 0 0; accent-color: var(--blue); }
.shell .contract-choice .cell-sub { display: block; margin-top: 3px; }
.shell .shipping-metrics { padding: 14px 18px 0; }
.shell .warehouse-card .panel-head { min-height: 70px; }
.shell .warehouse-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.shell .warehouse-actions input { width: min(255px, 24vw); min-height: 36px; padding: 8px 10px; border: 1px solid #dce2eb; border-radius: 7px; color: var(--ink); background: #fff; font-size: 12px; }
.shell .warehouse-actions input:focus { border-color: var(--blue); outline: none; }
.shell .warehouse-actions .button { min-height: 35px; white-space: nowrap; }
.shell .warehouse-table { min-width: 1160px; }
.shell .warehouse-table .cell-sub { display: block; margin-top: 5px; color: #7b8797; font-size: 10px; font-weight: 400; }
.shell .warehouse-table .button { min-height: 30px; padding: 5px 9px; font-size: 11px; white-space: nowrap; }
.shell .warehouse-table th:first-child, .shell .warehouse-table td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; }
.shell .warehouse-table th:last-child, .shell .warehouse-table td:last-child { position: sticky; right: 0; z-index: 2; background: #fff; }
.shell .warehouse-table th:first-child, .shell .warehouse-table th:last-child { z-index: 3; background: #f7f9fc; }
.shell .import-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr); gap: 16px; align-items: stretch; }
.shell .import-layout > .panel { min-width: 0; margin: 0; }
.shell .import-layout .card-body { display: grid; gap: 14px; padding: 18px 20px; }
.shell .import-layout .field textarea { width: 100%; min-height: 230px; resize: vertical; border: 1px solid #dce2eb; border-radius: 8px; padding: 12px; color: var(--ink); font: 13px/1.6 inherit; }
.shell .import-layout .field textarea:focus { outline: none; border-color: var(--blue); }
.shell .file-drop { display: grid; place-items: center; gap: 9px; min-height: 180px; padding: 22px; border: 1px dashed #cbd3df; border-radius: 10px; color: var(--ink); background: #fafbfd; text-align: center; cursor: pointer; }
.shell .file-drop input { max-width: 100%; font-size: 12px; }
.shell .file-drop span { color: var(--muted); font-size: 11px; }
.shell .import-layout .hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.shell .export-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px 20px; }
.shell .export-preview { display: flex; flex: 1 1 420px; flex-wrap: wrap; gap: 10px; }
.shell .export-preview > div { display: grid; gap: 4px; min-width: 110px; padding: 12px 15px; border: 1px solid #e8edf4; border-radius: 8px; background: #fafbfd; }
.shell .export-preview span { color: var(--muted); font-size: 11px; }
.shell .export-preview strong { color: var(--ink); font-size: 20px; }
.shell .metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 18px; }
.shell .metric-card { display: grid; align-content: start; min-width: 0; min-height: 112px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 14px #18233a03; }
.shell .metric-card span { color: var(--muted); font-size: 11px; }
.shell .metric-card strong { margin: 7px 0 3px; color: var(--ink); font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.shell .metric-card small { color: #8992a0; font-size: 10px; }
.shell .split-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin: 0 0 18px; align-items: stretch; }
.shell .split-grid > .panel { min-width: 0; margin: 0; }
.shell .split-grid + .panel { margin-top: 0; }
.shell .stage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 18px 20px; }
.shell .stage-cell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; align-items: center; min-width: 0; padding: 11px 13px; border: 1px solid #e8edf4; border-radius: 8px; background: #fafbfd; }
.shell .stage-cell span { min-width: 0; overflow-wrap: anywhere; color: #596579; font-size: 12px; }
.shell .stage-cell strong { color: #20242c; font-size: 14px; white-space: nowrap; }
.shell .stage-cell small { grid-column: 1 / -1; color: #8992a0; font-size: 10px; }
.shell .bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 56px; padding: 10px 20px; border-bottom: 1px solid var(--line); color: #667184; font-size: 12px; }
.shell .bulk-bar strong { color: var(--ink); }
.shell .inline-field { display: flex; align-items: center; gap: 8px; }
.shell .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.shell .table-wrap { max-width: 100%; overflow-x: auto; }
.shell th { background: #f7f9fc; color: #657084; font-size: 11px; }
.shell th, .shell td { padding: 11px 14px; }
.shell tbody tr:hover { background: #f4f8fe; }
.shell #dashboard-filter { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; gap: 12px; }
.shell #dashboard-filter .field { width: 100%; }
.shell #dashboard-filter .filter-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.shell #dashboard-results { min-width: 0; }

@media (max-width: 900px) {
  .shell .side { width: 70px; padding: 15px 8px; }
  .shell .side .brand { justify-content: center; padding: 0 0 16px; }
  .shell .brand-title, .shell .nav-label, .shell .side-note, .shell .nav-section, .shell .nav-active-dot { display: none; }
  .shell .nav-button { justify-content: center; padding: 10px; }
  .shell .main { margin-left: 70px; }
  .shell .topbar { padding: 12px 18px; }
  .shell .content { padding: 18px; }
  .shell .work-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell .split-grid { grid-template-columns: 1fr; }
  .shell #dashboard-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shell .warehouse-card .panel-head { align-items: stretch; flex-direction: column; }
  .shell .warehouse-actions { width: 100%; margin-left: 0; }
  .shell .warehouse-actions input { flex: 1 1 auto; width: 0; }
  .shell .import-layout { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .shell { padding-bottom: 62px; }
  .shell .side { inset: auto 0 0; width: 100%; height: 62px; min-height: 62px; padding: 5px 8px; overflow-x: auto; overflow-y: hidden; border-top: 1px solid var(--line); border-right: 0; }
  .shell .side .brand { display: none; }
  .shell .side nav { display: flex; justify-content: start; width: max-content; gap: 4px; margin: 0; }
  .shell .nav-button { width: 52px; min-height: 50px; }
  .shell .main { min-height: calc(100vh - 62px); margin-left: 0; }
  .shell .topbar { position: static; align-items: start; gap: 8px; min-height: 64px; }
  .shell .page-title { font-size: 19px; }
  .shell .identity { gap: 7px; font-size: 11px; }
  .shell .identity .identity-detail { display: none; }
  .shell .identity strong { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .shell .content { padding: 12px; }
  .shell .workbench-head { align-items: start; flex-direction: column; padding: 18px; }
  .shell .work-stats { gap: 8px; margin: 12px 0; }
  .shell .work-stat { min-height: 106px; padding: 13px; }
  .shell .work-stat strong { font-size: 24px; }
  .shell .work-panel .panel-head { gap: 10px; padding: 15px; }
  .shell .metric-grid { gap: 8px; }
  .shell .metric-card { min-height: 96px; padding: 13px; }
  .shell .metric-card strong { font-size: 23px; }
  .shell .stage-grid { grid-template-columns: 1fr; padding: 12px; }
  .shell #dashboard-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell .form-grid { grid-template-columns: 1fr; }
}
