관제 첫 화면 디자인 개선

This commit is contained in:
2026-06-06 19:32:28 +09:00
parent 412acbc846
commit b2562e9145
3 changed files with 736 additions and 36 deletions

View File

@@ -9,6 +9,8 @@ const state = {
drivers: new Map(),
locations: new Map(),
selectedDriverId: "",
vehicleSearch: "",
vehicleStatusFilter: "all",
eventSource: null,
activeView: "locations",
adminToken: new URLSearchParams(window.location.search).get("adminToken") ||
@@ -18,6 +20,7 @@ const state = {
const elements = {
connectionStatus: document.getElementById("connectionStatus"),
systemClock: document.getElementById("systemClock"),
refreshButton: document.getElementById("refreshButton"),
demoButton: document.getElementById("demoButton"),
locationsTab: document.getElementById("locationsTab"),
@@ -30,6 +33,19 @@ const elements = {
activeCount: document.getElementById("activeCount"),
staleCount: document.getElementById("staleCount"),
lastUpdated: document.getElementById("lastUpdated"),
opsHeadline: document.getElementById("opsHeadline"),
opsSubline: document.getElementById("opsSubline"),
averageEta: document.getElementById("averageEta"),
cargoTypeCount: document.getElementById("cargoTypeCount"),
routePreviewCount: document.getElementById("routePreviewCount"),
vehicleSearchInput: document.getElementById("vehicleSearchInput"),
statusFilterButtons: [...document.querySelectorAll("[data-status-filter]")],
mapActiveCount: document.getElementById("mapActiveCount"),
mapEtaSummary: document.getElementById("mapEtaSummary"),
mapUpdatedAt: document.getElementById("mapUpdatedAt"),
routeFocusPanel: document.getElementById("routeFocusPanel"),
routeFocusTitle: document.getElementById("routeFocusTitle"),
routeFocusMeta: document.getElementById("routeFocusMeta"),
driverForm: document.getElementById("driverForm"),
driverNameInput: document.getElementById("driverNameInput"),
vehicleNoInput: document.getElementById("vehicleNoInput"),
@@ -84,6 +100,7 @@ const VEHICLE_TYPES = {
};
document.addEventListener("DOMContentLoaded", () => {
startSystemClock();
initializeMap();
bindActions();
refreshDrivers();
@@ -221,6 +238,30 @@ function bindActions() {
elements.driversTab.addEventListener("click", () => setActiveView("drivers"));
elements.driverForm.addEventListener("submit", submitDriverForm);
elements.historyCloseButton.addEventListener("click", closeHistoryDrawer);
elements.vehicleSearchInput.addEventListener("input", () => {
state.vehicleSearch = elements.vehicleSearchInput.value.trim();
render();
});
for (const button of elements.statusFilterButtons) {
button.addEventListener("click", () => {
state.vehicleStatusFilter = button.dataset.statusFilter || "all";
render();
});
}
}
function startSystemClock() {
const updateClock = () => {
const now = new Date();
elements.systemClock.dateTime = now.toISOString();
elements.systemClock.textContent = new Intl.DateTimeFormat("ko-KR", {
hour: "2-digit",
minute: "2-digit"
}).format(now);
};
updateClock();
window.setInterval(updateClock, 30000);
}
function setActiveView(view) {
@@ -343,8 +384,10 @@ function replaceLocations(locations) {
if (selectedLocation) {
renderRoutePreview(selectedLocation, { fit: false });
showInfoOverlay(selectedLocation);
renderRouteFocusPanel(selectedLocation);
} else {
clearRouteOverlay();
renderRouteFocusPanel(null);
}
}
}
@@ -366,6 +409,7 @@ function upsertLocation(location, options = {}) {
loadLocationHistory(location);
renderRoutePreview(location, { fit: false });
showInfoOverlay(location);
renderRouteFocusPanel(location);
}
if (options.focus) {
@@ -392,23 +436,89 @@ function render() {
elements.totalCount.textContent = String(counts.total);
elements.activeCount.textContent = String(counts.active);
elements.staleCount.textContent = String(counts.stale);
elements.lastUpdated.textContent = locations[0] ? formatDateTime(locations[0].receivedAt) : "-";
elements.lastUpdated.textContent = locations[0] ? `${locations.length}대 표시 · ${formatDateTime(locations[0].receivedAt)}` : "수신 대기";
renderOperationsSummary(locations, counts);
renderMapStatus(locations, counts);
syncStatusFilterButtons();
elements.vehicleList.replaceChildren();
if (!locations.length) {
const visibleLocations = locations.filter(matchesVehicleFilters);
if (!visibleLocations.length) {
const empty = document.createElement("div");
empty.className = "empty-state";
empty.textContent = "수신된 차량 위치가 없습니다.";
empty.textContent = locations.length ? "조건에 맞는 차량이 없습니다." : "수신된 차량 위치가 없습니다.";
elements.vehicleList.append(empty);
return;
}
for (const location of locations) {
for (const location of visibleLocations) {
elements.vehicleList.append(createVehicleItem(location));
}
}
function renderOperationsSummary(locations, counts) {
const activeText = counts.active > 0 ? `${counts.active}대 운행중` : "운행 대기";
const staleText = counts.stale > 0 ? `주의 ${counts.stale}대 확인 필요` : "모든 차량 정상 수신";
const averageEtaMinutes = calculateAverageEtaMinutes(locations);
const cargoTypes = new Set(locations.map(getCargoName).filter(Boolean));
const routeCount = locations.filter((location) => getRoutePath(location).length >= 2).length;
elements.opsHeadline.textContent = `전국 ${activeText}`;
elements.opsSubline.textContent = locations.length
? `${staleText} · ${locations.length}대 실시간 관제`
: "시뮬레이터 또는 기사 앱의 첫 위치를 기다리고 있습니다.";
elements.averageEta.textContent = averageEtaMinutes === null ? "-" : formatDuration(averageEtaMinutes).replace("약 ", "");
elements.cargoTypeCount.textContent = cargoTypes.size ? `${cargoTypes.size}` : "-";
elements.routePreviewCount.textContent = routeCount ? `${routeCount}` : "-";
}
function renderMapStatus(locations, counts) {
const latestLocation = locations[0];
const averageEtaMinutes = calculateAverageEtaMinutes(locations);
elements.mapActiveCount.textContent = String(counts.active);
elements.mapEtaSummary.textContent = averageEtaMinutes === null ? "-" : formatDuration(averageEtaMinutes).replace("약 ", "");
elements.mapUpdatedAt.textContent = latestLocation ? formatTime(latestLocation.receivedAt) : "-";
}
function syncStatusFilterButtons() {
for (const button of elements.statusFilterButtons) {
button.classList.toggle("is-active", button.dataset.statusFilter === state.vehicleStatusFilter);
}
}
function matchesVehicleFilters(location) {
const status = getLocationStatus(location);
if (state.vehicleStatusFilter === "active" && status.key !== "active") return false;
if (state.vehicleStatusFilter === "stale" && status.key === "active") return false;
if (!state.vehicleSearch) return true;
const vehicleType = getVehicleType(location);
const haystack = [
location.vehicleNo,
location.driverName,
location.driverId,
vehicleType.label,
getCargoSummary(location),
getRouteSummary(location),
getRouteProgressSummary(location)
].join(" ").toLowerCase();
return haystack.includes(state.vehicleSearch.toLowerCase());
}
function calculateAverageEtaMinutes(locations) {
const etaValues = locations
.map((location) => getRouteMetrics(location)?.etaMinutes)
.filter((value) => Number.isFinite(value));
if (!etaValues.length) return null;
return Math.round(etaValues.reduce((total, value) => total + value, 0) / etaValues.length);
}
function renderDrivers() {
const drivers = [...state.drivers.values()].sort((left, right) => {
return String(left.vehicleNo || left.driverId).localeCompare(String(right.vehicleNo || right.driverId), "ko");
@@ -435,6 +545,7 @@ function createVehicleItem(location) {
const vehicleType = getVehicleType(location);
const item = document.createElement("article");
item.className = "vehicle-item";
item.classList.toggle("is-selected", state.selectedDriverId === location.driverId);
item.tabIndex = 0;
const main = document.createElement("div");
@@ -460,17 +571,34 @@ function createVehicleItem(location) {
meta.className = "vehicle-meta";
meta.textContent = [
location.driverName || location.driverId,
getCargoSummary(location),
getRouteSummary(location),
getRouteProgressSummary(location),
formatDateTime(location.receivedAt)
].filter(Boolean).join(" · ");
const routeLine = document.createElement("div");
routeLine.className = "vehicle-route-line";
routeLine.textContent = getRouteSummary(location);
const cargoLine = document.createElement("div");
cargoLine.className = "vehicle-cargo-line";
cargoLine.textContent = getCargoSummary(location);
const progress = document.createElement("div");
progress.className = "vehicle-progress";
const progressBar = document.createElement("span");
progressBar.style.width = `${getRouteProgressPercent(location)}%`;
progress.append(progressBar);
const speed = document.createElement("div");
speed.className = "speed";
speed.textContent = location.speed === null || location.speed === undefined ? "-" : `${Math.round(location.speed)} km/h`;
const speedValue = document.createElement("strong");
speedValue.textContent = location.speed === null || location.speed === undefined ? "-" : `${Math.round(location.speed)}`;
const speedUnit = document.createElement("span");
speedUnit.textContent = "km/h";
const etaValue = document.createElement("small");
etaValue.textContent = getRouteProgressSummary(location) || "ETA 대기";
speed.append(speedValue, speedUnit, etaValue);
main.append(title, meta);
main.append(title, meta, routeLine, cargoLine, progress);
item.append(main, speed);
item.addEventListener("click", () => focusLocation(location));
@@ -979,8 +1107,31 @@ function createDestinationMarkerHtml(location) {
`;
}
function renderRouteFocusPanel(location) {
if (!location) {
elements.routeFocusPanel.classList.remove("is-active");
elements.routeFocusTitle.textContent = "차량을 선택하세요";
elements.routeFocusMeta.textContent = "목적지 경로와 예상 도착 시간이 지도 위에 표시됩니다.";
return;
}
const metrics = getRouteMetrics(location);
const vehicleType = getVehicleType(location);
const cargo = getCargoSummary(location);
const destination = getDestinationName(location) || "목적지 미등록";
const progress = metrics
? `${formatDistance(metrics.remainingDistanceKm)} 남음 · ${formatDuration(metrics.etaMinutes)} · ${formatEtaTime(metrics.estimatedArrivalAt)} 도착`
: "경로 데이터 대기";
elements.routeFocusPanel.classList.add("is-active");
elements.routeFocusTitle.textContent = `${location.vehicleNo || location.driverId} · ${vehicleType.label}`;
elements.routeFocusMeta.textContent = `${cargo} · ${destination} · ${progress}`;
}
function focusLocation(location) {
loadLocationHistory(location);
renderRouteFocusPanel(location);
render();
if (!state.map || !state.mapProvider) return;
@@ -1043,6 +1194,8 @@ function closeHistoryDrawer() {
state.selectedDriverId = "";
elements.historyDrawer.classList.add("is-hidden");
clearRouteOverlay();
renderRouteFocusPanel(null);
render();
}
function showInfoOverlay(location) {
@@ -1270,6 +1423,14 @@ function getRouteProgressSummary(location) {
return `남은 ${formatDistance(metrics.remainingDistanceKm)} · ETA ${formatEtaTime(metrics.estimatedArrivalAt)}`;
}
function getRouteProgressPercent(location) {
const metrics = getRouteMetrics(location);
if (!metrics) return 14;
const urgency = 100 - Math.min(96, Math.max(0, metrics.etaMinutes / 180 * 100));
return Math.max(12, Math.min(94, Math.round(urgency)));
}
function getRouteMetrics(location) {
const routePath = getRoutePath(location);
if (routePath.length < 2) return null;

View File

@@ -9,19 +9,65 @@
<body>
<div class="app-shell">
<header class="topbar">
<div>
<strong class="brand">CargoRadar</strong>
<span class="subtitle">Control</span>
<div class="brand-lockup">
<span class="brand-mark" aria-hidden="true">CR</span>
<div>
<strong class="brand">CargoRadar</strong>
<span class="subtitle">Live freight control</span>
</div>
</div>
<div class="topbar-context">
<span class="topbar-chip">Demo control tower</span>
<time id="systemClock" datetime="">--:--</time>
</div>
<div class="toolbar">
<span id="connectionStatus" class="status-pill">연결 대기</span>
<button id="refreshButton" type="button">새로고침</button>
<button id="demoButton" type="button">샘플 위치</button>
<button id="refreshButton" class="toolbar-button" type="button">
<span class="button-icon" aria-hidden="true">
<svg viewBox="0 0 24 24" role="img">
<path d="M20 12a8 8 0 1 1-2.34-5.66" />
<path d="M20 4v6h-6" />
</svg>
</span>
새로고침
</button>
<button id="demoButton" class="toolbar-button" type="button">
<span class="button-icon" aria-hidden="true">
<svg viewBox="0 0 24 24" role="img">
<path d="M7 18h10" />
<path d="M6 14l2-5h8l2 5" />
<path d="M8 14h8" />
<path d="M9 18v-2" />
<path d="M15 18v-2" />
</svg>
</span>
샘플 위치
</button>
</div>
</header>
<main class="workspace">
<aside class="sidebar" aria-label="차량 목록">
<section class="ops-brief" aria-label="운영 브리핑">
<span class="section-eyebrow">오늘의 관제</span>
<strong id="opsHeadline">전국 운송 상태 확인 중</strong>
<p id="opsSubline">실시간 위치 수신을 기다리고 있습니다.</p>
<div class="ops-brief-grid">
<span>
<small>평균 ETA</small>
<strong id="averageEta">-</strong>
</span>
<span>
<small>화물 품목</small>
<strong id="cargoTypeCount">-</strong>
</span>
<span>
<small>경로 표시</small>
<strong id="routePreviewCount">-</strong>
</span>
</div>
</section>
<section class="summary-grid" aria-label="운영 현황">
<div class="metric">
<span class="metric-label">전체</span>
@@ -45,7 +91,18 @@
<section id="locationsPanel" class="vehicle-panel">
<div class="panel-heading">
<h1>차량 위치</h1>
<span id="lastUpdated">-</span>
<span id="lastUpdated">수신 대기</span>
</div>
<div class="vehicle-controls">
<label class="search-field">
<span>검색</span>
<input id="vehicleSearchInput" type="search" placeholder="차량, 기사, 화물, 목적지" autocomplete="off" />
</label>
<div class="status-filters" aria-label="차량 상태 필터">
<button class="filter-button is-active" type="button" data-status-filter="all">전체</button>
<button class="filter-button" type="button" data-status-filter="active">수신중</button>
<button class="filter-button" type="button" data-status-filter="stale">주의</button>
</div>
</div>
<div id="vehicleList" class="vehicle-list"></div>
</section>
@@ -95,6 +152,25 @@
<section class="map-panel" aria-label="지도">
<div id="map"></div>
<div id="mapMessage" class="map-message">지도 로딩 중</div>
<section class="map-status-panel" aria-label="지도 운영 상태">
<span class="section-eyebrow">Realtime map</span>
<strong id="mapStatusTitle">전국 화물 이동 상황</strong>
<div class="map-status-grid">
<span><b id="mapActiveCount">0</b> 수신중</span>
<span><b id="mapEtaSummary">-</b> 평균 ETA</span>
<span><b id="mapUpdatedAt">-</b> 최근 수신</span>
</div>
</section>
<section id="routeFocusPanel" class="route-focus-panel" aria-live="polite">
<span class="section-eyebrow">Selected route</span>
<strong id="routeFocusTitle">차량을 선택하세요</strong>
<p id="routeFocusMeta">목적지 경로와 예상 도착 시간이 지도 위에 표시됩니다.</p>
</section>
<div class="map-legend" aria-label="지도 범례">
<span><i class="legend-dot active"></i>수신중</span>
<span><i class="legend-dot stale"></i>주의</span>
<span><i class="legend-line"></i>목적지 경로</span>
</div>
<section id="historyDrawer" class="history-drawer is-hidden" aria-label="위치 이력">
<div class="history-heading">
<div>

View File

@@ -1,6 +1,6 @@
:root {
color-scheme: light;
--bg: #f5f7f9;
--bg: #eef3f7;
--surface: #ffffff;
--surface-muted: #eef2f5;
--border: #d9e0e7;
@@ -10,7 +10,10 @@
--green: #15803d;
--amber: #b45309;
--red: #b42318;
--navy: #162231;
--cyan: #0e7490;
--shadow: 0 12px 30px rgba(25, 37, 52, 0.08);
--shadow-strong: 0 18px 46px rgba(18, 30, 44, 0.16);
}
* {
@@ -35,6 +38,7 @@ body {
BlinkMacSystemFont,
sans-serif;
letter-spacing: 0;
-webkit-font-smoothing: antialiased;
}
button {
@@ -56,7 +60,7 @@ button:hover {
.app-shell {
display: grid;
grid-template-rows: 58px minmax(0, 1fr);
grid-template-rows: 64px minmax(0, 1fr);
width: 100%;
height: 100%;
}
@@ -65,30 +69,94 @@ button:hover {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 0 18px;
gap: 18px;
padding: 0 20px;
border-bottom: 1px solid var(--border);
background: var(--surface);
box-shadow: 0 1px 0 rgba(23, 33, 43, 0.02);
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 1px 0 rgba(23, 33, 43, 0.04);
}
.brand-lockup {
display: inline-flex;
align-items: center;
gap: 11px;
min-width: 232px;
}
.brand-mark {
display: grid;
place-items: center;
width: 38px;
height: 38px;
border: 1px solid rgba(31, 111, 235, 0.22);
border-radius: 8px;
background: #142033;
color: #ffffff;
font-size: 13px;
font-weight: 950;
}
.brand {
display: block;
font-size: 18px;
line-height: 1.1;
}
.subtitle {
margin-left: 8px;
display: block;
margin-top: 4px;
color: var(--muted);
font-size: 13px;
font-size: 12px;
font-weight: 700;
}
.topbar-context {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
min-width: 0;
color: var(--muted);
font-size: 12px;
font-weight: 800;
}
.topbar-chip {
padding: 6px 9px;
border: 1px solid rgba(14, 116, 144, 0.18);
border-radius: 999px;
background: rgba(14, 116, 144, 0.08);
color: var(--cyan);
}
.toolbar {
display: flex;
align-items: center;
gap: 8px;
}
.toolbar-button {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 0 11px;
}
.button-icon,
.button-icon svg {
display: block;
width: 15px;
height: 15px;
}
.button-icon svg {
fill: none;
stroke: currentColor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2.1;
}
.status-pill {
display: inline-flex;
align-items: center;
@@ -116,18 +184,92 @@ button:hover {
.workspace {
display: grid;
grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
min-height: 0;
}
.sidebar {
display: grid;
grid-template-rows: auto auto minmax(0, 1fr);
grid-template-rows: auto auto auto minmax(0, 1fr);
gap: 12px;
min-height: 0;
padding: 14px;
border-right: 1px solid var(--border);
background: #fbfcfd;
background: #f8fafc;
}
.section-eyebrow {
display: inline-flex;
align-items: center;
min-height: 20px;
color: #496173;
font-size: 11px;
font-weight: 950;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.ops-brief {
display: grid;
gap: 9px;
min-width: 0;
padding: 14px;
border: 1px solid rgba(22, 34, 49, 0.08);
border-radius: 8px;
background: #ffffff;
box-shadow: var(--shadow);
}
.ops-brief > strong {
min-width: 0;
overflow: hidden;
color: var(--navy);
font-size: 22px;
line-height: 1.15;
text-overflow: ellipsis;
white-space: nowrap;
}
.ops-brief p {
margin: 0;
color: var(--muted);
font-size: 13px;
font-weight: 750;
line-height: 1.45;
}
.ops-brief-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
}
.ops-brief-grid span {
min-width: 0;
padding: 9px;
border: 1px solid var(--border);
border-radius: 7px;
background: #f8fafc;
}
.ops-brief-grid small,
.ops-brief-grid strong {
display: block;
}
.ops-brief-grid small {
overflow: hidden;
color: var(--muted);
font-size: 11px;
font-weight: 850;
text-overflow: ellipsis;
white-space: nowrap;
}
.ops-brief-grid strong {
margin-top: 3px;
font-size: 16px;
line-height: 1.1;
}
.summary-grid {
@@ -138,10 +280,11 @@ button:hover {
.metric {
min-width: 0;
padding: 12px;
padding: 11px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
box-shadow: 0 1px 0 rgba(23, 33, 43, 0.02);
}
.metric-label {
@@ -154,7 +297,7 @@ button:hover {
.metric strong {
display: block;
margin-top: 4px;
font-size: 24px;
font-size: 25px;
line-height: 1.1;
}
@@ -183,6 +326,8 @@ button:hover {
}
.vehicle-panel {
display: grid;
grid-template-rows: auto auto minmax(0, 1fr);
min-height: 0;
border: 1px solid var(--border);
border-radius: 8px;
@@ -200,7 +345,7 @@ button:hover {
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 14px;
padding: 13px 14px;
border-bottom: 1px solid var(--border);
}
@@ -211,14 +356,75 @@ button:hover {
}
.panel-heading span {
min-width: 0;
overflow: hidden;
color: var(--muted);
font-size: 12px;
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
}
.vehicle-controls {
display: grid;
gap: 9px;
padding: 11px 12px;
border-bottom: 1px solid var(--border);
background: #fbfcfd;
}
.search-field {
display: grid;
gap: 5px;
min-width: 0;
}
.search-field span {
color: var(--muted);
font-size: 11px;
font-weight: 900;
}
.search-field input {
width: 100%;
min-height: 36px;
border: 1px solid var(--border);
border-radius: 6px;
padding: 0 10px;
background: #ffffff;
color: var(--text);
font: inherit;
font-size: 13px;
}
.search-field input:focus {
border-color: var(--blue);
outline: 2px solid rgba(31, 111, 235, 0.14);
}
.status-filters {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 6px;
}
.filter-button {
min-width: 0;
min-height: 32px;
border-color: transparent;
background: #eef3f7;
color: var(--muted);
font-size: 12px;
}
.filter-button.is-active {
border-color: rgba(31, 111, 235, 0.22);
background: rgba(31, 111, 235, 0.1);
color: #174ea6;
}
.vehicle-list {
height: calc(100% - 50px);
min-height: 0;
overflow: auto;
}
@@ -266,7 +472,6 @@ button:hover {
}
.driver-list {
height: calc(100% - 259px);
min-height: 160px;
overflow: auto;
}
@@ -329,10 +534,11 @@ button:hover {
.vehicle-item {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
grid-template-columns: minmax(0, 1fr) minmax(74px, auto);
gap: 10px;
padding: 13px 14px;
padding: 13px 14px 12px;
border-bottom: 1px solid var(--border);
border-left: 3px solid transparent;
cursor: pointer;
}
@@ -340,6 +546,11 @@ button:hover {
background: #f6f9fb;
}
.vehicle-item.is-selected {
border-left-color: var(--blue);
background: rgba(31, 111, 235, 0.06);
}
.vehicle-main {
min-width: 0;
}
@@ -364,6 +575,43 @@ button:hover {
line-height: 1.45;
}
.vehicle-route-line,
.vehicle-cargo-line {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.vehicle-route-line {
margin-top: 8px;
color: var(--text);
font-size: 13px;
font-weight: 850;
}
.vehicle-cargo-line {
margin-top: 3px;
color: var(--muted);
font-size: 12px;
font-weight: 750;
}
.vehicle-progress {
height: 4px;
margin-top: 9px;
border-radius: 999px;
background: #e4ebf1;
overflow: hidden;
}
.vehicle-progress span {
display: block;
height: 100%;
border-radius: inherit;
background: #1f6feb;
}
.badge {
display: inline-flex;
align-items: center;
@@ -418,12 +666,35 @@ button:hover {
}
.speed {
display: grid;
justify-items: end;
align-content: start;
gap: 2px;
color: var(--text);
font-size: 13px;
font-weight: 800;
white-space: nowrap;
}
.speed strong {
font-size: 20px;
line-height: 1;
}
.speed span {
color: var(--muted);
font-size: 11px;
font-weight: 900;
}
.speed small {
max-width: 92px;
overflow: hidden;
color: #174ea6;
font-size: 11px;
font-weight: 850;
text-align: right;
text-overflow: ellipsis;
}
.map-panel {
position: relative;
min-width: 0;
@@ -459,10 +730,138 @@ button:hover {
display: none;
}
.map-status-panel,
.route-focus-panel,
.map-legend {
position: absolute;
z-index: 3;
border: 1px solid rgba(22, 34, 49, 0.12);
border-radius: 8px;
background: rgba(255, 255, 255, 0.94);
box-shadow: var(--shadow-strong);
backdrop-filter: blur(10px);
pointer-events: none;
}
.map-status-panel {
top: 18px;
left: 18px;
display: grid;
gap: 9px;
width: min(330px, calc(100% - 36px));
padding: 14px;
}
.map-status-panel > strong {
color: var(--navy);
font-size: 18px;
line-height: 1.2;
}
.map-status-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 7px;
}
.map-status-grid span {
min-width: 0;
padding: 8px;
border-radius: 7px;
background: #f5f8fb;
color: var(--muted);
font-size: 11px;
font-weight: 850;
line-height: 1.25;
}
.map-status-grid b {
display: block;
overflow: hidden;
color: var(--text);
font-size: 16px;
line-height: 1.15;
text-overflow: ellipsis;
white-space: nowrap;
}
.route-focus-panel {
right: 18px;
bottom: 18px;
display: grid;
gap: 7px;
width: min(390px, calc(100% - 36px));
padding: 13px 14px 14px;
border-left: 4px solid #aebccc;
}
.route-focus-panel.is-active {
border-left-color: var(--blue);
}
.route-focus-panel strong {
min-width: 0;
overflow: hidden;
color: var(--navy);
font-size: 16px;
line-height: 1.2;
text-overflow: ellipsis;
white-space: nowrap;
}
.route-focus-panel p {
margin: 0;
color: var(--muted);
font-size: 12px;
font-weight: 800;
line-height: 1.45;
}
.map-legend {
top: 18px;
right: 18px;
display: flex;
align-items: center;
gap: 10px;
min-height: 36px;
padding: 8px 10px;
}
.map-legend span {
display: inline-flex;
align-items: center;
gap: 5px;
color: var(--muted);
font-size: 11px;
font-weight: 900;
white-space: nowrap;
}
.legend-dot {
width: 9px;
height: 9px;
border-radius: 50%;
}
.legend-dot.active {
background: var(--green);
}
.legend-dot.stale {
background: var(--amber);
}
.legend-line {
width: 18px;
height: 3px;
border-radius: 999px;
background: #1f6feb;
}
.history-drawer {
position: absolute;
z-index: 4;
right: 14px;
right: min(424px, 48%);
bottom: 14px;
left: 14px;
max-height: min(310px, calc(100% - 28px));
@@ -813,9 +1212,18 @@ button:hover {
.topbar {
align-items: flex-start;
flex-direction: column;
gap: 10px;
padding: 12px;
}
.brand-lockup {
min-width: 0;
}
.topbar-context {
justify-content: flex-start;
}
.toolbar {
width: 100%;
flex-wrap: wrap;
@@ -830,12 +1238,32 @@ button:hover {
order: 2;
border-top: 1px solid var(--border);
border-right: 0;
overflow: auto;
}
.map-panel {
order: 1;
}
.map-status-panel {
top: 10px;
left: 10px;
width: min(300px, calc(100% - 20px));
padding: 10px;
}
.map-legend {
right: 10px;
top: auto;
bottom: 10px;
}
.route-focus-panel {
right: 10px;
bottom: 56px;
width: calc(100% - 20px);
}
.driver-actions {
grid-template-columns: 1fr;
}
@@ -854,3 +1282,38 @@ button:hover {
display: none;
}
}
@media (max-width: 560px) {
.workspace {
grid-template-rows: minmax(300px, 42vh) minmax(0, 1fr);
}
.toolbar-button {
flex: 1 1 128px;
justify-content: center;
}
.status-pill {
flex: 1 0 100%;
justify-content: center;
}
.sidebar {
padding: 10px;
}
.ops-brief > strong {
white-space: normal;
}
.map-status-panel {
display: none;
}
.map-legend {
left: 10px;
right: auto;
max-width: calc(100% - 20px);
overflow: auto;
}
}