: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);
}

/* 2026-08-03: keep purchase SKU thumbnails square despite shell button padding. */
body.purchase-view #purchase-list .order-item .product-thumb .product-thumb-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
}

body.purchase-view #purchase-list .order-item .product-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.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;
  }
}

.workflow-shop-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #e0202d;
  border-radius: 9px;
  background: #ffffff;
  color: #334155;
  text-align: left;
  cursor: pointer;
}

.workflow-shop-group:hover,
.workflow-shop-group:focus-visible {
  border-color: #f2a7ac;
  background: #fff8f8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(224, 32, 45, 0.1);
}

.workflow-shop-group span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.workflow-shop-group strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-shop-group small {
  color: var(--muted);
  font-size: 12px;
}

.workflow-shop-group em {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff1f2;
  color: #c81e2a;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.workflow-shop-group b {
  color: #64748b;
  font-size: 13px;
}

.workflow-shop-group i {
  color: #94a3b8;
  font-size: 22px;
  font-style: normal;
}

@media (max-width: 720px) {
  .workflow-shop-group {
    grid-template-columns: minmax(0, 1fr) auto 16px;
    gap: 8px;
    min-height: 72px;
    padding: 12px;
  }

  .workflow-shop-group em {
    grid-column: 2;
  }

  .workflow-shop-group b {
    display: none;
  }
}

.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%;
  }
}

/* Product library polish v1: scoped operations-console hierarchy. */
body.library-view #library-section {
  --library-accent: #0f766e;
  --library-accent-strong: #115e59;
  --library-accent-soft: #eaf7f4;
  --library-line: #dce6ea;
  --library-muted: #657787;
  overflow: hidden;
  border-color: #d7e2e7;
  border-radius: 18px;
  background: #f7fafb;
  box-shadow: 0 18px 44px rgba(21, 38, 52, 0.09);
}

body.library-view #library-section .library-head {
  position: relative;
  min-height: 84px;
  padding: 14px 20px 14px 24px;
  border-bottom-color: var(--library-line);
  background: linear-gradient(112deg, #ffffff 0%, #f7fbfa 72%, #eef8f6 100%);
}

body.library-view #library-section .library-head::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #0f766e, #2ba895);
}

body.library-view #library-section .library-title-block {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.library-view #library-section .library-title-kicker {
  color: var(--library-accent);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.16em;
}

body.library-view #library-section .library-title-block h2 {
  color: #1b2b38;
  font-size: 21px;
  font-weight: 880;
  line-height: 1.25;
}

body.library-view #library-section .library-title-block p {
  margin: 1px 0 0;
  color: var(--library-muted);
  font-size: 12px;
  line-height: 1.45;
}

body.library-view #library-section .library-actions select,
body.library-view #library-section .library-actions button {
  min-height: 44px;
  border-color: #c7d6dc;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
}

body.library-view #library-section .library-actions select {
  min-width: 184px;
}

body.library-view #library-section .library-actions button {
  padding: 0 15px;
  color: var(--library-accent-strong);
  font-weight: 850;
  box-shadow: none;
}

body.library-view #library-section .library-actions select:focus-visible,
body.library-view #library-section .library-actions button:focus-visible {
  border-color: var(--library-accent);
  outline: 3px solid rgba(15, 118, 110, 0.14);
  outline-offset: 1px;
}

body.library-view #library-section .library-search-toolbar {
  grid-template-columns: auto minmax(280px, 640px) minmax(150px, 1fr);
  gap: 12px;
  padding: 13px 18px;
  border-top: 0;
  border-bottom-color: var(--library-line);
  background: #f7fafb;
}

body.library-view #library-section .library-search-label {
  color: #344755;
  font-size: 12px;
  letter-spacing: 0.02em;
}

body.library-view #library-section .library-search-field #library-search {
  min-height: 44px;
  border-color: #b8ccd1;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(24, 44, 56, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

body.library-view #library-section .library-search-field #library-search:focus {
  border-color: var(--library-accent);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

body.library-view #library-section .library-search-icon {
  color: #71848f;
}

body.library-view #library-section .library-search-hint {
  color: #71818d;
}

body.library-view #library-section #library-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  padding: 11px 18px 13px;
  border-bottom-color: var(--library-line);
  background: #eef3f5;
}

body.library-view #library-section #library-summary .metric {
  position: relative;
  min-height: 84px;
  padding: 13px 15px;
  overflow: hidden;
  border-color: #d8e3e7;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(28, 48, 61, 0.035);
}

body.library-view #library-section #library-summary .metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #72b8ad;
}

body.library-view #library-section #library-summary .metric label {
  color: #657683;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

body.library-view #library-section #library-summary .metric strong {
  margin-top: 6px;
  color: #1b2d39;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

body.library-view #library-section #library-summary .metric small {
  margin-top: 4px;
  color: #748590;
  font-variant-numeric: tabular-nums;
}

body.library-view #library-section .jan-coverage-panel {
  margin: 13px 18px;
  padding: 17px;
  border: 1px solid #d8e5e4;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(28, 48, 61, 0.04);
}

body.library-view #library-section .jan-coverage-head {
  align-items: center;
}

body.library-view #library-section .jan-coverage-head .eyebrow {
  min-height: 23px;
  padding: 0 9px;
  border-color: #c9e6e0;
  background: var(--library-accent-soft);
  color: var(--library-accent-strong);
  font-size: 9px;
  letter-spacing: 0.14em;
}

body.library-view #library-section .jan-coverage-head h3 {
  margin-top: 7px;
  color: #213542;
  font-size: 17px;
  font-weight: 860;
}

body.library-view #library-section .jan-coverage-head p {
  margin-top: 5px;
  color: var(--library-muted);
  font-size: 12px;
}

body.library-view #library-section .jan-coverage-updated {
  align-self: flex-start;
  padding-top: 3px;
  color: #75858f;
  font-variant-numeric: tabular-nums;
}

body.library-view #library-section .jan-coverage-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.library-view #library-section .jan-coverage-summary .metric {
  min-height: 72px;
  padding: 11px 13px;
  border-color: #e0e8eb;
  border-radius: 10px;
  background: #f8fafb;
  box-shadow: none;
}

body.library-view #library-section .jan-coverage-summary .metric strong {
  margin-top: 5px;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

body.library-view #library-section .jan-coverage-summary .metric small {
  margin-top: 3px;
}

body.library-view #library-section .jan-coverage-table-wrap {
  margin-top: 13px;
  overflow-x: auto;
  border: 1px solid #e0e8eb;
  border-radius: 10px;
}

body.library-view #library-section .jan-coverage-table th {
  padding-top: 9px;
  padding-bottom: 9px;
  background: #f3f7f8;
  color: #62737f;
  font-size: 11px;
  letter-spacing: 0.03em;
}

body.library-view #library-section .jan-coverage-table td {
  color: #314652;
  font-variant-numeric: tabular-nums;
}

body.library-view #library-section .jan-coverage-table tbody tr:hover td {
  background: #f6fbfa;
}

body.library-view #library-section .jan-rate-badge {
  min-width: 62px;
  padding: 4px 9px;
  border-color: #c8e6e0;
  background: #eef9f6;
  color: var(--library-accent-strong);
}

body.library-view #library-section .jan-coverage-footnote {
  margin-top: 8px;
  color: #7b8992;
}

body.library-view #library-section .library-list-header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 70px 70px 70px;
  gap: 14px;
  align-items: center;
  min-height: 38px;
  padding: 0 18px;
  border-top: 1px solid var(--library-line);
  border-bottom: 1px solid var(--library-line);
  background: #eef3f5;
  color: #697b87;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.library-view #library-section .library-list-header span:first-child {
  grid-column: 1 / 3;
}

body.library-view #library-section .library-list-header span:not(:first-child) {
  text-align: center;
}

body.library-view #library-section .products-list {
  max-height: 520px;
  background: #ffffff;
}

body.library-view #library-section .product-row {
  grid-template-columns: 64px minmax(0, 1fr) 70px 70px 70px;
  gap: 14px;
  min-height: 88px;
  padding: 12px 18px;
  border-bottom-color: #e2e9ec;
  background: #ffffff;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

body.library-view #library-section button.product-row:hover {
  background: #f5fbfa;
  box-shadow: inset 3px 0 0 #55a99c;
}

body.library-view #library-section button.product-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: -3px;
}

body.library-view #library-section .product-thumb {
  width: 60px;
  height: 60px;
  border-color: #d7e2e6;
  border-radius: 11px;
  background: #f4f7f8;
}

body.library-view #library-section .product-title {
  color: #1f313d;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.4;
}

body.library-view #library-section .product-meta {
  margin-top: 5px;
  color: #6c7e8a;
  font-variant-numeric: tabular-nums;
}

body.library-view #library-section .product-counts {
  align-self: stretch;
  justify-items: center;
  padding-left: 0;
  border-left: 1px solid #e2e9ec;
  text-align: center;
}

body.library-view #library-section .product-counts strong {
  color: #1d303d;
  font-size: 20px;
  font-weight: 880;
  font-variant-numeric: tabular-nums;
}

body.library-view #library-section .product-counts span {
  margin-top: 3px;
  color: #7b8b95;
  font-size: 10px;
  font-weight: 800;
}

body.library-view #library-section .list-load-more {
  min-height: 40px;
  border-color: #dce5e9;
  border-radius: 10px;
  background: #f7fafb;
}

@media (max-width: 820px) {
  body.library-view #library-section {
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(21, 38, 52, 0.07);
  }

  body.library-view #library-section .library-head {
    align-items: stretch;
    min-height: 0;
    padding: 15px 14px 14px 18px;
  }

  body.library-view #library-section .library-head::before {
    top: 14px;
    bottom: 14px;
  }

  body.library-view #library-section .library-title-block h2 {
    font-size: 20px;
  }

  body.library-view #library-section .library-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  body.library-view #library-section .library-actions select {
    width: 100%;
    min-width: 0;
  }

  body.library-view #library-section .library-search-toolbar {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 11px 12px 12px;
  }

  body.library-view #library-section .library-search-field #library-search {
    min-height: 46px;
    font-size: 16px;
  }

  body.library-view #library-section #library-summary {
    display: flex;
    gap: 8px;
    padding: 9px 10px 11px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  body.library-view #library-section #library-summary::-webkit-scrollbar {
    display: none;
  }

  body.library-view #library-section #library-summary .metric {
    flex: 0 0 138px;
    min-height: 78px;
    scroll-snap-align: start;
  }

  body.library-view #library-section .jan-coverage-panel {
    margin: 10px;
    padding: 14px;
  }

  body.library-view #library-section .jan-coverage-head {
    align-items: flex-start;
  }

  body.library-view #library-section .jan-coverage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.library-view #library-section .jan-coverage-table {
    min-width: 640px;
  }

  body.library-view #library-section .library-list-header {
    display: none;
  }

  body.library-view #library-section .products-list {
    max-height: none;
    border-top: 1px solid var(--library-line);
  }

  body.library-view #library-section .product-row {
    grid-template-columns: 58px repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
    min-height: 0;
    padding: 12px;
  }

  body.library-view #library-section .product-thumb {
    grid-column: 1;
    grid-row: 1;
    width: 56px;
    height: 56px;
  }

  body.library-view #library-section .product-main {
    grid-column: 2 / -1;
    grid-row: 1;
  }

  body.library-view #library-section .product-title,
  body.library-view #library-section .product-meta {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.library-view #library-section .product-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.library-view #library-section .product-counts {
    grid-row: 2;
    align-self: stretch;
    display: grid;
    justify-items: start;
    align-content: start;
    min-width: 0;
    padding: 8px 0 0;
    border-top: 1px solid #e4ebee;
    border-left: 0;
    text-align: left;
  }

  body.library-view #library-section .product-counts:nth-child(3) {
    grid-column: 2;
  }

  body.library-view #library-section .product-counts:nth-child(4) {
    grid-column: 3;
  }

  body.library-view #library-section .product-counts:nth-child(5) {
    grid-column: 4;
  }

  body.library-view #library-section .product-counts strong {
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  body.library-view #library-section .library-title-block p {
    max-width: 280px;
  }

  body.library-view #library-section .jan-coverage-summary .metric {
    min-height: 68px;
    padding: 10px;
  }

  body.library-view #library-section #library-summary .metric {
    flex-basis: 128px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.library-view #library-section *,
  body.library-view #library-section *::before,
  body.library-view #library-section *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Pinmail control center */
body.pinmail-view #home-section,
body.pinmail-view .app-view {
  display: none;
}

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

.quick-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 11px;
  font-weight: 900;
}

.pinmail-center-panel {
  --pinmail-purple: #6d5bd0;
  --pinmail-purple-soft: #f0edff;
  --pinmail-blue: #2764c7;
  --pinmail-amber: #ad6500;
  padding: 0;
  overflow: hidden;
  border-color: #d6e0e7;
  background: #f8fafb;
}

.pinmail-center-head {
  margin: 0;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #dbe4ea;
  background: #fff;
}

.pinmail-center-head h2 {
  margin: 3px 0 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.pinmail-center-head p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.pinmail-center-eyebrow {
  color: var(--pinmail-purple);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.pinmail-center-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--pinmail-purple);
  border-radius: 6px;
  background: var(--pinmail-purple);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
}

.pinmail-center-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pinmail-center-upload-status {
  display: none;
  margin: 14px 24px 0;
  padding: 10px 12px;
  border: 1px solid #d5dee5;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-weight: 750;
}

