/* Design tokens (from the 2026-11-03 home/login redesign): deep green
   primary, soft green-tinted neutrals, 12–16px radii, soft shadows. */
:root {
  --green: #065f46; --green-2: #0a7a5b; --green-hover: #047857;
  --ink: #1c2420; --ink-2: #44514b; --ink-3: #6b7a72;
  --line: #e0e6e3; --line-soft: #e7ecea; --bg: #f3f5f4; --panel: #eef2f0;
  --shadow-card: 0 2px 10px rgba(6,95,70,.05);
  --shadow-lift: 0 10px 24px rgba(6,95,70,.13);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--green); }
button { cursor: pointer; border: none; border-radius: 10px; padding: 9px 16px; font-size: 14px; font-weight: 600; min-height: 40px; transition: background .15s ease, box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid rgba(6,95,70,.5); outline-offset: 1px; }
.btn-primary { background: linear-gradient(120deg, var(--green), var(--green-2)); color: #fff; box-shadow: 0 3px 10px rgba(6,95,70,.22); }
.btn-primary:hover { background: linear-gradient(120deg, var(--green-hover), var(--green)); box-shadow: 0 5px 14px rgba(6,95,70,.28); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(6,95,70,.05); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-danger { background: #991b1b; color: #fff; box-shadow: 0 3px 10px rgba(153,27,27,.20); }
.btn-danger:hover { background: #b3261e; }
.btn-small { padding: 5px 12px; font-size: 13px; min-height: 34px; border-radius: 8px; }
input, select { padding: 9px 10px; border: 1px solid #c8d2cd; border-radius: 10px; font-size: 14px; width: 100%; background: #fff; min-height: 42px; transition: border-color .15s ease, box-shadow .15s ease; }
textarea { padding: 9px 10px; border: 1px solid #c8d2cd; border-radius: 10px; font-size: 14px; width: 100%; background: #fff; font-family: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(6,95,70,.13); outline: none; }
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: var(--green); }
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; color: var(--ink-2); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow-card); }
.hidden { display: none !important; }
.error { color: #991b1b; font-size: 13px; min-height: 18px; margin-top: 8px; }
.ok { color: #065f46; font-size: 13px; }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(155deg, #04382a 0%, #065f46 52%, #0b7a5c 100%); }
.login-card { width: 100%; max-width: 392px; background: #fff; border-radius: 20px; border: none; padding: 36px 30px 30px; box-shadow: 0 24px 60px rgba(0,0,0,.30); }
.brand { font-size: 42px; font-weight: 800; letter-spacing: 7px; color: #065f46; text-align: center; }
.brand::after { content: ''; display: block; width: 54px; height: 4px; border-radius: 2px; margin: 14px auto 6px; background: linear-gradient(90deg, #065f46, #34d399); }
.brand-sub { text-align: center; color: #6b7a72; font-size: 13px; margin: 4px 0 14px; }
.lang-switch { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.lang-switch button { background: #eef2f0; color: #33413a; padding: 6px 12px; font-size: 13px; }
.lang-switch button.active { background: #065f46; color: #fff; }
.login-card .btn-primary { width: 100%; margin-top: 16px; padding: 12px; font-size: 15px; }

/* app shell */
header.topbar { background: linear-gradient(120deg, #065f46, #0a7a5b); color: #fff; padding: 10px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; box-shadow: 0 2px 12px rgba(6,95,70,.25); position: sticky; top: 0; z-index: 40; }
header.topbar .logo { font-weight: 800; letter-spacing: 2px; font-size: 20px; }
header.topbar nav { display: flex; gap: 8px; flex-wrap: wrap; }
header.topbar nav button { background: rgba(255,255,255,.14); color: #fff; }
header.topbar nav button:hover { background: rgba(255,255,255,.28); }
header.topbar .spacer { flex: 1; }
header.topbar .nav-toggle { display: none; }
header.topbar .who { font-size: 13px; opacity: .92; }
header.topbar select { width: auto; padding: 5px 8px; }
main { max-width: 1080px; margin: 0 auto; padding: 18px 14px 40px; }
h2 { margin: 6px 0 14px; font-size: 21px; font-weight: 800; color: #10231c; letter-spacing: .2px; }
h3 { color: #10231c; }
.home-hero { background: linear-gradient(120deg, #065f46, #0a7a5b); color: #fff; border-radius: 16px; padding: 24px 26px; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(6,95,70,.22); }
.home-hero .hh-greet { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.home-hero .hh-date { font-size: 13.5px; opacity: .88; margin-top: 5px; }
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 16px; }
.board-card { display: flex; align-items: center; gap: 15px; text-align: left; background: #fff; border: 1px solid #e0e6e3; border-radius: 16px; padding: 20px 22px; box-shadow: 0 2px 10px rgba(6,95,70,.05); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; cursor: pointer; }
.board-card:hover { border-color: #065f46; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(6,95,70,.14); }
.board-card .bicon { flex: none; width: 54px; height: 54px; border-radius: 14px; background: #e7f4ee; display: flex; align-items: center; justify-content: center; font-size: 27px; }
.board-card .bmain { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.board-card .bname { font-size: 19px; font-weight: 800; color: #10231c; }
.board-card .bdesc { font-size: 13px; color: #6b7a72; }
.board-card .barrow { margin-left: auto; flex: none; font-size: 20px; color: #9db8ad; transition: color .15s ease; }
.board-card:hover .barrow { color: #065f46; }
.board-card .bmeta { font-size: 13px; color: #6b7a72; margin-top: 6px; }
.quick-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qtile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px 15px; background: #fff; border: 1px solid #e0e6e3; border-radius: 14px; font-size: 14px; font-weight: 600; color: #1c2420; box-shadow: 0 2px 8px rgba(6,95,70,.05); cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.qtile:hover { border-color: #065f46; transform: translateY(-2px); }
.qtile .qicon { font-size: 26px; }
/* M38: Nexo home tile grid — big touch tiles, 2 cols on phone/PDA,
   3 on tablet widths, 4 on desktop. */
.nx-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 6px; }
@media (min-width: 700px) { .nx-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1200px) { .nx-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.nx-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 118px; padding: 18px 16px 14px; background: #fff; border: 1.5px solid #e0e6e3; border-radius: 16px; text-align: left; cursor: pointer; box-shadow: 0 2px 10px rgba(6,95,70,.05); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.nx-tile:hover { border-color: #065f46; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(6,95,70,.14); }
.nx-tile .nx-icon { font-size: 44px; line-height: 1.1; }
.nx-tile .nx-name { font-size: 19px; font-weight: 800; color: #10231c; }
.nx-tile .nx-desc { font-size: 13px; color: #6b7a72; line-height: 1.35; }
.nx-tile.nx-primary { background: #065f46; border-color: #065f46; }
.nx-tile.nx-primary .nx-name { color: #fff; }
.nx-tile.nx-primary .nx-desc { color: #cfe8dc; }
.nx-badges { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.nx-badge { display: inline-block; min-width: 26px; text-align: center; padding: 2px 8px; border-radius: 999px; font-size: 14px; font-weight: 800; color: #fff; }
.nx-b-warn { background: #d97706; }
.nx-b-bad { background: #b42318; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: top; }
th { background: #edf3f0; color: var(--ink-2); font-size: 12.5px; font-weight: 700; letter-spacing: .3px; }
@media screen {
  tbody tr:nth-child(even) td { background: #fafcfb; }
  tbody tr:hover td { background: #eff6f2; }
}
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e7f4ee; color: #065f46; }
.badge.off { background: #fdecec; color: #991b1b; }
.role-card { margin-bottom: 14px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; margin: 10px 0; }
.perm-grid label { display: flex; gap: 7px; align-items: center; font-weight: 500; margin: 0; color: #1c2420; }
.perm-grid input { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.proj-assign { border: 1px solid #e0e6e3; border-radius: 14px; padding: 12px 14px; margin-top: 10px; background: #fbfcfb; }
.proj-assign .pa-head { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.proj-assign .pa-head input { width: auto; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { background: #fff; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; box-shadow: 0 1px 3px rgba(6,95,70,.05); }
.tabs button:hover { border-color: var(--green); color: var(--green); }
.tabs button.active { background: linear-gradient(120deg, var(--green), var(--green-2)); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(6,95,70,.22); }

/* M2 tickets */
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.hot { background: #fee2e2; color: #991b1b; }
.badge.done { background: #dbeafe; color: #1e40af; }
.ticket-card { margin-bottom: 10px; cursor: pointer; padding: 14px 16px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.ticket-card:hover { border-color: #065f46; box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.tk-title { font-size: 16px; font-weight: 700; margin-top: 6px; }
.tk-meta { font-size: 13px; color: #6b7a72; margin-top: 4px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.chk { display: flex; gap: 7px; align-items: center; font-weight: 500; margin: 4px 0; color: #1c2420; }
.chk input { width: auto; }
.thumb { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid #e0e6e3; }
.att-wrap { position: relative; display: inline-block; }
.att-del { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #d8deeb; background: #fff; color: #b3261e; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.att-del:hover { background: #fdecea; }
.filechip { display: inline-block; padding: 8px 10px; background: #eef2f0; border-radius: 8px; font-size: 13px; }
.flow-item { padding: 9px 0; border-bottom: 1px solid #eef2f0; font-size: 14px; }
.flow-item:last-child { border-bottom: none; }
.fi-time { color: #6b7a72; font-size: 12px; margin-right: 8px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; z-index: 50; }
.lightbox img { max-width: 86vw; max-height: 84vh; border-radius: 8px; }
.lb-close { position: absolute; top: 14px; right: 20px; color: #fff; font-size: 26px; cursor: pointer; }
.lb-nav { background: rgba(255,255,255,.15); color: #fff; font-size: 26px; padding: 8px 14px; margin: 0 8px; }
.lb-cap { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; }

/* M5 CRM kanban */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kb-col { flex: 0 0 218px; background: #e9efec; border-radius: 14px; padding: 8px; }
.kb-head { font-size: 13px; font-weight: 700; color: #44514b; padding: 2px 4px 8px; }
.kb-card { background: #fff; border: 1px solid #e0e6e3; border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; cursor: pointer; font-size: 13.5px; box-shadow: 0 1px 4px rgba(6,95,70,.05); }
.kb-card:hover { border-color: #065f46; }

/* M9 delivery appointments */
.kv { font-size: 14.5px; line-height: 2; }
.kv b { color: #44514b; }
@media print {
  .topbar, .no-print { display: none !important; }
  main > *:not(.daylist-print):not(.sg-labels-print) { display: none !important; }
  .daylist-print { border: none !important; box-shadow: none !important; }
}

/* M23 loose-goods sorting & putaway */
.sg-display { border-radius: 12px; padding: 18px 12px; text-align: center; border: 2px solid #d5ddd9; background: #f4f7f5; }
.sg-display .sg-big { font-size: 96px; font-weight: 800; line-height: 1.05; letter-spacing: 2px; }
.sg-display .sg-tag { font-size: 18px; font-weight: 700; }
.sg-display .sg-sub { font-size: 16px; margin-top: 6px; }
.sg-repeat { background: #d1fae5; border-color: #059669; color: #064e3b; }
.sg-cell-empty { cursor: pointer; }
.sg-cell-armed { outline: 3px solid #d97706 !important; outline-offset: -3px; background: #fef3c7 !important; }
.sg-arm-banner { margin-top: 8px; background: #fef3c7; border: 2px solid #d97706; color: #92400e; border-radius: 10px; padding: 10px; font-size: 17px; font-weight: 800; text-align: center; cursor: pointer; }
.sg-new { background: #fef3c7; border-color: #d97706; color: #78350f; }
.sg-exc { background: #ffedd5; border-color: #ea580c; color: #7c2d12; }
.sg-full { background: #fee2e2; border-color: #dc2626; color: #7f1d1d; }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.sg-cell { border: 1px solid #065f46; background: #ecfdf5; border-radius: 8px; padding: 6px 4px; text-align: center; cursor: pointer; min-height: 64px; }
.sg-cell-empty { background: #f1f5f3; border-color: #dde5e1; color: #9fb3aa; cursor: default; }
.sg-cell-exc { background: #ffedd5; border-color: #ea580c; }
.sg-cell-ext { background: #e0f2fe; border-color: #0284c7; }
.sg-cell-done { opacity: .45; }
.sg-cell-pwsub { background: #fef3c7; border-color: #d97706; }
.sg-cell-pwent { background: #dbeafe; border-color: #2563eb; }
.sg-cell-pwver { background: #dcfce7; border-color: #16a34a; }
.sg-cell-state { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 2px; margin-top: 2px; }
.sg-state-sub { background: #fde68a; color: #92400e; }
.sg-state-ent { background: #bfdbfe; color: #1e40af; }
.sg-state-ver { background: #bbf7d0; color: #166534; }
.sg-cell-no { font-weight: 800; font-size: 16px; }
.sg-cell-sku { font-size: 11px; word-break: break-all; }
.sg-cell-qty { font-size: 12.5px; font-weight: 700; }
.sg-cell-loc { font-size: 11px; color: #065f46; font-weight: 700; }
.sg-put-table input.sg-actual { padding: 5px 6px; font-size: 15px; }
@media print {
  .sg-print table { font-size: 12.5px; }
  .sg-print td, .sg-print th { border: 1px solid #999 !important; }
}

/* M23 4x6 frame labels (one thermal label per frame, @page sized so the
   browser hands the printer real 4in x 6in pages) */
.sg-cell { position: relative; }
.sg-cell-print { position: absolute; top: 2px; right: 2px; background: transparent; padding: 2px 3px; font-size: 12px; line-height: 1; border-radius: 4px; }
.sg-cell-print:hover { background: rgba(6, 95, 70, .14); }
.sg-labels-print { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.sg-label { width: 4in; height: 6in; background: #fff; border: 1px solid #c8d2cd; padding: 0.18in 0.25in; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; }
.sg-label-batch { font-size: 13px; color: #44514b; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-label-slot { font-size: 148px; font-weight: 800; line-height: 1.02; letter-spacing: 2px; }
.sg-label-field { font-size: 13px; font-weight: 700; color: #44514b; letter-spacing: 4px; margin-top: 4px; }
.sg-label-sku { font-size: 32px; font-weight: 800; word-break: break-all; line-height: 1.15; }
.sg-label-barcode { width: 3.3in; height: 0.58in; margin-top: 8px; }
.sg-label-qty { font-size: 40px; font-weight: 800; margin-top: 6px; }
.sg-label-qty span { font-size: 20px; font-weight: 700; color: #44514b; }
.sg-label-ext { font-size: 15px; font-weight: 700; color: #0369a1; margin-top: 2px; }
.sg-label-date { font-size: 17px; margin-top: 6px; }
.sg-label-loc { margin-top: 8px; border: 3px solid #1c2420; border-radius: 10px; padding: 6px 16px 10px; display: flex; flex-direction: column; }
.sg-label-loc span { font-size: 13px; font-weight: 700; color: #44514b; }
.sg-label-loc b { font-size: 38px; line-height: 1.1; }
@page sglabel { size: 4in 6in; margin: 0; }
@media print {
  /* The app shell's main padding would push the exact-6in label onto a
     second, blank page — zero it whenever labels are what is printing. */
  main:has(> .sg-labels-print) { padding: 0 !important; margin: 0 !important; }
  .sg-labels-print { page: sglabel; display: block; }
  .sg-label { border: none; page-break-after: always; break-after: page; margin: 0 auto; height: 5.99in; }
  .sg-label:last-child { page-break-after: auto; break-after: auto; }
}

/* ===== Board interiors polish (2026-11-03, extends the home/login
   redesign language into every board) ===== */
/* Board header bar shown at the top of each board's views */
.board-head { display: flex; align-items: center; gap: 13px; background: linear-gradient(120deg, var(--green), var(--green-2)); color: #fff; border-radius: 16px; padding: 13px 18px; margin: 8px 0 16px; box-shadow: 0 8px 22px rgba(6,95,70,.20); }
.board-head .bh-icon { flex: none; width: 46px; height: 46px; border-radius: 13px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 25px; }
.board-head .bh-name { font-size: 19px; font-weight: 800; letter-spacing: .3px; }
/* Tiny icon/close buttons keep their size despite the 40px button floor */
.sg-cell-print, .att-del { min-height: 0; }
button[style*="height:2"], button[style*="height: 2"] { min-height: 0; }
/* Scan pages: soften the frame around the (unchanged, still giant) displays */
.sg-display { box-shadow: 0 6px 18px rgba(6,95,70,.10); }
.ib-rec { box-shadow: 0 4px 14px rgba(6,95,70,.12); }
.sg-cell { border-radius: 10px; box-shadow: 0 1px 4px rgba(6,95,70,.05); }
/* One-time generated password panel (account edit) */
.pw-once { margin-top: 14px; border: 2px solid var(--green); background: #f2faf6; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-card); }
.pw-once-title { font-weight: 800; color: #92400e; font-size: 14px; }
.pw-once-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.pw-once-value { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 21px; font-weight: 700; letter-spacing: 1.5px; background: #fff; border: 1px dashed #9db8ad; border-radius: 10px; padding: 8px 14px; color: #10231c; }
.pw-once-note { margin-top: 9px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
/* Lightbox slight polish */
.lightbox { backdrop-filter: blur(3px); }
.thumb { border-radius: 10px; }
.filechip { border-radius: 10px; background: var(--panel); }
/* Mobile comfort: tighter cards, bigger section rhythm, giants untouched */
@media (max-width: 640px) {
  /* Compact topbar on phones/PDA handhelds: the sticky header must stay
     slim so it never covers the work area (reported 2026-11-12 on the
     warehouse PDA — header took ~half the screen). Everything flows in
     one wrap stream (no spacer), controls shrink to two short rows. */
  header.topbar { padding: 6px 10px; gap: 6px 8px; }
  header.topbar .logo { font-size: 16px; letter-spacing: 1px; }
  /* Collapsible header (Simon, 2026-11-12): on phones/PDA the topbar
     collapses to a single slim row — NOUS + ☰ button. Nav buttons,
     user name and language selector appear only while the bar is open;
     picking a destination closes it again. */
  header.topbar .nav-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; background: rgba(255,255,255,.14); color: #fff; min-height: 34px; padding: 5px 12px; font-size: 16px; line-height: 1; border-radius: 8px; }
  header.topbar:not(.open) nav, header.topbar:not(.open) .who, header.topbar:not(.open) #ui-lang { display: none; }
  header.topbar .spacer { display: none; }
  header.topbar nav { gap: 6px; }
  header.topbar nav button { padding: 5px 10px; font-size: 12.5px; min-height: 34px; border-radius: 8px; }
  header.topbar .who { font-size: 12px; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  header.topbar select { min-height: 34px; padding: 3px 6px; font-size: 12.5px; border-radius: 8px; }
  main { padding: 14px 10px 34px; }
  h2 { font-size: 19px; }
  .card { padding: 14px; border-radius: 14px; }
  .board-head { padding: 11px 14px; border-radius: 14px; margin-bottom: 12px; }
  .board-head .bh-icon { width: 40px; height: 40px; font-size: 22px; border-radius: 11px; }
  .board-head .bh-name { font-size: 17px; }
  .tabs button { padding: 8px 13px; }
  th, td { padding: 8px; }
  .pw-once-value { font-size: 18px; }
}
@media print {
  .board-head { display: none !important; }
}

/* M25 inbound scan & putaway */
.ib-rec { border: 2px solid #059669; background: #d1fae5; border-radius: 10px; padding: 8px 12px; text-align: center; margin-top: 6px; }
.ib-rec .ib-rec-loc { font-size: 44px; font-weight: 800; line-height: 1.1; color: #064e3b; }
.ib-rec-new { border-color: #d97706; background: #fef3c7; padding: 10px 12px; }
.ib-line { border-top: 1px solid #e5e7eb; padding: 10px 0 4px; }

/* M53 Whatnot live binning: floor big-screen. The banner is the whole
   point of the page — readable across the packing area. */
.wn-banner { background: #065f46; color: #fff; border-radius: 14px; padding: 22px 18px; text-align: center; margin-bottom: 14px; box-shadow: 0 2px 10px rgba(6,95,70,.25); }
.wn-banner-idle { background: #44514b; }
.wn-banner-main { font-size: 44px; font-weight: 800; line-height: 1.2; word-break: break-word; }
.wn-banner-slot { color: #fde68a; }
.wn-banner-sub { font-size: 24px; font-weight: 700; margin-top: 6px; color: #d1fae5; }
.wn-find-bin { font-size: 110px; font-weight: 800; line-height: 1.05; color: #065f46; text-align: center; word-break: break-all; }
.wn-find-title { font-size: 30px; font-weight: 800; text-align: center; margin-top: 4px; word-break: break-word; }
.wn-find-buyer { font-size: 22px; font-weight: 700; text-align: center; color: #44514b; margin-top: 2px; word-break: break-all; }
.wn-find-warn { border: 3px solid #dc2626; color: #b91c1c; border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-size: 19px; font-weight: 800; text-align: center; }
.wn-find-notsold { font-size: 26px; font-weight: 800; color: #b91c1c; text-align: center; margin-top: 12px; }
.wn-find-row { font-size: 19px; padding: 8px 0; border-bottom: 1px dashed #dde5e1; }
.wn-find-row-bin { font-size: 34px; font-weight: 800; color: #065f46; margin-right: 8px; }
.wn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.wn-slot { background: #fff; border: 2px solid #065f46; border-radius: 12px; padding: 10px 12px; }
.wn-slot-head { display: flex; align-items: baseline; gap: 8px; border-bottom: 2px solid #ecfdf5; padding-bottom: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.wn-slot-letter { font-size: 34px; font-weight: 800; color: #065f46; line-height: 1; }
.wn-slot-buyer { font-size: 17px; font-weight: 700; word-break: break-all; }
.wn-slot-count { margin-left: auto; font-size: 15px; font-weight: 700; color: #44514b; }
.wn-slot-item { font-size: 16px; padding: 3px 0; border-bottom: 1px dashed #e5ebe8; }
.wn-seq { font-weight: 800; color: #065f46; }
.wn-cancelled-row { font-size: 15px; padding: 3px 0; color: #7c2d12; }
/* M53h: remove items on the live slot cards + the pull-out summary */
.wn-slot-remove { color: #7c2d12; }
/* M-split: sub-box chips on the live slot card — one per shipment
   group (B-5-a ×N), the unassigned group flagged 未生成运单. */
.wn-slot-subs { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 2px; }
.wn-sub-chip { background: #ecfdf5; border: 1.5px solid #065f46; color: #065f46; border-radius: 999px; padding: 2px 10px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.wn-badge-unpaid { background: #dc2626; color: #fff; font-weight: 800; font-size: 13px; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.wn-badge-cancelled { background: #6b7280; color: #fff; font-weight: 800; font-size: 13px; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.wn-remove-row { font-size: 16px; padding: 4px 0; border-bottom: 1px dashed #e5ebe8; }
.wn-remove-row:last-child { border-bottom: none; }
/* Pack-slip print document (standalone window, see wnPrintDoc):
   one buyer per page when printing all slips. */
.wn-pack { page-break-inside: avoid; page-break-after: always; border: 2px solid #000; border-radius: 8px; padding: 14px 16px; margin: 0 0 16px; }
.wn-pack:last-child { page-break-after: auto; }
.wn-pack-slot { font-size: 64px; font-weight: 800; line-height: 1; }
.wn-pack-buyer { font-size: 18px; font-weight: 700; margin: 4px 0 8px; }
.wn-pack-item { font-size: 17px; padding: 3px 0; border-bottom: 1px dashed #999; display: flex; justify-content: space-between; gap: 12px; }
.wn-pack-money { font-weight: 700; white-space: nowrap; }
.wn-pack-foot { font-size: 19px; font-weight: 800; margin-top: 10px; border-top: 2px solid #000; padding-top: 7px; }
/* M53h: the REMOVE box + do-not-ship banner on pack slips. Heavy
   black borders and bold type only — both must survive B&W thermal
   printing, so nothing here signals by color alone. */
.wn-pack-remove { border: 3px solid #000; padding: 10px 12px; margin-top: 12px; }
.wn-pack-remove-head { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.wn-pack-remove-item { font-size: 17px; font-weight: 700; padding: 3px 0; border-bottom: 1px dashed #999; }
.wn-pack-remove-item:last-child { border-bottom: none; }
.wn-pack-nopack { font-size: 38px; font-weight: 800; text-align: center; border: 4px solid #000; padding: 16px 10px; margin: 8px 0 4px; }
/* M53l: the reconciliation hold strip on a pack slip — same B&W-safe
   treatment as the remove box (heavy border, bold type). */
.wn-pack-recon { font-size: 19px; font-weight: 800; text-align: center; border: 3px solid #000; padding: 8px 10px; margin: 8px 0; }

/* M53f 4x6 bin labels (one thermal label per buyer/bin, @page sized
   like the M23 frame labels): huge bin code, buyer, item count, the
   show title small, and the scan QR that opens the shipping-label
   page. Printed from the bare wnPrintDoc window. */
.wn-binlabels { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.wn-binlabel { width: 4in; height: 6in; background: #fff; border: 1px solid #c8d2cd; padding: 0.22in 0.25in; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; box-sizing: border-box; }
.wn-binlabel-show { font-size: 13px; color: #44514b; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wn-binlabel-slot { font-size: 120px; font-weight: 800; line-height: 1.05; letter-spacing: 1px; word-break: break-all; }
.wn-binlabel-buyer { font-size: 25px; font-weight: 800; margin-top: 4px; word-break: break-all; line-height: 1.2; }
.wn-binlabel-count { font-size: 21px; font-weight: 700; color: #44514b; margin-top: 4px; }
.wn-binlabel-numbers { font-size: 14.5px; font-weight: 700; color: #1c2420; margin-top: 6px; line-height: 1.35; max-width: 100%; overflow-wrap: break-word; }
.wn-binlabel-numbers-more { font-size: 13px; font-weight: 700; color: #44514b; margin-top: 2px; }
.wn-binlabel.has-remove .wn-binlabel-numbers { font-size: 13.5px; margin-top: 5px; }
.wn-binlabel-remove { font-size: 19px; font-weight: 800; color: #b91c1c; border: 2px solid #b91c1c; border-radius: 8px; padding: 3px 10px; margin-top: 8px; }
/* M53i: the label names the pull-outs. The remove block is a heavy
   black-bordered list (B&W-thermal safe, like the pack-slip box);
   item lines may wrap to 2 lines. A nothing-packable bin leads
   with the big banner instead of the pull-out heading. Labels
   carrying a block shrink the slot code and QR so everything
   still fits the fixed 4x6 frame. */
.wn-binlabel-nopack { font-size: 30px; font-weight: 800; border: 4px solid #000; padding: 8px 12px; margin-top: 10px; }
/* M-split: the unassigned sub-box label has no shipment to
   scan-print yet — a boxed note stands where the QR would sit. */
.wn-binlabel-noship { font-size: 21px; font-weight: 800; color: #44514b; border: 3px solid #44514b; border-radius: 10px; padding: 16px 12px; margin-top: 16px; }
.wn-binlabel-removebox { border: 3px solid #000; padding: 7px 10px; margin-top: 10px; max-width: 100%; box-sizing: border-box; }
.wn-binlabel-remove-head { font-size: 18px; font-weight: 800; margin-bottom: 4px; white-space: nowrap; }
.wn-binlabel-remove-item { font-size: 15.5px; font-weight: 700; line-height: 1.3; padding: 2px 0; border-bottom: 1px dashed #999; text-align: left; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wn-binlabel-remove-item:last-child { border-bottom: none; }
.wn-binlabel.has-remove .wn-binlabel-slot { font-size: 76px; }
.wn-binlabel.has-remove .wn-binlabel-buyer { font-size: 21px; }
.wn-binlabel.has-remove .wn-binlabel-count { font-size: 18px; }
.wn-binlabel.has-remove .wn-binlabel-qr { width: 1.55in; height: 1.55in; margin-top: 10px; }
.wn-binlabel-qr { width: 2.5in; height: 2.5in; margin-top: 14px; }
.wn-binlabel-qr svg { width: 100%; height: 100%; display: block; }
.wn-binlabel-hint { font-size: 17px; font-weight: 700; margin-top: 10px; }
@page wnbin { size: 4in 6in; margin: 0; }
@media print {
  .wn-binlabels { page: wnbin; display: block; }
  .wn-binlabel { border: none; page-break-after: always; break-after: page; margin: 0 auto; height: 5.99in; }
  .wn-binlabel:last-child { page-break-after: auto; break-after: auto; }
}

/* ================= M74: file preview sheet =================
   Global (not board-scoped): the sheet is shared by every board.
   Desktop: centred dialog. Phones (<=640px): bottom sheet ~62vh so
   the page behind stays partly visible and Share/Print are one tap. */
.fpv-root { position: fixed; inset: 0; z-index: 1350; }
.fpv-backdrop { position: absolute; inset: 0; background: rgba(10, 22, 17, .52); }
.fpv-sheet { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, 94vw); height: min(82vh, 880px); background: #fff; border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .32); }
.fpv-grip { display: none; }
.fpv-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid #e5eae7; }
.fpv-name { flex: 1; font-size: 15px; font-weight: 700; color: #10231c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpv-x { flex: none; width: 40px; height: 40px; border: none; border-radius: 50%; background: #eef2f0; color: #10231c; font-size: 17px; cursor: pointer; line-height: 1; }
.fpv-body { flex: 1; position: relative; background: #f4f6f5; min-height: 0; }
.fpv-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #68786f; font-size: 15px; }
.fpv-frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.fpv-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fpv-filecard { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; }
.fpv-fileic { font-size: 54px; line-height: 1; }
.fpv-filename { font-size: 15px; font-weight: 700; color: #10231c; word-break: break-all; }
.fpv-err { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; color: #991b1b; font-size: 15px; }
.fpv-actions { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #e5eae7; background: #fff; }
.fpv-actions button { flex: 1; min-height: 46px; font-size: 15px; }
.fpv-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1500; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.fpv-toast { background: #10231c; color: #ecfdf5; border-radius: 12px; padding: 11px 16px; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); transition: opacity .3s; }
.fpv-toast.err { background: #7f1d1d; color: #fef2f2; }
@media (max-width: 640px) {
  .fpv-sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; height: 62vh; border-radius: 16px 16px 0 0; animation: fpv-up .22s ease-out; }
  .fpv-grip { display: block; width: 44px; height: 5px; border-radius: 3px; background: #d4dcd7; margin: 8px auto 0; flex: none; }
}
@keyframes fpv-up { from { transform: translateY(26px); opacity: .5; } to { transform: none; opacity: 1; } }
