Files
FT546-WCS/javaTest/src/main/resources/visualizer/assets/app.css

410 lines
18 KiB
CSS

:root {
--color-bg: #edf1f0;
--color-surface: #ffffff;
--color-surface-muted: #f5f7f6;
--color-ink: #16211f;
--color-muted: #65736f;
--color-line: #d4ddda;
--color-line-strong: #aebbb7;
--color-green: #13795b;
--color-green-soft: #e2f2eb;
--color-blue: #147d9d;
--color-blue-soft: #dff1f5;
--color-amber: #b66a0a;
--color-amber-soft: #fff0d8;
--color-red: #bd3f3f;
--color-red-soft: #fae5e3;
--color-approach-path: #727b7f;
--color-service-path: #16805e;
--color-traversed-path: #087fa2;
--color-historical-path: #c67b20;
--font-ui: Bahnschrift, "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
--font-mono: "Cascadia Mono", Consolas, monospace;
--radius: 6px;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--color-bg); }
body {
margin: 0;
color: var(--color-ink);
background: var(--color-bg);
font-family: var(--font-ui);
font-size: 14px;
letter-spacing: 0;
}
button, input, select { font: inherit; letter-spacing: 0; }
button, select, input[type="range"], input[type="checkbox"] { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
outline: 3px solid rgba(20, 125, 157, .22);
outline-offset: 1px;
}
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; }
.app-header {
min-height: 68px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
padding: 10px 24px;
background: var(--color-surface);
border-bottom: 1px solid var(--color-line);
}
.brand-block, .header-status, .button-row, .playback-buttons, .route-tools,
.history-actions, .timeline-controls, .table-toolbar, .inline-field, .toggle-field {
display: flex;
align-items: center;
}
.brand-block { gap: 12px; min-width: 0; }
.brand-block > div { min-width: 0; }
.brand-mark { width: 34px; height: 34px; position: relative; flex: 0 0 34px; }
.brand-mark::before, .brand-mark::after, .brand-mark i {
content: "";
position: absolute;
background: var(--color-green);
}
.brand-mark::before { width: 8px; height: 8px; border-radius: 50%; left: 1px; top: 13px; }
.brand-mark::after { width: 8px; height: 8px; border-radius: 50%; right: 1px; top: 2px; }
.brand-mark i:nth-child(1) { left: 8px; top: 16px; width: 20px; height: 2px; transform: rotate(-30deg); transform-origin: left; }
.brand-mark i:nth-child(2) { right: 1px; bottom: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-blue); }
.brand-mark i:nth-child(3) { right: 7px; top: 9px; width: 2px; height: 19px; transform: rotate(4deg); background: var(--color-blue); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; line-height: 1.2; font-weight: 720; }
h2 { font-size: 16px; line-height: 1.25; font-weight: 700; }
h3 { font-size: 14px; line-height: 1.3; }
.brand-block p { margin-top: 3px; color: var(--color-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-status { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.meta-value { color: var(--color-muted); font-family: var(--font-mono); font-size: 12px; }
.status-chip {
min-height: 26px;
display: inline-flex;
align-items: center;
padding: 3px 9px;
border: 1px solid transparent;
border-radius: 999px;
font-size: 12px;
font-weight: 650;
white-space: nowrap;
}
.status-pending, .status-neutral { color: #4c5a56; background: #edf1f0; border-color: #d8dfdd; }
.status-pass { color: #0e674c; background: var(--color-green-soft); border-color: #b8dfd0; }
.status-hold { color: #8b5108; background: var(--color-amber-soft); border-color: #efd09d; }
.status-fail { color: #9e3030; background: var(--color-red-soft); border-color: #edb9b5; }
.mode-tabs {
height: 44px;
display: flex;
align-items: end;
gap: 4px;
padding: 0 24px;
background: var(--color-surface);
border-bottom: 1px solid var(--color-line);
}
.mode-tab {
height: 43px;
padding: 0 16px;
color: var(--color-muted);
background: transparent;
border: 0;
border-bottom: 3px solid transparent;
font-weight: 650;
}
.mode-tab:hover { color: var(--color-ink); background: var(--color-surface-muted); }
.mode-tab.is-active { color: var(--color-green); border-bottom-color: var(--color-green); }
.control-band, .history-band {
padding: 12px 24px;
background: var(--color-surface-muted);
border-bottom: 1px solid var(--color-line);
}
.point-form {
display: grid;
grid-template-columns: minmax(150px, 1.3fr) 36px minmax(150px, 1.3fr) minmax(100px, .7fr) 82px 90px minmax(160px, 1fr) auto;
align-items: end;
gap: 8px;
}
.field { min-width: 0; display: grid; gap: 5px; }
.field > span, .inline-field > span, .toggle-field > span {
color: var(--color-muted);
font-size: 11px;
font-weight: 650;
}
.field input, .field select, .search-field input, .table-toolbar select, .inline-field select {
width: 100%;
height: 36px;
padding: 0 10px;
color: var(--color-ink);
background: var(--color-surface);
border: 1px solid var(--color-line-strong);
border-radius: var(--radius);
}
.field input:hover, .field select:hover, .search-field input:hover, .table-toolbar select:hover { border-color: #83938e; }
.primary-button, .secondary-button, .icon-button {
height: 36px;
border-radius: var(--radius);
font-weight: 700;
transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.primary-button {
padding: 0 15px;
color: #fff;
background: var(--color-green);
border: 1px solid var(--color-green);
white-space: nowrap;
}
.primary-button:hover { background: #0e684d; border-color: #0e684d; }
.secondary-button {
padding: 0 13px;
color: var(--color-ink);
background: var(--color-surface);
border: 1px solid var(--color-line-strong);
}
.secondary-button:hover { border-color: #72817c; }
.primary-button:disabled, .secondary-button:disabled { opacity: .48; cursor: not-allowed; }
.icon-button {
width: 36px;
padding: 0;
color: var(--color-ink);
background: var(--color-surface);
border: 1px solid var(--color-line-strong);
font-family: var(--font-mono);
}
.icon-button:hover { color: var(--color-green); border-color: var(--color-green); }
.history-band { display: grid; gap: 10px; }
.history-actions { justify-content: space-between; gap: 16px; }
.history-actions > div:first-child { display: grid; gap: 3px; }
.history-actions span { color: var(--color-muted); font-size: 12px; }
.button-row { gap: 8px; }
.kpi-strip { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 1px; background: var(--color-line); border: 1px solid var(--color-line); }
.kpi-item { min-height: 62px; padding: 9px 12px; background: var(--color-surface); display: grid; gap: 2px; }
.kpi-item span { color: var(--color-muted); font-size: 11px; }
.kpi-item strong { font-family: var(--font-mono); font-size: 20px; }
.kpi-item.is-pass strong { color: var(--color-green); }
.kpi-item.is-fail strong { color: var(--color-red); }
.table-toolbar { gap: 8px; }
.search-field { min-width: 220px; max-width: 380px; flex: 1; }
.table-toolbar select { width: auto; min-width: 120px; }
.table-count { margin-left: auto; color: var(--color-muted); font-family: var(--font-mono); font-size: 12px; }
.table-scroll { overflow: auto; border: 1px solid var(--color-line); background: var(--color-surface); }
.history-table-scroll { max-height: 250px; }
.event-table-scroll { max-height: 220px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
position: sticky;
top: 0;
z-index: 1;
padding: 8px 10px;
color: var(--color-muted);
background: #f1f4f3;
border-bottom: 1px solid var(--color-line);
text-align: left;
font-weight: 700;
white-space: nowrap;
}
.data-table td { padding: 8px 10px; border-bottom: 1px solid #e7ecea; vertical-align: top; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #f2f8f5; }
.data-table tbody tr.is-selected { background: var(--color-green-soft); box-shadow: inset 3px 0 var(--color-green); }
.data-table code { font-family: var(--font-mono); font-size: 11px; }
.workspace {
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
min-height: 520px;
background: var(--color-surface);
border-bottom: 1px solid var(--color-line);
}
.route-stage { min-width: 0; border-right: 1px solid var(--color-line); }
.section-bar {
min-height: 58px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 10px 18px;
border-bottom: 1px solid var(--color-line);
}
.section-kicker { display: block; margin-bottom: 3px; color: var(--color-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.route-tools { gap: 14px; }
.inline-field { gap: 7px; }
.inline-field select { width: auto; min-width: 74px; height: 32px; }
.toggle-field { gap: 6px; }
.toggle-field input { width: 16px; height: 16px; accent-color: var(--color-green); }
.route-legend {
min-height: 34px;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 16px;
padding: 6px 18px;
color: var(--color-muted);
background: var(--color-surface-muted);
border-bottom: 1px solid var(--color-line);
font-size: 11px;
}
.route-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-line { display: inline-block; width: 22px; height: 0; border-top: 3px solid; }
.legend-line.approach { border-color: var(--color-approach-path); border-top-style: dashed; }
.legend-line.service { border-color: var(--color-service-path); }
.legend-line.traversed { border-color: var(--color-traversed-path); border-top-width: 5px; }
.legend-line.historical { border-color: var(--color-historical-path); border-top-style: dotted; }
.legend-dot { width: 10px; height: 10px; border: 2px solid; border-radius: 50%; }
.legend-dot.hold { border-color: var(--color-amber); }
.route-canvas-wrap { position: relative; min-height: 425px; height: calc(100% - 92px); overflow: hidden; }
#route-map { display: block; width: 100%; height: 100%; min-height: 425px; background: #fbfcfc; }
.map-background { fill: url(#map-grid); }
.grid-line { fill: none; stroke: #e7ecea; stroke-width: 1; }
.route-segment { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.route-segment.approach { stroke: var(--color-approach-path); stroke-width: 4; stroke-dasharray: 9 8; }
.route-segment.service { stroke: var(--color-service-path); stroke-width: 6; }
.route-segment.historical { stroke: var(--color-historical-path); stroke-width: 3; stroke-dasharray: 3 7; opacity: .82; }
.route-segment.traversed { stroke: var(--color-traversed-path); stroke-width: 8; }
.map-node { fill: #fff; stroke: #7d8a86; stroke-width: 2; vector-effect: non-scaling-stroke; }
.map-node.passed { fill: var(--color-blue-soft); stroke: var(--color-blue); }
.map-node.start { fill: var(--color-green-soft); stroke: var(--color-green); stroke-width: 4; }
.map-node.target { fill: #fff; stroke: var(--color-red); stroke-width: 4; }
.map-node.hold { fill: var(--color-amber-soft); stroke: var(--color-amber); stroke-width: 5; }
.vehicle-marker { fill: var(--color-blue); stroke: #fff; stroke-width: 4; vector-effect: non-scaling-stroke; }
.vehicle-direction { fill: #fff; }
.node-label { fill: #24302d; font-family: var(--font-mono); font-size: 14px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.node-coordinate { fill: var(--color-muted); font-family: var(--font-mono); font-size: 10px; }
.empty-state, .loading-state {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 7px;
color: var(--color-muted);
background: rgba(251, 252, 252, .94);
}
.empty-state strong, .loading-state strong { color: var(--color-ink); }
.activity-indicator { width: 26px; height: 26px; border: 3px solid #cbd6d2; border-top-color: var(--color-green); border-radius: 50%; animation: rotate 800ms linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.task-inspector { min-width: 0; background: #fbfcfc; }
.inspector-heading { align-items: flex-start; }
.inspector-heading h2 { max-width: 190px; overflow-wrap: anywhere; }
.evidence-list { margin: 0; }
.evidence-list > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #e4eae8; }
.evidence-list dt { color: var(--color-muted); font-size: 11px; }
.evidence-list dd { margin: 0; text-align: right; font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.path-proof, .reason-proof { display: grid; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--color-line); }
.path-proof span, .reason-proof span { color: var(--color-muted); font-size: 11px; }
.path-proof output, .reason-proof output { font-family: var(--font-mono); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.timeline-panel { background: var(--color-surface); border-bottom: 1px solid var(--color-line); }
.timeline-controls { min-height: 62px; gap: 12px; padding: 9px 18px; }
.timeline-controls > div:first-child { flex: 0 0 140px; }
.playback-buttons { gap: 4px; }
.tick-readout { min-width: 90px; font-family: var(--font-mono); font-size: 12px; color: var(--color-blue); }
#timeline-slider { flex: 1; min-width: 120px; accent-color: var(--color-blue); }
.speed-field { margin-left: auto; }
.timeline-filter-bar { padding: 6px 18px; background: var(--color-surface-muted); border-top: 1px solid var(--color-line); }
.event-table tr.is-current { background: var(--color-blue-soft); }
.event-type { font-weight: 750; }
.event-type.HOLD, .event-type.CLEARANCE_HOLD { color: var(--color-amber); }
.event-type.PLC_RETRY, .event-type.CLEARANCE_PLC_RETRY, .event-type.REDISPATCH { color: var(--color-red); }
.event-type.COMPLETE, .event-type.ASSIGN { color: var(--color-green); }
.safety-view { padding: 18px 24px 28px; background: var(--color-bg); }
.safety-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.audit-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 8px; }
.audit-item { min-height: 94px; padding: 13px 14px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); }
.audit-item span { color: var(--color-muted); font-size: 11px; }
.audit-item strong { display: block; margin-top: 9px; font-family: var(--font-mono); font-size: 24px; }
.audit-item small { display: block; margin-top: 5px; color: var(--color-muted); }
.audit-item.is-pass { border-left: 4px solid var(--color-green); }
.audit-item.is-fail { border-left: 4px solid var(--color-red); }
.audit-item.is-fail strong { color: var(--color-red); }
.reason-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.reason-columns section { min-height: 170px; padding: 14px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); }
.reason-columns h3 { margin-bottom: 10px; }
.reason-list { display: grid; gap: 7px; }
.reason-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid #e5eae8; }
.reason-row span { overflow-wrap: anywhere; }
.reason-row strong { font-family: var(--font-mono); }
.reason-empty { color: var(--color-muted); }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 20; max-width: min(420px, calc(100vw - 36px)); padding: 12px 14px; color: #fff; background: #26332f; border-radius: var(--radius); box-shadow: 0 10px 28px rgba(20, 31, 28, .22); }
.toast.is-error { background: var(--color-red); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1180px) {
.point-form { grid-template-columns: minmax(150px, 1fr) 36px minmax(150px, 1fr) repeat(3, minmax(90px, .55fr)); }
.field-fault { grid-column: span 2; }
.point-form .primary-button { grid-column: span 1; }
.kpi-strip { grid-template-columns: repeat(3, 1fr); }
.audit-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
.app-header { align-items: flex-start; padding: 10px 14px; }
.header-status { max-width: 48%; }
.mode-tabs { padding: 0 10px; overflow-x: auto; }
.mode-tab { padding: 0 12px; white-space: nowrap; }
.control-band, .history-band { padding: 10px 14px; }
.point-form { grid-template-columns: 1fr 36px 1fr; }
.field:not(.field-site), .field-fault, .point-form .primary-button { grid-column: span 1; }
.field-fault { grid-column: span 2; }
.workspace { grid-template-columns: 1fr; }
.route-stage { border-right: 0; }
.task-inspector { border-top: 1px solid var(--color-line); }
.route-canvas-wrap, #route-map { min-height: 390px; }
.timeline-controls { flex-wrap: wrap; }
.timeline-controls > div:first-child { flex-basis: 100%; }
#timeline-slider { order: 5; flex-basis: 100%; }
.audit-grid { grid-template-columns: repeat(2, 1fr); }
.reason-columns { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
.app-header { display: grid; gap: 8px; }
.header-status { max-width: none; justify-content: flex-start; }
.brand-block p { max-width: calc(100vw - 74px); }
.meta-value { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.point-form { grid-template-columns: 1fr 36px; }
.field-site { grid-column: 1; }
#swap-sites { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.field:not(.field-site), .field-fault, .point-form .primary-button { grid-column: 1 / -1; }
.history-actions { align-items: flex-start; }
.button-row { flex-wrap: wrap; justify-content: flex-end; }
.kpi-strip { grid-template-columns: repeat(2, 1fr); }
.section-bar { align-items: flex-start; padding: 10px 12px; }
.route-tools { display: grid; gap: 5px; justify-items: end; }
.route-legend { gap: 9px; padding: 6px 12px; }
.route-canvas-wrap, #route-map { min-height: 340px; }
.evidence-list > div { grid-template-columns: 88px 1fr; padding: 9px 12px; }
.timeline-controls { padding: 10px 12px; }
.playback-buttons .icon-button { width: 34px; }
.tick-readout { min-width: 76px; }
.speed-field { margin-left: 0; }
.timeline-filter-bar { padding: 6px 12px; }
.safety-view { padding: 14px 12px 22px; }
.audit-grid { grid-template-columns: 1fr; }
.audit-item { min-height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: 1ms !important; }
}