/* eTrack Fleet - same look as the gs tracking site's map page: white icon top panel, Objects/Events/Places/History side panel,
   Data/Graph/Messages bottom panel, modules in blue-titled windows over the map, Open Sans 11-12px, #2b82d4 accents. */
:root {
	--bg: #f5f5f5; --panel: #ffffff; --line: #e5e5e5; --line2: #efefef; --ink: #444444; --mute: #808080; --mute2: #a7a7a7;
	--blue: #2b82d4; --blue-bg: #e3eef9; --orange: #f5a623; --cp: #fdb52b; --green: #7cb342; --green-ink: #5f8a00; --red: #ff4e49; --red-ink: #d63a35;
	--grey: #6c6c6c; --amber-bg: #fff4e0; --green-bg: #eef7d9; --red-bg: #ffe9e8;
	--side-w: 390px; --bp-h: 220px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #fff; color: var(--ink); font: 12px/1.45 "Open Sans", "Segoe UI", Arial, sans-serif; overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 600; margin: 0; }
h2 { font-size: 14px; }
h3 { font-size: 12px; }
.mute { color: var(--mute); }
.small { font-size: 11px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.red { color: var(--red-ink); }
.pad { padding: 10px; }
.ic { display: inline-flex; align-items: center; justify-content: center; }
.ic svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------- inputs & buttons (gs: flat, soft grey fields) */
input, select, textarea, button { font: inherit; color: var(--ink); }
input[type=text], input[type=number], input[type=password], input[type=email], input[type=date], input[type=datetime-local], input[type=search], input[type=time], select, textarea {
	border: none; background: var(--bg); border-radius: 0; padding: 3px 7px; min-height: 26px; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { background: #eaf1f9; }
textarea { min-height: 60px; resize: vertical; }
input[type=checkbox] { accent-color: var(--blue); margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: none; background: var(--bg); color: var(--ink); border-radius: 0;
	padding: 4px 12px; min-height: 26px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #e9e9e9; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #2575c0; }
.btn.orange { background: var(--orange); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.red { background: var(--red); color: #fff; }
.btn.grey { background: var(--grey); color: #fff; }
.btn.small { min-height: 22px; padding: 1px 8px; font-size: 11px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 14px; height: 14px; }
.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

/* ---------------------------------------------------------- top panel: icons only, tooltips, CPanel / user / logout on the right */
#top_panel { position: fixed; top: 0; left: 0; right: 0; height: 36px; background: #fff; z-index: 1000; display: flex; align-items: stretch;
	box-shadow: 0 1px 3px rgba(0,0,0,.1); }
#top_panel .brand { display: flex; align-items: center; justify-content: center; width: 44px; }
#top_panel .brand img { width: 24px; height: 24px; display: block; }
#top_panel nav { display: flex; align-items: stretch; flex: 1; overflow-x: auto; scrollbar-width: none; }
#top_panel nav::-webkit-scrollbar { display: none; }
#top_panel nav a { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; padding: 0 10px; color: #555; text-decoration: none; position: relative; }
#top_panel nav a svg { width: 18px; height: 18px; }
#top_panel nav a:hover, #top_panel nav a.active { background: var(--bg); color: var(--blue); }
#top_panel .right { display: flex; align-items: stretch; }
#top_panel .right a { display: flex; align-items: center; gap: 6px; padding: 0 14px; color: var(--mute); font-size: 13px; text-decoration: none; white-space: nowrap; }
#top_panel .right a svg { width: 16px; height: 16px; }
#top_panel .right a:hover { background: var(--bg); }
#top_panel .right a.cpanel { background: var(--cp); color: #fff; width: 44px; justify-content: center; padding: 0; }
#top_panel .right a.ret { background: var(--orange); color: #fff; }
#top_panel .right a.logout { background: var(--grey); color: #fff; width: 40px; justify-content: center; padding: 0; }
#top_panel .right a.cpanel:hover, #top_panel .right a.logout:hover, #top_panel .right a.ret:hover { opacity: .9; }
.badge-count { font-size: 10px; line-height: 12px; background: var(--red); color: #fff; padding: 1px 4px; }
.badge-count.grey { background: var(--bg); color: var(--mute); }
.badge-count.amber { background: var(--orange); }

/* pop-up menus (row menu, top panel groups) */
.pmenu { position: fixed; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.2); z-index: 3500; min-width: 190px; padding: 3px 0; }
.pmenu a { display: flex; align-items: center; gap: 8px; padding: 5px 12px; color: var(--ink); text-decoration: none; white-space: nowrap; position: relative; }
.pmenu a:hover { background: var(--bg); text-decoration: none; }
.pmenu a .ic { width: 14px; color: #777; }
.pmenu a.has-sub::after { content: "›"; margin-left: auto; padding-left: 12px; color: var(--mute); font-size: 14px; }
.pmenu .pmenu.sub { display: none; position: absolute; left: 100%; top: -3px; }
.pmenu a.has-sub:hover > .pmenu.sub { display: block; }

/* ---------------------------------------------------------- workspace */
#workspace { position: fixed; top: 36px; left: 0; right: 0; bottom: 0; }
#side_panel { position: absolute; top: 0; bottom: 0; left: 0; width: var(--side-w); background: #fff; z-index: 500; display: flex; flex-direction: column;
	box-shadow: 1px 0 3px rgba(0,0,0,.06); }
#side_panel .tabs { display: flex; flex: none; background: #fff; padding: 6px 5px 0; }
#side_panel .tabs a { padding: 4px 9px; color: var(--ink); text-decoration: none; font-size: 12px; }
#side_panel .tabs a:hover { background: var(--bg); }
#side_panel .tabs a.active { background: var(--bg); }
#side_panel .body { flex: 1; overflow: auto; display: flex; flex-direction: column; min-height: 0; }
#side_panel .body > .pad, #side_panel .body > div:not(.sp-scroll):not(.og-list) { flex: none; }
#map { position: absolute; top: 0; bottom: 0; left: var(--side-w); right: 0; z-index: 1; background: #ddd; }
#workspace.with-bottom #map { bottom: var(--bp-h); }
.side-toggle { display: none; }

/* state filter bar + search (Objects / Places) */
.statebar { display: flex; gap: 2px; background: var(--bg); margin: 6px 10px 0; padding: 3px; flex: none; }
.statebar a { padding: 3px 8px; color: var(--ink); text-decoration: none; font-size: 12px; }
.statebar a:hover { text-decoration: none; background: #ebebeb; }
.statebar a.active { background: #fff; }
.statebar sup { color: var(--mute); font-size: 9px; margin-left: 1px; }
.sp-search { display: flex; gap: 4px; align-items: center; padding: 6px 10px; flex: none; }
.sp-search .sbox { flex: 1; position: relative; }
.sp-search .sbox .ic { position: absolute; left: 8px; top: 6px; color: var(--mute); }
.sp-search .sbox input { padding-left: 28px; }
.sp-search a.tb, a.tb { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: #666; text-decoration: none; flex: none; }
.sp-search a.tb:hover, a.tb:hover { background: #e9e9e9; color: var(--blue); }
.sp-search a.tb svg, a.tb svg { width: 15px; height: 15px; }
.sp-scroll { flex: 1; overflow: auto; min-height: 0; }

/* object grid */
.og-head, .og-group, .og-row { display: grid; grid-template-columns: 22px 22px 34px 1fr 50px 22px 16px; align-items: center; column-gap: 4px; padding: 0 6px 0 10px; }
.og-head { height: 26px; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line); color: var(--ink); flex: none; }
.og-head .c3 { grid-column: 3 / -1; text-align: center; }
.og-head .ic { color: #777; }
.og-group { height: 24px; color: var(--mute); border-bottom: 1px solid var(--line2); flex: none; }
.og-group .gname { grid-column: 3 / -1; text-align: right; padding-right: 6px; }
.og-list { flex: 1; overflow: auto; min-height: 0; }
.og-row { height: 33px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.og-row:hover { background: #f7fafd; }
.og-row.sel { background: var(--blue-bg); }
.og-row .truck svg { width: 30px; height: 19px; display: block; }
.og-row .nm { min-width: 0; line-height: 1.25; }
.og-row .n1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.og-row .n2 { color: var(--mute); font-size: 10px; }
.og-row .spd { text-align: right; font-size: 11px; white-space: nowrap; }
.og-row .conn svg { width: 16px; height: 16px; display: block; margin: auto; }
.og-row a.more { color: var(--blue); display: flex; justify-content: center; }
.og-row a.more svg { width: 16px; height: 16px; }
.empty { padding: 30px; text-align: center; color: var(--mute); }

/* small grids (events, places, history list, messages) */
table.sgrid { width: 100%; border-collapse: collapse; font-size: 11px; }
table.sgrid th { position: sticky; top: 0; background: #fff; font-weight: 400; text-align: left; padding: 0 6px; height: 26px; border-bottom: 1px solid var(--line);
	border-top: 1px solid var(--line2); white-space: nowrap; z-index: 1; }
table.sgrid td { padding: 4px 6px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.sgrid tr.click { cursor: pointer; }
table.sgrid tr.click:hover { background: #f7fafd; }
table.sgrid td.cb, table.sgrid th.cb { width: 24px; text-align: center; }
table.sgrid th.cb svg { width: 14px; height: 14px; vertical-align: middle; color: #777; }
table.sgrid td.act { white-space: nowrap; text-align: right; }
table.sgrid td.act a { margin-left: 6px; color: #777; display: inline-flex; vertical-align: middle; }
table.sgrid td.act a:hover { color: var(--blue); text-decoration: none; }
table.sgrid td.act svg { width: 14px; height: 14px; }
.ev { color: var(--ink); }
.ev.bad { color: var(--red-ink); font-weight: 600; }
.rlist .mk { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 700; align-items: center; justify-content: center; }
.msg-wrap { height: 100%; overflow: auto; }

/* history form (History tab) */
.hform { display: grid; grid-template-columns: 90px 1fr; gap: 4px 6px; align-items: center; padding: 10px 10px 4px; flex: none; }
.hform > label { color: var(--ink); }
.hform .check { font-size: 11px; color: var(--mute); }
.dt3 { display: grid; grid-template-columns: 1fr 58px 58px; gap: 4px; }
.hbtns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; padding: 6px 10px; flex: none; }
.hbtns .btn { justify-content: center; }
.hinfo-h { background: var(--bg); margin: 2px 10px 0; text-align: center; padding: 4px; flex: none; }

/* ---------------------------------------------------------- map controls */
.map-strip { margin-top: 8px !important; }
.leaflet-bar a, .leaflet-bar a:hover { width: 30px; height: 30px; line-height: 30px; color: #555; }
.map-strip a { display: flex !important; align-items: center; justify-content: center; }
.map-strip a svg { width: 15px; height: 15px; }
.map-strip a.on { color: var(--blue); }
.map-strip a:not(.on) { color: #aaa; }
.map-strip a[title^="Fit"], .map-strip a[title^="Open"], .map-strip a[title^="Ruler"]:not(.on) { color: #555; }
.leaflet-bar { border: none !important; box-shadow: 0 1px 4px rgba(0,0,0,.25) !important; border-radius: 0 !important; }
.leaflet-bar a { border-radius: 0 !important; }
.maptype-wrap { background: #fff; }
.maptype-wrap select { width: auto; min-width: 140px; background: #fff; height: 30px; font-size: 12px; }
.ruler-tip { background: #fff; border: none; box-shadow: 0 1px 4px rgba(0,0,0,.3); font-weight: 600; }
.place-pin { color: #fff; background: var(--blue); width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center;
	box-shadow: 0 1px 3px rgba(0,0,0,.35); border: 2px solid #fff; }
.place-pin svg { width: 11px; height: 11px; transform: rotate(45deg); }

/* ---------------------------------------------------------- bottom panel: Data / Graph / Messages */
#bottom_panel { position: absolute; left: var(--side-w); right: 0; bottom: 0; height: var(--bp-h); background: #fff; z-index: 400; box-shadow: 0 -1px 3px rgba(0,0,0,.08);
	display: none; flex-direction: column; }
#workspace.with-bottom #bottom_panel { display: flex; }
#bottom_panel .bp-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 0; flex: none; }
.bp-tabs { display: flex; }
.bp-tabs a { padding: 4px 9px; color: var(--ink); text-decoration: none; }
.bp-tabs a:hover { background: var(--bg); text-decoration: none; }
.bp-tabs a.active { background: var(--bg); }
#bpTools { flex: 1; text-align: right; color: var(--mute); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#bpClose { color: #555; display: flex; padding: 3px; }
#bpClose svg { width: 16px; height: 16px; }
#bottom_panel .bp-body { flex: 1; overflow: auto; position: relative; padding: 6px 10px 8px; min-height: 0; }
.ibox-wrap { display: flex; gap: 10px; height: 100%; align-items: stretch; overflow-x: auto; }
.ibox { flex: 1 0 250px; max-width: 420px; overflow: auto; }
.ibox-h { background: var(--bg); padding: 4px 8px; font-size: 12px; position: sticky; top: 0; }
table.kv2 { width: 100%; border-collapse: collapse; font-size: 11px; }
table.kv2 td { padding: 3px 8px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
table.kv2 td:first-child { color: var(--ink); }
table.kv2 td:first-child .ic { color: #777; margin-right: 6px; vertical-align: -2px; }
table.kv2 td:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.ibox .ctl { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 6px 8px; }
.ibox .ctl label { color: var(--ink); font-size: 11px; }
.ibox .ctl .row { flex-wrap: nowrap; }
.ibox .ctl .row input { flex: 1; }
.chart-wrap { height: 100%; }
.bp-title b { color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.st-moving { background: var(--green); } .st-idle { background: var(--orange); } .st-stopped { background: var(--red); } .st-offline { background: var(--mute2); }

/* playback bar */
#playbar { position: absolute; left: calc(var(--side-w) + 54px); right: 60px; bottom: 12px; z-index: 450; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25);
	padding: 5px 10px; display: none; align-items: center; gap: 10px; }
#workspace.with-bottom #playbar { bottom: calc(var(--bp-h) + 12px); }
#playbar.show { display: flex; }
#playbar input[type=range] { flex: 1; accent-color: var(--blue); }
#playbar .info { font-size: 11px; white-space: nowrap; min-width: 300px; }
#playbar .info b.over { color: var(--red-ink); }
#playbar select { width: auto; }

/* markers (gs: arrow + white label "name (speed)") */
.veh-marker { position: relative; }
.veh-marker .arrow { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.veh-marker .label { position: absolute; left: 24px; top: 2px; background: #fff; padding: 1px 5px; font-size: 11px; white-space: nowrap; color: var(--ink);
	box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.veh-marker .label.sel { background: var(--blue); color: #fff; }
.pin { width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center;
	border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.pin span { transform: rotate(45deg); color: #fff; font-size: 11px; font-weight: 700; }
.leaflet-popup-content { font: 12px/1.45 "Open Sans", "Segoe UI", Arial, sans-serif; margin: 10px 12px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { border-radius: 0; }
.leaflet-container { font-family: inherit; }

/* ---------------------------------------------------------- module windows (gs: blue title bar over the map) */
#win { position: fixed; z-index: 2000; left: 50%; top: 60px; transform: translateX(-50%); width: min(1180px, calc(100vw - 30px)); height: calc(100vh - 90px);
	background: #fff; box-shadow: 0 4px 22px rgba(0,0,0,.3); display: flex; flex-direction: column; }
.win-head { height: 36px; background: var(--blue); color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 12px; flex: none; cursor: move; user-select: none; font-size: 14px; }
.win-head #winIcon svg { width: 16px; height: 16px; display: block; }
.win-head #winTitle { flex: 1; }
.win-head #winClose { color: #fff; display: flex; }
.win-head #winClose svg { width: 18px; height: 18px; }
#page { flex: 1; overflow: auto; padding: 12px 14px; }
.card { background: #fff; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: var(--bg); flex-wrap: wrap; min-height: 34px; }
.card-head h2 { flex: 1; min-width: 160px; font-size: 13px; font-weight: 400; }
.card-head input[type=search], .card-head input[type=text] { background: #fff; }
.card-head select, .card-head input { background: #fff; width: auto; }
.card-body { padding: 10px 2px; }
.subtabs { display: flex; gap: 2px; margin-bottom: 10px; flex-wrap: wrap; }
.subtabs a { padding: 4px 10px; color: var(--ink); text-decoration: none; }
.subtabs a:hover { background: var(--bg); text-decoration: none; }
.subtabs a.active { background: var(--bg); }

.tbl-wrap { overflow: auto; max-height: calc(100vh - 230px); }
table.grid { width: 100%; border-collapse: collapse; font-size: 11px; }
table.grid th { position: sticky; top: 0; background: #fff; color: var(--ink); font-weight: 400; font-size: 12px; text-align: left; padding: 0 8px; height: 28px;
	border-bottom: 1px solid var(--line); border-top: 1px solid var(--line2); white-space: nowrap; cursor: pointer; user-select: none; z-index: 1; }
table.grid td { padding: 5px 8px; border-bottom: 1px solid var(--line2); vertical-align: top; }
table.grid tbody tr:hover { background: #f7fafd; }
table.grid tbody tr.click { cursor: pointer; }
table.grid tfoot td { font-weight: 600; background: var(--bg); border-top: 1px solid var(--line); }
table.grid.compact td { padding: 3px 8px; }

.pill { display: inline-block; padding: 1px 7px; font-size: 10px; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--mute); }
.pill.ok { background: var(--green-bg); color: var(--green-ink); }
.pill.soon { background: var(--amber-bg); color: #a86b00; }
.pill.bad { background: var(--red-bg); color: var(--red-ink); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }

/* dashboard tiles (gs dashboard: coloured squares) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.tile { background: var(--bg); padding: 8px 10px; min-height: 70px; display: flex; flex-direction: column-reverse; justify-content: space-between; cursor: default; }
.tile b { display: block; font-size: 22px; font-weight: 400; text-align: right; }
.tile span { font-size: 11px; }
.tile.link { cursor: pointer; }
.tile.link:hover { outline: 2px solid var(--blue); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.form-grid label, .field label { display: block; color: var(--ink); font-size: 11px; margin-bottom: 2px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid > * { min-width: 0; }
.field { margin-bottom: 8px; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row > * { flex: none; }
.row .grow { flex: 1; }
.quick { display: flex; flex-wrap: wrap; gap: 4px; }
.quick .btn { min-height: 22px; padding: 1px 8px; font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stat { background: var(--bg); padding: 6px 8px; }
.stat b { display: block; font-size: 15px; }
.stat span { color: var(--mute); font-size: 11px; }
.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 3px 10px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.kv td:first-child { color: var(--mute); width: 38%; white-space: nowrap; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 6px 10px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.list-plain li:hover { background: var(--bg); }
.searchbar { display: flex; gap: 6px; padding: 8px 10px; }
.notes { margin: 10px 0 0; padding: 0 0 0 18px; color: var(--mute); font-size: 11px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.vehpick { max-height: 180px; overflow: auto; background: var(--bg); padding: 6px 8px; columns: 2; }
.vehpick label { display: block; break-inside: avoid; }

/* ---------------------------------------------------------- dialogs (record forms) */
.dlg-back { position: fixed; inset: 0; background: rgba(255,255,255,.5); z-index: 3000; display: flex; align-items: flex-start; justify-content: center; padding: 50px 16px; overflow: auto; }
.dlg { background: #fff; width: 640px; max-width: 100%; box-shadow: 0 4px 22px rgba(0,0,0,.3); }
.dlg.wide { width: 900px; }
.dlg-head { display: flex; align-items: center; padding: 0 12px; height: 36px; background: var(--blue); color: #fff; }
.dlg-head .t { flex: 1; font-size: 14px; }
.dlg-head .x { cursor: pointer; display: flex; }
.dlg-head .x svg { width: 18px; height: 18px; }
.dlg-body { padding: 12px 14px; max-height: calc(100vh - 200px); overflow: auto; }
.dlg-foot { display: flex; gap: 6px; justify-content: center; padding: 8px 12px 12px; }
.dlg-foot .left { margin-right: auto; }
.section-title { grid-column: 1 / -1; margin-top: 6px; padding: 4px 0; border-bottom: 1px solid var(--line2); color: var(--blue); font-size: 13px; }
.hint { color: var(--mute); font-size: 10px; margin-top: 2px; }

#toast { position: fixed; right: 14px; bottom: 14px; z-index: 4000; display: flex; flex-direction: column; gap: 6px; }
#toast div { background: #444; color: #fff; padding: 8px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.25); max-width: 360px; }
#toast div.err { background: var(--red-ink); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 6px 0 6px 14px; border-left: 2px solid var(--line); position: relative; margin-left: 4px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.timeline li.gps::before { background: var(--green); }

/* steps of the job workflow */
.steps { display: flex; gap: 2px; flex-wrap: wrap; margin: 6px 0; }
.steps span { font-size: 11px; padding: 2px 6px; background: var(--bg); color: var(--mute); }
.steps span.done { background: var(--green-bg); color: var(--green-ink); }
.steps span.cur { background: var(--blue); color: #fff; }

canvas.chart { width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------- login */
body#login { overflow: auto; background: #e5e5e5; }
#login .wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
#login .box { background: #fff; width: 360px; max-width: 100%; padding: 26px; border-top: 2px solid var(--blue); box-shadow: 0 2px 14px rgba(0,0,0,.1); }
#login .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
#login .logo img { width: 52px; height: 52px; }
#login .logo b { font-size: 20px; display: block; }
#login .err { color: var(--red-ink); min-height: 18px; margin: 6px 0; }
#login .field label { font-size: 12px; }

/* ---------------------------------------------------------- print / small screens */
@media print {
	#top_panel, .no-print, .card-head .btn, .dlg-foot, #toast, #workspace, .win-head { display: none !important; }
	body { overflow: visible; background: #fff; }
	#win { position: static; transform: none; width: auto; height: auto; box-shadow: none; display: block; }
	#page { overflow: visible; padding: 0; }
	.tbl-wrap { max-height: none; overflow: visible; }
	.print-head { display: block !important; }
}
.print-head { display: none; margin-bottom: 10px; }

@media (max-width: 760px) {
	:root { --side-w: 0px; --bp-h: 46vh; }
	#side_panel { width: 100%; transform: translateX(-100%); transition: transform .2s; }
	#workspace.side-open #side_panel { transform: none; }
	.side-toggle { display: block; position: absolute; top: 10px; left: 50px; z-index: 600; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
	#workspace.side-open .side-toggle { left: auto; right: 10px; }
	#playbar { left: 8px; right: 8px; flex-wrap: wrap; }
	#playbar .info { min-width: 0; width: 100%; }
	.form-grid { grid-template-columns: 1fr; }
	#top_panel nav a { min-width: 38px; padding: 0 8px; }
	#top_panel .right a.me span { display: none; }
	#win { top: 36px; left: 0; transform: none; width: 100vw; height: calc(100vh - 36px); }
	.win-head { cursor: default; }
	#page { padding: 8px; }
	.vehpick { columns: 1; }
	.ibox { flex-basis: 85vw; }
}

table.vpop { border-collapse: collapse; font-size: 12px; margin-right: 12px; }
table.vpop td { padding: 1px 0; vertical-align: top; }
table.vpop td:first-child { font-weight: 600; padding-right: 10px; white-space: nowrap; }
table.vpop td:last-child { min-width: 170px; }

/* ---------------------------------------------------------- Reports window + Report properties (gs layout) */
.rep-search { margin-bottom: 6px; max-width: 100%; }
.rep-search input { background: var(--bg); }
.rep-wrap { display: flex; flex-direction: column; }
.rep-wrap .tbl-wrap { max-height: calc(100vh - 260px); min-height: 200px; }
table.rep-grid td { vertical-align: middle; }
table.rep-grid th.cb, table.rep-grid td.cb { width: 26px; text-align: center; }
table.rep-grid td.c, table.rep-grid th.c { text-align: center; }
table.rep-grid td.act { white-space: nowrap; text-align: right; width: 80px; }
table.rep-grid td.act a { margin-left: 8px; color: #777; display: inline-flex; vertical-align: middle; }
table.rep-grid td.act a:hover { color: var(--blue); }
table.rep-grid td.act svg, .rep-foot svg { width: 14px; height: 14px; }
.rep-foot { display: flex; align-items: center; background: var(--bg); height: 32px; padding: 0 8px; gap: 8px; }
.rep-foot .lb { display: flex; gap: 2px; }
.rep-foot .lb a { width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; color: #777; }
.rep-foot .lb a.add { background: var(--blue); color: #fff; }
.rep-foot .mute { margin-left: auto; }
.ok { color: var(--green-ink); font-weight: 700; }
.no { color: var(--red); font-weight: 700; }
.dlg.rp-dlg { width: 1060px; }
.rp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.rp-sect { color: var(--blue); font-size: 13px; padding: 4px 0 5px; border-bottom: 1px solid var(--line2); margin: 6px 0 6px; }
.rp-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; min-height: 30px; gap: 8px; }
.rp-row > label { color: var(--ink); }
.rp-row.off { opacity: .45; }
.rp-row.off > *:not(label) { pointer-events: none; }
.dt4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.msel-btn { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 26px; border: none; background: var(--bg); padding: 3px 7px; cursor: pointer; text-align: left; }
.msel-btn span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel-btn .car { color: #666; }
.msel-pop { position: fixed; z-index: 3600; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.25); max-height: 330px; display: flex; flex-direction: column; }
.msel-q { position: relative; padding: 5px; }
.msel-q .ic { position: absolute; left: 12px; top: 11px; color: var(--mute); }
.msel-q input { padding-left: 26px; }
.msel-list { overflow: auto; flex: 1; padding-bottom: 4px; }
.msel-opt { display: flex; align-items: center; gap: 7px; padding: 3px 9px; cursor: pointer; }
.msel-opt:hover { background: var(--bg); }
.msel-opt.in { padding-left: 22px; }
@media (max-width: 760px) { .rp-form { grid-template-columns: 1fr; } .rp-row { grid-template-columns: 120px 1fr; } }
