.tv {
  --paper: #f6f1e9;
  --card: #fff;
  --ink: #2b2620;
  --muted: #6c6156;
  --line: #e3d9cd;
  --berry: #a53559;
  --plum: #72304a;
  --pink: #f9eaf0;
  --green: #256b49;
  --amber: #925006;
  --red: #b6312b;
  --blue: #315b77;
  width: 1920px;
  height: 1080px;
  padding: 29px 44px 25px;
  display: grid;
  grid-template-rows: 64px 124px minmax(0, 1fr) 52px;
  gap: 15px;
  overflow: hidden;
  font: 21px/1.32 "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--paper);
}
.tv, .tv * { box-sizing: border-box; }
.tv :is(h1, h2, h3, p) { margin: 0; }
.tv .tv-head, .tv .tv-brand, .tv .panel-head, .tv .issue-top, .tv .match-row,
.tv .oh-top, .tv .oh-meta, .tv .summary-bar { display: flex; align-items: center; }
.tv .tv-head, .tv .panel-head, .tv .issue-top { justify-content: space-between; }
.tv .tv-brand { gap: 16px; }
.tv .brand-mark {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px;
  color: #fff; background: var(--plum);
}
.tv .brand-mark svg { width: 36px; height: 36px; }
.tv .tv-brand small {
  display: block; font-size: 16px; font-weight: 650; letter-spacing: .15em;
  line-height: 1.25; color: var(--muted);
}
.tv h1 { font-size: 37px; line-height: 1.2; font-weight: 800; }
.tv .tv-clock { text-align: right; font-size: 19px; line-height: 1.35; color: var(--muted); }
.tv .tv-clock :is(b, strong, time) { font-size: 30px; font-weight: 750; color: var(--ink); }
.tv .tv-clock small { font-size: 18px; }
.tv .kpis { display: grid; grid-template-columns: 1fr 1fr .94fr 1.45fr 1fr; gap: 15px; }
.tv .kpi, .tv .panel, .tv .summary-bar {
  min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.tv .kpi {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; padding: 10px 23px; overflow: hidden;
}
.tv .kpi .k { color: #584c42; font-size: 20px; font-weight: 680; }
.tv .kpi .v { font-size: 47px; font-weight: 800; line-height: 1.14; letter-spacing: -.025em; }
.tv .kpi .v small { font-size: 20px; font-weight: 650; letter-spacing: 0; margin-left: 4px; }
.tv .kpi .sub { font-size: 17px; color: var(--muted); line-height: 1.4; }
.tv .kpi.ali { background: #fff8ee; border-color: #ead3af; }
.tv .kpi.ali :is(.k,.v) { color: var(--amber); }
.tv .kpi.progress { background: var(--plum); border-color: var(--plum); color: #fff; }
.tv .kpi.progress :is(.k,.sub,small) { color: #fff4f7; }
.tv .kpi.progress .bar {
  position: absolute; left: 23px; right: 23px; bottom: 8px;
  height: 5px; border-radius: 9px; background: #9a637a; overflow: hidden;
}
.tv .kpi.progress .bar i { display: block; height: 100%; border-radius: inherit; background: #f7a8c5; }
.tv .kpi .hot, .tv .kpi.urgent .v { color: var(--red); }
.tv .kpi .ok, .tv .kpi.shipped .v { color: var(--green); }
.tv .tv-body { display: grid; grid-template-columns: minmax(0, 2.96fr) minmax(0, 1fr); gap: 16px; min-height: 0; }
.tv .panel { overflow: hidden; }
.tv .panel-head { min-height: 54px; padding: 0 22px; gap: 12px; border-bottom: 1px solid var(--line); }
.tv h2 { font-size: 28px; font-weight: 800; line-height: 1.25; }
.tv .panel-head > span { font-size: 19px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tv .grid {
  display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.52fr) minmax(0, 1fr) repeat(3, minmax(76px, .65fr));
  align-items: center; column-gap: 18px; padding: 0 22px;
}
.tv .grid > * { min-width: 0; }
.tv .grid > :nth-child(n+4) { text-align: right; }
.tv .table-cols { height: 36px; color: #62564b; font-size: 18px; font-weight: 650; background: #fffdf9; }
.tv .order { margin: 0; }
.tv .oh {
  display: flex; flex-direction: column; justify-content: center; padding: 3px 22px;
  height: 60px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: #f4ede3;
}
.tv .oh-top, .tv .oh-meta { min-width: 0; gap: 12px; white-space: nowrap; }
.tv .oh-top { line-height: 29px; }
.tv .orderno { font-size: 24px; font-weight: 800; border-left: 4px solid var(--berry); padding-left: 9px; }
.tv .customer { font-size: 23px; font-weight: 750; }
.tv .badge, .tv .issue-status {
  display: inline-flex; align-items: center; width: fit-content; border-radius: 6px;
  padding: 1px 8px; font-size: 17px; font-weight: 690; line-height: 1.35; white-space: nowrap;
}
.tv .badge.channel { background: #e9e3d8; color: #655440; }
.tv .badge.channel.ali { color: var(--amber); background: #ffecd1; }
.tv .badge.remark { border: 1px solid #c77b93; background: #fff; color: #90314e; }
.tv .badge.state { background: #f5dce5; color: #842f4a; }
.tv .badge.urgent { background: #fbe2de; color: var(--red); }
.tv .oh-meta { padding-left: 13px; font-size: 16px; line-height: 23px; color: var(--muted); }
.tv .oh-meta b { color: #514538; }
.tv .mini-bar { display: inline-block; width: 104px; height: 6px; border-radius: 8px; background: #ded4c4; overflow: hidden; }
.tv .mini-bar i { height: 100%; display: block; border-radius: inherit; background: var(--berry); }
.tv .sku-row { min-height: 50px; border-bottom: 1px solid #eee7de; }
.tv .product { display: flex; align-items: center; gap: 13px; }
.tv .product img {
  display: block; width: 43px; height: 43px; object-fit: cover; border-radius: 7px;
  border: 1px solid #e0d6c9; background: #f1ede8;
}
.tv .product > span { display: flex; align-items: baseline; column-gap: 12px; min-width: 0; }
.tv .product b { font-size: 26px; font-weight: 800; white-space: nowrap; }
.tv .product small { font-size: 18px; color: var(--muted); }
.tv .sku-row .loc { color: #564938; font-size: 20px; }
.tv .sku-row .stock { color: #4e5c5d; font-size: 20px; }
.tv .sku-row :is(.demand,.picked,.left) { font-size: 26px; font-weight: 750; }
.tv .sku-row .picked { color: var(--green); }
.tv .sku-row .left { color: var(--amber); }
.tv .sku-row .zero { color: #776f66; }
.tv .sku-row .unknown { color: var(--muted); }
.tv .short-panel { display: flex; flex-direction: column; }
.tv #shortages { padding: 0 22px; }
.tv .issue { padding: 17px 0; border-bottom: 1px dashed #ddcfc0; }
.tv .issue:last-child { border-bottom: 0; }
.tv .issue-top { gap: 12px; font-size: 23px; font-weight: 750; }
.tv .issue-top > :last-child { color: var(--red); white-space: nowrap; }
.tv .issue-detail { color: var(--muted); font-size: 18px; line-height: 1.5; margin: 5px 0; }
.tv .issue-status { color: var(--amber); background: #fbefd7; }
.tv .issue-status.pending { background: #fbe9e6; color: var(--red); }
.tv .issue-status.following { background: #fff0d9; color: var(--amber); }
.tv .issue-status.checking { background: #e8f2eb; color: var(--green); }
.tv #match-info { margin: auto 22px 18px; padding: 14px 14px 8px; background: #f4f3ed; border-radius: 8px; }
.tv .match-heading { font-size: 21px; font-weight: 750; }
.tv .match-row { justify-content: space-between; padding: 8px 0; gap: 10px; font-size: 17px; color: var(--muted); }
.tv .match-row + .match-row { border-top: 1px solid #dddcd3; }
.tv .tv-foot { min-width: 0; }
.tv .summary-bar { height: 100%; padding: 0 22px; gap: 28px; white-space: nowrap; font-size: 19px; color: var(--muted); }
.tv .summary-bar b { font-size: 24px; font-weight: 750; color: var(--ink); }
.tv .summary-bar .hot { color: var(--red); }
.tv .summary-bar .picked { color: var(--green); }
.tv .summary-bar .left { color: var(--amber); }
.tv .summary-bar .paging { margin-left: auto; }
.tv .empty { color: var(--muted); padding: 20px; }

/* The display takes its dimensions from the same frame as the warehouse design.
   Row and section measurements also drive pagination at any television resolution. */
html, body { margin:0; width:100%; height:100%; overflow:hidden; background:#f6f1e9; }
#screen { transform-origin:top left; }
[hidden] { display:none !important; }
.tv .brand-mark {font-size:33px; font-weight:800;}
#fresh {color:var(--green);}
#fresh.stale {color:var(--amber);} #fresh.denied {color:var(--red);}
.tv .kpi {line-height:1.35;padding-block:2px;}
.tv .kpi .v {margin:1px 0 4px;line-height:1.28;}
.tv .urgency-pair {display:grid;grid-template-columns:1fr 1fr;width:100%;gap:12px;}
.tv .urgency-pair .v {display:block;}
.tv .urgency-pair>div+div {padding-left:14px;border-left:1px solid var(--line);}
.tv .kpi.progress {padding:0 23px 9px;}
.tv .kpi.progress .sub {font-size:16px;}
progress {appearance:none;background:#ded4c4;border:0;border-radius:8px;color:var(--berry);overflow:hidden;}
progress::-webkit-progress-bar {background:transparent;} progress::-webkit-progress-value {background:var(--berry);}
progress::-moz-progress-bar {background:var(--berry);}
.tv .kpi.progress .bar {width:calc(100% - 46px);height:4px;bottom:5px;}
.tv .kpi.progress progress::-webkit-progress-value {background:#f7a8c5;}
.tv .kpi.progress progress::-moz-progress-bar {background:#f7a8c5;}
.tv .kpi.ali {padding-block:2px;}
.tv .kpi.ali .k {line-height:1.45;} .tv .kpi.ali .k small {font-size:13px;font-weight:500;margin-left:7px;white-space:nowrap;}
.tv .kpi.ali .v {font-size:39px;line-height:1.28;margin:1px 0 2px;}
.tv .kpi.ali .v small {font-size:16px;}
.store-cache {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%;font-size:14px;line-height:1.42;color:var(--muted);}
.store-cache b,.store-cache time {display:block;white-space:nowrap;}
.store-cache b {font-weight:600;color:var(--ink);} .store-cache time {font-size:12px;}
.queue {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);min-height:0;}
#orders,#empty {grid-area:3/1;min-height:0;}
#orders {--order-head:60px;--order-gap:0px;--line-height:50px;--roomy-line:50px;}
.order-head {height:var(--order-head);}
.order-head-left .orderno,.work-note,.spec,.product-text b,.location {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.order-head-left .orderno {max-width:50%;}
.order-head-left .customer,.order-head-left .channel,.tag {flex:none;}
.order-head-left .remark {display:block;flex:0 1 auto;min-width:0;}
.tv .mini-bar {width:104px;height:6px;flex:none;}
.tv .order.expedited .oh,.tv .order.late .oh {background:var(--pink);}
.tv .order.expedited .orderno,.tv .order.late .orderno {border-color:var(--red);}
.tv .sku-row {height:var(--visible-line-height,50px);}
.tv .product > .product-thumb,.product-thumb {display:grid;place-items:center;position:relative;width:43px;height:43px;flex:none;background:#f5f0e9;border:1px solid #e0d6c9;border-radius:7px;overflow:hidden;}
.product-thumb img,.tv .product img {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:white;border:0;}
.thumb-empty {font-size:12px;color:var(--muted);}
.tv .product-text {min-width:0;overflow:hidden;}
.tv .product-text b {flex:0 1 auto;} .tv .spec {flex:0 1 auto;min-width:0;}
.tv .location-date {display:block;overflow:hidden;text-overflow:ellipsis;line-height:1.15;font-size:14px;color:var(--muted);}
.tv .line .num-review {font-size:20px;color:var(--red);}
.tv .line .low {color:var(--amber);}
.tv #shortages {--issue-row:114px;flex:1;min-height:0;}
.tv .short {height:var(--issue-row);padding-block:10px;display:grid;grid-template-columns:43px minmax(0,1fr);gap:10px;align-content:center;}
.short-body {min-width:0;} .tv .issue-top {gap:6px;}
.short-top b,.short-reference>span:first-child,.explain p span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.short-top em {font-size:21px;font-style:normal;} .tv .issue-top .expected {color:var(--amber);}
.short-reference {display:flex;gap:8px;font-size:16px;line-height:1.55;color:var(--muted);}
.short-customer,.explain p strong {white-space:nowrap;flex:none;}
.short-detail {display:flex;align-items:center;gap:6px;flex-wrap:wrap;} .short-detail small {font-size:13px;color:var(--muted);}
#match-info:not([hidden]) {height:calc(55px + var(--match-rows,2) * 31px);flex:none;}
.explain>b {font-size:20px;} .explain p {display:flex;gap:8px;justify-content:space-between;align-items:center;height:30px;font-size:16px;color:var(--muted);}
.explain p+p {border-top:1px solid #dddcd3;}
.empty-state,#empty {color:var(--muted);padding:20px;} #empty {text-align:center;}
#totals {display:flex;align-items:center;gap:28px;}
#notice {color:var(--berry);font-size:18px;font-weight:650;}
#one-page,.turn {margin-left:auto;font-size:17px;} #one-page:empty {display:none;}
.turn {display:flex;align-items:center;gap:13px;} .turn progress {width:100px;height:5px;}
.signal88 {display:inline-block;margin-right:7px;width:8px;height:8px;background:var(--red);border-radius:50%;}
.signal88.new {animation:pulse 2s ease-in-out infinite;}.signal88.late {animation:pulse 3s ease-in-out infinite;}
.signal88.soon {background:#b36a16;animation:pulse 1.5s ease-in-out infinite;}
@keyframes pulse {50%{opacity:.4;}} @media(prefers-reduced-motion:reduce){.signal88{animation:none!important;}}
#sound-controls:not(:empty) {margin-left:auto;margin-right:22px;display:flex;align-items:center;gap:12px;color:var(--muted);font-size:16px;}
#sound-controls button {border:1px solid var(--line);border-radius:7px;padding:6px 12px;background:white;color:var(--berry);font:inherit;}
#sound-controls button[aria-pressed=true] {background:var(--pink);border-color:#bb7a8e;}
#sound-controls [role=status] {color:var(--red);}
