:root {
  color-scheme: light;
  --bg: #eef2f5;
  --bg-strong: #dfe7ee;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --surface-tint: #edf7f4;
  --line: #dde5ec;
  --line-strong: #b9c8d4;
  --text: #22303c;
  --muted: #697888;
  --ink: #101820;
  --accent: #0f766e;
  --accent-strong: #0a5d57;
  --accent-soft: #e8f6f3;
  --blue: #2563eb;
  --green: #12805c;
  --amber: #b56b12;
  --red: #b4232c;
  --radius: 8px;
  --shadow: 0 18px 42px rgba(18, 33, 48, 0.08);
  --shadow-soft: 0 8px 20px rgba(18, 33, 48, 0.06);
}

.wuliu-good-order-lookup { margin: 12px 0; padding: 12px; border: 1px solid #cfdbe2; border-radius: 10px; background: #f7fafb; }
.wuliu-good-order-lookup-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.wuliu-good-order-lookup-head > div { display: grid; gap: 3px; }
.wuliu-good-order-lookup-head small, .wuliu-good-order-status { color: #64748b; }
#wuliu-good-order-lookup-form { display: flex; gap: 8px; align-items: center; }
#wuliu-good-order-barcode { min-width: 260px; min-height: 42px; }
.wuliu-good-order-scanner { margin-top: 10px; display: grid; gap: 8px; }
.wuliu-good-order-scanner video { width: min(100%, 560px); min-height: 220px; max-height: 360px; object-fit: cover; border-radius: 8px; background: #111827; }
.wuliu-good-order-scanner > div { display: flex; align-items: center; gap: 10px; }
.wuliu-good-order-status { margin-top: 8px; min-height: 22px; }
.wuliu-good-order-results { display: grid; gap: 8px; }
.wuliu-good-order-match { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid #dce4e8; border-radius: 8px; background: #fff; }
.wuliu-good-order-match > div { display: grid; gap: 4px; min-width: 0; }
.wuliu-good-order-match > div:last-child { justify-items: end; }
.wuliu-good-order-match b { color: #176345; }
@media (max-width: 720px) {
  .wuliu-good-order-lookup-head { display: grid; align-items: stretch; }
  #wuliu-good-order-lookup-form { display: grid; grid-template-columns: 1fr 1fr; }
  #wuliu-good-order-barcode { grid-column: 1 / -1; min-width: 0; width: 100%; }
  #wuliu-good-order-lookup-form button { min-height: 44px; }
  .wuliu-good-order-match { grid-template-columns: 1fr; }
  .wuliu-good-order-match > div:last-child { grid-template-columns: 1fr auto; align-items: center; justify-items: start; }
}

/* Desktop online-order goods: keep the visible fields within one screen. */
@media (min-width: 769px) {
  body.wuliu-sandbox-view .wuliu-sandbox-table-wrap:has(.wuliu-sandbox-table.is-form-goods) {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods th,
  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods td {
    padding-inline: 6px;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods th:nth-child(1),
  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods td:nth-child(1) {
    width: 48px;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods th:nth-child(2),
  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods td:nth-child(2) {
    width: 18%;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods th:nth-child(3),
  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods td:nth-child(3) {
    width: 30%;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods th:nth-child(5),
  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods td:nth-child(5) {
    width: 86px;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods th:nth-child(6),
  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods td:nth-child(6),
  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods th:nth-child(9),
  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods td:nth-child(9) {
    width: 105px;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods th:nth-child(12),
  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods td:nth-child(12) {
    width: 126px;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table.is-form-goods input {
    width: 100%;
    min-width: 0;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Web console v15: keep the desktop shell stable after app.js changes body view classes. */
@media (min-width: 1024px) {
  body.home-view,
  body.workflow-view,
  body.library-view,
  body.wuliu-library-view,
  body.wuliu-sandbox-view,
  body.wuliu-template-view,
  body.import-view,
  body.order-view,
  body.picking-view,
  body.purchase-view,
  body.purchase-confirm-view,
  body.packing-view,
  body.osaka-view {
    --web-console-canvas: #e9f0f4;
    --web-console-sidebar: #0d1821;
    --web-console-line: #d4e0e7;
    --web-console-primary: #0f766e;
    --web-console-primary-dark: #115e59;
    --web-console-primary-soft: #e5f6f3;
    --web-console-ink: #15212d;
    --web-console-muted: #657689;
    min-width: 0;
    padding-bottom: 0;
    background: var(--web-console-canvas);
  }

  body.home-view .app-shell,
  body.workflow-view .app-shell,
  body.library-view .app-shell,
  body.wuliu-library-view .app-shell,
  body.wuliu-sandbox-view .app-shell,
  body.wuliu-template-view .app-shell,
  body.import-view .app-shell,
  body.order-view .app-shell,
  body.picking-view .app-shell,
  body.purchase-view .app-shell,
  body.purchase-confirm-view .app-shell,
  body.packing-view .app-shell,
  body.osaka-view .app-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    padding: 0;
  }

  body.home-view .main-topbar,
  body.workflow-view .main-topbar,
  body.library-view .main-topbar,
  body.wuliu-library-view .main-topbar,
  body.wuliu-sandbox-view .main-topbar,
  body.wuliu-template-view .main-topbar,
  body.import-view .main-topbar,
  body.order-view .main-topbar,
  body.picking-view .main-topbar,
  body.purchase-view .main-topbar,
  body.purchase-confirm-view .main-topbar,
  body.packing-view .main-topbar,
  body.osaka-view .main-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-column: 1;
    grid-row: 1 / span 80;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    width: 292px;
    min-height: 100vh;
    margin: 0;
    padding: 18px 16px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: var(--web-console-sidebar);
    box-shadow: 12px 0 32px rgba(15, 25, 34, 0.18);
  }

  body.home-view .main-topbar .topbar-main,
  body.workflow-view .main-topbar .topbar-main,
  body.library-view .main-topbar .topbar-main,
  body.wuliu-library-view .main-topbar .topbar-main,
  body.wuliu-sandbox-view .main-topbar .topbar-main,
  body.wuliu-template-view .main-topbar .topbar-main,
  body.import-view .main-topbar .topbar-main,
  body.order-view .main-topbar .topbar-main,
  body.picking-view .main-topbar .topbar-main,
  body.purchase-view .main-topbar .topbar-main,
  body.purchase-confirm-view .main-topbar .topbar-main,
  body.packing-view .main-topbar .topbar-main,
  body.osaka-view .main-topbar .topbar-main {
    display: grid;
    align-items: start;
    gap: 18px;
    min-width: 0;
  }

  body.home-view .main-topbar .brand-block,
  body.workflow-view .main-topbar .brand-block,
  body.library-view .main-topbar .brand-block,
  body.wuliu-library-view .main-topbar .brand-block,
  body.wuliu-sandbox-view .main-topbar .brand-block,
  body.wuliu-template-view .main-topbar .brand-block,
  body.import-view .main-topbar .brand-block,
  body.order-view .main-topbar .brand-block,
  body.picking-view .main-topbar .brand-block,
  body.purchase-view .main-topbar .brand-block,
  body.purchase-confirm-view .main-topbar .brand-block,
  body.packing-view .main-topbar .brand-block,
  body.osaka-view .main-topbar .brand-block {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  body.home-view .main-topbar .brand-mark,
  body.workflow-view .main-topbar .brand-mark,
  body.library-view .main-topbar .brand-mark,
  body.wuliu-library-view .main-topbar .brand-mark,
  body.wuliu-sandbox-view .main-topbar .brand-mark,
  body.wuliu-template-view .main-topbar .brand-mark,
  body.import-view .main-topbar .brand-mark,
  body.order-view .main-topbar .brand-mark,
  body.picking-view .main-topbar .brand-mark,
  body.purchase-view .main-topbar .brand-mark,
  body.purchase-confirm-view .main-topbar .brand-mark,
  body.packing-view .main-topbar .brand-mark,
  body.osaka-view .main-topbar .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(180deg, #12a998, #08766d);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(10, 143, 130, 0.28);
  }

  body.home-view .main-topbar h1,
  body.workflow-view .main-topbar h1,
  body.library-view .main-topbar h1,
  body.wuliu-library-view .main-topbar h1,
  body.wuliu-sandbox-view .main-topbar h1,
  body.wuliu-template-view .main-topbar h1,
  body.import-view .main-topbar h1,
  body.order-view .main-topbar h1,
  body.picking-view .main-topbar h1,
  body.purchase-view .main-topbar h1,
  body.purchase-confirm-view .main-topbar h1,
  body.packing-view .main-topbar h1,
  body.osaka-view .main-topbar h1 {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.15;
  }

  body.home-view .main-topbar .brand-block p,
  body.workflow-view .main-topbar .brand-block p,
  body.library-view .main-topbar .brand-block p,
  body.wuliu-library-view .main-topbar .brand-block p,
  body.wuliu-sandbox-view .main-topbar .brand-block p,
  body.wuliu-template-view .main-topbar .brand-block p,
  body.import-view .main-topbar .brand-block p,
  body.order-view .main-topbar .brand-block p,
  body.picking-view .main-topbar .brand-block p,
  body.purchase-view .main-topbar .brand-block p,
  body.purchase-confirm-view .main-topbar .brand-block p,
  body.packing-view .main-topbar .brand-block p,
  body.osaka-view .main-topbar .brand-block p {
    margin-top: 6px;
    color: #91a2b1;
    line-height: 1.35;
  }

  body.home-view .main-topbar .top-actions,
  body.workflow-view .main-topbar .top-actions,
  body.library-view .main-topbar .top-actions,
  body.wuliu-library-view .main-topbar .top-actions,
  body.wuliu-sandbox-view .main-topbar .top-actions,
  body.wuliu-template-view .main-topbar .top-actions,
  body.import-view .main-topbar .top-actions,
  body.order-view .main-topbar .top-actions,
  body.picking-view .main-topbar .top-actions,
  body.purchase-view .main-topbar .top-actions,
  body.purchase-confirm-view .main-topbar .top-actions,
  body.packing-view .main-topbar .top-actions,
  body.osaka-view .main-topbar .top-actions {
    display: grid;
    justify-content: stretch;
    gap: 8px;
    width: 100%;
    padding: 12px 0 2px;
    overflow: visible;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
  }

  body.home-view .main-topbar .top-actions form,
  body.workflow-view .main-topbar .top-actions form,
  body.library-view .main-topbar .top-actions form,
  body.wuliu-library-view .main-topbar .top-actions form,
  body.wuliu-sandbox-view .main-topbar .top-actions form,
  body.wuliu-template-view .main-topbar .top-actions form,
  body.import-view .main-topbar .top-actions form,
  body.order-view .main-topbar .top-actions form,
  body.picking-view .main-topbar .top-actions form,
  body.purchase-view .main-topbar .top-actions form,
  body.purchase-confirm-view .main-topbar .top-actions form,
  body.packing-view .main-topbar .top-actions form,
  body.osaka-view .main-topbar .top-actions form {
    width: 100%;
    margin: 0;
  }

  body.home-view .main-topbar .server-pill,
  body.workflow-view .main-topbar .server-pill,
  body.library-view .main-topbar .server-pill,
  body.wuliu-library-view .main-topbar .server-pill,
  body.wuliu-sandbox-view .main-topbar .server-pill,
  body.wuliu-template-view .main-topbar .server-pill,
  body.import-view .main-topbar .server-pill,
  body.order-view .main-topbar .server-pill,
  body.picking-view .main-topbar .server-pill,
  body.purchase-view .main-topbar .server-pill,
  body.purchase-confirm-view .main-topbar .server-pill,
  body.packing-view .main-topbar .server-pill,
  body.osaka-view .main-topbar .server-pill,
  body.home-view .main-topbar .user-pill,
  body.workflow-view .main-topbar .user-pill,
  body.library-view .main-topbar .user-pill,
  body.wuliu-library-view .main-topbar .user-pill,
  body.wuliu-sandbox-view .main-topbar .user-pill,
  body.wuliu-template-view .main-topbar .user-pill,
  body.import-view .main-topbar .user-pill,
  body.order-view .main-topbar .user-pill,
  body.picking-view .main-topbar .user-pill,
  body.purchase-view .main-topbar .user-pill,
  body.purchase-confirm-view .main-topbar .user-pill,
  body.packing-view .main-topbar .user-pill,
  body.osaka-view .main-topbar .user-pill,
  body.home-view .main-topbar .plain-link,
  body.workflow-view .main-topbar .plain-link,
  body.library-view .main-topbar .plain-link,
  body.wuliu-library-view .main-topbar .plain-link,
  body.wuliu-sandbox-view .main-topbar .plain-link,
  body.wuliu-template-view .main-topbar .plain-link,
  body.import-view .main-topbar .plain-link,
  body.order-view .main-topbar .plain-link,
  body.picking-view .main-topbar .plain-link,
  body.purchase-view .main-topbar .plain-link,
  body.purchase-confirm-view .main-topbar .plain-link,
  body.packing-view .main-topbar .plain-link,
  body.osaka-view .main-topbar .plain-link,
  body.home-view .main-topbar .top-actions button,
  body.workflow-view .main-topbar .top-actions button,
  body.library-view .main-topbar .top-actions button,
  body.wuliu-library-view .main-topbar .top-actions button,
  body.wuliu-sandbox-view .main-topbar .top-actions button,
  body.wuliu-template-view .main-topbar .top-actions button,
  body.import-view .main-topbar .top-actions button,
  body.order-view .main-topbar .top-actions button,
  body.picking-view .main-topbar .top-actions button,
  body.purchase-view .main-topbar .top-actions button,
  body.purchase-confirm-view .main-topbar .top-actions button,
  body.packing-view .main-topbar .top-actions button,
  body.osaka-view .main-topbar .top-actions button {
    justify-content: flex-start;
    width: 100%;
    min-height: 34px;
    margin: 0;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    color: #d7e1e8;
    font-size: 13px;
    font-weight: 850;
  }

  body.home-view .main-topbar .quick-nav,
  body.workflow-view .main-topbar .quick-nav,
  body.library-view .main-topbar .quick-nav,
  body.wuliu-library-view .main-topbar .quick-nav,
  body.wuliu-sandbox-view .main-topbar .quick-nav,
  body.wuliu-template-view .main-topbar .quick-nav,
  body.import-view .main-topbar .quick-nav,
  body.order-view .main-topbar .quick-nav,
  body.picking-view .main-topbar .quick-nav,
  body.purchase-view .main-topbar .quick-nav,
  body.purchase-confirm-view .main-topbar .quick-nav,
  body.packing-view .main-topbar .quick-nav,
  body.osaka-view .main-topbar .quick-nav {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column !important;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 0;
    margin-top: 20px;
    padding: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
  }

  body.home-view .main-topbar .quick-nav a,
  body.workflow-view .main-topbar .quick-nav a,
  body.library-view .main-topbar .quick-nav a,
  body.wuliu-library-view .main-topbar .quick-nav a,
  body.wuliu-sandbox-view .main-topbar .quick-nav a,
  body.wuliu-template-view .main-topbar .quick-nav a,
  body.import-view .main-topbar .quick-nav a,
  body.order-view .main-topbar .quick-nav a,
  body.picking-view .main-topbar .quick-nav a,
  body.purchase-view .main-topbar .quick-nav a,
  body.purchase-confirm-view .main-topbar .quick-nav a,
  body.packing-view .main-topbar .quick-nav a,
  body.osaka-view .main-topbar .quick-nav a {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #b9c7d2;
    font-size: 14px;
    font-weight: 850;
  }

  body.home-view .main-topbar .quick-nav a:hover,
  body.workflow-view .main-topbar .quick-nav a:hover,
  body.library-view .main-topbar .quick-nav a:hover,
  body.wuliu-library-view .main-topbar .quick-nav a:hover,
  body.wuliu-sandbox-view .main-topbar .quick-nav a:hover,
  body.wuliu-template-view .main-topbar .quick-nav a:hover,
  body.import-view .main-topbar .quick-nav a:hover,
  body.order-view .main-topbar .quick-nav a:hover,
  body.picking-view .main-topbar .quick-nav a:hover,
  body.purchase-view .main-topbar .quick-nav a:hover,
  body.purchase-confirm-view .main-topbar .quick-nav a:hover,
  body.packing-view .main-topbar .quick-nav a:hover,
  body.osaka-view .main-topbar .quick-nav a:hover,
  body.home-view .main-topbar .quick-nav a.is-active,
  body.workflow-view .main-topbar .quick-nav a.is-active,
  body.library-view .main-topbar .quick-nav a.is-active,
  body.wuliu-library-view .main-topbar .quick-nav a.is-active,
  body.wuliu-sandbox-view .main-topbar .quick-nav a.is-active,
  body.wuliu-template-view .main-topbar .quick-nav a.is-active,
  body.import-view .main-topbar .quick-nav a.is-active,
  body.order-view .main-topbar .quick-nav a.is-active,
  body.picking-view .main-topbar .quick-nav a.is-active,
  body.purchase-view .main-topbar .quick-nav a.is-active,
  body.purchase-confirm-view .main-topbar .quick-nav a.is-active,
  body.packing-view .main-topbar .quick-nav a.is-active,
  body.osaka-view .main-topbar .quick-nav a.is-active {
    border-color: rgba(45, 212, 191, 0.34);
    background: var(--web-console-primary);
    color: #ffffff;
    box-shadow: none;
  }

  body.home-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.workflow-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.library-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.wuliu-library-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.wuliu-sandbox-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.wuliu-template-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.import-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.order-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.picking-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.purchase-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.purchase-confirm-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.packing-view .main-topbar .quick-nav a.nav-action-link:not(.is-active),
  body.osaka-view .main-topbar .quick-nav a.nav-action-link:not(.is-active) {
    border-color: rgba(45, 212, 191, 0.18);
    background: rgba(10, 143, 130, 0.13);
    color: #b6f3eb;
  }

  body.home-view .app-shell > section,
  body.workflow-view .app-shell > section,
  body.library-view .app-shell > section,
  body.wuliu-library-view .app-shell > section,
  body.wuliu-sandbox-view .app-shell > section,
  body.wuliu-template-view .app-shell > section,
  body.import-view .app-shell > section,
  body.order-view .app-shell > section,
  body.picking-view .app-shell > section,
  body.purchase-view .app-shell > section,
  body.purchase-confirm-view .app-shell > section,
  body.packing-view .app-shell > section,
  body.osaka-view .app-shell > section,
  body.home-view .app-shell > .workspace,
  body.workflow-view .app-shell > .workspace,
  body.library-view .app-shell > .workspace,
  body.wuliu-library-view .app-shell > .workspace,
  body.wuliu-sandbox-view .app-shell > .workspace,
  body.wuliu-template-view .app-shell > .workspace,
  body.import-view .app-shell > .workspace,
  body.order-view .app-shell > .workspace,
  body.picking-view .app-shell > .workspace,
  body.purchase-view .app-shell > .workspace,
  body.purchase-confirm-view .app-shell > .workspace,
  body.packing-view .app-shell > .workspace,
  body.osaka-view .app-shell > .workspace,
  body.home-view .app-shell > .split-results,
  body.workflow-view .app-shell > .split-results,
  body.library-view .app-shell > .split-results,
  body.wuliu-library-view .app-shell > .split-results,
  body.wuliu-sandbox-view .app-shell > .split-results,
  body.wuliu-template-view .app-shell > .split-results,
  body.import-view .app-shell > .split-results,
  body.order-view .app-shell > .split-results,
  body.picking-view .app-shell > .split-results,
  body.purchase-view .app-shell > .split-results,
  body.purchase-confirm-view .app-shell > .split-results,
  body.packing-view .app-shell > .split-results,
  body.osaka-view .app-shell > .split-results {
    grid-column: 2;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 18px 22px 22px;
  }

  body.home-view .mobile-bottom-nav,
  body.workflow-view .mobile-bottom-nav,
  body.library-view .mobile-bottom-nav,
  body.wuliu-library-view .mobile-bottom-nav,
  body.wuliu-sandbox-view .mobile-bottom-nav,
  body.wuliu-template-view .mobile-bottom-nav,
  body.import-view .mobile-bottom-nav,
  body.order-view .mobile-bottom-nav,
  body.picking-view .mobile-bottom-nav,
  body.purchase-view .mobile-bottom-nav,
  body.purchase-confirm-view .mobile-bottom-nav,
  body.packing-view .mobile-bottom-nav,
  body.osaka-view .mobile-bottom-nav {
    display: none !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(10, 93, 87, 0.08) 0, transparent 260px),
    linear-gradient(180deg, #f8fafb 0, var(--bg) 520px, #e9eef3 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

form {
  margin: 0;
}

button,
.plain-link,
.download-button,
.overview-actions a,
.home-nav-card {
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 650;
}

button:hover {
  border-color: #94a8b8;
  background: var(--surface-soft);
}

button[type="submit"],
.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

button[type="submit"]:hover,
.primary-button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.topbar form button[type="submit"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.topbar form button[type="submit"]:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

button:active,
.download-button:active,
.plain-link:active,
.overview-actions a:active,
.home-nav-card:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.drop-zone:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.app-shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(185, 200, 212, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: #f7ecdd;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.2);
}

.topbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: 0;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.quick-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafb;
}

.quick-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.quick-nav a:hover {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(18, 33, 48, 0.05);
}

.quick-nav a.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(18, 33, 48, 0.05);
}

.quick-nav a.nav-action-link {
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.quick-nav a.nav-action-link:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(15, 118, 110, 0.16);
}

.server-pill,
.user-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 750;
}

.server-pill {
  border: 1px solid #b5ddd5;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.server-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 128, 92, 0.12);
}

.user-pill {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.plain-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.plain-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.home-nav-panel {
  min-height: calc(100vh - 126px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.home-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.home-title-row h2 {
  margin: 16px 0 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.16;
  letter-spacing: 0;
}

.home-title-row p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-nav-card {
  display: flex;
  flex-direction: column;
  min-height: 178px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.home-nav-card:hover {
  transform: translateY(-2px);
  border-color: #9fd1c8;
  background: linear-gradient(180deg, #ffffff, #f1fbf8);
  box-shadow: 0 18px 38px rgba(18, 33, 48, 0.1);
}

.home-nav-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.home-nav-card strong {
  display: block;
  margin-top: 16px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.18;
}

.home-nav-card small {
  display: block;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.home-card-guide {
  display: none;
}

.module-guide-panel {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.module-guide-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.module-guide-head h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.module-guide-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.module-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.module-guide-item {
  scroll-margin-top: 96px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.module-guide-item:target {
  border-color: rgba(15, 118, 110, 0.66);
  background: linear-gradient(180deg, #ffffff, #f2fbf8);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.12);
}

.module-guide-item span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.module-guide-item h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.24;
}

.module-guide-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.52;
}

.module-guide-item dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.module-guide-item dl div {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.module-guide-item dt,
.module-guide-item dd {
  margin: 0;
  line-height: 1.45;
}

.module-guide-item dt {
  color: var(--accent-strong);
  font-weight: 850;
}

.module-guide-item dd {
  color: var(--muted);
}

.module-guide-action,
.module-guide-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.32);
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 850;
  text-decoration: none;
}

.module-guide-action {
  justify-self: start;
}

.module-guide-action:hover,
.module-guide-back:hover {
  border-color: var(--accent);
  background: #dff5f1;
}

body.library-view #home-section,
body.workflow-view #home-section,
body.wuliu-library-view #home-section,
body.blocked-shipping-view #home-section,
body.tracking-management-view #home-section,
body.wuliu-sandbox-view #home-section,
body.wuliu-template-view #home-section,
body.import-view #home-section,
body.order-view #home-section,
body.picking-view #home-section,
body.purchase-view #home-section,
body.purchase-confirm-view #home-section,
body.packing-view #home-section,
body.osaka-view #home-section {
  display: none;
}

body.home-view .app-view,
body.workflow-view .app-view,
body.library-view .app-view,
body.wuliu-library-view .app-view,
body.blocked-shipping-view .app-view,
body.tracking-management-view .app-view,
body.wuliu-sandbox-view .app-view,
body.wuliu-template-view .app-view,
body.import-view .app-view,
body.order-view .app-view,
body.picking-view .app-view,
body.purchase-view .app-view,
body.purchase-confirm-view .app-view,
body.packing-view .app-view,
body.osaka-view .app-view {
  display: none;
}

body.library-view #library-section,
body.workflow-view #workflow-section,
body.purchase-confirm-view #purchase-confirm-section,
body.wuliu-library-view #wuliu-library-section,
body.blocked-shipping-view #blocked-shipping-section,
body.tracking-management-view #tracking-management-section,
body.wuliu-sandbox-view #wuliu-sandbox-section,
body.wuliu-template-view #wuliu-template-section,
body.packing-view #packing-trial-section,
body.osaka-view #osaka-stock-section {
  display: block;
}

body.import-view #import-section {
  display: grid;
}

.tracking-management-panel {
  display: none;
  gap: 18px;
}

body.tracking-management-view #tracking-management-section {
  display: grid;
}

.tracking-management-panel .section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.tracking-management-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(620px, 1.45fr);
  gap: 18px;
  align-items: start;
}

.tracking-management-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.tracking-management-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tracking-management-card-head h3 {
  margin: 4px 0 0;
}

.tracking-management-form {
  display: grid;
  gap: 14px;
}

.tracking-management-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.tracking-management-file-zone {
  padding: 18px;
  border: 1px dashed #8ccbc3;
  border-radius: 10px;
  background: #f6fbfa;
}

.tracking-management-file-copy {
  color: #0f766e;
  font-size: 15px;
}

.tracking-management-form label small {
  color: var(--muted);
  font-weight: 500;
}

.tracking-management-result {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--muted);
}

.tracking-management-result strong {
  color: #087f5b;
}

.tracking-management-result .is-error {
  color: #c92a2a;
}

.tracking-management-result details {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff4e6;
}

.tracking-management-result details p {
  margin: 7px 0 0;
}

.tracking-management-shop-list,
.tracking-management-history-list {
  display: grid;
  gap: 10px;
}

.tracking-management-recent {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.tracking-management-recent .tracking-management-card-head {
  margin-bottom: 10px;
}

.tracking-management-recent .tracking-management-history-row {
  padding: 11px 12px;
}

.tracking-management-recent .tracking-management-history-counts {
  justify-content: flex-start;
}

.tracking-management-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.tracking-management-tabs button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: #52606d;
  box-shadow: none;
}

.tracking-management-tabs button:last-child {
  border-right: 0;
}

.tracking-management-tabs button.is-active {
  background: #0f766e;
  color: #fff;
}

.tracking-management-tab-panel.is-hidden {
  display: none;
}

.tracking-management-tab-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.tracking-management-download-card #tracking-management-shops {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tracking-management-download-card #tracking-management-shops .tracking-management-shop-row.is-unknown-shop {
  grid-column: 1 / -1;
}

.tracking-management-source-note {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tracking-management-download-card #tracking-management-split-shops {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tracking-management-history-group {
  overflow: hidden;
  border: 1px solid #dce5e8;
  border-radius: 10px;
  background: #f8fafc;
}

.tracking-management-history-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.tracking-management-history-group summary::-webkit-details-marker {
  display: none;
}

.tracking-management-history-group summary > span:first-child {
  display: grid;
  gap: 4px;
}

.tracking-management-history-group summary small,
.tracking-management-history-group summary > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.tracking-management-history-batches {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.tracking-management-history-group .tracking-management-history-row {
  background: #fff;
}

.tracking-management-shop-row,
.tracking-management-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #f8fafc;
}

.tracking-management-download-card .tracking-management-shop-row {
  min-height: 78px;
  padding: 12px;
}

.tracking-management-download-card .tracking-management-shop-row .download-button {
  flex: 0 0 auto;
}

.tracking-management-download-card #tracking-management-download-history-list {
  max-height: 560px;
  overflow: auto;
  padding-right: 2px;
}

.tracking-management-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.tracking-management-pagination.is-hidden {
  display: none;
}

.tracking-management-pagination-actions,
.tracking-management-pagination-actions label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracking-management-pagination-actions select {
  width: auto;
  min-width: 76px;
}

.tracking-management-pagination-actions button {
  min-width: 36px;
  min-height: 36px;
  padding: 4px 10px;
}

.tracking-management-pagination-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.tracking-management-shop-row > div,
.tracking-management-history-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tracking-management-shop-row small,
.tracking-management-history-row small {
  color: var(--muted);
}

.tracking-management-history-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.tracking-management-history-counts span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e9ecef;
  color: #495057;
  font-size: 12px;
  font-weight: 700;
}

.tracking-management-history-counts .is-success {
  background: #d3f9d8;
  color: #087f5b;
}

.tracking-management-history-counts .download-button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.tracking-management-shop-row .download-button.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

@media (max-width: 980px) {
  .tracking-management-grid {
    grid-template-columns: 1fr;
  }

  .tracking-management-card {
    padding: 15px;
  }

  .tracking-management-download-card #tracking-management-shops,
  .tracking-management-download-card #tracking-management-split-shops {
    grid-template-columns: 1fr;
  }

  .tracking-management-shop-row,
  .tracking-management-history-row {
    align-items: stretch;
    flex-direction: column;
  }

  .tracking-management-shop-row .download-button {
    justify-content: center;
  }

  .tracking-management-history-counts {
    justify-content: flex-start;
  }

  .tracking-management-history-group summary {
    align-items: flex-start;
  }

  .tracking-management-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

body.import-view #import-result-section {
  display: block;
}

body.order-view #order-section {
  display: grid;
}

body.order-view #result-section {
  display: none;
}

body.picking-view #result-section,
body.purchase-view #result-section {
  display: grid;
}

body.picking-view #purchase-section,
body.purchase-view #picking-section {
  display: none;
}

.overview-panel {
  display: grid;
  grid-template-columns: minmax(360px, 0.86fr) minmax(520px, 1.14fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.overview-copy {
  min-height: 220px;
  padding: 26px;
  border: 1px solid rgba(16, 24, 32, 0.88);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(15, 118, 110, 0.22), transparent 42%),
    #101820;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #bfe4dd;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.overview-copy h2 {
  max-width: 620px;
  margin: 17px 0 0;
  color: #ffffff;
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: 0;
}

.overview-copy p {
  max-width: 640px;
  margin: 12px 0 0;
  color: #c7d2dc;
  font-size: 15px;
  line-height: 1.7;
}

.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.overview-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #ffffff;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.overview-actions a:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.overview-actions a.secondary {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ops-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ops-card,
.metric {
  background: var(--surface);
}

.ops-card {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ops-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 30px rgba(18, 33, 48, 0.08);
}

.ops-card label,
.metric label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.ops-card strong,
.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}

.ops-card span,
.metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ops-card.good,
.metric.good {
  border-color: #b5ddd5;
  background: linear-gradient(180deg, #ffffff, #f2fbf8);
}

.ops-card.warn {
  border-color: #f0d2a8;
  background: linear-gradient(180deg, #ffffff, #fff8ed);
}

.workflow-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow-soft);
}

.workflow-step {
  position: relative;
  min-height: 92px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.88);
}

.workflow-step::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.26;
}

.workflow-step:hover {
  background: #ffffff;
}

.workflow-step span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.workflow-step strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 16px;
}

.workflow-step small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workspace,
.order-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(440px, 1.22fr);
  gap: 16px;
}

.order-workspace {
  margin-top: 16px;
}

.library-panel,
.upload-panel,
.queue-panel,
.result-panel,
.account-panel,
.login-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

#library-section,
#purchase-confirm-section,
#wuliu-library-section,
#wuliu-sandbox-section,
#wuliu-template-section,
#import-section,
#order-section,
#picking-section,
#purchase-section,
#packing-trial-section,
#osaka-stock-section {
  scroll-margin-top: 96px;
}

.library-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.section-head h2,
.panel-title-row h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-head span,
.panel-title-row span,
.upload-hint {
  color: var(--muted);
  font-size: 13px;
}

.section-status-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.section-actions,
.library-actions,
.daily-purchase-actions,
.job-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.library-head {
  align-items: center;
}

select,
.daily-purchase-actions input,
.library-toolbar input,
.login-panel input,
.account-panel input,
.account-panel select,
.account-panel textarea,
.account-row input,
.account-row select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

select {
  min-width: 170px;
  padding: 0 32px 0 10px;
}

.library-toolbar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.library-toolbar input {
  width: min(560px, 100%);
  padding: 0 12px;
}

.library-search-toolbar {
  display: grid;
  grid-template-columns: auto minmax(240px, 560px) 1fr;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.library-search-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.library-search-field {
  position: relative;
  min-width: 0;
}

.library-search-field .library-search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-52%);
}

.library-search-field #library-search {
  width: 100%;
  min-height: 42px;
  padding: 0 38px;
  border-color: #9fc7c1;
  background: #ffffff;
}

.library-search-field #library-search:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 128, 118, 0.14);
}

.library-search-hint {
  color: var(--muted);
  font-size: 12px;
}

.upload-panel {
  padding: 18px;
}

.upload-panel.is-disabled {
  opacity: 0.64;
}

.upload-panel.is-disabled .drop-zone {
  cursor: not-allowed;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 32px;
  margin-bottom: 14px;
}

.import-upload-panel,
.order-upload-panel {
  --upload-accent: var(--accent);
  --upload-accent-strong: var(--accent-strong);
  --upload-accent-soft: var(--accent-soft);
  --upload-accent-border: #b8ddd7;
  --upload-accent-shadow: rgba(15, 118, 110, 0.16);
  border-top: 3px solid var(--upload-accent);
}

.order-upload-panel {
  --upload-accent: #2563eb;
  --upload-accent-strong: #1d4ed8;
  --upload-accent-soft: #eff6ff;
  --upload-accent-border: #b9ccff;
  --upload-accent-shadow: rgba(37, 99, 235, 0.16);
}

.import-upload-panel .panel-title-row h2,
.order-upload-panel .panel-title-row h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.import-upload-panel .panel-title-row h2::before,
.order-upload-panel .panel-title-row h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--upload-accent);
  box-shadow: 0 0 0 4px var(--upload-accent-soft);
}

.import-rule-note {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px 12px;
  margin: -2px 0 14px;
  padding: 12px;
  border: 1px solid var(--upload-accent-border);
  border-left: 4px solid var(--upload-accent);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--upload-accent-soft), #ffffff);
}

.import-rule-note strong {
  color: var(--ink);
  font-size: 13px;
}

.import-rule-note span,
.import-rule-note a {
  font-size: 13px;
  line-height: 1.45;
}

.import-rule-note span {
  color: var(--muted);
}

.import-rule-note a {
  color: var(--upload-accent-strong);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.import-rule-note a:hover {
  text-decoration: underline;
}

.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 268px;
  overflow: hidden;
  border: 1px dashed #9fb2c1;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 249, 251, 0.95)),
    var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.drop-zone::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 6px;
}

.drop-zone:hover {
  border-color: var(--upload-accent, var(--accent));
  box-shadow: inset 0 0 0 1px var(--upload-accent-shadow, rgba(15, 118, 110, 0.08)), 0 10px 22px rgba(18, 33, 48, 0.05);
}

.drop-zone.is-dragging {
  border-color: var(--upload-accent, var(--accent));
  background: var(--upload-accent-soft, #eefaf7);
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop-zone strong {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.drop-zone span {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 14px;
}

.drop-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #213043;
  color: #ffffff;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: 0 16px 32px rgba(33, 48, 67, 0.18);
}

.order-mark {
  background: var(--upload-accent, var(--accent));
  box-shadow: 0 16px 32px var(--upload-accent-shadow, rgba(15, 118, 110, 0.18));
}

.import-upload-panel .drop-zone {
  border-color: #9bd3c9;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(240, 250, 247, 0.96)),
    var(--upload-accent-soft);
}

.import-upload-panel .drop-mark {
  background: #0d5f59;
  box-shadow: 0 16px 32px rgba(13, 95, 89, 0.18);
}

.order-upload-panel .drop-zone {
  border-color: #aabff4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(241, 246, 255, 0.96)),
    var(--upload-accent-soft);
}

.import-upload-panel button[type="submit"],
.order-upload-panel button[type="submit"] {
  border-color: var(--upload-accent);
  background: var(--upload-accent);
  color: #ffffff;
  box-shadow: 0 8px 18px var(--upload-accent-shadow);
}

.import-upload-panel button[type="submit"]:hover,
.order-upload-panel button[type="submit"]:hover {
  border-color: var(--upload-accent-strong);
  background: var(--upload-accent-strong);
}

.upload-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.pinmail-upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #c7d7f8;
  border-left: 4px solid #7c3aed;
  border-radius: 10px;
  background: linear-gradient(90deg, #f5f3ff, #ffffff);
}

.pinmail-upload-copy {
  display: grid;
  gap: 4px;
}

.pinmail-upload-copy strong {
  color: #4c1d95;
  font-size: 16px;
}

.pinmail-upload-copy span,
.pinmail-selected-files {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.pinmail-upload-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pinmail-file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid #a78bfa;
  border-radius: 8px;
  background: #ffffff;
  color: #5b21b6;
  cursor: pointer;
  font-weight: 750;
}

.pinmail-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pinmail-upload-panel #pinmail-upload-button {
  min-height: 40px;
  border-color: #7c3aed;
  background: #7c3aed;
  color: #ffffff;
  box-shadow: none;
}

.pinmail-upload-panel #pinmail-upload-button:hover {
  border-color: #6d28d9;
  background: #6d28d9;
}

.pinmail-selected-files,
.pinmail-upload-panel .upload-status {
  grid-column: 1 / -1;
}

.pinmail-upload-panel .upload-status:empty {
  display: none;
}

@media (max-width: 720px) {
  .pinmail-upload-panel {
    grid-template-columns: 1fr;
  }

  .pinmail-upload-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pinmail-selected-files,
  .pinmail-upload-panel .upload-status {
    grid-column: 1;
  }
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  color: var(--muted);
  font-weight: 650;
}

.switch input {
  width: 18px;
  height: 18px;
}

.selected-files {
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
  word-break: break-word;
}

.selected-files.has-file-check {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.selected-files.has-error {
  border-color: #f3b5bc;
  background: #fff7f8;
}

.selected-files.has-warning {
  border-color: #f1cf8a;
  background: #fffaf0;
}

.selected-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 4px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.selected-file-row strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.selected-file-row span {
  align-self: start;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.selected-file-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.selected-file-row.is-warning span {
  color: #9a6500;
}

.selected-file-row.is-error span,
.selected-file-row.is-error small {
  color: var(--red);
}

.upload-status {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.upload-status.is-visible {
  display: block;
}

.upload-status.is-error {
  border-color: #f3b5bc;
  background: #fff1f3;
  color: var(--red);
}

.upload-status.is-success {
  border-color: #b5ddd5;
  background: var(--accent-soft);
  color: var(--green);
}

.queue-panel {
  min-height: 360px;
  overflow: hidden;
}

.jobs-list,
.products-list,
.order-list {
  scrollbar-width: thin;
  scrollbar-color: #aebdca transparent;
}

.jobs-list {
  max-height: 302px;
  overflow: auto;
}

#order-jobs-list {
  max-height: none;
  overflow: visible;
}

.order-status-frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 225, 233, 0.95);
  border-left-width: 5px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.08);
}

.order-status-frame.is-done {
  border-left-color: var(--accent);
}

.order-status-frame.is-processing {
  border-left-color: #d97706;
}

.order-status-frame.is-warning {
  border-left-color: #d97706;
}

.order-status-frame.is-failed {
  border-left-color: var(--red);
}

.order-status-dot {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.order-status-dot::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: var(--accent);
}

.order-status-frame.is-processing .order-status-dot {
  background: #fef3c7;
}

.order-status-frame.is-warning .order-status-dot {
  background: #fef3c7;
}

.order-status-frame.is-processing .order-status-dot::after {
  background: #d97706;
}

.order-status-frame.is-warning .order-status-dot::after {
  background: #d97706;
}

.order-status-frame.is-failed .order-status-dot {
  background: #fee2e2;
}

.order-status-frame.is-failed .order-status-dot::after {
  background: var(--red);
}

.order-status-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-status-copy strong,
.order-status-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-status-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.order-status-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.order-status-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.order-status-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.order-status-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.order-status-button.is-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.order-status-button.is-primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.order-status-frame.is-failed .order-status-button {
  border-color: #fecaca;
  color: var(--red);
}

.order-status-frame.is-processing .order-status-button {
  border-color: #fbbf24;
  color: #92400e;
}

.order-status-frame.is-warning .order-status-button {
  border-color: #fbbf24;
  color: #92400e;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  .order-status-frame {
    grid-template-columns: auto minmax(0, 1fr);
    margin: 10px;
    padding: 12px;
  }

  .order-status-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    width: 100%;
  }

  .order-status-button {
    min-height: 40px;
  }

  .order-status-copy strong,
  .order-status-copy span {
    white-space: normal;
  }
}

.job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.14s ease;
}

.job-row:hover,
.job-row.active {
  background: #f6faf9;
}

.job-row.is-busy {
  background: #f9fbfb;
}

.job-row.is-busy .danger-button {
  cursor: wait;
  opacity: 0.72;
}

.job-row.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.job-title {
  min-width: 0;
  color: var(--ink);
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.order-task-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 12px 16px 4px;
}

.order-task-tabs > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.order-task-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: #526578;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.order-task-tab.is-active {
  border-color: #b7e4ce;
  background: #e9f7ef;
  color: var(--green);
}

.order-task-tab:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.order-task-tab b {
  font-size: 12px;
}

.order-task-subhead {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 18px 8px;
  border-top: 1px solid rgba(214, 225, 233, 0.72);
}

.order-task-subhead strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.order-task-subhead span {
  color: var(--muted);
  font-size: 12px;
}

.order-task-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 52px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: #fbfdfe;
}

.order-task-pagination span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}

.order-task-pagination button,
.order-history-date {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.order-task-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.order-task-pagination em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 32px;
  border: 1px solid #b7e4ce;
  border-radius: 999px;
  background: #e9f7ef;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.order-history-strip {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  margin: 10px 16px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfd;
}

.order-history-strip strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.order-history-strip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.order-history-strip > div {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-history-date {
  border-radius: 999px;
}

.order-history-date.is-active {
  border-color: #b7e4ce;
  background: #e9f7ef;
  color: var(--green);
}

.order-history-date b {
  margin-left: 4px;
}

.order-sheet-check {
  margin: 10px 16px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.order-sheet-check-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.order-sheet-check-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.order-sheet-check-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-sheet-check-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #b7e4ce;
  border-radius: 999px;
  background: #e9f7ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.order-sheet-check.is-warning .order-sheet-check-head > span,
.order-sheet-step.is-warning em {
  border-color: #f1cf8a;
  background: #fff8e8;
  color: #9a6500;
}

.order-sheet-check.is-processing .order-sheet-check-head > span,
.order-sheet-step.is-processing em {
  border-color: #c7d7fe;
  background: #eff6ff;
  color: #2563eb;
}

.order-sheet-check.is-error .order-sheet-check-head > span,
.order-sheet-step.is-error em {
  border-color: #f3b5bc;
  background: #fff1f3;
  color: var(--red);
}

.order-sheet-check.is-muted .order-sheet-check-head > span,
.order-sheet-step.is-muted em {
  border-color: var(--line);
  background: #f6f8fb;
  color: var(--muted);
}

.order-sheet-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.order-sheet-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.order-sheet-step:last-child {
  border-right: 0;
}

.order-sheet-step span {
  grid-column: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.order-sheet-step strong {
  grid-column: 1;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.order-sheet-step b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.order-sheet-step small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.order-sheet-step em {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 2px;
  padding: 3px 8px;
  border: 1px solid #caead8;
  border-radius: 999px;
  background: #e9f7ef;
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.order-sheet-check-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

.order-sheet-check-actions strong,
.order-sheet-check-actions small {
  display: block;
  min-width: 0;
}

.order-sheet-check-actions strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.order-sheet-check-actions small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.order-sheet-check-actions .secondary-button,
.order-sheet-check-actions .download-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  text-decoration: none;
}

@media (max-width: 960px) {
  .order-task-tabs,
  .order-task-pagination {
    display: grid;
    grid-template-columns: 1fr;
  }

  .order-task-pagination span {
    margin-right: 0;
  }

  .order-task-pagination button,
  .order-task-pagination em,
  .order-task-tab {
    width: 100%;
  }

  .order-history-strip {
    grid-template-columns: 1fr;
  }

  .order-history-strip > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .order-sheet-flow,
  .order-sheet-check-actions {
    grid-template-columns: 1fr;
  }

  .order-sheet-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .order-sheet-step:last-child {
    border-bottom: 0;
  }

  .order-sheet-check-actions .secondary-button,
  .order-sheet-check-actions .download-button {
    width: 100%;
  }
}

.danger-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #f3b5bc;
  border-radius: 6px;
  background: #fff1f3;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.secondary-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.secondary-button:hover {
  border-color: #9fb2c1;
  background: #f7fafc;
}

.danger-button:hover {
  border-color: #e88893;
  background: #ffe5e9;
}

.job-inline-message {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.job-inline-message:empty {
  display: none;
}

.job-inline-message.is-error {
  color: var(--red);
}

.job-inline-message.is-success {
  color: var(--green);
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: currentColor;
}

.status.queued {
  background: #edf2f7;
  color: #475467;
}

.status.running {
  background: #e8f1ff;
  color: var(--blue);
}

.status.warning {
  background: #fff7dc;
  color: #9a6500;
}

.status.done {
  background: #e7f8f1;
  color: var(--green);
}

.status.failed {
  background: #ffedf0;
  color: var(--red);
}

.result-panel {
  margin-top: 16px;
  overflow: hidden;
}

.order-result-panel {
  margin-bottom: 4px;
}

.split-results {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.split-results .result-panel {
  margin-top: 0;
}

.osaka-stock-panel {
  margin-top: 16px;
}

.osaka-stock-panel .section-head {
  border-bottom-color: #bdebdc;
  background: #f0fbf7;
}

.stock-in-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 118px auto auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfefe;
}

.stock-in-panel label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.stock-in-panel input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.stock-scan-field input {
  font-size: 17px;
}

.stock-in-panel button {
  min-width: 92px;
  min-height: 42px;
}

.stock-in-panel .camera-button {
  border-color: #9fdccc;
  background: #e6f7f2;
  color: #04745f;
}

.stock-in-panel .camera-button:hover {
  border-color: #7ecab8;
  background: #d8f2eb;
}

.stock-scanner-panel {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fcfb;
}

.stock-camera-view {
  position: relative;
  overflow: hidden;
  border: 1px solid #a8ded0;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  background: #071815;
}

.stock-camera-view video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stock-scan-guide {
  position: absolute;
  inset: 28% 10%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left-width: 14px;
  border-right-width: 14px;
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.stock-camera-status strong,
.stock-camera-status span {
  display: block;
}

.stock-camera-status strong {
  color: var(--ink);
  font-size: 14px;
}

.stock-camera-status span {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.stock-camera-status span.is-success {
  color: var(--green);
}

.stock-camera-status span.is-error {
  color: var(--red);
}

.stock-in-result {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.stock-result-card {
  padding: 13px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.stock-result-card strong,
.stock-result-card span,
.stock-result-card small {
  display: block;
}

.stock-result-card strong {
  color: var(--ink);
  font-size: 14px;
}

.stock-result-card small {
  margin-top: 2px;
}

.stock-result-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.stock-result-card.is-success {
  border-left: 4px solid var(--green);
  background: #f0fbf7;
}

.stock-result-card.is-warn {
  border-left: 4px solid #d68b00;
  background: #fff8e8;
}

.stock-result-card.is-error {
  border-left: 4px solid var(--red);
  background: #fff3f5;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  min-height: 96px;
  padding: 16px 18px;
}

.summary-grid.compact .metric {
  min-height: 82px;
}

.daily-purchase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7fbfb;
}

.daily-purchase-bar strong,
.daily-purchase-bar span {
  display: block;
}

.daily-purchase-bar strong {
  color: var(--ink);
  font-size: 14px;
}

.daily-purchase-bar span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.daily-purchase-bar span.is-success {
  color: var(--green);
}

.daily-purchase-bar span.is-error {
  color: var(--red);
}

.packing-trial-panel {
  margin-top: 16px;
  overflow: hidden;
}

.wuliu-library-panel {
  margin-top: 16px;
  overflow: hidden;
}

.wuliu-template-panel {
  margin-top: 16px;
  overflow: hidden;
}

.wuliu-sandbox-panel {
  margin-top: 16px;
  overflow: hidden;
}

#wuliu-sandbox-summary.summary-grid.compact {
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 6px;
  padding: 6px;
}

#wuliu-sandbox-summary.summary-grid.compact .metric {
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 8px;
}

#wuliu-sandbox-summary.summary-grid.compact .metric label {
  font-size: 11px;
  line-height: 1.2;
}

#wuliu-sandbox-summary.summary-grid.compact .metric strong {
  margin-top: 5px;
  font-size: 20px;
  line-height: 1.05;
}

#wuliu-sandbox-summary.summary-grid.compact .metric small {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.25;
}

.wuliu-library-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px) minmax(130px, 180px);
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.wuliu-library-toolbar input,
.wuliu-library-toolbar select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 11px;
}

.wuliu-library-table-wrap {
  overflow-x: auto;
  background: #ffffff;
}

.wuliu-library-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.wuliu-library-table th,
.wuliu-library-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.35;
}

.wuliu-library-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f8fafb;
  font-weight: 850;
}

.wuliu-library-table td strong,
.wuliu-library-table td span {
  display: block;
}

.wuliu-library-table td strong {
  color: var(--ink);
  font-size: 13px;
}

.wuliu-library-table td span {
  margin-top: 3px;
  color: var(--muted);
}

.wuliu-library-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.wuliu-library-pager span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.wuliu-template-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: #ffffff;
}

.wuliu-template-flow,
.wuliu-template-main {
  min-width: 0;
}

.wuliu-template-flow h3,
.template-subhead h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.wuliu-template-workflow {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.template-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.template-step:hover,
.template-step:focus-visible {
  border-color: #9ab8b4;
  box-shadow: 0 10px 22px rgba(19, 37, 45, 0.08);
  transform: translateY(-1px);
}

.template-step > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #183b38;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.template-step strong,
.template-step small,
.template-step p {
  display: block;
}

.template-step strong {
  color: var(--ink);
  font-size: 13px;
}

.template-step small {
  margin-top: 2px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
}

.template-step p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.template-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
}

.template-subhead:not(:first-child) {
  margin-top: 18px;
}

.template-subhead span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.wuliu-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.template-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(19, 37, 45, 0.06);
}

.template-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.template-card-actions {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 8px;
  max-width: 46%;
}

.template-card-head strong,
.template-card-head span,
.template-card-head em {
  display: block;
}

.template-card-head strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.template-card-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-word;
}

.template-card-head em {
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.template-open-button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid #183b38;
  border-radius: 6px;
  background: #183b38;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
}

.template-open-button:hover,
.template-open-button:focus-visible {
  background: #23514d;
}

.template-card > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.template-block-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}

.template-block-list div {
  min-width: 0;
}

.template-block-list dt {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.template-block-list dd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.template-pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #d8e5e3;
  border-radius: 999px;
  background: #f7fbfb;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.template-pill.is-clickable {
  cursor: pointer;
  appearance: none;
}

.template-pill.is-clickable:hover,
.template-pill.is-clickable:focus-visible {
  border-color: #8fb2ad;
  background: #eef8f6;
  color: #183b38;
}

.template-pill.is-muted,
.template-muted {
  color: var(--muted);
}

.wuliu-sandbox-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.26fr) minmax(0, 1fr);
  gap: 0;
  background: #ffffff;
}

.wuliu-sandbox-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}

.wuliu-sandbox-tabs button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 850;
}

.wuliu-sandbox-tabs button.is-active {
  border-color: #b7d4d1;
  background: #eef8f7;
  color: var(--accent);
}

.wuliu-tab-group {
  display: grid;
  gap: 7px;
  margin: 2px 0;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.wuliu-tab-group > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.wuliu-tab-group.is-open {
  border-color: #d3e8e5;
  background: #f6fbfa;
}

.wuliu-tab-group.is-open > button {
  border-color: #8dc7c0;
  background: #e8f7f4;
  color: var(--accent);
  box-shadow: inset 3px 0 0 #0d9488;
}

.wuliu-tab-chevron {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #b7d4d1;
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.wuliu-tab-group.is-open .wuliu-tab-chevron {
  transform: rotate(180deg);
}

.wuliu-tab-submenu {
  display: none;
  position: relative;
  gap: 6px;
  margin-left: 7px;
  padding: 4px 0 2px 13px;
}

.wuliu-tab-group.is-open .wuliu-tab-submenu {
  display: grid;
}

.wuliu-tab-submenu::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 3px;
  left: 2px;
  width: 2px;
  border-radius: 2px;
  background: #b9d8d4;
}

.wuliu-tab-submenu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 30px;
  padding: 0 9px;
  border-color: #dce8eb;
  background: #ffffff;
  color: #4d6273;
  font-size: 12px;
  font-weight: 800;
}

.wuliu-tab-submenu button::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b8c7ce;
}

.wuliu-tab-submenu button.is-active {
  border-color: #76bfb5;
  background: #def3ef;
  color: var(--accent);
  box-shadow: inset 3px 0 0 #0d9488;
}

.wuliu-tab-submenu button.is-active::before {
  background: #0d9488;
}

.wuliu-sandbox-main {
  min-width: 0;
  padding: 16px;
}

.wuliu-ruoyi-search {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.wuliu-ruoyi-search label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-ruoyi-search input,
.wuliu-ruoyi-search select {
  min-height: 34px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
  color: var(--text);
  padding: 0 9px;
  font-size: 13px;
}

.wuliu-ruoyi-search.is-scan,
.wuliu-ruoyi-search.is-photo {
  grid-template-columns: minmax(260px, 1fr) auto auto;
}

.wuliu-order-status-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.wuliu-order-status-nav button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #f8fafb;
  color: var(--text);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.wuliu-order-status-nav button.is-active {
  border-color: #0f8f86;
  background: #0f8f86;
  color: #ffffff;
}

.wuliu-combined-status {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.wuliu-status-pill,
.wuliu-stage-chip {
  display: inline-flex;
  min-width: 66px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.wuliu-status-pill.is-warning {
  background: #ff9f43;
  color: #ffffff;
}

.wuliu-status-pill.is-success {
  background: #16a34a;
  color: #ffffff;
}

.wuliu-status-pill.is-danger {
  background: #ef4444;
  color: #ffffff;
}

.wuliu-stage-chip {
  border: 1px solid #d7dee8;
  background: #f8fafc;
  color: #475569;
}

.wuliu-stage-chip.is-primary {
  border-color: #bae6fd;
  background: #e0f2fe;
  color: #0369a1;
}

.wuliu-stage-chip.is-info {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
}

.wuliu-stage-chip.is-success {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #15803d;
}

.wuliu-stage-chip.is-danger {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.wuliu-order-photo-cell {
  min-width: 86px;
}

.wuliu-order-photo-button {
  display: inline-flex;
  width: 76px;
  min-height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
}

.wuliu-order-photo-button.has-photos {
  border-color: rgba(15, 118, 110, 0.3);
  background: #ecfdf8;
  color: #0f766e;
}

.wuliu-order-photo-button strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.wuliu-order-photo-button span {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 850;
}

.wuliu-scan-result,
.wuliu-photo-result {
  min-width: 0;
}

.wuliu-scan-card,
.wuliu-photo-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.wuliu-photo-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.wuliu-photo-card-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.wuliu-photo-card-head a {
  display: inline-grid;
  flex: 0 0 auto;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.wuliu-photo-card-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.wuliu-scan-card strong,
.wuliu-photo-card strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.wuliu-scan-card p,
.wuliu-photo-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.wuliu-scan-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.wuliu-scan-card dl,
.wuliu-photo-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.wuliu-scan-card dl div,
.wuliu-photo-card dl div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
}

.wuliu-photo-card dl div.is-wide {
  grid-column: 1 / -1;
}

.wuliu-scan-card dt,
.wuliu-photo-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.wuliu-scan-card dd,
.wuliu-photo-card dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.wuliu-photo-sync {
  margin-bottom: 12px;
}

.wuliu-photo-scanner {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #f0fdfa;
}

.wuliu-photo-scanner video {
  width: 100%;
  max-height: min(56vh, 420px);
  border-radius: 6px;
  background: #0f172a;
  object-fit: cover;
}

.wuliu-photo-scanner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wuliu-photo-scanner-bar span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.wuliu-photo-scanner-bar span.is-success {
  color: #0f766e;
}

.wuliu-photo-scanner-bar span.is-error {
  color: #b91c1c;
}

.wuliu-photo-scanner-bar button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-weight: 850;
}

.wuliu-photo-sync-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #ecfdf8;
}

.wuliu-photo-sync-card strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.wuliu-photo-sync-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.wuliu-photo-sync-card button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  padding: 0 12px;
  font-weight: 850;
}

.wuliu-photo-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(220px, 1.2fr) auto minmax(120px, 0.7fr);
  gap: 10px;
  align-items: end;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.wuliu-photo-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.wuliu-photo-form select,
.wuliu-photo-form input[type="file"] {
  min-height: 38px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 7px 10px;
  font-size: 13px;
}

.wuliu-photo-form button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 850;
}

#wuliu-photo-status {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

#wuliu-photo-status.is-success {
  color: #0f766e;
}

#wuliu-photo-status.is-error {
  color: #b91c1c;
}

.wuliu-image-list {
  min-width: 0;
}

.wuliu-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.wuliu-image-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.wuliu-image-check {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.wuliu-image-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
  padding: 0;
  cursor: zoom-in;
}

.wuliu-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wuliu-image-thumb span {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.wuliu-image-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wuliu-image-info strong {
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.wuliu-image-info span,
.wuliu-image-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.wuliu-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wuliu-image-actions button {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.wuliu-scan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wuliu-scan-actions a {
  display: inline-grid;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.wuliu-ruoyi-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
}

.wuliu-ruoyi-toolbar button,
.wuliu-ruoyi-toolbar a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.wuliu-ruoyi-toolbar .btn-success {
  background: #1ab394;
}

.wuliu-ruoyi-toolbar .btn-primary {
  background: #1c84c6;
}

.wuliu-ruoyi-toolbar .btn-danger {
  background: #ed5565;
}

.wuliu-ruoyi-toolbar .btn-warning {
  background: #f8ac59;
}

.wuliu-ruoyi-toolbar .btn-info {
  background: #23c6c8;
}

.wuliu-ruoyi-toolbar.is-inline {
  margin-bottom: 8px;
  padding: 8px 0;
  border: 0;
  background: transparent;
}

.wuliu-sandbox-pane {
  display: none;
}

.wuliu-sandbox-pane.is-active {
  display: block;
}

.wuliu-sandbox-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.wuliu-sandbox-form.is-highlighted {
  border-color: #0f8b7f;
  box-shadow: 0 0 0 3px rgba(15, 139, 127, 0.16);
}

.wuliu-order-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
}

.wuliu-sandbox-form.is-wide-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
}

.wuliu-product-edit-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.wuliu-product-edit-field > span {
  line-height: 1.3;
}

.wuliu-memory-field {
  position: relative;
}

td.wuliu-memory-field {
  overflow: visible;
}

td.wuliu-memory-field .wuliu-memory-menu {
  min-width: 240px;
}

.wuliu-memory-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: min(320px, 42vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #c7d2df;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.18);
}

.wuliu-memory-menu.is-hidden {
  display: none;
}

.wuliu-memory-option,
.wuliu-memory-more {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

.wuliu-memory-option:hover,
.wuliu-memory-option:focus-visible {
  background: #eef6ff;
  color: #0b5cab;
}

.wuliu-memory-more {
  margin-top: 4px;
  border-top: 1px solid #e3e9f0;
  border-radius: 0;
  color: #0b5cab;
  text-align: center;
}

.wuliu-memory-state {
  display: block;
  padding: 10px;
  color: #667085;
  font-size: 12px;
  text-align: center;
}

.wuliu-drawer-body #wuliu-goods-form.is-order-manual-edit {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.wuliu-drawer-body #wuliu-goods-form.is-order-manual-edit > :not(.wuliu-product-edit-field):not([data-wuliu-product-edit-action]):not(input[type="hidden"]) {
  display: none;
}

.wuliu-drawer-body #wuliu-goods-form.is-order-manual-edit .wuliu-product-edit-field.is-wide,
.wuliu-drawer-body #wuliu-goods-form.is-order-manual-edit [data-wuliu-product-edit-action] {
  grid-column: 1 / -1;
}

.wuliu-drawer-body #wuliu-goods-form.is-order-manual-edit [data-wuliu-product-edit-action] {
  min-height: 42px;
}

.wuliu-online-order-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.wuliu-form-block {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.wuliu-form-block h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.wuliu-good-scan-box {
  margin: 10px 0;
}

.wuliu-good-scan-box input {
  width: min(100%, 760px);
  min-height: 44px;
  border-color: #d8dde6;
  font-size: 16px;
}

.wuliu-good-scan-box input::placeholder {
  color: #a6afbd;
}

.wuliu-good-miss-panel {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 24px;
}

.wuliu-good-miss-panel.is-hidden {
  display: none;
}

.wuliu-good-miss-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.56);
  cursor: default;
}

.wuliu-good-miss-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fffaf5;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.wuliu-good-miss-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.wuliu-good-miss-head > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.wuliu-good-miss-head span {
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 850;
}

.wuliu-good-miss-head strong {
  color: #111827;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.wuliu-good-miss-head small,
.wuliu-good-miss-candidate small {
  color: #6b7280;
  font-size: 12px;
}

.wuliu-good-miss-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.wuliu-good-miss-candidates {
  display: grid;
  gap: 8px;
}

.wuliu-good-miss-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #ffffff;
}

.wuliu-good-miss-candidate > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wuliu-good-miss-candidate strong,
.wuliu-good-miss-candidate span {
  overflow-wrap: anywhere;
}

.wuliu-good-miss-candidate span {
  color: #374151;
  font-size: 12px;
  font-weight: 750;
}

.wuliu-good-miss-empty {
  padding: 10px;
  border: 1px dashed #fed7aa;
  border-radius: 6px;
  background: #ffffff;
  color: #92400e;
  font-size: 13px;
  font-weight: 750;
}

.wuliu-good-miss-manual {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.wuliu-good-miss-manual label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.wuliu-good-miss-manual label.is-required {
  color: #7c2d12;
}

.wuliu-good-miss-manual label.is-wide {
  grid-column: span 2;
}

.wuliu-good-miss-manual input,
.wuliu-good-miss-manual select {
  width: 100%;
}

.wuliu-good-miss-manual select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 7px 10px;
  font: inherit;
}

.wuliu-good-miss-category-note {
  color: #0f766e;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.wuliu-good-miss-manual input.wuliu-required-missing,
.wuliu-good-miss-manual select.wuliu-required-missing {
  border-color: #dc2626;
  background: #fff1f2;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}

@media (max-width: 760px) {
  .wuliu-good-miss-panel {
    place-items: end center;
    padding: 0;
  }

  .wuliu-good-miss-dialog {
    width: 100%;
    max-height: 92vh;
    padding: 14px;
    border-radius: 14px 14px 0 0;
  }

  .wuliu-good-miss-candidate {
    grid-template-columns: 1fr;
  }

  .wuliu-good-miss-manual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wuliu-good-miss-manual label.is-wide {
    grid-column: 1 / -1;
  }
}

.wuliu-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.wuliu-form-grid label {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-form-grid label input,
.wuliu-form-grid label select,
.wuliu-form-grid label textarea {
  flex: 0 0 100%;
}

.wuliu-required-mark {
  color: #e11d48;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

.wuliu-form-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-form-grid label.is-wide {
  grid-column: span 2;
}

.wuliu-remark-field {
  grid-column: span 2;
}

.wuliu-inline-field-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.wuliu-inline-field-actions input {
  width: 100%;
}

.wuliu-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  padding: 0 14px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14);
}

.wuliu-action-button:hover,
.wuliu-action-button:focus-visible {
  filter: brightness(0.96);
}

.wuliu-action-button.is-sync {
  background: #0f8f86;
}

.wuliu-action-button.is-print {
  background: #f5a64b;
}

.wuliu-action-button.is-print:hover,
.wuliu-action-button.is-print:focus-visible {
  background: #ef9a35;
}

.wuliu-print-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.wuliu-print-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

#wuliu-inline-barcode-print-area {
  display: none;
}

.wuliu-inline-barcode-ticket {
  box-sizing: border-box;
  width: var(--wuliu-print-width, 80mm);
  height: var(--wuliu-print-height, 50mm);
  min-height: 0;
  margin: 0;
  padding: 2.5mm 3mm;
  background: #ffffff;
  color: #111827;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

.wuliu-inline-barcode-kicker {
  margin: 0 0 1.5mm;
  font-size: 9px;
  line-height: 1;
  font-weight: 750;
  color: #111827;
}

.wuliu-inline-barcode-number {
  margin: 0 0 1.8mm;
  font-size: 13px;
  line-height: 1.05;
  font-weight: 850;
  word-break: break-all;
}

.wuliu-inline-barcode-image {
  width: 100%;
  flex: 0 0 auto;
}

.wuliu-inline-barcode-svg {
  display: block;
  width: 100%;
  max-height: 28mm;
  height: auto;
}

@media print {
  html.wuliu-inline-barcode-printing,
  body.wuliu-inline-barcode-printing {
    width: var(--wuliu-print-width, 80mm) !important;
    height: var(--wuliu-print-height, 50mm) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: hidden !important;
  }

  body.wuliu-inline-barcode-printing #wuliu-inline-barcode-print-area {
    align-items: flex-start;
    justify-content: flex-start;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }
}

.wuliu-action-button.is-save {
  background: #15803d;
}

.wuliu-printer-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.wuliu-printer-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-printer-form input,
.wuliu-printer-form select {
  min-height: 36px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
}

.wuliu-printer-status {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  grid-column: span 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: normal;
}

.wuliu-printer-status.is-success {
  color: #15803d;
}

.wuliu-printer-status.is-error {
  color: #b91c1c;
}

.wuliu-printer-agent-field {
  grid-column: span 2;
}

.wuliu-printer-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: #f8fafc;
  overflow-x: auto;
}

.wuliu-printer-preview:empty {
  display: none;
}

.wuliu-printer-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-printer-preview .wuliu-inline-barcode-ticket {
  border: 1px solid #cbd5e1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

@media (max-width: 920px) {
  .wuliu-printer-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wuliu-printer-form {
    grid-template-columns: 1fr;
  }

  .wuliu-printer-agent-field,
  .wuliu-printer-status {
    grid-column: auto;
  }
}

/* Desktop operations-shell refresh: make the app feel like one control system. */
@media (min-width: 1024px) {
  body {
    background: #e9eef3;
  }

  .app-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 18px;
    width: min(1720px, calc(100vw - 28px));
    min-height: 100vh;
    padding: 14px 0 32px;
  }

  .main-topbar {
    position: sticky;
    top: 14px;
    z-index: 30;
    grid-column: 1;
    align-self: start;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 14px;
    min-height: calc(100vh - 28px);
    margin: 0;
    padding: 16px;
    border: 0;
    border-radius: 10px;
    background: #101820;
    color: #e8f0f6;
    box-shadow: 0 22px 48px rgba(16, 24, 32, 0.18);
  }

  .topbar-main {
    display: grid;
    gap: 16px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-color: rgba(255, 255, 255, 0.18);
    background: #0f766e;
    box-shadow: none;
  }

  .topbar h1 {
    color: #ffffff;
    font-size: 20px;
  }

  .topbar p {
    color: #93a4b4;
  }

  .top-actions {
    display: grid;
    justify-content: stretch;
    gap: 8px;
  }

  .server-pill,
  .user-pill,
  .top-actions .plain-link,
  .topbar form button[type="submit"] {
    justify-content: flex-start;
    width: 100%;
    min-height: 36px;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #d7e3ed;
  }

  .server-pill {
    background: rgba(15, 118, 110, 0.24);
    color: #b9f6e8;
  }

  .quick-nav {
    align-self: stretch;
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .quick-nav a {
    justify-content: flex-start;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 7px;
    color: #b8c6d2;
    font-weight: 750;
  }

  .quick-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .quick-nav a.is-active,
  .quick-nav a.nav-action-link.is-active {
    background: #0f766e;
    color: #ffffff;
    box-shadow: none;
  }

  .quick-nav a.nav-action-link:not(.is-active) {
    border: 1px solid rgba(15, 118, 110, 0.3);
    background: rgba(15, 118, 110, 0.14);
    color: #b9f6e8;
  }

  .app-shell > section,
  .app-shell > .workspace,
  .app-shell > .split-results {
    grid-column: 2;
    min-width: 0;
  }

  .home-nav-panel,
  .result-panel,
  .library-panel,
  .workspace,
  .split-results {
    margin-top: 0;
  }

  .workflow-panel {
    min-height: calc(100vh - 28px);
    border: 0;
    border-radius: 10px;
    background: #f8fafb;
    box-shadow: none;
  }

  .workflow-panel > .section-head {
    margin: -20px -20px 16px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
    border-radius: 10px 10px 0 0;
  }

  .workflow-stage-strip {
    grid-template-columns: repeat(9, minmax(96px, 1fr));
  }

  .workflow-stage-card {
    background: #ffffff;
  }

  .workflow-layout {
    grid-template-columns: minmax(420px, 0.9fr) minmax(420px, 0.7fr);
  }
}

.wuliu-address-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.wuliu-address-tools textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
}

.wuliu-address-tools div,
.wuliu-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.wuliu-address-tools div {
  justify-content: flex-end;
}

.wuliu-form-actions {
  justify-content: flex-end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
}

.wuliu-sandbox-form input,
.wuliu-sandbox-form select,
.wuliu-online-order-form input,
.wuliu-online-order-form select,
.wuliu-online-order-form textarea,
.wuliu-sandbox-search,
.wuliu-sandbox-table input,
.wuliu-sandbox-table select {
  min-height: 36px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
}

.wuliu-online-order-form .wuliu-address-tools textarea[name="addressText"] {
  height: 150px;
  min-height: 150px;
  padding: 10px 12px;
  line-height: 1.55;
}

.wuliu-online-order-form input.wuliu-required-missing,
.wuliu-online-order-form select.wuliu-required-missing,
.wuliu-online-order-form textarea.wuliu-required-missing,
.wuliu-sandbox-table-wrap.wuliu-required-missing,
.wuliu-good-scan-box input.wuliu-required-missing {
  border-color: #e11d48;
  background: #fff5f7;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.wuliu-sandbox-form button,
.wuliu-online-order-form button,
.wuliu-sandbox-table button,
.wuliu-good-choice button {
  min-height: 36px;
  white-space: nowrap;
}

.wuliu-sandbox-table-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.wuliu-table-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-table-count strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.wuliu-table-count span {
  white-space: nowrap;
}

.wuliu-sandbox-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.wuliu-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf7f5;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.wuliu-enable-status {
  display: inline-flex;
  min-width: 48px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #e5edf2;
  color: #526273;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.wuliu-enable-status.is-enabled {
  background: #0f8f7c;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.wuliu-enable-status.is-disabled {
  background: #dc3545;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

select.wuliu-enable-status-select {
  width: auto;
  border: 0;
  outline: none;
  cursor: pointer;
  appearance: auto;
}

select.wuliu-enable-status-select:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

select.wuliu-enable-status-select option {
  background: #ffffff;
  color: #1f2937;
}

.wuliu-sandbox-table.is-orders {
  min-width: 1850px;
}

.wuliu-sandbox-table.is-goods {
  min-width: 2480px;
}

.wuliu-sandbox-table.is-form-goods {
  min-width: 1540px;
}

.wuliu-sandbox-table.is-form-goods tbody tr {
  --wuliu-good-row-bg: #f6fbff;
  --wuliu-good-row-hover: #edf7ff;
  --wuliu-good-row-accent: #2f7fbf;
  background: var(--wuliu-good-row-bg);
}

.wuliu-sandbox-table.is-form-goods tbody tr:nth-child(4n + 2) {
  --wuliu-good-row-bg: #f5fbf7;
  --wuliu-good-row-hover: #eaf7ee;
  --wuliu-good-row-accent: #27906f;
}

.wuliu-sandbox-table.is-form-goods tbody tr:nth-child(4n + 3) {
  --wuliu-good-row-bg: #fff9ed;
  --wuliu-good-row-hover: #fff1d6;
  --wuliu-good-row-accent: #c28315;
}

.wuliu-sandbox-table.is-form-goods tbody tr:nth-child(4n + 4) {
  --wuliu-good-row-bg: #fff6f7;
  --wuliu-good-row-hover: #ffeaee;
  --wuliu-good-row-accent: #c45a6d;
}

.wuliu-sandbox-table.is-form-goods tbody tr:hover td {
  background: var(--wuliu-good-row-hover);
}

.wuliu-sandbox-table.is-form-goods tbody td {
  background: var(--wuliu-good-row-bg);
}

.wuliu-sandbox-table.is-form-goods tbody td:first-child {
  border-left: 4px solid var(--wuliu-good-row-accent);
  color: #24384f;
  font-weight: 950;
  text-align: center;
}

.wuliu-sandbox-table.is-form-goods input {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(122, 142, 163, 0.46);
}

.wuliu-sandbox-table.is-form-goods input:focus {
  background: #ffffff;
}

.wuliu-sandbox-table.is-batches th:nth-child(6),
.wuliu-sandbox-table.is-batches td:nth-child(6) {
  text-align: center;
  vertical-align: middle;
}

/* Keep the desktop shipping-batch register inside the visible workspace. */
@media (min-width: 761px) {
  #wuliu-batch-list {
    overflow-x: hidden;
  }

  #wuliu-batch-list .wuliu-sandbox-table.is-batches {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  #wuliu-batch-list .wuliu-sandbox-table.is-batches th,
  #wuliu-batch-list .wuliu-sandbox-table.is-batches td {
    padding: 9px 6px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(1) { width: 3%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(2) { width: 14%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(3) { width: 10%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(4) { width: 4%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(5) { width: 7%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(6) { width: 4%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(7) { width: 4%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(8),
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(9) { width: 5%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(10) { width: 7%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(11) { width: 7%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(12),
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(14) { width: 5%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(13),
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(15) { width: 7%; }
  #wuliu-batch-list .wuliu-sandbox-table.is-batches th:nth-child(16) { width: 6%; }

  #wuliu-batch-list .wuliu-source-badge,
  #wuliu-batch-list .wuliu-sandbox-table.is-batches button {
    max-width: 100%;
    white-space: normal;
  }
}

.wuliu-sandbox-table th,
.wuliu-sandbox-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.4;
}

.wuliu-sandbox-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f8fafb;
  font-weight: 850;
}

.wuliu-sandbox-table tr:last-child td {
  border-bottom: 0;
}

.wuliu-sandbox-table strong,
.wuliu-sandbox-table span {
  display: block;
}

.wuliu-sandbox-table strong {
  color: var(--ink);
  font-size: 13px;
}

.wuliu-table-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.wuliu-table-link strong {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wuliu-table-link span {
  color: #4b6478;
  font-size: 11px;
  font-weight: 800;
}

.wuliu-table-link:hover strong,
.wuliu-table-link:focus-visible strong {
  color: #0f6d67;
}

.wuliu-sandbox-table span {
  margin-top: 3px;
  color: var(--muted);
}

.wuliu-sandbox-table .wuliu-enable-status {
  display: inline-flex;
  height: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  line-height: 24px;
  vertical-align: middle;
}

.wuliu-sandbox-table.is-orders th:nth-child(3),
.wuliu-sandbox-table.is-orders td:nth-child(3) {
  text-align: center;
}

.wuliu-sandbox-table.is-orders .wuliu-combined-status {
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.wuliu-sandbox-table.is-orders .wuliu-status-pill,
.wuliu-sandbox-table.is-orders .wuliu-stage-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  line-height: 1;
  text-align: center;
}

.wuliu-sandbox-table input,
.wuliu-sandbox-table select {
  display: block;
  width: 100%;
  margin-bottom: 6px;
}

.wuli-row-actions,
.wuliu-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wuliu-row-actions a,
.wuliu-sandbox-table a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.wuliu-sandbox-search {
  width: min(100%, 420px);
  margin-bottom: 12px;
}

.wuliu-order-workbench-host {
  min-width: 0;
}

.wuliu-workbench {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(360px, 470px);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.wuliu-workbench.is-queue-only {
  grid-template-columns: minmax(0, 1fr);
}

.wuliu-workbench-queue,
.wuliu-workbench-detail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.wuliu-workbench-queue {
  overflow: hidden;
}

.wuliu-workbench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.wuliu-workbench-head strong,
.wuliu-workbench-head span {
  display: block;
}

.wuliu-workbench-head strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.wuliu-workbench-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-workbench-head-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #98cfc6;
  border-radius: 7px;
  background: #ecfdf8;
  color: #087b70;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.wuliu-workbench-grid-head,
.wuliu-workbench-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1.45fr) minmax(112px, 0.8fr) 64px minmax(128px, 0.85fr) minmax(128px, 0.85fr);
  gap: 10px;
  align-items: center;
}

.wuliu-workbench-grid-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f4f8fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.wuliu-workbench-grid-head span:first-child {
  grid-column: 2;
}

.wuliu-workbench.is-queue-only .wuliu-workbench-grid-head,
.wuliu-workbench.is-queue-only .wuliu-workbench-row {
  grid-template-columns: 32px 78px minmax(190px, 1.35fr) minmax(130px, 0.85fr) minmax(132px, 0.9fr) minmax(145px, 0.95fr) 64px minmax(110px, 0.7fr) minmax(150px, 0.9fr);
}

[data-wuliu-sandbox-tab="images"],
[data-wuliu-sandbox-pane="images"],
[data-wuliu-order-images],
[data-wuliu-photo-link-open-images] {
  display: none !important;
}

.wuliu-workbench-rows {
  display: grid;
}

.wuliu-workbench-row {
  min-width: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
}

.wuliu-workbench-row:last-child {
  border-bottom: 0;
}

.wuliu-workbench-row.is-active {
  background: #effbf8;
  box-shadow: inset 4px 0 0 #0f8f86;
}

.wuliu-workbench-check input {
  width: 22px;
  height: 22px;
  margin: 0;
}

.wuliu-workbench-main {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.wuliu-workbench-main strong,
.wuliu-workbench-main span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wuliu-workbench-main strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.wuliu-workbench-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.wuliu-workbench-status .wuliu-combined-status {
  align-items: flex-start;
  margin: 0;
}

.wuliu-workbench-photo {
  position: relative;
  display: grid;
  min-width: 0;
  width: 72px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid #c7d7e5;
  border-radius: 8px;
  background: #f7fafc;
  color: var(--ink);
}

.wuliu-workbench-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wuliu-workbench-photo strong {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(7, 38, 45, 0.82);
  color: #ffffff;
  font-size: 11px;
  line-height: 1.2;
}

.wuliu-workbench-photo.has-photos {
  border-color: #9dd8cf;
  background: #e9faf5;
}

.wuliu-workbench-photo strong,
.wuliu-workbench-photo span {
  display: block;
}

.wuliu-workbench-photo strong {
  font-size: 18px;
  font-weight: 950;
}

.wuliu-workbench-photo span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.wuliu-workbench-weight,
.wuliu-workbench-recipient {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
}

.wuliu-workbench-created,
.wuliu-workbench-batch {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.wuliu-workbench-created span,
.wuliu-workbench-batch span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.wuliu-workbench-created strong,
.wuliu-workbench-batch strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.wuliu-workbench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.wuliu-workbench-actions a,
.wuliu-workbench-actions button,
.wuliu-workbench-detail-actions a,
.wuliu-workbench-detail-actions button,
.wuliu-workbench-save-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #98cfc6;
  border-radius: 7px;
  background: #ffffff;
  color: #087b70;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.wuliu-workbench-actions a,
.wuliu-workbench-detail-actions a {
  border-color: #0f8f86;
  background: #0f8f86;
  color: #ffffff;
}

.wuliu-workbench-detail {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.wuliu-workbench-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.wuliu-workbench-detail-head span,
.wuliu-workbench-detail-head strong {
  display: block;
}

.wuliu-workbench-detail-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.wuliu-workbench-detail-head strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 19px;
  font-weight: 950;
  line-height: 1.2;
}

.wuliu-workbench-detail-head em {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff2df;
  color: #c26212;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.wuliu-workbench-detail-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.wuliu-workbench-detail-actions a,
.wuliu-workbench-detail-actions button {
  min-height: 42px;
  padding: 0 8px;
}

.wuliu-workbench-detail-actions button:nth-child(2) {
  border-color: #1d75bd;
  background: #1d8bd1;
  color: #ffffff;
}

.wuliu-workbench-panel {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.wuliu-workbench-panel h4 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.wuliu-workbench-panel h4 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-workbench-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.wuliu-workbench-edit-grid label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.wuliu-workbench-edit-grid input,
.wuliu-workbench-edit-grid select {
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
}

.wuliu-workbench-save-row {
  display: flex;
  justify-content: flex-end;
}

.wuliu-workbench-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.wuliu-workbench-info div {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.wuliu-workbench-info div:nth-child(2n) {
  border-right: 0;
}

.wuliu-workbench-info div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.wuliu-workbench-info div.is-wide {
  grid-column: 1 / -1;
  border-right: 0;
}

.wuliu-workbench-info dt,
.wuliu-workbench-info dd {
  margin: 0;
}

.wuliu-workbench-info dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.wuliu-workbench-info dd {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.wuliu-workbench-items {
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow: auto;
}

.wuliu-workbench-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 1180px) {
  .wuliu-workbench {
    grid-template-columns: 1fr;
  }

  .wuliu-workbench-detail {
    position: static;
  }
}

@media (max-width: 760px) {
  .wuliu-workbench-grid-head {
    display: none;
  }

  .wuliu-workbench-head {
    align-items: stretch;
    flex-direction: column;
  }

  .wuliu-workbench-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: start;
  }

  .wuliu-workbench-status,
  .wuliu-workbench-photo,
  .wuliu-workbench-created,
  .wuliu-workbench-batch,
  .wuliu-workbench-weight,
  .wuliu-workbench-recipient,
  .wuliu-workbench-actions {
    grid-column: 2 / -1;
  }

  .wuliu-workbench-photo {
    width: 72px;
    height: 64px;
  }

  .wuliu-workbench-actions {
    justify-content: flex-start;
  }

  .wuliu-workbench-detail-actions,
  .wuliu-workbench-edit-grid,
  .wuliu-workbench-info,
  .wuliu-workbench-photos {
    grid-template-columns: 1fr;
  }

  .wuliu-workbench-info div,
  .wuliu-workbench-info div:nth-child(2n),
  .wuliu-workbench-info div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wuliu-workbench-info div:last-child {
    border-bottom: 0;
  }
}

.wuliu-sandbox-goods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wuliu-good-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.wuliu-good-choice strong,
.wuliu-good-choice span {
  display: block;
}

.wuliu-good-choice strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.wuliu-good-choice span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.packing-trial-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7fbfb;
}

.packing-trial-notice strong {
  color: var(--ink);
  font-size: 13px;
}

.packing-trial-notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.blocked-shipping-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.blocked-shipping-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.blocked-shipping-field > span:first-child {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.blocked-shipping-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.blocked-shipping-field textarea {
  width: 100%;
  min-height: 280px;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.blocked-shipping-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
  outline: 0;
}

.blocked-shipping-form .wuliu-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.blocked-shipping-safe-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.blocked-shipping-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.blocked-shipping-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.blocked-shipping-tabs button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.blocked-shipping-tabs button.is-active {
  border-color: rgba(15, 118, 110, 0.28);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.blocked-shipping-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.blocked-shipping-search {
  display: grid;
  gap: 5px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.blocked-shipping-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
}

.blocked-shipping-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  align-items: start;
}

.blocked-shipping-list-panel,
.blocked-shipping-action-panel {
  min-width: 0;
}

.blocked-shipping-list-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.blocked-shipping-safe-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff8ed;
  color: #7a4a12;
  font-size: 13px;
  line-height: 1.45;
}

.blocked-shipping-safe-note strong {
  flex: 0 0 auto;
}

.blocked-shipping-list {
  display: grid;
  gap: 0;
  max-height: 620px;
  overflow: auto;
}

.blocked-shipping-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.blocked-shipping-row:last-child {
  border-bottom: 0;
}

.blocked-shipping-row strong,
.blocked-shipping-row span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.blocked-shipping-row strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.blocked-shipping-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.blocked-shipping-row .btn-danger {
  min-height: 32px;
  border-color: #f3b7bd;
  background: #fff1f2;
  color: var(--red);
  box-shadow: none;
}

.blocked-shipping-action-panel {
  display: grid;
  gap: 12px;
}

.blocked-shipping-action-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.blocked-shipping-action-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.blocked-shipping-action-card input[type="text"],
.blocked-shipping-action-card input:not([type]),
.blocked-shipping-action-card input[type="file"] {
  width: 100%;
  min-height: 38px;
}

.blocked-shipping-action-card > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.blocked-shipping-change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.blocked-shipping-change-grid span {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.blocked-shipping-change-grid strong {
  color: var(--ink);
  font-size: 18px;
}

@media (max-width: 760px) {
  .blocked-shipping-form {
    grid-template-columns: 1fr;
  }

  .blocked-shipping-safe-editor {
    padding: 12px;
  }

  .blocked-shipping-tabs,
  .blocked-shipping-toolbar {
    width: 100%;
  }

  .blocked-shipping-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .blocked-shipping-layout {
    grid-template-columns: 1fr;
  }

  .blocked-shipping-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.packing-trial-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px);
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.packing-trial-toolbar input,
.packing-trial-toolbar select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 11px;
}

.packing-trial-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.packing-order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.packing-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}

.packing-order-head strong,
.packing-order-head span {
  display: block;
}

.packing-order-head strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.packing-order-head span,
.packing-order-foot,
.packing-order-meta,
.packing-address {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.packing-status {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 5px 9px;
  border-radius: 999px;
  text-align: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.packing-status.is-waiting {
  background: #eef2f5;
  color: #475569;
}

.packing-status.is-running {
  background: #e0f2fe;
  color: #075985;
}

.packing-status.is-done {
  background: #dcfce7;
  color: #166534;
}

.packing-status.is-blocked {
  background: #fff1f2;
  color: #9f1239;
}

.packing-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 0 16px 8px;
}

.packing-address {
  padding: 0 16px 12px;
}

.packing-items-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.packing-items {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.packing-items th,
.packing-items td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.35;
}

.packing-items th {
  color: var(--muted);
  background: #f8fafb;
  font-weight: 800;
}

.packing-items tbody tr:last-child td {
  border-bottom: 0;
}

.packing-local-edit {
  display: grid;
  grid-template-columns: minmax(130px, 170px) minmax(160px, 220px) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px 16px;
  background: #fbfcfd;
}

.packing-local-edit label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.packing-local-edit input,
.packing-local-edit select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
  font-weight: 500;
}

.packing-order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.purchase-bottom-tools {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.purchase-bottom-tools > .download-button {
  justify-self: start;
}

.purchase-window-actions {
  align-items: center;
  justify-content: flex-end;
}

.purchase-refresh-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.purchase-refresh-status.is-loading::before {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  animation: purchaseRefreshPulse 1s ease-in-out infinite;
}

.purchase-refresh-status.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.purchase-refresh-status.is-error {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

@keyframes purchaseRefreshPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.purchase-day-close-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #0f766e;
  border-radius: 6px;
  background: #0f766e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.purchase-day-close-button:disabled {
  border-color: #b8c7d3;
  background: #edf2f6;
  color: #7a8a99;
}

.daily-purchase-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.daily-purchase-actions input {
  width: 146px;
  padding: 0 10px;
}

.purchase-location-nav {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.purchase-location-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.purchase-location-nav-head strong {
  color: var(--ink);
  font-size: 14px;
}

.purchase-location-nav-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.purchase-location-back {
  display: none;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #8bc7bd;
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.purchase-location-audit-toggle {
  min-height: 32px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.purchase-location-audit-toggle:hover,
.purchase-location-audit-toggle.is-active {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.purchase-location-audit-toggle.is-hidden {
  display: none;
}

.purchase-location-nav-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.purchase-shop-filter {
  display: none;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfb;
}

.purchase-shop-filter.is-active {
  display: grid;
}

.purchase-shop-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.purchase-shop-filter-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.purchase-shop-filter-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.purchase-shop-filter-head button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.purchase-shop-filter-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.purchase-shop-filter-list::-webkit-scrollbar {
  display: none;
}

.purchase-shop-filter-button {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.purchase-shop-filter-button span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-shop-filter-button strong {
  color: var(--ink);
  font-size: 13px;
}

.purchase-shop-filter-button em {
  color: inherit;
  font-size: 11px;
  font-style: normal;
  opacity: 0.72;
}

.purchase-shop-filter-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.purchase-shop-filter-button.is-active strong {
  color: #ffffff;
}

body:not(.purchase-view) .purchase-shop-filter {
  display: none;
}

.mobile-purchase-page-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 220px));
  gap: 10px;
  width: min(100%, 460px);
  margin-bottom: 12px;
}

body:not(.purchase-view) .mobile-purchase-page-tabs,
.mobile-purchase-page-tabs.is-hidden {
  display: none;
}

.mobile-purchase-page-tab {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mobile-purchase-page-tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.purchase-location-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title count"
    "label count"
    "meta meta";
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 70px;
  padding: 10px 12px;
  border-color: var(--line);
  background: var(--surface-soft);
  box-shadow: none;
}

.purchase-location-button .purchase-location-title {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.purchase-location-button strong {
  grid-area: count;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.purchase-location-button small {
  grid-area: label;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: left;
}

.purchase-location-button em {
  grid-area: meta;
  overflow: hidden;
  color: #6b7c8d;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-location-button.is-active {
  border-color: #8bc7bd;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.purchase-location-button.is-active strong {
  background: var(--accent);
  color: #ffffff;
}

.purchase-location-button-done {
  background: #fff8e6;
}

.purchase-location-button-done strong {
  color: #b45309;
}

.purchase-location-button-done.is-active {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #78350f;
}

.purchase-location-button-done.is-active strong {
  background: #f59e0b;
}

.compact-empty {
  grid-column: 1 / -1;
  padding: 12px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.download-button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.download-button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.download-button.secondary:hover {
  background: var(--surface-soft);
}

.is-hidden {
  display: none !important;
}

.products-list {
  max-height: 440px;
  overflow: auto;
}

.list-load-more {
  display: grid;
  place-items: center;
  width: calc(100% - 24px);
  min-height: 42px;
  margin: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-weight: 800;
}

.list-load-more.is-complete {
  border-color: var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.product-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 70px 70px 70px;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.14s ease;
}

button.product-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-weight: 400;
  box-shadow: none;
}

.product-row:hover {
  background: var(--surface-soft);
}

.product-thumb {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #f2f5f8;
}

.product-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: zoom-in;
}

.product-thumb-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.product-image-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 12px;
}

.product-main,
.order-main {
  min-width: 0;
}

.purchase-flavor-line,
.purchase-mobile-secondary {
  display: none;
}

.product-title,
.order-title {
  color: var(--ink);
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.order-title-line .order-title {
  flex: 1 1 auto;
}

.print-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.print-status.is-printed {
  background: #dcfce7;
  color: #166534;
}

.print-status.is-unprinted {
  background: #fff7ed;
  color: #9a3412;
}

.manual-complete-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.manual-complete-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.manual-complete-head strong,
.manual-image-info strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.manual-complete-head span,
.manual-image-info span,
.manual-complete-status {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.manual-complete-count {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong) !important;
  font-weight: 850 !important;
}

.manual-complete-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-complete-button,
.manual-image-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.manual-complete-button input {
  display: none;
}

.manual-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.manual-image-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.manual-image-preview {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: none;
  cursor: zoom-in;
}

.manual-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-meta,
.order-meta,
.order-context {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-address {
  margin-top: 7px;
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.purchase-shop-source-line {
  color: #506276;
  font-weight: 750;
}

.order-print-hint {
  margin-top: 6px;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
}

.product-counts {
  text-align: right;
}

.product-counts strong,
.product-counts span {
  display: block;
}

.product-counts strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.product-counts span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 32, 0.46);
}

.wuliu-package-modal {
  position: fixed;
  inset: 0;
  z-index: 142;
  display: grid;
  place-items: center;
  padding: 20px;
}

.wuliu-package-modal.is-hidden {
  display: none;
}

.wuliu-package-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.wuliu-package-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, white);
}

.wuliu-package-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.wuliu-package-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.wuliu-package-body,
.wuliu-photo-link-body {
  padding: 18px;
}

.wuliu-photo-link-panel {
  width: min(820px, 100%);
}

.wuliu-photo-link-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  align-items: start;
}

.wuliu-photo-link-order {
  display: grid;
  gap: 12px;
}

.wuliu-photo-link-order strong {
  font-size: 28px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.wuliu-photo-link-order p {
  margin: 0;
  color: var(--muted);
}

.wuliu-photo-link-order dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.wuliu-photo-link-order dt {
  color: var(--muted);
  font-size: 12px;
}

.wuliu-photo-link-order dd {
  margin: 2px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.wuliu-photo-link-qr {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wuliu-photo-link-qr img {
  width: min(240px, 70vw);
  aspect-ratio: 1;
  object-fit: contain;
}

.wuliu-photo-link-qr a {
  max-width: 100%;
  color: var(--accent);
  font-size: 12px;
  overflow-wrap: anywhere;
  text-align: center;
}

.wuliu-photo-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.wuliu-photo-link-actions button,
.wuliu-photo-link-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.wuliu-photo-link-actions button:first-child,
.wuliu-photo-link-actions a {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent-strong);
}

.wuliu-photo-link-status {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
}

.wuliu-photo-link-status.is-error {
  color: var(--red);
}

.wuliu-photo-link-status.is-success {
  color: var(--green);
}

@media (max-width: 640px) {
  .wuliu-package-modal {
    padding: 8px;
    align-items: stretch;
  }

  .wuliu-package-panel {
    max-height: calc(100vh - 16px);
    border-radius: 8px;
  }

  .wuliu-package-head {
    align-items: flex-start;
    padding: 12px;
  }

  .wuliu-photo-link-body,
  .wuliu-package-body {
    padding: 12px;
  }

  .wuliu-photo-link-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .wuliu-photo-link-order dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .wuliu-photo-link-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

body.wuliu-form-drawer-open {
  overflow: hidden;
}

.wuliu-form-drawer {
  position: fixed;
  inset: 0;
  z-index: 145;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 720px);
  justify-items: end;
}

.wuliu-drawer-backdrop {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.38);
  box-shadow: none;
}

.wuliu-drawer-panel {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(720px, calc(100vw - 32px));
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #ffffff;
  box-shadow: -24px 0 58px rgba(15, 23, 42, 0.22);
}

.wuliu-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.wuliu-drawer-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.wuliu-drawer-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.wuliu-drawer-head button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #ffffff;
}

.wuliu-drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #f8fbfb;
}

.wuliu-drawer-body .wuliu-sandbox-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.wuliu-drawer-body .wuliu-online-order-form {
  display: grid;
  gap: 12px;
  margin: 0;
}

.wuliu-drawer-body .wuliu-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wuliu-drawer-body .wuliu-form-grid label.is-wide,
.wuliu-drawer-body .wuliu-remark-field {
  grid-column: 1 / -1;
}

.wuliu-drawer-notice {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.wuliu-drawer-notice.is-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.wuliu-drawer-notice strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.wuliu-drawer-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.7;
}

.wuliu-drawer-notice button {
  justify-self: start;
  background: var(--accent);
  color: #ffffff;
}

.wuliu-category-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
}

.wuliu-category-field > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.wuliu-category-field > button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #0f8b7f;
  border-radius: 6px;
  background: #eefaf8;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.wuliu-category-field > button.is-clear {
  grid-column: 2;
  border-color: var(--line);
  background: #ffffff;
  color: var(--muted);
}

.wuliu-category-field > small,
.wuliu-category-selection {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.wuliu-category-picker-trigger {
  width: 100%;
  min-height: 40px;
  border: 1px solid #0f8b7f;
  border-radius: 6px;
  background: #eefaf8;
  color: #0f766e;
  font-weight: 900;
}

.wuliu-category-picker-trigger.wuliu-required-missing {
  border-color: #e11d48;
  background: #fff5f7;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.wuliu-category-tree-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f5faf9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-category-tree-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.wuliu-sandbox-table.is-category-tree {
  min-width: 1240px;
}

.wuliu-sandbox-table.is-category-tree th:nth-child(3),
.wuliu-sandbox-table.is-category-tree td:nth-child(3) {
  min-width: 310px;
}

.wuliu-category-tree-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding-left: calc(var(--category-depth, 0) * 24px);
}

.wuliu-category-tree-name > span {
  color: var(--ink);
  font-weight: 850;
}

.wuliu-category-tree-name em {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: #edf7f5;
  color: #0f766e;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.wuliu-category-tree-toggle,
.wuliu-category-tree-leaf {
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  min-height: 24px !important;
  padding: 0;
  border-radius: 5px;
}

.wuliu-category-tree-toggle {
  border: 1px solid #99cfc7;
  background: #eefaf8;
  color: #0f766e;
  font-size: 17px;
  font-weight: 900;
}

.wuliu-category-tree-leaf {
  color: #94a3b8;
  font-size: 18px;
}

body.wuliu-category-picker-open {
  overflow: hidden;
}

.wuliu-category-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 20px;
}

.wuliu-category-picker-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.5);
}

.wuliu-category-picker-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 40px));
  max-height: min(820px, calc(100dvh - 40px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.wuliu-category-picker-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f6faf9;
}

.wuliu-category-picker-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
}

.wuliu-category-picker-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-category-picker-panel > header > button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-weight: 850;
}

.wuliu-category-picker-search {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.wuliu-category-picker-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
}

.wuliu-category-picker-list {
  min-height: 260px;
  overflow: auto;
  padding: 8px;
  background: #fbfdfd;
}

.wuliu-category-picker-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 7px 10px 7px calc(10px + var(--category-depth, 0) * 24px);
  border: 0;
  border-bottom: 1px solid #edf1f3;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.wuliu-category-picker-row:hover,
.wuliu-category-picker-row:focus-visible,
.wuliu-category-picker-row.is-selected {
  background: #eaf7f5;
  outline: none;
}

.wuliu-category-picker-row:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.wuliu-category-picker-branch {
  color: #0f8b7f;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.wuliu-category-picker-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wuliu-category-picker-label strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wuliu-category-picker-label small,
.wuliu-category-picker-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.wuliu-category-picker-meta {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .wuliu-form-drawer {
    grid-template-columns: 1fr;
  }

  .wuliu-drawer-backdrop {
    display: none;
  }

  .wuliu-drawer-panel {
    grid-column: 1;
    width: 100%;
  }

  .wuliu-drawer-head,
  .wuliu-drawer-body {
    padding-inline: 14px;
  }

  .wuliu-drawer-body .wuliu-sandbox-form,
  .wuliu-drawer-body .wuliu-form-grid {
    grid-template-columns: 1fr;
  }

  .wuliu-drawer-body #wuliu-goods-form.is-order-manual-edit {
    grid-template-columns: 1fr;
  }

  .wuliu-category-picker-modal {
    padding: 0;
  }

  .wuliu-category-picker-panel {
    width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .wuliu-category-picker-row {
    min-height: 54px;
    padding-left: calc(8px + var(--category-depth, 0) * 18px);
  }

  .wuliu-category-tree-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(12, 18, 24, 0.7);
  box-shadow: none;
}

.image-preview-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  justify-items: center;
  max-width: min(920px, calc(100vw - 28px));
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.26);
}

.image-preview-panel img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(860px, calc(100vw - 56px));
  max-height: min(76vh, 720px);
  border-radius: 6px;
  object-fit: contain;
  background: #f2f5f8;
}

.image-preview-modal.is-fit-screen .image-preview-panel img {
  width: min(860px, calc(100vw - 56px));
  height: auto;
}

.image-preview-gallery {
  display: none;
}

.image-preview-modal.is-gallery .image-preview-panel {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  align-items: start;
}

.image-preview-modal.is-gallery .image-preview-panel > img,
.image-preview-modal.is-gallery #image-preview-toggle {
  display: none;
}

.image-preview-modal.is-gallery .image-preview-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  width: min(1060px, calc(100vw - 64px));
  max-height: min(72vh, 720px);
  overflow: auto;
  padding: 2px;
}

.image-preview-gallery-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.image-preview-gallery-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #eef1f4;
  border-radius: 6px;
  overflow: hidden;
  background: #f7f9fb;
  cursor: zoom-in;
}

.image-preview-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-preview-gallery-thumb.is-empty {
  cursor: default;
}

.image-preview-gallery-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.image-preview-gallery-text strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.image-preview-gallery-text span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.image-preview-panel figcaption {
  max-width: min(860px, calc(100vw - 56px));
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.image-preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.image-preview-panel button {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.manual-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 18, 24, 0.68);
}

.manual-editor-panel {
  display: flex;
  flex-direction: column;
  width: min(1040px, calc(100vw - 24px));
  max-height: min(900px, calc(100vh - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.manual-editor-head,
.manual-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.manual-editor-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.manual-editor-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.manual-editor-head span.is-error {
  color: #b42318;
}

.manual-editor-head span.is-success {
  color: #166534;
}

.manual-editor-toolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
  background: var(--surface-soft);
}

.manual-editor-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manual-editor-toolbar button,
.manual-editor-head button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.manual-editor-toolbar button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.manual-editor-canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px;
  overflow: auto;
  background: #101828;
}

.manual-editor-canvas-wrap canvas {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 210px);
  margin: 0 auto;
  background: #ffffff;
  touch-action: none;
  cursor: crosshair;
}

.product-detail-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1080px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.product-detail-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.product-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.product-detail-body {
  overflow: auto;
  padding: 18px;
}

.wuliu-legacy-order-view {
  display: grid;
  gap: 12px;
}

.wuliu-legacy-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.wuliu-legacy-view-head strong,
.wuliu-legacy-view-head span {
  display: block;
}

.wuliu-legacy-view-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.wuliu-legacy-view-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-legacy-order-list {
  display: grid;
  gap: 12px;
}

.wuliu-legacy-order-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.wuliu-legacy-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wuliu-legacy-order-head strong,
.wuliu-legacy-order-head p {
  display: block;
}

.wuliu-legacy-order-head strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
}

.wuliu-legacy-order-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.wuliu-legacy-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.wuliu-legacy-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.wuliu-legacy-actions button,
.wuliu-legacy-edit-button {
  min-height: 34px;
  padding: 0 12px;
  border-color: #1d75bd;
  background: #1d8bd1;
  color: #ffffff;
  font-weight: 900;
}

.wuliu-legacy-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.wuliu-legacy-meta div {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.wuliu-legacy-meta div:nth-child(4n) {
  border-right: 0;
}

.wuliu-legacy-meta div:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.wuliu-legacy-meta div.is-wide {
  grid-column: span 2;
}

.wuliu-legacy-meta dt,
.wuliu-legacy-meta dd {
  margin: 0;
}

.wuliu-legacy-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.wuliu-legacy-meta dd {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.wuliu-legacy-section {
  display: grid;
  gap: 8px;
}

.wuliu-legacy-section h4 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.wuliu-legacy-section h4 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wuliu-legacy-items {
  display: grid;
  gap: 7px;
}

.wuliu-legacy-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.wuliu-legacy-item > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eef3f6;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.wuliu-legacy-item strong,
.wuliu-legacy-item em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wuliu-legacy-item strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.wuliu-legacy-item em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}

.wuliu-legacy-item b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.wuliu-legacy-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.wuliu-legacy-photo {
  display: grid;
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: left;
  cursor: zoom-in;
}

.wuliu-legacy-photo img,
.wuliu-legacy-photo > span {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  background: #eef3f6;
}

.wuliu-legacy-photo > span {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.wuliu-legacy-photo small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.product-detail-overview {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-product-image {
  width: 118px;
  height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f2f5f8;
}

.detail-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-product-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 12px;
}

.detail-meta-grid label,
.sku-detail-meta label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta-grid span,
.sku-detail-meta span {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.detail-metrics {
  display: grid;
  gap: 8px;
}

.detail-metric {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-metric strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.detail-metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.sku-detail-section {
  margin-top: 16px;
}

.sku-detail-section h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}

.sku-detail-list {
  display: grid;
  gap: 8px;
}

.sku-detail-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 120px 104px;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sku-detail-thumb {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #f2f5f8;
}

.sku-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sku-detail-name {
  color: var(--ink);
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sku-detail-meta {
  display: grid;
  gap: 4px;
}

.sku-stock-value {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  text-align: right;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(460px, 1.22fr);
  gap: 18px;
  padding: 18px;
}

.detail-layout h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
}

.paths-list {
  display: grid;
  gap: 8px;
}

.path-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.path-item label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.path-item code {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-all;
}

.result-log {
  min-height: 320px;
  max-height: 520px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid #172032;
  border-radius: 6px;
  background: #101820;
  color: #d7f3ea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.order-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 18px;
  padding: 18px;
}

.picking-result-grid,
.purchase-result-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
}

.purchase-result-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.purchase-result-grid-single .purchase-missing-panel {
  display: none !important;
}

.order-list-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.order-list-panel.wide {
  grid-column: span 1;
}

.order-list-panel h3 {
  margin: 0;
  min-height: 42px;
  padding: 12px 14px 0;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}

.purchase-list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 42px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.purchase-list-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1 1 220px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}

.purchase-list-title span {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-location-complete-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 850;
}

.purchase-location-complete-button:disabled {
  border-color: var(--line);
  background: #edf1f5;
  color: var(--muted);
  cursor: default;
}

.purchase-category-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 14px;
  border-bottom: 1px solid #dde6ee;
  background: #f6f8fb;
  color: #536273;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.order-line-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.order-line-pager button {
  min-width: 74px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #cfd9e3;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
}

.order-line-pager button:disabled {
  background: #eef2f6;
  color: #98a2b3;
  cursor: default;
}

@media (max-width: 760px) {
  .order-line-pager {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    gap: 8px;
  }

  .order-line-pager span {
    grid-column: 1 / -1;
    order: -1;
    text-align: center;
    white-space: nowrap;
  }

  .order-line-pager button {
    width: 100%;
    min-width: 0;
  }
}

.purchase-completed-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff8e6;
}

.purchase-completed-panel strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.purchase-completed-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.purchase-completed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.purchase-completed-chip {
  display: grid;
  gap: 2px;
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid #f4d58d;
  border-radius: 6px;
  background: #ffffff;
}

.purchase-completed-chip strong,
.purchase-completed-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-readonly-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.purchase-readonly-status span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #15803d;
}

.purchase-readonly-status em {
  font-style: normal;
}

.purchase-readonly-status time {
  color: #475467;
  font-weight: 850;
}

.purchase-readonly-status strong {
  color: var(--ink);
  font-weight: 800;
}

.order-list {
  max-height: 460px;
  overflow: auto;
}

.compact-list {
  max-height: 360px;
}

.order-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 70px;
  gap: 14px;
  align-items: center;
  min-height: 86px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  transition: background 0.14s ease;
}

.order-item:hover {
  background: var(--surface-soft);
}

.order-item.is-long-pressing {
  background: #fef3c7;
  box-shadow: inset 4px 0 0 #f59e0b;
}

.order-item.is-purchase-complete-pending {
  background: #fef3c7;
  box-shadow: inset 4px 0 0 #f59e0b;
}

.order-item.is-purchase-complete {
  background: #dcfce7;
  box-shadow: inset 4px 0 0 var(--green);
}

.order-item.is-purchase-rollover {
  background: #fff8e6;
  box-shadow: inset 4px 0 0 #f59e0b;
}

.order-item.is-purchase-rollover-overdue {
  background: #fee2e2;
  box-shadow: inset 4px 0 0 #dc2626;
}

#pick-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
}

.picking-order-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.picking-order-card.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.pick-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.pick-card-title-wrap {
  min-width: 0;
}

.pick-card-order {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pick-card-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.pick-card-shop {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  line-height: 1;
  overflow-wrap: anywhere;
}

.pick-card-head-actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.pick-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 360px;
}

.pick-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.pick-card-badge.is-blocked {
  background: #fee2e2;
  color: #991b1b;
}

.pick-card-badge.is-muted {
  background: #e2e8f0;
  color: #334155;
}

.pick-card-delete {
  flex: 0 0 auto;
  min-width: 88px;
}

.pick-card-detail-button {
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 34px;
}

.pick-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
}

.pick-card-products {
  min-width: 0;
}

.pick-card-product {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.pick-card-product:last-child {
  border-bottom: 0;
}

.pick-card-thumb {
  width: 56px;
  height: 56px;
}

.pick-card-thumb .product-thumb-button,
.pick-card-thumb .product-image-empty {
  width: 56px;
  height: 56px;
}

.pick-card-product-main {
  min-width: 0;
}

.pick-card-product-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pick-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: hidden;
  max-height: 50px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.pick-card-meta span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-card-meta span:first-child {
  max-width: 100%;
}

.pick-card-meta span.is-purchase {
  background: #fff7ed;
  color: #c2410c;
}

.pick-card-quantity,
.pick-card-total {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.pick-card-quantity strong,
.pick-card-total strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.pick-card-side {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 12px;
  border-left: 1px solid var(--line);
  background: #fafafa;
}

.pick-card-footer {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: #fbfdff;
}

.pick-card-customer {
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.picking-detail-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.picking-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.picking-detail-kicker {
  display: block;
  margin-bottom: 4px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
}

.picking-detail-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.picking-detail-head p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.picking-detail-shop {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  padding: 0 8px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4f46e5;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picking-detail-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.picking-detail-back {
  min-width: 96px;
  min-height: 34px;
}

.picking-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.picking-detail-metrics .metric {
  min-height: 74px;
}

.picking-detail-stat {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #dbe6ef;
  border-radius: 8px;
  background: #fff;
}

.picking-detail-stat span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.picking-detail-stat strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picking-detail-stat.is-pending strong {
  color: #c2410c;
}

.picking-detail-stat.is-done strong {
  color: #047857;
}

.picking-detail-customer {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.picking-detail-products {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.picking-detail-products .pick-card-product {
  grid-template-columns: 48px minmax(0, 1fr) 54px;
  min-height: 66px;
  padding: 9px 10px;
}

.picking-detail-products .pick-card-thumb,
.picking-detail-products .pick-card-thumb .product-thumb-button,
.picking-detail-products .pick-card-thumb .product-image-empty {
  width: 48px;
  height: 48px;
}

.picking-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

body.picking-view #picking-section .section-head {
  min-height: 62px;
  padding: 13px 22px;
  background: #fff;
}

body.picking-view #picking-section .section-head h2 {
  font-size: 20px;
  font-weight: 900;
}

body.picking-view #picking-active-job-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

body.picking-view #picking-summary-grid.summary-grid.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--line);
}

body.picking-view #picking-summary-grid .metric {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 106px;
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 8px;
  background: #f8fafc;
}

body.picking-view #picking-summary-grid .metric label {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

body.picking-view #picking-summary-grid .metric strong {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1;
}

body.picking-view #picking-summary-grid .metric small {
  display: none;
}

body.picking-view .picking-result-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px 16px;
}

body.picking-view .picking-hidden-pending {
  display: none;
}

body.picking-view #picking-section .order-list-panel {
  border-color: #d8e2ea;
  border-radius: 10px;
  background: #fff;
}

body.picking-view #picking-section .picking-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  background: #fbfdff;
}

body.picking-view #picking-section .picking-panel-title-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.picking-view #picking-section .picking-panel-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

body.picking-view #picking-section .picking-panel-title small {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

body.picking-view #picking-section .picking-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto auto;
  align-items: center;
  gap: 8px;
  flex: 0 1 540px;
  margin: 0;
}

body.picking-view #picking-section .picking-search-form input {
  width: 100%;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #cfd9e3;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

body.picking-view #picking-section .picking-search-form button {
  min-width: 58px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cfd9e3;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

body.picking-view #picking-section .picking-search-form button[type="submit"] {
  border-color: #1f7a76;
  background: #257f7b;
  color: #fff;
}

body.picking-view #picking-section .picking-search-form button:disabled {
  opacity: 0.48;
  cursor: default;
}

body.picking-view #pick-list {
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
}

body.picking-view #pick-list .picking-order-card {
  flex: 0 0 auto;
  border-color: #dce5ed;
  border-radius: 8px;
  background: #fff;
}

body.picking-view #pick-list .picking-order-card.is-active {
  border-color: #2563eb;
  background: #f8fbff;
  box-shadow: inset 4px 0 0 #2563eb;
}

body.picking-view #pick-list .pick-card-head {
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  border-bottom: 0;
  background: transparent;
}

body.picking-view #pick-list .picking-order-card:not(.is-active) .pick-card-body,
body.picking-view #pick-list .picking-order-card:not(.is-active) .pick-card-footer {
  display: none;
}

body.picking-view #pick-list .pick-card-order {
  font-size: 15px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.picking-view #pick-list .pick-card-shop {
  border-radius: 6px;
}

body.picking-view #pick-list .pick-card-customer-preview {
  min-width: 0;
  overflow: hidden;
  color: #475569;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.picking-view #pick-list .pick-card-head-actions {
  align-items: center;
  gap: 8px;
}

body.picking-view #pick-list .pick-card-badges {
  align-items: center;
  justify-content: flex-end;
  max-width: 230px;
}

body.picking-view #pick-list .print-status,
body.picking-view #pick-list .pick-card-badge {
  border-radius: 6px;
}

body.picking-view #pick-list .pick-card-detail-button,
body.picking-view #pick-list .pick-card-delete {
  min-width: 58px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

body.picking-view #pick-list .pick-card-body {
  grid-template-areas:
    "products products products"
    "customer total actions";
  grid-template-columns: minmax(0, 1fr) 112px 120px;
  border-top: 1px solid #edf2f7;
}

body.picking-view #pick-list .pick-card-products {
  grid-area: products;
  display: grid;
  min-width: 0;
  background: #fff;
}

body.picking-view #pick-list .pick-card-product {
  grid-template-columns: 72px minmax(0, 1fr) 56px;
  min-height: 88px;
  padding: 12px 16px;
}

body.picking-view #pick-list .pick-card-thumb,
body.picking-view #pick-list .pick-card-thumb .product-thumb-button,
body.picking-view #pick-list .pick-card-thumb .product-image-empty {
  width: 72px;
  height: 72px;
  border-radius: 8px;
}

body.picking-view #pick-list .pick-card-thumb {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

body.picking-view #pick-list .pick-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.picking-view #pick-list .pick-card-customer-cell,
body.picking-view #pick-list .pick-card-inline-actions {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border-left: 1px solid #edf2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

body.picking-view #pick-list .pick-card-customer-cell {
  grid-area: customer;
}

body.picking-view #pick-list .pick-card-customer-cell strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

body.picking-view #pick-list .pick-card-customer-cell small {
  color: var(--muted);
  line-height: 1.35;
}

body.picking-view #pick-list .pick-card-side {
  grid-area: total;
  border-left: 1px solid #edf2f7;
  background: #fff;
}

body.picking-view #pick-list .pick-card-total strong {
  font-size: 28px;
}

body.picking-view #pick-list .pick-card-inline-actions {
  grid-area: actions;
  justify-items: stretch;
}

body.picking-view #pick-list .pick-card-inline-actions .print-status,
body.picking-view #pick-list .pick-card-inline-actions .order-delete-button {
  width: 100%;
}

body.picking-view .picking-inline-pending {
  overflow: hidden;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}

body.picking-view .picking-inline-pending-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  font-weight: 850;
}

body.picking-view .picking-inline-pending-list {
  background: #fff;
}

body.picking-view #pending-list {
  max-height: min(72vh, 760px);
  background: #fff;
}

body.picking-view .picking-detail-panel {
  gap: 10px;
  padding: 14px;
}

body.picking-view .picking-detail-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: 15px 16px;
  background: #f8fbff;
}

body.picking-view .picking-detail-head-actions .download-button {
  min-height: 34px;
  padding: 0 14px;
}

body.picking-view .picking-detail-head h3 {
  font-size: 18px;
  font-weight: 900;
}

body.picking-view .picking-detail-back {
  min-width: 96px;
}

body.picking-view .picking-detail-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.picking-view .picking-detail-metrics .metric {
  min-height: 64px;
  padding: 10px 11px;
}

body.picking-view .picking-detail-metrics .metric label {
  font-size: 11px;
}

body.picking-view .picking-detail-metrics .metric strong {
  font-size: 22px;
}

body.picking-view .picking-detail-customer {
  background: #fbfdff;
}

body.picking-view .picking-detail-products {
  display: grid;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.picking-view .picking-detail-products .pick-card-product {
  grid-template-columns: 58px minmax(0, 1fr) 48px;
  min-height: 78px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

body.picking-view .picking-detail-products .pick-card-thumb,
body.picking-view .picking-detail-products .pick-card-thumb .product-thumb-button,
body.picking-view .picking-detail-products .pick-card-thumb .product-image-empty {
  width: 58px;
  height: 58px;
  border-radius: 8px;
}

body.picking-view .picking-detail-products .pick-card-product-title {
  font-weight: 850;
  line-height: 1.35;
}

body.picking-view .picking-detail-products .pick-card-quantity strong {
  font-size: 20px;
}

body.picking-view .picking-detail-actions {
  position: sticky;
  bottom: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 11px 0 0;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

@media (max-width: 760px) {
  body.picking-view #picking-summary-grid.summary-grid.compact {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  body.picking-view .picking-result-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  body.picking-view #picking-section .picking-panel-title {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
  }

  body.picking-view #picking-section .picking-search-form {
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
    flex-basis: auto;
  }

  body.picking-view #pick-list .pick-card-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.picking-view #pick-list .pick-card-body {
    grid-template-areas:
      "products"
      "customer"
      "total"
      "actions";
    grid-template-columns: 1fr;
  }

  body.picking-view #pick-list .pick-card-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.picking-view #pick-list .pick-card-badges {
    justify-content: flex-start;
    max-width: none;
  }

  body.picking-view #pick-list .pick-card-detail-button,
  body.picking-view #pick-list .pick-card-delete {
    width: 100%;
  }

  body.picking-view #pick-list .pick-card-customer-cell,
  body.picking-view #pick-list .pick-card-side,
  body.picking-view #pick-list .pick-card-inline-actions {
    border-top: 1px solid #edf2f7;
    border-left: 0;
  }

  body.picking-view .picking-detail-head,
  body.picking-view .picking-detail-metrics {
    grid-template-columns: 1fr;
  }

  body.picking-view #pending-list {
    max-height: none;
  }

  body.picking-view .picking-detail-head-actions {
    justify-content: stretch;
  }

  body.picking-view .picking-detail-head-actions > * {
    width: 100%;
  }
}

@media (max-width: 460px) {
  body.picking-view #picking-section .picking-search-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body.picking-view #picking-section .picking-search-form input {
    grid-column: 1 / -1;
  }

  body.picking-view #picking-section .picking-search-form button {
    width: 100%;
    min-width: 0;
  }
}

.order-item.is-purchase-complete .order-title {
  color: #14532d;
}

.order-item.is-purchase-complete-pending .order-title {
  color: #713f12;
}

.order-reason {
  margin-top: 7px;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.45;
}

.purchase-rollover-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 7px;
  color: #92400e;
  font-size: 11px;
  font-weight: 850;
}

.purchase-rollover-hint span,
.purchase-rollover-hint em {
  padding: 3px 7px;
  border-radius: 999px;
  background: #fef3c7;
  font-style: normal;
}

.order-item.is-purchase-rollover-overdue .purchase-rollover-hint {
  color: #991b1b;
}

.order-item.is-purchase-rollover-overdue .purchase-rollover-hint span,
.order-item.is-purchase-rollover-overdue .purchase-rollover-hint em {
  background: #fecaca;
}

.purchase-link {
  display: inline-block;
  margin-top: 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.purchase-link:hover {
  text-decoration: underline;
}

.purchase-override-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.purchase-override-control.purchase-location-inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.purchase-audit-mode .order-item.is-purchase-audit {
  border-color: #8bc7bd;
  background: #fbfffe;
}

.purchase-audit-mode .order-item.is-purchase-audit .purchase-location-inline-control .purchase-override-summary {
  border-color: #8bc7bd;
}

.purchase-override-control.is-audit-flash .purchase-override-summary {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.purchase-location-inline-control .purchase-override-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #b9d8e8;
  border-radius: 6px;
  background: #f8fcfb;
}

.purchase-override-summary-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.purchase-override-summary-main small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.purchase-override-summary-main strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-override-summary-backup {
  grid-column: 1 / -1;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-override-summary-backup.is-empty {
  display: none;
}

.purchase-override-toggle {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.purchase-override-toggle:hover,
.purchase-override-toggle[aria-expanded="true"] {
  background: var(--accent);
  color: #ffffff;
}

.purchase-override-editor[hidden] {
  display: none;
}

.purchase-override-editor {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.purchase-location-inline-control .purchase-confirm-choice-block {
  gap: 5px;
  padding: 7px 8px;
  border-radius: 6px;
}

.purchase-location-inline-control .purchase-confirm-choice-head small,
.purchase-location-inline-control .purchase-location-filter span {
  display: none;
}

.purchase-location-inline-control .purchase-location-categories button,
.purchase-location-inline-control .purchase-location-filter input {
  min-height: 26px;
  font-size: 11px;
}

.purchase-location-inline-control .purchase-primary-list,
.purchase-location-inline-control .purchase-backup-list {
  max-height: 66px;
  overflow: auto;
  padding-right: 2px;
}

.purchase-location-inline-control .purchase-primary-chip,
.purchase-location-inline-control .purchase-backup-chip {
  min-height: 26px;
  padding: 0 7px;
  font-size: 11px;
}

.purchase-location-inline-control .purchase-primary-chip input,
.purchase-location-inline-control .purchase-backup-chip input {
  width: 12px;
  height: 12px;
}

.purchase-override-fields {
  width: 100%;
}

.purchase-override-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.purchase-override-actions [data-purchase-override-status] {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.purchase-override-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.purchase-override-control select {
  min-width: min(260px, 100%);
  min-height: 32px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.library-sku-purchase-control {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
  max-width: 100%;
}

.library-purchase-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.library-purchase-actions {
  align-items: center;
}

.library-purchase-actions .purchase-override-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.purchase-confirm-button {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.purchase-confirm-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.purchase-status-panel {
  margin-top: 10px;
}

.purchase-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.purchase-status-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.purchase-status-button,
.purchase-note-button,
.purchase-status-save {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.purchase-status-button.is-active {
  border-color: var(--accent);
  background: #e8f5f2;
  color: var(--accent);
}

.purchase-status-button.is-active.is-complete {
  border-color: var(--green);
  background: #e7f8f1;
  color: var(--green);
}

.purchase-status-button:disabled,
.purchase-note-button:disabled,
.purchase-status-save:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.purchase-status-details {
  display: none;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.purchase-status-details.is-open {
  display: flex;
}

.purchase-status-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.purchase-status-field input {
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.purchase-status-field input[data-purchased-quantity] {
  width: 84px;
}

.purchase-note-field input {
  width: min(320px, 52vw);
}

.purchase-status-save {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.purchase-override-status {
  min-width: 42px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.empty,
.empty-state {
  padding: 24px 18px;
  color: var(--muted);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}

.picking-empty-state {
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 156px;
  margin: 14px;
  border-color: #b8c6d1;
  background: #f8fafc;
  color: var(--ink);
}

.picking-empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.picking-empty-state span {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.picking-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.picking-empty-actions .download-button {
  min-width: 104px;
}

.login-shell {
  width: min(420px, 100%);
}

.login-panel {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.login-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-panel p {
  margin: 7px 0 0;
  color: var(--muted);
}

.login-panel label,
.account-panel label,
.account-row label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.login-panel input,
.account-panel input,
.account-panel select,
.account-panel textarea,
.account-row input,
.account-row select {
  width: 100%;
  padding: 0 10px;
}

.login-panel input {
  min-height: 42px;
  padding: 0 12px;
}

.login-panel .login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfc;
  color: var(--ink);
}

.login-panel .login-remember input {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--teal);
}

.login-panel .login-remember span {
  display: grid;
  gap: 2px;
}

.login-panel .login-remember strong {
  font-size: 13px;
  line-height: 1.2;
}

.login-panel .login-remember small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.login-error {
  min-height: 36px;
  padding: 9px 12px;
  border: 1px solid #f3b5bc;
  border-radius: 6px;
  background: #fff1f3;
  color: var(--red);
}

.account-shell {
  max-width: 1220px;
}

.settings-shell {
  max-width: 1280px;
}

.notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 750;
}

.notice.success {
  border: 1px solid #bdebdc;
  background: #effbf7;
  color: var(--green);
}

.notice.error {
  border: 1px solid #f3b5bc;
  background: #fff1f3;
  color: var(--red);
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(480px, 0.95fr) minmax(360px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(320px, 0.88fr);
  gap: 18px;
  align-items: start;
}

.profile-request-panel {
  grid-column: 1 / -1;
}

.profile-summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-summary-list div {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.profile-summary-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-summary-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-request-panel textarea {
  min-height: 92px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  resize: vertical;
}

.account-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.settings-panel textarea {
  min-height: 520px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-preview-list {
  display: grid;
  gap: 8px;
}

.settings-preview-row {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.settings-preview-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.settings-preview-row span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.account-list-panel {
  gap: 12px;
}

.compact-head {
  min-height: 48px;
  margin: -18px -18px 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.account-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-bottom: 2px;
}

.account-row-main strong,
.account-row-main span,
.account-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row-main strong {
  color: var(--ink);
  font-size: 14px;
}

.account-row-main span {
  color: var(--muted);
  font-size: 12px;
}

.account-row-main small {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.account-fields-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 96px;
  gap: 10px;
  align-items: end;
}

.account-edit-options {
  display: grid;
  gap: 10px;
}

.account-row-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.account-row-actions .danger-button {
  height: 100%;
  min-height: 42px;
  padding-inline: 16px;
}

.option-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

details.option-section {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

details.option-section summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.option-section-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.option-grid {
  display: grid;
  gap: 8px;
}

.role-option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permission-option-grid,
.purchase-location-option-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-card {
  display: flex !important;
  align-items: flex-start;
  gap: 9px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink) !important;
  position: relative;
}

.compact-option-card {
  min-height: 62px;
}

.option-card input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
}

.option-card strong,
.option-card small {
  display: block;
}

.option-card strong {
  color: var(--ink);
  font-size: 13px;
}

.option-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.role-option-card {
  align-items: center;
  min-height: 52px;
  overflow: visible;
}

.role-option-card:hover,
.role-option-card:focus-within {
  z-index: 12;
  border-color: var(--accent);
}

.compact-option-card.role-option-card {
  min-height: 48px;
}

.role-option-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.role-option-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.role-help-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.role-option-audience {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.role-hover-tip {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 20;
  display: block;
  width: max-content;
  max-width: min(320px, calc(100vw - 48px));
  padding: 8px 9px;
  border: 1px solid rgba(16, 24, 32, 0.2);
  border-radius: 6px;
  background: #101820;
  box-shadow: var(--shadow-soft);
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: normal;
}

.role-hover-tip-title {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.role-hover-tip-items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.role-hover-tip-items span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}

.role-hover-tip::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 1px solid rgba(16, 24, 32, 0.2);
  border-left: 1px solid rgba(16, 24, 32, 0.2);
  background: #101820;
  transform: translateX(-50%) rotate(45deg);
}

.role-option-card:hover .role-hover-tip,
.role-option-card:focus-within .role-hover-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.option-check {
  align-items: center;
  justify-content: flex-start;
  min-height: 52px;
  gap: 8px;
  padding: 8px 10px;
}

.option-check span {
  display: block;
  min-width: 0;
  overflow: visible;
  line-height: 1.28;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.effective-permissions {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.effective-permissions strong {
  color: var(--ink);
  font-size: 12px;
}

.effective-permissions span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.check-line {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink) !important;
}

.check-line input {
  flex: 0 0 auto;
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.check-line.option-check {
  align-items: center;
  justify-content: flex-start;
  min-height: 52px;
  gap: 8px;
  padding: 8px 10px;
}

@media (max-width: 1100px) {
  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .quick-nav {
    order: 5;
    width: 100%;
  }
}

@media (max-width: 920px) {
  .app-shell {
    width: min(100vw - 16px, 760px);
    padding-top: 10px;
  }

  .topbar,
  .overview-panel,
  .workspace,
  .order-workspace,
  .wuliu-library-toolbar,
  .wuliu-ruoyi-search,
  .wuliu-sandbox-layout,
  .wuliu-sandbox-form,
  .wuliu-photo-form,
  .wuliu-order-form,
  .wuliu-printer-form,
  .wuliu-form-grid,
  .wuliu-address-tools,
  .wuliu-template-layout,
  .wuliu-template-grid,
  .wuliu-sandbox-goods,
  .packing-trial-toolbar,
  .packing-local-edit,
  .account-layout,
  .settings-layout,
  .profile-layout,
  .detail-layout,
  .product-row,
  .order-result-grid {
    grid-template-columns: 1fr;
  }

  .pick-card-head,
  .pick-card-body {
    grid-template-columns: 1fr;
  }

  .pick-card-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pick-card-badges {
    justify-content: flex-start;
    max-width: none;
  }

  .pick-card-delete {
    width: 100%;
  }

  .pick-card-detail-button {
    width: 100%;
  }

  .pick-card-side {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .picking-detail-head,
  .picking-detail-metrics {
    grid-template-columns: 1fr;
  }

  .picking-detail-back {
    width: 100%;
  }

  .picking-detail-actions {
    justify-content: stretch;
  }

  .picking-detail-actions > * {
    width: 100%;
  }

  .wuliu-ruoyi-search.is-scan,
  .wuliu-ruoyi-search.is-photo,
  .wuliu-scan-card dl,
  .wuliu-photo-card dl {
    grid-template-columns: 1fr;
  }

  .wuliu-tab-submenu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 0;
    padding-left: 12px;
  }

  .wuliu-photo-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .wuliu-photo-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .wuliu-photo-card-actions > * {
    width: 100%;
    justify-content: center;
  }

  .wuliu-photo-sync-card {
    align-items: stretch;
    flex-direction: column;
  }

  .wuliu-remark-field {
    grid-column: auto;
  }

  .wuliu-inline-field-actions {
    grid-template-columns: 1fr;
  }

  .wuliu-printer-status {
    white-space: normal;
  }

  .wuliu-form-grid label.is-wide {
    grid-column: auto;
  }

  .topbar {
    position: static;
    display: grid;
    width: 100%;
    gap: 12px;
    padding: 10px;
  }

  .brand-block,
  .top-actions {
    width: 100%;
  }

  .brand-block > div {
    min-width: 0;
  }

  .top-actions {
    justify-content: flex-start;
    gap: 8px;
  }

  .quick-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 4px;
    overflow: visible;
    border-radius: 8px;
  }

  .quick-nav a {
    min-width: 0;
    min-height: 36px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .server-pill,
  .user-pill,
  .plain-link,
  .topbar form button[type="submit"] {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .overview-copy {
    min-height: 0;
  }

  .overview-copy h2 {
    font-size: 27px;
  }

  .home-nav-panel {
    min-height: auto;
    padding: 18px;
  }

  .home-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-title-row h2 {
    font-size: 28px;
  }

  .home-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-status-grid,
  .workflow-panel {
    grid-template-columns: 1fr;
  }

  .daily-purchase-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-purchase-actions {
    justify-content: flex-start;
  }

  .stock-in-panel {
    grid-template-columns: 1fr 112px;
  }

  .stock-in-panel .camera-button,
  .stock-in-panel button[type="submit"] {
    grid-column: 1 / -1;
    width: 100%;
  }

  .stock-scanner-panel {
    grid-template-columns: 1fr;
  }

  .section-head,
  .panel-title-row,
  .upload-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions,
  .library-actions {
    flex-wrap: wrap;
  }

  .product-row,
  .order-item {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .order-title-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .product-detail-panel {
    width: min(100vw - 20px, 760px);
  }

  .product-detail-overview,
  .sku-detail-row {
    grid-template-columns: 1fr;
  }

  .detail-product-image,
  .sku-detail-thumb {
    width: 72px;
    height: 72px;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .sku-stock-value {
    text-align: left;
  }

  .product-counts {
    display: flex;
    gap: 14px;
    text-align: left;
  }

  .purchase-location-nav-list {
    grid-template-columns: 1fr;
  }

  .purchase-location-button {
    min-height: 76px;
  }

  .purchase-overview-mode .purchase-result-grid {
    display: none;
  }

  .purchase-location-page .purchase-location-nav-list {
    display: none;
  }

  .purchase-location-page .purchase-location-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .purchase-completed-page.purchase-overview-mode .purchase-location-back {
    display: none;
  }

  .purchase-location-page .purchase-summary-grid {
    display: none;
  }

  .purchase-location-page .purchase-result-grid .order-list-panel:not(.wide) {
    display: none;
  }

  .purchase-location-page .order-list {
    max-height: none;
  }

  .account-row {
    grid-template-columns: 1fr;
  }

  .account-fields-grid,
  .account-row-actions,
  .role-option-grid,
  .permission-option-grid,
  .purchase-location-option-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .overview-actions a,
  .download-button,
  .plain-link,
  button {
    width: 100%;
  }

  .server-pill,
  .user-pill {
    flex: 1 1 auto;
  }

  .drop-zone {
    min-height: 220px;
  }

  .quick-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-nav-grid {
    grid-template-columns: 1fr;
  }

  .home-nav-card {
    min-height: 132px;
    padding: 18px;
  }

  .stock-in-panel {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .template-card-head {
    display: grid;
  }

  .template-card-actions {
    max-width: none;
    justify-items: start;
  }

  .template-card-head em {
    max-width: none;
    text-align: left;
  }

  .template-pill {
    width: auto;
  }

  .purchase-location-button,
  .purchase-location-back,
  .product-thumb-button,
  .purchase-confirm-button,
  .purchase-status-button,
  .purchase-note-button,
  .purchase-status-save,
  .image-preview-panel button {
    width: auto;
  }

  .purchase-location-back {
    flex: 1 1 100%;
  }

  .image-preview-modal {
    padding: 10px;
  }

  .image-preview-panel {
    padding: 10px;
  }
}

@media (max-width: 380px) {
  .quick-nav {
    grid-template-columns: 1fr;
  }
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  body.purchase-view.purchase-shop-filter-open {
    padding-bottom: calc(148px + env(safe-area-inset-bottom));
  }

  .app-shell {
    width: 100%;
    padding: 8px 8px 18px;
  }

  .topbar {
    position: static;
    z-index: 30;
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 0 0 10px 10px;
    border-top: 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .topbar h1 {
    font-size: 17px;
    white-space: nowrap;
  }

  .topbar p,
  .quick-nav,
  .server-pill {
    display: none;
  }

  .top-actions {
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .user-pill,
  .plain-link,
  .topbar form button[type="submit"] {
    flex: 0 0 auto;
    width: auto;
    min-height: 30px;
    padding: 0 9px;
    font-size: 11px;
  }

  .topbar form {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0;
  }

  .topbar .user-pill {
    max-width: min(58vw, 220px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .packing-trial-notice,
  .packing-order-head,
  .packing-order-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .packing-trial-list {
    padding: 8px;
  }

  .packing-trial-toolbar {
    padding: 10px;
  }

  .packing-local-edit {
    padding: 10px;
  }

  .packing-items {
    min-width: 560px;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 80;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 4px;
    min-height: 58px;
    padding: 6px;
    border: 1px solid rgba(185, 200, 212, 0.84);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 46px rgba(16, 24, 40, 0.18);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
  }

  .mobile-bottom-nav a.is-active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
  }

  .purchase-shop-filter.is-active {
    position: fixed;
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 79;
    padding: 9px;
    border: 1px solid rgba(185, 200, 212, 0.88);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 16px 42px rgba(16, 24, 40, 0.18);
    backdrop-filter: blur(14px);
  }

  .purchase-shop-filter-head {
    gap: 8px;
  }

  .purchase-shop-filter-head strong {
    font-size: 12px;
  }

  .purchase-shop-filter-head span {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .purchase-shop-filter-head button {
    flex: 0 0 auto;
    width: auto;
    min-height: 28px;
  }

  .purchase-shop-filter-list {
    margin-right: -9px;
    margin-left: -9px;
    padding: 0 9px 2px;
  }

  .purchase-shop-filter-button {
    width: auto;
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .home-nav-panel,
  .library-panel,
  .workspace,
  .order-workspace,
  .result-panel,
  .queue-panel,
  .upload-panel,
  .order-list-panel {
    border-radius: 10px;
  }

  .home-nav-panel {
    padding: 14px;
  }

  .home-title-row {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .home-title-row h2 {
    margin-top: 8px;
    font-size: 23px;
  }

  .home-title-row p {
    font-size: 13px;
  }

  .home-nav-card {
    min-height: 96px;
    padding: 14px;
  }

  .home-nav-card strong {
    margin-top: 8px;
    font-size: 18px;
  }

  .home-nav-card small {
    padding-top: 8px;
  }

  .section-head {
    gap: 10px;
    padding: 12px;
  }

  .section-head h2,
  .panel-title-row h2 {
    font-size: 18px;
  }

  body.picking-view #picking-section .section-actions,
  body.purchase-view #purchase-section .section-actions {
    position: sticky;
    bottom: calc(74px + env(safe-area-inset-bottom));
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(185, 200, 212, 0.84);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 34px rgba(16, 24, 40, 0.14);
    backdrop-filter: blur(14px);
  }

  body.picking-view #picking-section .section-actions span,
  body.purchase-view #purchase-section .section-actions span {
    grid-column: 1 / -1;
    min-height: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
  }

  body.purchase-view #purchase-section .section-actions .purchase-refresh-status {
    min-height: 30px;
    padding: 0 9px;
    color: #1d4ed8;
    white-space: normal;
  }

  body.picking-view #picking-section .download-button,
  body.purchase-view #purchase-section .download-button {
    width: auto;
    min-height: 42px;
    padding: 0 10px;
    font-size: 13px;
  }

  .daily-purchase-bar {
    padding: 12px;
  }

  .purchase-bottom-tools {
    order: 9;
    padding: 12px;
  }

  .purchase-bottom-tools > .download-button {
    width: 100%;
    min-height: 44px;
  }

  .purchase-location-page .purchase-bottom-tools,
  .purchase-location-page .daily-purchase-bar,
  .purchase-location-page #purchase-summary-grid {
    display: none;
  }

  .daily-purchase-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .daily-purchase-actions input,
  .daily-purchase-actions button,
  .daily-purchase-actions a {
    width: 100%;
    min-height: 42px;
  }

  .purchase-location-nav {
    padding: 12px;
  }

  .mobile-purchase-page-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-purchase-page-tab {
    width: 100%;
    min-height: 38px;
  }

  .purchase-location-nav-head {
    gap: 8px;
  }

  .purchase-location-nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .purchase-location-button {
    min-height: 64px;
    padding: 8px 9px;
    scroll-snap-align: none;
  }

  .purchase-location-button .purchase-location-title {
    font-size: 12px;
  }

  .purchase-location-button strong {
    min-width: 34px;
    min-height: 34px;
    font-size: 16px;
  }

  .purchase-location-button em {
    display: none;
  }

  .purchase-location-page .purchase-location-nav-list {
    display: none;
  }

  .purchase-location-back {
    min-height: 38px;
  }

  .summary-grid.compact,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric,
  .summary-grid.compact .metric {
    min-height: 72px;
    padding: 12px;
  }

  .order-result-grid {
    padding: 10px;
  }

  .order-list-panel h3 {
    min-height: 38px;
    padding: 10px 12px 0;
  }

  .order-list,
  .compact-list,
  .products-list,
  .jobs-list {
    max-height: none;
  }

  .order-item {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-height: 0;
    padding: 8px 10px;
  }

  .order-item[data-order-mode="purchase"] {
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
  }

  .order-item[data-order-mode="purchase"].is-purchase-complete,
  .order-item[data-order-mode="purchase"].is-purchase-complete-pending {
    background: #fef3c7;
    box-shadow: inset 4px 0 0 #f59e0b;
  }

  .order-item[data-order-mode="purchase"].is-purchase-complete .order-title,
  .order-item[data-order-mode="purchase"].is-purchase-complete-pending .order-title {
    color: #713f12;
  }

  .order-item .product-thumb {
    width: 48px;
    height: 48px;
  }

  .order-item .product-counts {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 6px;
    padding-left: 58px;
  }

  .order-item .product-counts strong {
    font-size: 19px;
  }

  .order-title,
  .product-title {
    font-size: 13px;
    white-space: normal;
    line-height: 1.28;
  }

  .order-meta,
  .order-context,
  .product-meta {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .order-address,
  .order-print-hint,
  .order-reason,
  .purchase-link {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.3;
  }

  .purchase-status-panel {
    margin-top: 6px;
  }

  .purchase-status-header {
    margin-bottom: 4px;
    gap: 4px;
    font-size: 10px;
  }

  .purchase-status-header .purchase-override-label,
  .purchase-status-header .purchase-override-status {
    font-size: 10px;
    line-height: 1.25;
  }

  .purchase-status-header .purchase-note-button {
    width: auto;
    min-height: 26px;
    padding: 0 8px;
    font-size: 10px;
  }

  .purchase-status-details {
    gap: 5px;
    margin-top: 5px;
  }

  .purchase-status-field {
    font-size: 10px;
    gap: 4px;
  }

  .purchase-status-field input {
    min-height: 28px;
    font-size: 11px;
  }

  .purchase-override-control,
  .purchase-status-buttons,
  .manual-complete-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .purchase-override-label,
  .purchase-override-status,
  .purchase-status-header,
  .manual-complete-status {
    grid-column: 1 / -1;
  }

  .purchase-override-control select,
  .purchase-confirm-button,
  .purchase-status-button,
  .purchase-note-button,
  .purchase-status-save,
  .manual-complete-button,
  .manual-image-edit-button {
    width: 100%;
    min-height: 28px;
    padding: 0 7px;
    font-size: 10px;
  }

  .purchase-status-button[data-purchase-status-action="已采购"],
  .purchase-status-button[data-purchase-status-action="未采购"] {
    display: none;
  }

  .manual-complete-panel {
    padding: 12px;
  }

  .manual-complete-head {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .manual-image-grid {
    grid-template-columns: 1fr;
  }

  .manual-editor-modal {
    padding: 0;
  }

  .manual-editor-panel {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .manual-editor-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .manual-editor-toolbar button {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  .manual-editor-canvas-wrap {
    min-height: 0;
  }
}

@media (max-width: 420px) {
  .mobile-bottom-nav {
    right: 6px;
    left: 6px;
  }

  .mobile-bottom-nav a {
    font-size: 12px;
  }

  .summary-grid.compact,
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .purchase-override-control,
  .purchase-status-buttons,
  .manual-complete-actions {
    grid-template-columns: 1fr;
  }
}

/* Visual polish layer for the web workbench. Keep this CSS-only. */
:root {
  --bg: #edf2f6;
  --bg-strong: #dde7ef;
  --surface-soft: #f8fafb;
  --line: #d9e3ea;
  --line-strong: #aebfcb;
  --radius: 10px;
  --shadow: 0 18px 42px rgba(18, 33, 48, 0.09);
  --shadow-soft: 0 10px 26px rgba(18, 33, 48, 0.07);
}

body {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.09) 0, rgba(15, 118, 110, 0.015) 230px, transparent 380px),
    linear-gradient(180deg, #f8fafb 0, var(--bg) 560px, #e7edf2 100%);
}

.app-shell {
  width: min(1500px, calc(100vw - 28px));
  padding-top: 16px;
}

.topbar {
  min-height: 76px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-color: rgba(174, 191, 203, 0.76);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(18, 33, 48, 0.08);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(145deg, #0c3740, var(--accent));
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.22);
}

.topbar h1 {
  font-size: 24px;
}

.top-actions {
  max-width: 100%;
}

.quick-nav {
  max-width: min(56vw, 780px);
  overflow-x: auto;
  border-color: rgba(217, 227, 234, 0.95);
  background: #f4f7f9;
  scrollbar-width: none;
}

.quick-nav::-webkit-scrollbar {
  display: none;
}

.quick-nav a {
  min-width: max-content;
  color: #526474;
}

.quick-nav a:hover,
.quick-nav a.is-active,
.quick-nav .nav-action-link {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 5px 12px rgba(18, 33, 48, 0.06);
}

.server-pill,
.user-pill,
.plain-link,
.download-button,
.topbar form button[type="submit"],
button {
  border-radius: 8px;
}

button,
.plain-link,
.download-button {
  min-height: 40px;
}

button[type="submit"],
.primary-button,
.download-button,
.purchase-confirm-button,
.purchase-status-save {
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

select,
.daily-purchase-actions input,
.library-toolbar input,
.login-panel input,
.account-panel input,
.account-panel select,
.account-panel textarea,
.account-row input,
.account-row select,
.purchase-override-control select,
.purchase-status-field input,
.settings-panel textarea {
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(18, 33, 48, 0.02);
}

.home-nav-panel,
.library-panel,
.upload-panel,
.queue-panel,
.result-panel,
.account-panel,
.login-panel,
.order-list-panel {
  border-color: rgba(217, 227, 234, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
}

.home-nav-panel {
  padding: 24px;
}

.home-title-row {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-color: rgba(217, 227, 234, 0.9);
}

.home-title-row h2 {
  font-size: 34px;
  line-height: 1.18;
}

.home-title-row p {
  max-width: 660px;
}

.home-nav-grid {
  gap: 14px;
}

.home-nav-card {
  position: relative;
  min-height: 152px;
  overflow: hidden;
  border-color: rgba(217, 227, 234, 0.95);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff 0, #fbfcfd 100%);
}

.home-nav-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(37, 99, 235, 0.55));
  opacity: 0.62;
}

.home-nav-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 16px 32px rgba(18, 33, 48, 0.08);
}

.home-nav-card span {
  color: #7e8c99;
}

.home-nav-card strong {
  font-size: 21px;
}

.workspace,
.order-workspace {
  gap: 18px;
}

.section-head {
  min-height: 62px;
  padding-inline: 20px;
  border-color: rgba(217, 227, 234, 0.95);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.section-head h2,
.panel-title-row h2 {
  font-size: 17px;
}

.upload-panel {
  padding: 20px;
}

.drop-zone {
  min-height: 276px;
  border-color: #9bb0be;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(248, 250, 251, 0.97)),
    #f5f8fa;
}

.drop-zone::after {
  inset: 12px;
  border-radius: 10px;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.1), 0 14px 28px rgba(18, 33, 48, 0.07);
}

.drop-mark {
  border-radius: 12px;
  background: #1f3041;
}

.import-upload-panel .drop-mark {
  background: #0d5f59;
  box-shadow: 0 16px 32px rgba(13, 95, 89, 0.18);
}

.order-upload-panel .order-mark {
  background: var(--upload-accent);
  box-shadow: 0 16px 32px var(--upload-accent-shadow);
}

.selected-files,
.upload-status,
.path-item,
.settings-preview-row,
.effective-permissions,
details.option-section,
.empty-state {
  border-radius: 10px;
}

.summary-grid {
  gap: 10px;
  background: #f5f8fa;
}

.summary-grid.compact {
  gap: 10px;
}

.metric,
.summary-grid.compact .metric {
  min-height: 82px;
  border-color: rgba(217, 227, 234, 0.95);
  border-radius: 12px;
  background: #ffffff;
}

.metric strong,
.summary-grid.compact .metric strong {
  font-size: 24px;
}

.library-toolbar {
  background: #f8fafb;
}

.jan-coverage-panel {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.jan-coverage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.jan-coverage-head h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0;
}

.jan-coverage-head p {
  margin: 5px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.jan-coverage-updated {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.jan-coverage-summary {
  margin-top: 14px;
  border-bottom: 0;
  background: transparent;
}

.jan-coverage-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.jan-coverage-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 12px;
}

.jan-coverage-table th,
.jan-coverage-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(217, 227, 234, 0.78);
  text-align: right;
  white-space: nowrap;
}

.jan-coverage-table th {
  color: var(--muted);
  font-weight: 700;
  background: #f8fafb;
}

.jan-coverage-table th:first-child,
.jan-coverage-table td:first-child {
  text-align: left;
}

.jan-coverage-table tbody tr:last-child td {
  border-bottom: 0;
}

.jan-shop-name {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jan-rate-badge {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  color: #0f766e;
  background: #f0fbf8;
  font-weight: 700;
}

.jan-coverage-footnote {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.product-row,
.order-item,
.job-row {
  border-color: rgba(217, 227, 234, 0.95);
}

.product-row:hover,
.order-item:hover,
.job-row:hover,
.sku-detail-row:hover {
  background: #f7fbfa;
}

.product-thumb,
.detail-product-image,
.sku-detail-thumb,
.manual-image-preview {
  border-color: rgba(217, 227, 234, 0.95);
  border-radius: 10px;
  background: #f6f8fa;
}

.product-title,
.order-title,
.sku-detail-name {
  letter-spacing: 0;
}

.order-list-panel h3 {
  min-height: 46px;
  padding: 13px 15px 0;
  background: #f8fafb;
}

.order-result-grid {
  gap: 18px;
}

.daily-purchase-bar,
.purchase-location-nav,
.manual-complete-panel {
  border-color: rgba(217, 227, 234, 0.95);
  border-radius: 12px;
  background: #f8fafb;
}

.purchase-location-button {
  min-height: 84px;
  border-color: rgba(174, 191, 203, 0.8);
  border-radius: 12px;
  background: #ffffff;
}

.purchase-location-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 10px 22px rgba(18, 33, 48, 0.07);
}

.purchase-location-button.is-active {
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22), 0 10px 22px rgba(15, 118, 110, 0.1);
}

.purchase-status-button,
.purchase-note-button,
.purchase-status-save,
.purchase-confirm-button,
.manual-complete-button,
.manual-image-edit-button {
  border-radius: 999px;
}

.purchase-status-button.is-active {
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.purchase-status-details.is-open {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}

.account-row,
.option-card,
.check-line,
.sku-detail-row,
.detail-metric,
.manual-image-card {
  border-color: rgba(217, 227, 234, 0.95);
  border-radius: 10px;
}

.product-detail-panel,
.manual-editor-panel,
.image-preview-panel {
  border-radius: 14px;
}

.result-log {
  border-radius: 10px;
}

@media (max-width: 1100px) {
  .quick-nav {
    max-width: 100%;
  }
}

@media (max-width: 920px) {
  .app-shell {
    width: min(100vw - 16px, 820px);
  }

  .topbar {
    align-items: stretch;
  }

  .quick-nav {
    display: flex;
    overflow-x: auto;
  }

  .quick-nav a {
    white-space: nowrap;
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body {
    background:
      linear-gradient(180deg, rgba(15, 118, 110, 0.07) 0, transparent 210px),
      #eef3f7;
  }

  .app-shell {
    padding: 8px 8px 18px;
  }

  .topbar {
    min-height: 60px;
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 0 0 14px 14px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .home-nav-panel,
  .library-panel,
  .workspace,
  .order-workspace,
  .result-panel,
  .queue-panel,
  .upload-panel,
  .order-list-panel {
    border-radius: 12px;
  }

  .home-nav-panel {
    padding: 16px;
  }

  .home-title-row h2 {
    font-size: 24px;
  }

  .home-nav-card {
    min-height: 104px;
  }

  .section-head {
    min-height: 56px;
    padding: 12px;
  }

  .drop-zone {
    min-height: 224px;
  }

  .import-rule-note {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .import-rule-note a {
    white-space: normal;
  }

  .selected-file-row {
    grid-template-columns: 1fr;
  }

  .metric,
  .summary-grid.compact .metric {
    min-height: 74px;
  }

  .purchase-location-button:hover,
  .home-nav-card:hover {
    transform: none;
  }
}

@media (max-width: 760px) {
  .order-item[data-order-mode="purchase"] {
    grid-template-columns: 160px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 3px;
    padding: 7px 9px;
  }

  .order-item[data-order-mode="purchase"] .product-thumb {
    grid-column: 1;
    grid-row: 1;
    width: 160px;
    height: 160px;
    background: #ffffff;
  }

  .order-item[data-order-mode="purchase"] .product-thumb .product-thumb-button {
    cursor: default;
  }

  .order-item[data-order-mode="purchase"] .product-thumb img {
    object-fit: contain;
  }

  .order-item[data-order-mode="purchase"] .order-main {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 0;
  }

  .order-item[data-order-mode="purchase"] .product-counts {
    grid-column: 1;
    grid-row: 2;
    width: 160px;
    padding-left: 0;
    text-align: center;
  }

  .order-item[data-order-mode="purchase"] .product-counts strong {
    font-size: 17px;
    line-height: 1;
  }

  .order-item[data-order-mode="purchase"] .product-counts span {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.1;
  }

  .order-item[data-order-mode="purchase"] .order-title {
    font-size: 12.5px;
    line-height: 1.24;
  }

  .order-item[data-order-mode="purchase"] .order-meta,
  .order-item[data-order-mode="purchase"] .order-context,
  .order-item[data-order-mode="purchase"] .order-address,
  .order-item[data-order-mode="purchase"] .purchase-link {
    font-size: 10.5px;
    line-height: 1.24;
  }

  .order-item[data-order-mode="purchase"] .purchase-status-panel {
    margin-top: 4px;
  }

  .order-item[data-order-mode="purchase"] .purchase-status-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .order-item[data-order-mode="purchase"] .purchase-status-button,
  .order-item[data-order-mode="purchase"] .purchase-note-button,
  .order-item[data-order-mode="purchase"] .purchase-status-save {
    min-height: 26px;
    padding: 0 6px;
    font-size: 10px;
  }

  .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="已采购"],
  .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="未采购"] {
    display: none;
  }

  .image-preview-modal {
    padding: 0;
  }

  .image-preview-panel {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    padding: 8px;
    border: 0;
    border-radius: 0;
    background: #0b1117;
    box-shadow: none;
  }

  .image-preview-panel img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100dvh - 92px);
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
  }

  .image-preview-modal.is-fit-screen .image-preview-panel img {
    width: 100%;
    max-width: none;
  }

  .image-preview-panel figcaption {
    max-width: 100%;
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
  }

  .image-preview-panel button {
    min-height: 38px;
    border-color: rgba(255, 255, 255, 0.24);
    background: #ffffff;
  }
}

@media (max-width: 420px) {
  .order-item[data-order-mode="purchase"] .purchase-status-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Xingyong admin UI refresh: operational polish, desktop + mobile. */
:root {
  --bg: #e9eff4;
  --bg-strong: #d9e4ec;
  --surface: #ffffff;
  --surface-soft: #f6f8fa;
  --surface-tint: #edf8f5;
  --line: #d6e1e9;
  --line-strong: #a7b9c7;
  --text: #253443;
  --muted: #667789;
  --ink: #111a24;
  --accent: #087f73;
  --accent-strong: #046a61;
  --accent-soft: #e7f7f3;
  --green: #12805c;
  --amber: #af680f;
  --red: #b4232c;
  --radius: 12px;
  --shadow: 0 18px 42px rgba(21, 35, 48, 0.08);
  --shadow-soft: 0 8px 24px rgba(21, 35, 48, 0.06);
}

body {
  background:
    linear-gradient(180deg, rgba(8, 127, 115, 0.08) 0, rgba(8, 127, 115, 0.018) 240px, transparent 430px),
    linear-gradient(180deg, #f8fbfc 0, var(--bg) 620px, #e4ebf1 100%);
  color: var(--text);
}

.app-shell {
  width: min(1520px, calc(100vw - 28px));
  padding-top: 16px;
}

.topbar {
  min-height: 74px;
  border-color: rgba(167, 185, 199, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(21, 35, 48, 0.08);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(145deg, #0b3541, #087f73 72%);
}

.topbar h1 {
  font-size: 24px;
  font-weight: 860;
}

.quick-nav {
  max-width: min(58vw, 820px);
  border-color: rgba(214, 225, 233, 0.96);
  background: #f2f6f8;
}

.quick-nav a {
  color: #536679;
}

.quick-nav a:hover,
.quick-nav a.is-active {
  color: var(--accent-strong);
}

.server-pill,
.user-pill,
.plain-link,
.download-button,
.topbar form button[type="submit"],
button {
  border-radius: 9px;
}

button,
.plain-link,
.download-button {
  min-height: 40px;
}

button[type="submit"],
.primary-button,
.download-button,
.purchase-confirm-button,
.purchase-status-save {
  box-shadow: 0 8px 20px rgba(8, 127, 115, 0.17);
}

.home-nav-panel,
.library-panel,
.upload-panel,
.queue-panel,
.result-panel,
.account-panel,
.login-panel,
.order-list-panel {
  border-color: rgba(214, 225, 233, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
}

.home-nav-panel {
  min-height: 0;
  padding: 26px;
}

.home-title-row {
  margin-bottom: 16px;
  padding-bottom: 18px;
  border-color: rgba(214, 225, 233, 0.95);
}

.home-title-row h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 860;
}

.home-title-row p {
  max-width: 720px;
  color: #5f7285;
}

.eyebrow {
  border-color: rgba(8, 127, 115, 0.18);
  background: #e8f6f3;
  color: var(--accent-strong);
}

.home-nav-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.home-nav-card {
  position: relative;
  min-height: 132px;
  padding: 18px 20px;
  border-color: rgba(214, 225, 233, 0.95);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0, #fbfdfe 100%);
  box-shadow: none;
}

.home-nav-card::before {
  right: 16px;
  left: 16px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(8, 127, 115, 0.88), rgba(37, 99, 235, 0.45));
}

.home-nav-card:hover {
  transform: translateY(-1px);
  border-color: rgba(8, 127, 115, 0.36);
  background: linear-gradient(180deg, #ffffff 0, #f4fbf9 100%);
  box-shadow: 0 14px 30px rgba(21, 35, 48, 0.08);
}

.home-nav-card span {
  color: #778796;
}

.home-nav-card strong {
  margin-top: 14px;
  font-size: 21px;
  font-weight: 860;
}

.home-nav-card small {
  padding-top: 14px;
}

.section-head {
  min-height: 60px;
  border-color: rgba(214, 225, 233, 0.95);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.section-head h2,
.panel-title-row h2 {
  font-size: 17px;
  font-weight: 860;
}

.summary-grid,
.summary-grid.compact {
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f3f7f9;
}

.metric,
.summary-grid.compact .metric {
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid rgba(214, 225, 233, 0.95);
  border-radius: 14px;
  background: #ffffff;
}

.metric strong,
.summary-grid.compact .metric strong {
  font-size: 26px;
  font-weight: 880;
}

.metric.metric-action {
  width: 100%;
  appearance: none;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.metric.metric-action:hover,
.metric.metric-action:focus-visible {
  border-color: rgba(15, 118, 110, 0.45);
  background: #f4fbf9;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.metric.metric-action small::after {
  content: " →";
  font-weight: 900;
}

.metric.metric-action.is-disabled,
.metric.metric-action:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.metric.metric-action.is-disabled small::after,
.metric.metric-action:disabled small::after {
  content: "";
}

.drop-zone {
  border-color: #99adbc;
  border-radius: 14px;
}

.drop-mark {
  border-radius: 14px;
}

.product-row,
.job-row,
.order-item {
  border-color: rgba(214, 225, 233, 0.95);
}

.product-row:hover,
.job-row:hover,
.job-row.active,
.order-item:hover,
.sku-detail-row:hover {
  background: #f5fbfa;
}

.product-thumb,
.detail-product-image,
.sku-detail-thumb,
.manual-image-preview {
  border-color: rgba(214, 225, 233, 0.95);
  border-radius: 11px;
  background: #f7f9fb;
}

.order-result-grid {
  gap: 16px;
  padding: 16px;
  background: #f5f8fa;
}

.order-list-panel {
  box-shadow: none;
}

.order-list-panel h3 {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  background: #fbfcfd;
}

.purchase-location-nav {
  background: #f8fbfb;
}

.purchase-location-nav-head strong,
.purchase-shop-filter-head strong {
  font-weight: 880;
}

.purchase-location-button {
  min-height: 78px;
  padding: 10px 12px;
  border-color: rgba(167, 185, 199, 0.82);
  border-radius: 13px;
  background: #ffffff;
}

.purchase-location-button:hover {
  transform: translateY(-1px);
}

.purchase-location-button strong {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 19px;
}

.purchase-location-button.is-active {
  border-color: rgba(8, 127, 115, 0.46);
  background: #e9f8f5;
}

.purchase-shop-filter {
  background: #f6f9fb;
}

.purchase-shop-filter-button {
  border-color: rgba(167, 185, 199, 0.72);
}

.order-item {
  grid-template-columns: 62px minmax(0, 1fr) 74px;
  gap: 14px;
  min-height: 90px;
}

.order-item.is-purchase-complete {
  background: #eef9f2;
  box-shadow: inset 4px 0 0 var(--green);
}

.order-item.is-purchase-complete-pending,
.order-item.is-long-pressing {
  background: #fff8e8;
  box-shadow: inset 4px 0 0 #e29519;
}

.order-title {
  font-weight: 850;
}

.order-meta,
.order-context,
.product-meta {
  color: #617487;
}

.product-counts {
  align-self: stretch;
  display: grid;
  align-content: center;
  justify-items: end;
  padding-left: 8px;
  border-left: 1px solid rgba(214, 225, 233, 0.9);
}

.product-counts strong {
  font-size: 22px;
  font-weight: 880;
}

@media (min-width: 761px) {
  #pick-list .order-item,
  #pending-list .order-item {
    grid-template-columns: 70px minmax(0, 1fr) 82px;
    align-items: start;
  }

  #pick-list .product-counts,
  #pending-list .product-counts {
    align-self: stretch;
    justify-items: center;
    min-width: 0;
    padding-left: 10px;
  }
}

#pick-list .order-main,
#pending-list .order-main {
  min-width: 0;
  padding-top: 1px;
}

#pick-list .order-title-line,
#pending-list .order-title-line {
  align-items: flex-start;
}

#pick-list .order-title,
#pending-list .order-title {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#pick-list .order-meta,
#pick-list .order-context,
#pending-list .order-meta,
#pending-list .order-context {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#pick-list .order-address,
#pending-list .order-address {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.purchase-override-control,
.purchase-status-panel {
  width: min(100%, 620px);
}

.purchase-override-control {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(40px, auto);
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(214, 225, 233, 0.95);
  border-radius: 12px;
  background: #fbfcfd;
}

.purchase-override-control select {
  min-width: 0;
  width: 100%;
}

.purchase-confirm-button {
  min-height: 34px;
  border-radius: 999px;
}

.purchase-status-panel {
  padding: 9px;
  border: 1px solid rgba(214, 225, 233, 0.95);
  border-radius: 12px;
  background: #fbfcfd;
}

.purchase-status-header {
  margin-bottom: 8px;
}

.purchase-status-buttons {
  gap: 7px;
}

.purchase-status-button,
.purchase-note-button,
.purchase-status-save {
  min-height: 32px;
  border-color: rgba(167, 185, 199, 0.9);
  border-radius: 999px;
}

.purchase-status-button.is-active {
  border-color: rgba(8, 127, 115, 0.54);
  background: #e7f7f3;
  color: var(--accent-strong);
}

.purchase-status-button.is-active.is-complete {
  border-color: rgba(18, 128, 92, 0.42);
  background: #e8f7ef;
  color: #116b4f;
}

.purchase-status-details.is-open {
  margin-top: 8px;
  padding: 10px;
  border-color: rgba(214, 225, 233, 0.95);
  background: #ffffff;
}

.purchase-bottom-tools {
  background: #f8fafb;
}

.daily-purchase-bar {
  border-color: rgba(214, 225, 233, 0.95);
  background: #ffffff;
}

.image-preview-panel,
.login-panel {
  border-radius: 16px;
}

.image-preview-panel img {
  border-radius: 12px;
}

.login-body {
  background:
    linear-gradient(180deg, rgba(8, 127, 115, 0.12), transparent 48%),
    #e9eff4;
}

.account-row,
.option-card,
.check-line,
.settings-preview-row,
.effective-permissions {
  border-color: rgba(214, 225, 233, 0.95);
}

@media (max-width: 1100px) {
  .quick-nav {
    max-width: 100%;
  }
}

@media (max-width: 920px) {
  .app-shell {
    width: min(100vw - 16px, 820px);
  }

  .topbar {
    position: static;
    display: grid;
    gap: 12px;
  }

  .quick-nav {
    max-width: none;
  }

  .purchase-override-control {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, rgba(8, 127, 115, 0.07) 0, transparent 190px),
      #edf3f6;
  }

  body.purchase-view.purchase-shop-filter-open {
    padding-bottom: calc(142px + env(safe-area-inset-bottom));
  }

  .app-shell {
    width: 100%;
    padding: 8px 8px 18px;
  }

  .topbar {
    min-height: 58px;
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 0 0 14px 14px;
  }

  .brand-block {
    gap: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 15px;
  }

  .topbar h1 {
    font-size: 18px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .topbar p,
  .quick-nav,
  .server-pill {
    display: none !important;
  }

  .top-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .user-pill,
  .plain-link,
  .topbar form button[type="submit"] {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .home-nav-panel,
  .library-panel,
  .workspace,
  .order-workspace,
  .result-panel,
  .queue-panel,
  .upload-panel,
  .order-list-panel {
    border-radius: 14px;
  }

  .home-nav-panel {
    min-height: 0;
    padding: 14px;
  }

  .home-title-row {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .home-title-row h2 {
    margin-top: 8px;
    font-size: 23px;
  }

  .home-nav-grid {
    grid-template-columns: 1fr;
  }

  .home-nav-card {
    min-height: 96px;
    padding: 14px;
  }

  .home-nav-card.mobile-home-hidden {
    display: none;
  }

  .section-head {
    min-height: 56px;
    padding: 12px;
  }

  .section-head h2,
  .panel-title-row h2 {
    font-size: 18px;
  }

  .summary-grid,
  .summary-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  body.purchase-view #purchase-summary-grid,
  body.picking-view #picking-summary-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body.purchase-view #purchase-summary-grid::-webkit-scrollbar,
  body.picking-view #picking-summary-grid::-webkit-scrollbar {
    display: none;
  }

  body.purchase-view #purchase-summary-grid .metric,
  body.picking-view #picking-summary-grid .metric {
    flex: 0 0 min(42vw, 178px);
    scroll-snap-align: start;
  }

  body.purchase-view .purchase-location-page #purchase-summary-grid,
  body.purchase-view .purchase-location-page .purchase-bottom-tools,
  body.purchase-view .purchase-location-page .daily-purchase-bar {
    display: none;
  }

  .metric,
  .summary-grid.compact .metric {
    min-height: 76px;
    padding: 12px;
  }

  .metric strong,
  .summary-grid.compact .metric strong {
    font-size: 25px;
  }

  .purchase-location-nav {
    padding: 12px;
  }

  .purchase-location-nav-head {
    gap: 8px;
  }

  .purchase-location-nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    overflow: visible;
  }

  .purchase-location-button {
    min-height: 64px;
    padding: 8px 9px;
  }

  .purchase-location-button .purchase-location-title {
    font-size: 12px;
  }

  .purchase-location-button strong {
    min-width: 34px;
    min-height: 34px;
    font-size: 16px;
  }

  .purchase-location-button em {
    display: none;
  }

  .order-result-grid {
    gap: 12px;
    padding: 12px;
  }

  .order-list-panel h3 {
    min-height: 44px;
    padding: 0 12px;
  }

  .order-item[data-order-mode="purchase"] {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 7px 9px;
    padding: 8px 10px;
  }

  .order-item[data-order-mode="purchase"] .product-thumb {
    width: 160px;
    height: 160px;
  }

  .order-item[data-order-mode="purchase"] .product-counts {
    border-left: 0;
    align-content: start;
    justify-items: center;
  }

  .order-item[data-order-mode="purchase"] .purchase-override-control,
  .order-item[data-order-mode="purchase"] .purchase-status-panel {
    width: 100%;
    padding: 7px;
  }

  .order-item[data-order-mode="purchase"] .purchase-status-buttons {
    gap: 5px;
  }

  .order-item[data-order-mode="purchase"] .purchase-status-button,
  .order-item[data-order-mode="purchase"] .purchase-note-button,
  .order-item[data-order-mode="purchase"] .purchase-status-save,
  .order-item[data-order-mode="purchase"] .purchase-confirm-button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 10.5px;
  }

  .order-item[data-order-mode="purchase"] .purchase-override-control select,
  .order-item[data-order-mode="purchase"] .purchase-status-field input {
    min-height: 36px;
    font-size: 16px;
  }

  .order-item[data-order-mode="purchase"] .purchase-status-field {
    align-items: stretch;
  }

  .order-item[data-order-mode="purchase"] .purchase-note-field input {
    width: 100%;
  }

  .daily-purchase-bar {
    padding: 12px;
  }

  .purchase-bottom-tools {
    padding: 12px 12px calc(88px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    min-height: 58px;
    border-radius: 16px;
  }

  .mobile-bottom-nav a {
    min-height: 44px;
    font-size: 13px;
  }

  .image-preview-modal {
    padding: 8px;
  }

  .image-preview-panel {
    width: min(100%, 520px);
    padding: 10px;
  }

  .image-preview-panel img {
    max-width: calc(100vw - 36px);
    max-height: 70vh;
  }

  .image-preview-modal.is-fit-screen .image-preview-panel img {
    width: calc(100vw - 36px);
  }
}

@media (max-width: 420px) {
  .summary-grid,
  .summary-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.purchase-confirm-panel {
  margin-top: 16px;
  overflow: hidden;
  max-width: 100%;
}

.purchase-confirm-intro {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.purchase-confirm-intro-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.purchase-confirm-intro-copy span {
  min-width: 0;
}

#purchase-confirm-summary.summary-grid.compact {
  grid-template-columns: repeat(4, minmax(142px, 172px));
  justify-content: start;
  width: fit-content;
  max-width: 100%;
  gap: 8px;
  padding: 0;
  overflow-x: auto;
  border-bottom: 0;
  background: transparent;
}

#purchase-confirm-summary.summary-grid.compact .metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-height: 38px;
  padding: 0 11px;
  border-radius: 6px;
}

#purchase-confirm-summary.summary-grid.compact button.metric {
  width: 100%;
  border-color: var(--line);
  text-align: left;
  cursor: pointer;
}

#purchase-confirm-summary.summary-grid.compact .purchase-confirm-summary-filter:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

#purchase-confirm-summary.summary-grid.compact .purchase-confirm-summary-filter.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22);
}

#purchase-confirm-summary.summary-grid.compact .purchase-confirm-summary-filter.is-active label,
#purchase-confirm-summary.summary-grid.compact .purchase-confirm-summary-filter.is-active strong {
  color: var(--accent-strong);
}

#purchase-confirm-summary.summary-grid.compact .metric strong {
  margin-top: 0;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1;
  text-align: right;
}

#purchase-confirm-summary.summary-grid.compact .metric span {
  font-size: 11px;
}

#purchase-confirm-summary.summary-grid.compact .metric label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#purchase-confirm-summary.summary-grid.compact .metric small {
  display: none;
}

.purchase-confirm-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px) minmax(110px, 160px);
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.purchase-confirm-toolbar input,
.purchase-confirm-toolbar select,
.purchase-confirm-fields select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  min-width: 0;
  width: 100%;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 650;
}

.purchase-confirm-bucket-strip {
  display: flex;
  gap: 8px;
  align-items: stretch;
  padding: 10px 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.purchase-confirm-bucket {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "label value"
    "hint hint";
  align-items: center;
  gap: 2px 8px;
  min-width: 112px;
  min-height: 46px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.purchase-confirm-bucket span {
  grid-area: label;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-confirm-bucket strong {
  grid-area: value;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  text-align: right;
}

.purchase-confirm-bucket em {
  grid-area: hint;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-confirm-bucket:hover,
.purchase-confirm-bucket.is-active {
  border-color: #8bc7bd;
  background: var(--accent-soft);
}

.purchase-confirm-bucket.is-active span,
.purchase-confirm-bucket.is-active strong {
  color: var(--accent-strong);
}

.purchase-confirm-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
}

.purchase-confirm-page-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.purchase-confirm-page-text strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.purchase-confirm-page-text em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.purchase-confirm-page-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.purchase-confirm-page-actions button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.purchase-confirm-page-actions button:not(:disabled):hover {
  border-color: #8bc7bd;
  background: var(--accent-soft);
}

.purchase-confirm-page-actions button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.purchase-confirm-list {
  max-height: 620px;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
}

.purchase-confirm-product-row {
  display: grid;
  grid-template-columns: 76px minmax(280px, 1fr) minmax(220px, 280px) 72px 118px minmax(260px, auto);
  gap: 12px;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  max-width: 100%;
  cursor: pointer;
}

.purchase-confirm-product-row:hover {
  background: #f8fbfa;
}

.purchase-confirm-product-row.is-confirmed {
  background: #f8fafb;
}

.purchase-confirm-product-row.is-open {
  background: #fbfefd;
  box-shadow: inset 3px 0 0 var(--accent);
}

.purchase-confirm-product-thumb {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  cursor: default;
}

.purchase-confirm-product-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.purchase-confirm-product-thumb .product-thumb-button {
  cursor: default;
}

.purchase-sku-hover-panel {
  position: fixed;
  z-index: 90;
  width: min(360px, calc(100vw - 24px));
  max-height: min(320px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid #b7d8d2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.purchase-sku-hover-panel.is-hidden {
  display: none;
}

.purchase-sku-hover-panel.is-error {
  border-color: #f2b8b5;
}

.purchase-sku-hover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
}

.purchase-sku-hover-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.22;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-sku-hover-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.purchase-sku-hover-loading {
  padding: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.purchase-sku-hover-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  max-height: 270px;
  overflow: auto;
  padding: 6px;
}

.purchase-sku-hover-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

.purchase-sku-hover-thumb {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #f8fafb;
}

.purchase-sku-hover-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.purchase-sku-hover-text {
  display: grid;
  gap: 1px;
  padding: 4px 5px;
  min-width: 0;
}

.purchase-sku-hover-text strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.purchase-sku-hover-text span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.purchase-confirm-product-main {
  min-width: 0;
}

.purchase-confirm-workflow-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-right: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}

.purchase-confirm-workflow-badge.is-ready {
  background: #e7f8f1;
  color: var(--green);
}

.purchase-confirm-workflow-badge.is-review {
  background: #fff7e8;
  color: #9a5b00;
}

.purchase-confirm-workflow-badge.is-missing {
  background: #fff0ef;
  color: #b42318;
}

.purchase-confirm-workflow-badge.is-confirmed {
  background: #edf7ff;
  color: #1d5f92;
}

.purchase-confirm-product-locations {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.purchase-confirm-product-locations strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.purchase-confirm-product-locations span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.purchase-confirm-product-locations.is-ready {
  border-color: #b9e3d8;
  background: #f0fdf9;
}

.purchase-confirm-product-locations.is-ready strong {
  color: var(--accent-strong);
}

.purchase-confirm-product-locations.is-review {
  border-color: #f4d29b;
  background: #fffaf0;
}

.purchase-confirm-product-locations.is-review strong {
  color: #9a5b00;
}

.purchase-confirm-product-locations.is-missing {
  border-color: #f4b9b5;
  background: #fff7f6;
}

.purchase-confirm-product-locations.is-missing strong {
  color: #b42318;
}

.purchase-confirm-product-locations.is-confirmed {
  border-color: #c8d8e6;
  background: #f4f8fb;
}

.purchase-confirm-product-counts {
  display: grid;
  gap: 3px;
  justify-items: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.purchase-confirm-product-counts strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  text-align: right;
}

.purchase-confirm-product-counts.is-confirmed strong {
  color: var(--green);
}

.purchase-confirm-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.purchase-confirm-open-bulk,
.purchase-confirm-open-skus,
.purchase-confirm-quick-save,
.purchase-confirm-sku-head button {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-confirm-open-bulk,
.purchase-confirm-quick-save {
  border-color: #9fd5cc;
  background: var(--accent-soft);
}

.purchase-confirm-open-bulk:hover,
.purchase-confirm-open-skus:hover,
.purchase-confirm-quick-save:hover,
.purchase-confirm-sku-head button:hover {
  border-color: #8bc7bd;
  background: var(--accent-soft);
}

.purchase-confirm-quick-save {
  padding-inline: 12px;
  background: var(--accent);
  color: #ffffff;
}

.purchase-confirm-quick-save:hover {
  color: var(--accent-strong);
}

.purchase-confirm-open-bulk.is-secondary,
.purchase-confirm-open-skus.is-secondary {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--accent-strong);
}

.purchase-confirm-open-skus.is-review {
  border-color: #f0b35f;
  background: #fff7e8;
  color: #9a5b00;
}

.purchase-confirm-open-bulk.is-missing {
  border-color: #efaaa5;
  background: #fff0ef;
  color: #b42318;
}

.purchase-confirm-product-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #c8e6e0;
  border-radius: 8px;
  background: #f8fbfa;
  cursor: default;
}

.purchase-confirm-sku-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
}

.purchase-confirm-sku-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.purchase-confirm-sku-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.purchase-confirm-sku-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.purchase-confirm-row {
  display: grid;
  grid-template-columns: 128px minmax(260px, 0.9fr) minmax(520px, 1.2fr);
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  max-width: 100%;
}

.purchase-confirm-row.is-confirmed {
  background: #f8fafb;
}

.purchase-confirm-row.is-confirmed .purchase-confirm-title,
.purchase-confirm-row.is-confirmed .purchase-confirm-spec {
  color: #475467;
}

.purchase-confirm-thumb {
  width: 124px;
  height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.purchase-confirm-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.purchase-confirm-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.purchase-confirm-spec {
  margin-top: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.purchase-confirm-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.purchase-confirm-meta a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.purchase-confirm-editor {
  display: grid;
  gap: 9px;
  align-content: start;
  min-width: 0;
}

.purchase-confirm-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.purchase-confirm-choice-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.purchase-confirm-choice-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.purchase-confirm-choice-head span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.purchase-confirm-choice-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.purchase-location-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.purchase-location-categories button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.purchase-location-categories button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.purchase-location-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.purchase-location-filter input {
  min-width: 0;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #b9d8e8;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.purchase-location-filter input::placeholder {
  color: #8292a3;
}

.purchase-location-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-primary-list,
.purchase-backup-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.purchase-primary-chip.is-filter-hidden,
.purchase-backup-chip.is-filter-hidden {
  display: none;
}

.purchase-primary-chip,
.purchase-backup-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.purchase-primary-chip:has(input:checked),
.purchase-backup-chip:has(input:checked) {
  border-color: #8fd9ca;
  background: #e7f8f1;
  color: var(--accent-strong);
}

.purchase-backup-chip.is-disabled,
.purchase-backup-chip:has(input:disabled) {
  opacity: 0.42;
  cursor: not-allowed;
}

.purchase-primary-chip input,
.purchase-backup-chip input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.purchase-backup-chip span {
  overflow-wrap: anywhere;
}

.purchase-backup-select {
  width: 100%;
  min-width: 0;
  min-height: 92px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.purchase-backup-select option {
  padding: 4px 6px;
}

.purchase-confirm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.purchase-confirm-product-editor-actions {
  justify-content: flex-start;
}

.purchase-confirm-product-editor-actions button {
  margin-left: auto;
}

.purchase-confirm-actions button {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.purchase-confirm-actions button:disabled {
  opacity: 0.62;
}

.purchase-confirm-actions span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-confirm-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff8e8;
  color: #9a5b00;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.purchase-confirm-badge.is-confirmed {
  background: #e7f8f1;
  color: var(--green);
}

.purchase-confirm-sku-list .purchase-confirm-row {
  grid-template-columns: 62px minmax(190px, 0.62fr) minmax(560px, 1.7fr);
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
}

.purchase-confirm-sku-list .purchase-confirm-thumb {
  width: 60px;
  height: 60px;
}

.purchase-confirm-sku-list .purchase-confirm-title {
  display: none;
}

.purchase-confirm-sku-list .purchase-confirm-spec {
  margin-top: 0;
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.purchase-confirm-sku-list .purchase-confirm-meta {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
}

.purchase-confirm-sku-list .purchase-confirm-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px;
  align-items: center;
  gap: 6px;
}

.purchase-confirm-sku-list .purchase-confirm-fields {
  gap: 6px;
}

.purchase-confirm-sku-list .purchase-confirm-choice-block {
  gap: 5px;
  padding: 7px 8px;
  border-radius: 6px;
}

.purchase-confirm-sku-list .purchase-confirm-choice-head span {
  font-size: 11px;
}

.purchase-confirm-sku-list .purchase-confirm-choice-head small {
  display: none;
}

.purchase-confirm-sku-list .purchase-location-categories button,
.purchase-confirm-sku-list .purchase-location-filter input {
  min-height: 24px;
  font-size: 11px;
}

.purchase-confirm-sku-list .purchase-location-filter span {
  display: none;
}

.purchase-confirm-sku-list .purchase-primary-list,
.purchase-confirm-sku-list .purchase-backup-list {
  max-height: 52px;
  overflow: auto;
  padding-right: 2px;
}

.purchase-confirm-sku-list .purchase-primary-chip,
.purchase-confirm-sku-list .purchase-backup-chip {
  min-height: 24px;
  padding: 0 7px;
  font-size: 11px;
}

.purchase-confirm-sku-list .purchase-primary-chip input,
.purchase-confirm-sku-list .purchase-backup-chip input {
  width: 12px;
  height: 12px;
}

.purchase-confirm-sku-list .purchase-confirm-actions {
  align-items: stretch;
  align-self: stretch;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.purchase-confirm-sku-list .purchase-confirm-actions button {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
}

.purchase-confirm-sku-list .purchase-confirm-badge {
  min-height: 22px;
  padding: 0 7px;
  font-size: 11px;
}

@media (max-width: 1180px) {
  .purchase-confirm-product-row {
    grid-template-columns: 72px minmax(0, 1fr) minmax(190px, 250px) auto;
  }

  .purchase-confirm-product-row > .purchase-confirm-product-counts {
    display: none;
  }

  .purchase-confirm-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .purchase-confirm-thumb {
    width: 100px;
    height: 100px;
  }

  .purchase-confirm-editor {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .purchase-confirm-intro {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #purchase-confirm-summary.summary-grid.compact {
    grid-template-columns: repeat(4, minmax(118px, 1fr));
    width: 100%;
  }

  #wuliu-sandbox-summary.summary-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-confirm-toolbar {
    grid-template-columns: 1fr;
  }

  .purchase-confirm-product-row {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }

  .purchase-confirm-product-locations {
    grid-column: 2 / -1;
  }

  .purchase-confirm-product-counts {
    display: none;
  }

  .purchase-confirm-product-actions {
    grid-column: 1 / -1;
  }

  .purchase-confirm-sku-list .purchase-confirm-row {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .purchase-confirm-sku-list .purchase-confirm-thumb {
    width: 66px;
    height: 66px;
  }

  .purchase-confirm-sku-list .purchase-confirm-editor {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 132px;
  }
}

@media (max-width: 520px) {
  .purchase-confirm-intro-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #purchase-confirm-summary.summary-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #purchase-confirm-summary.summary-grid.compact .metric {
    min-height: 38px;
    padding: 0 9px;
  }

  #purchase-confirm-summary.summary-grid.compact .metric strong {
    font-size: 18px;
  }

  .purchase-sku-hover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-confirm-product-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .purchase-confirm-product-thumb {
    width: 62px;
    height: 62px;
  }

  .purchase-confirm-product-actions {
    grid-column: 1 / -1;
    gap: 6px;
  }

  .purchase-confirm-pager {
    align-items: stretch;
    flex-direction: column;
    padding: 9px 12px;
  }

  .purchase-confirm-page-actions button {
    flex: 1 1 0;
  }

  .purchase-confirm-open-bulk,
  .purchase-confirm-open-skus {
    flex: 1 1 128px;
  }

  .purchase-confirm-product-editor-actions button {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .purchase-confirm-sku-head {
    align-items: flex-start;
    padding: 10px 12px;
  }

  .purchase-confirm-row {
    grid-template-columns: 160px minmax(0, 1fr);
    padding: 12px;
    gap: 10px;
  }

  .purchase-confirm-thumb {
    width: 160px;
    height: 160px;
  }

  .purchase-confirm-thumb .product-thumb-button {
    cursor: default;
  }

  .purchase-confirm-sku-list .purchase-confirm-row {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .purchase-confirm-sku-list .purchase-confirm-thumb {
    width: 56px;
    height: 56px;
  }

  .purchase-confirm-sku-list .purchase-confirm-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-confirm-sku-list .purchase-confirm-editor {
    grid-template-columns: 1fr;
  }

  .purchase-confirm-sku-list .purchase-confirm-actions {
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
  }

  .purchase-confirm-sku-list .purchase-confirm-actions button {
    width: auto;
    flex: 1 1 150px;
  }

  .purchase-confirm-fields {
    grid-template-columns: 1fr;
  }

  .purchase-location-categories button {
    flex: 1 1 86px;
    min-height: 36px;
    padding: 0 8px;
  }

  .purchase-location-filter {
    grid-template-columns: 1fr;
  }

  .purchase-location-filter input {
    min-height: 38px;
  }

  .purchase-location-filter span {
    display: none;
  }

  .purchase-confirm-product-editor {
    margin-bottom: 84px;
  }

  .purchase-primary-list,
  .purchase-backup-list {
    max-height: 132px;
    overflow: auto;
    padding-right: 2px;
  }

  .purchase-confirm-sku-list .purchase-primary-list,
  .purchase-confirm-sku-list .purchase-backup-list {
    max-height: 52px;
  }
}

.operation-log-shell {
  max-width: 1440px;
}

.operation-log-panel {
  gap: 16px;
}

.operation-log-panel .compact-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.operation-log-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.operation-log-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.operation-log-filters input,
.operation-log-filters select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.operation-log-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.operation-log-filter-actions .plain-link {
  min-height: 42px;
  padding: 10px 12px;
}

.operation-log-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.operation-log-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.operation-log-row:last-child {
  border-bottom: 0;
}

.operation-log-time strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.operation-log-time span,
.operation-log-main span,
.operation-log-main p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.operation-log-main > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.operation-log-main strong {
  color: var(--ink);
}

.operation-log-main p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.operation-log-main pre {
  max-height: 120px;
  margin: 8px 0 0;
  padding: 8px 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.operation-log-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eaf8f2;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.operation-log-status.is-error {
  background: #fff1f3;
  color: var(--red);
}

@media (max-width: 900px) {
  .operation-log-filters {
    grid-template-columns: 1fr 1fr;
  }

  .operation-log-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .operation-log-filters {
    grid-template-columns: 1fr;
  }

  .operation-log-filter-actions,
  .operation-log-filter-actions button,
  .operation-log-filter-actions .plain-link {
    width: 100%;
  }
}

/* Final navigation pass: keep workspace links separate from account actions. */
.home-view .topbar {
  display: grid;
  align-items: stretch;
  gap: 10px;
  min-height: 0;
  padding: 12px;
}

.home-view .topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.home-view .brand-block {
  flex: 0 0 auto;
}

.home-view .top-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.home-view .quick-nav {
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 44px;
  gap: 6px;
  padding: 5px;
  overflow-x: auto;
  border-radius: 10px;
  background: #f4f7f9;
  scroll-padding-inline: 6px;
  scrollbar-width: none;
}

.home-view .quick-nav::-webkit-scrollbar {
  display: none;
}

.home-view .quick-nav a {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #526474;
}

.home-view .quick-nav a:hover {
  background: #ffffff;
  color: var(--ink);
}

.home-view .quick-nav a.is-active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.home-view .quick-nav a.nav-action-link:not(.is-active) {
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

@media (max-width: 1180px) {
  .home-view .topbar-main {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .home-view .top-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .home-view .top-actions::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 760px) {
  .home-view .topbar {
    display: block;
    min-height: 58px;
    padding: 8px 10px;
  }

  .home-view .topbar-main {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .home-view .brand-block {
    min-width: 0;
  }

  .home-view .brand-block > div:last-child {
    min-width: 0;
  }

  .home-view .topbar h1 {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-view .quick-nav,
  .home-view .server-pill {
    display: none !important;
  }

  .home-view .top-actions {
    justify-content: flex-end;
    max-width: 58vw;
  }

  .home-view .mobile-bottom-nav {
    display: flex;
    grid-auto-flow: unset;
    grid-auto-columns: unset;
    gap: 6px;
    overflow-x: auto;
    padding: 6px;
    scroll-padding-inline: 6px;
    scrollbar-width: none;
  }

  .home-view .mobile-bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .home-view .mobile-bottom-nav a {
    flex: 0 0 64px;
    min-height: 44px;
    padding: 0 8px;
    white-space: nowrap;
  }
}

/* Main app navigation must survive body view-class changes from app.js. */
.main-topbar {
  display: grid;
  align-items: stretch;
  gap: 10px;
  min-height: 0;
  padding: 12px;
}

.main-topbar .topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.main-topbar .brand-block {
  flex: 0 0 auto;
}

.main-topbar .top-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.main-topbar .quick-nav {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  max-width: none;
  min-height: 44px;
  gap: 6px;
  padding: 5px;
  overflow-x: auto;
  border-radius: 10px;
  background: #f4f7f9;
  scroll-padding-inline: 6px;
  scrollbar-width: none;
}

.main-topbar .quick-nav::-webkit-scrollbar {
  display: none;
}

.main-topbar .quick-nav a {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #526474;
}

.main-topbar .quick-nav a:hover {
  background: #ffffff;
  color: var(--ink);
}

.main-topbar .quick-nav a.is-active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.main-topbar .quick-nav a.nav-action-link:not(.is-active) {
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

@media (max-width: 1180px) {
  .main-topbar .topbar-main {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .main-topbar .top-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .main-topbar .top-actions::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 760px) {
  .main-topbar {
    display: block;
    min-height: 58px;
    padding: 8px 10px;
  }

  .main-topbar .topbar-main {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .main-topbar .brand-block {
    min-width: 0;
  }

  .main-topbar .brand-block > div:last-child {
    min-width: 0;
  }

  .main-topbar h1 {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main-topbar .quick-nav,
  .main-topbar .server-pill {
    display: none !important;
  }

  .main-topbar .top-actions {
    justify-content: flex-end;
    max-width: 58vw;
  }

  .mobile-bottom-nav {
    display: flex;
    grid-auto-flow: unset;
    grid-auto-columns: unset;
    gap: 6px;
    overflow-x: auto;
    padding: 6px;
    scroll-padding-inline: 6px;
    scrollbar-width: none;
  }

  .mobile-bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-bottom-nav a {
    flex: 0 0 64px;
    min-height: 44px;
    padding: 0 8px;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  body.purchase-view {
    padding-top: calc(102px + env(safe-area-inset-top));
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  body.purchase-view .mobile-bottom-nav {
    display: none;
  }

  body.purchase-view .purchase-shop-filter.is-active {
    right: 8px;
    top: max(8px, env(safe-area-inset-top));
    bottom: auto;
    left: 8px;
    z-index: 90;
  }

  body.purchase-view .purchase-shop-filter-head button {
    display: none;
  }
}

@media (max-width: 760px) {
  body.purchase-view .purchase-location-page .order-result-grid {
    gap: 6px;
    padding: 6px;
  }

  body.purchase-view .purchase-location-page .order-list-panel {
    border-radius: 10px;
  }

  body.purchase-view .purchase-location-page .purchase-list-title-row {
    min-height: 34px;
    padding: 6px 8px;
  }

  body.purchase-view .purchase-location-page .purchase-list-title {
    gap: 4px;
    font-size: 12px;
  }

  body.purchase-view .purchase-location-page .purchase-location-complete-button {
    min-height: 28px;
    padding: 0 9px;
    font-size: 10px;
  }

  body.purchase-view .purchase-location-page .purchase-category-header {
    padding: 4px 8px;
    font-size: 10px;
    line-height: 1.2;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 72px;
    column-gap: 6px;
    row-gap: 2px;
    align-items: start;
    min-height: 80px;
    padding: 6px 7px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-thumb {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 72px;
    height: 72px;
    border-radius: 7px;
    background: #ffffff;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-thumb img {
    object-fit: contain;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .order-main {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-counts {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    align-self: start;
    z-index: 2;
    width: 30px;
    height: 30px;
    min-width: 0;
    margin: -7px -5px 0 0;
    padding: 0;
    border-left: 0;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    pointer-events: none;
    text-align: center;
    box-shadow: 0 5px 14px rgba(220, 38, 38, 0.24);
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-counts strong {
    color: #ffffff;
    font-size: 15.5px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transform: translateY(-0.5px);
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-counts span {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-flavor-line {
    display: -webkit-box;
    order: 1;
    overflow: hidden;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.14;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .order-title-line {
    order: 2;
    gap: 4px;
    margin-top: 2px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .order-title {
    display: -webkit-box;
    overflow: hidden;
    color: #526273;
    font-size: 10.5px;
    line-height: 1.14;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .order-meta-primary {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-mobile-secondary {
    display: block;
    order: 3;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-shop-source-line {
    display: block;
    order: 4;
    color: #64748b;
    font-size: 9.5px;
    line-height: 1.16;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .order-meta,
  body.purchase-view .order-item[data-order-mode="purchase"] .order-context,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-link {
    margin-top: 2px;
    font-size: 9.5px;
    line-height: 1.16;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .order-context {
    order: 5;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-link {
    display: inline-block;
    order: 6;
    max-width: 100%;
    font-weight: 800;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-rollover-hint {
    order: 7;
    gap: 3px;
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.1;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-rollover-hint span,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-rollover-hint em {
    padding: 1px 5px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-panel {
    order: 8;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 3px;
    padding: 0 0 0 48px;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-header,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-buttons {
    display: contents;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-header .purchase-override-label {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-header .purchase-override-status {
    order: 4;
    flex: 1 1 100%;
    min-width: 0;
    margin-top: 1px;
    padding-left: 24px;
    color: #dc2626;
    font-size: 9px;
    font-weight: 850;
    line-height: 1.12;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-note-button,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-save,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-confirm-button {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 23px;
    padding: 0 4px;
    border-radius: 5px;
    font-size: 9px;
    line-height: 1;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="缺货"] {
    order: 1;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="无需采购"] {
    order: 2;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-note-button {
    order: 3;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="已采购"],
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="未采购"] {
    display: none !important;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-details.is-open {
    display: grid;
    grid-template-columns: minmax(0, 86px) minmax(0, 1fr) auto;
    align-items: end;
    gap: 4px;
    flex: 1 1 100%;
    margin-top: 2px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-field {
    gap: 2px;
    font-size: 9px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-field span,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-field small {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-field input,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-control select {
    min-height: 26px;
    padding: 0 7px;
    font-size: 16px;
    line-height: 1;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-field input[data-purchased-quantity] {
    width: 100%;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-note-field input {
    width: 100%;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    width: 100%;
    margin-top: 3px;
    padding: 0;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-control.purchase-location-inline-control {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-location-inline-control .purchase-override-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    padding: 5px 6px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-summary-backup {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-summary-main {
    gap: 4px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-summary-main small {
    font-size: 9px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-summary-main strong {
    font-size: 11px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-toggle {
    min-height: 26px;
    padding: 0 7px;
    font-size: 10px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-location-inline-control .purchase-location-categories,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-location-inline-control .purchase-primary-list,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-location-inline-control .purchase-backup-list {
    max-height: 86px;
    overflow: auto;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-control .purchase-override-label,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-control .purchase-override-status {
    display: none;
  }
}

@media (max-width: 760px) {
  .wuliu-legacy-view-head,
  .wuliu-legacy-order-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .wuliu-legacy-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .wuliu-legacy-meta {
    grid-template-columns: 1fr;
  }

  .wuliu-legacy-meta div,
  .wuliu-legacy-meta div:nth-child(4n),
  .wuliu-legacy-meta div:nth-last-child(-n + 4) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wuliu-legacy-meta div:last-child {
    border-bottom: 0;
  }

  .wuliu-legacy-meta div.is-wide {
    grid-column: auto;
  }

  .wuliu-legacy-item {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 8px;
  }

  .wuliu-legacy-photos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .wuliu-legacy-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .wuliu-drawer-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .wuliu-drawer-head > div {
    min-width: 0;
  }

  .wuliu-drawer-head h2,
  .wuliu-drawer-head p {
    width: auto;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .wuliu-drawer-head #wuliu-form-drawer-close {
    width: auto;
    min-width: 72px;
    justify-self: end;
  }
}

/* Order-to-ship workflow control center. */
.home-nav-card-primary {
  border-color: rgba(15, 118, 110, 0.42);
  background: linear-gradient(180deg, #ffffff, #edf7f4);
}

.workflow-panel {
  display: block;
}

.section-status-label.is-error {
  border-color: rgba(180, 35, 44, 0.28);
  background: #fff1f2;
  color: var(--red);
}

.workflow-stage-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(96px, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.workflow-stage-card {
  display: grid;
  align-content: center;
  min-height: 72px;
  padding: 10px;
  border-color: var(--line);
  background: var(--surface-soft);
  text-align: left;
}

.workflow-stage-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.workflow-stage-card strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.workflow-stage-card.warn {
  border-color: rgba(181, 107, 18, 0.26);
  background: #fff7ed;
}

.workflow-stage-card.done {
  border-color: rgba(18, 128, 92, 0.26);
  background: #edfdf7;
}

.workflow-stage-card.danger {
  border-color: rgba(180, 35, 44, 0.24);
  background: #fff1f2;
}

.workflow-stage-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.workflow-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.workflow-command-grid a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: inherit;
  text-decoration: none;
}

.workflow-command-grid a:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.workflow-command-grid span {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.workflow-command-grid strong {
  color: var(--ink);
  font-size: 14px;
}

.workflow-command-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.workflow-mobile-tabs,
.workflow-mobile-hero,
.workflow-mobile-process,
.workflow-mobile-alert,
.workflow-list-meta {
  display: none;
}

.workflow-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.workflow-order-lookup {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.workflow-order-lookup label {
  display: grid;
  gap: 6px;
}

.workflow-order-lookup label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-order-lookup input {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
}

.workflow-order-lookup-scanner {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #f0fdfa;
}

.workflow-order-lookup-camera {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid #a8ded0;
  border-radius: 8px;
  background: #071815;
}

.workflow-order-lookup-camera video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workflow-order-lookup-scan-guide {
  position: absolute;
  inset: 30% 8%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-left-width: 14px;
  border-right-width: 14px;
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.workflow-order-lookup-scanner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-order-lookup-scanner-bar span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.workflow-order-lookup-scanner-bar span.is-success {
  color: #0f766e;
}

.workflow-order-lookup-scanner-bar span.is-error {
  color: #b91c1c;
}

.workflow-order-lookup-result {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.workflow-order-lookup-result.is-empty {
  margin-bottom: 0;
}

.workflow-lookup-empty {
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 13px;
}

.workflow-lookup-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-lookup-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.workflow-lookup-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-lookup-main strong,
.workflow-lookup-main em,
.workflow-lookup-card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-lookup-main strong {
  color: var(--ink);
}

.workflow-lookup-main em {
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.workflow-lookup-meta,
.workflow-lookup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.workflow-lookup-meta span,
.workflow-lookup-actions span {
  color: var(--muted);
  font-size: 12px;
}

.workflow-lookup-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.workflow-lookup-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.workflow-lookup-rollup {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #cfe3df;
  border-radius: 8px;
  background: #f7fbfa;
}

.workflow-lookup-rollup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-lookup-rollup-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.workflow-lookup-rollup-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.workflow-lookup-rollup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.workflow-lookup-rollup-group {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-left: 3px solid #94a3b8;
  border-radius: 7px;
  background: #ffffff;
}

.workflow-lookup-rollup-group.is-done {
  border-left-color: #0f9f78;
}

.workflow-lookup-rollup-group.is-partial {
  border-left-color: #d99a24;
}

.workflow-lookup-rollup-group.is-error {
  border-left-color: #dc3f4f;
}

.workflow-lookup-rollup-group.is-muted {
  border-left-color: #cbd5e1;
  background: #fbfcfd;
}

.workflow-lookup-rollup-group > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
}

.workflow-lookup-rollup-group > header strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.workflow-lookup-rollup-group > header span {
  max-width: 68%;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.workflow-lookup-rollup-entries {
  display: grid;
  gap: 6px;
}

.workflow-lookup-rollup-entries > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-top: 6px;
  border-top: 1px solid #edf1f3;
}

.workflow-lookup-rollup-entries b,
.workflow-lookup-rollup-entries em,
.workflow-lookup-rollup-entries small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workflow-lookup-rollup-entries b {
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.workflow-lookup-rollup-entries em {
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.workflow-lookup-rollup-entries small,
.workflow-lookup-rollup-group > p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.workflow-lookup-products {
  display: grid;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.workflow-lookup-photos {
  display: grid;
  gap: 8px;
  padding: 8px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workflow-lookup-photos.is-compact {
  gap: 6px;
  padding: 7px;
  border-color: #dce8e5;
  background: #f8fbfa;
}

.workflow-lookup-photos.is-compact .workflow-lookup-photos-head strong,
.workflow-lookup-photos.is-compact .workflow-lookup-photos-head span {
  font-size: 11px;
}

.workflow-lookup-photos.is-compact .workflow-lookup-photo-list {
  grid-template-columns: repeat(auto-fill, minmax(64px, 80px));
  gap: 6px;
}

.workflow-lookup-photos-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.workflow-lookup-photos-head strong {
  color: var(--ink);
  font-size: 13px;
}

.workflow-lookup-photos-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-lookup-photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 112px));
  gap: 8px;
}

.workflow-lookup-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.workflow-lookup-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workflow-lookup-photo span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  overflow: hidden;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-lookup-products-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.workflow-lookup-products-head strong {
  color: var(--ink);
  font-size: 13px;
}

.workflow-lookup-products-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-lookup-product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 12px;
}

.workflow-lookup-product {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.workflow-lookup-product-thumb {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-lookup-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workflow-lookup-product-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-lookup-product-body strong,
.workflow-lookup-product-body em,
.workflow-lookup-product-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-lookup-product-body strong {
  color: var(--ink);
  font-size: 13px;
}

.workflow-lookup-product-body em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.workflow-lookup-product-body small {
  color: var(--muted);
  font-size: 12px;
}

.workflow-lookup-progress-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.workflow-lookup-progress {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.workflow-lookup-progress b,
.workflow-lookup-progress em {
  min-width: 0;
  padding: 0 7px;
  font-size: 12px;
  line-height: 22px;
  white-space: nowrap;
}

.workflow-lookup-progress b {
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted);
}

.workflow-lookup-progress em {
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.workflow-lookup-progress.is-done {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.08);
}

.workflow-lookup-progress.is-partial {
  border-color: rgba(217, 119, 6, 0.32);
  background: rgba(217, 119, 6, 0.08);
}

.workflow-lookup-progress.is-open {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(220, 38, 38, 0.06);
}

.workflow-lookup-progress.is-muted {
  color: var(--muted);
  background: rgba(100, 116, 139, 0.07);
}

.workflow-lookup-product-note {
  color: var(--accent) !important;
}

.workflow-shipping-reconcile {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-shipping-head,
.workflow-shipping-title,
.workflow-shipping-actions,
.workflow-shipping-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workflow-shipping-head,
.workflow-shipping-title {
  justify-content: space-between;
}

.workflow-shipping-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.workflow-shipping-head span {
  color: var(--muted);
  font-size: 11px;
}

.workflow-shipping-alert {
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
}

.workflow-shipping-alert.is-pending {
  background: #fff7e7;
  color: #9a5b0a;
}

.workflow-shipping-alert.is-complete {
  background: #eaf8f1;
  color: #08795c;
}

.workflow-shipping-alert.is-shortage {
  background: #fff0f1;
  color: #c9273b;
}

.workflow-shipping-list {
  display: grid;
}

.workflow-shipping-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.workflow-shipping-item.is-shortage {
  margin: 0 -6px;
  padding: 9px 6px;
  border-radius: 7px;
  background: #fff4f4;
}

.workflow-shipping-item.is-pinmail {
  margin: 0 -6px;
  padding: 9px 6px;
  border-radius: 7px;
  background: #f3f0ff;
}

.workflow-shipping-item-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.workflow-shipping-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-shipping-title em {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.workflow-shipping-item.is-complete .workflow-shipping-title em {
  background: #eaf8f1;
  color: #08795c;
}

.workflow-shipping-item.is-shortage .workflow-shipping-title em,
.workflow-shipping-reason {
  color: #c9273b !important;
}

.workflow-shipping-item.is-shortage .workflow-shipping-title em {
  background: #ffe7e9;
}

.workflow-shipping-item.is-pinmail .workflow-shipping-title em {
  background: #e9e2ff;
  color: #6d45b5;
}

.workflow-shipping-item-body > small {
  color: var(--muted);
  font-size: 12px;
}

.workflow-shipping-status-actions {
  box-sizing: border-box;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.workflow-shipping-status-actions button,
.workflow-shipping-actions button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.workflow-shipping-status-actions button {
  flex: 1 1 64px;
  min-width: 0;
  padding: 0 9px;
}

.workflow-shipping-status-actions button.is-active[data-shipping-status="齐全"] {
  border-color: #58b99b;
  background: #eaf8f1;
  color: #08795c;
}

.workflow-shipping-status-actions button.is-active:not([data-shipping-status="齐全"]) {
  border-color: #e98b95;
  background: #fff0f1;
  color: #c9273b;
}

.workflow-shipping-status-actions button.is-active[data-shipping-status="拼邮"] {
  border-color: #9d83d7;
  background: #f3f0ff;
  color: #6d45b5;
}

.workflow-shipping-shortage-fields {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(96px, .35fr) minmax(140px, 1fr);
  gap: 7px;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.workflow-shipping-shortage-fields.is-hidden {
  display: none;
}

.workflow-shipping-shortage-fields label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.workflow-shipping-shortage-fields input,
.workflow-shipping-shortage-fields select {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.workflow-shipping-shortage-fields .workflow-shipping-note-field {
  grid-column: 1 / -1;
}

.workflow-shipping-actions button {
  flex: 1 1 150px;
  min-height: 40px;
  padding: 0 12px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.workflow-shipping-actions button.secondary {
  flex: 0 1 140px;
  background: #fff;
  color: var(--accent);
}

.workflow-shipping-feedback {
  padding: 9px 10px;
  border: 1px solid #ef9aa3;
  border-radius: 7px;
  background: #fff0f1;
  color: #b91c31;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.workflow-shipping-feedback.is-hidden {
  display: none;
}

.workflow-shipping-feedback.is-success {
  border-color: #78c8ae;
  background: #eaf8f1;
  color: #08795c;
}

@media (max-width: 640px) {
  .workflow-shipping-status-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .workflow-shipping-status-actions button {
    width: 100%;
    min-height: 44px;
    padding: 0 4px;
  }

  .workflow-shipping-shortage-fields {
    grid-template-columns: minmax(92px, .38fr) minmax(0, 1fr);
  }

  .workflow-shipping-shortage-fields input,
  .workflow-shipping-shortage-fields select {
    min-height: 42px;
  }

  .workflow-shipping-actions button {
    min-height: 46px;
  }
}

.workflow-lookup-actions {
  justify-content: flex-end;
}

.workflow-lookup-actions a {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 30px;
  text-decoration: none;
}

.workflow-full-refund {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 10px;
  align-items: center;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.workflow-full-refund button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #b42318;
  border-radius: 7px;
  background: #fff5f4;
  color: #b42318;
  font-weight: 850;
}

.workflow-full-refund button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.workflow-full-refund small {
  color: var(--muted);
  line-height: 1.45;
}

.workflow-full-refund [data-full-refund-feedback] {
  grid-column: 1 / -1;
  min-height: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-full-refund [data-full-refund-feedback].is-success {
  color: #16794b;
}

.workflow-full-refund [data-full-refund-feedback].is-error {
  color: #b42318;
}

.workflow-toolbar label {
  display: grid;
  gap: 6px;
}

.workflow-toolbar label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-toolbar input,
.workflow-toolbar select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
}

.workflow-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 0.78fr);
  gap: 14px;
  align-items: start;
}

.workflow-flow-list {
  display: grid;
  gap: 8px;
}

.workflow-list-meta button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.workflow-task-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 4px 10px;
  min-height: 76px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workflow-task-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workflow-task-row strong,
.workflow-task-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-task-row strong {
  color: var(--ink);
}

.workflow-task-row small {
  grid-column: 2 / 3;
  color: var(--muted);
  font-weight: 500;
}

.workflow-task-body small {
  grid-column: auto;
}

.workflow-task-submeta {
  opacity: 0.86;
}

.workflow-task-row em {
  align-self: center;
  grid-row: 1 / span 2;
  grid-column: 3;
  color: var(--muted);
  font-style: normal;
}

.workflow-task-qty {
  align-self: center;
  grid-row: 1 / span 2;
  grid-column: 3;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: end;
  gap: 2px;
  color: var(--muted);
  font-weight: 800;
}

.workflow-task-qty strong {
  color: inherit;
  font-size: 16px;
}

.workflow-task-qty small {
  grid-column: auto;
  color: inherit;
}

.workflow-task-action {
  display: none;
}

.workflow-task-actions,
.workflow-task-time {
  display: none;
}

.workflow-task-row.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.workflow-task-stage {
  align-self: start;
  display: inline-flex;
  justify-content: center;
  min-width: 88px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-task-row.warn .workflow-task-stage,
.workflow-task-stage.warn {
  background: #fff7ed;
  color: var(--amber);
}

.workflow-task-row.done .workflow-task-stage,
.workflow-task-stage.done {
  background: #edfdf7;
  color: var(--green);
}

.workflow-task-row.danger .workflow-task-stage,
.workflow-task-stage.danger {
  background: #fff1f2;
  color: var(--red);
}

.workflow-detail-panel {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.workflow-detail-head h3 {
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
}

.workflow-detail-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.workflow-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.workflow-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-detail-list,
.workflow-event-list {
  display: grid;
  gap: 8px;
}

.workflow-detail-list h4,
.workflow-event-list h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.workflow-detail-item,
.workflow-event-list > div:not(.empty) {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 2px 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.workflow-detail-item strong,
.workflow-detail-item small,
.workflow-event-list strong,
.workflow-event-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-detail-item span,
.workflow-event-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-detail-item small,
.workflow-event-list small {
  grid-column: 2;
  color: var(--muted);
}

@media (max-width: 980px) {
  .workflow-stage-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workflow-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-layout {
    grid-template-columns: 1fr;
  }

  .workflow-detail-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .workflow-stage-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .workflow-stage-card {
    min-width: 112px;
  }

  .workflow-command-grid {
    grid-template-columns: 1fr;
  }

  .workflow-order-lookup {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .workflow-order-lookup label {
    grid-column: 1 / -1;
  }

  .workflow-order-lookup button {
    min-width: 0;
  }

  .workflow-order-lookup-scanner {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .workflow-order-lookup-camera {
    max-height: 48vh;
  }

  .workflow-lookup-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .workflow-lookup-rollup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-lookup-kind {
    width: fit-content;
  }

  .workflow-lookup-actions {
    justify-content: flex-start;
  }

  .workflow-lookup-product-list {
    grid-template-columns: 1fr;
  }

  .workflow-lookup-photo-list {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }

  .workflow-lookup-product {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .workflow-lookup-product-thumb {
    width: 52px;
    height: 52px;
  }

  .workflow-lookup-actions a {
    flex: 1 1 92px;
    text-align: center;
  }

  .workflow-full-refund {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-full-refund button {
    min-height: 46px;
    width: 100%;
  }

  .workflow-full-refund [data-full-refund-feedback] {
    grid-column: auto;
  }

  .workflow-panel {
    padding-bottom: 86px;
  }

  .workflow-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .workflow-toolbar label:first-child {
    grid-column: 1 / -1;
  }

  .workflow-search-label {
    grid-column: 1;
  }

  .workflow-toolbar button {
    grid-column: 2;
    min-width: 72px;
  }

  .workflow-flow-list {
    margin-top: 58px;
  }

  .workflow-task-row {
    grid-template-columns: 1fr auto;
    min-height: 92px;
  }

  .workflow-task-stage {
    justify-content: flex-start;
    min-width: 0;
    width: fit-content;
  }

  .workflow-task-row strong,
  .workflow-task-row small {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .workflow-task-row em {
    grid-row: 1;
    grid-column: 2;
  }

  .workflow-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-detail-actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }

  .workflow-detail-item,
  .workflow-event-list > div:not(.empty) {
    grid-template-columns: 1fr;
  }

  .workflow-detail-item small,
  .workflow-event-list small {
    grid-column: 1;
    white-space: normal;
  }
}

/* Final desktop workflow console override. Keep this last so older nav rules cannot flatten it. */
@media (min-width: 1024px) {
  body.workflow-view {
    background: #dfe8ed;
  }

  body.workflow-view .app-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    max-width: none;
    min-height: 100vh;
    padding: 0;
  }

  body.workflow-view .main-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-column: 1;
    grid-row: 1 / span 20;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 18px 16px;
    border: 0;
    border-radius: 0;
    background: #101820;
    box-shadow: 12px 0 28px rgba(15, 23, 42, 0.18);
  }

  body.workflow-view .main-topbar .topbar-main {
    display: grid;
    gap: 18px;
    align-items: start;
  }

  body.workflow-view .main-topbar .brand-block {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
  }

  body.workflow-view .main-topbar .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #0f9488;
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(20, 184, 166, 0.28);
  }

  body.workflow-view .main-topbar h1 {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.15;
  }

  body.workflow-view .main-topbar .brand-block p {
    margin-top: 6px;
    color: #8fa1af;
    line-height: 1.35;
  }

  body.workflow-view .main-topbar .top-actions {
    display: grid;
    gap: 8px;
    justify-content: stretch;
    width: 100%;
    padding: 12px 0 2px;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
  }

  body.workflow-view .main-topbar .server-pill,
  body.workflow-view .main-topbar .user-pill,
  body.workflow-view .main-topbar .plain-link,
  body.workflow-view .main-topbar .top-actions button {
    justify-content: flex-start;
    width: 100%;
    min-height: 34px;
    border-color: rgba(226, 232, 240, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #d7e1e8;
  }

  body.workflow-view .main-topbar .quick-nav,
  body.workflow-view.home-view .main-topbar .quick-nav {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    min-height: 0;
    max-height: none;
    margin-top: 20px;
    padding: 0;
    gap: 8px;
    overflow: visible;
    border-radius: 0;
    background: transparent;
  }

  body.workflow-view .main-topbar .quick-nav a,
  body.workflow-view.home-view .main-topbar .quick-nav a {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #b9c7d2;
    font-weight: 800;
  }

  body.workflow-view .main-topbar .quick-nav a:hover,
  body.workflow-view .main-topbar .quick-nav a.is-active,
  body.workflow-view .main-topbar .quick-nav a.nav-action-link.is-active {
    border-color: rgba(45, 212, 191, 0.36);
    background: #0f9488;
    color: #ffffff;
    box-shadow: none;
  }

  body.workflow-view .main-topbar .quick-nav a.nav-action-link:not(.is-active) {
    border-color: rgba(45, 212, 191, 0.22);
    background: rgba(15, 148, 136, 0.14);
    color: #b6f3eb;
  }

  body.workflow-view .app-shell > section,
  body.workflow-view .app-shell > .workspace,
  body.workflow-view .app-shell > .split-results {
    grid-column: 2;
    width: auto;
    max-width: none;
    margin: 18px 22px 22px;
  }

  body.workflow-view .workflow-panel {
    min-height: calc(100vh - 40px);
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  }

  body.workflow-view .workflow-panel > .section-head {
    align-items: stretch;
    margin: -18px -18px 16px;
    padding: 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px 8px 0 0;
    background: #172331;
    color: #ffffff;
  }

  body.workflow-view .workflow-panel > .section-head h2,
  body.workflow-view .workflow-panel > .section-head p,
  body.workflow-view .workflow-panel > .section-head .eyebrow,
  body.workflow-view .workflow-panel > .section-head .section-status-label {
    color: #ffffff;
  }

  body.workflow-view .workflow-panel > .section-head p {
    color: #c8d3dc;
  }

  body.workflow-view .workflow-panel > .section-head .section-status-label {
    border-color: rgba(226, 232, 240, 0.22);
    background: rgba(255, 255, 255, 0.08);
  }

  body.workflow-view .workflow-stage-strip {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: #ffffff;
  }

  body.workflow-view .workflow-command-grid a,
  body.workflow-view .workflow-toolbar,
  body.workflow-view .workflow-task-row,
  body.workflow-view .workflow-detail-panel {
    border-radius: 8px;
  }

  body.workflow-view .workflow-layout {
    grid-template-columns: minmax(460px, 1.08fr) minmax(380px, 0.82fr);
  }

  body.workflow-view .workflow-task-row {
    min-height: 82px;
    border-left: 4px solid #cbd5e1;
  }

  body.workflow-view .workflow-task-row.warn {
    border-left-color: #d97706;
  }

  body.workflow-view .workflow-task-row.danger {
    border-left-color: #b4232c;
  }

  body.workflow-view .workflow-task-row.done {
    border-left-color: #12805c;
  }
}

@media (max-width: 640px) {
  body.workflow-view {
    background: #edf5f7;
  }

  body.workflow-view .app-shell {
    padding: 0;
  }

  body.workflow-view .main-topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    min-height: 54px;
    margin: 0 0 8px;
    padding: 8px 12px;
    border: 0;
    border-radius: 0 0 8px 8px;
    background: #007a78;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  }

  body.workflow-view .main-topbar .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #ffffff;
    color: #007a78;
    box-shadow: none;
  }

  body.workflow-view .main-topbar h1 {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.1;
  }

  body.workflow-view .main-topbar .brand-block p {
    display: none;
  }

  body.workflow-view .workflow-panel {
    width: auto;
    margin: 0 8px 0;
    padding: 0 0 94px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.workflow-view .workflow-panel > .section-head {
    display: none;
  }

  body.workflow-view .workflow-mobile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 4px 10px;
  }

  body.workflow-view .workflow-mobile-hero div {
    display: grid;
    gap: 2px;
  }

  body.workflow-view .workflow-mobile-hero span {
    color: #66788a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.workflow-view .workflow-mobile-hero strong {
    color: var(--ink);
    font-size: 22px;
    line-height: 1.15;
  }

  body.workflow-view .workflow-mobile-hero button {
    min-height: 34px;
    padding: 0 14px;
    border-color: #aac0cf;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 800;
  }

  body.workflow-view .workflow-mobile-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    padding: 11px 12px;
    border-radius: 8px;
    background: #e0202d;
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(224, 32, 45, 0.18);
  }

  body.workflow-view .workflow-mobile-alert.is-hidden {
    display: none;
  }

  body.workflow-view .workflow-mobile-alert div {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  body.workflow-view .workflow-mobile-alert strong {
    font-size: 15px;
    line-height: 1.2;
  }

  body.workflow-view .workflow-mobile-alert span {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    opacity: 0.88;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-mobile-alert button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: #e0202d;
    font-weight: 900;
  }

  body.workflow-view .workflow-panel {
    padding-bottom: 94px;
  }

  body.workflow-view .workflow-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    margin: 0 -2px 10px;
    padding: 0 2px 8px;
    border-bottom: 1px solid rgba(15, 118, 110, 0.16);
  }

  body.workflow-view .workflow-mobile-tabs a {
    display: grid;
    place-items: center;
    min-height: 34px;
    border-bottom: 2px solid transparent;
    color: #526474;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
  }

  body.workflow-view .workflow-mobile-tabs a.is-active {
    border-bottom-color: #007a78;
    color: #007a78;
  }

  body.workflow-view .workflow-command-grid {
    display: none;
  }

  body.workflow-view .workflow-stage-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0;
    overflow: visible;
    padding: 0;
  }

  body.workflow-view .workflow-stage-card {
    min-width: 0;
    min-height: 48px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #ffffff;
  }

  body.workflow-view .workflow-stage-card[data-workflow-stage="blocked"] {
    border-color: #f2b7b9;
    background: #fff4f4;
    color: #d82932;
  }

  body.workflow-view .workflow-stage-card[data-workflow-stage="packing_pending"] {
    border-color: #f6c98b;
    background: #fff7eb;
    color: #e67800;
  }

  body.workflow-view .workflow-stage-card[data-workflow-stage="ready_to_ship"] {
    border-color: #b6d4ff;
    background: #eef6ff;
    color: #1f6fd6;
  }

  body.workflow-view .workflow-stage-card.is-empty:not(.is-active) {
    display: none;
  }

  body.workflow-view .workflow-stage-card span {
    font-size: 11px;
  }

  body.workflow-view .workflow-stage-card strong {
    font-size: 22px;
  }

  body.workflow-view .workflow-toolbar {
    position: sticky;
    top: 62px;
    z-index: 8;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 8px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.96);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
  }

  body.workflow-view .workflow-toolbar label:first-child {
    grid-column: 1 / -1;
  }

  body.workflow-view .workflow-search-label {
    grid-column: 1;
  }

  body.workflow-view .workflow-toolbar button {
    grid-column: 2;
    min-width: 0;
    width: 72px;
  }

  body.workflow-view .workflow-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  body.workflow-view .workflow-list-meta small {
    overflow: hidden;
    min-width: 0;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-flow-list {
    margin-top: 8px;
    padding-bottom: 94px;
  }

  body.workflow-view .workflow-layout {
    display: block;
  }

  body.workflow-view .workflow-task-row {
    grid-template-columns: minmax(0, 1fr) auto 58px;
    grid-template-areas:
      "stage time qty"
      "body body qty"
      "actions actions actions";
    gap: 7px 10px;
    min-height: 126px;
    padding: 12px;
    border-left-width: 5px;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] {
    border-color: #fac9cb;
    border-left-color: #e0202d;
    background: linear-gradient(90deg, #fff6f6 0%, #ffffff 42%);
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] {
    border-color: #f8d6a5;
    border-left-color: #f28a00;
    background: linear-gradient(90deg, #fff8ed 0%, #ffffff 42%);
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] {
    border-color: #bfdcff;
    border-left-color: #1f6fd6;
    background: linear-gradient(90deg, #f0f7ff 0%, #ffffff 42%);
  }

  body.workflow-view .workflow-task-stage {
    grid-area: stage;
    min-width: 0;
    width: fit-content;
    padding: 5px 10px;
  }

  body.workflow-view .workflow-task-body {
    grid-area: body;
    align-self: center;
    gap: 4px;
  }

  body.workflow-view .workflow-task-body strong,
  body.workflow-view .workflow-task-body small {
    grid-column: auto;
    white-space: normal;
  }

  body.workflow-view .workflow-task-body strong {
    font-size: 16px;
    line-height: 1.25;
  }

  body.workflow-view .workflow-task-body small {
    font-size: 12px;
    line-height: 1.35;
  }

  body.workflow-view .workflow-task-qty {
    grid-area: qty;
    align-self: start;
    justify-self: end;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 8px;
    background: #edf2f7;
    color: #475569;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-qty {
    background: #ffe8e9;
    color: #d82932;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] .workflow-task-qty {
    background: #fff0d7;
    color: #e67800;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] .workflow-task-qty {
    background: #e7f1ff;
    color: #1f6fd6;
  }

  body.workflow-view .workflow-task-qty strong {
    font-size: 24px;
    line-height: 1;
  }

  body.workflow-view .workflow-task-qty small {
    font-size: 11px;
    line-height: 1;
  }

  body.workflow-view .workflow-task-time {
    grid-area: time;
    display: block;
    align-self: center;
    justify-self: end;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-actions {
    grid-area: actions;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 2px;
  }

  body.workflow-view .workflow-task-secondary,
  body.workflow-view .workflow-task-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
  }

  body.workflow-view .workflow-task-action {
    border-color: transparent;
    background: #007a78;
    color: #ffffff;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-stage {
    background: #ffe8e9;
    color: #d82932;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] .workflow-task-stage {
    background: #fff0d7;
    color: #e67800;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] .workflow-task-stage {
    background: #e7f1ff;
    color: #1f6fd6;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-action {
    background: #e0202d;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] .workflow-task-action {
    background: #f28a00;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] .workflow-task-action {
    background: #1f6fd6;
  }

  body.workflow-view .workflow-detail-panel {
    margin-top: 10px;
  }

  body.workflow-view .workflow-detail-panel:has(.empty:only-child) {
    display: none;
  }
}

@media (max-width: 720px) {
  .library-search-toolbar {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 12px 14px 14px;
  }

  .library-search-field #library-search {
    min-height: 46px;
    font-size: 16px;
  }

  .library-search-hint {
    line-height: 1.4;
  }

  .jan-coverage-panel {
    padding: 14px;
  }

  .jan-coverage-head {
    flex-direction: column;
    gap: 8px;
  }

  .jan-coverage-updated {
    white-space: normal;
  }

  .jan-coverage-table {
    min-width: 720px;
  }

  .jan-shop-name {
    max-width: 210px;
  }
}

/* Mobile workflow v11: ChatGPT Pro reference pass, task-app layout. */
.workflow-task-thumb,
.workflow-task-card-meta,
.workflow-detail-media {
  display: none;
}

@media (max-width: 640px) {
  body.workflow-view {
    --workflow-mobile-primary: #17463f;
    --workflow-mobile-blue: #203f5f;
    --workflow-mobile-ink: #1f2933;
    --workflow-mobile-muted: #6b7680;
    --workflow-mobile-line: #dbe3e7;
    --workflow-mobile-soft: #f4f7f8;
    background: #f4f7f8;
  }

  body.workflow-view .main-topbar {
    min-height: 50px;
    margin: 0;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 22px rgba(31, 41, 51, 0.06);
    backdrop-filter: blur(14px);
  }

  body.workflow-view .main-topbar .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e8f2ef;
    color: var(--workflow-mobile-primary);
  }

  body.workflow-view .main-topbar h1 {
    color: var(--workflow-mobile-ink);
    font-size: 16px;
  }

  body.workflow-view .workflow-panel {
    margin: 0;
    padding: 10px 12px calc(110px + env(safe-area-inset-bottom));
  }

  body.workflow-view .workflow-mobile-hero {
    display: flex;
    margin: 0 0 8px;
    padding: 8px 0 4px;
  }

  body.workflow-view .workflow-mobile-hero span {
    color: var(--workflow-mobile-muted);
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
  }

  body.workflow-view .workflow-mobile-hero strong {
    color: var(--workflow-mobile-ink);
    font-size: 22px;
  }

  body.workflow-view .workflow-mobile-hero button {
    min-height: 32px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--workflow-mobile-primary);
    box-shadow: none;
  }

  body.workflow-view .workflow-mobile-alert {
    margin: 0 0 8px;
    padding: 9px 10px;
    border: 1px solid #f1c5c8;
    border-left: 4px solid #b23b45;
    border-radius: 8px;
    background: #fffafa;
    color: var(--workflow-mobile-ink);
    box-shadow: none;
  }

  body.workflow-view .workflow-mobile-alert strong {
    color: #9f2e3a;
    font-size: 13px;
  }

  body.workflow-view .workflow-mobile-alert span {
    color: #7a4c50;
    opacity: 1;
  }

  body.workflow-view .workflow-mobile-alert button {
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid #e8b8bc;
    border-radius: 999px;
    background: #ffffff;
    color: #9f2e3a;
  }

  body.workflow-view .workflow-mobile-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 8px;
    padding: 0 0 2px;
    border: 0;
    overflow-x: auto;
  }

  body.workflow-view .workflow-mobile-tabs a {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--workflow-mobile-muted);
    font-size: 12px;
  }

  body.workflow-view .workflow-mobile-tabs a.is-active {
    border-color: rgba(23, 70, 63, 0.22);
    background: #e9f3f0;
    color: var(--workflow-mobile-primary);
  }

  body.workflow-view .workflow-stage-strip {
    display: flex;
    gap: 7px;
    margin: 0 0 8px;
    padding: 0 0 2px;
    overflow-x: auto;
  }

  body.workflow-view .workflow-stage-card {
    flex: 0 0 auto;
    min-width: 74px;
    min-height: 42px;
    padding: 6px 9px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body.workflow-view .workflow-stage-card.is-empty:not(.is-active) {
    display: none;
  }

  body.workflow-view .workflow-stage-card.is-active {
    border-color: rgba(23, 70, 63, 0.28);
    background: #e9f3f0;
  }

  body.workflow-view .workflow-stage-card span {
    color: var(--workflow-mobile-muted);
    font-size: 10px;
  }

  body.workflow-view .workflow-stage-card strong {
    color: var(--workflow-mobile-ink);
    font-size: 20px;
  }

  body.workflow-view .workflow-toolbar {
    position: static;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 7px;
    margin: 0 0 8px;
    padding: 8px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
  }

  body.workflow-view .workflow-toolbar label:first-child,
  body.workflow-view .workflow-search-label {
    grid-column: 1 / -1;
  }

  body.workflow-view .workflow-toolbar label span {
    display: none;
  }

  body.workflow-view .workflow-toolbar input,
  body.workflow-view .workflow-toolbar select {
    min-height: 34px;
    border-radius: 8px;
    font-size: 13px;
  }

  body.workflow-view .workflow-toolbar button {
    grid-column: 2;
    min-height: 34px;
    width: 48px;
    padding: 0;
    border-radius: 8px;
  }

  body.workflow-view .workflow-list-meta {
    margin: 4px 1px 7px;
    color: var(--workflow-mobile-muted);
    font-size: 12px;
  }

  body.workflow-view .workflow-flow-list {
    gap: 9px;
    margin-top: 0;
    padding-bottom: 14px;
  }

  body.workflow-view .workflow-task-row {
    grid-template-columns: 72px minmax(0, 1fr) 52px;
    grid-template-areas:
      "thumb stage qty"
      "thumb body qty"
      "actions actions actions";
    gap: 7px 10px;
    min-height: 118px;
    padding: 10px;
    border: 1px solid var(--workflow-mobile-line);
    border-left: 4px solid #c9d4da;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 41, 51, 0.06);
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"],
  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"],
  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] {
    background: #ffffff;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] {
    border-left-color: #b23b45;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] {
    border-left-color: #b7792f;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] {
    border-left-color: var(--workflow-mobile-blue);
  }

  body.workflow-view .workflow-task-thumb {
    grid-area: thumb;
    display: block;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 1px solid #e4ebef;
    border-radius: 8px;
    background: #eef3f4;
  }

  body.workflow-view .workflow-task-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.workflow-view .workflow-task-thumb.is-empty {
    display: grid;
    place-items: center;
    color: var(--workflow-mobile-primary);
    font-size: 18px;
    font-weight: 900;
  }

  body.workflow-view .workflow-task-stage {
    grid-area: stage;
    align-self: start;
    min-width: 0;
    width: fit-content;
    max-width: 100%;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef3f4;
    color: var(--workflow-mobile-muted);
    font-size: 11px;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-stage {
    background: #fff0f1;
    color: #9f2e3a;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] .workflow-task-stage {
    background: #fff7ea;
    color: #9a5f16;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] .workflow-task-stage {
    background: #edf4fb;
    color: var(--workflow-mobile-blue);
  }

  body.workflow-view .workflow-task-body {
    grid-area: body;
    align-self: start;
    gap: 3px;
    min-width: 0;
  }

  body.workflow-view .workflow-task-body strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--workflow-mobile-ink);
    font-size: 15px;
    line-height: 1.25;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.workflow-view .workflow-task-body small {
    color: var(--workflow-mobile-muted);
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-submeta {
    display: none;
  }

  body.workflow-view .workflow-task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
  }

  body.workflow-view .workflow-task-card-meta em {
    max-width: 100%;
    overflow: hidden;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f5f6;
    color: var(--workflow-mobile-muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-qty {
    grid-area: qty;
    align-self: start;
    justify-self: end;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f1f5f6;
    color: var(--workflow-mobile-ink);
  }

  body.workflow-view .workflow-task-qty strong {
    font-size: 20px;
  }

  body.workflow-view .workflow-task-time {
    display: none;
  }

  body.workflow-view .workflow-task-actions {
    grid-area: actions;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    margin-top: 0;
  }

  body.workflow-view .workflow-task-secondary,
  body.workflow-view .workflow-task-action {
    min-height: 38px;
    border-radius: 8px;
    font-size: 13px;
  }

  body.workflow-view .workflow-task-secondary {
    border-color: var(--workflow-mobile-line);
    color: var(--workflow-mobile-ink);
  }

  body.workflow-view .workflow-task-action,
  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-action,
  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] .workflow-task-action,
  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] .workflow-task-action {
    background: var(--workflow-mobile-primary);
    color: #ffffff;
  }

  body.workflow-view .workflow-detail-panel {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 41, 51, 0.06);
  }

  body.workflow-view .workflow-detail-media {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #e4ebef;
    border-radius: 8px;
    background: #eef3f4;
    color: var(--workflow-mobile-primary);
    font-weight: 900;
  }

  body.workflow-view .workflow-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.workflow-view .workflow-detail-head h3 {
    font-size: 17px;
  }

  body.workflow-view .workflow-detail-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  body.workflow-view .workflow-detail-actions {
    position: sticky;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 12;
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 24px rgba(31, 41, 51, 0.1);
    backdrop-filter: blur(12px);
  }

  body.workflow-view .workflow-detail-actions > * {
    min-height: 40px;
    border-radius: 8px;
  }

  body.workflow-view .workflow-detail-item {
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-areas:
      "thumb stage"
      "thumb title"
      "thumb meta";
    gap: 2px 8px;
    padding: 8px;
    background: #f8fafb;
  }

  body.workflow-view .workflow-detail-item .workflow-task-thumb {
    grid-area: thumb;
    display: block;
    width: 50px;
    height: 50px;
  }

  body.workflow-view .workflow-detail-item > span:not(.workflow-task-thumb) {
    grid-area: stage;
  }

  body.workflow-view .workflow-detail-item strong {
    grid-area: title;
    white-space: normal;
  }

  body.workflow-view .workflow-detail-item small {
    grid-area: meta;
    grid-column: auto;
  }
}

/* Mobile workflow v11.1: compress the first screen after real-device review. */
@media (max-width: 640px) {
  body.workflow-view .workflow-panel {
    padding-top: 8px;
  }

  body.workflow-view .workflow-mobile-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    padding: 0;
  }

  body.workflow-view .workflow-mobile-hero div {
    min-width: 0;
  }

  body.workflow-view .workflow-mobile-hero span {
    font-size: 10px;
    line-height: 1.2;
  }

  body.workflow-view .workflow-mobile-hero strong {
    overflow: hidden;
    font-size: 19px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-mobile-hero button {
    width: 88px;
    min-height: 32px;
    padding: 0;
    font-size: 13px;
  }

  body.workflow-view .workflow-mobile-alert {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 9px;
  }

  body.workflow-view .workflow-mobile-alert div {
    min-width: 0;
  }

  body.workflow-view .workflow-mobile-alert strong,
  body.workflow-view .workflow-mobile-alert span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-mobile-alert strong {
    font-size: 13px;
  }

  body.workflow-view .workflow-mobile-alert span {
    font-size: 11px;
  }

  body.workflow-view .workflow-mobile-alert button {
    width: 76px;
    min-height: 30px;
    padding: 0;
    font-size: 12px;
  }

  body.workflow-view .workflow-mobile-tabs {
    margin-bottom: 7px;
  }

  body.workflow-view .workflow-stage-strip {
    margin-bottom: 7px;
  }

  body.workflow-view .workflow-stage-card {
    min-width: 66px;
    min-height: 36px;
    padding: 5px 8px;
  }

  body.workflow-view .workflow-stage-card strong {
    font-size: 17px;
  }

  body.workflow-view .workflow-toolbar {
    grid-template-columns: minmax(92px, 0.78fr) minmax(0, 1.22fr) 52px;
    align-items: end;
    gap: 6px;
    padding: 7px;
  }

  body.workflow-view .workflow-toolbar label:first-child,
  body.workflow-view .workflow-search-label {
    grid-column: auto;
    min-width: 0;
  }

  body.workflow-view .workflow-toolbar input,
  body.workflow-view .workflow-toolbar select {
    min-height: 34px;
    padding: 0 9px;
    font-size: 12px;
  }

  body.workflow-view .workflow-toolbar input::placeholder {
    color: #8b97a1;
  }

  body.workflow-view .workflow-toolbar button {
    grid-column: auto;
    width: 52px;
    min-height: 34px;
    padding: 0;
    font-size: 12px;
  }

  body.workflow-view .workflow-detail-media {
    height: 128px;
    aspect-ratio: auto;
  }

  body.workflow-view .workflow-detail-media.is-empty {
    height: 66px;
  }
}

/* Mobile workflow v12: D color high-density task tool. */
.workflow-task-alert,
.workflow-detail-info,
.workflow-progress-card {
  display: none;
}

@media (max-width: 640px) {
  body.workflow-view,
  body.wuliu-sandbox-view {
    --workflow-mobile-primary: #008577;
    --workflow-mobile-primary-dark: #006b61;
    --workflow-mobile-danger: #e02331;
    --workflow-mobile-warning: #e58a00;
    --workflow-mobile-blue: #1f6fd6;
    --workflow-mobile-ink: #17202a;
    --workflow-mobile-muted: #667384;
    --workflow-mobile-line: #e2e7ec;
    --workflow-mobile-soft: #f6f8fa;
    --workflow-mobile-panel: #ffffff;
    background: #f7f8fa;
  }

  body.workflow-view .app-shell,
  body.wuliu-sandbox-view .app-shell {
    padding: 0;
  }

  body.workflow-view .main-topbar,
  body.wuliu-sandbox-view .main-topbar {
    display: none;
  }

  body.workflow-view .workflow-panel {
    width: auto;
    margin: 0;
    padding: 12px 10px calc(104px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.workflow-view .workflow-panel > .section-head {
    display: none;
  }

  body.workflow-view .workflow-mobile-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    margin: 0 0 10px;
    padding: 1px 2px 0;
  }

  body.workflow-view .workflow-mobile-title-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  body.workflow-view .workflow-mobile-title-copy strong {
    overflow: hidden;
    color: var(--workflow-mobile-ink);
    font-size: 24px;
    font-weight: 950;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-mobile-title-copy span {
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    padding: 4px 8px;
    border: 1px solid #d9e4e8;
    border-radius: 999px;
    background: #ffffff;
    color: var(--workflow-mobile-muted);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-mobile-hero-actions {
    display: grid;
    grid-template-columns: auto auto;
    gap: 6px;
    align-items: center;
  }

  body.workflow-view .workflow-mobile-hero-actions button,
  body.workflow-view .workflow-mobile-hero-actions a {
    display: inline-grid;
    min-height: 32px;
    align-items: center;
    padding: 0 11px;
    border: 1px solid #d9e4e8;
    border-radius: 999px;
    background: #ffffff;
    color: var(--workflow-mobile-primary);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
  }

  body.workflow-view .workflow-mobile-process {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 8px;
    padding: 7px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(23, 32, 42, 0.05);
  }

  body.workflow-view .workflow-mobile-process-step {
    appearance: none;
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 72px;
    padding: 5px 2px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--workflow-mobile-muted);
    font: inherit;
  }

  body.workflow-view .workflow-mobile-process-step span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: #edf2f4;
    color: inherit;
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
  }

  body.workflow-view .workflow-mobile-process-step strong,
  body.workflow-view .workflow-mobile-process-step em,
  body.workflow-view .workflow-mobile-process-step b {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-mobile-process-step strong {
    color: var(--workflow-mobile-ink);
    font-size: 12px;
    font-weight: 950;
    line-height: 1.1;
  }

  body.workflow-view .workflow-mobile-process-step em {
    color: inherit;
    font-size: 10px;
    font-style: normal;
    font-weight: 850;
    line-height: 1;
  }

  body.workflow-view .workflow-mobile-process-step b {
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 999px;
    background: #f1f5f6;
    color: inherit;
    font-size: 10px;
    font-weight: 950;
    line-height: 1.2;
  }

  body.workflow-view .workflow-mobile-process-step.is-hot {
    color: var(--workflow-mobile-primary);
  }

  body.workflow-view .workflow-mobile-process-step.is-hot span,
  body.workflow-view .workflow-mobile-process-step.is-hot b {
    background: #e6f6f3;
    color: var(--workflow-mobile-primary);
  }

  body.workflow-view .workflow-mobile-process-step.is-active {
    background: #e8f7f4;
    color: var(--workflow-mobile-primary);
  }

  body.workflow-view .workflow-mobile-process-step.is-active span,
  body.workflow-view .workflow-mobile-process-step.is-active b {
    background: var(--workflow-mobile-primary);
    color: #ffffff;
  }

  body.workflow-view .workflow-mobile-tabs {
    display: none;
  }

  body.workflow-view .workflow-mobile-alert {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px;
    align-items: center;
    gap: 8px;
    min-height: 45px;
    margin: 0 0 8px;
    padding: 8px 9px;
    border: 1px solid #f4c2c6;
    border-left: 4px solid var(--workflow-mobile-danger);
    border-radius: 8px;
    background: #fff7f8;
    color: var(--workflow-mobile-ink);
    box-shadow: none;
  }

  body.workflow-view .workflow-mobile-alert.is-hidden {
    display: none;
  }

  body.workflow-view .workflow-mobile-alert div {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  body.workflow-view .workflow-mobile-alert strong,
  body.workflow-view .workflow-mobile-alert span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-mobile-alert strong {
    color: #b51824;
    font-size: 13px;
    font-weight: 950;
  }

  body.workflow-view .workflow-mobile-alert span {
    color: #7b4a4f;
    font-size: 11px;
    font-weight: 750;
    opacity: 1;
  }

  body.workflow-view .workflow-mobile-alert button {
    width: 70px;
    min-height: 30px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: var(--workflow-mobile-danger);
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
  }

  body.workflow-view .workflow-stage-strip {
    display: flex;
    gap: 0;
    margin: 0 0 8px;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
  }

  body.workflow-view .workflow-stage-strip::-webkit-scrollbar,
  body.workflow-view .workflow-mobile-tabs::-webkit-scrollbar {
    display: none;
  }

  body.workflow-view .workflow-stage-card {
    flex: 0 0 auto;
    width: 76px;
    max-width: 76px;
    min-width: 76px;
    min-height: 40px;
    margin: 0;
    padding: 5px 8px;
    border: 0;
    border-right: 1px solid #edf1f4;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.workflow-view .workflow-stage-card:last-child {
    border-right: 0;
  }

  body.workflow-view .workflow-stage-card.is-empty:not(.is-active) {
    display: none;
  }

  body.workflow-view .workflow-stage-card.is-active {
    border-radius: 6px;
    background: #eaf7f5;
    box-shadow: inset 0 0 0 1px rgba(0, 133, 119, 0.18);
  }

  body.workflow-view .workflow-stage-card[data-workflow-stage="blocked"].is-active,
  body.workflow-view .workflow-stage-card[data-workflow-stage="blocked"] {
    background: #fff2f3;
    color: var(--workflow-mobile-danger);
  }

  body.workflow-view .workflow-stage-card[data-workflow-stage="packing_pending"] {
    background: #fff7ec;
    color: var(--workflow-mobile-warning);
  }

  body.workflow-view .workflow-stage-card[data-workflow-stage="ready_to_ship"] {
    background: #eef6ff;
    color: var(--workflow-mobile-blue);
  }

  body.workflow-view .workflow-stage-card span {
    overflow: hidden;
    color: inherit;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-stage-card strong {
    color: inherit;
    font-size: 18px;
    font-weight: 950;
    line-height: 1;
  }

  body.workflow-view .workflow-command-grid {
    display: none;
  }

  body.workflow-view .workflow-toolbar {
    position: static;
    display: grid;
    grid-template-columns: minmax(88px, 0.7fr) minmax(0, 1.3fr) 48px;
    align-items: end;
    gap: 6px;
    margin: 0 0 8px;
    padding: 7px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
  }

  body.workflow-view .workflow-toolbar label:first-child,
  body.workflow-view .workflow-search-label {
    grid-column: auto;
    min-width: 0;
  }

  body.workflow-view .workflow-toolbar label span {
    display: none;
  }

  body.workflow-view .workflow-toolbar input,
  body.workflow-view .workflow-toolbar select {
    min-width: 0;
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid #dbe4e9;
    border-radius: 7px;
    background: #f8fafb;
    color: var(--workflow-mobile-ink);
    font-size: 12px;
    font-weight: 800;
  }

  body.workflow-view .workflow-toolbar input::placeholder {
    color: #8b97a1;
  }

  body.workflow-view .workflow-toolbar button {
    grid-column: auto;
    width: 48px;
    min-height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: var(--workflow-mobile-primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
  }

  body.workflow-view .workflow-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 2px 7px;
    color: var(--workflow-mobile-muted);
    font-size: 12px;
    font-weight: 850;
  }

  body.workflow-view .workflow-list-meta small {
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-layout {
    display: block;
  }

  body.workflow-view .workflow-flow-list {
    display: grid;
    gap: 8px;
    margin-top: 0;
    padding-bottom: 12px;
  }

  body.workflow-view .workflow-task-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb body stage"
      "thumb body time"
      "alert alert alert"
      "actions actions actions";
    gap: 7px 9px;
    min-height: 112px;
    padding: 9px;
    border: 1px solid var(--workflow-mobile-line);
    border-left: 4px solid #c8d3d8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(23, 32, 42, 0.06);
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"],
  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"],
  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] {
    background: #ffffff;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] {
    border-left-color: var(--workflow-mobile-danger);
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] {
    border-left-color: var(--workflow-mobile-warning);
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] {
    border-left-color: var(--workflow-mobile-blue);
  }

  body.workflow-view .workflow-task-thumb {
    grid-area: thumb;
    display: block;
    width: 78px;
    height: 78px;
    overflow: hidden;
    align-self: start;
    border: 1px solid #dde6eb;
    border-radius: 7px;
    background: #eef3f4;
  }

  body.workflow-view .workflow-task-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.workflow-view .workflow-task-thumb.is-empty {
    display: grid;
    place-items: center;
    color: var(--workflow-mobile-primary);
    font-size: 19px;
    font-weight: 950;
  }

  body.workflow-view .workflow-task-stage {
    grid-area: stage;
    align-self: start;
    justify-self: end;
    max-width: 76px;
    overflow: hidden;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef3f4;
    color: var(--workflow-mobile-muted);
    font-size: 11px;
    font-weight: 950;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-stage {
    background: #fff0f1;
    color: #b51824;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] .workflow-task-stage {
    background: #fff4df;
    color: #9a5f16;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] .workflow-task-stage {
    background: #edf4ff;
    color: var(--workflow-mobile-blue);
  }

  body.workflow-view .workflow-task-time {
    grid-area: time;
    display: block;
    align-self: start;
    justify-self: end;
    color: var(--workflow-mobile-muted);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-body {
    grid-area: body;
    display: grid;
    gap: 4px;
    min-width: 0;
    align-self: start;
  }

  body.workflow-view .workflow-task-title-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14px;
    align-items: start;
    gap: 4px;
    min-width: 0;
  }

  body.workflow-view .workflow-task-title-line strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--workflow-mobile-ink);
    font-size: 14px;
    font-weight: 950;
    line-height: 1.25;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.workflow-view .workflow-task-title-line i {
    color: #9aa6b2;
    font-size: 17px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
  }

  body.workflow-view .workflow-task-code {
    display: block;
    overflow: hidden;
    color: var(--workflow-mobile-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-submeta {
    display: none;
  }

  body.workflow-view .workflow-task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
  }

  body.workflow-view .workflow-task-card-meta em {
    max-width: 100%;
    overflow: hidden;
    padding: 2px 6px;
    border-radius: 999px;
    background: #f1f5f6;
    color: var(--workflow-mobile-muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-qty {
    display: none;
  }

  body.workflow-view .workflow-task-alert {
    grid-area: alert;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 4px 7px;
    border-radius: 7px;
    background: #fff8e9;
    color: #7c5317;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-alert {
    background: #fff1f2;
    color: #a91d29;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] .workflow-task-alert {
    background: #edf6ff;
    color: #185ca7;
  }

  body.workflow-view .workflow-task-alert b {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: currentColor;
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
  }

  body.workflow-view .workflow-task-alert em {
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-actions {
    grid-area: actions;
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: 7px;
    margin-top: 0;
  }

  body.workflow-view .workflow-task-secondary,
  body.workflow-view .workflow-task-action {
    display: flex;
    min-width: 0;
    min-height: 37px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-secondary {
    border: 1px solid var(--workflow-mobile-line);
    background: #ffffff;
    color: var(--workflow-mobile-ink);
  }

  body.workflow-view .workflow-task-action,
  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-action,
  body.workflow-view .workflow-task-row[data-workflow-stage="packing_pending"] .workflow-task-action,
  body.workflow-view .workflow-task-row[data-workflow-stage="ready_to_ship"] .workflow-task-action {
    border: 0;
    background: var(--workflow-mobile-primary);
    color: #ffffff;
  }

  body.workflow-view .workflow-detail-panel {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.workflow-view .workflow-detail-panel:has(.empty:only-child) {
    display: none;
  }

  body.workflow-view .workflow-detail-head,
  body.workflow-view .workflow-detail-metrics,
  body.workflow-view .workflow-detail-info,
  body.workflow-view .workflow-progress-card,
  body.workflow-view .workflow-detail-list,
  body.workflow-view .workflow-event-list {
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(23, 32, 42, 0.05);
  }

  body.workflow-view .workflow-detail-head {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px;
  }

  body.workflow-view .workflow-detail-media {
    display: grid;
    width: 104px;
    height: 104px;
    margin: 0;
    aspect-ratio: auto;
    border-radius: 7px;
  }

  body.workflow-view .workflow-detail-media.is-empty {
    height: 104px;
  }

  body.workflow-view .workflow-detail-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  body.workflow-view .workflow-detail-head h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--workflow-mobile-ink);
    font-size: 16px;
    font-weight: 950;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.workflow-view .workflow-detail-head p {
    overflow: hidden;
    margin: 0;
    color: var(--workflow-mobile-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-detail-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    padding: 0;
  }

  body.workflow-view .workflow-detail-metrics .metric {
    min-height: 58px;
    padding: 8px 6px;
    border: 0;
    border-right: 1px solid #edf1f4;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.workflow-view .workflow-detail-metrics .metric:last-child {
    border-right: 0;
  }

  body.workflow-view .workflow-detail-metrics .metric label {
    font-size: 10px;
  }

  body.workflow-view .workflow-detail-metrics .metric strong {
    font-size: 17px;
  }

  body.workflow-view .workflow-detail-info,
  body.workflow-view .workflow-progress-card {
    display: grid;
    gap: 8px;
    padding: 10px;
  }

  body.workflow-view .workflow-detail-info h4,
  body.workflow-view .workflow-progress-card h4,
  body.workflow-view .workflow-detail-list h4,
  body.workflow-view .workflow-event-list h4 {
    margin: 0;
    color: var(--workflow-mobile-ink);
    font-size: 14px;
    font-weight: 950;
    line-height: 1.2;
  }

  body.workflow-view .workflow-detail-info dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
  }

  body.workflow-view .workflow-detail-info div {
    min-width: 0;
    padding: 7px;
    border-radius: 7px;
    background: var(--workflow-mobile-soft);
  }

  body.workflow-view .workflow-detail-info dt,
  body.workflow-view .workflow-detail-info dd {
    margin: 0;
  }

  body.workflow-view .workflow-detail-info dt {
    color: var(--workflow-mobile-muted);
    font-size: 10px;
    font-weight: 900;
  }

  body.workflow-view .workflow-detail-info dd {
    overflow: hidden;
    margin-top: 3px;
    color: var(--workflow-mobile-ink);
    font-size: 12px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-progress-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  body.workflow-view .workflow-progress-track span {
    position: relative;
    display: grid;
    gap: 4px;
    justify-items: center;
    min-width: 0;
    color: #9aa6b2;
  }

  body.workflow-view .workflow-progress-track span::before {
    content: "";
    position: absolute;
    top: 12px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: #dfe6eb;
  }

  body.workflow-view .workflow-progress-track span:first-child::before {
    display: none;
  }

  body.workflow-view .workflow-progress-track span.is-done::before {
    background: var(--workflow-mobile-primary);
  }

  body.workflow-view .workflow-progress-track b {
    position: relative;
    z-index: 1;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 2px solid #dfe6eb;
    border-radius: 50%;
    background: #ffffff;
    color: inherit;
    font-size: 11px;
    font-weight: 950;
  }

  body.workflow-view .workflow-progress-track em {
    overflow: hidden;
    max-width: 100%;
    font-size: 10px;
    font-style: normal;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-progress-track span.is-done,
  body.workflow-view .workflow-progress-track span.is-current {
    color: var(--workflow-mobile-primary);
  }

  body.workflow-view .workflow-progress-track span.is-done b,
  body.workflow-view .workflow-progress-track span.is-current b {
    border-color: var(--workflow-mobile-primary);
    background: var(--workflow-mobile-primary);
    color: #ffffff;
  }

  body.workflow-view .workflow-detail-list,
  body.workflow-view .workflow-event-list {
    display: grid;
    gap: 8px;
    padding: 10px;
  }

  body.workflow-view .workflow-detail-item {
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-areas:
      "thumb stage"
      "thumb title"
      "thumb meta";
    gap: 2px 8px;
    padding: 8px;
    border-radius: 7px;
    background: #f8fafb;
  }

  body.workflow-view .workflow-detail-actions {
    position: sticky;
    bottom: calc(70px + env(safe-area-inset-bottom));
    z-index: 12;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 9px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -9px 24px rgba(23, 32, 42, 0.12);
    backdrop-filter: blur(12px);
  }

  body.workflow-view .workflow-detail-actions > * {
    min-height: 40px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 950;
  }

  body.workflow-view .workflow-detail-actions .primary-button {
    grid-column: span 2;
    background: var(--workflow-mobile-primary);
    color: #ffffff;
  }

  body.workflow-view .workflow-detail-actions button[data-workflow-transition="blocked"] {
    border-color: #f2bdc1;
    background: #fff5f6;
    color: var(--workflow-mobile-danger);
  }

  body.wuliu-sandbox-view .wuliu-sandbox-panel {
    width: auto;
    margin: 0;
    padding: 12px 10px calc(104px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head h2 {
    margin: 0;
    color: var(--workflow-mobile-ink);
    font-size: 24px;
    font-weight: 950;
    line-height: 1.08;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head p,
  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head .eyebrow {
    display: none;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head .section-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    align-items: center;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head .section-status-label {
    min-width: 0;
    overflow: hidden;
    padding: 7px 9px;
    border: 1px solid #d9e4e8;
    border-radius: 999px;
    background: #ffffff;
    color: var(--workflow-mobile-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head button,
  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head a {
    min-height: 32px;
    margin: 0;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
  }

  body.wuliu-sandbox-view #wuliu-sandbox-summary.summary-grid.compact {
    display: flex;
    gap: 0;
    margin: 0 0 8px;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
  }

  body.wuliu-sandbox-view #wuliu-sandbox-summary.summary-grid.compact .metric {
    flex: 0 0 78px;
    min-height: 44px;
    padding: 5px 7px;
    border: 0;
    border-right: 1px solid #edf1f4;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.wuliu-sandbox-view #wuliu-sandbox-summary.summary-grid.compact .metric label {
    font-size: 10px;
    line-height: 1.15;
  }

  body.wuliu-sandbox-view #wuliu-sandbox-summary.summary-grid.compact .metric strong {
    font-size: 18px;
    line-height: 1;
  }

  body.wuliu-sandbox-view #wuliu-sandbox-summary.summary-grid.compact .metric small {
    display: none;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-layout {
    display: block;
    border: 0;
    background: transparent;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs {
    position: static;
    display: flex;
    gap: 6px;
    margin: 0 0 8px;
    overflow-x: auto;
    padding: 0 0 2px;
    border: 0;
    background: transparent;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs::-webkit-scrollbar,
  body.wuliu-sandbox-view .wuliu-order-status-nav::-webkit-scrollbar {
    display: none;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs button {
    flex: 0 0 auto;
    min-height: 32px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--workflow-mobile-muted);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs > button,
  body.wuliu-sandbox-view .wuliu-sandbox-tabs > .wuliu-tab-group {
    display: none;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs > .wuliu-tab-group,
  body.wuliu-sandbox-view .wuliu-sandbox-tabs > button[data-wuliu-sandbox-tab="scan"],
  body.wuliu-sandbox-view .wuliu-sandbox-tabs > button[data-wuliu-sandbox-tab="batches"] {
    display: block;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs > .wuliu-tab-group > button {
    display: flex;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs button.is-active {
    border-color: rgba(0, 133, 119, 0.24);
    background: #e9f6f4;
    color: var(--workflow-mobile-primary);
    box-shadow: none;
  }

  body.wuliu-sandbox-view .packing-trial-notice {
    display: none;
  }

  body.wuliu-sandbox-view .wuliu-tab-group {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.wuliu-sandbox-view .wuliu-tab-group > button {
    width: auto;
    box-shadow: none;
  }

  body.wuliu-sandbox-view .wuliu-tab-group.is-open {
    border: 0;
    background: transparent;
  }

  body.wuliu-sandbox-view .wuliu-tab-group.is-open > button {
    border-color: rgba(0, 133, 119, 0.24);
    background: #e9f6f4;
    color: var(--workflow-mobile-primary);
    box-shadow: none;
  }

  body.wuliu-sandbox-view .wuliu-tab-submenu,
  body.wuliu-sandbox-view .wuliu-tab-group.is-open .wuliu-tab-submenu {
    display: none;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-main {
    min-width: 0;
    padding: 0;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-pane.is-active {
    display: grid;
    gap: 8px;
  }

  body.wuliu-sandbox-view .wuliu-order-status-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0 0 8px;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-order-status-nav button {
    flex: 0 0 auto;
    min-height: 32px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid #edf1f4;
    border-radius: 0;
    background: transparent;
    color: var(--workflow-mobile-muted);
    font-size: 11px;
    font-weight: 900;
  }

  body.wuliu-sandbox-view .wuliu-order-status-nav button.is-active {
    border-radius: 6px;
    background: var(--workflow-mobile-primary);
    color: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-search,
  body.wuliu-sandbox-view .wuliu-ruoyi-search.is-scan,
  body.wuliu-sandbox-view .wuliu-ruoyi-search.is-photo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 122px 56px 56px;
    gap: 7px;
    margin: 0 0 8px;
    padding: 8px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-search label {
    gap: 3px;
    font-size: 10px;
  }

  body.wuliu-sandbox-view #wuliu-order-search label {
    display: none;
  }

  body.wuliu-sandbox-view #wuliu-order-search label:nth-of-type(2),
  body.wuliu-sandbox-view #wuliu-order-search label:nth-of-type(11) {
    display: grid;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-search input,
  body.wuliu-sandbox-view .wuliu-ruoyi-search select {
    min-height: 34px;
    border-radius: 7px;
    background: #f8fafb;
    font-size: 12px;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-search button,
  body.wuliu-sandbox-view .wuliu-ruoyi-search a {
    min-height: 34px;
    margin: 0;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 900;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    overflow-x: auto;
    margin: 0 0 8px;
    padding: 7px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-toolbar button,
  body.wuliu-sandbox-view .wuliu-ruoyi-toolbar a {
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 36px;
    margin: 0;
    padding: 0 8px;
    border-radius: 7px;
    background: var(--workflow-mobile-primary);
    font-size: 12px;
    font-weight: 950;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-toolbar .btn-danger {
    background: var(--workflow-mobile-danger);
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-toolbar .btn-warning {
    background: var(--workflow-mobile-warning);
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-toolbar .btn-info,
  body.wuliu-sandbox-view .wuliu-ruoyi-toolbar .btn-primary {
    background: var(--workflow-mobile-blue);
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table {
    min-width: 760px;
    background: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-legacy-order-view {
    display: grid;
    gap: 8px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-view-head {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border: 1px solid var(--workflow-mobile-line);
    border-radius: 8px;
    background: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-legacy-order-list {
    gap: 8px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-order-card {
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--workflow-mobile-line);
    border-left: 4px solid var(--workflow-mobile-primary);
    border-radius: 8px;
    box-shadow: 0 7px 18px rgba(23, 32, 42, 0.06);
  }

  body.wuliu-sandbox-view .wuliu-legacy-order-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-order-head strong {
    overflow: hidden;
    font-size: 16px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.wuliu-sandbox-view .wuliu-legacy-order-head p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.wuliu-sandbox-view .wuliu-legacy-kicker {
    padding: 3px 7px;
    background: #e9f6f4;
    color: var(--workflow-mobile-primary);
    font-size: 10px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-actions button,
  body.wuliu-sandbox-view .wuliu-legacy-edit-button {
    min-height: 32px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: var(--workflow-mobile-primary);
    font-size: 12px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 7px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta div {
    padding: 7px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta div:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta div:nth-child(2n) {
    border-right: 0;
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta div:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta div.is-wide {
    grid-column: 1 / -1;
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta dt {
    font-size: 10px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta dd {
    font-size: 12px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-section {
    gap: 7px;
    padding: 9px;
    border-radius: 7px;
    background: var(--workflow-mobile-soft);
  }

  body.wuliu-sandbox-view .wuliu-legacy-section h4 {
    font-size: 13px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-items {
    gap: 6px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-item {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    padding: 7px;
    border-radius: 7px;
    background: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-legacy-item strong {
    font-size: 13px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-item em {
    font-size: 10px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-photos,
  body.wuliu-sandbox-view .wuliu-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-photo,
  body.wuliu-sandbox-view .wuliu-image-card {
    border-radius: 7px;
  }
}

/* Web console v14: shared desktop shell for the web-first deployment pass. */
@media (min-width: 1024px) {
  body.home-view,
  body.workflow-view,
  body.wuliu-sandbox-view {
    --web-console-canvas: #e9f0f4;
    --web-console-sidebar: #0d1821;
    --web-console-sidebar-soft: #18232c;
    --web-console-panel: #ffffff;
    --web-console-line: #d4e0e7;
    --web-console-line-strong: #b8c9d4;
    --web-console-ink: #15212d;
    --web-console-muted: #657689;
    --web-console-primary: #0f766e;
    --web-console-primary-dark: #115e59;
    --web-console-primary-soft: #e5f6f3;
    --web-console-blue: #286dd9;
    --web-console-amber: #d77a00;
    --web-console-red: #d92332;
    background: var(--web-console-canvas);
  }

  body.home-view .app-shell,
  body.workflow-view .app-shell,
  body.wuliu-sandbox-view .app-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    max-width: none;
    min-height: 100vh;
    padding: 0;
  }

  body.home-view .main-topbar,
  body.workflow-view .main-topbar,
  body.wuliu-sandbox-view .main-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-column: 1;
    grid-row: 1 / span 40;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 18px 16px;
    border: 0;
    border-radius: 0;
    background: var(--web-console-sidebar);
    box-shadow: 12px 0 32px rgba(15, 25, 34, 0.18);
  }

  body.home-view .main-topbar .topbar-main,
  body.workflow-view .main-topbar .topbar-main,
  body.wuliu-sandbox-view .main-topbar .topbar-main {
    display: grid;
    gap: 18px;
    align-items: start;
  }

  body.home-view .brand-block,
  body.workflow-view .brand-block,
  body.wuliu-sandbox-view .brand-block {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  body.home-view .brand-mark,
  body.workflow-view .brand-mark,
  body.wuliu-sandbox-view .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(180deg, #12a998, #08766d);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(10, 143, 130, 0.28);
  }

  body.home-view .main-topbar h1,
  body.workflow-view .main-topbar h1,
  body.wuliu-sandbox-view .main-topbar h1 {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.15;
  }

  body.home-view .brand-block p,
  body.workflow-view .brand-block p,
  body.wuliu-sandbox-view .brand-block p {
    margin-top: 6px;
    color: #91a2b1;
    line-height: 1.35;
  }

  body.home-view .top-actions,
  body.workflow-view .top-actions,
  body.wuliu-sandbox-view .top-actions {
    display: grid;
    justify-content: stretch;
    gap: 8px;
    width: 100%;
    padding: 12px 0 2px;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
  }

  body.home-view .server-pill,
  body.workflow-view .server-pill,
  body.wuliu-sandbox-view .server-pill,
  body.home-view .user-pill,
  body.workflow-view .user-pill,
  body.wuliu-sandbox-view .user-pill,
  body.home-view .top-actions .plain-link,
  body.workflow-view .top-actions .plain-link,
  body.wuliu-sandbox-view .top-actions .plain-link,
  body.home-view .top-actions button,
  body.workflow-view .top-actions button,
  body.wuliu-sandbox-view .top-actions button {
    justify-content: flex-start;
    width: 100%;
    min-height: 34px;
    margin: 0;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    color: #d7e1e8;
    font-size: 13px;
    font-weight: 850;
  }

  body.home-view .quick-nav,
  body.workflow-view .quick-nav,
  body.wuliu-sandbox-view .quick-nav {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column !important;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    margin-top: 20px;
    padding: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
  }

  body.home-view .quick-nav a,
  body.workflow-view .quick-nav a,
  body.wuliu-sandbox-view .quick-nav a {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #b9c7d2;
    font-size: 14px;
    font-weight: 850;
  }

  body.home-view .quick-nav a:hover,
  body.workflow-view .quick-nav a:hover,
  body.wuliu-sandbox-view .quick-nav a:hover,
  body.home-view .quick-nav a.is-active,
  body.workflow-view .quick-nav a.is-active,
  body.wuliu-sandbox-view .quick-nav a.is-active {
    border-color: rgba(45, 212, 191, 0.34);
    background: var(--web-console-primary);
    color: #ffffff;
    box-shadow: none;
  }

  body.home-view .quick-nav a.nav-action-link:not(.is-active),
  body.workflow-view .quick-nav a.nav-action-link:not(.is-active),
  body.wuliu-sandbox-view .quick-nav a.nav-action-link:not(.is-active) {
    border-color: rgba(45, 212, 191, 0.18);
    background: rgba(10, 143, 130, 0.13);
    color: #b6f3eb;
  }

  body.home-view .app-shell > section,
  body.workflow-view .app-shell > section,
  body.wuliu-sandbox-view .app-shell > section {
    grid-column: 2;
    width: auto;
    max-width: none;
    margin: 18px 22px 22px;
  }

  body.home-view .home-nav-panel,
  body.workflow-view .workflow-panel,
  body.wuliu-sandbox-view .wuliu-sandbox-panel {
    min-height: calc(100vh - 40px);
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  }

  body.home-view .home-title-row,
  body.workflow-view .workflow-panel > .section-head,
  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    margin: -18px -18px 16px;
    padding: 18px;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px 8px 0 0;
    background: #172331;
    color: #ffffff;
  }

  body.home-view .home-title-row h2,
  body.workflow-view .workflow-panel > .section-head h2,
  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.2;
  }

  body.home-view .home-title-row p,
  body.workflow-view .workflow-panel > .section-head p,
  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head p {
    max-width: 840px;
    margin: 8px 0 0;
    color: #c8d3dc;
    line-height: 1.45;
  }

  body.home-view .home-title-row .eyebrow,
  body.workflow-view .workflow-panel > .section-head .eyebrow,
  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head .eyebrow {
    color: #dff8f4;
  }

  body.workflow-view .workflow-panel > .section-head .section-actions,
  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head .section-actions {
    align-items: center;
  }

  body.workflow-view .workflow-panel > .section-head .section-status-label,
  body.wuliu-sandbox-view .wuliu-sandbox-panel > .section-head .section-status-label {
    border-color: rgba(226, 232, 240, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  body.home-view .home-nav-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    gap: 12px;
  }

  body.home-view .home-nav-card {
    position: relative;
    min-height: 112px;
    padding: 14px;
    overflow: hidden;
    border-color: #d5e3ea;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    box-shadow: none;
  }

  body.home-view .home-nav-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.72), rgba(40, 109, 217, 0.22));
  }

  body.home-view .home-nav-card-primary {
    border-color: rgba(15, 118, 110, 0.34);
    background: linear-gradient(180deg, #ffffff, #f0faf8);
  }

  body.home-view .home-nav-card span {
    color: var(--web-console-primary);
    font-size: 12px;
    font-weight: 950;
  }

  body.home-view .home-nav-card strong {
    margin-top: 8px;
    color: var(--web-console-ink);
    font-size: 17px;
  }

  body.home-view .home-nav-card small {
    margin-top: 8px;
    color: var(--web-console-muted);
    line-height: 1.38;
  }

  body.workflow-view .workflow-stage-strip {
    grid-template-columns: repeat(10, minmax(86px, 1fr));
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: #ffffff;
  }

  body.workflow-view .workflow-stage-card {
    min-height: 64px;
    padding: 9px;
    border: 1px solid var(--web-console-line);
    border-radius: 7px;
    background: #f8fbfc;
  }

  body.workflow-view .workflow-stage-card span {
    font-size: 11px;
    font-weight: 850;
  }

  body.workflow-view .workflow-stage-card strong {
    font-size: 25px;
  }

  body.workflow-view .workflow-command-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  body.workflow-view .workflow-command-grid a {
    min-height: 66px;
    padding: 12px;
    border-radius: 8px;
    box-shadow: none;
  }

  body.workflow-view .workflow-toolbar {
    grid-template-columns: minmax(150px, 220px) minmax(260px, 1fr) 74px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #ffffff;
  }

  body.workflow-view .workflow-layout {
    grid-template-columns: minmax(520px, 0.96fr) minmax(420px, 1.04fr);
    gap: 14px;
  }

  body.workflow-view .workflow-flow-list {
    gap: 7px;
  }

  body.workflow-view .workflow-task-row {
    grid-template-columns: 96px minmax(0, 1fr) 76px;
    grid-template-areas:
      "stage body qty"
      "stage body qty"
      "stage alert qty";
    min-height: 74px;
    padding: 10px 12px;
    border-radius: 8px;
    border-left-width: 4px;
    box-shadow: none;
  }

  body.workflow-view .workflow-task-stage {
    grid-area: stage;
    align-self: center;
    min-width: 76px;
    max-width: 88px;
    padding: 5px 8px;
  }

  body.workflow-view .workflow-task-thumb,
  body.workflow-view .workflow-task-time,
  body.workflow-view .workflow-task-actions {
    display: none;
  }

  body.workflow-view .workflow-task-body {
    grid-area: body;
    align-self: center;
  }

  body.workflow-view .workflow-task-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  body.workflow-view .workflow-task-title-line strong {
    font-size: 15px;
  }

  body.workflow-view .workflow-task-title-line i {
    color: #9aabba;
    font-style: normal;
    font-weight: 900;
  }

  body.workflow-view .workflow-task-code,
  body.workflow-view .workflow-task-submeta {
    color: var(--web-console-muted);
    font-size: 12px;
  }

  body.workflow-view .workflow-task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
  }

  body.workflow-view .workflow-task-card-meta em {
    max-width: 170px;
    overflow: hidden;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef3f6;
    color: var(--web-console-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-qty {
    grid-area: qty;
    align-self: center;
    justify-self: end;
    display: inline-grid;
    grid-template-columns: auto auto;
    gap: 3px;
  }

  body.workflow-view .workflow-task-alert {
    grid-area: alert;
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    min-height: 24px;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff5e8;
    color: #8a550e;
  }

  body.workflow-view .workflow-task-alert b {
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 50%;
    background: currentColor;
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
  }

  body.workflow-view .workflow-task-alert em {
    overflow: hidden;
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-task-row.danger .workflow-task-alert {
    background: #fff1f2;
    color: var(--web-console-red);
  }

  body.workflow-view .workflow-detail-panel {
    top: 18px;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    box-shadow: none;
  }

  body.workflow-view .workflow-detail-head {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  body.workflow-view .workflow-detail-media {
    display: grid;
    width: 118px;
    height: 118px;
    margin: 0;
    border: 1px solid var(--web-console-line);
    border-radius: 8px;
    background: #eef4f6;
    overflow: hidden;
  }

  body.workflow-view .workflow-detail-info,
  body.workflow-view .workflow-progress-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--web-console-line);
    border-radius: 8px;
    background: #f8fbfc;
  }

  body.workflow-view .workflow-detail-info h4,
  body.workflow-view .workflow-progress-card h4 {
    margin: 0;
    color: var(--web-console-ink);
    font-size: 13px;
  }

  body.workflow-view .workflow-detail-info dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
  }

  body.workflow-view .workflow-detail-info div {
    min-width: 0;
    padding: 7px;
    border-radius: 6px;
    background: #ffffff;
  }

  body.workflow-view .workflow-detail-info dt,
  body.workflow-view .workflow-detail-info dd {
    margin: 0;
  }

  body.workflow-view .workflow-detail-info dt {
    color: var(--web-console-muted);
    font-size: 11px;
    font-weight: 850;
  }

  body.workflow-view .workflow-detail-info dd {
    overflow: hidden;
    margin-top: 3px;
    color: var(--web-console-ink);
    font-size: 12px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.workflow-view .workflow-progress-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  body.workflow-view .workflow-progress-track span {
    display: grid;
    justify-items: center;
    gap: 4px;
    color: #91a2af;
  }

  body.workflow-view .workflow-progress-track b {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 2px solid #d5e1e8;
    border-radius: 50%;
    font-size: 11px;
  }

  body.workflow-view .workflow-progress-track em {
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
  }

  body.workflow-view .workflow-progress-track span.is-done,
  body.workflow-view .workflow-progress-track span.is-current {
    color: var(--web-console-primary);
  }

  body.workflow-view .workflow-progress-track span.is-done b,
  body.workflow-view .workflow-progress-track span.is-current b {
    border-color: var(--web-console-primary);
    background: var(--web-console-primary);
    color: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-panel {
    padding: 18px;
  }

  body.wuliu-sandbox-view .packing-trial-notice {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(10, 143, 130, 0.18);
    border-radius: 8px;
    background: #eaf8f5;
  }

  body.wuliu-sandbox-view .packing-trial-notice strong {
    color: var(--web-console-ink);
    font-size: 14px;
  }

  body.wuliu-sandbox-view .packing-trial-notice span {
    color: var(--web-console-muted);
    line-height: 1.4;
  }

  body.wuliu-sandbox-view #wuliu-sandbox-summary.summary-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 12px;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    border: 1px solid var(--web-console-line);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs {
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 14px;
    border-right: 1px solid var(--web-console-line);
    background: #f3f7f9;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs button {
    min-height: 36px;
    margin: 0;
    border-radius: 7px;
    font-size: 13px;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs button.is-active,
  body.wuliu-sandbox-view .wuliu-tab-group.is-open > button {
    border-color: rgba(10, 143, 130, 0.24);
    background: var(--web-console-primary-soft);
    color: var(--web-console-primary-dark);
    box-shadow: inset 3px 0 0 var(--web-console-primary);
  }

  body.wuliu-sandbox-view .wuliu-sandbox-main {
    padding: 14px;
  }

  body.wuliu-sandbox-view .template-subhead {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--web-console-line);
    border-radius: 8px;
    background: #f8fbfc;
  }

  body.wuliu-sandbox-view .wuliu-order-status-nav {
    flex-wrap: wrap;
    gap: 7px;
    padding: 8px;
    border-radius: 8px;
  }

  body.wuliu-sandbox-view .wuliu-order-status-nav button {
    border: 1px solid var(--web-console-line);
    border-radius: 999px;
    background: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-order-status-nav button.is-active {
    border-color: var(--web-console-primary);
    background: var(--web-console-primary);
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-search {
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
    padding: 10px;
    border-radius: 8px;
    background: #ffffff;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-toolbar {
    padding: 9px 10px;
    border-radius: 8px;
  }

  body.wuliu-sandbox-view .wuliu-legacy-order-card {
    border-radius: 8px;
    border-left: 4px solid var(--web-console-primary);
    box-shadow: none;
  }

  body.wuliu-sandbox-view .wuliu-legacy-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table-wrap {
    border-radius: 8px;
  }
}

/* Web console v15 final override: every desktop module uses the same left shell. */
@media (min-width: 1024px) {
  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) {
    --web-console-canvas: #e9f0f4;
    --web-console-sidebar: #0d1821;
    --web-console-primary: #0f766e;
    --web-console-primary-dark: #115e59;
    --web-console-primary-soft: #e5f6f3;
    --web-console-line: #d4e0e7;
    padding-bottom: 0;
    background: var(--web-console-canvas);
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .app-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    padding: 0;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-column: 1;
    grid-row: 1 / span 80;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    width: 292px;
    min-height: 100vh;
    margin: 0;
    padding: 18px 16px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: var(--web-console-sidebar);
    box-shadow: 12px 0 32px rgba(15, 25, 34, 0.18);
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .topbar-main {
    display: grid;
    align-items: start;
    gap: 18px;
    min-width: 0;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .brand-block {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(180deg, #12a998, #08766d);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(10, 143, 130, 0.28);
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar h1 {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.15;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .brand-block p {
    margin-top: 6px;
    color: #91a2b1;
    line-height: 1.35;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .top-actions {
    display: grid;
    justify-content: stretch;
    gap: 8px;
    width: 100%;
    padding: 12px 0 2px;
    overflow: visible;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .top-actions form {
    width: 100%;
    margin: 0;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar :is(.server-pill, .user-pill, .plain-link, .top-actions button) {
    justify-content: flex-start;
    width: 100%;
    min-height: 34px;
    margin: 0;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    color: #d7e1e8;
    font-size: 13px;
    font-weight: 850;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column !important;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 0;
    margin-top: 20px;
    padding: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav a {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #b9c7d2;
    font-size: 14px;
    font-weight: 850;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav a:is(:hover, .is-active) {
    border-color: rgba(45, 212, 191, 0.34);
    background: var(--web-console-primary);
    color: #ffffff;
    box-shadow: none;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav a.nav-action-link:not(.is-active) {
    border-color: rgba(45, 212, 191, 0.18);
    background: rgba(10, 143, 130, 0.13);
    color: #b6f3eb;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .app-shell > :is(section, .workspace, .split-results) {
    grid-column: 2;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 18px 22px 22px;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .mobile-bottom-nav {
    display: none !important;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) {
    overflow-x: hidden;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .app-shell {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar {
    z-index: 60;
    transform: translateX(calc(-100% + 28px));
    transition: transform 180ms ease, box-shadow 180ms ease;
    will-change: transform;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 28px;
    height: 100%;
    border-left: 1px solid rgba(45, 212, 191, 0.28);
    background: linear-gradient(180deg, #0f766e, #0d1821 38%, #0d1821);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.06);
    pointer-events: none;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar:is(:hover, :focus-within) {
    transform: translateX(0);
    box-shadow: 18px 0 38px rgba(15, 25, 34, 0.24);
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar:is(:hover, :focus-within)::after {
    opacity: 0.16;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .app-shell > :is(section, .workspace, .split-results) {
    margin-left: 16px;
  }

  @media (prefers-reduced-motion: reduce) {
    body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar {
      transition: none;
    }
  }

}

/* Standalone account/config pages must keep the original top navigation shell. */
@media (min-width: 1024px) {
  .account-shell,
  .settings-shell {
    display: block;
    width: min(1220px, calc(100vw - 48px));
    min-height: auto;
    margin-inline: auto;
    padding: 24px 0 36px;
  }

  .settings-shell {
    width: min(1280px, calc(100vw - 48px));
  }

  .account-shell > section,
  .settings-shell > section,
  .account-shell > .notice,
  .settings-shell > .notice {
    grid-column: auto;
    width: auto;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
  }

  .account-shell .topbar,
  .settings-shell .topbar {
    position: static;
    display: flex;
    grid-column: auto;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-height: 76px;
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid rgba(167, 185, 199, 0.72);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    box-shadow: 0 12px 30px rgba(21, 35, 48, 0.08);
  }

  .account-shell .brand-block,
  .settings-shell .brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .account-shell .brand-mark,
  .settings-shell .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(145deg, #0b3541, #087f73 72%);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(8, 127, 115, 0.2);
  }

  .account-shell .topbar h1,
  .settings-shell .topbar h1 {
    color: var(--ink);
    font-size: 24px;
    line-height: 1.15;
  }

  .account-shell .topbar p,
  .settings-shell .topbar p {
    color: var(--muted);
  }

  .account-shell .top-actions,
  .settings-shell .top-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    width: auto;
    max-width: min(100%, 650px);
    padding: 0;
    overflow: visible;
    border: 0;
  }

  .account-shell .top-actions form,
  .settings-shell .top-actions form {
    width: auto;
    margin: 0;
  }

  .account-shell .top-actions .plain-link,
  .settings-shell .top-actions .plain-link,
  .account-shell .topbar form button[type="submit"],
  .settings-shell .topbar form button[type="submit"] {
    justify-content: center;
    width: auto;
    min-height: 38px;
    margin: 0;
    padding: 0 12px;
    border-color: var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
    box-shadow: none;
  }

  .account-shell .top-actions .plain-link:hover,
  .settings-shell .top-actions .plain-link:hover,
  .account-shell .topbar form button[type="submit"]:hover,
  .settings-shell .topbar form button[type="submit"]:hover {
    border-color: var(--line-strong);
    background: var(--surface-soft);
  }
}

.home-user-identity {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  width: fit-content;
  max-width: min(100%, 720px);
  padding: 6px 12px;
  overflow: hidden;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 999px;
  background: rgba(240, 253, 250, 0.92);
  color: #0f766e;
  font-weight: 900;
  white-space: normal;
}

.home-user-identity span {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.home-view .home-title-row .home-user-identity {
  border-color: rgba(20, 184, 166, 0.28);
  background: rgba(240, 253, 250, 0.92);
  color: #0f766e;
}

@media (min-width: 701px) {
  body.home-view .home-title-row .home-user-identity {
    transform: translateY(-4px);
  }
}

@media (max-width: 700px) {
  .home-user-identity {
    gap: 4px 10px;
    border-radius: 12px;
  }

  .module-guide-head {
    display: grid;
    align-items: start;
  }

  .module-guide-grid {
    grid-template-columns: 1fr;
  }

  .module-guide-item {
    scroll-margin-top: 84px;
  }

  .module-guide-action,
  .module-guide-back {
    width: 100%;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .module-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 701px) {
  body.home-view .module-guide-panel {
    display: none;
  }

  body.home-view .home-nav-card {
    min-height: 252px;
    padding: 16px;
  }

  body.home-view .home-nav-card strong {
    margin-top: 8px;
    font-size: 18px;
  }

  body.home-view .home-nav-card small {
    margin-top: 8px;
    padding-top: 0;
  }

  body.home-view .home-card-guide {
    display: grid;
    gap: 7px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
  }

  body.home-view .home-card-guide em {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
    margin: 0;
    min-width: 0;
    color: var(--web-console-muted, var(--muted));
    font-size: 12px;
    font-style: normal;
    line-height: 1.42;
  }

  body.home-view .home-card-guide b {
    color: var(--web-console-primary, var(--accent));
    font-weight: 950;
  }

  body.home-view .home-card-guide i {
    min-width: 0;
    color: var(--web-console-muted, var(--muted));
    font-style: normal;
  }

  body.home-view .home-card-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    min-height: 32px;
    margin-top: 4px;
    padding: 0 10px;
    border: 1px solid rgba(15, 118, 110, 0.32);
    border-radius: 7px;
    background: var(--web-console-primary-soft, var(--accent-soft));
    color: var(--web-console-primary-dark, var(--accent-strong));
    font-size: 12px;
    font-weight: 950;
  }

  body.home-view .home-nav-card:hover .home-card-entry {
    border-color: var(--web-console-primary, var(--accent));
    background: #dff5f1;
  }
}

/* Home-only account actions: keep account controls on the entry page, not every module page. */
body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .top-actions {
  display: none !important;
}

.home-title-row > div:first-child {
  min-width: 0;
}

.home-account-panel {
  flex: 0 0 336px;
  align-self: flex-start;
  display: grid;
  gap: 10px;
  width: min(336px, 100%);
  padding: 12px;
  border: 1px solid rgba(96, 125, 145, 0.76);
  border-radius: 8px;
  background: #111f2a;
  box-shadow: 0 18px 32px rgba(5, 13, 21, 0.24);
}

.home-account-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(69, 94, 112, 0.86);
  border-radius: 8px;
  background: #162936;
}

.home-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
}

.home-account-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-account-text strong {
  overflow: hidden;
  color: #e8f1f5;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-account-text small {
  color: #9fb1bf;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.home-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-account-actions form {
  display: contents;
}

.home-account-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(69, 94, 112, 0.86);
  border-radius: 8px;
  background: #162936;
  color: #e8f1f5;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.home-account-action:hover {
  border-color: rgba(94, 234, 212, 0.42);
  background: #1a303e;
}

.home-account-action-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #23e7dd;
}

.home-account-action-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.home-account-action-danger {
  border-color: rgba(248, 113, 113, 0.48);
  background: #2c1f24;
  color: #ffd9df;
  cursor: pointer;
}

.home-account-action-request {
  border-color: rgba(96, 165, 250, 0.48);
  background: #162f3e;
  color: #bfdbfe;
}

.home-account-action-wide {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .home-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .home-account-panel {
    flex-basis: auto;
    align-self: stretch;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .home-account-actions {
    grid-template-columns: 1fr;
  }

  .home-account-action {
    justify-content: flex-start;
  }
}

/* Home entry compacting: remove the pale title capsule without changing fonts. */
@media (min-width: 1024px) {
  body.home-view .home-title-row {
    margin-bottom: 0;
  }

  body.home-view .home-title-row > div:first-child {
    align-self: center;
  }

  body.home-view .home-title-row .eyebrow {
    display: none;
  }

  body.home-view .home-title-row p {
    margin-top: 14px;
  }
}

/* Desktop home entry v4: match the requested luminous work-window chooser. */
@media (min-width: 1024px) {
  body.home-view #home-section.home-nav-panel {
    position: relative;
    min-height: clamp(520px, 46vw, 650px);
    padding: clamp(44px, 4.4vw, 78px) clamp(46px, 5.8vw, 100px);
    overflow: hidden;
    border: 1px solid rgba(34, 133, 173, 0.42);
    border-radius: 26px;
    background:
      radial-gradient(circle at 3% 22%, rgba(31, 213, 255, 0.42) 0, rgba(31, 213, 255, 0.15) 5%, transparent 15%),
      radial-gradient(circle at 90% 88%, rgba(42, 235, 220, 0.22) 0, transparent 32%),
      linear-gradient(135deg, rgba(2, 20, 35, 0.96), rgba(3, 38, 56, 0.98) 48%, rgba(0, 14, 29, 0.96));
    box-shadow: inset 0 0 0 1px rgba(125, 219, 255, 0.08), 0 28px 68px rgba(3, 12, 24, 0.28);
  }

  body.home-view #home-section.home-nav-panel::before,
  body.home-view #home-section.home-nav-panel::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }

  body.home-view #home-section.home-nav-panel::before {
    top: -34%;
    left: -5%;
    width: 56%;
    aspect-ratio: 1.5;
    border-top: 2px solid rgba(28, 208, 255, 0.5);
    border-radius: 50%;
    filter: drop-shadow(0 0 22px rgba(28, 208, 255, 0.42));
    transform: rotate(-11deg);
  }

  body.home-view #home-section.home-nav-panel::after {
    inset: 0;
    background:
      linear-gradient(110deg, transparent 0 58%, rgba(10, 128, 167, 0.12) 72%, transparent 100%),
      radial-gradient(circle at 43% 97%, rgba(22, 183, 219, 0.2), transparent 30%);
    opacity: 0.78;
  }

  body.home-view #home-section.home-nav-panel > * {
    position: relative;
    z-index: 1;
  }

  body.home-view .home-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(42px, 5vw, 96px);
    min-height: clamp(420px, 34vw, 520px);
    margin: 0;
    padding: 0;
    border: 0;
  }

  body.home-view .home-title-row > div:first-child {
    flex: 1 1 660px;
    max-width: 880px;
    padding-left: clamp(8px, 3vw, 64px);
  }

  body.home-view .home-title-row h2 {
    max-width: 820px;
    margin: 0;
    color: #f8fbff;
    font-size: clamp(44px, 4.2vw, 72px);
    font-weight: 950;
    line-height: 1.12;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.44);
  }

  body.home-view .home-title-row h2::after {
    content: "";
    display: block;
    width: clamp(62px, 5vw, 90px);
    height: 6px;
    margin-top: clamp(24px, 2.3vw, 36px);
    border-radius: 999px;
    background: linear-gradient(90deg, #27efe6 0, rgba(39, 239, 230, 0.72) 58%, rgba(39, 239, 230, 0) 100%);
    box-shadow: 0 0 18px rgba(39, 239, 230, 0.62);
  }

  body.home-view .home-title-row p {
    max-width: 860px;
    margin-top: clamp(26px, 2.3vw, 36px);
    color: rgba(207, 222, 235, 0.86);
    font-size: clamp(22px, 1.75vw, 32px);
    font-weight: 820;
    line-height: 1.45;
  }

  body.home-view .home-account-panel {
    flex: 0 0 clamp(520px, 42vw, 860px);
    align-self: center;
    width: clamp(520px, 42vw, 860px);
    gap: clamp(16px, 1.3vw, 22px);
    padding: clamp(18px, 1.6vw, 28px);
    border: 1px solid rgba(91, 202, 247, 0.74);
    border-radius: 24px;
    background: linear-gradient(150deg, rgba(7, 39, 62, 0.82), rgba(1, 28, 48, 0.92));
    box-shadow: inset 0 0 0 1px rgba(119, 224, 255, 0.09), 0 24px 56px rgba(0, 10, 25, 0.42), 0 0 36px rgba(23, 214, 222, 0.12);
  }

  body.home-view .home-account-summary {
    grid-template-columns: clamp(68px, 5vw, 94px) minmax(0, 1fr);
    gap: clamp(20px, 1.6vw, 30px);
    min-height: clamp(122px, 10vw, 164px);
    padding: clamp(20px, 1.6vw, 30px);
    border: 1px solid rgba(54, 123, 171, 0.58);
    border-radius: 22px;
    background: rgba(3, 30, 51, 0.7);
    box-shadow: inset 0 0 28px rgba(17, 141, 184, 0.16);
  }

  body.home-view .home-account-avatar {
    width: clamp(68px, 5vw, 94px);
    height: clamp(68px, 5vw, 94px);
    background: linear-gradient(180deg, #13c5b8, #0f766e);
    color: #ffffff;
    font-size: clamp(30px, 2.5vw, 44px);
    box-shadow: 0 0 24px rgba(31, 239, 220, 0.34);
  }

  body.home-view .home-account-text {
    gap: 8px;
  }

  body.home-view .home-account-text strong {
    color: #f7fbff;
    font-size: clamp(28px, 2.45vw, 44px);
    line-height: 1.12;
  }

  body.home-view .home-account-text small {
    color: rgba(164, 184, 204, 0.9);
    font-size: clamp(18px, 1.45vw, 27px);
    font-weight: 820;
  }

  body.home-view .home-account-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 1.35vw, 24px);
  }

  body.home-view .home-account-action {
    gap: clamp(14px, 1.2vw, 24px);
    min-height: clamp(78px, 6.4vw, 108px);
    padding: 0 clamp(20px, 1.7vw, 34px);
    border: 1px solid rgba(22, 134, 190, 0.72);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(5, 58, 88, 0.72), rgba(3, 31, 52, 0.8));
    color: #f5fbff;
    font-size: clamp(23px, 1.8vw, 34px);
    font-weight: 950;
    box-shadow: inset 0 0 0 1px rgba(117, 219, 255, 0.06);
  }

  body.home-view .home-account-action:hover {
    border-color: rgba(52, 238, 227, 0.72);
    background: linear-gradient(180deg, rgba(8, 91, 118, 0.78), rgba(5, 48, 74, 0.88));
    box-shadow: 0 0 24px rgba(36, 233, 226, 0.16), inset 0 0 0 1px rgba(117, 219, 255, 0.1);
  }

  body.home-view .home-account-action-danger {
    border-color: rgba(47, 240, 224, 0.72);
    background: linear-gradient(135deg, rgba(15, 129, 120, 0.92), rgba(9, 190, 177, 0.86));
    color: #ffffff;
    box-shadow: 0 0 28px rgba(42, 238, 225, 0.22), inset 0 0 22px rgba(255, 255, 255, 0.08);
  }

  body.home-view .home-account-action-request {
    border-color: rgba(88, 166, 255, 0.72);
    background: linear-gradient(180deg, rgba(16, 77, 116, 0.78), rgba(4, 42, 70, 0.86));
    color: #d7eaff;
  }

  body.home-view .home-account-action-wide {
    grid-column: 1 / -1;
  }

  .home-account-action-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: clamp(30px, 2.5vw, 46px);
    height: clamp(30px, 2.5vw, 46px);
    color: #23e7dd;
  }

  .home-account-action-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  body.home-view .home-account-action-danger .home-account-action-icon {
    color: #34fff2;
  }

  body.home-view .home-nav-grid {
    margin-top: clamp(22px, 2vw, 34px);
  }

  body.home-view .home-nav-card {
    border-color: rgba(38, 118, 153, 0.5);
    background: rgba(4, 31, 51, 0.78);
    color: #eff8ff;
    box-shadow: inset 0 0 0 1px rgba(125, 219, 255, 0.04);
  }

  body.home-view .home-nav-card strong {
    color: #ffffff;
  }

  body.home-view .home-nav-card span,
  body.home-view .home-nav-card small,
  body.home-view .home-card-guide i {
    color: rgba(191, 211, 228, 0.82);
  }

  body.home-view .home-card-entry {
    border-color: rgba(45, 212, 191, 0.44);
    background: rgba(15, 118, 110, 0.24);
    color: #8ff7ed;
  }
}

@media (min-width: 1024px) and (max-width: 1420px) {
  body.home-view .home-title-row {
    align-items: stretch;
    flex-direction: column;
    min-height: auto;
  }

  body.home-view .home-title-row > div:first-child {
    max-width: none;
    padding-left: 0;
  }

  body.home-view .home-account-panel {
    align-self: stretch;
    width: 100%;
    flex-basis: auto;
  }
}

.mobile-home-only,
.mobile-home-group-title,
.mobile-home-icon {
  display: none;
}

/* Mobile home v1: app-like entry screen based on the requested reference. */
@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body.home-view {
    height: 100svh;
    height: 100dvh;
    min-height: 100dvh;
    padding: 0;
    overflow: hidden;
    background:
      radial-gradient(circle at 86% 16%, rgba(44, 219, 236, 0.3) 0 2px, transparent 3px),
      radial-gradient(circle at 82% 24%, rgba(44, 219, 236, 0.2), transparent 20%),
      radial-gradient(circle at 18% 10%, rgba(20, 184, 166, 0.14), transparent 26%),
      linear-gradient(148deg, #06101f 0%, #062238 46%, #041629 100%);
    color: #f7fbff;
  }

  body.home-view::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      linear-gradient(126deg, transparent 0 51%, rgba(35, 211, 234, 0.12) 52%, rgba(35, 211, 234, 0.34) 54%, transparent 66%),
      linear-gradient(132deg, transparent 0 58%, rgba(75, 142, 255, 0.14) 59%, transparent 72%),
      radial-gradient(ellipse at 94% 30%, rgba(25, 194, 211, 0.2), transparent 32%);
    opacity: 0.95;
  }

  body.home-view .app-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: 100svh;
    height: 100dvh;
    min-height: 100dvh;
    min-height: 0;
    padding: max(18px, calc(env(safe-area-inset-top) + 12px)) 18px max(12px, calc(env(safe-area-inset-bottom) + 8px));
    overflow: hidden;
  }

  body.home-view .main-topbar {
    flex: 0 0 auto;
    display: block;
    min-height: 0;
    margin: 0 0 clamp(10px, 1.7dvh, 18px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.home-view .main-topbar .topbar-main {
    display: block;
  }

  body.home-view .main-topbar .brand-block {
    display: grid;
    grid-template-columns: clamp(56px, 9dvh, 72px) minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    width: 100%;
  }

  body.home-view .main-topbar .brand-mark {
    width: clamp(56px, 9dvh, 72px);
    height: clamp(56px, 9dvh, 72px);
    border: 1px solid rgba(45, 236, 217, 0.7);
    border-radius: 8px;
    background: #f7ecdd;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34), 0 0 26px rgba(45, 236, 217, 0.16);
    object-fit: cover;
  }

  body.home-view .main-topbar h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(28px, 4.2dvh, 34px);
    line-height: 1.08;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.45);
  }

  body.home-view .main-topbar .brand-block p {
    display: block !important;
    max-width: none;
    margin: clamp(5px, 0.8dvh, 8px) 0 0;
    color: rgba(209, 223, 236, 0.78);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.45;
    white-space: nowrap;
  }

  body.home-view .main-topbar .quick-nav,
  body.home-view .main-topbar .top-actions,
  body.home-view .home-title-row,
  body.home-view .module-guide-panel,
  body.home-view .mobile-bottom-nav {
    display: none !important;
  }

  body.home-view .home-nav-panel {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.home-view .home-nav-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(4px, 0.7dvh, 7px);
    height: 100%;
    min-height: 0;
  }

  body.home-view .mobile-home-only {
    display: grid;
  }

  body.home-view .mobile-home-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: clamp(20px, 3dvh, 26px);
    margin: clamp(5px, 0.9dvh, 9px) 6px 2px;
    color: rgba(183, 204, 224, 0.74);
    font-size: 16px;
    font-weight: 950;
  }

  body.home-view .mobile-home-group-title::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(139, 165, 190, 0.4), transparent);
  }

  body.home-view .mobile-home-group-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    overflow: hidden;
    border: 1px solid rgba(134, 160, 188, 0.42);
    border-radius: 6px;
    color: rgba(155, 181, 209, 0.9);
    font-size: 10px;
    line-height: 1;
  }

  body.home-view .home-nav-card {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    min-height: clamp(50px, 6.9dvh, 62px);
    padding: clamp(5px, 0.9dvh, 8px) 15px clamp(5px, 0.9dvh, 8px) 12px;
    overflow: hidden;
    border: 1px solid rgba(92, 150, 190, 0.44);
    border-radius: 8px;
    background: linear-gradient(100deg, rgba(20, 54, 80, 0.82), rgba(5, 28, 52, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 26px rgba(0, 7, 18, 0.22);
    color: #ffffff;
    text-decoration: none;
    transform: none;
  }

  body.home-view .home-nav-card::before {
    display: none;
  }

  body.home-view .home-nav-card::after {
    content: "\203A";
    justify-self: end;
    color: rgba(176, 205, 230, 0.76);
    font-size: clamp(28px, 4.4dvh, 34px);
    font-weight: 300;
    line-height: 1;
  }

  body.home-view .home-nav-card:hover,
  body.home-view .home-nav-card:active {
    border-color: rgba(51, 232, 218, 0.78);
    background: linear-gradient(100deg, rgba(0, 141, 134, 0.9), rgba(10, 113, 125, 0.76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 30px rgba(0, 7, 18, 0.28);
  }

  body.home-view .home-mobile-home-card,
  body.home-view .home-mobile-home-card:hover,
  body.home-view .home-mobile-home-card:active {
    border-color: rgba(42, 248, 225, 0.9);
    background: linear-gradient(100deg, rgba(0, 173, 159, 0.94), rgba(0, 130, 142, 0.76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 16px 34px rgba(0, 177, 165, 0.2);
  }

  body.home-view .home-nav-card.mobile-home-hidden {
    display: none;
  }

  body.home-view .home-nav-card .home-card-index,
  body.home-view .home-nav-card small,
  body.home-view .home-card-guide {
    display: none;
  }

  body.home-view .home-nav-card strong {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: #ffffff;
    font-size: clamp(17px, 2.45dvh, 20px);
    font-weight: 950;
    line-height: 1.2;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.38);
  }

  body.home-view .mobile-home-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(42px, 5.8dvh, 52px);
    height: clamp(42px, 5.8dvh, 52px);
    border-radius: 999px;
    background: rgba(12, 65, 88, 0.78);
    color: #35ece3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 5, 16, 0.22);
  }

  body.home-view .mobile-home-icon svg {
    width: clamp(25px, 3.6dvh, 30px);
    height: clamp(25px, 3.6dvh, 30px);
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.15;
  }

  body.home-view .mobile-home-icon-home {
    color: #e9fff9;
    background: rgba(28, 191, 171, 0.78);
  }

  body.home-view .mobile-home-icon-library,
  body.home-view .mobile-home-icon-shipping {
    color: #6ff6e8;
  }

  body.home-view .mobile-home-icon-link,
  body.home-view .mobile-home-icon-stock {
    color: #6cc7ff;
  }

  body.home-view .mobile-home-icon-upload,
  body.home-view .mobile-home-icon-location {
    color: #62e4df;
  }

  body.home-view .mobile-home-icon-picking {
    color: #8e91ff;
  }

  body.home-view .mobile-home-icon-purchase {
    color: #35e4d7;
  }
}

@media (max-width: 420px) {
  body.home-view .app-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  body.home-view .main-topbar .brand-block {
    grid-template-columns: clamp(54px, 8dvh, 66px) minmax(0, 1fr);
    gap: 12px;
  }

  body.home-view .main-topbar .brand-mark {
    width: clamp(54px, 8dvh, 66px);
    height: clamp(54px, 8dvh, 66px);
  }

  body.home-view .main-topbar h1 {
    font-size: clamp(27px, 4dvh, 31px);
  }

  body.home-view .main-topbar .brand-block p {
    font-size: 13px;
    line-height: 1.25;
  }

  body.home-view .home-nav-card {
    grid-template-columns: clamp(46px, 6.3dvh, 54px) minmax(0, 1fr) 16px;
    min-height: clamp(48px, 6.6dvh, 59px);
    padding-right: 13px;
    gap: 10px;
  }

  body.home-view .home-nav-card strong {
    font-size: 18px;
  }

  body.home-view .mobile-home-icon {
    width: clamp(40px, 5.7dvh, 48px);
    height: clamp(40px, 5.7dvh, 48px);
  }

  body.home-view .mobile-home-icon svg {
    width: clamp(24px, 3.4dvh, 27px);
    height: clamp(24px, 3.4dvh, 27px);
  }
}

@media (max-width: 760px) and (max-height: 760px) {
  body.home-view .app-shell {
    padding-top: max(12px, calc(env(safe-area-inset-top) + 8px));
    padding-bottom: max(6px, calc(env(safe-area-inset-bottom) + 4px));
  }

  body.home-view .main-topbar {
    margin-bottom: clamp(6px, 1.2dvh, 10px);
  }

  body.home-view .main-topbar .brand-block {
    grid-template-columns: clamp(46px, 7.4dvh, 54px) minmax(0, 1fr);
    gap: 10px;
  }

  body.home-view .main-topbar .brand-mark {
    width: clamp(46px, 7.4dvh, 54px);
    height: clamp(46px, 7.4dvh, 54px);
  }

  body.home-view .main-topbar h1 {
    font-size: clamp(24px, 4dvh, 28px);
  }

  body.home-view .main-topbar .brand-block p {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.3;
  }

  body.home-view .home-nav-grid {
    gap: clamp(2px, 0.45dvh, 4px);
  }

  body.home-view .mobile-home-group-title {
    min-height: clamp(16px, 2.5dvh, 19px);
    margin: 3px 6px 1px;
    font-size: 14px;
  }

  body.home-view .mobile-home-group-title span {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  body.home-view .home-nav-card {
    grid-template-columns: clamp(38px, 5.9dvh, 44px) minmax(0, 1fr) 14px;
    min-height: clamp(42px, 6.4dvh, 48px);
    padding: 4px 12px 4px 10px;
  }

  body.home-view .home-nav-card strong {
    font-size: clamp(15px, 2.45dvh, 17px);
  }

  body.home-view .home-nav-card::after {
    font-size: clamp(24px, 4dvh, 30px);
  }

  body.home-view .mobile-home-icon {
    width: clamp(36px, 5.5dvh, 42px);
    height: clamp(36px, 5.5dvh, 42px);
  }

  body.home-view .mobile-home-icon svg {
    width: clamp(21px, 3.3dvh, 25px);
    height: clamp(21px, 3.3dvh, 25px);
  }
}

/* Mobile shell v3: keep the legacy quick-nav out of phone layouts. */
@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav {
    display: none !important;
  }
}

/* Desktop home banner v6: restored from v5 after later bundle overwrites; three-zone row, with the admin identity locked to center. */
@media (min-width: 1024px) {
  body.home-view .home-title-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 1vw, 16px);
    min-height: 84px;
    margin: 0 0 28px;
    padding: 14px clamp(16px, 1.7vw, 24px);
    overflow: visible;
  }

  body.home-view .home-title-row > div:first-child {
    flex: 0 1 calc(50% - 150px);
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 18px;
    min-width: 0;
    max-width: 500px;
  }

  body.home-view .home-title-row > div:first-child::before {
    content: "";
    grid-row: 1 / span 2;
    width: 5px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #2ee6df;
    box-shadow: 0 0 18px rgba(46, 230, 223, 0.34);
  }

  body.home-view .home-title-row .eyebrow {
    grid-column: 2;
    font-size: 0;
    line-height: 1;
  }

  body.home-view .home-title-row .eyebrow::after {
    content: "工作窗口";
    color: #77dfe1;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0;
  }

  body.home-view .home-title-row h2 {
    grid-column: 2;
    font-size: clamp(22px, 1.55vw, 25px);
  }

  body.home-view .home-title-row h2::after,
  body.home-view .home-title-row p {
    display: none;
  }

  body.home-view .home-account-panel {
    flex: 0 1 calc(50% - 150px);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.home-view .home-account-summary {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: clamp(206px, 16vw, 238px);
    min-width: 0;
    min-height: 48px;
    padding: 7px 12px;
    border-color: rgba(121, 174, 202, 0.86);
    border-radius: 10px;
    background: rgba(16, 42, 61, 0.9);
    transform: translate(-50%, -50%);
  }

  body.home-view .home-account-avatar {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  body.home-view .home-account-text strong {
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
  }

  body.home-view .home-account-text small {
    display: none;
  }

  body.home-view .home-account-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(7px, 0.7vw, 10px);
    max-width: 100%;
    min-width: 0;
  }

  body.home-view .home-account-actions > form {
    order: 90;
    flex: 0 0 auto;
    margin: 0;
  }

  body.home-view .home-account-action,
  body.home-view .home-account-action-wide {
    min-height: 44px;
    padding: 0 clamp(10px, 0.8vw, 13px);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }

  body.home-view .home-account-action-icon {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1380px) {
  body.home-view .home-title-row {
    min-height: 76px;
    padding: 12px 14px;
  }

  body.home-view .home-title-row > div:first-child,
  body.home-view .home-account-panel {
    flex-basis: calc(50% - 124px);
  }

  body.home-view .home-title-row > div:first-child {
    grid-template-columns: 6px minmax(0, 1fr);
    column-gap: 14px;
  }

  body.home-view .home-title-row > div:first-child::before {
    width: 5px;
    height: 42px;
  }

  body.home-view .home-title-row h2 {
    font-size: 21px;
  }

  body.home-view .home-account-summary {
    width: 196px;
    min-height: 44px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 6px 10px;
  }

  body.home-view .home-account-avatar {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  body.home-view .home-account-text strong {
    font-size: 13px;
  }

  body.home-view .home-account-actions {
    gap: 6px;
  }

  body.home-view .home-account-action,
  body.home-view .home-account-action-wide {
    min-height: 40px;
    padding: 0 7px;
    font-size: 11px;
  }
}

/* Desktop web nav v7: match the real left webpage sidebar to the card/icon entry design. */
@media (min-width: 1024px) {
  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .app-shell {
    display: grid !important;
    grid-template-columns: 340px minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh !important;
    padding: 0 !important;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    grid-column: 1 !important;
    grid-row: 1 / span 80 !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    width: 340px !important;
    min-width: 340px !important;
    max-width: 340px !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 18px 16px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #0d1821 !important;
    box-shadow: 12px 0 32px rgba(15, 25, 34, 0.18) !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .topbar-main,
  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .brand-block {
    opacity: 1 !important;
    visibility: visible !important;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 9px;
    width: 100% !important;
    min-height: 0 !important;
    margin-top: 22px;
    padding: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav a {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 13px;
    align-items: center;
    gap: 10px;
    min-height: 49px;
    padding: 6px 11px 6px 10px;
    overflow: hidden;
    border: 1px solid rgba(72, 125, 166, 0.42);
    border-radius: 8px;
    background: linear-gradient(98deg, rgba(17, 48, 73, 0.82), rgba(7, 29, 52, 0.78));
    color: rgba(236, 246, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(0, 7, 18, 0.18);
    line-height: 1.15;
    text-decoration: none;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav a::after {
    content: "\203A";
    justify-self: end;
    color: rgba(169, 201, 227, 0.76);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav a:is(:hover, .is-active) {
    border-color: rgba(52, 236, 221, 0.82);
    background: linear-gradient(98deg, rgba(0, 168, 153, 0.94), rgba(0, 117, 132, 0.78));
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 14px 28px rgba(0, 178, 164, 0.19);
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .quick-nav a.nav-action-link:not(.is-active) {
    border-color: rgba(49, 230, 218, 0.3);
    background: linear-gradient(98deg, rgba(13, 60, 70, 0.88), rgba(5, 34, 54, 0.8));
    color: #d9fffb;
  }

  .quick-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(12, 65, 88, 0.78);
    color: #35ece3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 5, 16, 0.18);
  }

  .quick-nav-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.1;
  }

  .quick-nav-icon-home {
    color: #effffb;
    background: rgba(30, 188, 170, 0.78);
  }

  .quick-nav-icon-library,
  .quick-nav-icon-shipping {
    color: #73f7e9;
  }

  .quick-nav-icon-link,
  .quick-nav-icon-stock {
    color: #72ccff;
  }

  .quick-nav-icon-upload,
  .quick-nav-icon-location {
    color: #66e7df;
  }

  .quick-nav-icon-picking {
    color: #9695ff;
  }

  .quick-nav-icon-purchase,
  .quick-nav-icon-workflow {
    color: #38e5d9;
  }

  .quick-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .brand-block > div {
    min-width: 0;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .brand-block p {
    white-space: nowrap !important;
    overflow: visible !important;
    max-width: none !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    display: block !important;
    width: 116% !important;
    transform: scaleX(0.86) !important;
    transform-origin: left center !important;
  }
}

/* Desktop collapsible sidebar v8: re-enable the left tucked shell after v7 fixed-width overrides. */
@media (min-width: 1024px) {
  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) {
    overflow-x: hidden;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .app-shell {
    grid-template-columns: 28px minmax(0, 1fr) !important;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar {
    z-index: 60 !important;
    transform: translateX(calc(-100% + 28px)) !important;
    transition: transform 180ms ease, box-shadow 180ms ease !important;
    will-change: transform;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 28px;
    height: 100%;
    border-left: 1px solid rgba(45, 212, 191, 0.28);
    background: linear-gradient(180deg, #0f766e, #0d1821 38%, #0d1821);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.06);
    pointer-events: none;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar:is(:hover, :focus-within) {
    transform: translateX(0) !important;
    box-shadow: 18px 0 38px rgba(15, 25, 34, 0.24) !important;
  }

  body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar:is(:hover, :focus-within)::after {
    opacity: 0.16;
  }

  @media (prefers-reduced-motion: reduce) {
    body:is(.library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar {
      transition: none !important;
    }
  }
}

/* Mobile brand subtitle v2: keep the whole promise line on one row. */
@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .brand-block > div {
    min-width: 0;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar .brand-block p {
    white-space: nowrap !important;
    overflow: visible !important;
    max-width: none !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
  }
}

/* Role workbench v1: practical home cards for manager, buyer, and packer. */
.role-workbench {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #f8fbfc;
}

.role-workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.role-workbench-head h3,
.role-workbench-head p {
  margin: 0;
}

.role-workbench-head h3 {
  margin-top: 6px;
  color: #17212b;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.18;
}

.role-workbench-head p {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

#role-workbench-updated {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #dbe5ec;
  border-radius: 999px;
  background: #ffffff;
  color: #4b6276;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.role-workbench-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.role-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #d8e3ea;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.role-panel-buyer {
  border-left-color: #2563eb;
}

.role-panel-packer {
  border-left-color: #d97706;
}

.role-panel header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.role-panel-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #e7f7f3;
  color: #0f766e;
  font-size: 17px;
  font-weight: 950;
}

.role-panel-buyer .role-panel-icon {
  background: #eaf2ff;
  color: #1d4ed8;
}

.role-panel-packer .role-panel-icon {
  background: #fff4df;
  color: #b45309;
}

.role-panel strong,
.role-panel small {
  display: block;
  min-width: 0;
}

.role-panel header strong {
  color: #17212b;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.2;
}

.role-panel header small {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.role-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
}

.role-metric-row span {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 10px;
  border-right: 1px solid #e1e8ee;
  background: #fbfdff;
}

.role-metric-row span:last-child {
  border-right: 0;
}

.role-metric-row b {
  color: #0f172a;
  font-size: 23px;
  font-weight: 950;
  line-height: 1;
}

.role-metric-row b.is-hot {
  color: #0f766e;
}

.role-panel-buyer .role-metric-row b.is-hot {
  color: #2563eb;
}

.role-panel-packer .role-metric-row b.is-hot {
  color: #b45309;
}

.role-metric-row em {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-panel footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-panel footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #0f766e;
  border-radius: 7px;
  background: #0f766e;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.role-panel footer a + a {
  border-color: #d8e3ea;
  background: #ffffff;
  color: #345063;
}

@media (min-width: 1024px) {
  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .app-shell {
    grid-template-columns: 292px minmax(0, 1fr) !important;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar {
    width: 292px !important;
    min-width: 292px !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar::after {
    display: none !important;
  }

  body:is(.home-view, .workflow-view, .library-view, .wuliu-library-view, .wuliu-sandbox-view, .wuliu-template-view, .import-view, .order-view, .picking-view, .purchase-view, .purchase-confirm-view, .packing-view, .osaka-view) .main-topbar:is(:hover, :focus-within) {
    transform: none !important;
    box-shadow: 12px 0 32px rgba(15, 25, 34, 0.18) !important;
  }
}

@media (max-width: 980px) {
  .role-workbench-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  .role-workbench {
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px;
  }

  .role-workbench-head {
    display: grid;
    gap: 10px;
  }

  .role-workbench-head h3 {
    font-size: 20px;
  }

  #role-workbench-updated {
    justify-self: start;
  }

  .role-panel {
    gap: 12px;
    padding: 12px;
    box-shadow: none;
  }

  .role-metric-row b {
    font-size: 21px;
  }

  .role-panel footer a {
    flex: 1 1 120px;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    max-width: 100% !important;
    padding: 8px !important;
    scroll-snap-type: none !important;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    scroll-snap-align: none !important;
  }

  body.purchase-view .purchase-location-nav-list {
    grid-template-columns: 1fr !important;
  }

  body.purchase-view .purchase-location-button {
    width: 100%;
    min-height: 74px;
    text-align: left;
  }

  body.purchase-view .purchase-location-button .purchase-location-title,
  body.purchase-view .purchase-location-button strong,
  body.purchase-view .purchase-location-button em,
  body.purchase-view .purchase-list-title {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-tabs > button[data-wuliu-sandbox-tab="orders"],
  body.wuliu-sandbox-view .wuliu-sandbox-tabs > button[data-wuliu-sandbox-tab="scan"],
  body.wuliu-sandbox-view .wuliu-sandbox-tabs > button[data-wuliu-sandbox-tab="printer"],
  body.wuliu-sandbox-view .wuliu-sandbox-tabs > button[data-wuliu-sandbox-tab="batches"] {
    display: block;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-main,
  body.wuliu-sandbox-view .wuliu-sandbox-pane,
  body.wuliu-sandbox-view .wuliu-workbench,
  body.wuliu-sandbox-view .wuliu-workbench-queue,
  body.wuliu-sandbox-view .wuliu-workbench-detail {
    min-width: 0;
    max-width: 100%;
  }

  body.wuliu-sandbox-view .wuliu-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  body.wuliu-sandbox-view .wuliu-workbench-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  body.wuliu-sandbox-view .wuliu-workbench.is-queue-only .wuliu-workbench-row {
    grid-template-columns: 28px 72px minmax(0, 1fr);
  }

  body.wuliu-sandbox-view .wuliu-workbench-status,
  body.wuliu-sandbox-view .wuliu-workbench-photo,
  body.wuliu-sandbox-view .wuliu-workbench-created,
  body.wuliu-sandbox-view .wuliu-workbench-batch,
  body.wuliu-sandbox-view .wuliu-workbench-weight,
  body.wuliu-sandbox-view .wuliu-workbench-recipient,
  body.wuliu-sandbox-view .wuliu-workbench-actions {
    grid-column: 2 / -1;
  }

  body.wuliu-sandbox-view .wuliu-workbench-actions,
  body.wuliu-sandbox-view .wuliu-workbench-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  body.wuliu-sandbox-view .wuliu-workbench-actions a,
  body.wuliu-sandbox-view .wuliu-workbench-actions button,
  body.wuliu-sandbox-view .wuliu-workbench-detail-actions a,
  body.wuliu-sandbox-view .wuliu-workbench-detail-actions button {
    width: 100%;
    min-width: 0;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-search,
  body.wuliu-sandbox-view .wuliu-ruoyi-search.is-scan,
  body.wuliu-sandbox-view .wuliu-ruoyi-search.is-photo {
    grid-template-columns: 1fr !important;
  }

  body.wuliu-sandbox-view .wuliu-ruoyi-toolbar,
  body.wuliu-sandbox-view .wuliu-order-status-nav,
  body.wuliu-sandbox-view .wuliu-sandbox-tabs {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table-wrap {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
  }

  body.wuliu-sandbox-view .wuliu-sandbox-table {
    min-width: 680px;
  }
}

/* Manager home v2: match the shared 店长今日总览 mockup more closely on desktop. */
.manager-dashboard {
  display: grid;
  gap: 18px;
}

.manager-dashboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.manager-dashboard-title h3 {
  margin: 6px 0 0;
  color: #101828;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.12;
}

.manager-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.manager-dashboard-actions button,
.manager-dashboard-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.manager-dashboard-actions button {
  cursor: pointer;
}

.manager-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.manager-kpi-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 138px;
  padding: 22px;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

.manager-kpi-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
}

.manager-kpi-icon.is-store {
  background: linear-gradient(135deg, #14b8a6, #087f78);
}

.manager-kpi-icon.is-alert {
  background: linear-gradient(135deg, #fb923c, #ea580c);
}

.manager-kpi-icon.is-ship {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.manager-kpi-card small,
.manager-kpi-card strong,
.manager-kpi-card em {
  display: block;
}

.manager-kpi-card small {
  color: #475467;
  font-size: 16px;
  font-weight: 850;
}

.manager-kpi-card strong {
  margin-top: 6px;
  color: #1677ff;
  font-size: 42px;
  font-weight: 950;
  line-height: 1;
}

.manager-kpi-card:first-child strong {
  color: #0f766e;
}

.manager-kpi-card:nth-child(2) strong {
  color: #ef4444;
}

.manager-kpi-card em {
  margin-top: 9px;
  color: #667085;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.manager-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.manager-flow-card,
.manager-blocker-card,
.manager-recent-card {
  min-width: 0;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.07);
}

.manager-flow-card,
.manager-blocker-card {
  padding: 20px;
}

.manager-flow-card header,
.manager-blocker-card header,
.manager-recent-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manager-flow-card header strong,
.manager-blocker-card header strong,
.manager-recent-card header strong {
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

.manager-flow-card header a,
.manager-blocker-card header a,
.manager-recent-card header a {
  color: #1677ff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.manager-flow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.manager-flow-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  color: #344054;
  text-align: center;
  text-decoration: none;
}

.manager-flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 31px;
  left: calc(50% + 36px);
  width: calc(100% - 58px);
  border-top: 2px dashed #b7c3d2;
}

.manager-flow-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
}

.manager-flow-icon.is-upload { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.manager-flow-icon.is-location { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.manager-flow-icon.is-cart { background: linear-gradient(135deg, #fb923c, #f97316); }
.manager-flow-icon.is-print { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.manager-flow-icon.is-package { background: linear-gradient(135deg, #38bdf8, #0891b2); }

.manager-flow-step b,
.manager-flow-step strong,
.manager-flow-step em {
  display: block;
  min-width: 0;
}

.manager-flow-step b {
  color: #111827;
  font-size: 14px;
  font-weight: 950;
}

.manager-flow-step strong {
  color: #1677ff;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.manager-flow-step em {
  padding: 5px 12px;
  border-radius: 7px;
  background: #eef6ff;
  color: #2563eb;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.manager-blocker-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.manager-blocker-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid #e5ecf3;
  border-radius: 8px;
  color: #344054;
  text-decoration: none;
}

.manager-blocker-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 950;
}

.manager-blocker-icon.is-location { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.manager-blocker-icon.is-print { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.manager-blocker-icon.is-cart { background: linear-gradient(135deg, #fb923c, #ea580c); }

.manager-blocker-row strong,
.manager-blocker-row em {
  display: block;
}

.manager-blocker-row strong {
  color: #111827;
  font-size: 15px;
  font-weight: 950;
}

.manager-blocker-row em {
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.manager-blocker-row b {
  min-width: 56px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff0f0;
  color: #ef4444;
  font-size: 15px;
  font-weight: 950;
  text-align: center;
}

.manager-recent-card {
  overflow: hidden;
}

.manager-recent-card header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5ecf3;
}

.manager-recent-table {
  display: grid;
}

.manager-recent-head,
.manager-recent-row {
  display: grid;
  grid-template-columns: 160px 160px minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 20px;
  border-bottom: 1px solid #edf1f5;
}

.manager-recent-head {
  background: #f8fafc;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.manager-recent-row {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.manager-recent-row:last-child {
  border-bottom: 0;
}

.manager-recent-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-recent-row b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 950;
}

.manager-recent-row b.is-warning {
  background: #fff2df;
  color: #c2410c;
}

@media (min-width: 1024px) {
  body.home-view {
    background: #eef3f8 !important;
  }

  body.home-view .manager-home-panel {
    min-height: 100vh;
    padding: 26px 30px 40px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f5f7fb !important;
    box-shadow: none !important;
  }

  body.home-view .manager-home-panel::before,
  body.home-view .manager-home-panel::after {
    display: none !important;
  }

  body.home-view .home-title-row {
    margin: 0 0 22px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.home-view .home-title-row h2 {
    color: #101828 !important;
    font-size: 28px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }

  body.home-view .home-title-row p {
    display: none !important;
  }

  body.home-view .home-account-panel {
    border-color: #d8e1ea !important;
    background: #ffffff !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
  }

  body.home-view .role-workbench,
  body.home-view .home-nav-grid {
    display: none !important;
  }
}

@media (max-width: 1180px) and (min-width: 761px) {
  .manager-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  .manager-dashboard {
    display: none;
  }
}

/* Manager home v4: a calmer operations console, not a pasted mockup. */
@media (min-width: 1024px) {
  body.home-view {
    --home-v4-bg: #edf3f6;
    --home-v4-ink: #13212f;
    --home-v4-muted: #607081;
    --home-v4-line: #d9e3eb;
    --home-v4-accent: #0f766e;
    --home-v4-accent-soft: #e6f4f1;
    --home-v4-blue: #285f8f;
    --home-v4-blue-soft: #eaf2fb;
    --home-v4-amber: #b86a16;
    --home-v4-amber-soft: #fff4e8;
    --home-v4-red: #b4232c;
    --home-v4-red-soft: #fff1f2;
    background: var(--home-v4-bg) !important;
    overflow-x: hidden;
  }

  body.home-view .app-shell {
    grid-template-columns: 276px minmax(0, 1fr) !important;
    background: var(--home-v4-bg);
  }

  body.home-view .main-topbar {
    padding: 22px 16px !important;
    border-right: 1px solid rgba(148, 163, 184, 0.24) !important;
    background: linear-gradient(180deg, #111c26 0%, #0d1720 54%, #0a131c 100%) !important;
    box-shadow: none !important;
  }

  body.home-view .brand-block {
    gap: 12px;
    padding: 0 4px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  body.home-view .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }

  body.home-view .brand-block h1 {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: 0;
  }

  body.home-view .brand-block p {
    max-width: 190px;
    color: #92a2b3;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
  }

  body.home-view .quick-nav {
    gap: 4px;
    padding-top: 14px;
  }

  body.home-view .main-topbar .quick-nav a {
    min-height: 40px;
    padding: 0 9px;
    border-color: transparent !important;
    border-radius: 8px;
    background: transparent !important;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0;
    box-shadow: none !important;
  }

  body.home-view .main-topbar .quick-nav a .quick-nav-icon {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
  }

  body.home-view .main-topbar .quick-nav a svg {
    stroke-width: 1.8;
  }

  body.home-view .main-topbar .quick-nav a:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #ffffff;
  }

  body.home-view .main-topbar .quick-nav a.is-active {
    border-color: rgba(45, 212, 191, 0.28) !important;
    background: #e8f7f4 !important;
    color: #0c5049;
  }

  body.home-view .main-topbar .quick-nav a.is-active .quick-nav-icon {
    border-color: transparent;
    background: var(--home-v4-accent);
    color: #ffffff;
  }

  body.home-view .main-topbar .quick-nav a.nav-action-link:not(.is-active) {
    border-color: transparent !important;
    background: transparent !important;
    color: #d6e2ea;
  }

  body.home-view .app-shell > #home-section.manager-home-panel {
    grid-column: 2;
    width: auto !important;
    max-width: none !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 28px 32px 38px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, #f8fafc 0%, #edf3f6 100%) !important;
    box-shadow: none !important;
  }

  body.home-view .manager-home-panel::before,
  body.home-view .manager-home-panel::after {
    display: none !important;
  }

  body.home-view .home-title-row {
    display: flex !important;
    justify-content: flex-end;
    min-height: 0;
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.home-view .home-title-row > div:first-child {
    display: none !important;
  }

  body.home-view .home-account-panel {
    flex: 0 1 720px;
    align-self: flex-start;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: min(720px, 100%);
    padding: 10px 12px;
    border: 1px solid rgba(207, 219, 228, 0.9) !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) !important;
  }

  @supports (backdrop-filter: blur(12px)) {
    body.home-view .home-account-panel {
      backdrop-filter: blur(12px);
    }
  }

  body.home-view .home-account-summary {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.home-view .home-account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #142231;
    color: #ffffff;
    font-size: 13px;
  }

  body.home-view .home-account-text strong {
    color: var(--home-v4-ink);
    font-size: 13px;
    line-height: 1.25;
  }

  body.home-view .home-account-text small {
    color: var(--home-v4-muted);
    font-size: 11px;
    line-height: 1.35;
  }

  body.home-view .home-account-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  body.home-view .home-account-actions > form {
    display: contents;
  }

  body.home-view .home-account-action,
  body.home-view .home-account-action-wide {
    grid-column: auto;
    gap: 5px;
    min-height: 32px;
    padding: 0 9px;
    border-color: var(--home-v4-line);
    border-radius: 7px;
    background: #ffffff;
    color: #203444;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    box-shadow: none;
  }

  body.home-view .home-account-action:hover {
    border-color: rgba(15, 118, 110, 0.38);
    background: var(--home-v4-accent-soft);
    color: #0c5049;
  }

  body.home-view .home-account-action-icon {
    width: 15px;
    height: 15px;
    color: var(--home-v4-accent);
  }

  body.home-view .home-account-action-danger {
    border-color: #fecdd3;
    background: #fff5f6;
    color: #9f1239;
  }

  body.home-view .home-account-action-danger .home-account-action-icon {
    color: #be123c;
  }

  body.home-view .home-account-action-request {
    border-color: #cfe0f4;
    background: #f3f8fd;
    color: var(--home-v4-blue);
  }

  body.home-view .manager-dashboard {
    max-width: 1280px;
    margin: 0 auto;
    gap: 16px;
  }

  body.home-view .manager-dashboard-title {
    align-items: flex-end;
    padding: 0 2px 2px;
  }

  body.home-view .manager-dashboard-title .eyebrow {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 9px;
    border: 1px solid #cde9e4;
    border-radius: 7px;
    background: var(--home-v4-accent-soft);
    color: #0d6a62;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0;
  }

  body.home-view .manager-dashboard-title h3 {
    margin-top: 10px;
    color: var(--home-v4-ink);
    font-size: 32px;
    font-weight: 950;
    letter-spacing: 0;
  }

  body.home-view .manager-dashboard-actions {
    gap: 8px;
  }

  body.home-view .manager-dashboard-actions button,
  body.home-view .manager-dashboard-actions span {
    min-height: 34px;
    padding: 0 12px;
    border-color: var(--home-v4-line);
    border-radius: 7px;
    background: #ffffff;
    color: #385066;
    font-size: 12px;
    box-shadow: none;
  }

  body.home-view .manager-dashboard-actions button {
    border-color: #13212f;
    background: #13212f;
    color: #ffffff;
  }

  body.home-view .manager-kpi-grid {
    grid-template-columns: 1.08fr 1fr 1fr;
    gap: 12px;
  }

  body.home-view .manager-kpi-card {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 44px;
    min-height: 112px;
    gap: 12px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(211, 224, 234, 0.98);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  }

  body.home-view .manager-kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--home-v4-accent);
  }

  body.home-view .manager-kpi-card:nth-child(2)::before {
    background: var(--home-v4-amber);
  }

  body.home-view .manager-kpi-card:nth-child(3)::before {
    background: var(--home-v4-blue);
  }

  body.home-view .manager-kpi-icon {
    grid-column: 2;
    grid-row: 1;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--home-v4-accent-soft) !important;
    color: var(--home-v4-accent);
    font-size: 13px;
    font-weight: 950;
    box-shadow: none;
  }

  body.home-view .manager-kpi-icon.is-alert {
    background: var(--home-v4-amber-soft) !important;
    color: #c2410c;
  }

  body.home-view .manager-kpi-icon.is-ship {
    background: var(--home-v4-blue-soft) !important;
    color: var(--home-v4-blue);
  }

  body.home-view .manager-kpi-card small {
    color: #64748b;
    font-size: 13px;
    font-weight: 850;
  }

  body.home-view .manager-kpi-card strong {
    margin-top: 5px;
    color: var(--home-v4-ink) !important;
    font-size: 34px;
    font-weight: 950;
    letter-spacing: 0;
  }

  body.home-view .manager-kpi-card em {
    margin-top: 6px;
    color: #718196;
    font-size: 12px;
    font-weight: 750;
  }

  body.home-view .manager-dashboard-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
    gap: 12px;
    align-items: stretch;
  }

  body.home-view .manager-flow-card,
  body.home-view .manager-blocker-card,
  body.home-view .manager-recent-card {
    border: 1px solid rgba(211, 224, 234, 0.98);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  }

  body.home-view .manager-flow-card,
  body.home-view .manager-blocker-card {
    padding: 18px;
  }

  body.home-view .manager-flow-card header strong,
  body.home-view .manager-blocker-card header strong,
  body.home-view .manager-recent-card header strong {
    color: var(--home-v4-ink);
    font-size: 16px;
    font-weight: 950;
  }

  body.home-view .manager-flow-card header a,
  body.home-view .manager-blocker-card header a,
  body.home-view .manager-recent-card header a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 7px;
    background: var(--home-v4-blue-soft);
    color: var(--home-v4-blue);
    font-size: 12px;
    font-weight: 900;
  }

  body.home-view .manager-flow-steps {
    align-items: stretch;
    gap: 8px;
    margin-top: 18px;
  }

  body.home-view .manager-flow-step {
    justify-items: stretch;
    min-height: 136px;
    padding: 13px 10px 12px;
    gap: 7px;
    border: 1px solid #e3ebf2;
    border-radius: 8px;
    background: #f9fbfd;
    text-align: left;
  }

  body.home-view .manager-flow-step:not(:last-child)::after {
    display: none;
  }

  body.home-view .manager-flow-icon {
    width: 34px;
    height: 34px;
    border: 1px solid #cde9e4;
    border-radius: 8px;
    background: var(--home-v4-accent-soft) !important;
    color: var(--home-v4-accent);
    font-size: 12px;
    box-shadow: none;
  }

  body.home-view .manager-flow-icon.is-location,
  body.home-view .manager-flow-icon.is-print,
  body.home-view .manager-flow-icon.is-package {
    border-color: #d5e4f2;
    background: var(--home-v4-blue-soft) !important;
    color: var(--home-v4-blue);
  }

  body.home-view .manager-flow-icon.is-cart {
    border-color: #f7dcc3;
    background: var(--home-v4-amber-soft) !important;
    color: #c2410c;
  }

  body.home-view .manager-flow-step b {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
  }

  body.home-view .manager-flow-step strong {
    margin-top: auto;
    color: var(--home-v4-ink);
    font-size: 26px;
    font-weight: 950;
  }

  body.home-view .manager-flow-step em {
    justify-self: start;
    padding: 4px 7px;
    border-radius: 6px;
    background: #eef2f6;
    color: var(--home-v4-muted);
    font-size: 11px;
    font-weight: 850;
  }

  body.home-view .manager-blocker-card {
    gap: 10px;
  }

  body.home-view .manager-blocker-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 66px;
    gap: 10px;
    padding: 10px;
    border-color: #e3ebf2;
    background: #fbfcfe;
  }

  body.home-view .manager-blocker-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--home-v4-accent-soft) !important;
    color: var(--home-v4-accent);
    font-size: 12px;
    box-shadow: none;
  }

  body.home-view .manager-blocker-icon.is-print {
    background: var(--home-v4-blue-soft) !important;
    color: var(--home-v4-blue);
  }

  body.home-view .manager-blocker-icon.is-cart {
    background: var(--home-v4-amber-soft) !important;
    color: #c2410c;
  }

  body.home-view .manager-blocker-row strong {
    color: var(--home-v4-ink);
    font-size: 13px;
    font-weight: 950;
  }

  body.home-view .manager-blocker-row em {
    margin-top: 3px;
    color: var(--home-v4-muted);
    font-size: 11px;
    font-weight: 750;
  }

  body.home-view .manager-blocker-row b {
    min-width: 48px;
    padding: 6px 8px;
    border-radius: 7px;
    background: var(--home-v4-red-soft);
    color: var(--home-v4-red);
    font-size: 13px;
    font-weight: 950;
  }

  body.home-view .manager-recent-card {
    margin-top: 0;
    overflow: hidden;
  }

  body.home-view .manager-recent-card header {
    padding: 13px 16px;
    border-bottom-color: #e3ebf2;
    background: #ffffff;
  }

  body.home-view .manager-recent-head,
  body.home-view .manager-recent-row {
    grid-template-columns: 130px 140px minmax(0, 1fr) 100px;
    gap: 10px;
    padding: 9px 16px;
    font-size: 12px;
  }

  body.home-view .manager-recent-head {
    background: #f6f9fb;
    color: #64748b;
    font-weight: 900;
  }

  body.home-view .manager-recent-row {
    color: #334155;
    font-weight: 750;
  }

  body.home-view .manager-recent-row b {
    min-height: 22px;
    border-radius: 7px;
    font-size: 11px;
  }

  body.home-view .role-workbench,
  body.home-view .home-nav-grid {
    display: none !important;
  }

  @media (max-width: 1280px) {
    body.home-view .manager-dashboard-grid {
      grid-template-columns: 1fr;
    }

    body.home-view .manager-flow-step {
      min-height: 126px;
    }
  }
}

/* Manager home v4.1: tighten the account rail and remove stretched empty panels. */
@media (min-width: 1024px) {
  body.home-view .home-account-panel {
    flex: 0 1 auto;
    grid-template-columns: auto auto;
    width: auto;
    max-width: calc(100vw - 340px);
    padding: 8px;
  }

  body.home-view .home-account-summary {
    display: inline-flex;
    align-items: center;
    width: auto;
  }

  body.home-view .home-account-avatar {
    display: none;
  }

  body.home-view .home-account-text {
    display: inline-flex;
    min-width: 0;
  }

  body.home-view .home-account-text strong {
    display: inline-flex;
    align-items: center;
    max-width: 170px;
    min-height: 32px;
    padding: 0 10px;
    overflow: hidden;
    border: 1px solid var(--home-v4-line);
    border-radius: 7px;
    background: #f8fafc;
    color: #203444;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.home-view .home-account-text small {
    display: none;
  }

  body.home-view .manager-dashboard-grid {
    align-items: start;
  }

  body.home-view .manager-flow-card,
  body.home-view .manager-blocker-card {
    align-self: start;
  }

  @media (max-width: 1160px) {
    body.home-view .home-account-panel {
      grid-template-columns: 1fr;
      width: min(720px, 100%);
    }

    body.home-view .home-account-summary,
    body.home-view .home-account-actions {
      justify-content: flex-end;
    }
  }
}

/* Manager home v4.2: keep the top utility rail as actions only. */
@media (min-width: 1024px) {
  body.home-view .home-account-panel {
    grid-template-columns: 1fr;
    width: auto;
    max-width: calc(100vw - 340px);
  }

  body.home-view .home-account-summary {
    display: none !important;
  }

  body.home-view .home-account-actions {
    justify-content: flex-end;
  }
}

/* Mobile purchase procurement pilot 20260707.
   Scope: purchase view only. This is a presentation-only layer; no API, data, or status logic changes. */
@media (max-width: 760px) {
  body.purchase-view {
    --purchase-mobile-ink: #132232;
    --purchase-mobile-muted: #617589;
    --purchase-mobile-line: #d7e4ec;
    --purchase-mobile-soft: #f5f9fb;
    --purchase-mobile-accent: #087f73;
    --purchase-mobile-warn: #a56307;
    --purchase-mobile-red: #b42338;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
    background: #eaf2f6;
  }

  body.purchase-view .app-shell {
    padding-top: 8px;
  }

  body.purchase-view .mobile-bottom-nav {
    display: flex !important;
  }

  body.purchase-view #purchase-section {
    gap: 8px;
    padding-bottom: 80px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.purchase-view #purchase-section > .section-head {
    position: sticky;
    top: max(8px, env(safe-area-inset-top));
    z-index: 70;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 62px;
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid var(--purchase-mobile-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 39, 61, 0.1);
    backdrop-filter: blur(10px);
  }

  body.purchase-view #purchase-section > .section-head h2 {
    align-self: center;
    margin: 0;
    color: var(--purchase-mobile-ink);
    font-size: 22px;
    line-height: 1.1;
  }

  body.purchase-view #purchase-section > .section-head h2::after {
    content: "手机只保留现场要做的事";
    display: block;
    margin-top: 4px;
    color: var(--purchase-mobile-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
  }

  body.purchase-view #purchase-section .purchase-window-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: end;
    gap: 5px;
    min-width: 118px;
  }

  body.purchase-view #purchase-section .purchase-window-actions .section-status-label {
    max-width: 150px;
    min-height: 24px;
    padding: 4px 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef6f4;
    color: var(--purchase-mobile-accent);
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.purchase-view #purchase-section .purchase-day-close-button {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 10px;
    background: var(--purchase-mobile-accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
  }

  body.purchase-view #purchase-section .download-button,
  body.purchase-view #purchase-section .purchase-day-close-download-link {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 11px;
  }

  body.purchase-view .mobile-purchase-page-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0 0 8px;
    padding: 5px;
    border: 1px solid var(--purchase-mobile-line);
    border-radius: 13px;
    background: #ffffff;
  }

  body.purchase-view .mobile-purchase-page-tab {
    min-height: 38px;
    border-radius: 9px;
    color: var(--purchase-mobile-muted);
    font-size: 13px;
    font-weight: 900;
  }

  body.purchase-view .mobile-purchase-page-tab.is-active {
    background: var(--purchase-mobile-accent);
    color: #ffffff;
  }

  body.purchase-view .purchase-location-nav {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.purchase-view .purchase-location-nav-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    margin: 0 0 8px;
    padding: 0 2px;
  }

  body.purchase-view .purchase-location-nav-head strong {
    color: var(--purchase-mobile-ink);
    font-size: 17px;
    line-height: 1.2;
  }

  body.purchase-view .purchase-location-nav-head span {
    grid-column: 1;
    color: var(--purchase-mobile-muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
  }

  body.purchase-view .purchase-location-back {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
  }

  body.purchase-view .purchase-location-nav-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    max-height: none;
    padding: 0;
    overflow: visible;
  }

  body.purchase-view .purchase-location-button {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 3px 10px;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid var(--purchase-mobile-line);
    border-radius: 14px;
    background: #ffffff;
    text-align: left;
    box-shadow: 0 7px 18px rgba(15, 39, 61, 0.05);
  }

  body.purchase-view .purchase-location-button::before {
    content: "采";
    display: grid;
    place-items: center;
    grid-row: 1 / span 2;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #edf5f7;
    color: var(--purchase-mobile-accent);
    font-size: 13px;
    font-weight: 950;
  }

  body.purchase-view .purchase-location-button[data-purchase-location="__missing"] {
    border-color: #ffc1ca;
    background: #fff4f6;
  }

  body.purchase-view .purchase-location-button[data-purchase-location="__missing"]::before {
    content: "?";
    background: #ffe3e8;
    color: var(--purchase-mobile-red);
  }

  body.purchase-view .purchase-location-button[data-purchase-location="__all"]::before {
    content: "全";
  }

  body.purchase-view .purchase-location-button[data-purchase-location="__manual_done"]::before {
    content: "图";
  }

  body.purchase-view .purchase-location-button-done::before {
    content: "完";
  }

  body.purchase-view .purchase-location-button .purchase-location-title {
    grid-column: 2;
    overflow: hidden;
    color: var(--purchase-mobile-ink);
    font-size: 16px;
    font-weight: 950;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.purchase-view .purchase-location-button strong {
    grid-row: 1;
    grid-column: 3;
    align-self: end;
    color: var(--purchase-mobile-ink);
    font-size: 23px;
    font-weight: 950;
    line-height: 1;
  }

  body.purchase-view .purchase-location-button small {
    grid-row: 2;
    grid-column: 3;
    color: var(--purchase-mobile-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-align: right;
  }

  body.purchase-view .purchase-location-button em {
    grid-column: 2;
    color: var(--purchase-mobile-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.purchase-view .purchase-location-button.is-active {
    border-color: #9ed9ca;
    background: #ecf9f5;
    box-shadow: inset 0 0 0 1px rgba(8, 127, 115, 0.15), 0 8px 20px rgba(8, 127, 115, 0.1);
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, 1fr);
    gap: 7px;
    margin: 8px 0;
    padding: 0 0 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact::-webkit-scrollbar {
    display: none;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action {
    min-height: 74px;
    padding: 10px;
    border: 1px solid var(--purchase-mobile-line);
    border-radius: 13px;
    background: #ffffff;
    box-shadow: none;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric strong,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action strong {
    color: var(--purchase-mobile-ink);
    font-size: 22px;
    font-weight: 950;
    line-height: 1;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric span,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action span {
    color: var(--purchase-mobile-muted);
    font-size: 11px;
    font-weight: 850;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric small,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action small {
    color: var(--purchase-mobile-muted);
    font-size: 10px;
    line-height: 1.2;
  }

  body.purchase-view .purchase-shop-filter.is-active {
    position: sticky;
    top: 82px;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 60;
    margin: 8px 0;
    padding: 8px;
    border: 1px solid var(--purchase-mobile-line);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 18px rgba(15, 39, 61, 0.08);
  }

  body.purchase-view .purchase-shop-filter-head {
    gap: 4px;
    margin-bottom: 7px;
  }

  body.purchase-view .purchase-shop-filter-head strong {
    color: var(--purchase-mobile-ink);
    font-size: 13px;
  }

  body.purchase-view .purchase-shop-filter-head span {
    font-size: 11px;
    line-height: 1.2;
  }

  body.purchase-view .purchase-shop-filter-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.purchase-view .purchase-shop-filter-button {
    min-height: 46px;
    padding: 7px 8px;
    border-radius: 11px;
    background: #f8fbfd;
  }

  body.purchase-view .purchase-shop-filter-button span {
    font-size: 11px;
    line-height: 1.15;
  }

  body.purchase-view .purchase-shop-filter-button strong {
    font-size: 17px;
  }

  body.purchase-view .purchase-location-page .order-result-grid {
    gap: 8px;
    padding: 0;
  }

  body.purchase-view .purchase-location-page .order-list-panel {
    border: 0;
    background: transparent;
  }

  body.purchase-view .purchase-location-page .purchase-list-title-row {
    margin: 0 0 7px;
    padding: 0 2px;
  }

  body.purchase-view .purchase-location-page .purchase-list-title {
    color: var(--purchase-mobile-ink);
    font-size: 16px;
    line-height: 1.2;
  }

  body.purchase-view .purchase-location-page .purchase-location-complete-button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--purchase-mobile-accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] {
    --purchase-mobile-card-bg: #ffffff;
    --purchase-mobile-swipe-x: 0px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    grid-template-columns: 70px minmax(0, 1fr) 42px;
    gap: 8px;
    min-height: 112px;
    padding: 10px;
    border: 1px solid var(--purchase-mobile-line);
    border-radius: 15px;
    background: var(--purchase-mobile-card-bg);
    box-shadow: 0 8px 18px rgba(15, 39, 61, 0.06);
  }

  body.purchase-view .order-item[data-order-mode="purchase"]::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    border-radius: inherit;
    background: var(--purchase-mobile-card-bg);
    transform: translate3d(var(--purchase-mobile-swipe-x), 0, 0);
    transition: transform 220ms cubic-bezier(0.22, 0.75, 0.22, 1);
    pointer-events: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] > .product-thumb,
  body.purchase-view .order-item[data-order-mode="purchase"] > .product-counts,
  body.purchase-view .order-item[data-order-mode="purchase"] > .order-main > :not(.purchase-status-panel) {
    position: relative;
    z-index: 3;
    transform: translate3d(var(--purchase-mobile-swipe-x), 0, 0);
    transition: transform 220ms cubic-bezier(0.22, 0.75, 0.22, 1);
    will-change: auto;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-swiping::before,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-actions-open::before,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-swiping > .product-thumb,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-actions-open > .product-thumb,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-swiping > .product-counts,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-actions-open > .product-counts,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-swiping > .order-main > :not(.purchase-status-panel),
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-actions-open > .order-main > :not(.purchase-status-panel) {
    will-change: transform;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-swiping::before,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-swiping > .product-thumb,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-swiping > .product-counts,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-swiping > .order-main > :not(.purchase-status-panel) {
    transition: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-purchase-rollover {
    --purchase-mobile-card-bg: #fffaf0;
    border-color: #efcf87;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-purchase-complete,
  body.purchase-view .order-item[data-order-mode="purchase"].is-purchase-complete-pending {
    --purchase-mobile-card-bg: #f0faf7;
    border-color: #b9ded6;
    opacity: 1;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-thumb {
    grid-row: 1;
    grid-column: 1;
    width: 70px;
    height: 70px;
    border-radius: 13px;
    background: #edf3f7;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-thumb .product-thumb-button,
  body.purchase-view .order-item[data-order-mode="purchase"] .product-thumb img,
  body.purchase-view .order-item[data-order-mode="purchase"] .product-image-empty {
    border-radius: 13px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .order-main {
    grid-row: 1;
    grid-column: 2 / span 2;
    padding-right: 48px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-counts {
    grid-row: 1;
    grid-column: 3;
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 12px;
    background: #f1f6f8;
    box-shadow: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-counts strong {
    color: var(--purchase-mobile-ink);
    font-size: 22px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-counts.is-multiple-purchase-quantity strong {
    color: #dc2626;
  }

  body.purchase-view .purchase-mobile-status-note {
    color: #9a3412;
    font-weight: 800;
    white-space: normal;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .product-counts span {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-flavor-line {
    margin-bottom: 3px;
    color: var(--purchase-mobile-ink);
    font-size: 15px;
    font-weight: 950;
    line-height: 1.18;
    -webkit-line-clamp: 2;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .order-title {
    color: #465b70;
    font-size: 11px;
    line-height: 1.25;
    -webkit-line-clamp: 1;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-mobile-secondary,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-shop-source-line,
  body.purchase-view .order-item[data-order-mode="purchase"] .order-context,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-link,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-rollover-hint {
    margin-top: 3px;
    color: var(--purchase-mobile-muted);
    font-size: 10.5px;
    line-height: 1.25;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-shop-source-line::before {
    content: "店铺 ";
    color: var(--purchase-mobile-accent);
    font-weight: 900;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-panel {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 64px);
    gap: 0;
    width: 256px;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #64748b;
    overflow: visible;
    pointer-events: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-actions-open .purchase-status-panel,
  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open .purchase-status-panel {
    pointer-events: auto;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-header,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-buttons {
    display: contents;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-header .purchase-override-label {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-header .purchase-override-status {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-note-button {
    align-self: stretch;
    justify-self: stretch;
    width: 64px;
    min-width: 64px;
    min-height: 100%;
    height: 100%;
    padding: 8px 5px;
    border: 0;
    border-radius: 0;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.18;
    white-space: normal;
    touch-action: manipulation;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="已采购"] {
    display: inline-flex !important;
    order: 2;
    background: #159b79;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-note-button {
    order: 1;
    background: #e89a2f;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="缺货"] {
    order: 3;
    background: #e34b5f;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="无需采购"] {
    order: 4;
    background: #64748b;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="未采购"] {
    display: none !important;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-details.is-open {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open {
    min-height: 148px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open .purchase-status-panel {
    z-index: 5;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    padding: 10px;
    border-radius: inherit;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #dce7ee;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open .purchase-status-buttons {
    display: none;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open .purchase-status-header {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: block;
    margin: 0;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open .purchase-note-button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    background: #edf2f5;
    color: transparent;
    font-size: 0;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open .purchase-note-button::after {
    content: "×";
    color: #526273;
    font-size: 22px;
    font-weight: 700;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open .purchase-status-details.is-open {
    grid-column: 1;
    display: grid;
    grid-template-columns: minmax(0, 86px) minmax(0, 1fr) auto;
    align-self: center;
    gap: 7px;
    width: 100%;
    margin: 0;
    padding: 38px 0 0;
    background: transparent;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open .purchase-status-save {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-field input,
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-override-control select {
    min-height: 34px;
    font-size: 16px;
  }

  body.purchase-view .order-item[data-order-mode="purchase_done"] .purchase-readonly-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
  }

  body.purchase-view .order-item[data-order-mode="purchase_done"] .purchase-readonly-status > :not(.mobile-purchase-undo-button) {
    grid-column: 1;
  }

  body.purchase-view .mobile-purchase-undo-button {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: stretch;
    min-width: 72px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #efb4bd;
    border-radius: 12px;
    background: #fff2f4;
    color: var(--purchase-mobile-red);
    font-size: 14px;
    font-weight: 950;
    touch-action: manipulation;
  }

  body.purchase-view .mobile-purchase-undo-button:disabled {
    opacity: 0.58;
  }

  body.purchase-view .purchase-location-page .purchase-bottom-tools,
  body.purchase-view .purchase-location-page .daily-purchase-bar {
    border-radius: 14px;
  }
}

/* Logistics workspace v1: hide the global sidebar only inside 打包发货. */
@media (min-width: 1024px) {
  body.wuliu-sandbox-view .app-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 0 24px !important;
  }

  body.wuliu-sandbox-view .main-topbar {
    display: none !important;
  }

  body.wuliu-sandbox-view .app-shell > #wuliu-sandbox-section {
    grid-column: 1 !important;
    width: auto !important;
    max-width: none !important;
    min-height: 100vh;
    margin: 0 !important;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
}

@media (min-width: 1024px) {
  body.blocked-shipping-view {
    --web-console-canvas: #e9f0f4;
    --web-console-sidebar: #0d1821;
    --web-console-line: #d4e0e7;
    --web-console-primary: #0f766e;
    --web-console-primary-dark: #115e59;
    --web-console-primary-soft: #e5f6f3;
    padding-bottom: 0;
    background: var(--web-console-canvas);
  }

  body.blocked-shipping-view .app-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    padding: 0;
  }

  body.blocked-shipping-view .main-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-column: 1;
    grid-row: 1 / span 80;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    width: 292px;
    min-height: 100vh;
    margin: 0;
    padding: 18px 16px;
    border: 0;
    border-radius: 0;
    background: var(--web-console-sidebar);
    box-shadow: 12px 0 32px rgba(15, 25, 34, 0.18);
  }

  body.blocked-shipping-view .main-topbar .topbar-main {
    display: grid;
    gap: 18px;
    min-width: 0;
  }

  body.blocked-shipping-view .main-topbar .brand-block {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  body.blocked-shipping-view .main-topbar h1 {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.15;
  }

  body.blocked-shipping-view .brand-block p {
    color: #91a2b1;
  }

  body.blocked-shipping-view .main-topbar :is(.server-pill, .user-pill, .plain-link, .top-actions button) {
    justify-content: flex-start;
    width: 100%;
    min-height: 34px;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    color: #d7e1e8;
    box-shadow: none;
  }

  body.blocked-shipping-view .quick-nav {
    display: grid;
    gap: 6px;
  }

  body.blocked-shipping-view .quick-nav a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 7px;
    color: #d7e1e8;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
  }

  body.blocked-shipping-view .quick-nav a:is(:hover, .is-active) {
    background: var(--web-console-primary-soft);
    color: var(--web-console-primary-dark);
  }

  body.blocked-shipping-view .app-shell > section {
    grid-column: 2;
    width: min(1120px, calc(100% - 48px));
    margin: 24px auto;
  }
}
/* Shared purchase-location move picker. The source purchase groups remain unchanged. */
.mobile-purchase-move-modal {
  display: none;
}

body.purchase-view .order-item[data-order-mode="purchase"] .mobile-purchase-move-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  border-color: #b9cfdd;
  background: #edf5f9;
  color: #245a78;
}

body.purchase-view .order-item[data-order-mode="purchase"] .mobile-purchase-move-button::before {
  content: "↗";
  font-size: 13px;
  font-weight: 900;
}

body.purchase-view .order-item[data-order-mode="purchase"] .mobile-purchase-move-button:hover {
  border-color: #6fa1bf;
  background: #deedf5;
  color: #174762;
}

.mobile-purchase-move-modal:not(.is-hidden) {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(15 23 42 / 42%);
  backdrop-filter: blur(2px);
}

.mobile-purchase-move-sheet {
  width: min(640px, 100%);
  max-height: min(76vh, 680px);
  padding: 20px;
  border: 1px solid #d9e4ea;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgb(15 23 42 / 24%);
  overflow: auto;
}

.mobile-purchase-move-sheet header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.mobile-purchase-move-sheet header div {
  display: grid;
  gap: 4px;
}

.mobile-purchase-move-sheet header strong {
  color: #17324d;
  font-size: 19px;
  line-height: 1.2;
}

.mobile-purchase-move-sheet header span,
.mobile-purchase-move-sheet > p {
  margin: 0;
  color: #6b7f91;
  font-size: 12px;
}

.mobile-purchase-move-sheet [data-mobile-purchase-move-close] {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef3f6;
  color: #526273;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.mobile-purchase-move-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.mobile-purchase-move-grid button {
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #d7e3ea;
  border-radius: 9px;
  background: #f7fafb;
  color: #23435d;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.mobile-purchase-move-grid button:hover {
  border-color: #78a8c4;
  background: #eaf4fb;
}

.mobile-purchase-move-grid button:active {
  border-color: #3578a8;
  background: #deedf6;
}

.mobile-purchase-move-grid button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.mobile-purchase-move-sheet > p {
  min-height: 18px;
  margin-top: 12px;
  text-align: center;
}

@media (max-width: 760px) {
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="缺货"] {
    display: none !important;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .mobile-purchase-move-button {
    order: 3;
    min-width: 0;
    background: #3578a8;
    color: #ffffff;
  }

  .mobile-purchase-move-modal:not(.is-hidden) {
    position: fixed;
    z-index: 10020;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px 10px max(12px, env(safe-area-inset-bottom));
    background: rgb(15 23 42 / 48%);
    backdrop-filter: blur(2px);
  }

  .mobile-purchase-move-sheet {
    width: min(100%, 520px);
    max-height: min(76vh, 660px);
    padding: 14px;
    border-radius: 18px 18px 14px 14px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgb(15 23 42 / 28%);
    overflow: auto;
  }

  .mobile-purchase-move-sheet header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mobile-purchase-move-sheet header div {
    display: grid;
    gap: 3px;
  }

  .mobile-purchase-move-sheet header strong {
    color: #17324d;
    font-size: 18px;
    line-height: 1.2;
  }

  .mobile-purchase-move-sheet header span,
  .mobile-purchase-move-sheet > p {
    margin: 0;
    color: #6b7f91;
    font-size: 12px;
  }

  .mobile-purchase-move-sheet [data-mobile-purchase-move-close] {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef3f6;
    color: #526273;
    font-size: 23px;
    line-height: 1;
  }

  .mobile-purchase-move-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-purchase-move-grid button {
    min-height: 46px;
    padding: 8px 9px;
    border: 1px solid #d7e3ea;
    border-radius: 11px;
    background: #f7fafb;
    color: #23435d;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
    text-align: left;
  }

  .mobile-purchase-move-grid button:active {
    border-color: #3578a8;
    background: #eaf4fb;
  }

  .mobile-purchase-move-grid button:disabled {
    opacity: 0.55;
  }

  .mobile-purchase-move-sheet > p {
    min-height: 18px;
    margin-top: 10px;
    text-align: center;
  }
}
.picking-find-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
.picking-find-tool {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--border, #d9e0e7);
  border-radius: 10px;
  background: #f7fafc;
}
.picking-barcode-tool { border-color: #cfe0d7; background: #f6fbf8; }
.picking-find-tool-heading { display: grid; gap: 3px; }
.picking-find-tool small, .picking-find-status { color: var(--muted, #64748b); }
.picking-barcode-form { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; gap: 8px; }
.picking-barcode-form input { min-width: 0; min-height: 42px; }
.picking-barcode-form button { min-height: 42px; white-space: nowrap; }
.picking-barcode-form button.is-secondary { border-color: #176345; background: #fff; color: #176345; }
.picking-barcode-scanner { position: relative; min-height: 180px; overflow: hidden; border-radius: 8px; background: #10231b; }
.picking-barcode-scanner.is-hidden { display: none; }
.picking-barcode-scanner video { display: block; width: 100%; height: 220px; object-fit: cover; }
.picking-barcode-scanner span { position: absolute; right: 8px; bottom: 8px; left: 8px; padding: 7px 9px; border-radius: 6px; background: rgba(0, 0, 0, 0.68); color: #fff; text-align: center; }
.picking-find-status { min-height: 18px; }
.picking-find-status.is-success { color: #176345; }
.picking-find-status.is-error { color: #b42318; }
.picking-photo-button { min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #173f5f; color: #fff; font-weight: 700; cursor: pointer; }
.picking-photo-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.picking-photo-results { grid-column: 1 / -1; display: grid; gap: 8px; }
.picking-photo-match { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px; border: 1px solid #dce3ea; border-radius: 8px; background: #fff; }
.picking-photo-match.is-first { border-color: #6d9f85; }
.picking-photo-match-image img { display: block; width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: #fff; }
.picking-photo-match-main { min-width: 0; display: grid; gap: 3px; }
.picking-photo-match-main strong, .picking-photo-match-main span, .picking-photo-match-main small { overflow-wrap: anywhere; }
.picking-photo-match-side { display: grid; gap: 6px; justify-items: end; }
.picking-photo-match-side b { color: #176345; }
.picking-photo-match-side button { min-height: 38px; }
@media (max-width: 680px) {
  .picking-find-tools { grid-template-columns: 1fr; }
  .picking-barcode-form { grid-template-columns: minmax(0, 1fr) auto; }
  .picking-barcode-form .is-secondary { grid-column: 1 / -1; }
  .picking-photo-results { grid-column: 1; }
  .picking-photo-match { grid-template-columns: 56px minmax(0, 1fr); }
  .picking-photo-match-image img { width: 56px; height: 56px; }
  .picking-photo-match-side { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; justify-items: start; }
}
