@font-face { font-family: TwinDisplay; src: local("DIN Alternate"), local("Avenir Next"); font-display: swap; }
:root { color-scheme: dark; --bg: #0c1014; --line: #283139; --text: #edf3f5; --muted: #89969f; --cyan: #52d4ef; --green: #57dbac; --amber: #efbd69; --display: TwinDisplay, "Space Grotesk", "PingFang SC", sans-serif; --font: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 12px/1.5 var(--font); letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; border: 1px solid var(--line); background: #1a232b; border-radius: 4px; }
button:hover { border-color: #57707b; background: #25343c; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
svg { width: 17px; height: 17px; stroke-width: 1.7; flex-shrink: 0; }
.app-header { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 23px; gap: 26px; border-bottom: 1px solid var(--line); background: #0e1318; }
.brand img { width: 142px; display: block; }
.app-nav { height: 100%; display: flex; gap: 28px; align-items: stretch; }
.app-nav a { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--muted); border-bottom: 2px solid transparent; }
.app-nav a[aria-current] { color: var(--cyan); border-bottom-color: var(--cyan); }
.app-nav a:hover { color: var(--text); }
.header-right { display: flex; gap: 15px; align-items: center; color: var(--muted); white-space: nowrap; }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; background: #263039; color: #d1dde3; border: 1px solid #40505a; border-radius: 50%; font-size: 10px; }
.mock-badge { color: var(--amber); border: 1px solid #665335; background: #282317; padding: 3px 7px; font-size: 10px; border-radius: 3px; }
.app-layout { display: grid; grid-template-columns: 60px minmax(0, 1fr); }
.app-rail { display: flex; flex-direction: column; align-items: center; gap: 13px; padding-top: 23px; border-right: 1px solid var(--line); background: #0e1318; }
.rail-link { width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); border-radius: 5px; }
.rail-link.active { color: var(--cyan); background: #16313c; }
.rail-link:hover { color: var(--cyan); }
.rail-divider { width: 22px; height: 1px; background: var(--line); margin: 4px 0; }
.rail-mark { writing-mode: vertical-rl; color: #55636e; font: 11px var(--display); margin-top: auto; margin-bottom: 24px; }
.twin-app { height: calc(100dvh - 58px); min-height: 810px; display: grid; grid-template-rows: 77px 88px minmax(440px, 1fr) 176px 29px; min-width: 0; }
.page-heading { padding: 0 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); gap: 12px; }
.breadcrumb { color: #7a8b98; font-size: 10px; margin-bottom: 3px; }
h1 { font-size: 21px; font-weight: 600; margin: 0; }
.page-subtitle { color: var(--muted); font-size: 11px; margin-left: 14px; font-weight: 400; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.site-select { display: flex; gap: 7px; align-items: center; color: #afbec8; padding-right: 16px; border-right: 1px solid var(--line); }
.action { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 33px; padding: 0 11px; white-space: nowrap; }
.action.primary { color: #08261e; background: var(--green); border-color: var(--green); font-weight: 600; }
.action.primary:hover { background: #90ebca; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #151e22, #10151a 75%); }
.metric { margin: 16px 0; padding: 0 24px; border-right: 1px solid var(--line); min-width: 0; }
.metric:last-child { border: none; }
.metric-label { display: flex; align-items: center; gap: 7px; color: #a1b0b9; font-size: 10px; }
.metric-value { display: inline-block; font: 600 28px/1.2 var(--display); margin-top: 4px; font-variant-numeric: tabular-nums; }
.metric-unit { color: var(--muted); font-size: 11px; margin-left: 5px; }
.metric-change { color: var(--green); font-size: 9px; margin-left: 10px; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: 225px minmax(0, 1fr) 252px; min-height: 0; }
.left-panel, .right-panel { background: #11171de8; min-width: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #34434d transparent; }
.left-panel { border-right: 1px solid var(--line); }
.right-panel { border-left: 1px solid var(--line); }
.panel-section { padding: 17px 17px 15px; border-bottom: 1px solid var(--line); }
.panel-section:last-child { border-bottom: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; font-size: 12px; font-weight: 600; }
.section-title small { font-size: 9px; font-weight: 400; color: var(--muted); }
.search-field { display: flex; align-items: center; gap: 6px; padding: 7px 8px; background: #0b1116; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 13px; color: var(--muted); }
.search-field input { width: 100%; background: none; border: 0; color: var(--text); min-width: 0; font-size: 10px; }
.zone-list { display: grid; gap: 5px; }
.zone-button { display: flex; justify-content: space-between; align-items: center; padding: 10px 9px; border: 1px solid transparent; background: none; width: 100%; text-align: left; font-size: 11px; }
.zone-button > span { display: flex; align-items: center; gap: 8px; }
.zone-button small { color: var(--muted); font: 10px var(--display); }
.zone-button.active { background: #1b3036; border-color: #2d555d; color: #8fe3e8; }
.status-dot { width: 6px; height: 6px; background: var(--green); display: inline-block; border-radius: 50%; flex-shrink: 0; }
.status-dot.amber { background: var(--amber); }
.status-dot.muted { background: #687a85; }
.status-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.status-summary div { border-right: 1px solid var(--line); }
.status-summary div:last-child { border: 0; }
.status-summary b { font: 21px var(--display); display: block; margin-bottom: 2px; }
.status-summary small { color: var(--muted); font-size: 9px; }
.green { color: var(--green); } .amber { color: var(--amber); } .cyan { color: var(--cyan); }
.progress-item { margin: 12px 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 10px; color: #afbdc5; margin-bottom: 6px; }
.progress-track { height: 4px; background: #28313a; border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); transition: width .3s; }
.layer-switch { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #a8b7c2; margin-top: 12px; }
.layer-switch input { appearance: none; width: 27px; height: 15px; border: 1px solid #50616d; border-radius: 10px; background: #28323c; cursor: pointer; position: relative; margin: 0; }
.layer-switch input::after { content: ""; width: 9px; height: 9px; background: #a5b4be; position: absolute; left: 2px; top: 2px; border-radius: 50%; }
.layer-switch input:checked { background: #1c5b4c; border-color: #318a6e; }
.layer-switch input:checked::after { transform: translateX(12px); background: #79e8bb; }
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, #25323a, #131b22 65%, #10161c); }
.stage canvas.scene-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.stage-top { position: absolute; z-index: 2; top: 16px; left: 17px; right: 17px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; gap: 8px; }
.stage-state { display: flex; gap: 7px; align-items: center; font-size: 10px; color: #bbcbd4; }
.stage-state b { font-weight: 400; }
.segment { display: flex; padding: 3px; background: #0d151be8; border: 1px solid #34434d; border-radius: 4px; pointer-events: auto; }
.segment button { border: 0; background: transparent; color: var(--muted); padding: 4px 10px; font-size: 10px; min-width: 43px; }
.segment button.active { color: #d9f9fb; background: #2a424c; }
.scene-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.scene-label { position: absolute; left: 0; top: 0; padding: 3px 7px; font-size: 9px; color: #c4d6df; background: #0a141cdc; border: 1px solid #536575; border-radius: 2px; white-space: nowrap; }
.scene-label::before { content: ""; display: inline-block; width: 4px; height: 4px; background: var(--green); margin-right: 5px; vertical-align: middle; }
.scene-tools { position: absolute; right: 14px; top: 65px; display: grid; gap: 7px; }
.tool { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; background: #111d25ec; color: #c9d7de; }
.scene-footer { position: absolute; bottom: 16px; left: 16px; right: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; pointer-events: none; }
.scene-legend { display: flex; gap: 12px; color: #a0b1bd; font-size: 9px; margin-bottom: 10px; }
.scene-legend span { display: flex; align-items: center; gap: 5px; }
.transport { display: grid; grid-column: 1 / -1; grid-template-columns: 26px auto 65px minmax(60px, 1fr) 54px 26px; align-items: center; gap: 9px; padding: 8px; border: 1px solid #33424a; background: #111a21ed; border-radius: 4px; pointer-events: auto; }
.replay-badge { font-size: 9px; color: var(--amber); white-space: nowrap; }
.replay-track { min-width: 0; }
.replay-track input { width: 100%; height: 18px; margin: 0; display: block; cursor: pointer; accent-color: var(--green); }
.replay-ticks { display: flex; justify-content: space-between; color: #8297a3; font: 8px var(--display); }
.scene-footer .compass { width: 36px; height: 36px; }
.scene-footer .compass::before { top: 4px; border-bottom-width: 12px; }
.scene-footer .scene-legend { margin-bottom: 5px; }
.transport .tool { border: 0; width: 26px; height: 25px; background: #29463e; color: var(--green); }
.transport-time { font: 11px var(--display); color: #ccd9df; width: 65px; font-variant-numeric: tabular-nums; }
.transport select { background: #1b2932; border: 0; color: #d2e3ec; padding: 3px; border-radius: 3px; font: 11px var(--display); }
.live-wave { display: flex; align-items: center; gap: 2px; height: 17px; width: 32px; }
.live-wave i { width: 2px; background: var(--green); height: 12px; animation: wave 1s ease-in-out infinite alternate; }
.live-wave i:nth-child(2n) { height: 5px; animation-delay: -.3s; }
.live-wave i:nth-child(3n) { height: 17px; animation-delay: -.7s; }
.paused .live-wave i { animation-play-state: paused; background: var(--amber); }
@keyframes wave { to { height: 3px; } }
.compass { width: 50px; height: 50px; border: 1px solid #586771; border-radius: 50%; display: grid; place-items: center; position: relative; background: #111a2180; font: 10px var(--display); color: #8c9ba6; }
.compass::before { content: ""; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 16px solid var(--cyan); transform: rotate(32deg); position: absolute; top: 9px; }
.compass span { position: absolute; bottom: 4px; font-size: 8px; }
.asset-heading { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.asset-symbol { width: 38px; height: 38px; background: #1e3937; color: var(--green); display: grid; place-items: center; border: 1px solid #31534b; border-radius: 4px; }
.asset-heading b { display: block; font-size: 12px; }
.asset-heading small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.asset-details { margin: 0; font-size: 10px; }
.asset-details div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; }
.asset-details dt { color: var(--muted); }
.asset-details dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.asset-action { width: 100%; margin-top: 10px; min-height: 29px; font-size: 10px; }
.trend-heading { display: flex; align-items: baseline; gap: 8px; margin-top: -4px; }
.trend-heading strong { font: 24px var(--display); }
.trend-heading small { color: var(--green); font-size: 9px; }
.trend-chart { width: 100%; height: 70px; display: block; margin-top: 8px; }
.chart-axis { display: flex; justify-content: space-between; color: #687e8d; font: 8px var(--display); }
.event-list { display: grid; gap: 12px; }
.event { display: grid; grid-template-columns: 6px 1fr; gap: 8px; align-items: baseline; font-size: 10px; }
.event time { color: #6d8494; font: 9px var(--display); margin-right: 6px; }
.event p { margin: 0; color: #b3c2cc; line-height: 1.7; }
.operations { border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 252px; min-height: 0; background: #10161c; }
.task-panel { padding: 12px 20px; min-width: 0; overflow: auto; scrollbar-width: thin; }
.task-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; gap: 10px; }
.task-heading h2 { margin: 0; font-size: 12px; font-weight: 500; }
.task-heading h2 span { color: var(--muted); font-size: 9px; margin-left: 9px; }
.task-filters { display: flex; gap: 12px; }
.task-filters button { padding: 0; background: none; border: 0; color: var(--muted); font-size: 10px; border-radius: 0; }
.task-filters button.active { color: var(--cyan); }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; font-size: 10px; }
th { color: #7e909d; font-weight: 400; padding: 5px 8px; background: #192128; }
td { padding: 6px 8px; border-bottom: 1px solid #202a32; color: #c1ced6; }
td:first-child { font-family: var(--display); color: #dbe7ec; }
.table-state { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; }
.task-empty { color: var(--muted); text-align: center; padding: 20px; }
.shift-summary { border-left: 1px solid var(--line); padding: 15px 18px; }
.shift-title { font-size: 11px; margin-bottom: 10px; color: #bdccd4; }
.shift-values { display: flex; gap: 28px; }
.shift-values strong { font: 24px var(--display); display: block; }
.shift-values span { color: var(--muted); font-size: 9px; }
.shift-footer { margin-top: 11px; color: #729284; font-size: 9px; }
.app-footer { padding: 0 17px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #738694; font-size: 9px; gap: 10px; }
.app-footer span { display: flex; align-items: center; gap: 6px; }
.toast { position: fixed; left: 50%; bottom: 35px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 11px 18px; color: #d6f7ea; background: #19372df5; border: 1px solid #437965; border-radius: 5px; z-index: 20; transition: .2s; max-width: calc(100% - 32px); }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.matrix-a { --matrix-color: #49c79e; }
.matrix-b { --matrix-color: #67b3d6; }
.matrix-c { --matrix-color: #e5ad55; }
.matrix-d { --matrix-color: #e18598; }
[data-scene="factory"] .zone-button svg { color: var(--matrix-color, var(--muted)); }
[data-scene="factory"] .progress-fill, .matrix-legend .status-dot { background: var(--matrix-color); }
.dispatch-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.dispatch-row:last-child { border: 0; }
.dispatch-row b { font-family: var(--display); font-weight: 500; }
.dispatch-row small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.boot-state { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 25px; text-align: center; }
.boot-state p { color: var(--muted); max-width: 540px; }
.boot-state a { color: var(--cyan); }
.render-error { position: absolute; z-index: 5; inset: 55px 14px 85px; background: #121c23f5; display: grid; place-content: center; padding: 24px; text-align: center; }
.render-error p { color: var(--muted); max-width: 350px; }
.stage:fullscreen { background: #151e25; width: 100vw; height: 100vh; }
@media (min-width: 1700px) { .workspace { grid-template-columns: 255px minmax(0, 1fr) 285px; } .operations { grid-template-columns: minmax(0, 1fr) 285px; } .panel-section { padding-inline: 21px; } .twin-app { grid-template-rows: 80px 92px minmax(480px, 1fr) 184px 29px; } }
@media (max-width: 1180px) { .workspace { grid-template-columns: 185px minmax(0, 1fr) 214px; } .operations { grid-template-columns: minmax(0, 1fr) 214px; } .panel-section { padding: 14px 12px; } .metric { padding-inline: 15px; } .metric-change { display: none; } .page-subtitle, .site-select, .header-clock { display: none; } .app-nav { gap: 18px; } .page-heading { padding-inline: 18px; } }
@media (max-width: 950px) { .app-layout { grid-template-columns: 48px minmax(0, 1fr); } .workspace { grid-template-columns: minmax(0, 1fr) 218px; } .left-panel { display: none; } .page-heading h1 { font-size: 19px; } .metric { padding-inline: 13px; } .metric-value { font-size: 25px; } .app-header { gap: 15px; padding-inline: 15px; } .app-nav { gap: 14px; } .app-nav svg { display: none; } }
@media (min-width: 681px) and (max-width: 1320px) {
    .app-header { height: 96px; flex-wrap: wrap; gap: 0 16px; }
    .app-header .brand { padding-block: 8px; }
    .header-right { margin-left: auto; }
    .app-nav { width: 100%; order: 3; height: 42px; overflow-x: auto; flex-shrink: 0; gap: 24px; }
    .twin-app { height: calc(100dvh - 96px); }
}
@media (max-width: 680px) {
    .app-header { height: 94px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: 47px 47px; gap: 0; padding: 0 15px; }
    .brand img { width: 126px; } .header-right { grid-row: 1; grid-column: 2; } .avatar { display: none; }
    .app-nav { grid-row: 2; grid-column: 1 / -1; gap: 24px; font-size: 11px; overflow-x: auto; }
    .app-layout { display: block; } .app-rail { display: none; }
    .twin-app { height: auto; min-height: 0; display: flex; flex-direction: column; }
    .page-heading { min-height: 100px; padding: 12px 15px; align-items: flex-start; flex-direction: column; gap: 9px; }
    .page-heading h1 { font-size: 20px; } .breadcrumb { font-size: 9px; }
    .heading-actions { width: 100%; justify-content: flex-end; } .heading-actions .action { min-height: 29px; font-size: 10px; }
    .metrics { grid-template-columns: repeat(3, 1fr); } .metric { margin: 12px 0; padding-inline: 13px; } .metric:nth-child(3) { border: 0; }
    .metric:nth-child(n+4) { display: none; } .metric-label { font-size: 9px; gap: 4px; } .metric-label svg { width: 13px; height: 13px; } .metric-value { font-size: 24px; } .metric-unit { font-size: 9px; }
    .workspace { display: flex; flex-direction: column; } .stage { height: 470px; order: -1; flex-shrink: 0; }
    .right-panel { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; border-left: 0; border-top: 1px solid var(--line); }
    .right-panel .panel-section { min-width: 0; border-right: 1px solid var(--line); } .right-panel .panel-section:last-child { grid-column: 1 / -1; }
    .event-list { grid-template-columns: 1fr; } .left-panel { display: block; border-right: 0; } .left-panel .panel-section:not(:first-child) { display: none; }
    .left-panel .search-field { margin-bottom: 8px; } .zone-list { grid-template-columns: 1fr 1fr; } .zone-button { font-size: 10px; padding: 8px; }
    .operations { display: block; } .task-panel { padding: 15px 12px; min-height: 186px; } .shift-summary { display: none; }
    .stage-top { left: 12px; right: 12px; top: 13px; } .stage-state { font-size: 9px; } .segment button { padding: 4px 7px; min-width: 35px; }
    .scene-tools { top: 56px; right: 12px; } .scene-label { font-size: 8px; padding: 2px 4px; }
    .transport { grid-template-columns: 26px auto minmax(65px, 1fr) 60px 26px; gap: 8px; }
    .replay-track { grid-column: 1 / -1; grid-row: 2; }
    .app-footer { min-height: 39px; padding: 8px 12px; flex-wrap: wrap; font-size: 8px; } .app-footer span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }