:root {
  --bg: #050b18;
  --panel: rgba(9, 24, 48, .88);
  --panel-2: rgba(11, 31, 61, .72);
  --line: rgba(92, 153, 224, .2);
  --text: #e9f5ff;
  --muted: #7f9fbc;
  --cyan: #21d4fd;
  --blue: #4d8dff;
  --green: #38e6a5;
  --amber: #ffbe62;
  --pink: #ff77b7;
  --violet: #a78bfa;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
body { background: radial-gradient(ellipse at 50% -20%, #12305a 0, #08172e 38%, #050b18 78%); }
body:before, body:after { content: ""; position: fixed; pointer-events: none; z-index: 0; }
body:before { inset: 0; background-image: linear-gradient(rgba(86, 143, 199, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(86, 143, 199, .045) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 90%); }
body:after { width: calc(48 * var(--display-vw, 1vw)); height: calc(48 * var(--display-vw, 1vw)); top: calc(8 * var(--display-vh, 1vh)); left: calc(26 * var(--display-vw, 1vw)); border-radius: 50%; background: rgba(12, 126, 194, .07); filter: blur(70px); }
.screen { position: relative; z-index: 1; width: calc(100 * var(--display-vw, 1vw)); height: calc(100 * var(--display-vh, 1vh)); max-width: 1920px; min-height: 540px; margin: auto; padding: calc(1.2 * var(--display-vh, 1vh)) calc(1.4 * var(--display-vw, 1vw)) calc(1 * var(--display-vh, 1vh)); display: flex; flex-direction: column; gap: calc(1 * var(--display-vh, 1vh)); }
/* The fitted canvas must not inherit viewport minimums or responsive reflow. */
html[data-display-fit="ready"] .screen { position: absolute; margin: 0; min-width: 0; min-height: 0; transform-origin: 0 0; }
.topbar { height: calc(7 * var(--display-vh, 1vh)); min-height: 48px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(78, 161, 230, .25); position: relative; }
.topbar:after { content: ""; position: absolute; bottom: -1px; left: 0; width: 29%; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent); box-shadow: 0 0 14px var(--cyan); }
.topbar:before { content: ""; position: absolute; left: 35%; right: 35%; top: 0; height: 100%; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(20, 99, 166, .12), transparent); clip-path: polygon(10% 0, 90% 0, 100% 48%, 90% 100%, 10% 100%, 0 48%); }
.topbar-slogan { position: absolute; left: calc(.8 * var(--display-vw, 1vw)); top: 3px; color: #5b94b8; font-size: clamp(7px, calc(.46 * var(--display-vw, 1vw)), 10px); letter-spacing: .2em; white-space: nowrap; }
.brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -45%); display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 37px; height: 37px; color: var(--cyan); font-size: 31px; font-weight: 700; border: 1px solid rgba(33, 212, 253, .7); border-radius: 9px; transform: rotate(-18deg); box-shadow: 0 0 18px rgba(33, 212, 253, .25), inset 0 0 12px rgba(33, 212, 253, .18); }
h1 { margin: 0; font-size: clamp(19px, calc(1.45 * var(--display-vw, 1vw)), 30px); letter-spacing: .15em; font-weight: 650; line-height: 1.15; text-shadow: 0 0 16px rgba(107, 208, 255, .22); }
.brand p { margin: 4px 0 0; color: #6c9ab9; font-size: clamp(7px, calc(.48 * var(--display-vw, 1vw)), 10px); letter-spacing: .22em; }
.public-badge { margin-left: 12px; color: #69d2ef; letter-spacing: .08em; padding: 2px 5px; border: 1px solid rgba(105, 210, 239, .35); border-radius: 3px; }
.screen-meta { position: absolute; right: calc(.8 * var(--display-vw, 1vw)); top: 3px; color: var(--muted); font-size: clamp(9px, calc(.58 * var(--display-vw, 1vw)), 12px); display: flex; align-items: center; gap: 9px; }
.topbar-motto { color: #7ba5c3; letter-spacing: .12em; margin-right: 5px; }
.screen-meta b { color: #cceeff; font-weight: 500; letter-spacing: .06em; }
.meta-divider { color: #345676; }
.connection-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--amber); box-shadow: 0 0 9px var(--amber); }
.connection-dot.online { background: var(--green); box-shadow: 0 0 9px var(--green); }
.connection-dot.offline { background: #ff697f; box-shadow: 0 0 9px #ff697f; }
.kpi-grid { flex: 0 0 calc(9.2 * var(--display-vh, 1vh)); min-height: 66px; display: grid; grid-template-columns: repeat(6, 1fr); gap: calc(.65 * var(--display-vw, 1vw)); }
.kpi-card, .panel { position: relative; background: linear-gradient(135deg, rgba(15, 39, 73, .84), rgba(6, 20, 43, .88)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(170, 220, 255, .05), 0 9px 20px rgba(0,0,0,.14); overflow: hidden; }
.kpi-card { padding: calc(1.2 * var(--display-vh, 1vh)) calc(1 * var(--display-vw, 1vw)) calc(1.1 * var(--display-vh, 1vh)) calc(4.3 * var(--display-vw, 1vw)); border-top: 2px solid var(--accent); }
.kpi-card:before, .panel:before { content: ""; position: absolute; width: 45px; height: 1px; left: 10px; top: 0; background: var(--accent, var(--cyan)); box-shadow: 0 0 10px var(--accent, var(--cyan)); }
.accent-cyan { --accent: var(--cyan); } .accent-blue { --accent: var(--blue); } .accent-violet { --accent: var(--violet); } .accent-green { --accent: var(--green); } .accent-amber { --accent: var(--amber); } .accent-pink { --accent: var(--pink); }
.kpi-label { display: block; color: #88abc7; font-size: clamp(10px, calc(.68 * var(--display-vw, 1vw)), 14px); letter-spacing: .06em; }
.kpi-icon { position: absolute; left: calc(1 * var(--display-vw, 1vw)); top: 50%; transform: translateY(-53%); display: flex; align-items: center; justify-content: center; width: clamp(28px, calc(2.7 * var(--display-vw, 1vw)), 52px); height: clamp(28px, calc(2.7 * var(--display-vw, 1vw)), 52px); border: 1px solid rgba(33, 212, 253, .42); border-radius: 8px; color: var(--accent); background: rgba(15, 57, 93, .64); box-shadow: inset 0 0 14px rgba(33, 212, 253, .12), 0 0 12px rgba(33, 212, 253, .12); font-size: clamp(16px, calc(1.15 * var(--display-vw, 1vw)), 24px); }
@supports (color: color-mix(in srgb, #fff 50%, transparent)) {
  .kpi-icon { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: inset 0 0 14px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 15%, transparent); }
}
.kpi-card strong { display: block; margin: calc(.3 * var(--display-vh, 1vh)) 0; font-family: "DIN Alternate", "Roboto Mono", monospace; color: var(--text); font-size: clamp(20px, calc(2.05 * var(--display-vw, 1vw)), 41px); line-height: 1; font-weight: 600; letter-spacing: .04em; text-shadow: 0 0 15px rgba(103, 194, 255, .24); }
.kpi-card small { color: #6287a8; font-size: clamp(8px, calc(.5 * var(--display-vw, 1vw)), 10px); }
.dashboard-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 21.5% 54.5% 21.5%; gap: 1.2%; }
.column { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: calc(.8 * var(--display-vh, 1vh)); }
.panel { min-height: 0; border-radius: 3px; }
.panel-title { height: calc(3.1 * var(--display-vh, 1vh)); min-height: 24px; padding: calc(.5 * var(--display-vh, 1vh)) calc(.7 * var(--display-vw, 1vw)) 0; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(100, 160, 217, .12); }
.panel-title h2 { margin: 0; font-size: clamp(11px, calc(.72 * var(--display-vw, 1vw)), 15px); letter-spacing: .08em; font-weight: 560; }
.panel-title > span { color: #658eaf; font-size: clamp(8px, calc(.48 * var(--display-vw, 1vw)), 10px); }
.chart-panel { flex: 1.05; }
.list-panel { flex: 1; }
.split-panel { flex: 1.16; }
.compact-list { flex: .9; }
.bar-chart { height: calc(100% - 3.1 * var(--display-vh, 1vh)); min-height: 46px; display: flex; align-items: end; gap: 1.1%; padding: calc(1.1 * var(--display-vh, 1vh)) calc(.8 * var(--display-vw, 1vw)) calc(1.1 * var(--display-vh, 1vh)); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgba(105,155,202,.1) 25%); }
.bar-item { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 3px; }
.bar-item i { display: block; width: 60%; min-height: 5px; border-radius: 2px 2px 0 0; background: linear-gradient(to top, #1474a8, var(--cyan)); box-shadow: 0 0 10px rgba(33,212,253,.3); }
.bar-item b { color: #7798b3; font-size: clamp(7px, calc(.46 * var(--display-vw, 1vw)), 10px); font-weight: 400; }
.line-chart { height: calc(100% - 3.1 * var(--display-vh, 1vh)); position: relative; padding: calc(1.2 * var(--display-vh, 1vh)) calc(.6 * var(--display-vw, 1vw)) calc(1 * var(--display-vh, 1vh)); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgba(105,155,202,.1) 25%); }
.line-chart svg { width: 100%; height: 82%; position: absolute; left: 0; top: 7%; overflow: visible; }
.line-chart polyline { fill: none; stroke: var(--violet); stroke-width: 3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px rgba(167,139,250,.8)); }
.line-chart:after { content: ""; position: absolute; bottom: 5px; left: 8px; right: 8px; border-top: 1px solid rgba(105,155,202,.14); }
.rank-list { list-style: none; counter-reset: rank; margin: 0; padding: calc(.45 * var(--display-vh, 1vh)) calc(.7 * var(--display-vw, 1vw)) calc(.65 * var(--display-vh, 1vh)); }
.rank-list li { counter-increment: rank; display: flex; align-items: center; gap: calc(.45 * var(--display-vw, 1vw)); height: calc(2.45 * var(--display-vh, 1vh)); min-height: 17px; color: #9ab9d2; font-size: clamp(8px, calc(.53 * var(--display-vw, 1vw)), 11px); }
.rank-list li.module-empty { counter-increment: none; justify-content: center; height: 100%; min-height: 46px; color: #5b7e99; font-size: clamp(8px, calc(.48 * var(--display-vw, 1vw)), 10px); letter-spacing: .03em; }
.rank-list li.module-empty:before { display: none; }
.rank-list li:before { content: counter(rank, decimal-leading-zero); width: 18px; color: #557999; font-family: monospace; }
.rank-list li:nth-child(1):before { color: var(--cyan); } .rank-list li:nth-child(2):before { color: #76b9e6; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.rank-track { width: 34%; height: 4px; border-radius: 4px; background: #132e4c; overflow: hidden; }
.rank-track i { display: block; height: 100%; background: linear-gradient(90deg, #2278b1, var(--cyan)); border-radius: inherit; }
.rank-value { width: 26px; text-align: right; color: #c1e7fb; font-family: monospace; }
.category-body { height: calc(100% - 3.1 * var(--display-vh, 1vh)); display: flex; align-items: center; gap: calc(1 * var(--display-vw, 1vw)); padding: calc(.5 * var(--display-vh, 1vh)) calc(.7 * var(--display-vw, 1vw)); }
.donut { width: min(calc(6.6 * var(--display-vw, 1vw)), 100px); height: min(calc(6.6 * var(--display-vw, 1vw)), 100px); min-width: 53px; min-height: 53px; display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 50%; background: conic-gradient(var(--cyan) 0 39%, var(--violet) 39% 68%, var(--amber) 68% 87%, var(--green) 87% 100%); position: relative; font-family: monospace; color: #e8fbff; font-size: clamp(12px, calc(.8 * var(--display-vw, 1vw)), 17px); }
.donut:before { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: #0a1b35; }
.donut span, .donut small { position: relative; z-index: 1; } .donut small { color: #6d94af; font-family: inherit; font-size: clamp(7px, calc(.43 * var(--display-vw, 1vw)), 9px); }
.legend { flex: 1; list-style: none; margin: 0; padding: 0; color: #8baac1; font-size: clamp(8px, calc(.5 * var(--display-vw, 1vw)), 10px); }
.legend li { display: flex; align-items: center; line-height: 2.2; gap: 5px; } .legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--legend, var(--cyan)); }
.live-label { color: var(--green) !important; } .live-label i, .activity-title i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.network-panel { flex: 2.1; min-height: 205px; }
.network-map { height: calc(100% - 3.1 * var(--display-vh, 1vh)); position: relative; isolation: isolate; background: radial-gradient(ellipse at 50% 48%, rgba(30,122,187,.24), rgba(8,34,64,.3) 48%, transparent 75%), linear-gradient(rgba(68, 138, 190, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(68, 138, 190, .045) 1px, transparent 1px); background-size: auto, 30px 30px, 30px 30px; }
.network-map:before { content: ""; position: absolute; inset: 7% 10%; z-index: -1; border: 1px solid rgba(58, 139, 204, .13); border-radius: 50%; box-shadow: 0 0 55px rgba(31, 159, 227, .13), inset 0 0 45px rgba(22, 91, 150, .18); }
.network-map:after { content: ""; }
.network-caption { position: absolute; right: calc(1.1 * var(--display-vw, 1vw)); top: calc(1 * var(--display-vh, 1vh)); color: rgba(116, 187, 220, .65); font-size: clamp(7px, calc(.43 * var(--display-vw, 1vw)), 9px); letter-spacing: .08em; }
.network-map.network-unavailable .network-caption { color: #7894a7; }
.network-map.network-unavailable svg { opacity: .72; }
.network-map svg { display: block; width: 100%; height: 100%; }
.china-map-layer { opacity: .94; }
.china-map-layer .china-province { fill: rgba(27, 95, 150, .32); stroke: rgba(85, 177, 230, .46); stroke-width: 1.35; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(33, 212, 253, .2)); transition: fill .25s ease, stroke .25s ease; }
.china-map-layer .china-province:nth-child(3n) { fill: rgba(35, 117, 173, .26); }
.china-map-layer .china-province:nth-child(4n) { fill: rgba(30, 84, 143, .34); }
.network-map.map-ready #map-fallback { display: none; }
.map-outline { fill: rgba(31,98,151,.2); stroke: rgba(84,174,232,.52); stroke-width: 1.8; filter: drop-shadow(0 0 6px rgba(35,176,244,.25)); }
.map-island { fill: rgba(28, 93, 145, .23); stroke: rgba(84, 174, 232, .4); stroke-width: 1; }
.routes path { fill: none; stroke: url(#routeGlow); stroke-width: 1.6; stroke-dasharray: 5 4; animation: route-flow 8s linear infinite; }
.map-dots circle { fill: #51e2ff; stroke: #d7fbff; stroke-width: 1.5; filter: drop-shadow(0 0 6px #21d4fd); animation: node-pulse 2.4s ease-in-out infinite; }
.map-label { position: absolute; color: #9bc6dc; font-size: clamp(7px, calc(.48 * var(--display-vw, 1vw)), 10px); opacity: .92; text-shadow: 0 0 8px rgba(33,212,253,.5); }
.label-beijing { top: 32%; left: 68%; } .label-shanghai { top: 59%; left: 72%; } .label-shenzhen { bottom: 9%; left: 62%; } .label-chengdu { top: 63%; left: 45%; } .label-xian { top: 51%; left: 53%; } .label-kunming { bottom: 12%; left: 33%; } .label-west { top: 34%; left: 22%; }
.map-legend { position: absolute; left: calc(1 * var(--display-vw, 1vw)); top: 10%; display: grid; gap: calc(.7 * var(--display-vh, 1vh)); color: #84abc2; font-size: clamp(7px, calc(.44 * var(--display-vw, 1vw)), 9px); }
.map-legend span { display: flex; align-items: center; gap: calc(.35 * var(--display-vw, 1vw)); white-space: nowrap; }
.map-legend i { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #31c9ff; box-shadow: 0 0 8px rgba(33,212,253,.8); }
.map-legend .legend-warehouse { background: #ffbf5c; box-shadow: 0 0 8px rgba(255,190,98,.8); }
.map-legend .legend-customer { background: #49e5ac; box-shadow: 0 0 8px rgba(56,230,165,.8); }
.map-legend .legend-route { width: 15px; height: 2px; border-radius: 0; background: #9a8cff; box-shadow: 0 0 8px rgba(167,139,250,.8); }
.map-stats { position: absolute; top: 17%; right: calc(1 * var(--display-vw, 1vw)); display: flex; flex-direction: column; gap: calc(1.1 * var(--display-vh, 1vh)); width: calc(7.3 * var(--display-vw, 1vw)); min-width: 80px; }
.map-stats div { display: flex; flex-direction: column; border-left: 2px solid rgba(33, 212, 253, .6); padding-left: calc(.45 * var(--display-vw, 1vw)); }
.map-stats span { color: #749bb7; font-size: clamp(7px, calc(.42 * var(--display-vw, 1vw)), 9px); }
.map-stats strong { margin-top: 2px; color: #7edfff; font: 600 clamp(16px, calc(1.2 * var(--display-vw, 1vw)), 25px)/1 "Roboto Mono", monospace; text-shadow: 0 0 12px rgba(33, 212, 253, .36); }
.map-stats strong span { color: #74a9c1; font: inherit; font-size: .48em; }
@keyframes route-flow { to { stroke-dashoffset: -90; } } @keyframes node-pulse { 50% { opacity: .45; transform: scale(.74); transform-origin: center; } }
.flow-panel { flex: 1; min-height: 150px; }
.flow-track { height: calc(100% - 3.1 * var(--display-vh, 1vh)); display: flex; align-items: center; justify-content: space-around; gap: calc(.2 * var(--display-vw, 1vw)); padding: 0 calc(.55 * var(--display-vw, 1vw)); position: relative; overflow: hidden; }
.flow-track:after { content: ""; position: absolute; left: 2%; right: 2%; bottom: -5%; height: 34%; opacity: .62; background: radial-gradient(ellipse at 12% 110%, transparent 0 38%, rgba(33,212,253,.4) 39%, transparent 41%), radial-gradient(ellipse at 48% 110%, transparent 0 42%, rgba(92,153,224,.34) 43%, transparent 45%), radial-gradient(ellipse at 83% 110%, transparent 0 36%, rgba(167,139,250,.28) 37%, transparent 39%), linear-gradient(180deg, transparent, rgba(16,89,145,.18)); border-top: 1px solid rgba(33,212,253,.25); pointer-events: none; }
.flow-track:before { content: ""; position: absolute; left: 4.8%; right: 4.8%; top: 50%; border-top: 1px dashed rgba(60, 167, 222, .5); box-shadow: 0 0 10px rgba(33,212,253,.2); }
.flow-node { width: 9.2%; min-width: 45px; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: calc(.65 * var(--display-vh, 1vh)); color: #8bb3ce; text-align: center; font-size: clamp(7px, calc(.48 * var(--display-vw, 1vw)), 10px); line-height: 1.2; }
.flow-node:not(:last-child):after { content: "›"; position: absolute; top: calc(clamp(23px, calc(2.1 * var(--display-vw, 1vw)), 40px) / 2 - .65em); right: -20%; color: #73caff; font-size: clamp(14px, calc(1 * var(--display-vw, 1vw)), 21px); text-shadow: 0 0 8px rgba(33, 212, 253, .7); }
.flow-node .node-circle { width: clamp(23px, calc(2.1 * var(--display-vw, 1vw)), 40px); height: clamp(23px, calc(2.1 * var(--display-vw, 1vw)), 40px); display: flex; align-items: center; justify-content: center; border: 1px solid rgba(73, 181, 237, .68); border-radius: 50%; color: var(--cyan); font-size: clamp(12px, calc(.8 * var(--display-vw, 1vw)), 18px); background: #092343; box-shadow: 0 0 13px rgba(33,212,253,.32), inset 0 0 10px rgba(33,212,253,.18); }
.flow-node.done .node-circle { color: var(--green); border-color: rgba(56,230,165,.68); box-shadow: 0 0 13px rgba(56,230,165,.3), inset 0 0 10px rgba(56,230,165,.16); }
.flow-node.current .node-circle { color: #fff; border-color: var(--amber); box-shadow: 0 0 17px rgba(255,190,98,.64); }
.center-bottom { display: none; }
.mini-panel { min-width: 0; }
.node-stats, .route-status { height: calc(100% - 3.1 * var(--display-vh, 1vh)); display: flex; align-items: center; justify-content: space-around; gap: calc(.3 * var(--display-vw, 1vw)); padding: 0 calc(.4 * var(--display-vw, 1vw)); }
.node-stat { text-align: center; color: #6f9ab9; font-size: clamp(7px, calc(.45 * var(--display-vw, 1vw)), 9px); } .node-stat strong { display: block; margin-bottom: 2px; color: #bcecff; font-family: monospace; font-size: clamp(13px, calc(.85 * var(--display-vw, 1vw)), 18px); }
.route-chip { flex: 1; min-width: 0; padding: calc(.4 * var(--display-vh, 1vh)) calc(.35 * var(--display-vw, 1vw)); text-align: center; color: #81a9c4; font-size: clamp(7px, calc(.42 * var(--display-vw, 1vw)), 9px); border-left: 1px solid rgba(85,145,193,.2); } .route-chip strong { display: block; color: #d2f4ff; font-size: clamp(11px, calc(.7 * var(--display-vw, 1vw)), 14px); }
.module-empty { display: flex; align-items: center; justify-content: center; min-height: 42px; height: 100%; color: #587995; font-size: clamp(8px, calc(.48 * var(--display-vw, 1vw)), 10px); letter-spacing: .04em; }
.module-empty:before { content: "·"; margin-right: .35em; color: #6ea6c5; }
.inventory-empty { grid-column: 1 / -1; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px dashed rgba(93, 153, 202, .22); color: #5b7e99; text-align: center; padding: calc(1.1 * var(--display-vh, 1vh)) calc(.4 * var(--display-vw, 1vw)); font-size: clamp(8px, calc(.48 * var(--display-vw, 1vw)), 10px); }
.inventory-empty strong { color: #79a6c0; font-size: clamp(10px, calc(.6 * var(--display-vw, 1vw)), 13px); font-weight: 500; }
.inventory-empty span { color: #567994; }
.railway-selection-panel { flex: 1; }
.inventory-panel { flex: .92; } .inventory-grid { height: calc(100% - 3.1 * var(--display-vh, 1vh)); display: grid; grid-template-columns: repeat(2, 1fr); align-content: center; gap: calc(.5 * var(--display-vw, 1vw)); padding: calc(.5 * var(--display-vh, 1vh)) calc(.7 * var(--display-vw, 1vw)); }
.inventory-item { padding: calc(.75 * var(--display-vh, 1vh)) calc(.45 * var(--display-vw, 1vw)); background: rgba(14,50,82,.48); border-left: 3px solid var(--state); color: #8babbe; font-size: clamp(8px, calc(.48 * var(--display-vw, 1vw)), 10px); } .inventory-item strong { display: block; color: #d2eff9; font-family: monospace; font-size: clamp(15px, calc(1 * var(--display-vw, 1vw)), 21px); line-height: 1.1; }
.railway-selection-card { --state: var(--cyan); }
.railway-selection-card:nth-child(2) { --state: var(--blue); }
.railway-selection-card:nth-child(3) { --state: var(--violet); }
.railway-selection-card:nth-child(4) { --state: var(--green); }
.logistics-panel { flex: 1.1; } .logistics-summary { height: 27%; display: flex; align-items: center; justify-content: space-around; border-bottom: 1px solid rgba(100,160,217,.1); } .logi-stat { text-align: center; color: #7798af; font-size: clamp(7px, calc(.43 * var(--display-vw, 1vw)), 9px); } .logi-stat strong { display: block; color: #bff1ff; font-family: monospace; font-size: clamp(14px, calc(.9 * var(--display-vw, 1vw)), 19px); }
.route-list { height: 68%; overflow: hidden; padding: calc(.2 * var(--display-vh, 1vh)) calc(.7 * var(--display-vw, 1vw)); } .route-row { display: flex; align-items: center; gap: calc(.35 * var(--display-vw, 1vw)); height: 31%; min-height: 17px; color: #8faec3; font-size: clamp(7px, calc(.44 * var(--display-vw, 1vw)), 9px); } .route-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .route-row b { margin-left: auto; color: var(--green); font-weight: 400; }
.alert-panel { flex: 1.06; border-color: rgba(255, 119, 183, .2); } .warning-count { min-width: 20px; text-align: center; padding: 2px 6px; border-radius: 9px; color: #ffd5e7 !important; background: rgba(255, 87, 149, .24); }
.alert-list { height: calc(100% - 3.1 * var(--display-vh, 1vh)); overflow: hidden; padding: calc(.35 * var(--display-vh, 1vh)) calc(.7 * var(--display-vw, 1vw)); } .alert-row { display: flex; align-items: center; gap: calc(.35 * var(--display-vw, 1vw)); height: 24%; min-height: 18px; color: #b2c7d5; font-size: clamp(7px, calc(.44 * var(--display-vw, 1vw)), 9px); border-bottom: 1px solid rgba(100,160,217,.08); } .alert-row i { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--alert, var(--amber)); box-shadow: 0 0 6px var(--alert, var(--amber)); } .alert-row b { margin-left: auto; color: var(--alert, var(--amber)); font-weight: 500; white-space: nowrap; }
.activity-bar { flex: 0 0 calc(4.2 * var(--display-vh, 1vh)); min-height: 29px; display: flex; align-items: center; gap: calc(1 * var(--display-vw, 1vw)); padding: 0 calc(.8 * var(--display-vw, 1vw)); border: 1px solid rgba(92,153,224,.2); background: rgba(8, 25, 49, .83); color: #87a8be; font-size: clamp(8px, calc(.52 * var(--display-vw, 1vw)), 11px); }
.activity-title { flex: 0 0 auto; color: var(--cyan); white-space: nowrap; } .activity-window { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; } .activity-ticker { display: inline-block; min-width: 100%; animation: ticker 35s linear infinite; } .activity-event { display: inline-block; margin-right: calc(5 * var(--display-vw, 1vw)); } .activity-event b { color: #bdeaff; font-weight: 500; } .activity-event em { color: var(--green); font-style: normal; margin: 0 4px; } .updated-at { flex: 0 0 auto; color: #5e809c; } .updated-at b { color: #99c6df; font-weight: 400; }
@keyframes ticker { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.state-overlay { display: none; position: fixed; z-index: 10; inset: 0; align-items: center; justify-content: center; background: rgba(3, 9, 20, .96); } .state-overlay.visible { display: flex; } .state-card { width: 90%; max-width: 430px; padding: 34px 30px; text-align: center; border: 1px solid rgba(61,160,220,.38); background: linear-gradient(145deg, #0d2444, #071329); box-shadow: 0 0 45px rgba(33,212,253,.12); } .state-icon { display: block; color: var(--cyan); font-size: 31px; margin-bottom: 12px; } .state-card strong { display: block; font-size: 19px; letter-spacing: .08em; } .state-card p { margin: 10px 0 20px; color: #87a6bb; font-size: 12px; line-height: 1.7; } .state-card button { display: none; padding: 7px 18px; color: #d9f8ff; border: 1px solid rgba(33,212,253,.55); border-radius: 3px; background: transparent; cursor: pointer; }

/* TV v3: proportional 1080p/4K presentation, locally rendered charts. */
.screen { max-width: none; padding: calc(1 * var(--display-vh, 1vh)) calc(.9 * var(--display-vw, 1vw)); gap: calc(.9 * var(--display-vh, 1vh)); }
.brand-mark { display: none; }
.brand { top: 46%; text-align: center; }
h1 { font-size: calc(1.85 * var(--display-vw, 1vw)); font-weight: 700; letter-spacing: .16em; }
.brand p { font-size: calc(.53 * var(--display-vw, 1vw)); margin-top: calc(.6 * var(--display-vh, 1vh)); letter-spacing: .16em; }
.public-badge { font-size: calc(.5 * var(--display-vw, 1vw)); }
.topbar { min-height: 60px; flex-basis: calc(6.8 * var(--display-vh, 1vh)); }
.topbar-slogan { top: calc(1.5 * var(--display-vh, 1vh)); font-size: calc(.61 * var(--display-vw, 1vw)); }
.screen-meta { top: calc(1.1 * var(--display-vh, 1vh)); font-size: calc(.58 * var(--display-vw, 1vw)); gap: calc(.45 * var(--display-vw, 1vw)); }
.topbar-motto { position: absolute; right: 0; top: calc(2.4 * var(--display-vh, 1vh)); font-size: calc(.55 * var(--display-vw, 1vw)); }
.kpi-card { border-radius: calc(.35 * var(--display-vw, 1vw)); border-top-width: 1px; padding-left: calc(4.5 * var(--display-vw, 1vw)); }
.kpi-label { font-size: calc(.8 * var(--display-vw, 1vw)); color: #a8c8dd; }
.kpi-card strong { font-size: calc(1.72 * var(--display-vw, 1vw)); line-height: 1.14; margin: calc(.4 * var(--display-vh, 1vh)) 0 calc(.2 * var(--display-vh, 1vh)); }
.kpi-card small { font-size: calc(.55 * var(--display-vw, 1vw)); }
.kpi-icon { width: calc(2.9 * var(--display-vw, 1vw)); height: calc(2.9 * var(--display-vw, 1vw)); }
.kpi-icon svg { width: 64%; height: 64%; }
.kpi-card:before { width: 35%; }
.panel { background: linear-gradient(125deg, rgba(7,34,58,.9), rgba(4,20,38,.92)); border-color: #164563; border-radius: calc(.3 * var(--display-vw, 1vw)); }
.panel:before { width: 3px; height: calc(1.7 * var(--display-vh, 1vh)); top: calc(.8 * var(--display-vh, 1vh)); left: -1px; box-shadow: 0 0 8px #2499c2; }
.panel-title { min-height: 22px; padding: calc(.4 * var(--display-vh, 1vh)) calc(.8 * var(--display-vw, 1vw)) 0; height: calc(3.5 * var(--display-vh, 1vh)); border: none; }
.panel-title h2 { font-size: calc(.9 * var(--display-vw, 1vw)); color: #e0eff8; letter-spacing: .1em; }
.panel-title > span { font-size: calc(.6 * var(--display-vw, 1vw)); }
.column { gap: calc(.9 * var(--display-vh, 1vh)); }
.dashboard-grid { gap: 1.2%; }
.compact-list { flex: 1.05; }
.bar-chart, .line-chart { display: block; padding: 0; background: none; height: calc(100% - 3.5 * var(--display-vh, 1vh)); }
.line-chart:after { display: none; }
.rank-list { padding: calc(.3 * var(--display-vh, 1vh)) calc(.8 * var(--display-vw, 1vw)) calc(.65 * var(--display-vh, 1vh)); height: calc(100% - 3.5 * var(--display-vh, 1vh)); }
.rank-list li { font-size: calc(.69 * var(--display-vw, 1vw)); min-height: 0; height: 20%; gap: calc(.4 * var(--display-vw, 1vw)); }
.rank-list li:before { width: calc(1.25 * var(--display-vw, 1vw)); }
.rank-track { height: calc(.46 * var(--display-vh, 1vh)); width: 31%; }
.rank-value { width: auto; min-width: calc(3.4 * var(--display-vw, 1vw)); font-size: calc(.66 * var(--display-vw, 1vw)); }
.rank-pending { flex-direction: column; gap: calc(.9 * var(--display-vh, 1vh)) !important; padding: calc(1 * var(--display-vh, 1vh)) 0; }
.rank-pending .pending-symbol { width: calc(3 * var(--display-vw, 1vw)); height: calc(3 * var(--display-vw, 1vw)); border: 1px solid #28455d; border-radius: 50%; color: #608ba5; display: flex; align-items: center; justify-content: center; font-size: calc(1.6 * var(--display-vw, 1vw)); }
.rank-pending strong { color: #8aaec5; font-size: calc(.8 * var(--display-vw, 1vw)); font-weight: 500; }
.rank-pending > span:last-child { color: #63839b; font-size: calc(.63 * var(--display-vw, 1vw)); }
.category-body { height: calc(100% - 3.5 * var(--display-vh, 1vh)); gap: calc(.4 * var(--display-vw, 1vw)); padding: calc(.3 * var(--display-vh, 1vh)) calc(.6 * var(--display-vw, 1vw)); }
.chart-donut { background: none; border-radius: 0; width: calc(8 * var(--display-vw, 1vw)); height: 100%; max-height: calc(14 * var(--display-vh, 1vh)); flex: 0 0 calc(8 * var(--display-vw, 1vw)); min-height: 0; }
.chart-donut:before { display: none; }
.legend { font-size: calc(.65 * var(--display-vw, 1vw)); }
.legend li { line-height: 1.6; gap: calc(.35 * var(--display-vw, 1vw)); }
.legend b { margin-left: auto; color: #c4e2f3; font-size: calc(.65 * var(--display-vw, 1vw)); font-weight: 500; }
.network-panel { flex: 3.3; min-height: 0; }
.network-map { height: calc(100% - 3.5 * var(--display-vh, 1vh)); background-size: auto, calc(3 * var(--display-vw, 1vw)) calc(3 * var(--display-vw, 1vw)), calc(3 * var(--display-vw, 1vw)) calc(3 * var(--display-vw, 1vw)); }
.network-map:before { display: none; }
.network-chart { position: absolute; top: 0; left: 0; width: 100%; height: calc(100% - 2.8 * var(--display-vh, 1vh)); }
.network-map-message { position: absolute; left: 20%; top: 46%; width: 60%; text-align: center; color: #82a8c0; font-size: calc(.8 * var(--display-vw, 1vw)); pointer-events: none; }
.map-legend { top: 3%; left: calc(1 * var(--display-vw, 1vw)); font-size: calc(.66 * var(--display-vw, 1vw)); gap: calc(.9 * var(--display-vh, 1vh)); pointer-events: none; }
.map-legend i { width: calc(.48 * var(--display-vw, 1vw)); height: calc(.48 * var(--display-vw, 1vw)); }
.map-legend .legend-route { width: calc(1.1 * var(--display-vw, 1vw)); background: #42c8ee; }
.map-stats { right: calc(1 * var(--display-vw, 1vw)); top: 5%; width: calc(6 * var(--display-vw, 1vw)); min-width: 0; gap: calc(1.8 * var(--display-vh, 1vh)); pointer-events: none; }
.map-stats span { font-size: calc(.63 * var(--display-vw, 1vw)); }
.map-stats strong { font-size: calc(1.7 * var(--display-vw, 1vw)); letter-spacing: .06em; }
.map-stats p { color: #77a3bf; font-size: calc(.59 * var(--display-vw, 1vw)); line-height: 1.8; margin-top: calc(.5 * var(--display-vh, 1vh)); white-space: pre-line; }
.network-caption { top: auto; bottom: calc(1 * var(--display-vh, 1vh)); left: calc(1 * var(--display-vw, 1vw)); right: auto; font-size: calc(.61 * var(--display-vw, 1vw)); color: #6992ac; pointer-events: none; }
.map-attribution { position: absolute; right: calc(1 * var(--display-vw, 1vw)); bottom: calc(1 * var(--display-vh, 1vh)); z-index: 2; color: #7191a6; font-size: calc(.58 * var(--display-vw, 1vw)); font-size: clamp(8px, calc(.58 * var(--display-vw, 1vw)), 22px); font-weight: 400; line-height: 1.4; text-align: right; white-space: nowrap; background: transparent; pointer-events: none; }
.flow-panel { flex: 1; min-height: 130px; }
.flow-track { height: calc(100% - 7.5 * var(--display-vh, 1vh)); padding: calc(1 * var(--display-vh, 1vh)) calc(.6 * var(--display-vw, 1vw)) 0; }
.flow-track:before { top: 42%; border-top-style: solid; border-color: rgba(52,181,236,.4); }
.flow-node { font-size: calc(.68 * var(--display-vw, 1vw)); color: #b3d5e8; gap: calc(1.1 * var(--display-vh, 1vh)); }
.flow-node .node-circle { width: calc(2.8 * var(--display-vw, 1vw)); height: calc(2.8 * var(--display-vw, 1vw)); }
.node-circle svg { width: 54%; height: 54%; }
.flow-node:not(:last-child):after { font-size: calc(1.5 * var(--display-vw, 1vw)); top: calc(.3 * var(--display-vw, 1vw)); right: -26%; }
.flow-caption { position: absolute; bottom: calc(1.4 * var(--display-vh, 1vh)); left: 0; width: 100%; text-align: center; color: #63bbdf; font-size: calc(.73 * var(--display-vw, 1vw)); letter-spacing: .3em; }
.inventory-visual { display: flex; align-items: center; height: calc(100% - 3.5 * var(--display-vh, 1vh)); gap: calc(.6 * var(--display-vw, 1vw)); }
.inventory-ring { width: calc(8.8 * var(--display-vw, 1vw)); height: 90%; flex: 0 0 calc(8.8 * var(--display-vw, 1vw)); }
.inventory-pending { display: flex; flex-direction: column; align-items: flex-start !important; gap: calc(.6 * var(--display-vh, 1vh)) !important; }
.inventory-pending strong { font-size: calc(.76 * var(--display-vw, 1vw)); color: #9abed5; font-weight: 500; }
.inventory-pending span { font-size: calc(.61 * var(--display-vw, 1vw)); line-height: 1.9; white-space: pre-line; color: #698da8; }
.logistics-summary { display: flex; flex-direction: column; align-items: stretch; justify-content: space-evenly; height: calc(100% - 6.8 * var(--display-vh, 1vh)); padding: calc(.7 * var(--display-vh, 1vh)) calc(.8 * var(--display-vw, 1vw)); border: 0; }
.logistics-row { display: flex; align-items: center; gap: calc(.45 * var(--display-vw, 1vw)); font-size: calc(.68 * var(--display-vw, 1vw)); color: #a9cbde; min-height: calc(1.8 * var(--display-vh, 1vh)); }
.logistics-row > i { width: calc(.4 * var(--display-vw, 1vw)); height: calc(.4 * var(--display-vw, 1vw)); background: #2ec3f0; border-radius: 2px; }
.logistics-row > span:not(.logistics-track) { min-width: calc(2.6 * var(--display-vw, 1vw)); }
.logistics-row b { width: calc(2.1 * var(--display-vw, 1vw)); text-align: right; color: #d5effb; font: 600 calc(.8 * var(--display-vw, 1vw)) monospace; }
.logistics-row small { min-width: calc(2 * var(--display-vw, 1vw)); text-align: right; color: #92b0c3; font-size: calc(.65 * var(--display-vw, 1vw)); }
.logistics-track { flex: 1; height: calc(.8 * var(--display-vh, 1vh)); background: #102e45; border-radius: calc(.4 * var(--display-vh, 1vh)); overflow: hidden; }
.logistics-track i { display: block; height: 100%; background: linear-gradient(90deg, #237fd2, #29c8f0); border-radius: inherit; }
.logistics-row:nth-child(2) .logistics-track i { background: linear-gradient(90deg, #1f9d89, #49dbb2); }
.logistics-row.is-warning > i, .logistics-row.is-warning .logistics-track i { background: #f3a856; }
.route-list { height: calc(2.5 * var(--display-vh, 1vh)); padding: calc(.3 * var(--display-vh, 1vh)) calc(.8 * var(--display-vw, 1vw)); font-size: calc(.56 * var(--display-vw, 1vw)); color: #62869e; }
.alert-list { height: calc(100% - 3.5 * var(--display-vh, 1vh)); padding: calc(.5 * var(--display-vh, 1vh)) calc(.8 * var(--display-vw, 1vw)); }
.alert-row { height: 20%; min-height: 0; font-size: calc(.72 * var(--display-vw, 1vw)); gap: calc(.65 * var(--display-vw, 1vw)); }
.alert-row b { font-size: calc(.72 * var(--display-vw, 1vw)); }
.activity-bar { flex-basis: calc(3.7 * var(--display-vh, 1vh)); font-size: calc(.68 * var(--display-vw, 1vw)); border-color: #164563; border-radius: calc(.25 * var(--display-vw, 1vw)); }
.activity-title { font-size: calc(.72 * var(--display-vw, 1vw)); }
.updated-at { font-size: calc(.58 * var(--display-vw, 1vw)); }
.activity-ticker { display: inline-flex; min-width: max-content; animation: ticker-single 35s linear infinite; }
.activity-event { flex: 0 0 auto; margin-right: calc(3 * var(--display-vw, 1vw)); }
/* Use one unique event track.  The old -50% animation relied on cloning the
   children and made the same business event appear twice on the TV. */
@keyframes ticker-single { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .activity-ticker, .routes path, .map-dots circle { animation: none; } }

/* Fail closed even when access JavaScript fails to load or execute. */
body.display-locked #screen, body.display-locked #state-overlay { display: none !important; }

/* Floating turnover: no panel fill, digit tiles, backdrop blur or box shadow. */
.map-turnover { position: absolute; z-index: 3; left: 44%; top: 3.7%; transform: translateX(-50%); width: 42%; padding: calc(.6 * var(--display-vh, 1vh)) calc(.8 * var(--display-vw, 1vw)) calc(1 * var(--display-vh, 1vh)); text-align: center; pointer-events: none; background: transparent; border: 0; box-shadow: none; }
.turnover-heading { display: flex; align-items: center; justify-content: center; gap: calc(.6 * var(--display-vw, 1vw)); color: #98ceee; font-size: calc(1 * var(--display-vw, 1vw)); letter-spacing: .2em; line-height: 1.5; }
.turnover-led { width: calc(.45 * var(--display-vw, 1vw)); height: calc(.45 * var(--display-vw, 1vw)); background: #44dca7; border-radius: 50%; box-shadow: 0 0 calc(.45 * var(--display-vw, 1vw)) rgba(68,220,167,.65); }
.turnover-amount { display: flex; align-items: baseline; justify-content: center; gap: calc(.4 * var(--display-vw, 1vw)); margin-top: calc(.65 * var(--display-vh, 1vh)); color: #effbff; font-size: var(--turnover-font, calc(2.85 * var(--display-vw, 1vw))); font-weight: 650; font-family: 'DIN Alternate', 'Roboto Mono', 'Courier New', monospace; font-variant-numeric: tabular-nums; line-height: 1.12; white-space: nowrap; }
.turnover-currency { color: #71def5; font-size: .6em; margin-right: calc(.15 * var(--display-vw, 1vw)); }
.turnover-digits { display: inline-flex; align-items: flex-start; vertical-align: top; background: transparent; text-shadow: 0 0 calc(.65 * var(--display-vw, 1vw)) rgba(43,174,230,.35); }
.turnover-digit { display: inline-block; position: relative; width: .63em; height: 1.12em; overflow: hidden; background: transparent; }
.turnover-reel { display: block; width: 100%; height: 22.4em; background: transparent; }
.turnover-reel > span { display: block; width: 100%; height: 1.12em; line-height: 1.12em; text-align: center; background: transparent; }
.turnover-separator { display: inline-block; width: .32em; line-height: 1.12em; color: #9cddf5; }
.turnover-empty { color: #779fb7; }
.turnover-corner { position: absolute; width: calc(1 * var(--display-vw, 1vw)); height: calc(.8 * var(--display-vh, 1vh)); border-color: rgba(63,180,225,.48); border-style: solid; border-width: 0; background: transparent; }
.corner-tl { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.corner-tr { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.corner-bl { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.corner-br { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.turnover-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.map-turnover[data-state='unavailable'] .turnover-led, .map-turnover[data-state='loading'] .turnover-led, .map-turnover[data-state='cleared'] .turnover-led { background: #638296; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .turnover-reel { transition: none !important; } }

/* A clearly labelled decorative inventory, kept separate from business alerts. */
.inventory-mode-badge { color: #81cfed !important; border: 1px solid rgba(55,154,199,.32); border-radius: 3px; padding: calc(.1 * var(--display-vh, 1vh)) calc(.35 * var(--display-vw, 1vw)); background: rgba(29,97,132,.13); letter-spacing: .08em; }
.inventory-visual { height: calc(100% - 6.2 * var(--display-vh, 1vh)); padding: calc(.4 * var(--display-vh, 1vh)) calc(.8 * var(--display-vw, 1vw)); gap: calc(.75 * var(--display-vw, 1vw)); }
.inventory-ring { width: calc(8.8 * var(--display-vw, 1vw)); flex-basis: calc(8.8 * var(--display-vw, 1vw)); height: 100%; }
#inventory-legend { display: flex; flex-direction: column; justify-content: space-evenly; height: 92%; }
#inventory-legend li { line-height: 1.6; color: #b1cddd; font-size: calc(.68 * var(--display-vw, 1vw)); }
#inventory-legend i { width: calc(.45 * var(--display-vw, 1vw)); height: calc(.45 * var(--display-vw, 1vw)); }
#inventory-legend b { font-size: calc(.72 * var(--display-vw, 1vw)); }
.inventory-caption { height: calc(2.6 * var(--display-vh, 1vh)); text-align: center; color: #77a1bb; font-size: calc(.57 * var(--display-vw, 1vw)); line-height: calc(2.2 * var(--display-vh, 1vh)); letter-spacing: .03em; }
.inventory-number { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(.6 * var(--display-vh, 1vh)); }
.inventory-number strong { font-size: calc(1.25 * var(--display-vw, 1vw)); color: #dff6ff; }
.inventory-number small { font-size: calc(.65 * var(--display-vw, 1vw)); color: #7b9bb4; }
