﻿/* โ”€โ”€ Reset โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    :root {
      --bottom-nav-height: 64px;
      --bottom-nav-clearance: calc(var(--bottom-nav-height) + 36px + env(safe-area-inset-bottom, 0px));
      --ci-blue-deep: #0F2A6B;
      --ci-blue: #1D4ED8;
      --ci-blue-sky: #38BDF8;
      --ci-red-deep: #BE123C;
      --ci-red: #EF3B4F;
      --ci-red-soft: #FFE4E6;
      --app-max-width: 760px;
      --app-modal-width: 640px;
      --app-pad-x: clamp(12px, 2.4vw, 20px);
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html,
    body {
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
    }
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Thai', Tahoma, sans-serif;
      background: #F0F2F5;
      min-height: 100dvh;
      padding-bottom: env(safe-area-inset-bottom, 0px);
      color: #1A1A1A;
      -webkit-tap-highlight-color: transparent;
    }
    body > [id^="page"],
    .container,
    .orders-page,
    .so-page,
    .ps-content,
    .ho-page {
      width: 100%;
      max-width: min(var(--app-max-width), 100%);
      margin-left: auto;
      margin-right: auto;
      overflow-x: clip;
    }

    /* โ”€โ”€ Header โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .header {
      width: 100%;
      max-width: min(var(--app-max-width), 100%);
      margin-left: auto;
      margin-right: auto;
      background: linear-gradient(135deg, #0F2A6B 0%, #1D4ED8 100%);
      color: #fff;
      padding: 20px 20px 24px;
      text-align: center;
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: 0 4px 20px rgba(29,78,216,.35);
      min-height: 92px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      overflow: hidden;
    }
    .header::after {
      content: "";
      position: absolute;
      left: 50%;
      right: auto;
      bottom: 0;
      width: min(190px, 42%);
      height: 3px;
      border-radius: 999px 999px 0 0;
      background: linear-gradient(90deg, transparent 0%, #38BDF8 20%, #60A5FA 50%, #38BDF8 80%, transparent 100%);
      box-shadow: 0 0 18px rgba(56,189,248,.34);
      opacity: .55;
      transform: translateX(-50%);
      pointer-events: none;
    }
    .header h1,
    .header p {
      max-width: calc(100% - 156px);
      margin-left: auto;
      margin-right: auto;
    }
    .header h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: .3px; line-height:1.2; }
    .header p  { font-size: .82rem; opacity: .88; margin-top: 3px; line-height:1.35; }
    #menuOpenBtn {
      position:absolute !important;
      left:16px !important;
      top:50% !important;
      transform:translateY(-50%) !important;
      width:44px !important;
      height:44px !important;
    }
    @media (max-width: 420px) {
      .header { padding: 18px 68px 20px; min-height: 88px; }
      .header h1,
      .header p { max-width: 100%; }
      .header h1 { font-size:1.18rem; }
      .header p { font-size:.72rem; }
      #menuOpenBtn { left:14px !important; width:42px !important; height:42px !important; }
      #btnRefreshCache { right:52px !important; }
      .btn-mute { right:14px; }
    }

    /* โ”€โ”€ Container โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .container {
      max-width: min(var(--app-max-width), 100%);
      margin: 0 auto;
      padding: 20px var(--app-pad-x) var(--bottom-nav-clearance);
    }

    /* โ”€โ”€ Scan Button โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .scan-area { text-align: center; padding: 24px 0 16px; }

    .btn-scan {
      background: linear-gradient(135deg, #1D4ED8, #38BDF8);
      color: #fff;
      border: none;
      border-radius: 50%;
      width: 130px;
      height: 130px;
      font-size: .9rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 10px 28px rgba(29,78,216,.45);
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: transform .15s, box-shadow .15s;
      -webkit-user-select: none;
      user-select: none;
    }
    .btn-scan:active {
      transform: scale(.93);
      box-shadow: 0 4px 12px rgba(29,78,216,.4);
    }
    .btn-scan svg { width: 40px; height: 40px; }
    .scan-hint { margin-top: 14px; color: #999; font-size: .82rem; }

    /* โ”€โ”€ Order Scan Button (blue, same shape as btn-scan) โ”€โ”€โ”€โ”€โ”€ */
    .btn-scan-order {
      background: linear-gradient(135deg, #1D4ED8, #3B82F6);
      color: #fff;
      border: none;
      border-radius: 50%;
      width: 130px;
      height: 130px;
      font-size: .9rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 10px 28px rgba(29,78,216,.45);
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: transform .15s, box-shadow .15s;
      -webkit-user-select: none;
      user-select: none;
    }
    .btn-scan-order:active {
      transform: scale(.93);
      box-shadow: 0 4px 12px rgba(29,78,216,.4);
    }
    .btn-scan-order svg { width: 40px; height: 40px; }

    /* โ”€โ”€ Manual Input โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .card {
      background: #fff;
      border-radius: 18px;
      padding: 16px;
      margin-bottom: 14px;
      box-shadow: 0 2px 10px rgba(0,0,0,.07);
    }
    .card-label {
      display: block;
      font-size: .75rem;
      color: #999;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 8px;
    }
    .input-row { display: flex; gap: 8px; }
    .input-text {
      flex: 1;
      border: 1.5px solid #E8E8E8;
      border-radius: 12px;
      padding: 11px 14px;
      font-size: 1rem;
      font-family: inherit;
      color: #1A1A1A;
      outline: none;
      transition: border-color .2s;
      background: #FAFAFA;
    }
    .input-text:focus { border-color: #1D4ED8; background: #fff; }
    /* clear (ร—) button inside input */
    .input-wrap { position:relative; flex:1; display:flex; min-width:0; }
    .input-wrap .input-text { flex:1; padding-right:38px; }
    .input-clear-btn {
      position:absolute; right:9px; top:50%; transform:translateY(-50%);
      width:22px; height:22px; border-radius:50%;
      background:#C4C4C4; color:#fff; border:none;
      font-size:1.1rem; line-height:1; cursor:pointer;
      display:flex; align-items:center; justify-content:center;
      padding:0; flex-shrink:0; z-index:2;
      -webkit-tap-highlight-color:transparent;
    }
    .input-clear-btn:active { background:#9CA3AF; }
    .btn-go {
      background: #D21F32;
      color: #fff;
      border: none;
      border-radius: 12px;
      padding: 11px 18px;
      font-size: .9rem;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      transition: opacity .15s;
    }
    .btn-go:active { background:#B91C2D; opacity: .92; }

    /* โ”€โ”€ Loading โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .loading { display: none; text-align: center; padding: 40px 20px; }
    .spinner {
      width: 44px; height: 44px;
      border: 3px solid #DBEAFE;
      border-top-color: #1D4ED8;
      border-radius: 50%;
      animation: spin .7s linear infinite;
      margin: 0 auto 14px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .loading p { color: #AAA; font-size: .88rem; }

    /* โ”€โ”€ Error โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .error-card {
      display: none;
      background: #EFF6FF;
      border: 1.5px solid #BFDBFE;
      border-radius: 16px;
      padding: 22px 20px;
      text-align: center;
      color: #0F2A6B;
    }
    .error-card .ico { font-size: 2rem; margin-bottom: 8px; }
    .error-card p { font-size: .9rem; }

    /* โ”€โ”€ Product Card โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .product-card {
      display: none;
      background: #fff;
      border-radius: 20px;
      box-shadow: 0 4px 20px rgba(0,0,0,.09);
      overflow: hidden;
      animation: slideUp .3s ease;
    }
    @keyframes slideUp {
      from { opacity: 0; transform: translateY(18px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* Product image */
    .prod-img-wrap {
      background: #F7F7F7;
      height: 170px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }
    .prod-img-wrap img {
      width: 100%; height: 100%;
      object-fit: contain;
    }
    .prod-img-placeholder { font-size: 5rem; color: #DDD; }

    /* Product body */
    .prod-body { padding: 18px 20px; }
    .prod-name {
      font-size: 1.15rem;
      font-weight: 700;
      line-height: 1.4;
      color: #111;
      margin-bottom: 10px;
    }
    .badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
    .badge {
      display: inline-block;
      padding: 3px 11px;
      border-radius: 20px;
      font-size: .75rem;
      font-weight: 700;
    }
    .badge-sku      { background: #DBEAFE; color: #1D4ED8; }
    .badge-barcode  { background: #D1FAE5; color: #0369A1; }
    .badge-code     { background: #DBEAFE; color: #1D4ED8; }
    .badge-shop     { background: #1D4ED8; color: #fff; }
    .prod-price {
      font-size: .82rem;
      color: #AAA;
      margin-bottom: 16px;
    }
    .prod-price strong { color: #1D4ED8; font-size: 1rem; }

    /* โ”€โ”€ Stock grid โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .section-box {
      border-radius: 14px;
      padding: 14px 16px;
      margin-bottom: 12px;
    }
    .section-title {
      font-size: .72rem;
      color: #AAA;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .6px;
      margin-bottom: 12px;
    }
    .box-stock   { background: #F0FDFB; border: 1px solid #CCEDE9; }
    .box-rack    { background: #EFF6FF; border: 1px solid #BFDBFE; }
    .box-wh      { background: #EFF6FF; border: 1px solid #BFDBFE; }

    .stock-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      text-align: center;
    }
    .stock-cell-label { font-size: .68rem; color: #999; margin-bottom: 4px; }
    .stock-cell-val   { font-size: 1.8rem; font-weight: 800; line-height: 1; }
    .val-avail   { color: #0369A1; }
    .val-waiting { color: #1D4ED8; }
    .val-total   { color: #1D4ED8; }

    /* Stock badge color by qty */
    .qty-ok  { color: #0369A1; }
    .qty-low { color: #1D4ED8; }
    .qty-out { color: #1D4ED8; }

    /* โ”€โ”€ Rack โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .rack-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px dashed #BFDBFE;
    }
    .rack-item:last-child { border-bottom: none; padding-bottom: 0; }
    .rack-badge {
      background: #1D4ED8;
      color: #fff;
      padding: 5px 12px;
      border-radius: 22px;
      font-size: .88rem;
      font-weight: 800;
      min-width: 64px;
      text-align: center;
      white-space: normal;
      word-break: break-word;
      box-shadow: 0 2px 8px rgba(29,78,216,.3);
      flex-shrink: 0;
    }
    .rack-detail { flex: 1; min-width: 0; }
    .rack-wh  { font-size: .75rem; color: #6B7280; white-space: normal; word-break: break-word; line-height: 1.4; }
    .rack-lot { font-size: .72rem; color: #BBB; }
    .rack-qty { font-size: .85rem; font-weight: 700; color: #1D4ED8; }
    .rack-none { color: #CCC; font-size: .85rem; text-align: center; padding: 6px 0; }

    /* โ”€โ”€ Warehouse list โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .wh-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #DBEAFE;
      font-size: .86rem;
    }
    .wh-row:last-child { border-bottom: none; padding-bottom: 0; }
    .wh-name { color: #555; }
    .wh-qty  { font-weight: 700; color: #1D4ED8; }

    /* โ”€โ”€ Scanner Modal โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .scanner-modal {
      position: fixed;
      inset: 0;
      background: #000;
      z-index: 9999;
      display: none;
      flex-direction: column;
    }
    .scanner-modal.open { display: flex; }

    .scanner-topbar {
      background: rgba(0,0,0,.75);
      color: #fff;
      padding: 14px 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }
    .scanner-topbar h2 { font-size: 1.05rem; }
    .btn-close {
      background: rgba(255,255,255,.2);
      border: none;
      color: #fff;
      width: 36px; height: 36px;
      border-radius: 50%;
      font-size: 1.2rem;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
    }
    #reader { flex: 1; width: 100%; position: relative; background: #000; }
    /* target เน€เธเธเธฒเธฐ scan_region เนเธกเน force height เธเธ dashboard */
    #reader__scan_region { height: 100% !important; }
    #reader > div:not(#reader__dashboard) { height: 100% !important; }
    /* เธเนเธญเธ built-in UI เธเธญเธ library (เน€เธฃเธฒเธ—เธณ overlay เน€เธญเธ) */
    #reader__dashboard            { display: none !important; }
    #reader__scan_region__diagram { display: none !important; }
    #reader video { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }

    /* Loading overlay เธฃเธฐเธซเธงเนเธฒเธเธฃเธญเธเธฅเนเธญเธเน€เธเธดเธ” */
    .scanner-loading-overlay {
      position: absolute;
      inset: 0;
      background: #111;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      z-index: 20;
      pointer-events: none;
    }
    .scanner-loading-overlay .sl-spinner {
      width: 42px; height: 42px;
      border: 3px solid rgba(255,255,255,.15);
      border-top-color: #1D4ED8;
      border-radius: 50%;
      animation: slSpin .8s linear infinite;
    }
    @keyframes slSpin { to { transform: rotate(360deg); } }
    .scanner-loading-overlay .sl-text {
      color: rgba(255,255,255,.6);
      font-size: .82rem;
    }

    .scanner-tip {
      background: rgba(0,0,0,.7);
      color: rgba(255,255,255,.75);
      text-align: center;
      padding: 12px;
      font-size: .82rem;
      flex-shrink: 0;
    }

    /* Scan line animation */
    .scan-overlay {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 260px;
      height: 150px;
      border: 2px solid rgba(29,78,216,.9);
      border-radius: 10px;
      pointer-events: none;
      z-index: 10000;
    }
    .scan-line {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, #1D4ED8, transparent);
      animation: scanMove 2s linear infinite;
    }
    @keyframes scanMove {
      0%   { top: 0%; }
      50%  { top: 95%; }
      100% { top: 0%; }
    }

    /* โ”€โ”€ Voice Toggle โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .btn-mute {
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(255,255,255,.2);
      border: none;
      color: #fff;
      width: 38px; height: 38px;
      border-radius: 50%;
      font-size: 1.1rem;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: background .2s;
    }
    .btn-mute:active  { background: rgba(255,255,255,.35); }
    .btn-mute.muted   { opacity: .5; }

    /* โ”€โ”€ History โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .history-section { margin-top: 20px; display: none; }
    .history-title {
      font-size: .72rem;
      color: #BBB;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 10px;
      padding-left: 4px;
    }
    .history-item {
      background: #fff;
      border-radius: 14px;
      padding: 11px 13px;
      margin-bottom: 8px;
      display: flex;
      flex-direction: column;
      gap: 0;
      box-shadow: 0 2px 7px rgba(0,0,0,.06);
      cursor: pointer;
      transition: opacity .15s;
    }
    .history-item:active { opacity: .75; }
    .history-name {
      font-weight: 600;
      font-size: .85rem;
      line-height: 1.35;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      flex: 1;
      min-width: 0;
    }
    .history-rack-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 5px;
      margin-top: 6px;
    }
    .history-rack-inline-label {
      font-size: .6rem;
      font-weight: 700;
      color: #1D4ED8;
      letter-spacing: .8px;
      text-transform: uppercase;
      margin-right: 1px;
    }
    .history-rack-pill {
      background: #1D4ED8;
      color: #fff;
      font-weight: 800;
      border-radius: 7px;
      padding: 3px 9px;
      line-height: 1.3;
      box-shadow: 0 1px 4px rgba(29,78,216,.3);
    }
    .history-wh-inline {
      font-size: .68rem;
      color: #6B7280;
      margin-top: 3px;
    }
    .history-sku  { font-size: .72rem; color: #AAA; margin-top: 2px; }
    .history-qty-badge {
      background: #E8F5E9;
      color: #2E7D32;
      font-weight: 700;
      font-size: .8rem;
      padding: 3px 10px;
      border-radius: 20px;
      white-space: nowrap;
    }
    .history-qty-badge.out {
      background: #FFEBEE;
      color: #0F2A6B;
    }
    .history-rack-badge {
      background: #1D4ED8;
      color: #fff;
      font-weight: 800;
      font-size: .78rem;
      padding: 4px 8px;
      border-radius: 8px;
      word-break: normal;
      overflow-wrap: anywhere;
      box-shadow: 0 2px 6px rgba(29,78,216,.3);
      width: 100%;
      text-align: center;
      letter-spacing: 0;
      line-height: 1.35;
      box-sizing: border-box;
    }
    .history-rack-badge.rack-md { font-size: .7rem; }
    .history-rack-badge.rack-lg { font-size: .62rem; letter-spacing: -.2px; }
    .history-rack-wrap {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 3px;
      flex-shrink: 0;
      width: 80px;
    }
    .history-rack-label {
      font-size: .6rem;
      font-weight: 700;
      color: #1D4ED8;
      letter-spacing: .8px;
      text-transform: uppercase;
    }
    .history-rack-badge.no-rack {
      background: #E5E7EB;
      color: #9CA3AF;
      box-shadow: none;
      font-weight: 400;
    }
    .history-wh-name {
      font-size: .62rem;
      color: #6B7280;
      text-align: center;
      max-width: 90px;
      white-space: normal;
      word-break: break-all;
      line-height: 1.3;
    }
    .history-shop-tag {
      font-size: .68rem;
      color: #fff;
      background: #1D4ED8;
      border-radius: 6px;
      padding: 1px 6px;
      font-weight: 600;
      white-space: nowrap;
    }
    .history-no-rack {
      width: 64px;
      flex-shrink: 0;
      text-align: center;
      font-size: .7rem;
      color: #CCC;
    }
    .history-barcode {
      font-size: .72rem;
      color: #AAA;
      font-family: monospace;
    }
    .history-meta-row {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
      margin-top: 4px;
      align-items: center;
    }
    .history-chip {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      font-size: .68rem;
      font-family: monospace;
      background: #F3F4F6;
      color: #374151;
      border: 1px solid #E5E7EB;
      border-radius: 5px;
      padding: 2px 7px;
      cursor: pointer;
      white-space: nowrap;
      max-width: 140px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .history-chip:active { background: #E5E7EB; }
    .history-chip.sku-chip { color: #1D4ED8; border-color: #BFDBFE; background: #EFF6FF; }

    /* โ”€โ”€ Edit Rack Modal โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .rack-edit-modal {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.5);
      z-index: 9998;
      display: none;
      align-items: flex-end;
      justify-content: center;
    }
    .rack-edit-modal.open { display: flex; }
    .rack-edit-sheet {
      background: #fff;
      border-radius: 22px 22px 0 0;
      padding: 24px 20px 36px;
      width: 100%;
      max-width: min(var(--app-modal-width), 100%);
      animation: sheetUp .25s ease;
    }
    @keyframes sheetUp {
      from { transform: translateY(100%); }
      to   { transform: translateY(0); }
    }
    .rack-edit-title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .rack-edit-sub {
      font-size: .78rem;
      color: #AAA;
      margin-bottom: 18px;
    }
    .rack-input-wrap { position: relative; margin-bottom: 10px; }
    .rack-input {
      width: 100%;
      border: 1.5px solid #E8E8E8;
      border-radius: 12px;
      padding: 12px 14px;
      font-size: 1.05rem;
      font-family: monospace;
      color: #1A1A1A;
      outline: none;
      background: #FAFAFA;
      transition: border-color .2s;
      text-transform: uppercase;
    }
    .rack-input:focus { border-color: #1D4ED8; background: #fff; }
    .rack-suggestions {
      background: #fff;
      border: 1px solid #E8E8E8;
      border-radius: 12px;
      max-height: 180px;
      overflow-y: auto;
      box-shadow: 0 4px 14px rgba(0,0,0,.1);
      margin-bottom: 12px;
      display: none;
    }
    .rack-suggestions.open { display: block; }
    .rack-sug-item {
      padding: 11px 16px;
      font-size: .9rem;
      font-family: monospace;
      cursor: pointer;
      border-bottom: 1px solid #F3F4F6;
      transition: background .1s;
    }
    .rack-sug-item:last-child { border-bottom: none; }
    .rack-sug-item:active { background: #EFF6FF; }
    .rack-edit-actions { display: flex; gap: 10px; }
    .btn-rack-cancel {
      flex: 1;
      border: 1.5px solid #E8E8E8;
      border-radius: 12px;
      padding: 13px;
      font-size: .9rem;
      font-weight: 600;
      color: #666;
      background: #fff;
      cursor: pointer;
    }
    .btn-rack-save {
      flex: 2;
      border: none;
      border-radius: 12px;
      padding: 13px;
      font-size: .9rem;
      font-weight: 700;
      color: #fff;
      background: linear-gradient(135deg, #1D4ED8, #3B82F6);
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(29,78,216,.3);
      transition: opacity .15s;
    }
    .btn-rack-save:disabled { opacity: .5; cursor: not-allowed; }
    .btn-rack-scan {
      background: #EFF6FF;
      border: 1.5px solid #BFDBFE;
      color: #1D4ED8;
      border-radius: 10px;
      width: 44px; height: 44px;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      transition: background .15s;
    }
    .btn-rack-scan:active  { background: #DBEAFE; }
    .btn-rack-scan.scanning { background: #1D4ED8; color: #fff; border-color: #1D4ED8; }
    .btn-rack-edit {
      background: none;
      border: 1.5px solid #1D4ED8;
      color: #1D4ED8;
      border-radius: 8px;
      padding: 3px 10px;
      font-size: .75rem;
      font-weight: 700;
      cursor: pointer;
      margin-left: 8px;
      vertical-align: middle;
      transition: background .15s;
    }
    .btn-rack-edit:active { background: #EFF6FF; }

    /* โ”€โ”€ Product List (multiple results) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .product-list {
      display: none;
      background: #fff;
      border-radius: 20px;
      box-shadow: 0 4px 20px rgba(0,0,0,.09);
      overflow: hidden;
      animation: slideUp .3s ease;
    }
    .product-list-title {
      padding: 16px 20px 12px;
      font-size: .75rem;
      color: #AAA;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .5px;
      border-bottom: 1px solid #F3F4F6;
    }
    .product-list-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 20px;
      border-bottom: 1px solid #F3F4F6;
      cursor: pointer;
      transition: background .12s;
    }
    .product-list-item:last-child { border-bottom: none; }
    .product-list-item:active { background: #F0F4FF; }
    .pli-rack {
      background: #1D4ED8;
      color: #fff;
      font-weight: 800;
      font-size: .9rem;
      padding: 5px 12px;
      border-radius: 8px;
      white-space: nowrap;
      min-width: 60px;
      text-align: center;
      flex-shrink: 0;
    }
    .pli-rack.no-rack {
      background: #E5E7EB;
      color: #9CA3AF;
      font-weight: 400;
      font-size: .75rem;
    }
    .pli-info { flex: 1; min-width: 0; }
    .pli-name { font-size: .9rem; font-weight: 600; color: #111; }
    .pli-sub  { font-size: .75rem; color: #AAA; margin-top: 2px; }
    .pli-qty  { font-size: .85rem; font-weight: 700; color: #1D4ED8; flex-shrink: 0; }
    .pli-sku-tag {
      font-size: .72rem; font-weight: 600;
      color: #1D4ED8; background: #DBEAFE;
      padding: 2px 7px; border-radius: 6px; white-space: nowrap;
    }
    .pli-shop-tag {
      font-size: .72rem; font-weight: 700;
      color: #fff; background: #1D4ED8;
      padding: 2px 7px; border-radius: 6px; white-space: nowrap;
    }

    .pli-group-header {
      background: #F0F4FF;
      border-top: 1px solid #BFDBFE;
      border-bottom: 1px solid #BFDBFE;
      padding: 7px 20px;
      font-size: .72rem;
      font-weight: 700;
      color: #1D4ED8;
      text-transform: uppercase;
      letter-spacing: .4px;
    }
    .pli-group-header:first-child { border-top: none; }

    /* โ”€โ”€ Home Screen โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .home-wrap { padding: 16px 0 var(--bottom-nav-clearance); }
    .home-section-label {
      font-size: .68rem; font-weight: 800; color: #9CA3AF;
      letter-spacing: .08em; text-transform: uppercase;
      padding: 0 var(--app-pad-x); margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .home-section-label::before {
      content: "";
      width: 4px;
      height: 16px;
      border-radius: 999px;
      background: var(--ci-blue);
      box-shadow: 0 4px 12px rgba(29,78,216,.18);
      flex-shrink: 0;
    }
    .home-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 18px 14px;
      padding: 0 var(--app-pad-x);
      margin-bottom: 28px;
    }
    @media (max-width: 340px) { .home-grid { grid-template-columns: repeat(3, 1fr); } }
    .home-icon-btn {
      display: flex; flex-direction: column; align-items: center;
      gap: 9px; cursor: pointer; background: none; border: none;
      padding: 0; -webkit-tap-highlight-color: transparent;
      font-family: inherit;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
    }
    .home-icon-btn:active .home-icon-box { transform: scale(.92); }
    .home-icon-box {
      width: clamp(70px, 17vw, 96px); height: clamp(70px, 17vw, 96px); border-radius: 22px;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 14px 28px rgba(15,23,42,.18);
      transition: transform .12s;
    }
    .home-icon-box svg { width: 42px; height: 42px; }
    .home-icon-label {
      font-size: .78rem; font-weight: 800; color: #1F2937;
      text-align: center; line-height: 1.3; max-width: 104px;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    @media (max-width: 420px) {
      .home-grid { gap: 16px 10px; }
      .home-icon-box { width: 70px; height: 70px; border-radius: 18px; }
      .home-icon-box svg { width: 34px; height: 34px; }
      .home-icon-label { font-size: .72rem; max-width: 78px; }
    }
    .home-quick-bar {
      display: flex; gap: 10px; padding: 0 var(--app-pad-x); margin-bottom: 20px;
    }
    .home-quick-card {
      flex: 1; background: #fff; border-radius: 14px;
      padding: 12px 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06);
      border: 1.5px solid #F1F5F9;
      min-width: 0;
    }
    .home-quick-copy { cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .home-quick-copy:active { transform: translateY(1px); background: #F8FAFC; }
    .home-quick-num { font-size: 1.5rem; font-weight: 900; color: #111; line-height: 1; }
    .home-quick-lbl { font-size: .68rem; color: #9CA3AF; font-weight: 600; margin-top: 3px; }
    .home-top-performance {
      margin: -6px var(--app-pad-x) 18px;
      padding: 12px;
      border: 1.5px solid #E2E8F0;
      border-radius: 16px;
      background: #fff;
      box-shadow: 0 8px 22px rgba(15,23,42,.06);
    }
    .home-perf-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 10px;
    }
    .home-perf-head strong {
      display: block;
      font-size: .92rem;
      font-weight: 750;
      color: #0F172A;
      line-height: 1.2;
    }
    .home-perf-head span {
      display: block;
      margin-top: 2px;
      font-size: .68rem;
      font-weight: 600;
      color: #64748B;
    }
    .home-perf-head button {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      flex: 0 0 auto;
      border: 1px solid #BBF7D0;
      background: #F0FDF4;
      color: #047857;
      border-radius: 9px;
      padding: 6px 9px;
      font-family: inherit;
      font-size: .72rem;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
    }
    .home-perf-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .home-perf-col {
      min-width: 0;
      border: 1px solid #EEF2F7;
      border-radius: 12px;
      padding: 9px;
      background: #F8FAFC;
    }
    .home-perf-col-title {
      margin-bottom: 6px;
      font-size: .74rem;
      font-weight: 750;
      color: #1D4ED8;
    }
    .home-perf-row {
      display: grid;
      grid-template-columns: 22px minmax(0, 1fr) auto;
      align-items: center;
      gap: 6px;
      padding: 6px 0;
      border-top: 1px solid #E2E8F0;
    }
    .home-perf-row:first-of-type { border-top: none; }
    .home-perf-rank {
      width: 20px;
      height: 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 7px;
      background: #E0F2FE;
      color: #0369A1;
      font-size: .68rem;
      font-weight: 800;
    }
    .home-perf-name {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: .76rem;
      font-weight: 650;
      color: #111827;
    }
    .home-perf-num {
      color: #0F766E;
      font-size: .78rem;
      font-weight: 800;
      white-space: nowrap;
    }
    .home-perf-num small {
      margin-left: 2px;
      color: #64748B;
      font-size: .65rem;
      font-weight: 600;
    }
    .home-perf-order {
      grid-column: 2 / 4;
      color: #94A3B8;
      font-size: .66rem;
      font-weight: 600;
    }
    .home-perf-empty,
    .home-perf-loading {
      padding: 10px 4px;
      color: #94A3B8;
      font-size: .75rem;
      font-weight: 600;
      text-align: center;
    }
    @media (max-width: 520px) {
      .home-perf-grid { grid-template-columns: 1fr; }
      .home-perf-head { align-items: flex-start; }
    }
    /* โ”€โ”€ Bottom Nav โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .bottom-nav {
      position: fixed;
      bottom: 0; left: 50%; right: auto;
      width: min(var(--app-max-width), 100%);
      transform: translateX(-50%);
      min-height: var(--bottom-nav-height);
      height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
      padding-bottom: env(safe-area-inset-bottom, 0px);
      background: #fff;
      border-top: 1.5px solid #E5E7EB;
      display: flex;
      z-index: 150;
      box-shadow: 0 -2px 14px rgba(0,0,0,.08);
    }
    .nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      background: none;
      border: none;
      cursor: pointer;
      color: #AAA;
      font-size: .64rem;
      font-weight: 700;
      letter-spacing: .1px;
      position: relative;
      padding: 0;
      font-family: inherit;
      -webkit-tap-highlight-color: transparent;
      transition: color .15s;
    }
    .nav-item.active { color: #1D4ED8; }
    .nav-item.active::after {
      content: "";
      position: absolute;
      top: 7px;
      width: 5px;
      height: 5px;
      border-radius: 999px;
      background: var(--ci-blue);
      box-shadow: 0 0 0 3px rgba(29,78,216,.12);
    }
    .nav-item svg { width: 20px; height: 20px; }

    /* Editable menu system */
    .menu-drawer-backdrop {
      position: fixed; inset: 0; z-index: 9100; background: rgba(15,23,42,.42);
      display: none;
    }
    .menu-drawer-backdrop.open { display: block; }
    .menu-drawer {
      position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 340px);
      background: #fff; box-shadow: 8px 0 28px rgba(15,23,42,.18);
      display: flex; flex-direction: column;
    }
    .menu-drawer-head {
      padding: 18px 16px 14px; background: #1E3A8A; color: #fff;
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
    }
    .menu-drawer-title { font-size: 1rem; font-weight: 900; }
    .menu-drawer-close, .menu-drawer-edit {
      border: none; border-radius: 10px; min-height: 36px; padding: 0 12px;
      font-family: inherit; font-weight: 800; cursor: pointer;
    }
    .menu-drawer-close { background: rgba(255,255,255,.15); color: #fff; font-size: 1.1rem; }
    .menu-drawer-edit { background: #EEF2FF; color: #1E3A8A; }
    .menu-drawer-list { padding: 12px; overflow-y: auto; flex: 1; }
    .menu-drawer-item {
      width: 100%; min-height: 46px; border: none; border-radius: 12px;
      background: #F8FAFC; color: #0F172A; display: flex; align-items: center;
      gap: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
      font-family: inherit; font-size: .86rem; font-weight: 800; text-align: left;
    }
    .menu-drawer-item:active { background: #E0F2FE; }
    .menu-drawer-cat {
      font-size: .68rem;
      font-weight: 900;
      color: var(--ci-blue-deep);
      letter-spacing: .08em;
      text-transform: uppercase;
      padding: 10px 8px 6px;
    }
    .menu-dot {
      width: 30px; height: 30px; border-radius: 9px; color: #fff; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 900;
    }
    .menu-dot svg { width: 17px; height: 17px; }
    .home-icon-box { color: #fff; }
    .home-icon-box svg { width: 34px; height: 34px; color: #fff; stroke: currentColor; }
    .menu-manager {
      position: fixed; inset: 0; z-index: 9200; background: rgba(15,23,42,.45);
      display: none; align-items: flex-end;
    }
    .menu-manager.open { display: flex; }
    .menu-manager-panel {
      width: 100%; max-height: 92vh; background: #fff; border-radius: 20px 20px 0 0;
      overflow: hidden; display: flex; flex-direction: column;
    }
    .menu-manager-head {
      padding: 14px 16px; border-bottom: 1px solid #E5E7EB;
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
    }
    .menu-manager-head h3 { margin: 0; font-size: 1rem; color: #111827; }
    .menu-manager-body { padding: 12px 16px 22px; overflow-y: auto; }
    .menu-manager-tabs { display: flex; gap: 7px; margin-bottom: 12px; }
    .menu-manager-tab {
      flex: 1; border: 1.5px solid #CBD5E1; background: #fff; border-radius: 10px;
      padding: 9px 8px; font-size: .78rem; font-weight: 800; color: #475569; cursor: pointer;
    }
    .menu-manager-tab.active { background: #1E3A8A; border-color: #1E3A8A; color: #fff; }
    .menu-form-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
    .menu-form-grid input, .menu-form-grid select {
      width: 100%; box-sizing: border-box; border: 1.5px solid #CBD5E1; border-radius: 10px;
      padding: 10px 11px; font-family: inherit; font-size: .84rem; outline: none;
    }
    .menu-form-grid input:focus, .menu-form-grid select:focus { border-color: #2563EB; }
    .menu-color-row {
      display: grid;
      grid-template-columns: 58px 1fr;
      gap: 8px;
      align-items: stretch;
    }
    .menu-color-picker {
      width: 58px !important;
      height: 44px;
      padding: 4px !important;
      border-radius: 10px;
      cursor: pointer;
      background: #fff;
    }
    .menu-color-picker::-webkit-color-swatch-wrapper { padding: 0; }
    .menu-color-picker::-webkit-color-swatch { border: none; border-radius: 7px; }
    .menu-form-actions { display: flex; gap: 8px; }
    .menu-primary-btn, .menu-secondary-btn, .menu-danger-btn {
      border: none; border-radius: 10px; padding: 10px 12px; font-family: inherit;
      font-size: .82rem; font-weight: 900; cursor: pointer;
    }
    .menu-primary-btn { background: #1D4ED8; color: #fff; }
    .menu-secondary-btn { background: #F1F5F9; color: #334155; }
    .menu-danger-btn { background: #EFF6FF; color: #1D4ED8; }
    .menu-admin-list { margin-top: 12px; display: grid; gap: 8px; }
    .menu-admin-cat {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #1E3A8A;
      font-size: .74rem;
      font-weight: 900;
      padding: 8px 2px 2px;
      letter-spacing: .04em;
    }
    .menu-admin-cat::before {
      content: "";
      width: 4px;
      height: 16px;
      border-radius: 999px;
      background: var(--ci-blue);
      box-shadow: 0 4px 12px rgba(29,78,216,.18);
      flex-shrink: 0;
    }
    .menu-admin-row {
      border: 1.5px solid #E5E7EB; border-radius: 12px; padding: 10px;
      display: flex; align-items: center; gap: 10px; background: #fff;
    }
    .menu-admin-row.off { opacity: .48; }
    .menu-admin-main { flex: 1; min-width: 0; }
    .menu-admin-title { font-size: .86rem; font-weight: 900; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .menu-admin-sub { font-size: .68rem; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
    .menu-admin-actions { display: flex; gap: 5px; flex-shrink: 0; }
    .menu-mini-btn {
      border: none; border-radius: 8px; background: #EEF2FF; color: #4338CA;
      padding: 6px 8px; font-family: inherit; font-size: .72rem; font-weight: 800; cursor: pointer;
    }
    .menu-mini-btn.danger { background: #EFF6FF; color: #1D4ED8; }
    .nav-badge {
      position: absolute;
      top: 6px; right: calc(50% - 22px);
      background: var(--ci-red);
      color: #fff;
      font-size: .58rem;
      font-weight: 700;
      border-radius: 20px;
      padding: 1px 5px;
      min-width: 16px;
      text-align: center;
      line-height: 1.4;
    }

    /* โ”€โ”€ Orders Page โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .orders-page {
      max-width: min(var(--app-max-width), 100%);
      margin: 0 auto;
      padding: 16px var(--app-pad-x) var(--bottom-nav-clearance);
    }
    .orders-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
    }
    .orders-stat { font-size: .8rem; color: #999; }
    .live-dot {
      display: inline-block; width: 8px; height: 8px;
      background: #4ade80; border-radius: 50%;
      animation: livePulse 1.2s ease-in-out infinite;
      flex-shrink: 0;
    }
    @keyframes livePulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: .35; transform: scale(.65); }
    }
    .btn-refresh {
      background: #1D4ED8;
      color: #fff;
      border: none;
      border-radius: 10px;
      padding: 8px 16px;
      font-size: .85rem;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      display: flex; align-items: center; gap: 5px;
      transition: opacity .15s;
    }
    .btn-refresh:active { opacity: .8; }
    .orders-err {
      background: #EFF6FF;
      border: 1px solid #93C5FD;
      border-radius: 12px;
      padding: 14px;
      color: #0F2A6B;
      font-size: .85rem;
      margin-bottom: 12px;
      display: none;
    }
    .orders-loading { text-align: center; padding: 50px 20px; display: none; }
    .orders-empty   { text-align: center; padding: 50px 20px; color: #AAA; font-size: .9rem; display: none; }

    /* โ”€โ”€ Status Tabs โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .status-tabs {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
      padding: 4px 0 12px;
      margin-bottom: 4px;
    }
    .status-tab {
      padding: 8px 4px;
      border-radius: 12px;
      border: 1.5px solid #E5E7EB;
      background: #fff;
      font-size: .72rem;
      font-weight: 700;
      color: #666;
      cursor: pointer;
      font-family: inherit;
      white-space: normal;
      text-align: center;
      line-height: 1.3;
      transition: all .15s;
      min-height: 52px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 3px;
    }
    .status-tab svg { flex-shrink:0; }
    .status-tab.active {
      background: #1D4ED8;
      border-color: #1D4ED8;
      color: #fff;
      box-shadow: 0 8px 18px rgba(29,78,216,.18);
    }
    .status-tab[data-s="express"] {
      color: #047857;
      border-color: #86EFAC;
      background: #F0FDF4;
    }
    .status-tab[data-s="express"].active {
      background: #059669;
      border-color: #059669;
      color: #fff;
    }
    .status-tab[data-s="picklist"] {
      grid-column: 1 / -1;
      background:#1E3A8A !important;
      border-color:#1E3A8A !important;
      color:#fff !important;
    }
    .status-tab .tab-count {
      display: inline-block;
      background: rgba(0,0,0,.12);
      border-radius: 10px;
      padding: 0 5px;
      font-size: .72rem;
      margin-left: 4px;
    }
    .status-tab.active .tab-count { background: rgba(255,255,255,.25); }

    /* โ”€โ”€ Summary Grid โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .summary-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 8px;
    }
    .summary-card {
      background: #fff;
      border-radius: 14px;
      padding: 16px 14px;
      box-shadow: 0 2px 8px rgba(0,0,0,.06);
      cursor: pointer;
      transition: transform .12s, box-shadow .12s;
      border: 2px solid transparent;
    }
    .summary-card:active { transform: scale(.97); }
    .summary-card.has-orders {
      background: linear-gradient(180deg, #F8FBFF 0%, #EEF6FF 100%);
      border-color: #D8E5F5;
      box-shadow: 0 8px 18px rgba(15,42,107,.08);
    }
    .summary-card-count {
      font-size: 1.8rem;
      font-weight: 800;
      color: #1D4ED8;
      line-height: 1;
    }
    .summary-card-count.zero { color: #0369A1; font-size: 1.5rem; }
    .summary-card-name {
      font-size: .8rem;
      color: #666;
      margin-top: 6px;
      font-weight: 600;
    }
    .summary-card-tap {
      font-size: .7rem;
      color: #1D4ED8;
      margin-top: 4px;
    }

    /* โ”€โ”€ Shop summary card โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .shop-sum-card {
      background: #fff;
      border-radius: 14px;
      padding: 14px 14px 10px;
      box-shadow: 0 2px 8px rgba(0,0,0,.06);
    }
    .shop-sum-title {
      font-size: .82rem;
      font-weight: 700;
      color: #374151;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .shop-sum-total {
      font-size: .78rem;
      font-weight: 600;
      color: #1D4ED8;
      background: #DBEAFE;
      border-radius: 8px;
      padding: 2px 9px;
    }
    .shop-sum-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 7px 4px;
      border-bottom: 1px solid #F3F4F6;
      gap: 8px;
    }
    .shop-sum-row:last-child { border-bottom: none; }
    .shop-sum-name {
      font-size: .84rem;
      font-weight: 600;
      color: #111827;
      flex: 1;
      min-width: 0;
    }
    .shop-sum-cnt {
      font-size: .84rem;
      font-weight: 700;
      color: #1D4ED8;
      white-space: nowrap;
    }
    .shop-sum-backlog {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      font-size: .75rem;
      font-weight: 700;
      color: #B45309;
      background: #FEF3C7;
      border-radius: 8px;
      padding: 2px 7px;
      white-space: nowrap;
    }
    .shop-sum-backlog svg { flex-shrink: 0; }

    /* โ”€โ”€ Packed-today card (on summary page) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .pt-card {
      background: #fff;
      border-radius: 14px;
      padding: 14px 14px 10px;
      box-shadow: 0 2px 8px rgba(0,0,0,.06);
    }
    .pt-title {
      font-size: .82rem;
      font-weight: 700;
      color: #374151;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .pt-total-badge {
      font-size: .78rem;
      font-weight: 600;
      background: #D1FAE5;
      color: #0369A1;
      border-radius: 8px;
      padding: 2px 9px;
    }
    .pt-pct-badge {
      font-size: .78rem;
      font-weight: 700;
      border-radius: 8px;
      padding: 2px 8px;
      margin-left: auto;
    }
    .pt-copy-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      border: 1px solid #BBF7D0;
      background: #F0FDF4;
      color: #047857;
      border-radius: 8px;
      padding: 3px 8px;
      font-family: inherit;
      font-size: .72rem;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
    }
    .pt-copy-btn:active { background: #DCFCE7; }
    .pt-row {
      display: flex;
      align-items: center;
      padding: 7px 4px;
      border-bottom: 1px solid #F3F4F6;
      gap: 8px;
    }
    .pt-row:last-child { border-bottom: none; }
    .pt-name {
      font-size: .84rem;
      font-weight: 600;
      color: #111827;
      flex: 1;
      min-width: 0;
    }
    .pt-packed {
      font-size: .84rem;
      font-weight: 700;
      color: #0369A1;
      white-space: nowrap;
    }
    .pt-pct {
      font-size: .75rem;
      font-weight: 700;
      border-radius: 8px;
      padding: 2px 7px;
      white-space: nowrap;
    }
    .pt-pct-good { background: #D1FAE5; color: #0369A1; }
    .pt-pct-warn { background: #FEF3C7; color: #2563EB; }
    .pt-pct-bad  { background: #DBEAFE; color: #1D4ED8; }
    @media (max-width: 520px) {
      .pt-title { flex-wrap: wrap; }
      .pt-pct-badge { margin-left: 0; }
      .pt-copy-btn { margin-left: auto; }
    }

    /* โ”€โ”€ Pack Stat page โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .ps-toolbar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px 14px 0;
    }
    .ps-date-input {
      flex: 1;
      border: 1.5px solid #D1D5DB;
      border-radius: 10px;
      padding: 8px 10px;
      font-size: .85rem;
      color: #111827;
      background: #fff;
      outline: none;
    }
    .ps-date-input:focus { border-color: #1D4ED8; }
    .ps-range-btn {
      background:#F3F4F6; color:#374151; border:1.5px solid #E5E7EB;
      border-radius:20px; padding:5px 14px; font-size:.78rem; font-weight:700;
      cursor:pointer; font-family:inherit; white-space:nowrap;
      -webkit-tap-highlight-color:transparent;
    }
    .ps-range-btn:active, .ps-range-btn.active {
      background:#1D4ED8; color:#fff; border-color:#1D4ED8;
    }
    .ps-btn-load, .ps-btn-copy {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: none;
      border-radius: 10px;
      padding: 8px 14px;
      font-size: .82rem;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
    }
    .ps-btn-load  { background: #1D4ED8; color: #fff; }
    .ps-btn-load:active  { background: #1E40AF; }
    .ps-btn-copy  { background: #0369A1; color: #fff; }
    .ps-btn-copy:active  { background: #047857; }
    .ps-content { padding: 12px 14px var(--bottom-nav-clearance); }
    .ps-empty { color: #9CA3AF; font-size: .85rem; text-align: center; padding: 32px 0; }
    .ps-summary-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      background: #1D4ED8;
      color: #fff;
      border-radius: 12px;
      padding: 12px 16px;
      margin-bottom: 12px;
    }
    .ps-sum-title { font-size: .82rem; font-weight: 600; opacity: .85; }
    .ps-sum-num   { font-size: 1.5rem; font-weight: 900; line-height: 1; }
    .ps-sum-unit  { font-size: .72rem; opacity: .75; }
    .ps-sum-divider { width: 1px; height: 36px; background: rgba(255,255,255,.3); }
    .ps-sum-pct {
      margin-left: auto;
      font-size: 1.2rem;
      font-weight: 800;
    }
    .ps-table-wrap {
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,.06);
      overflow: hidden;
    }
    .ps-table {
      width: 100%;
      border-collapse: collapse;
      font-size: .78rem;
    }
    .ps-table thead th {
      background: #F9FAFB;
      padding: 8px 10px;
      text-align: left;
      font-weight: 700;
      color: #6B7280;
      font-size: .72rem;
      border-bottom: 1px solid #E5E7EB;
    }
    .ps-table thead th.num { text-align: right; }
    .ps-table tbody td {
      padding: 9px 10px;
      border-bottom: 1px solid #F3F4F6;
      color: #111827;
      vertical-align: middle;
    }
    .ps-table tbody tr:last-child td { border-bottom: none; }
    .ps-table tbody tr:nth-child(even) td { background: #F9FAFB; }
    .ps-td-num { text-align: right; font-weight: 600; }
    .ps-td-pct {
      text-align: right;
      font-weight: 700;
    }
    .ps-pct-good { color: #0369A1; }
    .ps-pct-warn { color: #2563EB; }
    .ps-pct-bad  { color: #1D4ED8; }
    .ps-td-name  { font-weight: 600; color: #111827; max-width: 110px; }
    .ps-tfoot td {
      padding: 8px 10px;
      border-top: 2px solid #E5E7EB;
      font-weight: 700;
      font-size: .78rem;
      background: #F3F4F6;
    }
    /* Pack stat โ€” simple shop cards */
    .ps-cards {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 12px;
    }
    .ps-card {
      background: #fff;
      border-radius: 12px;
      padding: 10px 12px 8px;
      box-shadow: 0 1px 6px rgba(0,0,0,.07);
      display: flex;
      flex-direction: column;
      gap: 1px;
    }
    .ps-card-name {
      font-size: .73rem;
      font-weight: 700;
      color: #6B7280;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .ps-card-packed {
      font-size: 1.55rem;
      font-weight: 900;
      color: #111827;
      line-height: 1.1;
    }
    .ps-card-of {
      font-size: .72rem;
      color: #9CA3AF;
      margin-bottom: 3px;
    }
    .ps-card-pct {
      display: inline-block;
      font-size: .72rem;
      font-weight: 700;
      border-radius: 6px;
      padding: 2px 7px;
      align-self: flex-start;
    }
    .ps-card-pct-good { background: #D1FAE5; color: #0369A1; }
    .ps-card-pct-warn { background: #FEF3C7; color: #2563EB; }
    .ps-card-pct-bad  { background: #DBEAFE; color: #1D4ED8; }

    .cutoff-group   { margin-bottom: 16px; }
    .cutoff-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 11px 14px;
      border-radius: 12px 12px 0 0;
      font-weight: 700;
      font-size: .88rem;
    }
    .cutoff-header.normal  { background: #1D4ED8; color: #fff; }
    .cutoff-header.express { background: #1D4ED8; color: #fff; }
    .cutoff-count  { font-size: .78rem; font-weight: 600; opacity: .85; margin-left: 6px; }
    .btn-copy-all {
      background: rgba(255,255,255,.22);
      border: 1px solid rgba(255,255,255,.4);
      border-radius: 8px;
      color: #fff;
      font-size: .75rem;
      font-weight: 700;
      padding: 4px 10px;
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
    }
    .btn-copy-all:active { background: rgba(255,255,255,.4); }
    /* โ”€โ”€ Shop Copy Modal โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    /* โ”€โ”€ Pick Summary Page โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    #pickSummaryModal { display:none; position:fixed; inset:0; z-index:900; }
    .psm-backdrop { display:none; }
    .psm-panel {
      position:absolute; inset:0; top:0;
      background:#F0F9FF; overflow-y:auto;
      display:flex; flex-direction:column;
    }
    .psm-header {
      position:sticky; top:0; z-index:2;
      background:#1D4ED8; color:#fff;
      display:flex; align-items:center; justify-content:space-between;
      padding:14px 16px 12px;
    }
    .psm-header h2 { font-size:1rem; font-weight:800; margin:0; }
    .psm-header-btns { display:flex; gap:8px; }
    .psm-btn-print {
      background:#fff; color:#1D4ED8; border:none;
      border-radius:10px; padding:7px 14px;
      font-size:.82rem; font-weight:700; cursor:pointer;
    }
    .psm-btn-close {
      background:rgba(255,255,255,.2); color:#fff; border:none;
      border-radius:10px; padding:7px 12px;
      font-size:.82rem; font-weight:700; cursor:pointer;
    }
    .psm-progress {
      padding:20px 16px; text-align:center;
      color:#6B7280; font-size:.88rem;
    }
    .psm-progress-bar {
      height:6px; background:#BFDBFE; border-radius:3px;
      margin:10px 16px 0; overflow:hidden;
    }
    .psm-progress-fill { height:100%; background:#1D4ED8; border-radius:3px; transition:width .3s; }
    .psm-shop-block {
      margin:10px 12px 0;
      background:#fff; border-radius:14px;
      border:1.5px solid #BFDBFE; overflow:hidden;
    }
    .psm-shop-header {
      background:#EFF6FF; padding:10px 14px;
      display:flex; align-items:center; justify-content:space-between;
      border-bottom:1px solid #BFDBFE;
      cursor:pointer; user-select:none; -webkit-tap-highlight-color:transparent;
    }
    .psm-shop-header:active { background:#DBEAFE; }
    .psm-shop-block.collapsed .psm-items-table,
    .psm-shop-block.collapsed .psm-shop-meta { display:none; }
    .psm-collapse-icon { font-size:.85rem; color:#1D4ED8; margin-left:4px; transition:transform .2s; }
    .psm-shop-block.collapsed .psm-collapse-icon { transform:rotate(-90deg); }
    .psm-shop-name { font-weight:800; font-size:.92rem; color:#1E40AF; }
    .psm-shop-meta { font-size:.73rem; color:#6B7280; margin-top:2px; }
    .psm-shop-cnt { font-size:.78rem; font-weight:700; color:#1D4ED8; background:#DBEAFE; border-radius:8px; padding:2px 8px; }
    .psm-items-table { width:100%; border-collapse:collapse; }
    .psm-items-table th {
      text-align:left; font-size:.72rem; color:#6B7280; font-weight:600;
      padding:6px 14px 4px; border-bottom:1px solid #E5E7EB;
    }
    .psm-items-table th:last-child { text-align:right; }
    .psm-items-table td {
      padding:7px 14px; font-size:.82rem; color:#111; border-bottom:1px dashed #F3F4F6;
      vertical-align:top;
    }
    .psm-items-table tr:last-child td { border-bottom:none; }
    .psm-items-table td:last-child { text-align:right; font-weight:700; white-space:nowrap; }
    .psm-loading-items { padding:8px 14px; font-size:.78rem; color:#9CA3AF; }
    .psm-total-row { background:#EFF6FF; }
    .psm-total-row td { font-weight:800; font-size:.85rem; color:#1D4ED8; border-top:2px solid #BFDBFE; border-bottom:none !important; }
    /* per-row pick checkbox */
    .psm-pick-cb { width:20px; height:20px; cursor:pointer; accent-color:#1D4ED8; flex-shrink:0; }
    .psm-row-picked td { opacity:.45; text-decoration:line-through; }
    .psm-row-picked .psm-pick-cb { accent-color:#16A34A; }
    /* barcode pill */
    .psm-barcode-pill {
      display:inline-block; font-family:monospace; font-size:.7rem; font-weight:700;
      background:#1D4ED8; color:#fff; border-radius:5px;
      padding:1px 7px; margin-top:3px; letter-spacing:.5px;
    }

    /* Product image popup */
    #psmProductPopup {
      position:fixed; inset:0; z-index:1000; display:none;
      align-items:flex-end; justify-content:center;
    }
    #psmProductPopup.show { display:flex; }
    .ppp-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.55); }
    .ppp-sheet {
      position:relative; z-index:1; width:100%; max-width:min(var(--app-modal-width), 100%);
      background:#fff; border-radius:22px 22px 0 0;
      padding:20px 16px 36px; animation:slideup .25s ease;
    }
    @keyframes slideup {
      from { transform:translateY(100%); opacity:0; }
      to   { transform:translateY(0);    opacity:1; }
    }
    .ppp-close {
      position:absolute; top:14px; right:14px;
      background:#F3F4F6; border:none; border-radius:50%;
      width:30px; height:30px; font-size:.9rem; cursor:pointer;
      display:flex; align-items:center; justify-content:center;
    }
    .ppp-img-wrap {
      width:100%; height:200px; border-radius:14px;
      overflow:hidden; background:#F1F5F9;
      display:flex; align-items:center; justify-content:center;
      margin-bottom:14px;
    }
    .ppp-img-wrap img { width:100%; height:100%; object-fit:contain; }
    .ppp-no-img { font-size:3rem; color:#CBD5E1; }
    .ppp-name  { font-weight:800; font-size:.95rem; color:#111; line-height:1.4; margin-bottom:6px; }
    .ppp-sku   { font-size:.78rem; color:#6B7280; margin-bottom:4px; }
    .ppp-bc    { font-family:monospace; font-size:.8rem; font-weight:700;
                 background:#EFF6FF; color:#1D4ED8; border-radius:7px;
                 padding:4px 10px; display:inline-block; margin-bottom:14px; }
    .ppp-rack  { font-size:.8rem; color:#1E40AF; font-weight:700;
                 background:#DBEAFE; border-radius:8px; padding:5px 12px;
                 margin-bottom:16px; display:inline-block; }
    .ppp-scan-btn {
      width:100%; padding:14px; border:none; border-radius:14px;
      background:#1D4ED8; color:#fff; font-size:.95rem; font-weight:800;
      cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px;
    }
    .ppp-scan-btn:active { background:#1E40AF; }

    /* Print styles for pick summary */
    @media print {
      #psmProductPopup { display:none !important; }
      #pickSummaryModal .psm-panel { position:static; overflow:visible; }
      #pickSummaryModal .psm-header { display:none !important; }
      #pickSummaryModal .psm-btn-print,
      #pickSummaryModal .psm-btn-close,
      #pickSummaryModal .psm-progress,
      #pickSummaryModal .psm-progress-bar { display:none !important; }
      .psm-pick-cb { display:none !important; }
    }

    #shopCopyModal { position:fixed; inset:0; z-index:999; }
    .shop-copy-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.45); }
    .shop-copy-panel {
      position:absolute; bottom:0; left:0; right:0;
      background:#fff; border-radius:20px 20px 0 0;
      padding:20px 16px 40px; max-height:80vh; overflow-y:auto;
    }
    .shop-copy-header {
      display:flex; justify-content:space-between; align-items:center;
      font-weight:700; font-size:.95rem; margin-bottom:14px;
    }
    .shop-copy-header button { background:none; border:none; font-size:1.2rem; cursor:pointer; color:#888; padding:4px; }
    .shop-copy-list { display:flex; flex-direction:column; gap:8px; }
    .shop-copy-item { display:flex; flex-direction:column; gap:7px; padding:12px 14px; background:#F9FAFB; border-radius:12px; }
    .shop-copy-info { display:flex; align-items:baseline; gap:8px; min-width:0; }
    .shop-copy-name { font-weight:700; font-size:.9rem; color:#111; }
    .shop-copy-cnt  { font-size:.75rem; color:#9CA3AF; white-space:nowrap; }
    .btn-copy-shop-pa {
      background:#1D4ED8; color:#fff; border:none; border-radius:10px;
      padding:7px 14px; font-size:.82rem; font-weight:700;
      cursor:pointer; font-family:inherit; white-space:nowrap; flex-shrink:0;
    }
    .btn-copy-shop-pa:active { background:#1E40AF; }
    .btn-print-shop-pa {
      background:#1D4ED8; color:#fff; border:none; border-radius:10px;
      padding:7px 12px; font-size:.82rem; font-weight:700;
      cursor:pointer; font-family:inherit; white-space:nowrap; flex-shrink:0;
    }
    .btn-print-shop-pa:active { background:#1E40AF; }
    .btn-print-shop-pa:disabled { background:#9CA3AF; cursor:not-allowed; }
    .shop-copy-btns { display:flex; gap:6px; flex-wrap:wrap; }

    .btn-copy-template {
      background: #fff;
      border: 1.5px solid #1D4ED8;
      border-radius: 10px;
      color: #1D4ED8;
      padding: 8px 12px;
      font-size: .8rem;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }
    .btn-copy-template:active { background: #EFF6FF; }
    #summaryView {
      display: flex;
      flex-direction: column;
    }
    .summary-copy-bar {
      display: flex !important;
      gap: 8px !important;
      flex-wrap: wrap;
      margin-top: -4px !important;
      margin-bottom: 12px;
    }
    #btnCopySummaryStatus,
    #btnCopySummaryShop,
    .btn-copy-template.btn-copy-line {
      background: #06C755;
      border-color: #06C755;
      color: #fff;
      box-shadow: 0 8px 18px rgba(6,199,85,.22);
      justify-content: center;
    }
    #btnCopySummaryStatus,
    #btnCopySummaryShop {
      flex: 1 1 210px;
    }
    #btnCopySummaryStatus:active,
    #btnCopySummaryShop:active,
    .btn-copy-template.btn-copy-line:active {
      background: #05A948;
    }
    #btnCopySummaryStatus:disabled,
    #btnCopySummaryShop:disabled,
    .btn-copy-template.btn-copy-line:disabled {
      opacity: .82;
      cursor: wait;
    }
    .btn-mini-spinner {
      width: 14px;
      height: 14px;
      border: 2px solid rgba(255,255,255,.45);
      border-top-color: #fff;
      border-radius: 999px;
      animation: spin .8s linear infinite;
      flex: 0 0 auto;
    }
    .order-list {
      background: #fff;
      border-radius: 0 0 12px 12px;
      box-shadow: 0 3px 10px rgba(0,0,0,.07);
      overflow: hidden;
    }
    .order-item { padding:12px 14px; border-bottom:1px solid #E5E7EB; background:#fff; transition:background .15s; }
    .order-item:nth-child(even) { background:#F9FAFB; }
    .order-item:last-child { border-bottom: none; }
    .order-item.oi-selected { background:#EFF6FF !important; border-left:3px solid #1D4ED8; padding-left:11px; }
    /* PA barcode strip */
    .oi-pa-bc-wrap { margin: 0 0 7px; overflow: hidden; }
    .oi-pa-bc-wrap svg { display:block; width:100%; max-height:46px; }
    /* PA โ€” row เธซเธฅเธฑเธ: checkbox + PA button + print button */
    .oi-top-row { display:flex; align-items:center; gap:7px; margin-bottom:4px; }
    .order-select-cb {
      width:20px; height:20px; flex-shrink:0; cursor:pointer;
      accent-color:#1D4ED8; border-radius:4px;
    }
    .btn-copy-pa-main {
      flex:1; min-width:0; text-align:left;
      background:#EFF6FF; border:1.5px solid #BFDBFE; border-radius:10px;
      padding:10px 14px; font-size:1.05rem; font-weight:700;
      font-family:monospace; color:#1D4ED8;
      cursor:pointer; letter-spacing:.5px;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
      min-height:44px; display:flex; align-items:center;
    }
    .btn-copy-pa-main:active { background:#DBEAFE; }
    .btn-order-print {
      flex-shrink:0; background:#1D4ED8; color:#fff; border:none;
      border-radius:10px; padding:8px 11px; font-size:.78rem; font-weight:700;
      cursor:pointer; font-family:inherit; min-height:44px;
      display:flex; align-items:center; gap:4px;
    }
    .btn-order-print:active  { background:#1E40AF; }
    .btn-order-print:disabled { background:#9CA3AF; cursor:not-allowed; }
    .btn-so-lookup {
      flex-shrink:0; background:#D21F32; color:#fff;
      border:1.5px solid #D21F32; border-radius:10px;
      padding:8px 11px; cursor:pointer; min-height:44px;
      display:inline-flex; align-items:center; justify-content:center;
    }
    .btn-so-lookup:active { background:#B91C2D; border-color:#B91C2D; }
    /* Floating select bar */
    #printSelectBar {
      position:fixed; bottom:76px; left:50%; transform:translateX(-50%);
      display:flex; align-items:center; gap:8px;
      background:#1D4ED8; color:#fff;
      border-radius:40px; padding:9px 8px 9px 16px;
      box-shadow:0 4px 24px rgba(0,0,0,.28); z-index:600;
      font-size:.88rem; font-weight:700; white-space:nowrap;
    }
    #printSelectBar .psb-print {
      background:#fff; color:#1D4ED8; border:none;
      border-radius:20px; padding:6px 16px;
      font-size:.82rem; font-weight:700; cursor:pointer;
    }
    #printSelectBar .psb-clear {
      background:rgba(255,255,255,.2); color:#fff; border:none;
      border-radius:20px; padding:6px 12px;
      font-size:.78rem; font-weight:600; cursor:pointer;
    }
    .order-pa-row { display:none; } /* replaced by .oi-top-row */
    /* row เธฃเธญเธ */
    .order-copy-row { display:flex; align-items:center; gap:6px; margin-bottom:5px; }
    .ocr-label { font-size:.7rem; color:#9CA3AF; font-weight:600; width:28px; flex-shrink:0; }
    .btn-copy-val {
      flex:1; min-width:0; text-align:left;
      background:#F9FAFB; border:1px solid #E5E7EB; border-radius:8px;
      padding:8px 10px; font-size:.85rem; font-weight:600; color:#111;
      cursor:pointer; font-family:inherit; min-height:38px;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
      display:flex; align-items:center;
    }
    .btn-copy-val:active { background:#DBEAFE; border-color:#93C5FD; }
    .btn-copy-val-pa  { font-family:monospace; color:#1D4ED8; background:#EFF6FF; border-color:#BFDBFE; }
    .btn-copy-val-ref { font-family:monospace; color:#374151; font-size:.82rem; }
    .order-meta { font-size:.75rem; color:#9CA3AF; margin-top:6px; display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
    .ch-icon { width:16px; height:16px; border-radius:3px; object-fit:contain; flex-shrink:0; }
    .ch-badge { display:inline-flex; align-items:center; gap:3px; font-size:.72rem; font-weight:600; padding:2px 7px; border-radius:6px; }
    .ch-shopee  { background:#FFF1ED; color:#EE4D2D; }
    .ch-lazada  { background:#FFF0FF; color:#0F146D; }
    .ch-tiktok  { background:#F0F0F0; color:#000; }
    .ch-line    { background:#E8F5E9; color:#06C755; }
    .ch-other   { background:#F3F4F6; color:#6B7280; }
    .order-product { font-size: .8rem; color: #374151; margin-top:4px; display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
    .order-product-item { margin-top:5px; }
    .op-name-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
    .op-barcode-row { font-size:.73rem; color:#6B7280; margin-top:2px; }
    .product-name    { color:#111; font-weight:600; font-size:.82rem; flex:1; min-width:120px; }
    .product-barcode { color:#374151; font-family:monospace; font-size:.73rem; }
    .product-qty     { background:#EFF6FF; color:#1D4ED8; font-weight:700; border-radius:6px; padding:1px 7px; font-size:.8rem; white-space:nowrap; }
    .product-loading { color:#9CA3AF; font-size:.77rem; }
    .order-rack { margin-top:5px; display:flex; flex-wrap:wrap; gap:5px; }
    .rack-badge { background:#1D4ED8; color:#fff; border-radius:10px; padding:4px 13px; font-size:.82rem; font-weight:700; display:inline-block; box-shadow:0 1px 4px rgba(29,78,216,.25); }
    .rack-none  { background:#F9FAFB; color:#9CA3AF; border-color:#E5E7EB; }
    .rack-load-btn {
      background: none; border: 1px dashed #9CA3AF; border-radius:9px;
      color:#6B7280; font-size:.8rem; padding:8px 14px; cursor:pointer;
      font-family:inherit; min-height:36px; display:inline-flex; align-items:center;
    }
    .rack-load-btn:active { background:#F3F4F6; }
    .btn-copy-pa {
      flex-shrink: 0;
      background: #F3F4F6;
      border: none;
      border-radius: 8px;
      padding: 7px 12px;
      font-size: .78rem;
      font-weight: 700;
      color: #1D4ED8;
      cursor: pointer;
      font-family: inherit;
      transition: background .15s;
      white-space: nowrap;
    }
    .btn-copy-pa:active { background: #DBEAFE; }
    /* โ”€โ”€ Express Subgroups (status 80) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .express-subgroup { margin-bottom: 14px; }
    .express-subheader {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      background: #1E3A8A;
      color: #fff;
      padding: 10px 14px;
      border-radius: 12px 12px 0 0;
    }
    .express-subname { font-size: .88rem; font-weight: 700; }
    .express-subactions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
    .btn-copy-all-sm {
      background: rgba(255,255,255,.2);
      border: 1px solid rgba(255,255,255,.4);
      border-radius: 8px;
      color: #fff;
      font-size: .75rem;
      font-weight: 700;
      padding: 4px 10px;
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
    }
    .btn-copy-all-sm:active { background: rgba(255,255,255,.4); }

    /* โ”€โ”€ Torch button โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .btn-torch {
      background: rgba(255,255,255,.18);
      border: 1.5px solid rgba(255,255,255,.4);
      color: #fff;
      width: 36px; height: 36px;
      border-radius: 50%;
      font-size: 1.1rem;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: background .2s;
    }
    .btn-torch:active  { background: rgba(255,255,255,.35); }
    .btn-torch.torch-on { background: #F59E0B; border-color: #F59E0B; }

    /* โ”€โ”€ Scanner batch bar โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .scanner-batch-bar {
      background: rgba(29,78,216,.92);
      color: #fff;
      padding: 11px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }
    .scanner-batch-bar .batch-cnt { font-size: .9rem; font-weight: 700; }
    .btn-batch-done {
      background: rgba(255,255,255,.22);
      border: 1px solid rgba(255,255,255,.5);
      border-radius: 10px;
      color: #fff;
      padding: 7px 16px;
      font-size: .85rem;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
    }
    .btn-batch-done:active { background: rgba(255,255,255,.4); }

    /* โ”€โ”€ Batch in-modal scanned list โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .batch-modal-list {
      background: rgba(0,0,0,.55);
      max-height: 130px;
      overflow-y: auto;
      flex-shrink: 0;
      padding: 4px 8px;
    }
    .batch-modal-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 5px 6px;
      border-bottom: 1px solid rgba(255,255,255,.08);
      color: #fff;
    }
    .batch-modal-row:last-child { border-bottom: none; }
    .batch-modal-num {
      font-size: .72rem;
      font-weight: 700;
      color: rgba(255,255,255,.45);
      min-width: 18px;
      text-align: right;
    }
    .batch-modal-bc {
      flex: 1;
      font-size: .8rem;
      font-weight: 600;
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .batch-modal-name {
      font-size: .72rem;
      color: rgba(255,255,255,.6);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 110px;
    }
    .batch-modal-del {
      background: rgba(239,68,68,.7);
      border: none;
      border-radius: 6px;
      color: #fff;
      font-size: .75rem;
      font-weight: 700;
      padding: 3px 8px;
      cursor: pointer;
      flex-shrink: 0;
      font-family: inherit;
    }
    .batch-modal-del:active { background: rgba(185,28,28,.9); }

    /* โ”€โ”€ Batch scan button โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .btn-batch-scan {
      background: linear-gradient(135deg, #1D4ED8, #3B82F6);
      color: #fff;
      border: none;
      border-radius: 16px;
      padding: 11px 22px;
      font-size: .88rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 5px 16px rgba(29,78,216,.35);
      display: inline-flex;
      align-items: center;
      gap: 7px;
      font-family: inherit;
      transition: transform .15s, box-shadow .15s;
      -webkit-user-select: none;
      user-select: none;
    }
    .btn-batch-scan:active { transform: scale(.95); box-shadow: 0 2px 8px rgba(29,78,216,.3); }
    .btn-batch-scan svg { width: 20px; height: 20px; }

    /* โ”€โ”€ Batch panel โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .batch-panel {
      background: #fff;
      border-radius: 18px;
      box-shadow: 0 4px 18px rgba(0,0,0,.09);
      overflow: hidden;
      margin-bottom: 14px;
      animation: slideUp .3s ease;
    }
    .batch-panel-header {
      background: linear-gradient(135deg, #0F2A6B, #1E3A8A);
      color: #fff;
      padding: 13px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .batch-panel-title { font-size: .92rem; font-weight: 700; }
    .batch-panel-actions { display: flex; gap: 7px; }
    .btn-batch-sm {
      background: rgba(255,255,255,.2);
      border: 1px solid rgba(255,255,255,.4);
      border-radius: 8px;
      color: #fff;
      font-size: .78rem;
      font-weight: 700;
      padding: 4px 11px;
      cursor: pointer;
      font-family: inherit;
    }
    .btn-batch-sm:active { background: rgba(255,255,255,.4); }
    .batch-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      border-bottom: 1px solid #F3F4F6;
    }
    .batch-item:last-child { border-bottom: none; }
    .batch-item-img {
      width: 42px; height: 42px;
      border-radius: 8px;
      object-fit: cover;
      background: #F3F4F6;
      flex-shrink: 0;
    }
    .batch-item-info { flex: 1; min-width: 0; }
    .batch-item-name { font-size: .88rem; font-weight: 600; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .batch-item-sub  { font-size: .72rem; color: #9CA3AF; margin-top: 2px; }
    .batch-item-rack {
      font-size: .8rem; font-weight: 700;
      color: #1D4ED8; background: #EFF6FF;
      border-radius: 6px; padding: 3px 9px;
      flex-shrink: 0; white-space: nowrap;
    }
    .batch-item-rack.unset { color: #9CA3AF; background: #F9FAFB; }
    .btn-batch-remove {
      background: none; border: none; color: #1D4ED8;
      font-size: 1.05rem; cursor: pointer; padding: 4px; flex-shrink: 0;
    }
    .batch-assign-row {
      padding: 14px 16px;
      border-top: 1.5px solid #F3F4F6;
    }
    .btn-batch-assign {
      width: 100%;
      background: linear-gradient(135deg, #1D4ED8, #3B82F6);
      color: #fff; border: none; border-radius: 14px;
      padding: 14px; font-size: .95rem; font-weight: 700;
      cursor: pointer; font-family: inherit;
      box-shadow: 0 4px 14px rgba(124,58,237,.3);
      transition: opacity .15s;
    }
    .btn-batch-assign:active   { opacity: .85; }
    .btn-batch-assign:disabled { opacity: .5; cursor: not-allowed; }

    /* โ”€โ”€ Scan Order Page โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .so-page { max-width: min(var(--app-max-width), 100%); margin: 0 auto; padding: 16px var(--app-pad-x) var(--bottom-nav-clearance); }

    .so-loading { text-align:center; padding:40px 20px; display:none; }
    .so-error {
      display:none; background:#EFF6FF; border:1.5px solid #BFDBFE;
      border-radius:16px; padding:18px 20px; text-align:center; color:#0F2A6B;
      font-size:.9rem; margin-bottom:12px;
    }
    .so-empty {
      display:none; text-align:center; padding:40px 20px;
      color:#AAA; font-size:.9rem;
    }
    .so-results { display:none; }
    .so-result-card {
      background:#fff; border-radius:16px;
      box-shadow:0 3px 12px rgba(0,0,0,.08);
      margin-bottom:12px; overflow:hidden;
      animation: slideUp .25s ease;
    }
    .so-result-card.so-card-selected { box-shadow:0 3px 12px rgba(29,78,216,.22); border-left:3px solid #1D4ED8; }
    #soSelectBar {
      position:fixed; bottom:76px; left:50%; transform:translateX(-50%);
      display:flex; align-items:center; gap:8px;
      background:#1D4ED8; color:#fff; border-radius:24px;
      padding:8px 16px; z-index:999;
      font-size:.88rem; font-weight:700; white-space:nowrap;
    }
    #soSelectBar .psb-print { background:#fff; color:#1D4ED8; border:none; border-radius:20px; padding:6px 16px; font-size:.82rem; font-weight:700; cursor:pointer; }
    #soSelectBar .psb-clear { background:rgba(255,255,255,.2); color:#fff; border:none; border-radius:20px; padding:6px 12px; font-size:.82rem; cursor:pointer; }
    .so-select-cb { width:18px; height:18px; accent-color:#1D4ED8; cursor:pointer; flex-shrink:0; }
    .so-card-header {
      display:flex; align-items:center; justify-content:space-between;
      padding:8px 14px 6px;
    }
    .so-status-badge {
      display:inline-flex; align-items:center; gap:5px;
      padding:4px 12px; border-radius:20px;
      font-size:.78rem; font-weight:700;
    }
    .so-status-10 { background:#FEF3C7; color:#92400E; }
    .so-status-20 { background:#E0E7FF; color:#3730A3; }
    .so-status-30 { background:#D1FAE5; color:#065F46; }
    .so-status-40 { background:#DBEAFE; color:#BE123C; }
    .so-status-60 { background:#DBEAFE; color:#1E40AF; }
    .so-status-80 { background:#F3F4F6; color:#374151; }
    .so-card-shop {
      font-size:.8rem; font-weight:700; color:#374151;
      background:#F9FAFB; border-radius:8px; padding:3px 10px;
      max-width:160px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }
    .so-platform-badge {
      display:inline-flex; align-items:center; gap:3px;
      padding:2px 8px; border-radius:6px; font-size:.68rem; font-weight:800;
      letter-spacing:.3px; white-space:nowrap;
    }
    .so-platform-shopee  { background:#FF5722; color:#fff; }
    .so-platform-lazada  { background:#0F146D; color:#fff; }
    .so-platform-tiktok  { background:#111; color:#fff; }
    .so-platform-line    { background:#06C755; color:#fff; }
    .so-platform-website { background:#6366F1; color:#fff; }
    .so-platform-other   { background:#6B7280; color:#fff; }
    .btn-so-line-copy {
      display:inline-flex; align-items:center; gap:4px;
      border:none; border-radius:8px; padding:4px 10px;
      background:#06C755; color:#fff; font-size:.72rem;
      font-weight:900; cursor:pointer; font-family:inherit;
      white-space:nowrap; flex-shrink:0;
    }
    .btn-so-line-copy:active { background:#059A43; }
    .so-card-body { padding:0 14px 10px; }
    .so-pa-btn {
      display:flex; align-items:center; width:100%;
      background:#EFF6FF; border:1.5px solid #BFDBFE; border-radius:10px;
      padding:10px 14px; font-size:1.1rem; font-weight:800;
      font-family:monospace; color:#1D4ED8; letter-spacing:.5px;
      cursor:pointer; margin-bottom:9px; min-height:46px;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }
    .so-pa-btn:active { background:#DBEAFE; }
    .so-meta { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
    .so-meta-item {
      display:inline-flex; align-items:center; gap:4px;
      font-size:.78rem; color:#6B7280;
    }
    .so-meta-item strong { color:#111; font-weight:600; }
    .so-express-tag {
      display:inline-block; background:#DBEAFE; color:#1E40AF;
      border-radius:6px; padding:2px 8px; font-size:.75rem; font-weight:700;
    }
    /* โ”€โ”€ เธชเนเธเธเธญเธญเน€เธ”เธญเธฃเน โ€” camera + items + print โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .so-pa-barcode-wrap { text-align:center; margin:4px 0 6px; }
    .so-pa-barcode-wrap svg { max-width:100%; height:38px; }
    .so-order-info { margin-bottom:6px; }
    .so-info-row { display:flex; gap:6px; align-items:baseline; font-size:.8rem; margin-bottom:2px; }
    .so-info-label { color:#9CA3AF; font-size:.72rem; min-width:44px; }
    .so-info-val { color:#111; font-weight:600; }
    .so-items-section { margin-top:6px; border-top:1px solid #F3F4F6; padding-top:6px; }
    .so-item { padding:6px 0; }
    .so-item + .so-item { border-top:1px dashed #D1D5DB; }
    .so-item-name { font-size:.85rem; font-weight:700; color:#111; margin-bottom:2px; }
    .so-item-sku  { font-size:.75rem; color:#374151; margin-bottom:2px; }
    .so-item-sku strong { color:#1D4ED8; }
    .so-item-bc-label { font-size:.72rem; color:#6B7280; margin-bottom:2px; }
    .so-item-bc-label span { font-family:monospace; color:#374151; }
    .so-bc-copy {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #F3F4F6;
      border: 1px solid #D1D5DB;
      border-radius: 6px;
      padding: 2px 7px;
      cursor: pointer;
      font-family: monospace;
      color: #111827 !important;
      font-size: .8rem;
      user-select: none;
      transition: background .15s;
    }
    .so-bc-copy:active { background: #DBEAFE; border-color: #93C5FD; }
    .so-bc-copy.copied { background: #D1FAE5; border-color: #6EE7B7; color: #065F46 !important; }
    .so-item-barcode-wrap { text-align:left; margin:3px 0 4px; }
    .so-item-barcode-wrap svg { max-width:100%; height:38px; }
    .so-item-photo { margin:0 0 8px; }
    .so-item-photo-img { width:100%; max-width:220px; max-height:220px; object-fit:contain; border-radius:12px; border:1px solid #E5E7EB; background:#F9FAFB; display:block; }
    .so-item-rack { margin-top:3px; display:flex; flex-wrap:wrap; gap:4px; }
    .so-item-qty  { font-size:.75rem; color:#6B7280; margin-top:2px; }
    .so-rack-badge { display:inline-block; background:#D1FAE5; color:#065F46; font-weight:700; font-size:.8rem; border-radius:6px; padding:2px 9px; }
    .so-rack-loading { font-size:.75rem; color:#9CA3AF; }
    .so-print-btn {
      display:flex; align-items:center; justify-content:center; gap:6px;
      width:100%; margin-top:14px; padding:11px;
      border-radius:10px; border:none;
      background:#1D4ED8; color:#fff; font-size:.9rem; font-weight:700;
      cursor:pointer;
    }
    .so-print-btn:active { background:#1E40AF; }
    .so-pack-btn {
      display:flex; align-items:center; justify-content:center; gap:6px;
      width:100%; margin-top:8px; padding:11px;
      border-radius:10px; border:none;
      background:#0369A1; color:#fff; font-size:.9rem; font-weight:700;
      cursor:pointer;
    }
    .so-pack-btn:active { background:#047857; }
    .so-pack-btn:disabled { background:#9CA3AF; cursor:default; }
    .so-zone-badge {
      display:inline-flex; align-items:center; gap:4px;
      background:#FEF3C7; color:#92400E; border:1px solid #FDE68A;
      border-radius:6px; padding:2px 8px; font-size:.75rem; font-weight:700;
    }
    /* โ”€โ”€ Pack Camera (full-screen) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    /* โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
       PACK CAMERA โ€” Professional Packing Station UI
    โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• */
    #packCamModal {
      display:none; position:fixed; inset:0; z-index:1100;
      background:#0a0a0a; flex-direction:row;
    }
    #packCamModal.open { display:flex; }

    /* โ”€โ”€ Left: camera panel (62%) โ”€โ”€ */
    #packCamLeft {
      flex:0 0 62%; position:relative; overflow:hidden;
      display:flex; flex-direction:column; background:#EAF2FF;
    }
    #packCamVideo {
      width:100%; flex:1; object-fit:cover; background:#EAF2FF; display:block;
    }
    #packCamLeft.awaiting-camera #packCamVideo,
    #packCamLeft.camera-error #packCamVideo { opacity:0; }
    /* Top overlay: PA + record badge */
    .pack-cam-overlay {
      position:absolute; top:0; left:0; right:0; z-index:2;
      padding:14px 16px 40px;
      background:linear-gradient(to bottom,rgba(0,0,0,.82) 0%,transparent 100%);
      pointer-events:none;
      display:flex; align-items:flex-start; gap:10px;
    }
    .pack-cam-info { flex:1; }
    .pack-cam-pa   { font-size:1.15rem; font-weight:900; color:#fff; letter-spacing:.5px; font-family:monospace; }
    .pack-cam-shop { font-size:.78rem; color:rgba(255,255,255,.7); margin-top:3px; font-weight:600; }
    .pack-rec-badge {
      display:none; align-items:center; gap:5px;
      background:rgba(29,78,216,.85); border-radius:20px; padding:4px 10px;
      font-size:.7rem; font-weight:800; color:#fff; letter-spacing:.3px; flex-shrink:0;
      transition:background .16s ease, transform .16s ease;
    }
    .pack-rec-badge.pack-photo-flash { background:#16A34A; transform:scale(1.08); }
    .pack-rec-dot {
      width:7px; height:7px; border-radius:50%; background:#fff;
      animation:recPulse 1.2s ease-in-out infinite;
    }
    @keyframes recPulse { 0%,100%{opacity:1} 50%{opacity:.3} }

    /* Bottom bar */
    .pack-cam-bar {
      position:absolute; bottom:0; left:0; right:0; z-index:2;
      padding:16px 20px 24px;
      background:linear-gradient(to top,rgba(0,0,0,.9) 0%,transparent 100%);
      display:flex; align-items:center; justify-content:space-between; gap:12px;
    }
    .pack-cam-skip {
      color:rgba(255,255,255,.8); font-size:.78rem; font-weight:700;
      background:rgba(255,255,255,.12); border:1.5px solid rgba(255,255,255,.25);
      border-radius:28px; padding:9px 18px; cursor:pointer; backdrop-filter:blur(4px);
    }
    .pack-cam-skip:active { background:rgba(255,255,255,.22); }
    .pack-cam-shutter {
      width:68px; height:68px; border-radius:50%;
      background:#fff; border:5px solid rgba(255,255,255,.45);
      box-shadow:0 0 0 4px rgba(255,255,255,.18), 0 4px 20px rgba(0,0,0,.5);
      cursor:pointer; flex-shrink:0;
      display:flex; align-items:center; justify-content:center;
      transition:transform .1s;
    }
    .pack-cam-shutter:active { transform:scale(.88); }
    .pack-cam-close {
      color:rgba(255,255,255,.8); font-size:.78rem; font-weight:700;
      background:rgba(255,255,255,.12); border:1.5px solid rgba(255,255,255,.25);
      border-radius:28px; padding:9px 18px; cursor:pointer; backdrop-filter:blur(4px);
    }
    /* Preview state */
    #packCamCanvas { display:none; width:100%; flex:1; object-fit:contain; }
    .pack-cam-preview-bar {
      display:none; padding:12px 16px 20px;
      background:#111; gap:10px; flex-direction:row; justify-content:center;
    }
    #packCamModal.preview #packCamVideo    { display:none; }
    #packCamModal.preview #packCamCanvas   { display:block; }
    #packCamModal.preview .pack-cam-bar    { display:none; }
    #packCamModal.preview .pack-cam-preview-bar { display:flex; }
    .pack-preview-btn {
      flex:1; max-width:180px; padding:12px; border-radius:14px; border:none;
      font-size:.9rem; font-weight:800; cursor:pointer;
    }
    .pack-cam-state {
      position:absolute; inset:0; z-index:1;
      display:flex; align-items:center; justify-content:center;
      padding:28px; text-align:center;
      background:linear-gradient(180deg,#F8FBFF,#EAF2FF);
      color:#172033;
    }
    .pack-cam-state-box {
      width:min(420px,88%);
      background:#fff;
      border:1px solid #D7E3F6;
      border-radius:18px;
      padding:22px 20px;
      box-shadow:0 18px 44px rgba(15,35,80,.14);
    }
    .pack-cam-state-title { font-size:1.08rem; font-weight:950; margin-bottom:7px; color:#111827; }
    .pack-cam-state-text { font-size:.86rem; font-weight:750; color:#64748B; line-height:1.55; margin-bottom:14px; }
    .pack-cam-state-btn {
      border:none; border-radius:12px; background:#2563EB; color:#fff;
      padding:11px 18px; font-size:.9rem; font-weight:900; cursor:pointer;
      font-family:inherit;
    }
    .pack-cam-state-btn.secondary {
      margin-left:6px;
      background:#EFF6FF;
      color:#1D4ED8;
      border:1px solid #BFDBFE;
    }

    /* โ”€โ”€ Right: items panel (38%) โ€” WHITE โ”€โ”€ */
    #packCamItems {
      flex:0 0 38%; background:#F8FAFC;
      overflow-y:auto; display:flex; flex-direction:column;
      border-left:1px solid #E2E8F0;
    }
    /* Scan bar */
    #packCamScanBar {
      padding:10px 12px 8px; background:#fff;
      border-bottom:1px solid #E2E8F0; flex-shrink:0;
    }
    #packCamScanInput {
      width:100%; background:#F0F9FF;
      border:2px solid #3B82F6; border-radius:10px;
      padding:10px 14px; color:#111; font-size:.95rem;
      font-family:monospace; font-weight:700;
      box-sizing:border-box; outline:none;
      box-shadow:0 0 0 3px rgba(59,130,246,.12);
    }
    #packCamScanInput:focus { border-color:#2563EB; background:#EFF6FF; box-shadow:0 0 0 4px rgba(59,130,246,.18); }
    #packCamScanInput::placeholder { color:#94A3B8; font-weight:500; font-family:inherit; font-size:.85rem; }
    /* Items header */
    .pci-header {
      padding:8px 12px 4px; flex-shrink:0;
      display:flex; align-items:center; justify-content:space-between;
    }
    .pci-title  { font-size:.65rem; font-weight:700; color:#94A3B8; letter-spacing:.6px; text-transform:uppercase; }
    .pci-count  { font-size:.65rem; color:#94A3B8; font-weight:600; }
    /* Items list */
    #packCamItemsList { padding:4px 10px 6px; display:flex; flex-direction:column; gap:8px; }
    .pci-card {
      background:#fff; border:1.5px solid #E2E8F0;
      border-radius:14px; overflow:hidden;
      box-shadow:0 1px 3px rgba(0,0,0,.06);
      transition:border-color .2s, box-shadow .2s;
    }
    .pci-card.pci-missing { border-color:#F59E0B; box-shadow:0 0 0 2px rgba(245,158,11,.16); }
    .pci-card.pci-ok      { border-color:#16A34A; box-shadow:0 0 0 2px rgba(22,163,74,.16); }
    .pci-card.pci-over    { border-color:#DC2626; box-shadow:0 0 0 3px rgba(220,38,38,.16); animation:warnShake .3s; }
    .pci-card.pci-warn    { border-color:#DC2626; box-shadow:0 0 0 3px rgba(220,38,38,.16); animation:warnShake .3s; }
    @keyframes warnShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
    /* Product image โ€” full width on top */
    .pci-img-wrap {
      width:100%; aspect-ratio:4/3; background:#F1F5F9; overflow:hidden;
      display:flex; align-items:center; justify-content:center;
    }
    .pci-thumb {
      width:100%; height:100%; object-fit:cover; display:block;
    }
    .pci-thumb-placeholder {
      font-size:3rem; color:#CBD5E1;
    }
    /* Product info row */
    .pci-body {
      padding:10px 12px 10px;
    }
    .pci-name {
      font-size:.82rem; color:#0F172A; font-weight:700;
      line-height:1.4; word-break:break-word;
      display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
    }
    .pci-sku {
      font-size:.68rem; color:#64748B; margin-top:3px;
      font-family:monospace; letter-spacing:.2px;
    }
    .pci-footer {
      display:flex; align-items:center; justify-content:space-between;
      margin-top:6px;
    }
    .pci-qty {
      background:#1D4ED8; color:#fff; border-radius:8px;
      padding:3px 12px; font-size:.82rem; font-weight:900;
    }
    .pci-qty.pci-qty-missing { background:#F59E0B; color:#111827; }
    .pci-qty.pci-qty-ok { background:#16A34A; }
    .pci-qty.pci-qty-over { background:#DC2626; }
    .pci-scan-status { font-size:.7rem; font-weight:700; color:#94A3B8; }
    .pci-card.pci-missing .pci-scan-status { color:#B45309; }
    .pci-card.pci-ok .pci-scan-status { color:#15803D; }
    .pci-card.pci-over .pci-scan-status { color:#DC2626; }

    /* โ”€โ”€ Inline pack form โ”€โ”€ */
    #packCamForm {
      margin:0 10px 4px; background:#fff;
      border:1.5px solid #E2E8F0; border-radius:14px;
      overflow:hidden; flex-shrink:0;
    }
    .pcf-head {
      padding:8px 12px; background:#F8FAFC;
      border-bottom:1px solid #E2E8F0;
      display:flex; align-items:center; justify-content:space-between; cursor:pointer;
    }
    .pcf-title { font-size:.72rem; font-weight:800; color:#374151; letter-spacing:.3px; }
    .pcf-toggle { font-size:.7rem; color:#6B7280; }
    .pcf-body { padding:10px 12px 12px; display:none; }
    .pcf-body.open { display:block; }
    .pcf-row { display:flex; gap:6px; margin-bottom:6px; flex-wrap:wrap; }
    .pcf-field { flex:1; min-width:72px; }
    .pcf-label { font-size:.62rem; color:#6B7280; font-weight:700; display:block; margin-bottom:3px; }
    .pcf-input {
      width:100%; padding:6px 8px; border:1.5px solid #E5E7EB; border-radius:8px;
      font-size:.85rem; font-weight:700; color:#111; font-family:inherit;
      box-sizing:border-box; background:#fff;
    }
    .pcf-input:focus { border-color:#3B82F6; outline:none; background:#EFF6FF; }
    .pcf-package-scan {
      margin-bottom:6px;
      background:#fff;
      border-color:#CBD5E1;
    }
    .pcf-scan-error {
      border-color:#DC2626 !important;
      background:#FEF2F2 !important;
      box-shadow:0 0 0 3px rgba(220,38,38,.14);
    }
    .pcf-package-picker {
      background:#F8FAFC;
      border:1px solid #E2E8F0;
      border-radius:12px;
      padding:8px;
      margin-bottom:8px;
    }
    .pcf-package-top {
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:8px;
      margin-bottom:6px;
    }
    .pcf-package-count {
      font-size:.62rem;
      font-weight:800;
      color:#64748B;
      white-space:nowrap;
    }
    .pcf-select {
      width:100%;
      border:1.5px solid #CBD5E1;
      border-radius:10px;
      background:#fff;
      color:#111827;
      font-family:inherit;
      font-size:.82rem;
      font-weight:800;
      padding:8px 10px;
      outline:none;
    }
    .pcf-select:focus { border-color:#2563EB; box-shadow:0 0 0 3px rgba(37,99,235,.12); }
    .pcf-package-hint {
      display:flex;
      flex-wrap:wrap;
      gap:5px;
      margin-top:7px;
      color:#475569;
      font-size:.68rem;
      font-weight:750;
      line-height:1.35;
    }
    .pcf-package-chip {
      background:#fff;
      border:1px solid #E2E8F0;
      border-radius:999px;
      padding:3px 7px;
      white-space:nowrap;
    }

    /* Action bar */
    #packCamActions {
      margin-top:auto; padding:8px 10px 14px; flex-shrink:0;
      border-top:1px solid #E2E8F0; background:#fff;
      display:flex; flex-direction:column; gap:6px;
    }

    /* โ”€โ”€ Pack modal โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    #packModal { display:none; position:fixed; inset:0; z-index:900; background:rgba(0,0,0,.55); align-items:flex-end; justify-content:center; }
    #packModal.open { display:flex; }
    .pack-modal-box {
      background:#fff; border-radius:20px 20px 0 0; width:100%; max-width:min(var(--app-modal-width), 100%);
      max-height:85vh; display:flex; flex-direction:column; overflow:hidden;
      animation:slideUpFast .22s ease;
    }
    @keyframes slideUpFast { from{transform:translateY(60px);opacity:0} to{transform:translateY(0);opacity:1} }
    @keyframes popIn { from{transform:scale(.8);opacity:0} to{transform:scale(1);opacity:1} }
    .pack-modal-header {
      display:flex; align-items:center; justify-content:space-between;
      padding:14px 16px 10px; border-bottom:1px solid #F3F4F6;
    }
    .pack-modal-title { font-size:1rem; font-weight:800; color:#111; }
    .pack-modal-body { padding:12px 16px; overflow-y:auto; flex:1; }
    .pack-row { display:flex; gap:6px; margin-bottom:6px; font-size:.85rem; }
    .pack-row-label { color:#6B7280; min-width:70px; }
    .pack-row-val { font-weight:700; color:#111; flex:1; word-break:break-all; }
    .pack-modal-footer { padding:12px 16px; border-top:1px solid #F3F4F6; display:flex; gap:8px; }
    .pack-confirm-btn {
      flex:1; padding:13px; border-radius:12px; border:none;
      background:#0369A1; color:#fff; font-size:.95rem; font-weight:800;
      cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px;
    }
    .pack-confirm-btn:disabled { background:#9CA3AF; }
    .pack-cancel-btn {
      padding:13px 20px; border-radius:12px; border:1.5px solid #E5E7EB;
      background:#fff; color:#374151; font-size:.95rem; font-weight:700; cursor:pointer;
    }
    .pack-photo-preview { max-width:100%; border-radius:10px; margin-top:8px; }
    .so-items-loading { font-size:.8rem; color:#9CA3AF; padding:8px 0; }

    /* โ”€โ”€ Order Status History โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .so-history-btn {
      display:flex; align-items:center; justify-content:center; gap:5px;
      width:100%; margin-top:8px; padding:9px;
      border-radius:10px; border:1.5px solid #E5E7EB;
      background:#F9FAFB; color:#374151; font-size:.82rem; font-weight:600;
      cursor:pointer; transition:background .15s;
    }
    .so-history-btn:active { background:#F3F4F6; }
    .so-history-wrap {
      margin-top:10px; display:none;
      border-top:1px solid #F3F4F6; padding-top:10px;
    }
    .so-history-wrap.open { display:block; }
    .so-history-title {
      font-size:.78rem; font-weight:700; color:#6B7280;
      text-transform:uppercase; letter-spacing:.4px; margin-bottom:8px;
    }
    .so-history-row {
      display:grid;
      grid-template-columns: 110px 1fr;
      gap:2px 8px;
      padding:6px 0;
      border-bottom:1px solid #F3F4F6;
      font-size:.78rem;
    }
    .so-history-row:last-child { border-bottom:none; }
    .so-history-date { color:#9CA3AF; font-family:monospace; font-size:.75rem; }
    .so-history-status { font-weight:700; color:#111; }
    .so-history-sub { color:#6B7280; font-size:.73rem; grid-column:2; margin-top:1px; }
    .so-history-staff {
      display:inline-flex; align-items:center; gap:3px;
      background:#EFF6FF; color:#1D4ED8; border-radius:5px;
      padding:1px 7px; font-size:.72rem; font-weight:600;
    }

    /* โ”€โ”€ Barcode PA list rows โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    .bc-list-header {
      display:flex; align-items:center; gap:6px;
      margin-bottom:10px; flex-wrap:wrap;
    }
    .bc-list-title {
      font-weight:700; font-size:.88rem; color:#111; flex:1;
    }
    .bc-list-btn {
      padding:6px 13px; font-size:.78rem; border:none; border-radius:10px;
      cursor:pointer; font-weight:700; color:#fff; background:#1D4ED8;
    }
    .bc-list-btn-sel {
      background:#6B7280;
    }
    .bc-row {
      display:flex; align-items:center; gap:8px;
      padding:8px 0; border-bottom:1px solid #F3F4F6;
    }
    .bc-row:last-child { border-bottom:none; }
    .bc-row.bc-selected { background:#EFF6FF; border-radius:8px; padding:8px 6px; margin:0 -6px; }
    .bc-row-cb { width:20px; height:20px; flex-shrink:0; cursor:pointer; accent-color:#1D4ED8; }
    .bc-row-body { flex:1; min-width:0; }
    .bc-row-pa {
      display:inline-flex; align-items:center;
      font-family:monospace; font-weight:800; font-size:.9rem; color:#1D4ED8;
      background:#EFF6FF; border:1.5px solid #BFDBFE; border-radius:8px;
      padding:3px 10px; margin-bottom:4px; cursor:pointer;
      white-space:nowrap; max-width:100%;
    }
    .bc-row-pa:active { background:#DBEAFE; }
    .bc-row-meta {
      display:flex; flex-wrap:wrap; align-items:center; gap:4px;
      font-size:.72rem;
    }
    .bc-row-shop {
      font-weight:700; color:#111;
      background:#F3F4F6; border-radius:5px; padding:1px 6px;
    }
    .bc-row-channel {
      color:#6B7280; background:#F9FAFB;
      border:1px solid #E5E7EB; border-radius:5px; padding:1px 6px;
    }
    .bc-row-express {
      color:#fff; background:#F97316;
      border-radius:5px; padding:1px 6px; font-weight:700;
    }
    .bc-row-express.lex  { background:#1D4ED8; }
    .bc-row-express.flash { background:#38BDF8; }
    .bc-row-print {
      flex-shrink:0; padding:7px 10px; font-size:.8rem; border:none;
      border-radius:10px; background:#1D4ED8; color:#fff;
      cursor:pointer; font-weight:700; display:flex; align-items:center;
    }
    .bc-row-print:active { background:#1E40AF; }
    .bc-prog { color:#9CA3AF; font-size:.75rem; margin-bottom:6px; }
    /* โ”€โ”€ Handover Page ยท Bold Warehouse (navy + blue CI) โ”€โ”€โ”€โ”€โ”€โ”€ */
    .ho-page {
      --ho-navy:#1e3a8a; --ho-navy-2:#1d4ed8; --ho-navy-deep:#0f1e4a;
      --ho-red:#1d4ed8; --ho-red-2:#1e40af;
      --ho-blue-50:#eef4ff; --ho-blue-100:#dbe6ff; --ho-blue-200:#c2d3ff;
      --ho-red-50:#eff6ff; --ho-red-100:#dbeafe; --ho-red-200:#bfdbfe;
      --ho-line:#e3e7ef; --ho-ink:#0b1220; --ho-ink-2:#475569; --ho-ink-3:#94a3b8;
      padding:16px var(--app-pad-x); padding-bottom:var(--bottom-nav-clearance);
      background:#eef0f5; min-height:100vh;
    }
    #pageHandover .ho-page > div:first-child {
      min-width:0;
      max-width:100%;
    }
    #pageHandover .ho-page > div:first-child > button {
      min-width:0;
      max-width:100%;
      overflow:hidden;
      justify-content:center;
      white-space:nowrap;
      text-overflow:ellipsis;
    }
    #pageHandover .ho-page > div:first-child > button svg {
      flex-shrink:0;
    }
    #pageHandover .ho-page input,
    #pageHandover .ho-page button,
    #pageHandover .ho-page .ho-dashboard,
    #pageHandover .ho-page .ho-courier-card,
    #pageHandover .ho-page .ho-pa-row,
    #pageHandover .ho-page .ho-row {
      max-width:100%;
    }
    .ho-dashboard {
      margin:12px 0 14px;
      background:#fff;
      border:1px solid #e3e7ef;
      border-radius:16px;
      padding:14px;
      box-shadow:0 8px 22px -18px rgba(15,23,42,.45);
    }
    .ho-dash-head {
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      margin-bottom:12px;
    }
    .ho-dash-title {
      font-size:.98rem;
      font-weight:900;
      color:#0b1220;
      line-height:1.2;
    }
    .ho-dash-sub {
      margin-top:3px;
      font-size:.7rem;
      font-weight:700;
      color:#94a3b8;
    }
    .ho-dash-actions {
      display:flex;
      align-items:center;
      gap:8px;
      flex-shrink:0;
    }
    .ho-dash-share,
    .ho-dash-copy {
      min-height:34px;
      padding:0 11px;
      border-radius:10px;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:6px;
      cursor:pointer;
      font-size:.72rem;
      font-weight:850;
      white-space:nowrap;
    }
    .ho-dash-share {
      border:1px solid #bbf7d0;
      background:#ecfdf5;
      color:#047857;
      box-shadow:0 8px 16px -14px rgba(4,120,87,.55);
    }
    .ho-dash-copy {
      border:1px solid #bfdbfe;
      background:#eff6ff;
      color:#1d4ed8;
      box-shadow:0 8px 16px -14px rgba(29,78,216,.45);
    }
    .ho-dash-share svg,
    .ho-dash-copy svg {
      width:16px;
      height:16px;
    }
    .ho-dash-share:active,
    .ho-dash-copy:active {
      transform:translateY(1px);
    }
    .ho-dash-refresh {
      width:34px;
      height:34px;
      border-radius:10px;
      border:1px solid #dbe6ff;
      background:#eef4ff;
      color:#1d4ed8;
      display:flex;
      align-items:center;
      justify-content:center;
      cursor:pointer;
      flex-shrink:0;
    }
    .ho-dash-refresh.is-loading svg {
      animation: spin .8s linear infinite;
    }
    .ho-dash-refresh:disabled {
      opacity:.75;
      cursor:wait;
    }
    @media (max-width:560px) {
      .ho-dash-head {
        gap:8px;
      }
      .ho-dash-share,
      .ho-dash-copy {
        width:34px;
        padding:0;
      }
      .ho-dash-share span,
      .ho-dash-copy span {
        display:none;
      }
    }
    .ho-dash-grid {
      display:grid;
      grid-template-columns:repeat(4,minmax(0,1fr));
      gap:8px;
    }
    .ho-dash-card {
      min-width:0;
      background:#f8fafc;
      border:1px solid #e3e7ef;
      border-radius:12px;
      padding:10px 10px 9px;
    }
    .ho-dash-card.primary {
      background:#eef4ff;
      border-color:#c2d3ff;
    }
    .ho-dash-card.done {
      background:#f0fdf4;
      border-color:#bbf7d0;
    }
    .ho-dash-label {
      display:block;
      font-size:.62rem;
      font-weight:800;
      color:#64748b;
      line-height:1.15;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
    }
    .ho-dash-card strong {
      display:block;
      margin-top:5px;
      font-family:'JetBrains Mono', ui-monospace, monospace;
      font-size:1.62rem;
      line-height:1;
      color:#0f1e4a;
      letter-spacing:-.04em;
      font-weight:900;
      font-variant-numeric:tabular-nums;
    }
    .ho-dash-card.done strong { color:#15803d; }
    .ho-dash-progress {
      height:7px;
      margin:12px 0 10px;
      border-radius:99px;
      overflow:hidden;
      background:#e5e7eb;
    }
    .ho-dash-progress-bar {
      height:100%;
      border-radius:99px;
      background:linear-gradient(90deg,#1d4ed8,#22c55e);
      transition:width .35s ease;
    }
    .ho-dash-couriers {
      display:flex;
      gap:6px;
      overflow-x:auto;
      padding-bottom:1px;
      scrollbar-width:none;
    }
    .ho-dash-couriers::-webkit-scrollbar { display:none; }
    .ho-dash-pill {
      display:inline-flex;
      align-items:center;
      gap:6px;
      flex-shrink:0;
      border:1px solid #e3e7ef;
      background:#fff;
      border-radius:999px;
      padding:5px 9px 5px 5px;
      font-size:.68rem;
      font-weight:800;
      color:#334155;
      cursor:pointer;
      max-width:220px;
    }
    .ho-dash-pill-name {
      overflow:hidden;
      text-overflow:ellipsis;
      white-space:nowrap;
      max-width:142px;
    }
    .ho-dash-pill-count {
      color:#1d4ed8;
      font-family:'JetBrains Mono', ui-monospace, monospace;
      font-size:.72rem;
    }
    @media (max-width:520px) {
      .ho-dash-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
      .ho-dash-card strong { font-size:1.45rem; }
    }
    .ho-counter-wrap {
      background:linear-gradient(180deg,#1e3a8a 0%,#0f1e4a 100%);
      border-radius:18px; padding:20px 20px 16px;
      margin-bottom:14px; color:#fff;
      position:relative; overflow:hidden;
      box-shadow:0 10px 24px -14px rgba(30,58,138,.55);
    }
    .ho-counter-wrap::before { content:""; position:absolute; right:-50px; top:-50px; width:180px; height:180px; border-radius:50%; border:1px solid rgba(255,255,255,.06); pointer-events:none; }
    .ho-counter-wrap::after  { content:""; position:absolute; right:-25px; top:-25px; width:130px; height:130px; border-radius:50%; border:1px solid rgba(255,255,255,.06); pointer-events:none; }
    .ho-counter-top { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:12px; position:relative; }
    .ho-counter-num {
      font-size:5.6rem; font-weight:900; line-height:.88;
      font-variant-numeric:tabular-nums; letter-spacing:-.045em;
      font-family:'JetBrains Mono', ui-monospace, monospace;
    }
    .ho-counter-label { font-size:.7rem; opacity:.65; margin-top:6px; letter-spacing:.12em; text-transform:uppercase; font-weight:700; }
    .ho-counter-scanned-box { text-align:right; padding-bottom:6px; }
    .ho-counter-scanned-num { font-size:2.1rem; font-weight:800; line-height:1; font-family:'JetBrains Mono', ui-monospace, monospace; letter-spacing:-.02em; opacity:.92; }
    .ho-counter-scanned-label { font-size:.66rem; opacity:.55; margin-top:3px; letter-spacing:.1em; text-transform:uppercase; font-weight:700; }
    .ho-progress-wrap { background:rgba(255,255,255,.16); border-radius:99px; height:6px; overflow:hidden; margin-bottom:8px; position:relative; }
    .ho-progress-bar { height:100%; background:linear-gradient(90deg,#93c5fd,#fff); border-radius:99px; transition:width .4s ease; }
    .ho-counter-sub { font-size:.74rem; opacity:.75; font-weight:600; position:relative; }

    .ho-msg { margin-bottom:10px; padding:10px 14px; border-radius:11px; font-size:.84rem; font-weight:700; text-align:center; animation:ho-fade-in .15s ease; }
    .ho-msg-ok   { background:#eef4ff; color:#1e3a8a; border:1px solid #dbe6ff; }
    .ho-msg-warn { background:#eff6ff; color:#1e40af; border:1px solid #dbeafe; }
    .ho-msg-err  { background:#eff6ff; color:#1e40af; border:1px solid #bfdbfe; }
    @keyframes ho-fade-in { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:none} }

    .ho-list-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; gap:8px; }
    .ho-list-title  { font-size:.72rem; font-weight:800; color:#0b1220; letter-spacing:.06em; text-transform:uppercase; }
    .ho-clear-btn   { font-size:.72rem; padding:5px 11px; border-radius:8px; border:1px solid #e3e7ef; background:#fff; color:#475569; cursor:pointer; font-weight:700; }
    .ho-clear-btn:active { background:#f8fafc; }

    .ho-row {
      display:flex; align-items:center; gap:10px;
      padding:10px 12px; background:#fff;
      border:1px solid #e3e7ef; border-left:3px solid #1d4ed8;
      border-radius:11px; margin-bottom:6px;
    }
    .ho-row:last-child { margin-bottom:0; }
    .ho-row-num { flex-shrink:0; width:auto; height:auto; border-radius:0; background:transparent; color:#94a3b8; font-size:.72rem; font-weight:800; font-family:'JetBrains Mono', ui-monospace, monospace; min-width:18px; text-align:right; display:block; }
    .ho-row-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
    .ho-row-pa { font-family:'JetBrains Mono', ui-monospace, monospace; font-weight:800; font-size:.88rem; color:#1d4ed8; display:block; margin-bottom:0; letter-spacing:.02em; }
    .ho-row-meta { display:flex; flex-wrap:wrap; gap:4px; }
    .ho-row-shop { font-size:.7rem; font-weight:700; background:#eef4ff; color:#1e3a8a; border:1px solid #dbe6ff; border-radius:5px; padding:1px 6px; }
    .ho-row-express { font-size:.7rem; color:#1e40af; background:#eff6ff; border:1px solid #bfdbfe; border-radius:5px; padding:1px 6px; font-weight:700; }
    .ho-row-ref { font-size:.68rem; color:#475569; background:#f8fafc; border:1px solid #e3e7ef; border-radius:5px; padding:1px 6px; }
    .ho-row-del { flex-shrink:0; border:1px solid #dbeafe; background:#eff6ff; color:#1d4ed8; border-radius:7px; padding:4px 10px; font-size:.72rem; font-weight:700; cursor:pointer; }
    .ho-row-del:active { background:#dbeafe; }

    .ho-step-title { font-size:.95rem; font-weight:800; color:#0b1220; margin-bottom:14px; padding-bottom:0; border-bottom:none; display:flex; align-items:center; gap:9px; }
    .ho-step-title::before { content:""; flex-shrink:0; width:4px; height:20px; background:var(--ci-blue); border-radius:999px; box-shadow:0 4px 12px rgba(29,78,216,.18); }
    .ho-courier-loading { display:flex; align-items:center; gap:10px; color:#94a3b8; font-size:.85rem; padding:14px 0; font-weight:600; }
    .ho-courier-loading span { color:#DC2626; }
    .ho-global-scan-panel { margin:0 0 12px; padding:12px; border:1px solid #D7E4FF; border-radius:16px; background:linear-gradient(135deg,#EFF6FF 0%,#FFFFFF 68%); box-shadow:0 10px 24px rgba(15,23,42,.05); }
    .ho-global-scan-actions { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(120px,.8fr); gap:10px; }
    .ho-global-scan-btn,
    .ho-global-dropoff-btn { border:0; border-radius:14px; min-height:54px; padding:12px 14px; display:flex; align-items:center; justify-content:center; gap:10px; font-family:inherit; font-weight:950; font-size:.9rem; cursor:pointer; }
    .ho-global-scan-btn { background:linear-gradient(135deg,#1E3A8A,#2563EB 58%,#38BDF8); color:#fff; box-shadow:0 12px 24px rgba(29,78,216,.18); }
    .ho-global-dropoff-btn { background:#fff; color:#1E3A8A; border:1.5px solid #BFD7FF; box-shadow:none; }
    .ho-global-scan-btn svg,
    .ho-global-dropoff-btn svg { flex-shrink:0; }
    .ho-global-scan-help { margin-top:8px; color:#64748B; font-size:.74rem; font-weight:750; line-height:1.35; }
    @media (max-width:560px) { .ho-global-scan-actions { grid-template-columns:1fr; } }

    .ho-courier-card {
      display:flex; align-items:center; gap:12px;
      padding:12px 14px; background:#fff; border-radius:14px;
      border:1px solid #e3e7ef; margin-bottom:8px; cursor:pointer;
      transition:border-color .12s, box-shadow .12s, transform .05s;
      -webkit-tap-highlight-color:transparent; position:relative;
    }
    .ho-courier-card::before { content:""; position:absolute; left:0; top:14px; bottom:14px; width:3px; border-radius:0 999px 999px 0; background:linear-gradient(180deg,#38BDF8,var(--ci-blue)); box-shadow:0 0 12px rgba(29,78,216,.18); }
    .ho-courier-card:active { border-color:#1e3a8a; background:#eef4ff; box-shadow:0 0 0 3px #dbe6ff; transform:scale(.998); }
    .ho-courier-icon { width:42px; height:42px; border-radius:10px; background:#eef4ff; border:1px solid #dbe6ff; display:flex; align-items:center; justify-content:center; flex-shrink:0; color:#1e3a8a; margin-left:6px; }
    .ho-courier-name { font-size:.95rem; font-weight:800; color:#0b1220; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .ho-courier-count { flex-shrink:0; background:#1e3a8a; color:#fff; border-radius:9px; padding:6px 12px; font-size:.88rem; font-weight:800; font-family:'JetBrains Mono', ui-monospace, monospace; letter-spacing:.02em; }

    .ho-courier-bar { display:flex; align-items:center; gap:12px; background:#1e3a8a; border-radius:14px; padding:12px 14px; margin-bottom:12px; box-shadow:0 8px 18px -10px rgba(30,58,138,.6); }
    .ho-courier-bar-name { flex:1; font-size:.95rem; font-weight:800; color:#fff; letter-spacing:-.005em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .ho-change-btn { flex-shrink:0; font-size:.78rem; padding:5px 12px; border-radius:8px; border:1px solid rgba(255,255,255,.45); background:transparent; color:#fff; cursor:pointer; font-weight:700; }
    .ho-change-btn:active { background:rgba(255,255,255,.12); }
    .ho-palist-count { font-size:.74rem; font-weight:800; color:#94a3b8; font-family:'JetBrains Mono', ui-monospace, monospace; }

    .ho-pa-row {
      display:flex; align-items:center; gap:10px;
      padding:10px 12px; background:#fff;
      border:1.5px solid #e3e7ef; border-left:4px solid #1d4ed8;
      border-radius:11px; margin-bottom:6px;
      cursor:pointer; -webkit-tap-highlight-color:transparent;
      transition:background .12s, border-color .12s;
    }
    .ho-pa-row:last-child { margin-bottom:0; }
    .ho-pa-row:active { background:#eef4ff; }
    /* โ”€โ”€ done: เน€เธเธตเธขเธงเน€เธ”เนเธเธเธฑเธ” โ”€โ”€ */
    .ho-pa-row.ho-pa-done {
      background:#F0FDF4;
      border-color:#86EFAC; border-left:4px solid #16A34A;
    }
    /* โ“ circle */
    .ho-pa-check {
      flex-shrink:0; width:26px; height:26px; border-radius:50%;
      display:flex; align-items:center; justify-content:center;
      font-size:.75rem; font-weight:900;
    }
    .ho-pa-row:not(.ho-pa-done) .ho-pa-check {
      background:#F1F5F9; color:#CBD5E1; border:2px solid #E2E8F0;
    }
    .ho-pa-row.ho-pa-done .ho-pa-check {
      background:#16A34A; color:#fff; border:2px solid #16A34A;
      font-size:.85rem;
    }
    .ho-pa-num { font-family:'JetBrains Mono', ui-monospace, monospace; font-size:.95rem; font-weight:800; color:#1d4ed8; flex-shrink:0; cursor:pointer; border-bottom:1px dashed #c2d3ff; padding-bottom:1px; letter-spacing:.02em; }
    .ho-pa-num.copied { color:#1e3a8a !important; border-color:#1e3a8a; }
    .ho-pa-row.ho-pa-done .ho-pa-num { color:#15803D; border-color:#86EFAC; }
    .ho-pa-shop { flex:1; font-size:.72rem; color:#475569; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
    .ho-pa-go { flex-shrink:0; font-size:.7rem; color:#1d4ed8; padding:3px 9px; border:1px solid #dbe6ff; border-radius:7px; background:#eef4ff; font-weight:700; }
    .ho-pa-row.ho-pa-done .ho-pa-go { color:#15803D; border-color:#86EFAC; background:#DCFCE7; }
    .bc-row-pa-bc { margin:5px 0 2px; line-height:0; }
    .bc-row-pa-bc svg { display:block; max-width:100%; }
    .bc-row-items { margin-top:5px; display:flex; flex-direction:column; gap:3px; }
    .bc-row-item {
      display:flex; align-items:center; gap:6px;
      font-size:.75rem; color:#374151;
      background:#F9FAFB; border-radius:6px; padding:3px 8px;
    }
    .bc-row-item-qty {
      flex-shrink:0; background:#1D4ED8; color:#fff;
      border-radius:5px; padding:1px 7px; font-size:.72rem; font-weight:800;
    }
    .bc-row-item-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

    /* โ”€โ”€ @media print โ€” thermal 80mm โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
    @media print {
      @page { size: 80mm auto; margin: 15mm 3mm 4mm; }
      body > *:not(#soThermalArea) { display:none !important; }
      #soThermalArea {
        display: block !important;
        width: 74mm; margin: 0 auto;
        font-family: 'Courier New', monospace;
        color: #000; background: #fff;
        text-align: center;
      }
      .tp-page { display: block; }
      .tp-page-break { page-break-after: always; }
      /* PA + barcode header */
      .tp-pa {
        font-size: 17pt; font-weight: 900;
        letter-spacing: 2px; margin: 0 0 1mm;
      }
      .tp-barcode { margin: 0 0 2mm; }
      .tp-barcode svg { width: 72mm !important; height: 12mm !important; }
      /* dividers */
      .tp-divider-dash { border: none; border-top: 1px dashed #000; margin: 1.5mm 0; }
      /* order info block */
      .tp-info { text-align: left; font-size: 8pt; }
      .tp-info-row { display: flex; gap: 2mm; margin-bottom: 0.6mm; }
      .tp-info-label { color: #000; min-width: 13mm; font-size: 7.5pt; }
      .tp-info-val { font-weight: 700; }
      /* total summary row */
      .tp-total {
        font-size: 10pt; font-weight: 900; text-align: center;
        border-top: 2px solid #000; border-bottom: 2px solid #000;
        padding: 1mm 0; margin: 1.5mm 0;
      }
      /* items */
      .tp-item { padding: 2mm 0; }
      .tp-item + .tp-item { border-top: 1px dashed #000; }
      /* name + qty on same line */
      .tp-item-header {
        display: flex; align-items: baseline;
        justify-content: space-between; gap: 2mm;
        margin-bottom: 1mm;
      }
      .tp-item-name {
        font-size: 9pt; font-weight: 900;
        line-height: 1.3; text-align: left; flex: 1;
      }
      .tp-item-qty {
        font-size: 9pt; font-weight: 900;
        white-space: nowrap; flex-shrink: 0;
      }
      .tp-item-sku {
        font-size: 7.5pt; font-weight: 700;
        text-align: center; margin-bottom: 0.5mm;
      }
      .tp-item-bc-label { font-size: 6.5pt; margin-bottom: 0.5mm; }
      .tp-item-bc-img svg { width: 72mm !important; height: 10mm !important; }
      /* rack โ€” เน€เธ”เนเธเธเธฑเธ” (เธเธฒเธงเธ”เธณ) */
      .tp-rack-box {
        display: block; width: 100%;
        border: 4px double #000;
        padding: 2.5mm 0; margin: 2.5mm 0 0;
        font-size: 18pt; font-weight: 900;
        letter-spacing: 2px; text-align: center;
        background: #fff; color: #000;
        box-shadow: inset 0 0 0 1.5px #000;
      }
      .tp-rack-label {
        font-size: 10pt; font-weight: 700;
        letter-spacing: 1px; vertical-align: middle;
      }
      .tp-rack-none {
        display: block; width: 100%;
        font-size: 11pt; font-weight: 900; color: #000;
        margin: 2.5mm 0 0; text-align: center;
        border: 2px solid #000; padding: 2mm 0;
        letter-spacing: 1px;
      }
      /* โ”€โ”€ Pick List Summary โ€” table layout (printPickSummary) โ”€โ”€โ”€โ”€โ”€ */
      .pls-main-title {
        font-size: 13pt; font-weight: 900; text-align: center;
        margin: 0 0 0.5mm; letter-spacing: 1px;
      }
      .pls-date {
        font-size: 7pt; text-align: center; margin-bottom: 1.5mm;
      }
      .pls-shop-header {
        font-size: 9.5pt; font-weight: 900; margin: 0;
      }
      .pls-order-cnt { font-size: 8pt; font-weight: 600; }
      .pls-meta { font-size: 7pt; margin: 0.5mm 0 0; }
      /* Main table */
      .pls-doc-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 1.5mm;
        font-size: 8pt;
      }
      .pls-doc-table th,
      .pls-doc-table td {
        border: 0.5pt solid #000;
        padding: 1mm 1.5mm;
        vertical-align: top;
      }
      /* Title/shop header cell */
      .pls-th-title {
        border: none;
        padding: 0 0 1mm 0;
        text-align: left;
      }
      /* Column headers row */
      .pls-thead th {
        font-size: 7.5pt; font-weight: 900;
        text-align: center;
        background: #fff;
        border: 0.5pt solid #000;
        padding: 1mm;
      }
      .pls-th-check { width: 7mm;  text-align: center; font-size: 8pt; }
      .pls-th-no    { width: 5mm;  text-align: center; }
      .pls-th-name  { text-align: left; }
      .pls-th-qty   { width: 10mm; text-align: center; }
      .pls-th-rack  { width: 20mm; text-align: center; }
      /* Data rows */
      .pls-td-check { text-align: center; font-size: 11pt; color: #000; width: 7mm; }
      .pls-td-no    { text-align: center; font-size: 7pt; color: #000; }
      .pls-td-name  { font-weight: 700; line-height: 1.35; }
      .pls-sku      { font-size: 6.5pt; color: #333; font-weight: 400; }
      .pls-bc-pill  {
        display: inline-block; font-family: monospace;
        font-size: 6.5pt; font-weight: 700;
        border: 1pt solid #000; border-radius: 2pt;
        padding: 0 3pt; margin-top: 1pt;
        background: #fff; color: #000;
        letter-spacing: .3pt;
      }
      .pls-td-qty   { text-align: center; font-weight: 900; font-size: 9pt; }
      .pls-td-rack  { font-size: 7.5pt; font-weight: 700; text-align: center; }
      /* Total footer row */
      .pls-total-row td {
        border-top: 1.5pt solid #000;
        font-weight: 900; font-size: 8.5pt;
        padding: 1mm 1.5mm;
      }
      .pls-total-row td:first-child  { text-align: center; }
      .pls-total-row td:nth-child(2) { text-align: left; }
      .pls-total-row .pls-td-qty     { text-align: center; }
    }



/* Textless close button: avoids mojibake from encoded x/close glyphs. */
.shop-popup-close {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
}
.shop-popup-close::before,
.shop-popup-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}
.shop-popup-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.shop-popup-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#ordersUpdateText.orders-update-fresh {
  color: #065f46 !important;
}

#ordersUpdateText.orders-update-warn {
  color: #92400e !important;
}

#ordersUpdateText.orders-update-stale {
  color: #be123c !important;
}
