.nav-link.active { background: rgba(32,107,196,.15) !important; border-left: 3px solid #206bc4; font-weight: 600; }
.nav-section-label { padding: .9rem 1rem .3rem; color: rgba(255,255,255,.48); font-size: .68rem; font-weight: 700; }
.bottom-tab-bar { display: none; position: fixed; right: 0; bottom: 0; left: 0; z-index: 1050; padding: 4px 0 env(safe-area-inset-bottom,4px); border-top: 1px solid #e6e8eb; background: #fff; }
.bottom-tab-bar .tab-items { display: flex; align-items: center; justify-content: space-around; }
.bottom-tab-bar .tab-item { display: flex; flex-direction: column; align-items: center; padding: 4px 8px; color: #667; font-size: .7rem; text-decoration: none; }
.bottom-tab-bar .tab-item i { margin-bottom: 2px; font-size: 1.3rem; }
.bottom-tab-bar .tab-item.active { color: #206bc4; font-weight: 600; }
#erp-app { display: grid; gap: 14px; }
.order-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.order-stats article { padding: 13px 15px; border: 1px solid #e2e7ee; border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.order-stats span { display: block; color: #667085; font-size: 11px; }
.order-stats strong { display: block; margin-top: 3px; color: #172b4d; font-size: 24px; font-variant-numeric: tabular-nums; }
.order-controls { padding: 14px; border: 1px solid #dfe5ec; border-radius: 8px; background: #fff; }
.order-filter-grid { display: grid; grid-template-columns: minmax(220px,2fr) repeat(5,minmax(135px,1fr)); gap: 10px; }
.order-controls label > span { display: block; margin-bottom: 4px; color: #667085; font-size: 11px; font-weight: 600; }
.order-sort-control { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.order-sort-control .btn { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.order-tag-filter { position: relative; min-width: 0; }
.order-tag-filter > summary { display: grid; min-height: 38px; padding: 5px 34px 5px 12px; border: 1px solid #d8dce3; border-radius: 4px; background: #fff; cursor: pointer; list-style: none; }
.order-tag-filter > summary::-webkit-details-marker { display: none; }
.order-tag-filter > summary::after { position: absolute; top: 13px; right: 12px; width: 7px; height: 7px; border-right: 1.5px solid #8291a3; border-bottom: 1.5px solid #8291a3; content: ''; transform: rotate(45deg); }
.order-tag-filter[open] > summary::after { top: 16px; transform: rotate(225deg); }
.order-tag-filter > summary span { color: #667085; font-size: 9px; line-height: 1.1; }
.order-tag-filter > summary strong { overflow: hidden; color: #1f2937; font-size: 12px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.order-tag-filter > div { position: absolute; left: 0; z-index: 25; display: grid; gap: 8px; width: min(310px,calc(100vw - 48px)); margin-top: 5px; padding: 12px; border: 1px solid #d9e0e8; border-radius: 7px; background: #fff; box-shadow: 0 12px 34px rgba(15,23,42,.18); }
.order-tag-filter > div > label { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 12px; }
.order-tag-filter > div > label span { margin: 0; color: #344054; font-size: 12px; font-weight: 400; }
.order-tag-filter > div > p { margin: 0; color: #667085; font-size: 11px; }
.order-tag-filter footer { display: flex; gap: 7px; justify-content: flex-end; padding-top: 4px; border-top: 1px solid #edf0f4; }
.order-preset-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px solid #edf0f4; }
.order-truth-note { margin-top: 10px; color: #526174; font-size: 11px; line-height: 1.5; }
.order-truth-note summary { display: inline-flex; gap: 5px; align-items: center; color: #315f8c; cursor: pointer; }
.order-truth-note summary::marker { color: #8aa2ba; }
.order-truth-note p { margin: 7px 0 0; padding: 8px 10px; border-radius: 6px; background: #f4f7fb; }
.order-truth-note i { color: #2f6aa5; }
.order-preset-row > label { min-width: 230px; }
.order-column-picker { position: relative; margin-left: auto; }
.order-column-picker summary { list-style: none; }
.order-column-picker summary::-webkit-details-marker { display: none; }
.order-column-picker > div { position: absolute; right: 0; z-index: 20; display: grid; grid-template-columns: repeat(2,minmax(150px,1fr)); gap: 7px; width: 380px; margin-top: 5px; padding: 12px; border: 1px solid #d9e0e8; border-radius: 7px; background: #fff; box-shadow: 0 12px 34px rgba(15,23,42,.18); }
.order-column-picker label { display: flex; gap: 7px; align-items: center; font-size: 12px; }
.order-results { overflow: hidden; border: 1px solid #dfe5ec; border-radius: 8px; background: #fff; }
.order-results > header, .order-results > footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
.order-results > header { border-bottom: 1px solid #e8ecf1; }
.order-results > header h2 { margin: 0; font-size: 16px; }
.order-results > header p { margin: 3px 0 0; color: #667085; font-size: 11px; }
.order-results > header > strong, .order-results > footer { color: #667085; font-size: 11px; }
.order-results > footer { border-top: 1px solid #e8ecf1; }
.order-results > footer div { display: flex; gap: 6px; }
.order-table-wrap { max-width: 100%; overflow: auto; }
.order-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11px; }
.order-table th { position: sticky; top: 0; z-index: 3; min-width: 120px; padding: 8px 9px; border-bottom: 1px solid #dfe5ec; background: #f5f7fa; color: #475467; font-weight: 650; white-space: nowrap; }
.order-table td { max-width: 300px; padding: 8px 9px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
.order-table tbody tr:last-child td { border-bottom: 0; }
.order-table tbody tr:hover td { background: #f9fbfd; }
.order-table td strong, .order-table td small { display: block; }
.order-table td small { margin-top: 3px; color: #667085; line-height: 1.4; }
.order-col-order { position: sticky; left: 0; z-index: 2; width: 230px; min-width: 230px !important; background: #fff; box-shadow: 2px 0 0 #e2e7ee; }
th.order-col-order { z-index: 5; background: #f5f7fa; }
.order-col-items { width: 360px; min-width: 360px !important; }
.order-long-text { width: 250px; min-width: 250px !important; white-space: normal; }
.order-long-text p { margin: 0 0 6px; line-height: 1.45; }
.order-audit { color: #a33a24; }
.order-group-label, .order-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.order-ids { display: grid; gap: 2px; }
.order-id { color: #1f4d7a; font-size: 10px; font-weight: 650; }
.order-id-copy { display: flex; gap: 5px; align-items: center; width: max-content; max-width: 100%; padding: 2px 4px; border: 0; border-radius: 4px; background: transparent; text-align: left; }
.order-id-copy:hover { background: #edf4fb; }
.order-id-copy span { overflow: hidden; text-overflow: ellipsis; }
.order-id-copy i { font-size: 11px; }
.order-id-copy em { color: #667085; font-size: 9px; font-style: normal; }
.order-id-copy.is-copied { background: #eef9f2; color: #187446; }
.order-badge { display: inline-flex; padding: 2px 6px; border-radius: 999px; background: #edf1f5; color: #475467; font-size: 9px; white-space: nowrap; }
.order-badge.is-merge { background: #e7f0ff; color: #1859a9; }
.order-badge.is-split { background: #eee9ff; color: #6541a5; }
.order-badge.is-shop { background: #f1f3f5; color: #596579; }
.order-badge.is-arranged { background: #dff4e8; color: #18633b; font-weight: 700; }
.order-badge.is-unarranged { background: #fff1d8; color: #8a5500; font-weight: 700; }
.order-badge.is-partial { background: #e8f2ff; color: #225b95; }
.order-badge.is-danger { background: #ffe4e2; color: #a72c20; }
.order-badge.is-closed { background: #f1f1f1; color: #666; }
.order-badge.is-process { background: #e9f0fb; color: #385e8f; }
.order-badge.is-sync { background: #eef4e6; color: #496c20; }
.order-badge.is-taobao { background: #fff0df; color: #98520a; }
.order-badge.is-workflow-unarranged { background: #fff0d0; color: #855100; font-weight: 700; }
.order-badge.is-workflow-arranged { background: #ddf3e7; color: #18633b; font-weight: 700; }
.order-badge.is-workflow-partial { background: #e3efff; color: #205b96; font-weight: 700; }
.order-badge.is-workflow-shipped { background: #e9edf2; color: #4e5b6a; }
.order-badge.is-workflow-closed { background: #f1f1f1; color: #777; }
.order-cell-notes { margin-top: 5px; color: #667085; font-size: 10px; }
.order-number { text-align: right; font-variant-numeric: tabular-nums; }
.order-number strong { color: #172b4d; font-size: 13px; }
.order-mini-dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 6px; margin: 0; }
.order-mini-dl dt { color: #98a2b3; font-weight: 500; }
.order-mini-dl dd { margin: 0; white-space: nowrap; }
.order-date-cell strong { color: #173e67; white-space: nowrap; }
.order-status-lines { display: grid; gap: 5px; }
.order-status-lines > div { display: grid; grid-template-columns: 62px minmax(0,1fr); gap: 6px; align-items: start; }
.order-status-lines > div > span { color: #7b8796; font-size: 10px; }
.order-status-lines > div > strong { display: flex; flex-wrap: wrap; gap: 3px; }
.order-tracking span { display: block; margin-top: 3px; color: #315f8c; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 10px; }
.order-empty { padding: 40px; color: #667085; text-align: center; }
.order-card-list { display: none; }
.order-progress-list { display: grid; gap: 7px; margin: 8px 0; }
.order-item-progress { min-width: 250px; padding: 8px; border: 1px solid #e3e8ef; border-radius: 7px; background: #fbfcfe; }
.order-item-progress.is-out { border-color: #ffc9c3; background: #fff8f7; }
.order-progress-product { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 8px; align-items: start; margin-bottom: 8px; }
.order-progress-product > img, .order-progress-image-empty { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #e1e5ea; border-radius: 6px; background: #f2f4f7; object-fit: cover; }
.order-progress-image-empty { color: #98a2b3; }
.order-progress-product-title { display: flex; gap: 7px; align-items: flex-start; justify-content: space-between; }
.order-progress-product-title > strong { min-width: 0; color: #263b50; font-size: 12px; overflow-wrap: anywhere; }
.order-progress-product-title > span { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; }
.order-progress-product-title b { color: #173e67; font-size: 10px; white-space: nowrap; }
.order-progress-product p { margin: 2px 0 0; color: #475467; font-size: 10px; line-height: 1.35; }
.order-progress-product small { display: block; margin-top: 2px; color: #667085; font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }
.order-item-progress ol { display: flex; margin: 0; padding: 0; list-style: none; }
.order-item-progress li { position: relative; display: grid; flex: 1 1 0; justify-items: center; min-width: 38px; color: #98a2b3; text-align: center; }
.order-item-progress li:not(:last-child)::after { position: absolute; top: 8px; left: calc(50% + 9px); width: calc(100% - 18px); height: 2px; background: #dfe4ea; content: ''; }
.order-progress-dot { z-index: 1; display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid #cfd6df; border-radius: 50%; background: #fff; }
.order-progress-dot i { font-size: 10px; }
.order-item-progress li strong { margin-top: 3px; font-size: 10px; }
.order-item-progress li small { margin-top: 1px; font-size: 8px; white-space: nowrap; }
.order-item-progress li.is-done { color: #1c7045; }
.order-item-progress li.is-done .order-progress-dot { border-color: #35a46c; background: #e4f7ec; }
.order-item-progress li.is-done:has(+ li.is-done)::after { background: #8bd0aa; }
.order-item-progress li.is-next { color: #9a6200; }
.order-item-progress li.is-next .order-progress-dot { border-color: #e2ad4d; background: #fff8e7; }
.order-item-progress li.is-unlinked { color: #8a94a2; }
.order-item-progress.is-direct ol { max-width: 210px; margin-inline: auto; }
.order-item-progress.is-table { min-width: 230px; padding: 6px; }
.order-item-progress.is-table .order-progress-product { grid-template-columns: 36px minmax(0,1fr); }
.order-item-progress.is-table .order-progress-product > img, .order-item-progress.is-table .order-progress-image-empty { width: 36px; height: 36px; }
.order-item-progress.is-table li small { display: none; }
.order-progress-empty { margin: 0; color: #7b8796; font-size: 9px; }
.order-refund-progress { margin: 8px 0; border: 1px dashed #e1b7b1; border-radius: 7px; background: #fffafa; }
.order-refund-progress > summary { padding: 7px 9px; color: #934238; font-size: 10px; cursor: pointer; }
.order-refund-progress > summary i { margin-right: 4px; }
.order-refund-progress > .order-progress-list { margin: 0; padding: 0 8px 8px; }
#order-preset-dialog { width: min(460px,calc(100vw - 24px)); padding: 0; border: 0; border-radius: 9px; box-shadow: 0 22px 70px rgba(15,23,42,.3); }
#order-preset-dialog::backdrop { background: rgba(15,23,42,.46); }
#order-preset-dialog form { display: grid; gap: 13px; padding: 18px; }
#order-preset-dialog h3 { margin: 0; font-size: 17px; }
#order-preset-dialog .form-check { display: flex; gap: 7px; }
#order-preset-dialog footer { display: flex; gap: 8px; justify-content: flex-end; }
#order-preset-dialog [data-error] { color: #b42318; font-size: 12px; }
@media (max-width: 1280px) { .order-filter-grid { grid-template-columns: repeat(3,minmax(150px,1fr)); }.order-search { grid-column: span 2; } }
@media (max-width: 760px) {
  .bottom-tab-bar { display: block; }
  .page-body { padding-bottom: 70px; }
  .order-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .order-filter-grid { grid-template-columns: 1fr 1fr; }
  .order-search { grid-column: 1 / -1; }
  .order-preset-row > label { width: 100%; }
  .order-column-picker { display: none; }
  .order-results > header { align-items: flex-start; gap: 10px; }
  .order-table-wrap { display: none; }
  .order-card-list { display: grid; gap: 10px; padding: 10px; background: #f5f7fa; }
  .order-card { min-width: 0; padding: 12px; border: 1px solid #dfe5ec; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
  .order-card-priority { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 9px; }
  .order-card-priority > div:first-child { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 2px; }
  .order-card-promise { flex: 0 0 auto; text-align: right; }
  .order-card-promise span { display: block; color: #7b8796; font-size: 9px; }
  .order-card-promise strong { display: block; color: #173e67; font-size: 19px; line-height: 1.2; white-space: nowrap; }
  .order-card-identities { display: grid; gap: 5px; margin-bottom: 10px; }
  .order-copy-id { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 6px; align-items: center; width: 100%; padding: 7px 8px; border: 1px solid #dce5ef; border-radius: 7px; background: #f7f9fc; color: #315f8c; text-align: left; }
  .order-copy-id span { color: #7b8796; font-size: 9px; }
  .order-copy-id strong { min-width: 0; overflow: hidden; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .order-copy-id i { font-size: 14px; }
  .order-copy-id em { font-size: 10px; font-style: normal; }
  .order-copy-id.is-copied { border-color: #8bc9a7; background: #eef9f2; color: #187446; }
  .order-card > .order-progress-list { margin: 0 0 10px; }
  .order-card .order-item-progress { padding: 9px; }
  .order-card .order-progress-product { grid-template-columns: 52px minmax(0,1fr); gap: 9px; }
  .order-card .order-progress-product > img, .order-card .order-progress-image-empty { width: 52px; height: 52px; }
  .order-card .order-progress-product-title > strong { font-size: 13px; }
  .order-card .order-progress-product p { font-size: 11px; }
  .order-card .order-progress-product small { font-size: 10px; }
  .order-card details .order-status-lines { margin: 10px 0; padding: 9px; border-radius: 7px; background: #fafbfc; }
  .order-card-memo { margin-bottom: 10px; padding: 9px 10px; border-left: 3px solid #6f9cca; border-radius: 0 6px 6px 0; background: #f5f8fc; }
  .order-card-memo > span { color: #526b84; font-size: 9px; font-weight: 650; }
  .order-card-memo p { margin: 3px 0 0; color: #263b50; font-size: 12px; line-height: 1.45; }
  .order-card-secondary { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 9px; padding: 8px 0; border-top: 1px solid #edf0f4; }
  .order-card-secondary > div:last-child { text-align: right; }
  .order-card-secondary span { display: block; color: #7b8796; font-size: 9px; }
  .order-card-secondary strong { display: block; color: #475467; font-size: 11px; }
  .order-card-secondary .is-warning strong, .order-card-secondary .is-warning small { color: #b42318; }
  .order-card-secondary small { display: block; font-size: 9px; }
  .order-card details { border-top: 1px solid #e7ebf0; }
  .order-card details summary { color: #315f8c; font-size: 11px; cursor: pointer; }
  .order-card details dl { display: grid; grid-template-columns: 70px 1fr; gap: 5px 8px; margin: 9px 0 0; font-size: 11px; }
  .order-card details dt { color: #7b8796; font-weight: 500; }
  .order-card details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
}