.pinmail-center-upload-status.is-visible { display: block; }
.pinmail-center-upload-status.is-success { border-color: #9dd8c2; background: #f0faf6; color: #176345; }
.pinmail-center-upload-status.is-error { border-color: #efb1b5; background: #fff4f4; color: #9f2930; }

.pinmail-showcase {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(250px, 0.82fr));
  gap: 12px;
  margin: 18px 24px 0;
  padding: 14px;
  border: 1px solid #d9e1f2;
  border-left: 4px solid var(--pinmail-purple);
  border-radius: 9px;
  background: linear-gradient(115deg, #f8f7ff, #fff 62%);
}

.pinmail-showcase-copy {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 3px 6px;
}

.pinmail-showcase-copy span { color: var(--pinmail-purple); font-size: 11px; font-weight: 900; letter-spacing: 0.1em; }
.pinmail-showcase-copy strong { color: var(--ink); font-size: 16px; }
.pinmail-showcase-copy small { color: var(--muted); line-height: 1.45; }

.pinmail-showcase-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e0e5ed;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.pinmail-showcase-item img {
  width: 64px;
  height: 64px;
  padding: 3px;
  border: 1px solid #e1e7eb;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
}

.pinmail-showcase-item div { display: grid; gap: 4px; min-width: 0; }
.pinmail-showcase-item strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.pinmail-showcase-item span { color: var(--muted); font-size: 11px; line-height: 1.4; }

.pinmail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 24px 0;
}

.pinmail-metric {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-height: 104px;
  padding: 14px 15px;
  border: 1px solid #d7e0e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  text-align: left;
}

.pinmail-metric:hover { border-color: #b9c7d2; background: #fff; }
.pinmail-metric.is-active { border-color: #9e94df; box-shadow: inset 0 3px 0 var(--pinmail-purple); }
.pinmail-metric > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.pinmail-metric > strong { color: var(--ink); font-size: 26px; line-height: 1; }
.pinmail-metric > small { color: #7d8b97; font-size: 11px; }

.pinmail-source-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 14px 24px 0;
  padding: 10px 13px;
  border: 1px solid #dce4e9;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.pinmail-source-strip span { display: inline-flex; align-items: center; gap: 7px; }
.pinmail-source-strip i { width: 8px; height: 8px; border-radius: 50%; background: var(--pinmail-blue); }
.pinmail-source-strip i.is-upload { background: var(--pinmail-purple); }
.pinmail-source-strip strong { color: var(--ink); font-size: 13px; }
.pinmail-source-strip em { margin-left: auto; color: #768490; font-style: normal; line-height: 1.4; }
.pinmail-source-strip .pinmail-ai-state {
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #e1c57a;
  border-radius: 999px;
  background: #fff9e9;
}
.pinmail-source-strip .pinmail-ai-state i {
  width: auto;
  height: auto;
  padding: 2px 5px;
  border-radius: 4px;
  background: #d79813;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
}
.pinmail-source-strip .pinmail-ai-state strong { color: #805a09; font-size: 11px; }
.pinmail-source-strip .pinmail-ai-state.is-active { border-color: #96d3bb; background: #effaf5; }
.pinmail-source-strip .pinmail-ai-state.is-active i { background: #16845d; }
.pinmail-source-strip .pinmail-ai-state.is-active strong { color: #176345; }
.pinmail-source-strip .pinmail-ai-state.is-paused { border-color: #cfd7dd; background: #f6f8f9; }
.pinmail-source-strip .pinmail-ai-state.is-paused i { background: #7a8892; }
.pinmail-source-strip .pinmail-ai-state.is-paused strong { color: #596670; }

.pinmail-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 150px 150px auto;
  gap: 8px;
  margin: 16px 24px 0;
}

.pinmail-toolbar input,
.pinmail-toolbar select,
.pinmail-bulk-bar input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd7df;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.pinmail-list-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 24px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.pinmail-list-head label { display: inline-flex; align-items: center; gap: 7px; }
.pinmail-view-switch { display: inline-flex; gap: 2px; margin-left: auto; padding: 3px; border-radius: 6px; background: #e8edf1; }
.pinmail-view-switch button { min-height: 28px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 11px; box-shadow: none; }
.pinmail-view-switch button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(22, 35, 48, 0.12); }

.pinmail-center-list {
  display: grid;
  gap: 7px;
  margin: 0 24px;
  padding-bottom: 6px;
}

.pinmail-center-list > .empty {
  display: grid;
  gap: 5px;
  min-height: 180px;
  place-content: center;
  border: 1px dashed #c8d4dc;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.pinmail-center-list > .empty strong { color: var(--ink); font-size: 15px; }
.pinmail-date-divider { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 7px 2px 3px; color: var(--ink); }
.pinmail-date-divider span { color: var(--muted); font-size: 12px; }

.pinmail-record {
  display: grid;
  grid-template-columns: 28px minmax(280px, 1.55fr) minmax(150px, 0.75fr) 124px 72px minmax(112px, auto);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dbe3e8;
  border-left: 3px solid #cbd5dc;
  border-radius: 8px;
  background: #fff;
}

.pinmail-record.is-ready { border-left-color: #2a8b68; }
.pinmail-record.is-review { border-left-color: #d28517; }
.pinmail-record.is-unmatched { border-left-color: #c3434b; }
.pinmail-record.is-selected { border-color: #aaa1df; border-left-color: var(--pinmail-purple); background: #fbfaff; }
.pinmail-record > input { width: 17px; height: 17px; accent-color: var(--pinmail-purple); }

.pinmail-record-product {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pinmail-record-image {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid #dce4e9;
  border-radius: 7px;
  background: #f5f7f9;
  color: #93a1ad;
  font-size: 10px;
  font-weight: 900;
}

.pinmail-record-image img { width: 100%; height: 100%; object-fit: contain; }
.pinmail-record-product > div:last-child,
.pinmail-record-source,
.pinmail-record-schedule { display: grid; gap: 4px; min-width: 0; }
.pinmail-record-product strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.pinmail-record-product span,
.pinmail-record-product small,
.pinmail-record-source small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.pinmail-record-source > span,
.pinmail-record-schedule > span,
.pinmail-method {
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf3f8;
  color: #52667a;
  font-size: 10px;
  font-weight: 850;
}

.pinmail-record-source > span.is-upload { background: var(--pinmail-purple-soft); color: #5947b9; }
.pinmail-record-source > span.is-shipping { background: #e8f1ff; color: var(--pinmail-blue); }
.pinmail-record-source strong,
.pinmail-record-schedule strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pinmail-record-schedule > span.is-ready { background: #e9f7f1; color: #176345; }
.pinmail-record-schedule > span.is-review { background: #fff4df; color: #915600; }
.pinmail-record-schedule > span.is-unmatched { background: #fff0f1; color: #a12c35; }
.pinmail-method.is-carry { background: #e8f1ff; color: #2059aa; }
.pinmail-method.is-mail { background: #f1eefe; color: #5947b9; }
.pinmail-record-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.pinmail-record-actions button { min-height: 30px; padding: 0 8px; font-size: 11px; }
.pinmail-ready-note { color: #4b806b; font-size: 11px; font-weight: 800; }

.pinmail-bulk-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(150px, 200px) auto auto auto;
  align-items: end;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 24px;
  border-top: 1px solid #ccd8df;
  background: rgba(250, 252, 253, 0.96);
  box-shadow: 0 -10px 26px rgba(30, 45, 58, 0.08);
  backdrop-filter: blur(10px);
}

.pinmail-selected { display: grid; min-width: 70px; }
.pinmail-selected strong { color: var(--pinmail-purple); font-size: 23px; line-height: 1; }
.pinmail-selected span { color: var(--muted); font-size: 11px; }
.pinmail-bulk-bar > label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; }
.pinmail-bulk-bar fieldset { display: flex; align-items: center; gap: 5px; min-height: 38px; margin: 0; padding: 3px; border: 1px solid #cbd7df; border-radius: 6px; background: #fff; }
.pinmail-bulk-bar legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pinmail-bulk-bar fieldset label { cursor: pointer; }
.pinmail-bulk-bar fieldset input { position: absolute; opacity: 0; }
.pinmail-bulk-bar fieldset span { display: inline-flex; align-items: center; min-height: 29px; padding: 0 11px; border-radius: 4px; color: var(--muted); font-size: 12px; font-weight: 850; }
.pinmail-bulk-bar fieldset input:checked + span { background: var(--pinmail-purple-soft); color: #5642b5; }
.pinmail-bulk-bar > button:last-child { border-color: var(--pinmail-purple); background: var(--pinmail-purple); color: #fff; }

.pinmail-modal-panel,
.pinmail-list-modal-panel {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid #d3dde4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 24, 33, 0.28);
}

.pinmail-list-modal-panel { width: min(980px, 100%); background: #eef2f5; }
.pinmail-modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid #dce4e9; background: rgba(255, 255, 255, 0.96); }
.pinmail-modal-head span { color: var(--pinmail-purple); font-size: 10px; font-weight: 900; letter-spacing: 0.12em; }
.pinmail-modal-head h3 { margin: 3px 0 0; font-size: 19px; }
.pinmail-modal-head > button { width: 34px; min-height: 34px; padding: 0; font-size: 21px; }
.pinmail-modal-panel > p,
.pinmail-list-modal-panel > p { margin: 14px 18px 0; color: var(--muted); }
.pinmail-candidate-list { display: grid; gap: 8px; padding: 14px 18px 18px; }
.pinmail-candidate-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 52px auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid #dbe3e8; border-radius: 8px; }
.pinmail-candidate-image { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border: 1px solid #dce4e9; border-radius: 7px; background: #f5f7f9; color: var(--muted); font-size: 11px; font-weight: 900; }
.pinmail-candidate-image img { width: 100%; height: 100%; object-fit: contain; }
.pinmail-candidate-row > div:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.pinmail-candidate-row span,
.pinmail-candidate-row small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.pinmail-candidate-row > b { color: var(--pinmail-purple); font-size: 17px; }

.pinmail-list-pages { display: grid; gap: 18px; padding: 18px; }
.pinmail-list-sheet { padding: 28px; border: 1px solid #d7dee4; border-radius: 5px; background: #fff; box-shadow: 0 5px 18px rgba(26, 39, 52, 0.07); }
.pinmail-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 3px solid #1c2a36; }
.pinmail-sheet-head span { color: var(--pinmail-purple); font-size: 11px; font-weight: 900; letter-spacing: 0.14em; }
.pinmail-sheet-head h3 { margin: 5px 0 0; font-size: 28px; }
.pinmail-sheet-head > div:last-child { display: grid; justify-items: end; gap: 4px; }
.pinmail-sheet-head small { color: var(--muted); }
.pinmail-list-sheet dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0; border: 1px solid #dce3e8; }
.pinmail-list-sheet dl > div { padding: 10px 12px; border-right: 1px solid #dce3e8; }
.pinmail-list-sheet dl > div:last-child { border: 0; }
.pinmail-list-sheet dt { color: var(--muted); font-size: 10px; font-weight: 800; }
.pinmail-list-sheet dd { margin: 5px 0 0; color: var(--ink); font-size: 13px; font-weight: 850; }
.pinmail-sheet-items { display: grid; }
.pinmail-sheet-items > div { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(0, 0.8fr) 48px; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #e3e8ec; }
.pinmail-sheet-items > div > span { display: grid; gap: 3px; }
.pinmail-sheet-items small { color: var(--muted); }
.pinmail-list-sheet footer { display: flex; justify-content: flex-end; gap: 24px; padding-top: 16px; color: var(--muted); }
.pinmail-list-sheet footer strong { color: var(--ink); font-size: 18px; }
.pinmail-list-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid #d3dde4; background: rgba(255, 255, 255, 0.96); }

@media (min-width: 1024px) {
  body.pinmail-view {
    --web-console-canvas: #e9f0f4;
    --web-console-sidebar: #0d1821;
    --web-console-primary: #0f766e;
    min-width: 0;
    padding-bottom: 0;
    background: var(--web-console-canvas);
  }

  body.pinmail-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.pinmail-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.pinmail-view .main-topbar .topbar-main { display: grid; align-items: start; gap: 18px; min-width: 0; }
  body.pinmail-view .main-topbar .brand-block { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
  body.pinmail-view .main-topbar .brand-mark { width: 48px; height: 48px; border-radius: 8px; background: linear-gradient(180deg, #12a998, #08766d); box-shadow: 0 14px 30px rgba(10, 143, 130, 0.28); }
  body.pinmail-view .main-topbar h1 { color: #fff; font-size: 20px; line-height: 1.15; }
  body.pinmail-view .main-topbar .brand-block p { margin-top: 6px; color: #91a2b1; line-height: 1.35; }
  body.pinmail-view .main-topbar .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.pinmail-view .main-topbar .top-actions form { width: 100%; margin: 0; }
  body.pinmail-view .main-topbar .server-pill,
  body.pinmail-view .main-topbar .user-pill,
  body.pinmail-view .main-topbar .plain-link,
  body.pinmail-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.pinmail-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: 0; border-radius: 0; background: transparent; }
  body.pinmail-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.pinmail-view .main-topbar .quick-nav a:hover,
  body.pinmail-view .main-topbar .quick-nav a.is-active { border-color: rgba(45, 212, 191, 0.34); background: var(--web-console-primary); color: #fff; }
  body.pinmail-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.pinmail-view .app-shell > #pinmail-section { grid-column: 2; min-width: 0; width: auto; max-width: none; margin: 18px 22px 22px; }
  body.pinmail-view .mobile-bottom-nav { display: none !important; }
}

@media (max-width: 1280px) and (min-width: 1024px) {
  .pinmail-record { grid-template-columns: 28px minmax(240px, 1.4fr) minmax(130px, 0.7fr) 112px 64px; }
  .pinmail-record-actions { grid-column: 2 / -1; padding-top: 4px; border-top: 1px solid #eef2f4; }
}

@media (max-width: 860px) {
  .pinmail-center-head { align-items: flex-start; }
  .pinmail-showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pinmail-showcase-copy { grid-column: 1 / -1; }
  .pinmail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pinmail-toolbar { grid-template-columns: 1fr 1fr; }
  .pinmail-toolbar input { grid-column: 1 / -1; }
  .pinmail-record { position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 12px 12px 42px; }
  .pinmail-record > input { position: absolute; top: 16px; left: 14px; }
  .pinmail-record-product { grid-column: 1 / -1; }
  .pinmail-record-source,
  .pinmail-record-schedule { border-top: 1px solid #edf1f4; padding-top: 9px; }
  .pinmail-record-actions { justify-content: flex-start; }
  .pinmail-bulk-bar { grid-template-columns: 70px 1fr 1fr; }
  .pinmail-bulk-bar > button { width: 100%; }
  .pinmail-bulk-bar > button:last-child { grid-column: 2 / -1; }
}

@media (max-width: 620px) {
  .pinmail-center-head { padding: 18px 16px 15px; }
  .pinmail-center-head .section-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .pinmail-center-head .section-status-label { grid-column: 1 / -1; }
  .pinmail-center-upload-status,
  .pinmail-showcase,
  .pinmail-metrics,
  .pinmail-source-strip,
  .pinmail-toolbar,
  .pinmail-list-head,
  .pinmail-center-list { margin-left: 14px; margin-right: 14px; }
  .pinmail-showcase { grid-template-columns: 1fr; padding: 11px; }
  .pinmail-showcase-copy { grid-column: auto; }
  .pinmail-metric { min-height: 92px; padding: 12px; }
  .pinmail-metric > strong { font-size: 22px; }
  .pinmail-source-strip { flex-wrap: wrap; gap: 10px 16px; }
  .pinmail-source-strip em { flex-basis: 100%; margin-left: 0; }
  .pinmail-toolbar { grid-template-columns: 1fr; }
  .pinmail-toolbar input { grid-column: auto; }
  .pinmail-list-head { flex-wrap: wrap; }
  .pinmail-view-switch { margin-left: 0; }
  .pinmail-record { grid-template-columns: 1fr; }
  .pinmail-record-source,
  .pinmail-record-schedule { grid-template-columns: auto 1fr; align-items: center; }
  .pinmail-record-source small { grid-column: 1 / -1; }
  .pinmail-method { position: absolute; top: 13px; right: 12px; }
  .pinmail-bulk-bar { position: relative; grid-template-columns: 1fr; padding: 13px 14px calc(13px + env(safe-area-inset-bottom)); }
  .pinmail-bulk-bar > button:last-child { grid-column: auto; }
  .pinmail-candidate-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .pinmail-candidate-image { width: 56px; height: 56px; }
  .pinmail-candidate-row > button { grid-column: 1 / -1; }
  .pinmail-list-sheet { padding: 18px 14px; }
  .pinmail-sheet-head { display: grid; }
  .pinmail-sheet-head > div:last-child { justify-items: start; }
  .pinmail-list-sheet dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pinmail-list-sheet dl > div:nth-child(2) { border-right: 0; }
  .pinmail-list-sheet dl > div:nth-child(-n+2) { border-bottom: 1px solid #dce3e8; }
  .pinmail-sheet-items > div { grid-template-columns: 24px minmax(0, 1fr) 42px; }
  .pinmail-sheet-items > div > span:nth-child(3) { grid-column: 2 / -1; }
}

@media print {
  body:has(#pinmail-list-modal:not(.is-hidden)) > * { visibility: hidden !important; }
  #pinmail-list-modal:not(.is-hidden),
  #pinmail-list-modal:not(.is-hidden) * { visibility: visible !important; }
  #pinmail-list-modal:not(.is-hidden) { position: absolute; inset: 0; display: block; padding: 0; background: #fff; }
  #pinmail-list-modal .modal-backdrop,
  #pinmail-list-modal .pinmail-modal-head,
  #pinmail-list-modal > section > p,
  #pinmail-list-modal .pinmail-list-actions { display: none !important; }
  #pinmail-list-modal .pinmail-list-modal-panel { width: 100%; max-height: none; overflow: visible; border: 0; background: #fff; box-shadow: none; }
  #pinmail-list-modal .pinmail-list-pages { display: block; padding: 0; }
  #pinmail-list-modal .pinmail-list-sheet { min-height: 260mm; padding: 12mm; border: 0; box-shadow: none; break-after: page; }
  #pinmail-list-modal .pinmail-list-sheet:last-child { break-after: auto; }
}

.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-scan-refund-warning {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid #f04438;
  border-radius: 8px;
  background: #fff1f0;
  color: #b42318;
}

.wuliu-scan-card .wuliu-scan-refund-warning strong {
  color: inherit;
  font-size: 18px;
}

.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;
  }
}

.purchase-auto-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  margin-top: 7px;
}

.purchase-auto-button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #1877c9;
  border-radius: 999px;
  background: #eaf4ff;
  color: #0b5fa5;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.purchase-auto-button:hover:not(:disabled) {
  border-color: #075a9d;
  background: #dcebff;
}

.purchase-auto-button:disabled {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
  opacity: 0.82;
}

.purchase-auto-control small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .purchase-auto-button {
    min-height: 40px;
    padding: 0 14px;
  }
}

.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);
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.45);
  object-fit: cover;
}

.feishu-login-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(51, 112, 255, 0.2);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(51, 112, 255, 0.055), rgba(255, 255, 255, 0.94));
}

.feishu-login-section.is-disabled {
  border-color: var(--line);
  background: #f8fbfc;
}

.feishu-login-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feishu-login-title-row h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.feishu-login-title-row p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.feishu-login-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8efff;
  color: #245bdb;
  font-size: 11px;
  font-weight: 800;
}

.feishu-login-badge.is-pending {
  background: #fff3d6;
  color: #8a5a00;
}

.feishu-qr {
  position: relative;
  display: grid;
  width: 256px;
  height: 256px;
  margin: 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.feishu-qr iframe {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 320px;
  height: 320px;
  border: 0;
  transform: scale(0.75);
  transform-origin: top left;
}

.feishu-authorize-button {
  width: 100%;
  min-height: 42px;
  border-color: #3370ff;
  background: #3370ff;
  color: #fff;
}

.feishu-authorize-button:hover:not(:disabled) {
  border-color: #245bdb;
  background: #245bdb;
}

.feishu-authorize-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.feishu-login-status {
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--red);
  font-size: 12px;
  text-align: center;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.login-divider::before,
.login-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.password-login-form {
  display: grid;
  gap: 14px;
}

.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);
}

.purchase-status-note,
.workflow-purchase-note,
.workflow-lookup-product-note {
  display: block;
  color: #dc2626 !important;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.purchase-status-note {
  margin-top: 5px;
}

.workflow-purchase-note,
.workflow-lookup-product-note {
  margin-top: 4px;
}

.workflow-task-body .workflow-purchase-note,
.workflow-detail-item .workflow-purchase-note,
.workflow-lookup-product-body .workflow-lookup-product-note {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.workflow-detail-item .workflow-purchase-note {
  grid-area: auto !important;
  grid-column: 2 !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-alert.is-bringback {
  background: #fff3df;
  color: #9a4d08;
}

.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.is-bringback {
  margin: 0 -6px;
  padding: 9px 6px;
  border-radius: 7px;
  background: #fff7e8;
}

.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.is-bringback .workflow-shipping-title em {
  background: #ffe5b8;
  color: #9a4d08;
}

.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-status-actions button.is-bringback {
  border-color: #d8872f;
  background: #fff7e8;
  color: #9a4d08;
}

.workflow-shipping-status-actions button.is-bringback:hover:not(:disabled) {
  background: #ffe9c5;
}

.workflow-shipping-status-actions button.is-bringback:disabled {
  cursor: default;
  opacity: 0.7;
}

.workflow-shipping-shortage-fields,
.workflow-shipping-pinmail-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,
.workflow-shipping-pinmail-fields.is-hidden {
  display: none;
}

.workflow-shipping-shortage-fields label,
.workflow-shipping-pinmail-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,
.workflow-shipping-pinmail-fields input {
  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-pinmail-fields {
  align-items: end;
  grid-template-columns: minmax(110px, .35fr) minmax(190px, 1fr);
  padding: 8px;
  border: 1px solid #c8b9eb;
  border-radius: 7px;
  background: #f8f5ff;
}

.workflow-shipping-pinmail-fields > small {
  min-height: 34px;
  display: flex;
  align-items: center;
  color: #6d45b5;
  font-size: 12px;
  font-weight: 800;
}

.workflow-shipping-pinmail-fields > small strong {
  margin: 0 4px;
  font-size: 16px;
}

.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-actions button.is-bringback-all {
  flex: 0 1 150px;
  border-color: #c66c19;
  background: #c66c19;
  color: #fff;
}

.workflow-shipping-actions button.is-bringback-all:disabled {
  cursor: default;
  opacity: 0.65;
}

.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(2, minmax(0, 1fr));
    gap: 6px;
  }

  .workflow-shipping-status-actions button {
    width: 100%;
    min-height: 44px;
    padding: 0 4px;
  }

  .workflow-shipping-shortage-fields,
  .workflow-shipping-pinmail-fields {
    grid-template-columns: minmax(92px, .38fr) minmax(0, 1fr);
  }

  .workflow-shipping-shortage-fields input,
  .workflow-shipping-shortage-fields select,
  .workflow-shipping-pinmail-fields input {
    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: #dc2626;
    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(790px, 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(4, minmax(0, 1fr));
  gap: 8px;
}

.mobile-purchase-move-grid button {
  --move-shop-accent: #5a7184;
  --move-shop-soft: #f3f6f8;
  --move-shop-border: #d7e3ea;
  --move-shop-mark-color: #ffffff;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 7px 8px;
  border: 1px solid #d8e0e7;
  border-radius: 9px;
  background: #ffffff;
  color: #23435d;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-align: left;
  box-shadow: 0 2px 7px rgb(15 23 42 / 4%);
  cursor: pointer;
}

.mobile-purchase-move-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 34px;
  overflow: hidden;
  border: 1px solid #e1e5e9;
  border-radius: 7px;
  background: #ffffff;
  color: #263442;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}

.mobile-purchase-move-mark img,
.mobile-purchase-move-mark svg {
  display: block;
}

.mobile-purchase-move-brand-donpen img {
  width: 44px;
  height: 33px;
  object-fit: cover;
  object-position: center top;
}

.mobile-purchase-move-brand-seven svg,
.mobile-purchase-move-brand-itoyokado svg,
.mobile-purchase-move-brand-lawson svg,
.mobile-purchase-move-brand-akachan svg {
  width: 44px;
  height: 32px;
}

.mobile-purchase-move-brand-online svg,
.mobile-purchase-move-brand-stockout svg {
  width: 18px;
  height: 18px;
}

.mobile-purchase-move-brand-yodobashi { border-color: #c81e26; background: #d8262e; color: #ffffff; }
.mobile-purchase-move-brand-aeon { border-color: #b81b74; color: #b81b74; letter-spacing: 0.02em; }
.mobile-purchase-move-brand-familymart { border-top: 6px solid #2383c6; border-bottom: 6px solid #31a66a; color: #22669b; }
.mobile-purchase-move-brand-lawson100 { border-color: #2e7bbb; color: #1f69a6; }
.mobile-purchase-move-brand-matsukiyo { border-color: #f0d126; background: #ffe343; color: #142c67; font-size: 10px; letter-spacing: -0.1em; }
.mobile-purchase-move-brand-life { border-color: #24864c; color: #24864c; letter-spacing: 0.05em; }
.mobile-purchase-move-brand-daiso { border-color: #d42672; color: #d42672; }
.mobile-purchase-move-brand-seijo { border-color: #7c2030; background: #7c2030; color: #ffffff; }
.mobile-purchase-move-brand-sugi { border-color: #2376b8; color: #e23b36; }
.mobile-purchase-move-brand-online { background: #f2f5f7; color: #586a7b; }
.mobile-purchase-move-brand-stockout { border-color: #d38d86; background: #fff3f1; color: #b33a30; }
.mobile-purchase-move-brand-restore,
.mobile-purchase-move-brand-text { border-color: var(--move-shop-accent); background: var(--move-shop-accent); color: #ffffff; }

.mobile-purchase-move-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mobile-purchase-move-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-purchase-move-copy strong {
  color: #17324d;
  font-size: 13px;
  font-weight: 900;
}

.mobile-purchase-move-grid button[data-shop-tone="donki"] { --move-shop-accent: #213a63; --move-shop-soft: #fff8cf; --move-shop-border: #e6cb50; }
.mobile-purchase-move-grid button[data-shop-tone="seven"] { --move-shop-accent: #008061; --move-shop-soft: #f0faf6; --move-shop-border: #a7d5c5; }
.mobile-purchase-move-grid button[data-shop-tone="yodobashi"] { --move-shop-accent: #d71920; --move-shop-soft: #fff3f3; --move-shop-border: #efb3b5; }
.mobile-purchase-move-grid button[data-shop-tone="aeon"] { --move-shop-accent: #a8176f; --move-shop-soft: #fff2fa; --move-shop-border: #e1acd0; }
.mobile-purchase-move-grid button[data-shop-tone="itoyokado"] { --move-shop-accent: #16803d; --move-shop-soft: #f0fbf3; --move-shop-border: #abd7b8; }
.mobile-purchase-move-grid button[data-shop-tone="familymart"] { --move-shop-accent: #1d5aa6; --move-shop-soft: #eff8f4; --move-shop-border: #8bcbaa; }
.mobile-purchase-move-grid button[data-shop-tone="lawson"],
.mobile-purchase-move-grid button[data-shop-tone="lawson100"] { --move-shop-accent: #1672b8; --move-shop-soft: #eff8ff; --move-shop-border: #abd2ed; }
.mobile-purchase-move-grid button[data-shop-tone="matsukiyo"] { --move-shop-accent: #173f73; --move-shop-soft: #fff8d6; --move-shop-border: #e9d264; }
.mobile-purchase-move-grid button[data-shop-tone="akachan"] { --move-shop-accent: #d83a3a; --move-shop-soft: #fff4f3; --move-shop-border: #efb8b5; }
.mobile-purchase-move-grid button[data-shop-tone="life"] { --move-shop-accent: #168253; --move-shop-soft: #effaf4; --move-shop-border: #add8c0; }
.mobile-purchase-move-grid button[data-shop-tone="daiso"] { --move-shop-accent: #d6242f; --move-shop-soft: #fff3f4; --move-shop-border: #efb4b8; }
.mobile-purchase-move-grid button[data-shop-tone="seijo"] { --move-shop-accent: #7a2435; --move-shop-soft: #fbf2f4; --move-shop-border: #dbb4bc; }
.mobile-purchase-move-grid button[data-shop-tone="sugi"] { --move-shop-accent: #1667ad; --move-shop-soft: #f1f7fd; --move-shop-border: #b2d1e9; }
.mobile-purchase-move-grid button[data-shop-tone="online"] { --move-shop-accent: #6d5bd0; --move-shop-soft: #f5f2ff; --move-shop-border: #c8bff1; }
.mobile-purchase-move-grid button[data-shop-tone="stockout"] { --move-shop-accent: #c0392b; --move-shop-soft: #fff1ef; --move-shop-border: #edb5ae; }
.mobile-purchase-move-grid button[data-shop-tone="restore"] { --move-shop-accent: #147d6f; --move-shop-soft: #eefaf7; --move-shop-border: #a9d8d0; }

.mobile-purchase-move-grid button:hover {
  border-color: var(--move-shop-accent);
  background: #ffffff;
  box-shadow: 0 5px 14px rgb(15 23 42 / 10%);
}

.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(3, minmax(0, 1fr));
  }

  .mobile-purchase-move-grid button {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    min-height: 54px;
    padding: 7px 8px;
    border-radius: 11px;
    background: #ffffff;
  }

  .mobile-purchase-move-copy strong {
    font-size: 12px;
  }

  .mobile-purchase-move-grid button:active {
    border-color: var(--move-shop-accent);
    background: var(--move-shop-soft);
  }

  .mobile-purchase-move-grid button:disabled {
    opacity: 0.55;
  }

  .mobile-purchase-move-sheet > p {
    min-height: 18px;
    margin-top: 10px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .mobile-purchase-move-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.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-ai-note { display: block; font-size: 11px; line-height: 1.5; }
.picking-photo-results { grid-column: 1 / -1; display: grid; gap: 8px; }
.picking-photo-recognition { display: grid; gap: 3px; padding: 9px 11px; border: 1px solid #cfe0d7; border-radius: 8px; background: #f6fbf8; }
.picking-photo-recognition strong { color: #176345; font-size: 12px; }
.picking-photo-recognition span { color: var(--muted, #64748b); font-size: 12px; overflow-wrap: anywhere; }
.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; }
}
/* New-server home polish 20260729.
   Presentation only: keep the existing navigation, permissions and dashboard data flow intact. */
@media (min-width: 1024px) {
  body.home-view {
    --home-polish-bg: #edf2f5;
    --home-polish-panel: #ffffff;
    --home-polish-panel-soft: #f7f9fb;
    --home-polish-ink: #142331;
    --home-polish-muted: #66788a;
    --home-polish-line: #d7e1e8;
    --home-polish-line-strong: #c6d4de;
    --home-polish-accent: #0d766d;
    --home-polish-accent-strong: #075d57;
    --home-polish-accent-soft: #e6f4f1;
    --home-polish-blue: #285f8b;
    --home-polish-blue-soft: #eaf2fa;
    --home-polish-amber: #b76519;
    --home-polish-amber-soft: #fff3e6;
    --home-polish-red: #b4333c;
    --home-polish-red-soft: #fff0f1;
    background: var(--home-polish-bg) !important;
  }

  body.home-view .app-shell {
    grid-template-columns: 258px minmax(0, 1fr) !important;
    background: var(--home-polish-bg);
  }

  body.home-view .main-topbar {
    position: sticky;
    top: 0;
    align-self: start;
    display: flex;
    height: 100vh;
    max-height: 100vh;
    flex-direction: column;
    gap: 0;
    padding: 20px 14px 18px !important;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid rgba(148, 163, 184, 0.2) !important;
    background: linear-gradient(180deg, #101d28 0%, #0b1721 58%, #08131c 100%) !important;
    box-shadow: 8px 0 28px rgba(15, 30, 42, 0.08) !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.24) transparent;
  }

  body.home-view .main-topbar .topbar-main {
    flex: 0 0 auto;
  }

  body.home-view .brand-block {
    width: 100%;
    gap: 11px;
    padding: 0 3px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  }

  body.home-view .brand-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  }

  body.home-view .brand-block h1 {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: 0.01em;
  }

  body.home-view .brand-block p {
    max-width: 170px;
    margin-top: 3px;
    overflow: hidden;
    color: #91a3b4;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.home-view .main-topbar .quick-nav {
    flex: 1 1 auto;
    display: flex;
    width: 100%;
    min-height: 0;
    flex-direction: column;
    gap: 4px;
    padding: 14px 0 0;
    overflow: visible;
    background: transparent;
  }

  body.home-view .main-topbar .quick-nav a,
  body.home-view .main-topbar .quick-nav a.nav-action-link:not(.is-active) {
    position: relative;
    flex: 0 0 auto;
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 0 10px 0 8px;
    border: 1px solid transparent !important;
    border-radius: 9px;
    background: transparent !important;
    color: #c4d0da;
    font-size: 13px;
    font-weight: 850;
    box-shadow: none !important;
    transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
  }

  body.home-view .main-topbar .quick-nav a .quick-nav-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: #93a6b7;
    transition: inherit;
  }

  body.home-view .main-topbar .quick-nav a:hover {
    background: rgba(255, 255, 255, 0.065) !important;
    color: #ffffff;
    transform: translateX(2px);
  }

  body.home-view .main-topbar .quick-nav a:hover .quick-nav-icon {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #dce7ee;
  }

  body.home-view .main-topbar .quick-nav a.is-active {
    border-color: rgba(54, 203, 184, 0.2) !important;
    background: linear-gradient(90deg, #e7f7f4 0%, #dff2ef 100%) !important;
    color: #0a554f;
    transform: none;
  }

  body.home-view .main-topbar .quick-nav a.is-active::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: -8px;
    width: 3px;
    border-radius: 999px;
    background: #2dd4bf;
  }

  body.home-view .main-topbar .quick-nav a.is-active .quick-nav-icon {
    border-color: transparent;
    background: var(--home-polish-accent);
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(13, 118, 109, 0.2);
  }

  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: 26px clamp(24px, 2.4vw, 38px) 42px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, #f9fbfc 0%, var(--home-polish-bg) 100%) !important;
    box-shadow: none !important;
  }

  body.home-view .home-title-row {
    min-height: 34px;
    margin: 0 auto 16px !important;
    padding: 0 !important;
    max-width: 1360px;
  }

  body.home-view .home-account-panel {
    width: auto;
    max-width: none;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
  }

  body.home-view .home-account-actions {
    gap: 6px;
  }

  body.home-view .home-account-action,
  body.home-view .home-account-action-wide {
    min-height: 34px;
    padding: 0 10px;
    border-color: var(--home-polish-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #33495d;
    font-size: 12px;
    font-weight: 850;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.035);
    transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
  }

  body.home-view .home-account-action:hover {
    border-color: rgba(13, 118, 109, 0.38);
    background: var(--home-polish-accent-soft);
    color: var(--home-polish-accent-strong);
  }

  body.home-view .home-account-action-danger {
    border-color: #f4cbd0;
    background: #fff7f7;
    color: #9f2330;
  }

  body.home-view .manager-dashboard {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    gap: 14px;
  }

  body.home-view .manager-dashboard-title {
    align-items: flex-end;
    padding: 0 2px 2px;
  }

  body.home-view .manager-dashboard-title .eyebrow {
    min-height: 22px;
    padding: 0 8px;
    border-color: #c8e4df;
    border-radius: 6px;
    background: var(--home-polish-accent-soft);
    color: var(--home-polish-accent-strong);
    font-size: 10px;
    letter-spacing: 0.035em;
  }

  body.home-view .manager-dashboard-title h3 {
    margin-top: 8px;
    color: var(--home-polish-ink);
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -0.02em;
  }

  body.home-view .manager-dashboard-actions {
    gap: 7px;
  }

  body.home-view .manager-dashboard-actions button,
  body.home-view .manager-dashboard-actions span {
    min-height: 34px;
    padding: 0 12px;
    border-color: var(--home-polish-line);
    border-radius: 8px;
    color: #455b6e;
    font-size: 12px;
    box-shadow: none;
  }

  body.home-view .manager-dashboard-actions button {
    border-color: var(--home-polish-ink);
    background: var(--home-polish-ink);
    color: #ffffff;
    transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
  }

  body.home-view .manager-dashboard-actions button:hover {
    border-color: var(--home-polish-accent-strong);
    background: var(--home-polish-accent-strong);
    transform: translateY(-1px);
  }

  body.home-view .manager-kpi-grid {
    grid-template-columns: 1.06fr 1fr 1fr;
    gap: 12px;
  }

  body.home-view .manager-kpi-card {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 42px;
    min-height: 112px;
    gap: 12px;
    padding: 18px 18px 17px 20px;
    overflow: hidden;
    border-color: var(--home-polish-line);
    border-radius: 10px;
    background: var(--home-polish-panel);
    box-shadow: 0 8px 24px rgba(29, 52, 69, 0.055);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  }

  body.home-view .manager-kpi-card:hover {
    border-color: var(--home-polish-line-strong);
    box-shadow: 0 12px 28px rgba(29, 52, 69, 0.08);
    transform: translateY(-1px);
  }

  body.home-view .manager-kpi-card::before {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    width: 4px;
    height: auto;
    background: var(--home-polish-accent);
  }

  body.home-view .manager-kpi-card:nth-child(2)::before {
    background: var(--home-polish-amber);
  }

  body.home-view .manager-kpi-card:nth-child(3)::before {
    background: var(--home-polish-blue);
  }

  body.home-view .manager-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: var(--home-polish-accent-soft) !important;
    color: var(--home-polish-accent);
    font-size: 12px;
  }

  body.home-view .manager-kpi-icon.is-alert {
    background: var(--home-polish-amber-soft) !important;
    color: var(--home-polish-amber);
  }

  body.home-view .manager-kpi-icon.is-ship {
    background: var(--home-polish-blue-soft) !important;
    color: var(--home-polish-blue);
  }

  body.home-view .manager-kpi-card small {
    color: #617487;
    font-size: 13px;
  }

  body.home-view .manager-kpi-card strong {
    margin-top: 5px;
    color: var(--home-polish-ink) !important;
    font-size: 35px;
    line-height: 0.98;
    letter-spacing: -0.035em;
  }

  body.home-view .manager-kpi-card em {
    margin-top: 7px;
    color: #758696;
    font-size: 12px;
  }

  body.home-view .manager-dashboard-grid {
    grid-template-columns: minmax(0, 1.62fr) minmax(292px, 0.78fr);
    gap: 12px;
    align-items: stretch;
  }

  body.home-view .manager-flow-card,
  body.home-view .manager-blocker-card,
  body.home-view .manager-recent-card {
    border-color: var(--home-polish-line);
    border-radius: 10px;
    background: var(--home-polish-panel);
    box-shadow: 0 8px 24px rgba(29, 52, 69, 0.05);
  }

  body.home-view .manager-flow-card,
  body.home-view .manager-blocker-card {
    padding: 17px;
  }

  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-polish-ink);
    font-size: 15px;
  }

  body.home-view .manager-flow-card header a,
  body.home-view .manager-blocker-card header a,
  body.home-view .manager-recent-card header a {
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #d7e5f2;
    border-radius: 7px;
    background: var(--home-polish-blue-soft);
    color: var(--home-polish-blue);
    transition: border-color 140ms ease, background-color 140ms ease;
  }

  body.home-view .manager-flow-card header a:hover,
  body.home-view .manager-blocker-card header a:hover,
  body.home-view .manager-recent-card header a:hover {
    border-color: #b8cfe2;
    background: #e0edf8;
  }

  body.home-view .manager-flow-steps {
    gap: 0;
    margin-top: 15px;
    overflow: hidden;
    border: 1px solid #e1e8ee;
    border-radius: 9px;
    background: var(--home-polish-panel-soft);
  }

  body.home-view .manager-flow-step {
    min-height: 132px;
    gap: 7px;
    padding: 13px 11px 11px;
    border: 0;
    border-right: 1px solid #e1e8ee;
    border-radius: 0;
    background: transparent;
    transition: background-color 140ms ease;
  }

  body.home-view .manager-flow-step:last-child {
    border-right: 0;
  }

  body.home-view .manager-flow-step:hover {
    background: #ffffff;
  }

  body.home-view .manager-flow-step:not(:last-child)::after {
    display: block;
    top: 25px;
    right: -4px;
    left: auto;
    z-index: 2;
    width: 7px;
    height: 7px;
    border: solid #9eb0bf;
    border-width: 1px 1px 0 0;
    transform: rotate(45deg);
  }

  body.home-view .manager-flow-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  body.home-view .manager-flow-step b {
    color: #526679;
    font-size: 12px;
  }

  body.home-view .manager-flow-step strong {
    color: var(--home-polish-ink);
    font-size: 27px;
    letter-spacing: -0.025em;
  }

  body.home-view .manager-flow-step em {
    padding: 4px 7px;
    border-radius: 6px;
    background: #e9eef2;
    color: #627486;
  }

  body.home-view .manager-blocker-card {
    align-content: start;
    gap: 0;
  }

  body.home-view .manager-blocker-card header {
    margin-bottom: 5px;
  }

  body.home-view .manager-blocker-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 66px;
    gap: 10px;
    padding: 10px 4px;
    border: 0;
    border-bottom: 1px solid #e7edf2;
    border-radius: 0;
    background: transparent;
    transition: background-color 140ms ease;
  }

  body.home-view .manager-blocker-row:last-child {
    border-bottom: 0;
  }

  body.home-view .manager-blocker-row:hover {
    background: var(--home-polish-panel-soft);
  }

  body.home-view .manager-blocker-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  body.home-view .manager-blocker-row strong {
    color: var(--home-polish-ink);
    font-size: 13px;
  }

  body.home-view .manager-blocker-row em {
    color: #728393;
    font-size: 11px;
  }

  body.home-view .manager-blocker-row b {
    min-width: 44px;
    padding: 6px 7px;
    border-radius: 7px;
    background: var(--home-polish-red-soft);
    color: var(--home-polish-red);
  }

  body.home-view .manager-recent-card {
    overflow: hidden;
  }

  body.home-view .manager-recent-card header {
    padding: 13px 16px;
    border-bottom-color: #e3eaf0;
  }

  body.home-view .manager-recent-head,
  body.home-view .manager-recent-row {
    grid-template-columns: 124px 136px minmax(0, 1fr) 96px;
    gap: 10px;
    padding: 10px 16px;
    font-size: 12px;
  }

  body.home-view .manager-recent-head {
    background: var(--home-polish-panel-soft);
    color: #687b8d;
  }

  body.home-view .manager-recent-row {
    min-height: 42px;
    color: #344a5e;
  }

  body.home-view .manager-recent-row:nth-child(even) {
    background: #fbfcfd;
  }

  body.home-view .manager-recent-row b {
    min-height: 22px;
    border-radius: 7px;
  }

  body.home-view a:focus-visible,
  body.home-view button:focus-visible {
    outline: 3px solid rgba(13, 118, 109, 0.2);
    outline-offset: 2px;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  body.home-view .app-shell {
    grid-template-columns: 230px minmax(0, 1fr) !important;
  }

  body.home-view .brand-block p {
    max-width: 145px;
  }

  body.home-view .app-shell > #home-section.manager-home-panel {
    padding-right: 22px !important;
    padding-left: 22px !important;
  }

  body.home-view .manager-dashboard-grid {
    grid-template-columns: 1fr;
  }

  body.home-view .manager-kpi-card {
    min-height: 106px;
  }
}

@media (min-width: 1600px) {
  body.home-view .app-shell {
    grid-template-columns: 270px minmax(0, 1fr) !important;
  }

  body.home-view .manager-dashboard,
  body.home-view .home-title-row {
    max-width: 1440px;
  }
}

/* Osaka isolated order-number packing */
.order-sheet-flow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.osaka-order-packing {
  position: relative;
  border-color: #9fcfc6;
  background: #f5fbfa;
}

.osaka-packing-order-head,
.osaka-packing-customer,
.osaka-packing-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.osaka-packing-order-head > div,
.osaka-packing-customer > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.osaka-packing-order-head > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.osaka-packing-order-head span,
.osaka-packing-order-head small,
.osaka-packing-customer span,
.osaka-packing-customer small,
.osaka-packing-actions span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.osaka-packing-order-head strong {
  color: var(--ink);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.osaka-packing-order-head b {
  padding: 5px 9px;
  border-radius: 6px;
  background: #eef6f4;
  color: var(--accent-strong);
  font-size: 12px;
  white-space: nowrap;
}

.osaka-packing-customer {
  margin-top: 8px;
  align-items: start;
}

.osaka-packing-customer > div:last-child {
  justify-items: end;
}

.osaka-packing-customer.is-warning {
  border-color: #efc36e;
  background: #fffaf0;
}

.osaka-packing-customer button,
.packing-item-data-actions button,
.osaka-packing-removed button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.osaka-packing-conflict {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #edb4b0;
  border-radius: 8px;
  background: #fff5f4;
  color: #9f2f29;
  font-size: 12px;
}

.osaka-packing-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.osaka-packing-columns > section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.osaka-packing-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fa;
}

.osaka-packing-column-head strong {
  font-size: 14px;
}

.osaka-packing-column-head span {
  color: var(--muted);
  font-size: 12px;
}

.osaka-packing-item-list {
  display: grid;
  gap: 0;
}

.osaka-packing-item {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(84px, 104px);
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.osaka-packing-item:last-child {
  border-bottom: 0;
}

.osaka-packing-item.is-needs-info {
  background: #fffaf2;
}

.osaka-packing-item.is-manual-required {
  background: #fff7ed;
  box-shadow: inset 4px 0 0 #ea580c;
}

.osaka-packing-item.is-moved-out {
  opacity: 0.55;
  background: #f7f8fa;
}

.packing-item-no {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 23px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.osaka-packing-thumb,
.osaka-packing-thumb .product-thumb-button,
.osaka-packing-thumb .product-image-empty {
  width: 54px;
  height: 54px;
}

.osaka-packing-item-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.osaka-packing-item-main strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.osaka-packing-item-main span,
.osaka-packing-item-main small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.osaka-packing-item label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.osaka-packing-item input[type="number"] {
  width: 100%;
  min-height: 34px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.packing-include-control {
  display: flex !important;
  align-items: center;
  gap: 6px !important;
}

.packing-include-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.packing-item-state {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px !important;
  font-weight: 850;
}

.packing-item-state.is-complete {
  background: #e7f7ef;
  color: #176345;
}

.packing-item-state.is-missing {
  background: #fff0df;
  color: #9a5b00;
}

.packing-item-state.is-conflict {
  background: #fff0ef;
  color: #b42318;
}

.packing-item-state.is-manual {
  background: #ffedd5;
  color: #9a3412;
}

.packing-manual-required {
  display: block;
  color: #c2410c !important;
  font-weight: 850;
}

.packing-manual-entries {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff7ed;
}

.packing-manual-entries strong,
.packing-manual-entries span {
  color: #9a3412;
  font-size: 11px;
}

.osaka-packing-manual-form,
.osaka-packing-manual-list {
  display: grid;
  gap: 10px;
}

.osaka-packing-manual-form {
  margin-top: 16px;
}

.osaka-packing-manual-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 100px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.osaka-packing-manual-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.osaka-packing-manual-row input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.packing-missing-fields {
  color: #9a5b00 !important;
}

.packing-item-data-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.osaka-packing-removed {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.osaka-packing-removed summary {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.osaka-packing-removed > div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.osaka-packing-removed small {
  color: var(--muted);
}

.osaka-packing-actions {
  margin-top: 10px;
}

.osaka-packing-actions > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.osaka-packing-actions.is-sealed {
  justify-content: start;
  border-color: #9fcfc6;
  background: #eef8f6;
}

.osaka-packing-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
}

.osaka-packing-modal-card {
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.osaka-packing-modal-card > span {
  color: #9a5b00;
  font-size: 12px;
  font-weight: 850;
}

.osaka-packing-modal-card h3 {
  margin: 5px 0;
  color: var(--ink);
  font-size: 20px;
}

.osaka-packing-modal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.osaka-packing-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.osaka-packing-complete-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.osaka-packing-complete-form img {
  grid-column: 1 / -1;
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.osaka-packing-complete-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.osaka-packing-complete-form input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.osaka-packing-complete-form > button,
.osaka-packing-complete-form > .osaka-packing-modal-actions {
  grid-column: 1 / -1;
}

.pick-card-thumb {
  position: relative;
}

.pick-card-item-no {
  position: absolute;
  top: 3px;
  right: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 20px;
  padding: 0 4px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  pointer-events: none;
}

@media (max-width: 960px) {
  .order-sheet-flow,
  .osaka-packing-columns {
    grid-template-columns: 1fr;
  }

  .osaka-packing-order-head,
  .osaka-packing-customer,
  .osaka-packing-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .osaka-packing-order-head > div:last-child {
    justify-content: flex-start;
  }

  .osaka-packing-customer > div:last-child {
    justify-items: start;
  }

  .osaka-packing-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .osaka-packing-item > label,
  .osaka-packing-item > button,
  .packing-item-data-actions {
    grid-column: 2;
  }

  .osaka-packing-removed > div {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .osaka-packing-removed > div small,
  .osaka-packing-removed > div button {
    grid-column: 2;
  }

  .osaka-packing-actions > button {
    width: 100%;
  }

  .osaka-packing-complete-form {
    grid-template-columns: 1fr;
  }

  .osaka-packing-complete-form img,
  .osaka-packing-complete-form > button,
  .osaka-packing-complete-form > .osaka-packing-modal-actions {
    grid-column: 1;
  }

  .osaka-packing-manual-row {
    grid-template-columns: 1fr;
  }

  .osaka-packing-manual-row > button {
    width: 100%;
  }
}

/* Picking staff: post-print product barcode entry. */
.picking-jan-entry-modal.is-hidden,
.picking-jan-entry-scanner.is-hidden,
.picking-jan-entry-form.is-hidden,
.picking-jan-entry-empty.is-hidden,
.picking-jan-entry-button span.is-hidden { display: none; }

.picking-jan-entry-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  color: #fff;
  background: #245edb;
  border: 1px solid #245edb;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.picking-jan-entry-button:hover { background: #1f51bd; }

.picking-jan-entry-button span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  color: #245edb;
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

body.picking-jan-entry-open { overflow: hidden; }

.picking-jan-entry-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 24px;
}

.picking-jan-entry-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(15, 23, 42, 0.48);
  border: 0;
  backdrop-filter: blur(3px);
}

.picking-jan-entry-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1120px, calc(100vw - 48px));
  height: min(760px, calc(100dvh - 48px));
  overflow: hidden;
  color: #172033;
  background: #f5f7fb;
  border: 1px solid #dbe2ee;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.picking-jan-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: #fff;
  border-bottom: 1px solid #dfe5ef;
}

.picking-jan-entry-head > div { min-width: 0; }
.picking-jan-entry-head span {
  display: block;
  margin-bottom: 3px;
  color: #245edb;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}
.picking-jan-entry-head h3 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 900;
}
.picking-jan-entry-head p {
  margin: 4px 0 0;
  color: #647087;
  font-size: 12px;
}
.picking-jan-entry-head > button,
.picking-jan-entry-list-head > button,
.picking-jan-entry-code-actions > button {
  min-height: 36px;
  padding: 7px 12px;
  color: #273248;
  background: #fff;
  border: 1px solid #ccd5e4;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.picking-jan-entry-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #5f6c82;
  background: #eef3ff;
  border-bottom: 1px solid #d7e2f7;
  font-size: 12px;
  font-weight: 800;
}
.picking-jan-entry-steps span { display: inline-flex; align-items: center; gap: 7px; }
.picking-jan-entry-steps b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: #245edb;
  border-radius: 50%;
  font-size: 11px;
}
.picking-jan-entry-steps i { flex: 1; height: 1px; background: #c9d6ef; }

.picking-jan-entry-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
  min-height: 0;
}

.picking-jan-entry-list-pane,
.picking-jan-entry-detail-pane {
  min-width: 0;
  min-height: 0;
  padding: 16px 18px 18px;
}
.picking-jan-entry-list-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: #fff;
  border-right: 1px solid #dfe5ef;
}
.picking-jan-entry-detail-pane { overflow-y: auto; background: #f7f9fc; }

.picking-jan-entry-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.picking-jan-entry-list-head strong { display: block; color: #172033; font-size: 15px; }
.picking-jan-entry-list-head span { display: block; margin-top: 3px; color: #647087; font-size: 12px; }

.picking-jan-entry-search { display: grid; gap: 6px; margin-bottom: 12px; }
.picking-jan-entry-search-tools { margin-bottom: 12px; }
.picking-jan-entry-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.picking-jan-entry-search-row .picking-jan-entry-search { margin-bottom: 0; }
.picking-jan-entry-search-camera {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 118px;
  min-height: 42px;
  padding: 8px 11px;
  color: #245edb;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #b8c7df;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}
.picking-jan-entry-search-camera:hover { background: #f4f7ff; border-color: #8fa8da; }
.picking-jan-entry-search-camera:focus-visible {
  outline: none;
  border-color: #245edb;
  box-shadow: 0 0 0 3px rgba(36, 94, 219, .14);
}
.picking-jan-entry-search-camera svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#picking-jan-entry-search-scanner-slot > .picking-jan-entry-scanner:not(.is-hidden) { margin-top: 8px; }
.picking-jan-entry-search-scan-status {
  margin-top: 8px;
  padding: 8px 10px;
  color: #5f6c82;
  background: #f7f9fc;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}
.picking-jan-entry-search-scan-status.is-hidden { display: none; }
.picking-jan-entry-search-scan-status.is-error { color: #b42318; background: #fff5f4; border-color: #f2c7c2; }
.picking-jan-entry-search-scan-status.is-success { color: #067647; background: #effaf4; border-color: #b7e4cc; }
.picking-jan-entry-search > span,
.picking-jan-entry-code-field > label {
  color: #526079;
  font-size: 12px;
  font-weight: 850;
}
.picking-jan-entry-search input,
.picking-jan-entry-code-field input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  color: #172033;
  background: #fff;
  border: 1px solid #cbd5e3;
  border-radius: 8px;
  outline: none;
}
.picking-jan-entry-search input:focus,
.picking-jan-entry-code-field input:focus {
  border-color: #245edb;
  box-shadow: 0 0 0 3px rgba(36, 94, 219, .14);
}

.picking-jan-entry-list { min-height: 0; overflow-y: auto; padding-right: 4px; }
.picking-jan-entry-product {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 11px;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px;
  color: inherit;
  text-align: left;
  background: #fff;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  cursor: pointer;
}
.picking-jan-entry-product:hover { background: #f7f9fc; }
.picking-jan-entry-product.is-selected {
  background: #edf3ff;
  border-color: #245edb;
  box-shadow: inset 3px 0 0 #245edb;
}
.picking-jan-entry-product.is-manual-required {
  background: #fff7ed;
  border-color: #fdba74;
  box-shadow: inset 3px 0 0 #ea580c;
}
.picking-jan-entry-product.is-manual-required > b {
  color: #9a3412;
  background: #ffedd5;
}
.picking-jan-entry-product img,
.picking-jan-entry-product-image-empty {
  width: 56px;
  height: 56px;
  object-fit: cover;
  background: #edf1f7;
  border-radius: 8px;
}
.picking-jan-entry-product-image-empty { display: grid; place-items: center; color: #718096; font-size: 11px; }
.picking-jan-entry-product-copy { min-width: 0; }
.picking-jan-entry-product-copy strong,
.picking-jan-entry-product-copy span,
.picking-jan-entry-product-copy small { display: block; }
.picking-jan-entry-product-copy strong {
  overflow: hidden;
  color: #1d293d;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picking-jan-entry-product-copy span { margin-top: 4px; color: #58667d; font-size: 12px; }
.picking-jan-entry-product-copy small { margin-top: 5px; color: #7a8699; font-size: 11px; }
.picking-jan-entry-product > b {
  align-self: start;
  padding: 4px 7px;
  color: #245edb;
  background: #e7efff;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.picking-jan-entry-list .empty { margin-top: 24px; }
.picking-jan-entry-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100%;
  padding: 36px;
  text-align: center;
}
.picking-jan-entry-empty > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  color: #245edb;
  background: #e7efff;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
}
.picking-jan-entry-empty strong { color: #273248; }
.picking-jan-entry-empty p { margin: 7px 0 0; color: #718096; font-size: 12px; }

.picking-jan-entry-form { display: grid; gap: 16px; }
.picking-jan-entry-mobile-editbar { display: none; }
.picking-jan-entry-form-title {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  color: #173a75;
  background: #eef4ff;
  border-left: 3px solid #245edb;
  border-radius: 7px;
}
.picking-jan-entry-form-title strong { font-size: 14px; }
.picking-jan-entry-form-title small { color: #526b91; font-size: 11px; line-height: 1.45; }
.picking-jan-entry-selected {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 13px;
  padding: 13px;
  background: #fff;
  border: 1px solid #dce3ed;
  border-radius: 10px;
}
.picking-jan-entry-selected img,
.picking-jan-entry-selected .picking-jan-entry-product-image-empty { width: 72px; height: 72px; }
.picking-jan-entry-selected strong,
.picking-jan-entry-selected span,
.picking-jan-entry-selected small { display: block; }
.picking-jan-entry-selected strong { color: #172033; font-size: 14px; }
.picking-jan-entry-selected span { margin-top: 5px; color: #526079; font-size: 12px; }
.picking-jan-entry-selected small { margin-top: 6px; color: #76849a; font-size: 11px; overflow-wrap: anywhere; }
.picking-jan-entry-selected .picking-jan-entry-selected-order {
  display: grid;
  gap: 3px;
  margin: 8px 0 0;
  padding: 7px 9px;
  background: #eef4ff;
  border-radius: 7px;
}
.picking-jan-entry-selected .picking-jan-entry-selected-order > span {
  margin: 0;
  color: #526b91;
  font-size: 10px;
  font-weight: 850;
}
.picking-jan-entry-selected .picking-jan-entry-selected-order > strong {
  overflow-wrap: anywhere;
  color: #173a75;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.picking-jan-manual-notice {
  display: block;
  margin-top: 8px;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.45;
}
.picking-jan-entry-form.is-manual-required .picking-jan-entry-code-field,
.picking-jan-entry-form.is-manual-required .picking-jan-entry-code-actions,
.picking-jan-entry-form.is-manual-required .picking-jan-entry-scanner,
.picking-jan-entry-form.is-manual-required .picking-jan-entry-savebar {
  display: none;
}

.picking-jan-entry-code-field { display: grid; gap: 7px; }
.picking-jan-entry-code-field input {
  min-height: 54px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: .06em;
}
.picking-jan-inline-scan-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}
.picking-jan-inline-scan-field > button {
  min-width: 72px;
  min-height: 42px;
  padding: 8px 13px;
  color: #fff;
  background: #245edb;
  border: 1px solid #245edb;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}
#picking-jan-entry-code-camera { min-width: 112px; white-space: nowrap; }
.picking-jan-entry-code-help { color: #718096; font-size: 11px; }
.picking-jan-entry-code-actions { display: flex; align-items: center; gap: 10px; }
.picking-jan-entry-code-actions small { color: #718096; }
.picking-jan-entry-scanner {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  background: #111827;
  border-radius: 10px;
}
.picking-jan-entry-scanner video { display: block; width: 100%; height: 220px; object-fit: cover; }
.picking-jan-entry-scanner::after {
  content: "";
  position: absolute;
  inset: 22% 9%;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 9px;
  pointer-events: none;
}
#picking-jan-entry-scanner::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 11%;
  left: 11%;
  height: 2px;
  background: #2f73ff;
  box-shadow: 0 0 9px rgba(47, 115, 255, .9);
  pointer-events: none;
}
.picking-jan-entry-scanner span {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 10px;
  left: 10px;
  padding: 7px 9px;
  color: #fff;
  text-align: center;
  background: rgba(15, 23, 42, .76);
  border-radius: 7px;
  font-size: 11px;
}
.picking-jan-entry-status { min-height: 20px; color: #5f6c82; font-size: 12px; font-weight: 750; }
.picking-jan-entry-status.is-error { color: #b42318; }
.picking-jan-entry-status.is-success { color: #067647; }
.picking-jan-entry-savebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid #dfe5ef;
}
.picking-jan-entry-savebar p { margin: 0; color: #647087; font-size: 11px; line-height: 1.5; }
.picking-jan-entry-savebar button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 18px;
  color: #fff;
  background: #245edb;
  border: 1px solid #245edb;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}
.picking-jan-entry-savebar button:disabled { opacity: .55; cursor: wait; }

@media (max-width: 720px) {
  .picking-jan-entry-button { order: -1; flex: 1 1 auto; justify-content: center; }
  .picking-jan-entry-modal { place-items: stretch; padding: 0; }
  .picking-jan-entry-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .picking-jan-entry-head { padding: 13px 14px; }
  .picking-jan-entry-head p { display: none; }
  .picking-jan-entry-head h3 { font-size: 18px; }
  .picking-jan-entry-steps { gap: 6px; padding: 8px 12px; font-size: 10px; }
  .picking-jan-entry-steps i { min-width: 10px; }
  .picking-jan-entry-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(210px, 46%) minmax(0, 54%);
  }
  [data-picking-jan-panel="missing"] .picking-jan-entry-workspace.has-selection {
    grid-template-rows: minmax(0, 1fr);
  }
  [data-picking-jan-panel="missing"] .picking-jan-entry-workspace.has-selection > .picking-jan-entry-list-pane {
    display: none;
  }
  [data-picking-jan-panel="missing"] .picking-jan-entry-workspace.has-products:not(.has-selection) {
    grid-template-rows: minmax(0, 1fr) auto;
  }
  [data-picking-jan-panel="missing"] .picking-jan-entry-workspace.has-products:not(.has-selection):not(.has-status) > .picking-jan-entry-detail-pane {
    display: none;
  }
  [data-picking-jan-panel="missing"] .picking-jan-entry-workspace.has-products:not(.has-selection) > .picking-jan-entry-detail-pane {
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  [data-picking-jan-panel="missing"] .picking-jan-entry-workspace.has-products:not(.has-selection) > .picking-jan-entry-detail-pane > .picking-jan-entry-empty {
    display: none;
  }
  .picking-jan-entry-list-pane,
  .picking-jan-entry-detail-pane { padding: 12px; }
  .picking-jan-entry-list-pane { border-right: 0; border-bottom: 1px solid #dfe5ef; }
  .picking-jan-entry-product { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 8px; }
  .picking-jan-entry-product img,
  .picking-jan-entry-product-image-empty { width: 48px; height: 48px; }
  .picking-jan-entry-detail-pane { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .picking-jan-entry-form { gap: 10px; }
  .picking-jan-entry-mobile-editbar {
    position: sticky;
    z-index: 5;
    top: -12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -12px -12px 0;
    padding: 8px 12px;
    background: rgba(247, 249, 252, .98);
    border-bottom: 1px solid #d7deea;
    box-shadow: 0 4px 12px rgba(31, 53, 88, .08);
    backdrop-filter: blur(8px);
  }
  .picking-jan-entry-mobile-editbar button {
    flex: 0 0 auto;
    width: auto !important;
    min-height: 42px;
    padding: 8px 12px;
    color: #173a75;
    background: #fff;
    border: 1px solid #b8c7df;
    border-radius: 8px;
    font-weight: 850;
  }
  .picking-jan-entry-mobile-editbar span {
    text-align: right;
    color: #526079;
    font-size: 12px;
    font-weight: 850;
  }
  .picking-jan-entry-form-title {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
  }
  .picking-jan-entry-form-title small { line-height: 1.3; }
  .picking-jan-entry-selected { grid-template-columns: 52px minmax(0, 1fr); gap: 9px; padding: 8px; }
  .picking-jan-entry-selected img,
  .picking-jan-entry-selected .picking-jan-entry-product-image-empty { width: 52px; height: 52px; }
  .picking-jan-entry-selected > div > strong:first-child {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .picking-jan-entry-selected .picking-jan-entry-selected-order {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    padding: 6px 8px;
  }
  .picking-jan-entry-selected .picking-jan-entry-selected-order > strong { font-size: 12px; }
  .picking-jan-entry-code-field input { min-height: 48px; font-size: 18px; }
  .picking-jan-entry-code-help { display: none; }
  .picking-jan-entry-savebar { position: sticky; bottom: 0; padding: 10px 0 0; background: #f7f9fc; }
  .picking-jan-entry-savebar p { display: none; }
  .picking-jan-entry-savebar button { width: 100%; }
}

/* Picking staff: exact wrong-barcode correction after scanning an order. */
.picking-jan-entry-panel.is-hidden,
.picking-jan-correction-order-card.is-hidden { display: none; }

.picking-jan-entry-tabs {
  display: flex;
  gap: 18px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid #dfe5ef;
}

.picking-jan-entry-tabs button {
  min-height: 42px;
  padding: 9px 1px 8px;
  color: #647087;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 850;
  cursor: pointer;
}

.picking-jan-entry-tabs button.is-active {
  color: #172033;
  border-bottom-color: #245edb;
}

.picking-jan-entry-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.picking-jan-correction-workspace .picking-jan-entry-list-pane {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.picking-jan-correction-order-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.picking-jan-correction-order-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.picking-jan-correction-order-field > label {
  color: #526079;
  font-size: 12px;
  font-weight: 850;
}

.picking-jan-correction-order-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  color: #172033;
  background: #fff;
  border: 1px solid #cbd5e3;
  border-radius: 8px;
  outline: none;
}

.picking-jan-correction-order-form input:focus {
  border-color: #245edb;
  box-shadow: 0 0 0 3px rgba(36, 94, 219, .14);
}

.picking-jan-correction-order-form button {
  align-self: end;
  min-height: 42px;
  padding: 8px 13px;
  color: #fff;
  background: #245edb;
  border: 1px solid #245edb;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.picking-jan-correction-order-form button:disabled { opacity: .55; cursor: wait; }
.picking-jan-correction-order-form .picking-jan-inline-scan-field > button { align-self: stretch; }

.picking-jan-correction-order-scanner { margin-bottom: 10px; }

.picking-jan-correction-order-card {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  padding: 9px 11px;
  color: #273248;
  background: #eef3ff;
  border-left: 3px solid #245edb;
}

.picking-jan-correction-order-card strong,
.picking-jan-correction-order-card span,
.picking-jan-correction-order-card small { display: block; }
.picking-jan-correction-order-card span,
.picking-jan-correction-order-card small { color: #647087; font-size: 11px; }

.picking-jan-correction-product.is-disabled {
  cursor: not-allowed;
  opacity: .72;
  background: #f7f8fa;
}

.picking-jan-correction-product.is-disabled > b {
  color: #8a4b0f;
  background: #fff1d6;
}

.picking-jan-correction-product > b {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picking-jan-correction-warning {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  color: #754c00;
  background: #fff8e7;
  border: 1px solid #efcf85;
  border-radius: 8px;
}

.picking-jan-correction-warning strong,
.picking-jan-correction-warning span { display: block; }
.picking-jan-correction-warning span { font-size: 11px; line-height: 1.5; }

.picking-jan-correction-codes {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 10px;
}

.picking-jan-correction-codes > div {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 10px 11px;
  background: #eef1f5;
  border: 1px solid #d7dee8;
  border-radius: 8px;
}

.picking-jan-correction-codes > div span {
  color: #647087;
  font-size: 11px;
  font-weight: 800;
}

.picking-jan-correction-codes > div strong {
  overflow-wrap: anywhere;
  color: #273248;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
}

.picking-jan-correction-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.picking-jan-correction-checks span {
  padding: 4px 8px;
  color: #067647;
  background: #e9f7ef;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .picking-jan-entry-tabs { padding: 0 14px; }
  .picking-jan-entry-panel { min-height: 0; }
  .picking-jan-entry-steps.is-correction {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .picking-jan-entry-steps.is-correction i { display: none; }
  .picking-jan-entry-steps.is-correction span {
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    text-align: center;
  }
  .picking-jan-correction-workspace {
    grid-template-rows: minmax(250px, 48%) minmax(0, 52%);
  }
  .picking-jan-correction-workspace.has-products:not(.has-selection) {
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .picking-jan-correction-workspace.has-products:not(.has-selection) > .picking-jan-entry-detail-pane {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .picking-jan-correction-workspace.has-products:not(.has-selection) > .picking-jan-entry-detail-pane > .picking-jan-entry-empty {
    display: none;
  }
  .picking-jan-correction-order-form { grid-template-columns: 1fr; }
  .picking-jan-correction-order-form button { width: 100%; }
  .picking-jan-correction-codes { grid-template-columns: 1fr; }
  .picking-jan-correction-product > b { max-width: 90px; }
}

/* 2026-08-02: denser desktop purchase list; mobile purchase controls stay unchanged. */
@media (min-width: 1025px) {
  body.purchase-view #purchase-section .purchase-location-nav {
    padding: 8px 12px;
  }

  body.purchase-view #purchase-section .mobile-purchase-page-tabs {
    grid-template-columns: repeat(2, minmax(140px, 180px));
    gap: 6px;
    margin-bottom: 6px;
  }

  body.purchase-view #purchase-section .mobile-purchase-page-tab {
    min-height: 30px;
  }

  body.purchase-view #purchase-section .purchase-location-nav-head {
    flex-wrap: nowrap;
  }

  body.purchase-view #purchase-section .purchase-location-nav-list {
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    grid-template-columns: none;
    gap: 5px;
    margin-top: 6px;
    padding-bottom: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  body.purchase-view #purchase-section .purchase-location-button {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title count";
    gap: 5px;
    min-height: 42px !important;
    padding: 5px 7px !important;
    border-radius: 8px;
    scroll-snap-align: start;
  }

  body.purchase-view #purchase-section .purchase-location-button .purchase-location-title {
    overflow: hidden;
    font-size: 11.5px;
    line-height: 1.2;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.purchase-view #purchase-section .purchase-location-button strong {
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 7px;
    font-size: 15px;
  }

  body.purchase-view #purchase-section .purchase-location-button small,
  body.purchase-view #purchase-section .purchase-location-button em {
    display: none;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact {
    gap: 6px;
    padding: 6px;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action {
    height: 48px !important;
    min-height: 48px !important;
    padding: 5px 8px !important;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric span,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action span {
    font-size: 10px;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric strong,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action strong {
    font-size: 18px;
    line-height: 1.05;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric small,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action small {
    display: none;
  }

  body.purchase-view #purchase-section .purchase-result-grid {
    padding: 8px 12px 12px;
  }

  body.purchase-view #purchase-section .purchase-list-title-row {
    min-height: 34px !important;
    padding: 0 10px !important;
  }

  body.purchase-view #purchase-section .purchase-list-title {
    min-height: 34px !important;
    padding: 0;
    font-size: 14px;
  }

  body.purchase-view #purchase-list {
    height: calc(100vh - 365px);
    min-height: 520px;
    max-height: 720px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] {
    grid-template-columns: 52px minmax(0, 1fr) 58px;
    gap: 10px;
    align-items: start;
    min-height: 0;
    padding: 8px 12px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .product-thumb {
    align-self: start;
    width: 48px;
    height: 48px;
    margin-top: 2px;
    border-radius: 8px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .product-thumb-button,
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .product-thumb img {
    border-radius: 8px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .order-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12.5px;
    line-height: 1.2;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .order-meta,
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .order-context,
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-link {
    margin-top: 2px;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .order-context {
    display: none;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-rollover-hint {
    gap: 4px;
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.1;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-rollover-hint span,
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-rollover-hint em {
    padding: 2px 6px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .product-counts {
    align-self: stretch;
    min-height: 50px;
    padding-left: 6px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .product-counts strong {
    font-size: 20px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .product-counts span {
    font-size: 10px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: none;
    margin-top: 5px;
    padding: 5px 6px;
    border-radius: 8px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin: 0;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-header .purchase-override-label {
    display: none;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-header .purchase-override-status {
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-buttons {
    flex-wrap: nowrap;
    gap: 4px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-button,
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-note-button,
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-save {
    min-height: 28px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 10.5px;
    white-space: nowrap;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .mobile-purchase-move-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-details.is-open {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(220px, auto) minmax(260px, 1fr) auto;
    align-items: end;
    gap: 6px;
    margin-top: 0;
    padding: 7px;
  }
}

/* Picking staff: repurchase request created from a printed order or product barcode. */
.picking-repurchase-modal.is-hidden,
.picking-repurchase-scanner.is-hidden,
.picking-repurchase-form.is-hidden { display: none; }

.picking-repurchase-open {
  min-height: 36px;
  padding: 7px 15px;
  color: #fff;
  background: #c65d12;
  border: 1px solid #c65d12;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}
.picking-repurchase-open:hover { background: #a94d0e; }

body.picking-repurchase-open { overflow: hidden; }
.picking-repurchase-modal {
  position: fixed;
  inset: 0;
  z-index: 1520;
  display: grid;
  place-items: center;
  padding: 24px;
}
.picking-repurchase-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(15, 23, 42, .5);
  border: 0;
  backdrop-filter: blur(3px);
}
.picking-repurchase-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(920px, calc(100vw - 48px));
  height: min(780px, calc(100dvh - 48px));
  overflow: hidden;
  color: #172033;
  background: #f6f7fa;
  border: 1px solid #e2d5c9;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .25);
}
.picking-repurchase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: #fff;
  border-bottom: 1px solid #e7ddd4;
}
.picking-repurchase-head > div { min-width: 0; }
.picking-repurchase-head span {
  display: block;
  margin-bottom: 3px;
  color: #a94d0e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}
.picking-repurchase-head h3 { margin: 0; font-size: 20px; font-weight: 900; }
.picking-repurchase-head p { margin: 4px 0 0; color: #6c7482; font-size: 12px; }
.picking-repurchase-head > button {
  min-height: 36px;
  padding: 7px 12px;
  color: #273248;
  background: #fff;
  border: 1px solid #ccd5e4;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}
.picking-repurchase-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #765237;
  background: #fff3e8;
  border-bottom: 1px solid #efdbc8;
  font-size: 12px;
  font-weight: 850;
}
.picking-repurchase-steps span { display: inline-flex; align-items: center; gap: 7px; }
.picking-repurchase-steps b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: #c65d12;
  border-radius: 50%;
  font-size: 11px;
}
.picking-repurchase-steps i { flex: 1; height: 1px; background: #dfc4ad; }
.picking-repurchase-body {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 20px;
}
.picking-repurchase-scan-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}
.picking-repurchase-scan-form label { display: grid; gap: 6px; min-width: 0; }
.picking-repurchase-scan-form label span {
  color: #526079;
  font-size: 12px;
  font-weight: 850;
}
.picking-repurchase-scan-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 9px 11px;
  color: #172033;
  background: #fff;
  border: 1px solid #cbd5e3;
  border-radius: 8px;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  font-weight: 800;
}
.picking-repurchase-scan-form input:focus {
  border-color: #c65d12;
  box-shadow: 0 0 0 3px rgba(198, 93, 18, .14);
}
.picking-repurchase-scan-form > button {
  align-self: end;
  min-height: 46px;
  padding: 9px 14px;
  color: #fff;
  background: #c65d12;
  border: 1px solid #c65d12;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}
.picking-repurchase-scan-form > button.is-secondary {
  color: #7a3b0c;
  background: #fff;
  border-color: #d7b494;
}
.picking-repurchase-scanner {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  margin-top: 12px;
  background: #111827;
  border-radius: 10px;
}
.picking-repurchase-scanner video { display: block; width: 100%; height: 230px; object-fit: cover; }
.picking-repurchase-scanner::after {
  content: "";
  position: absolute;
  inset: 24% 9%;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 9px;
  pointer-events: none;
}
.picking-repurchase-scanner span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  padding: 7px 9px;
  color: #fff;
  text-align: center;
  background: rgba(15, 23, 42, .78);
  border-radius: 7px;
  font-size: 11px;
}
.picking-repurchase-status {
  min-height: 20px;
  margin: 10px 0;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}
.picking-repurchase-status.is-error { color: #b42318; }
.picking-repurchase-status.is-success { color: #067647; }
.picking-repurchase-orders { display: grid; gap: 8px; margin-bottom: 12px; }
.picking-repurchase-order-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  width: 100%;
  padding: 11px 13px;
  color: #273248;
  text-align: left;
  background: #fff;
  border: 1px solid #dce3ed;
  border-radius: 9px;
  cursor: pointer;
}
.picking-repurchase-order-choice strong { overflow-wrap: anywhere; font-size: 13px; }
.picking-repurchase-order-choice span { color: #a94d0e; font-size: 11px; font-weight: 850; }
.picking-repurchase-order-choice small { grid-column: 1 / -1; color: #667085; font-size: 11px; }
.picking-repurchase-order-choice.is-selected {
  background: #fff6ed;
  border-color: #c65d12;
  box-shadow: inset 3px 0 0 #c65d12;
}
.picking-repurchase-form { display: grid; gap: 12px; }
.picking-repurchase-order-card {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  color: #273248;
  background: #fff3e8;
  border-left: 3px solid #c65d12;
}
.picking-repurchase-order-card strong { font-size: 13px; overflow-wrap: anywhere; }
.picking-repurchase-order-card span { color: #74563e; font-size: 11px; }
.picking-repurchase-products-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.picking-repurchase-products-head strong { font-size: 14px; }
.picking-repurchase-products-head span { color: #717b8c; font-size: 11px; }
.picking-repurchase-products { display: grid; gap: 8px; }
.picking-repurchase-product {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #dce3ed;
  border-radius: 10px;
}
.picking-repurchase-product.is-selected {
  background: #fffaf5;
  border-color: #d79764;
}
.picking-repurchase-product.is-disabled { opacity: .65; }
.picking-repurchase-product > input[type="checkbox"] { width: 20px; height: 20px; accent-color: #c65d12; }
.picking-repurchase-product img,
.picking-repurchase-product-image {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  object-fit: cover;
  color: #7b8493;
  background: #edf1f5;
  border-radius: 8px;
  font-size: 10px;
}
.picking-repurchase-product-copy { min-width: 0; }
.picking-repurchase-product-copy strong,
.picking-repurchase-product-copy span,
.picking-repurchase-product-copy small { display: block; }
.picking-repurchase-product-copy strong {
  overflow: hidden;
  color: #1d293d;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picking-repurchase-product-copy span { margin-top: 3px; color: #58667d; font-size: 12px; }
.picking-repurchase-product-copy small { margin-top: 4px; color: #7a8699; font-size: 11px; }
.picking-repurchase-quantity { display: grid; gap: 4px; color: #687386; font-size: 10px; font-weight: 800; }
.picking-repurchase-quantity input {
  width: 100%;
  min-height: 38px;
  padding: 7px 8px;
  text-align: center;
  border: 1px solid #cbd5e3;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 850;
}
.picking-repurchase-savebar {
  position: sticky;
  bottom: -20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0 20px;
  background: #f6f7fa;
  border-top: 1px solid #dfe5ef;
}
.picking-repurchase-savebar small { color: #687386; line-height: 1.45; }
.picking-repurchase-savebar button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 9px 18px;
  color: #fff;
  background: #c65d12;
  border: 1px solid #c65d12;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}
.picking-repurchase-savebar button:disabled { opacity: .55; cursor: wait; }
.repurchase-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: #8f3d08;
  background: #ffead8;
  border: 1px solid #efc39e;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}
.order-item.is-repurchase { border-left: 4px solid #c65d12; }

/* Keep large purchase lists responsive while preserving the full one-page workflow. */
body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] {
  content-visibility: auto;
  contain-intrinsic-size: auto 126px;
}

.purchase-progressive-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  color: #5e6b80;
  background: #f6f8fb;
  border: 1px solid #dfe5ed;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 720px) {
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] {
    contain-intrinsic-size: auto 372px;
  }

  .picking-repurchase-open { order: -2; flex: 1 1 auto; }
  .picking-repurchase-modal { place-items: stretch; padding: 0; }
  .picking-repurchase-dialog { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .picking-repurchase-head { padding: 13px 14px; }
  .picking-repurchase-head h3 { font-size: 18px; }
  .picking-repurchase-head p { display: none; }
  .picking-repurchase-body { padding: 12px 12px calc(18px + env(safe-area-inset-bottom)); }
  .picking-repurchase-scan-form { grid-template-columns: 1fr 1fr; }
  .picking-repurchase-scan-form label { grid-column: 1 / -1; }
  .picking-repurchase-steps { gap: 5px; padding: 8px 12px; font-size: 10px; }
  .picking-repurchase-steps i { min-width: 8px; }
  .picking-repurchase-product { grid-template-columns: auto 50px minmax(0, 1fr); }
  .picking-repurchase-product img,
  .picking-repurchase-product-image { width: 50px; height: 50px; }
  .picking-repurchase-quantity { grid-column: 3; grid-template-columns: auto 82px; align-items: center; }
  .picking-repurchase-products-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .picking-repurchase-savebar { bottom: calc(-18px - env(safe-area-inset-bottom)); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .picking-repurchase-savebar small { display: none; }
  .picking-repurchase-savebar button { width: 100%; }
}

.procurement-test-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: center;
  margin: 0 0 14px;
  padding: 15px 16px;
  border: 1px solid #a9d7cb;
  border-radius: 14px;
  background: linear-gradient(135deg, #effaf6 0%, #f8fbff 100%);
  box-shadow: 0 8px 22px rgba(35, 83, 76, .08);
}

.procurement-test-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.procurement-test-copy strong { color: #173f3a; font-size: 16px; }
.procurement-test-copy > span:last-child { color: #4f6663; font-size: 12px; line-height: 1.55; }

.procurement-test-kicker {
  color: #0d7668;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
}

.procurement-test-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.procurement-test-actions button {
  min-height: 38px;
  padding: 8px 13px;
  border-color: #0d7668;
  background: #0d7668;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.procurement-test-actions button:hover:not(:disabled) { background: #095e54; }
.procurement-test-actions button:disabled { opacity: .48; cursor: wait; }

.procurement-test-status {
  grid-column: 1 / -1;
  min-height: 20px;
  color: #526a67;
  font-size: 12px;
  font-weight: 800;
}

.procurement-test-status.is-success { color: #087563; }
.procurement-test-status.is-error { color: #b23a2f; }

#yodobashi-main-auto-purchase.is-attention {
  padding: 8px 10px;
  border: 1px solid #e7a59e;
  border-radius: 10px;
  background: #fff6f4;
}

#yodobashi-main-auto-purchase.is-ready {
  padding: 8px 10px;
  border: 1px solid #8bcabe;
  border-radius: 10px;
  background: #f1fbf8;
}

#yodobashi-main-auto-purchase #yodobashi-notification-enable-button.secondary {
  border-color: #8aa29e;
  background: #fff;
  color: #31534e;
}

#yodobashi-main-auto-purchase #yodobashi-notification-enable-button.secondary:hover:not(:disabled) {
  background: #edf6f4;
}

.yodobashi-link-audit {
  flex: 1 0 100%;
  width: 100%;
  max-width: 1180px;
  padding: 10px;
  border: 1px solid #e7a59e;
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.yodobashi-link-audit-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #8f2f27;
  font-size: 12px;
}

.yodobashi-link-audit-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#yodobashi-codex-review-button {
  min-height: 32px;
  padding: 5px 10px;
  border-color: #7563a8;
  background: #66549d;
  color: #fff;
  font-size: 11px;
}

.yodobashi-link-audit-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.yodobashi-link-audit-row {
  display: grid;
  grid-template-columns: 58px minmax(180px, 1fr) minmax(240px, 1.35fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #eadedb;
  border-radius: 8px;
  background: #fffaf9;
}

.yodobashi-link-audit-row.is-codex-exact_match {
  border-color: #9ccfc2;
  background: #f4fbf8;
}

.yodobashi-link-audit-row.is-codex-hold,
.yodobashi-link-audit-row.is-codex-retrying,
.yodobashi-link-audit-row.is-codex-quota_blocked {
  border-color: #dcc58d;
  background: #fffbef;
}

.yodobashi-link-audit-row.is-codex-reject,
.yodobashi-link-audit-row.is-codex-system_error {
  border-color: #e4aaa4;
  background: #fff7f6;
}

.yodobashi-link-audit-image {
  width: 58px;
  height: 58px;
  border: 1px solid #dfd7d4;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
}

.yodobashi-link-audit-image.is-empty {
  display: grid;
  place-items: center;
  color: #9b8f8c;
  font-size: 10px;
}

.yodobashi-link-audit-copy {
  min-width: 0;
  color: #473b39;
  font-size: 11px;
  line-height: 1.4;
}

.yodobashi-link-audit-copy strong,
.yodobashi-link-audit-copy span { display: block; }
.yodobashi-link-audit-copy span { color: #786966; }

.yodobashi-link-audit-copy .yodobashi-codex-review-status {
  margin-top: 3px;
  color: #5e4a91;
  font-weight: 850;
}

.yodobashi-link-audit-copy .yodobashi-codex-review-reason {
  display: -webkit-box;
  overflow: hidden;
  color: #6c625f;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.yodobashi-link-audit-copy .yodobashi-codex-candidate {
  display: inline-block;
  margin-top: 3px;
}

.yodobashi-candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 7px;
  margin-top: 7px;
}

.yodobashi-candidate-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
  padding: 7px;
  border: 1px solid #ddd4d0;
  border-radius: 8px;
  background: #fff;
}

.yodobashi-candidate-card.is-exact_match {
  border-color: #75b9aa;
  background: #f0faf7;
}

.yodobashi-candidate-card.is-selected {
  outline: 3px solid rgba(14, 126, 110, 0.22);
  border-color: #0e7e6e;
}

.yodobashi-candidate-card > img,
.yodobashi-candidate-card > .is-empty {
  width: 68px;
  height: 68px;
  border-radius: 6px;
  background: #f7f4f2;
  object-fit: contain;
}

.yodobashi-candidate-card > .is-empty {
  display: grid;
  place-items: center;
  color: #998e8b;
  font-size: 9px;
}

.yodobashi-candidate-card-copy { min-width: 0; }
.yodobashi-candidate-card-copy b,
.yodobashi-candidate-card-copy em,
.yodobashi-candidate-card-copy span,
.yodobashi-candidate-card-copy small { display: block; }
.yodobashi-candidate-card-copy b {
  overflow: hidden;
  color: #3f3735;
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.yodobashi-candidate-card-copy em {
  margin: 2px 0;
  color: #0b7466;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}
.yodobashi-candidate-card-copy span,
.yodobashi-candidate-card-copy small {
  overflow: hidden;
  color: #756966;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yodobashi-candidate-card-copy div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.yodobashi-candidate-card-copy button {
  min-height: 28px;
  padding: 3px 9px;
  border-color: #0e7e6e;
  background: #0e7e6e;
  color: #fff;
}

.yodobashi-link-audit-row input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid #c9d4d2;
  border-radius: 7px;
  font-size: 12px;
}

.yodobashi-link-audit-row a,
.yodobashi-link-audit-row button {
  white-space: nowrap;
  font-size: 11px;
}

.yodobashi-link-audit-row a {
  color: #0d7668;
  font-weight: 850;
}

@media (max-width: 820px) {
  .yodobashi-link-audit-head { align-items: flex-start; }
  .yodobashi-link-audit-head-actions { align-items: flex-end; flex-direction: column; }
  .yodobashi-link-audit-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .yodobashi-link-audit-image { width: 52px; height: 52px; }
  .yodobashi-link-audit-row input { grid-column: 1 / -1; }
  .yodobashi-link-audit-row > a { grid-column: 2; }
  .yodobashi-candidate-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .procurement-test-panel { grid-template-columns: 1fr; padding: 13px; }
  .procurement-test-actions { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .procurement-test-actions button { width: 100%; min-height: 44px; }
}

/* 2026-08-03: show every purchase location at once and consolidate row actions. */
@media (min-width: 1025px) {
  body.purchase-view #purchase-section .purchase-location-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "tabs head"
      "list list";
    gap: 4px 10px;
    padding: 6px 10px;
  }

  body.purchase-view #purchase-section .mobile-purchase-page-tabs {
    grid-area: tabs;
    grid-template-columns: repeat(2, minmax(112px, 145px));
    gap: 4px;
    margin: 0;
  }

  body.purchase-view #purchase-section .mobile-purchase-page-tab {
    min-height: 27px;
    padding: 0 10px;
    font-size: 11px;
  }

  body.purchase-view #purchase-section .purchase-location-nav-head {
    grid-area: head;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
  }

  body.purchase-view #purchase-section .purchase-location-nav-head strong {
    font-size: 12px;
  }

  body.purchase-view #purchase-section .purchase-location-nav-head span {
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.purchase-view #purchase-section .purchase-location-audit-toggle,
  body.purchase-view #purchase-section .purchase-location-back {
    min-height: 27px;
    padding: 0 9px;
    font-size: 10.5px;
  }

  body.purchase-view #purchase-section .purchase-location-nav-list {
    grid-area: list;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    margin-top: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  body.purchase-view #purchase-section .purchase-location-button {
    min-width: 0;
    min-height: 30px !important;
    padding: 3px 5px !important;
    border-radius: 6px;
    scroll-snap-align: none;
  }

  body.purchase-view #purchase-section .purchase-location-button .purchase-location-title {
    font-size: 10.5px;
  }

  body.purchase-view #purchase-section .purchase-location-button strong {
    min-width: 22px !important;
    min-height: 22px !important;
    padding: 0 4px;
    border-radius: 5px;
    font-size: 12px;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact {
    gap: 4px;
    padding: 4px 6px;
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action {
    height: 40px !important;
    min-height: 40px !important;
    padding: 4px 7px !important;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] {
    grid-template-columns: 62px minmax(0, 1fr) 54px;
    gap: 8px;
    padding: 6px 10px;
    contain-intrinsic-size: auto 88px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .product-thumb {
    width: 58px;
    height: 58px;
    margin-top: 0;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .order-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
    min-width: 0;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .order-main > :not(.purchase-status-panel) {
    grid-column: 1;
    min-width: 0;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .product-counts {
    min-height: 58px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-panel {
    grid-column: 2;
    grid-row: 1 / span 10;
    align-self: center;
    justify-self: end;
    display: grid;
    grid-template-columns: minmax(118px, 1fr) auto;
    gap: 4px;
    width: min(100%, 350px);
    min-width: 290px;
    margin: 0;
    padding: 4px;
    border-radius: 7px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-button,
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-note-button,
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-more-toggle,
  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-save {
    min-height: 27px;
    padding: 0 7px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: #ffffff;
    color: var(--ink);
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-button[data-purchase-status-action="已采购"] {
    border-color: #8bc9bb;
    background: #edf9f5;
    color: #087563;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-more-toggle::after {
    content: " ▾";
    color: #64748b;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-panel.is-secondary-actions-open .purchase-more-toggle::after {
    content: " ▴";
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-secondary-actions {
    grid-column: 1 / -1;
    display: none;
    justify-content: flex-end;
    gap: 4px;
    padding-top: 4px;
    border-top: 1px solid #e3e8ef;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-panel.is-secondary-actions-open .purchase-secondary-actions {
    display: flex;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-secondary-actions .mobile-purchase-move-button {
    min-width: 0;
    margin: 0;
  }

  body.purchase-view #purchase-list .order-item[data-order-mode="purchase"] .purchase-status-details.is-open {
    grid-column: 1 / -1;
    grid-template-columns: 78px minmax(150px, 1fr) auto;
    gap: 5px;
    padding: 5px;
  }
}

@media (max-width: 760px) {
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-secondary-actions {
    display: contents;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-more-toggle {
    display: none !important;
  }

  body.purchase-view .order-item[data-order-mode="purchase"].is-mobile-purchase-detail-open .purchase-secondary-actions {
    display: none;
  }
}
/* Osaka standalone pages mobile fit v1. */
@media screen and (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  :is(.account-shell, .settings-shell) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px 8px 20px !important;
  }

  :is(.account-shell, .settings-shell) :is(
    .topbar,
    .brand-block,
    .top-actions,
    .account-layout,
    .settings-layout,
    .profile-layout,
    .account-panel,
    .account-row,
    .account-edit-options,
    .option-section,
    .option-grid,
    .operation-log-panel,
    .operation-log-filters,
    .operation-log-filter-actions,
    .operation-log-list,
    .operation-log-row
  ) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  :is(.account-shell, .settings-shell) .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  :is(.account-shell, .settings-shell) .brand-block {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
  }

  :is(.account-shell, .settings-shell) .brand-block :is(h1, p) {
    min-width: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  :is(.account-shell, .settings-shell) .top-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  :is(.account-shell, .settings-shell) .top-actions form {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  :is(.account-shell, .settings-shell) .top-actions :is(.plain-link, button) {
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    margin: 0 !important;
    white-space: normal !important;
    text-align: center;
  }

  :is(.account-shell, .settings-shell) :is(input, select, textarea, button, .plain-link) {
    max-width: 100%;
    min-width: 0;
  }

  .account-shell :is(.role-option-card, .option-card, .role-option-content, .option-section summary) {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .operation-log-filter-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .operation-log-filter-actions :is(button, .plain-link) {
    width: 100% !important;
  }

  .operation-log-main,
  .operation-log-main pre {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.login-body {
    width: 100%;
    min-width: 0;
    padding: 8px !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.login-body :is(
    .login-shell,
    .login-panel,
    .login-heading,
    .feishu-login-section,
    .feishu-login-title-row,
    .feishu-authorize-button,
    .feishu-login-status
  ) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.login-body .login-panel {
    gap: 14px;
    padding: 14px;
  }

  body.login-body .login-heading {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
  }

  body.login-body .login-heading > div,
  body.login-body .feishu-login-title-row > div {
    min-width: 0;
  }

  body.login-body .feishu-login-section {
    padding: 10px;
  }

  body.login-body .feishu-login-title-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  body.login-body :is(h1, h2, p, span) {
    overflow-wrap: anywhere;
  }

  body.login-body .feishu-qr {
    width: min(256px, 100%) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    aspect-ratio: 1;
  }
}

/* 2026-08-04: keep the six desktop purchase summary metrics in one fluid row. */
@media screen and (min-width: 1025px) {
  body.purchase-view #purchase-summary-grid.summary-grid.compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric,
  body.purchase-view #purchase-summary-grid.summary-grid.compact .metric-action {
    height: 54px !important;
    min-height: 54px !important;
    overflow: hidden;
  }
}

/* Workflow anomaly detail cards v1: show the exact SKU and related pinmail items. */
.workflow-anomaly-guide {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid #d9e4ea;
  border-radius: 8px;
  background: #f8fbfc;
  color: #526579;
}

.workflow-anomaly-guide strong {
  color: #172331;
  font-size: 16px;
}

.workflow-anomaly-guide small {
  color: #6f5aa5;
  line-height: 1.5;
}

.workflow-anomaly-related {
  display: grid;
  gap: 6px;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid #ded3f4;
  border-radius: 7px;
  background: #f8f5ff;
}

.workflow-anomaly-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workflow-anomaly-related-head b {
  color: #62449a;
  font-size: 11px;
  font-weight: 950;
}

.workflow-anomaly-related-head small,
.workflow-anomaly-related-more {
  color: #806ca8 !important;
  font-size: 10px !important;
  font-weight: 750 !important;
}

.workflow-anomaly-related-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.workflow-anomaly-related-thumb {
  display: grid;
  width: 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #d8cdec;
  border-radius: 6px;
  background: #ffffff;
  color: #62449a;
  font-size: 12px;
  font-weight: 950;
}

.workflow-anomaly-related-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workflow-anomaly-related-item > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-anomaly-related-item strong,
.workflow-anomaly-related-item small {
  display: block !important;
  overflow: hidden !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.workflow-anomaly-related-item strong {
  color: #47356d !important;
  font-size: 11px !important;
}

.workflow-anomaly-related-item small {
  color: #806ca8 !important;
  font-size: 10px !important;
}

@media (min-width: 1024px) {
  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] {
    grid-template-columns: 78px minmax(0, 1fr) 88px;
    grid-template-areas:
      "thumb body stage"
      "thumb body time"
      "alert alert alert"
      "actions actions actions";
    gap: 7px 10px;
    min-height: 126px;
    padding: 11px;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-thumb {
    grid-area: thumb;
    display: block;
    width: 76px;
    height: 76px;
    overflow: hidden;
    align-self: start;
    border: 1px solid #dbe5ea;
    border-radius: 7px;
    background: #eef3f4;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-thumb.is-empty {
    display: grid;
    place-items: center;
    color: #8b2330;
    font-size: 18px;
    font-weight: 950;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-body {
    grid-area: body;
    align-self: start;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-title-line {
    align-items: start;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-title-line strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.35;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-stage {
    grid-area: stage;
    align-self: start;
    justify-self: end;
    min-width: 0;
    max-width: 88px;
    background: #fff0f1;
    color: #a51f2c;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"][data-workflow-anomaly-kind="pinmail"] .workflow-task-stage {
    background: #f2ecff;
    color: #62449a;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"][data-workflow-anomaly-kind="shortage"] .workflow-task-stage {
    background: #fff5e8;
    color: #9a5f16;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-time {
    grid-area: time;
    display: block;
    align-self: start;
    justify-self: end;
    color: #7a8997;
    font-size: 10px;
    font-weight: 800;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-qty {
    display: none;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-alert {
    grid-area: alert;
    width: 100%;
    max-width: none;
    margin-top: 2px;
    border-radius: 7px;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-actions {
    grid-area: actions;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 0;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-secondary {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #b9cbd5;
    border-radius: 7px;
    background: #ffffff;
    color: #244255;
    font-size: 12px;
    font-weight: 900;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-action {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] {
    grid-template-columns: 72px minmax(0, 1fr) 88px;
    grid-template-areas:
      "thumb body stage"
      "thumb body time"
      "alert alert alert"
      "actions actions actions";
    min-height: 120px;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-thumb {
    grid-area: thumb;
    display: block;
    width: 70px;
    height: 70px;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-body {
    grid-area: body;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-stage {
    grid-area: stage;
    justify-self: end;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-time {
    grid-area: time;
    display: block;
    justify-self: end;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-alert {
    grid-area: alert;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-actions {
    grid-area: actions;
    display: grid;
  }
}

@media (max-width: 640px) {
  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] {
    grid-template-columns: 70px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb body stage"
      "thumb body time"
      "alert alert alert"
      "actions actions actions";
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-thumb {
    width: 68px;
    height: 68px;
  }

  body.workflow-view .workflow-task-row[data-workflow-stage="blocked"] .workflow-task-stage {
    max-width: 74px;
  }

  .workflow-anomaly-related-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .workflow-anomaly-related-thumb {
    width: 32px;
    height: 32px;
  }
}
/* 2026-08-04: keep the mobile wrong-barcode workflow readable and scan-first. */
@media (max-width: 720px) {
  .picking-jan-entry-head {
    gap: 10px;
    padding: 9px 12px;
  }

  .picking-jan-entry-head > div {
    flex: 1 1 auto;
  }

  .picking-jan-entry-head span {
    margin-bottom: 1px;
    font-size: 10px;
  }

  .picking-jan-entry-head h3 {
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .picking-jan-entry-head > button {
    flex: 0 0 76px;
    width: 76px !important;
    min-height: 38px;
    padding: 6px 10px;
  }

  .picking-jan-entry-tabs {
    gap: 8px;
    padding: 0 12px;
  }

  .picking-jan-entry-tabs button {
    flex: 1 1 0;
    min-height: 40px;
    padding-top: 7px;
    padding-bottom: 6px;
  }

  .picking-jan-entry-steps.is-correction {
    padding: 6px 10px;
  }

  .picking-jan-entry-steps.is-correction b {
    width: 20px;
    height: 20px;
  }

  .picking-jan-correction-order-form {
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: end;
  }

  .picking-jan-correction-order-form > button[type="submit"] {
    grid-column: 2;
    grid-row: 1;
    width: 76px;
    padding-right: 5px;
    padding-left: 5px;
    white-space: nowrap;
  }

  .picking-jan-correction-product {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 7px 10px;
  }

  .picking-jan-correction-product img,
  .picking-jan-correction-product .picking-jan-entry-product-image-empty {
    width: 52px;
    height: 52px;
  }

  .picking-jan-correction-product .picking-jan-entry-product-copy strong,
  .picking-jan-correction-product .picking-jan-entry-product-copy small {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.35;
    white-space: normal;
    -webkit-box-orient: vertical;
  }

  .picking-jan-correction-product .picking-jan-entry-product-copy strong {
    -webkit-line-clamp: 2;
  }

  .picking-jan-correction-product .picking-jan-entry-product-copy small {
    -webkit-line-clamp: 2;
  }

  .picking-jan-correction-product > b {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    margin-top: -2px;
    overflow: visible;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
  }

  .picking-jan-correction-workspace.has-selection {
    grid-template-rows: 118px minmax(0, 1fr);
    grid-template-rows: clamp(108px, 15dvh, 132px) minmax(0, 1fr);
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-entry-list-head,
  .picking-jan-correction-workspace.has-selection .picking-jan-correction-order-form {
    display: none;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-entry-list-pane {
    padding: 5px 8px 6px;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-correction-order-card {
    margin-bottom: 4px;
    padding: 4px 8px;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-correction-order-card span,
  .picking-jan-correction-workspace.has-selection .picking-jan-correction-order-card small {
    display: none;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-correction-product {
    margin-bottom: 4px;
    padding: 6px 8px;
  }

  .picking-jan-correction-workspace.has-selection #picking-jan-correction-list {
    display: flex;
    flex-direction: column;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-correction-product.is-selected {
    order: -1;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-entry-detail-pane {
    position: relative;
    padding-top: 10px;
    scroll-padding-top: 8px;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-entry-selected {
    display: none;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-correction-codes {
    display: contents;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-entry-code-field {
    position: sticky;
    z-index: 4;
    top: -10px;
    order: -2;
    margin: -10px -12px 0;
    padding: 10px 12px 12px;
    background: rgba(247, 249, 252, .98);
    border: 0;
    border-bottom: 1px solid #c9d5e8;
    border-radius: 0;
    box-shadow: 0 6px 14px rgba(31, 53, 88, .09);
    backdrop-filter: blur(8px);
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-entry-code-field > label::after {
    content: " · 扫描区";
    color: #245edb;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-entry-code-field:focus-within > label::after {
    content: " · 光标已就绪";
  }

  body.picking-view .tencent-shell #picking-section .picking-jan-correction-workspace.has-selection .picking-jan-entry-code-field input {
    min-height: 64px !important;
    background: #fff;
    font-size: 22px !important;
  }

  body.picking-view .tencent-shell #picking-section .picking-jan-correction-workspace.has-selection .picking-jan-entry-code-field .picking-jan-inline-scan-field > button {
    min-width: 86px !important;
    min-height: 64px !important;
    font-size: 15px !important;
  }

  body.picking-view .tencent-shell #picking-section .picking-jan-correction-workspace.has-selection .picking-jan-entry-savebar button {
    min-height: 56px !important;
    font-size: 16px !important;
  }

  .picking-jan-correction-workspace.has-selection .picking-jan-correction-codes > div:first-child {
    order: -1;
  }
}

@media (max-width: 720px) and (max-height: 700px) {
  .picking-jan-correction-workspace.has-selection {
    grid-template-rows: 96px minmax(0, 1fr);
  }
}

/* 其他线上：卡片内人工维护商家编码，紧贴店铺与售价信息。 */
.purchase-shop-source-line-with-code {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  overflow: visible;
  white-space: normal;
}

.purchase-shop-source-separator {
  color: #94a3b8;
}

.purchase-merchant-code-control,
.purchase-merchant-code-readonly {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.purchase-merchant-code-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 220px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #b8d5d0;
  border-radius: 7px;
  background: #f1faf8;
  color: #0f5e57;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-merchant-code-trigger:hover,
.purchase-merchant-code-trigger:focus-visible {
  border-color: #39897f;
  background: #e2f5f0;
  outline: none;
}

.purchase-merchant-code-trigger span {
  flex: 0 0 auto;
  color: #39897f;
  font-size: 12px;
}

.purchase-merchant-code-control.is-empty .purchase-merchant-code-trigger,
.purchase-merchant-code-readonly.is-empty {
  border-color: #d7bd82;
  background: #fff9eb;
  color: #8a5a12;
}

.purchase-merchant-code-readonly {
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid #d7e4e1;
  border-radius: 6px;
  background: #f6fbfa;
  color: #315f5a;
  font-size: 11px;
  font-weight: 800;
}

.purchase-merchant-code-control.is-editing {
  flex-basis: 100%;
}

.purchase-merchant-code-control.is-editing .purchase-merchant-code-trigger {
  display: none;
}

.purchase-merchant-code-editor {
  display: flex;
  align-items: center;
  gap: 5px;
  width: min(100%, 460px);
  padding: 4px;
  border: 1px solid #97c8c0;
  border-radius: 8px;
  background: #f7fcfb;
  box-shadow: 0 5px 12px rgba(15, 94, 87, 0.08);
}

.purchase-merchant-code-editor[hidden] {
  display: none;
}

.purchase-merchant-code-editor input {
  min-width: 120px;
  flex: 1 1 160px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #b8d5d0;
  border-radius: 5px;
  background: #ffffff;
  color: #183b38;
  font: inherit;
  font-size: 12px;
}

.purchase-merchant-code-editor input:focus {
  border-color: #39897f;
  outline: 2px solid rgba(57, 137, 127, 0.16);
  outline-offset: 1px;
}

.purchase-merchant-code-editor button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #39897f;
  border-radius: 5px;
  background: #166f65;
  color: #ffffff;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.purchase-merchant-code-editor [data-purchase-merchant-code-cancel] {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #526273;
}

@media (max-width: 760px) {
  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-shop-source-line-with-code {
    order: 4;
    gap: 3px;
    overflow: visible;
    line-height: 1.3;
    white-space: normal;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-merchant-code-trigger {
    min-height: 25px;
    max-width: min(100%, 230px);
    padding: 3px 7px;
    font-size: 10.5px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-merchant-code-control.is-editing {
    width: 100%;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-merchant-code-editor {
    width: 100%;
    flex-wrap: wrap;
    padding: 5px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-merchant-code-editor input {
    min-width: 0;
    flex-basis: 100%;
    min-height: 34px;
    font-size: 16px;
  }

  body.purchase-view .order-item[data-order-mode="purchase"] .purchase-merchant-code-editor button {
    min-height: 30px;
    padding: 0 11px;
    font-size: 11px;
  }
}

/* Mobile home logout: reuse the existing POST /logout route without duplicating desktop controls. */
.manager-mobile-logout {
  display: none;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body.home-view .manager-dashboard-actions .manager-mobile-logout {
    display: contents;
  }
}

/* Mobile single-customer entry: recognition fills a review form; saving stays explicit. */
.single-customer-panel {
  display: none;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body.workbench-theme .single-customer-panel {
    display: block;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #cdddf0;
    border-radius: 18px;
    background: linear-gradient(155deg, #f8fbff 0%, #ffffff 72%);
    box-shadow: 0 12px 30px rgba(31, 76, 135, 0.09);
  }

  body.workbench-theme .single-customer-head,
  body.workbench-theme .single-customer-result-head,
  body.workbench-theme .single-customer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  body.workbench-theme .single-customer-head > div {
    display: grid;
    gap: 3px;
  }

  body.workbench-theme .single-customer-kicker {
    color: #3e6f9f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  body.workbench-theme .single-customer-head strong {
    color: #17324d;
    font-size: 19px;
    line-height: 1.2;
  }

  body.workbench-theme .single-customer-badge {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: #e8f2ff;
    color: #215b94;
    font-size: 11px;
    font-weight: 800;
  }

  body.workbench-theme .single-customer-raw-field,
  body.workbench-theme .single-customer-fields label {
    display: grid;
    min-width: 0;
    gap: 6px;
    color: #314c68;
    font-size: 12px;
    font-weight: 750;
  }

  body.workbench-theme .single-customer-raw-field {
    margin-top: 14px;
  }

  body.workbench-theme #single-customer-panel .single-customer-raw-field textarea,
  body.workbench-theme #single-customer-panel .single-customer-fields input,
  body.workbench-theme #single-customer-panel .single-customer-fields textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #c7d7e8;
    border-radius: 12px;
    background: #ffffff;
    color: #152c43;
    font: inherit;
    font-size: 16px !important;
    line-height: 1.45;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
  }

  body.workbench-theme .single-customer-raw-field textarea {
    min-height: 142px;
    padding: 12px;
    resize: vertical;
  }

  body.workbench-theme .single-customer-fields input,
  body.workbench-theme .single-customer-fields textarea {
    min-height: 46px;
    padding: 10px 11px;
  }

  body.workbench-theme .single-customer-fields textarea {
    min-height: 78px;
    resize: vertical;
  }

  body.workbench-theme .single-customer-raw-field textarea:focus,
  body.workbench-theme .single-customer-fields input:focus,
  body.workbench-theme .single-customer-fields textarea:focus {
    border-color: #4d8ed0;
    box-shadow: 0 0 0 3px rgba(77, 142, 208, 0.14);
  }

  body.workbench-theme .single-customer-fields .is-invalid {
    border-color: #d92d20;
    background: #fff8f7;
    box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.1);
  }

  body.workbench-theme .single-customer-help,
  body.workbench-theme .single-customer-save-note {
    margin: 8px 0 0;
    color: #657b91;
    font-size: 12px;
    line-height: 1.45;
  }

  body.workbench-theme .single-customer-recognize,
  body.workbench-theme #single-customer-save,
  body.workbench-theme #single-customer-reset {
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
  }

  body.workbench-theme .single-customer-recognize {
    width: 100%;
    margin-top: 12px;
    background: #1f6fb2;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 111, 178, 0.2);
  }

  body.workbench-theme .single-customer-result {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dce7f2;
  }

  body.workbench-theme .single-customer-result[hidden] {
    display: none;
  }

  body.workbench-theme .single-customer-result-head strong {
    color: #17324d;
    font-size: 15px;
  }

  body.workbench-theme .single-customer-result-head span {
    color: #6c8197;
    font-size: 11px;
  }

  body.workbench-theme .single-customer-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 9px;
    margin-top: 12px;
  }

  body.workbench-theme .single-customer-field-wide {
    grid-column: 1 / -1;
  }

  body.workbench-theme .single-customer-actions {
    align-items: stretch;
    margin-top: 14px;
  }

  body.workbench-theme #single-customer-reset {
    flex: 0 0 36%;
    border: 1px solid #c9d7e5;
    background: #ffffff;
    color: #45617d;
  }

  body.workbench-theme #single-customer-save {
    flex: 1 1 auto;
    background: #176b4d;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(23, 107, 77, 0.18);
  }

  body.workbench-theme #single-customer-save:disabled,
  body.workbench-theme .single-customer-recognize:disabled {
    cursor: wait;
    opacity: 0.62;
    box-shadow: none;
  }

  body.workbench-theme .single-customer-status:not(:empty) {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 11px;
    background: #eef4fa;
    color: #365675;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
  }

  body.workbench-theme .single-customer-status.is-error:not(:empty) {
    background: #fff1f0;
    color: #a8261b;
  }

  body.workbench-theme .single-customer-status.is-success:not(:empty) {
    background: #eaf7f1;
    color: #176b4d;
  }
}
