/* skEYEwatch VMS customer site. Colours are tokens (the owner, 2026-10-22). Only the logo says skEYEvue or RAILvue; the
   colours are the same. */
:root, [data-bs-theme="light"] {
  --vms-bg: #eef3f9; --vms-surface: #ffffff; --vms-surface-2: #f5f8fc; --vms-border: #d7e1ee; --vms-text: #0d1b2e; --vms-muted: #5b6c85;
  --vms-glow: rgba(42, 139, 230, .28); --vms-blue: #2a8be6; --vms-cyan: #3fb6f5;
  --bs-body-bg: var(--vms-bg); --bs-body-color: var(--vms-text); --bs-primary: var(--vms-blue); --bs-primary-rgb: 42, 139, 230;
  --bs-link-color: #1a6fd0; --bs-border-color: var(--vms-border);
}
[data-bs-theme="dark"] {
  --vms-bg: #060b15; --vms-surface: #0f1a2e; --vms-surface-2: #13223b; --vms-border: #1f3355; --vms-text: #e6eefb; --vms-muted: #8ea3c2;
  --vms-glow: rgba(95, 208, 255, .22); --vms-blue: #2a8be6; --vms-cyan: #5fd0ff;
  --bs-body-bg: var(--vms-bg); --bs-body-color: var(--vms-text); --bs-primary: var(--vms-blue); --bs-primary-rgb: 42, 139, 230;
  --bs-link-color: #5fd0ff; --bs-border-color: var(--vms-border);
}
html { --vms-accent: var(--vms-blue); --vms-accent-2: var(--vms-cyan); }

body {
  background: radial-gradient(1200px 600px at 15% -10%, var(--vms-glow), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(42, 139, 230, .10), transparent 60%), var(--vms-bg);
  background-attachment: fixed; color: var(--vms-text); font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif; min-height: 100vh;
}
.text-muted-vms { color: var(--vms-muted) !important; }
.btn-primary { --bs-btn-bg: var(--vms-blue); --bs-btn-border-color: var(--vms-blue); --bs-btn-hover-bg: #1f78cc; --bs-btn-hover-border-color: #1f78cc;
  --bs-btn-active-bg: #1a6bb8; --bs-btn-active-border-color: #1a6bb8; box-shadow: 0 0 18px var(--vms-glow); }
.form-control:focus, .form-select:focus { border-color: var(--vms-cyan); box-shadow: 0 0 0 .2rem var(--vms-glow); }
a { color: var(--bs-link-color); }

.vms-card { background: color-mix(in srgb, var(--vms-surface) 88%, transparent); border: 1px solid var(--vms-border); border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 18px 50px rgba(0, 0, 0, .25), 0 0 40px var(--vms-glow); backdrop-filter: blur(8px); }
/* A card holding an open dropdown comes to the front (backdrop-filter makes every card its own layer). */
.vms-card:has(.dropdown-menu.show) { position: relative; z-index: 5; }

/* ---- sign-in ---- */
.vms-hero { min-height: 100vh; display: grid; place-items: center; padding: 2rem 16px;
  background: linear-gradient(180deg, rgba(3, 6, 14, .2), rgba(3, 6, 14, .45)), url("/brand/photos/signin-wide.jpg") center / cover no-repeat, #050912; }
/* A phone held upright gets the portrait photo rather than a sliver of the wide one. */
@media (max-aspect-ratio: 4/5) { .vms-hero { background-image: linear-gradient(180deg, rgba(3, 6, 14, .2), rgba(3, 6, 14, .45)), url("/brand/photos/signin-tall.jpg"); } }
.vms-hero .vms-card { width: min(440px, 100%); padding: 1.75rem; color: #e6eefb; background: rgba(10, 18, 34, .72); border-color: rgba(120, 160, 220, .22); }
.vms-hero .form-control { background: rgba(255, 255, 255, .06); border-color: rgba(150, 180, 230, .28); color: #fff; }
.vms-hero .form-control::placeholder { color: rgba(220, 230, 250, .55); }
.vms-hero .form-control:focus { background: rgba(255, 255, 255, .09); color: #fff; }
.vms-hero .text-muted-vms { color: #a8b8d4 !important; }
.vms-hero .form-label { color: #c9d6ec; }
.brand-pair { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: .35rem; }
.brand-pair img { height: 30px; width: auto; }
.brand-pair .sep { width: 1px; height: 28px; background: rgba(160, 190, 235, .35); }
.vms-tagline { letter-spacing: .25em; font-size: .72rem; color: #8fd8ff; text-transform: uppercase; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); opacity: .6; pointer-events: none; }
.input-icon > .form-control { padding-left: 2.5rem; }
.input-icon > .eye { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: inherit; opacity: .7; padding: .25rem .5rem; }
.code-input { letter-spacing: .5em; font-size: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.step { animation: vmsIn .25s ease-out; }
@keyframes vmsIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- the site shell ---- */
.vms-topbar { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem;
  background: color-mix(in srgb, var(--vms-surface) 82%, transparent); border-bottom: 1px solid var(--vms-border); backdrop-filter: blur(12px); }
.vms-topbar .brand img { height: 30px; }
.vms-icon-btn { border: 1px solid var(--vms-border); background: transparent; color: var(--vms-text); border-radius: 10px; width: 38px; height: 38px;
  display: inline-grid; place-items: center; }
.vms-icon-btn:hover { box-shadow: 0 0 0 3px var(--vms-glow); }
.vms-main { max-width: 1280px; margin: 0 auto; padding: 1.25rem 16px 3rem; }
.vms-h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.vms-loading { position: fixed; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, transparent, var(--vms-accent-2), transparent);
  background-size: 50% 100%; animation: vmsBar 1s linear infinite; z-index: 2000; display: none; }
.vms-loading.on { display: block; }
@keyframes vmsBar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.fleet-card { padding: 1rem 1.1rem; height: 100%; }
.fleet-card.suspended { border-color: rgba(220, 53, 69, .55); }
.vms-banner { border-radius: 12px; }
.product-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.product-choice button { border: 1px solid rgba(150, 180, 230, .3); background: rgba(255, 255, 255, .05); border-radius: 14px; padding: 1rem; color: inherit; }
.product-choice button:hover { box-shadow: 0 0 0 3px var(--vms-glow); }
.product-choice img { height: 26px; }
.theme-logo-dark { display: none; } [data-bs-theme="dark"] .theme-logo-dark { display: inline; } [data-bs-theme="dark"] .theme-logo-light { display: none; }
@media (max-width: 575.98px) { .vms-main { padding: 1rem 16px 3rem; } .brand-pair img { height: 24px; } }

/* ---- the home page's photo band: night photo in dark mode, the dusk one in light mode ---- */
.home-hero { position: relative; border-radius: 18px; overflow: hidden; min-height: 190px; display: flex; align-items: flex-end;
  padding: 1.5rem; margin-bottom: 1.25rem; color: #fff; border: 1px solid var(--vms-border);
  background: linear-gradient(90deg, rgba(4, 9, 20, .82) 0%, rgba(4, 9, 20, .35) 55%, rgba(4, 9, 20, .1) 100%), url("/brand/photos/home-dark.jpg") center 60% / cover no-repeat; }
[data-bs-theme="light"] .home-hero { background-image: linear-gradient(90deg, rgba(10, 20, 40, .7) 0%, rgba(10, 20, 40, .25) 60%, transparent 100%), url("/brand/photos/home-light.jpg"); }
.home-hero h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 .25rem; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.home-hero p { margin: 0; opacity: .85; }
@media (max-width: 575.98px) { .home-hero { min-height: 150px; padding: 1rem; } .home-hero h1 { font-size: 1.25rem; } }

/* ---- the layout: a menu down the LEFT (the owner, 2026-10-22), the page beside it; on a phone the menu slides in ---- */
.vms-layout { display: flex; min-height: 100vh; }
.vms-side { width: 250px; flex: 0 0 250px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  padding: 1rem .75rem; z-index: 1040; border-right: 1px solid var(--vms-border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--vms-surface) 96%, transparent), color-mix(in srgb, var(--vms-surface) 86%, transparent));
  backdrop-filter: blur(12px); }
.side-brand { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1rem; color: var(--vms-text); text-decoration: none; font-weight: 700; }
.side-brand img.icon { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 16px var(--vms-glow); }
.side-brand img.logo { height: 30px; width: auto; }
.side-brand small { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .14em; color: var(--vms-muted); }
.side-label { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--vms-muted); padding: 1rem .75rem .35rem; }
.side-link { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; margin: 1px 0; border-radius: 11px; color: var(--vms-text);
  text-decoration: none; font-weight: 500; transition: background .15s, box-shadow .15s; }
.side-link i { font-size: 1.12rem; width: 1.3rem; text-align: center; opacity: .8; }
.side-link:hover { background: color-mix(in srgb, var(--vms-accent) 12%, transparent); color: var(--vms-text); }
.side-link.active { background: color-mix(in srgb, var(--vms-accent) 20%, transparent); box-shadow: inset 3px 0 0 var(--vms-accent), 0 0 18px var(--vms-glow); }
.side-link.active i { opacity: 1; color: var(--vms-accent); }
.side-foot { margin-top: auto; padding: .75rem; font-size: .75rem; color: var(--vms-muted); }
.vms-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.vms-body > .vms-main { width: 100%; }
.page-title { font-weight: 700; font-size: 1.05rem; }
.side-scrim { display: none; }
@media (max-width: 991.98px) {
  .vms-side { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .45); }
  body.side-open .vms-side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1035; }
}
@media (min-width: 992px) { .side-toggle { display: none !important; } }

html { --acc: var(--vms-accent); }

/* ==== shared components (the same block is in the admin site's vms.css and the customer site's site.css) ==== */
/* Pages use the FULL WIDTH (the owner, 2026-10-22: "lots of empty pages"). */
.vms-body > .vms-main, .vms-main { max-width: none; width: 100%; margin: 0; padding: 1.25rem clamp(16px, 2vw, 28px) 3rem; }
.theme-light-only { display: none !important; }
[data-bs-theme="light"] .theme-light-only { display: inline-block !important; }
[data-bs-theme="light"] .theme-dark-only { display: none !important; }

.page-head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head > div:first-child { flex: 1 1 24rem; }
.page-head .vms-h1 { font-size: 1.5rem; font-weight: 750; letter-spacing: -.01em; margin-bottom: .2rem; }

/* figures across the top of a page; clicking one filters */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1.1rem; }
.kpi { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; text-align: left; color: var(--vms-text); cursor: default;
  border: 1px solid var(--vms-border); border-radius: 14px; background: color-mix(in srgb, var(--vms-surface) 90%, transparent); transition: box-shadow .15s, border-color .15s; }
.kpi[data-filter] { cursor: pointer; }
.kpi[data-filter]:hover, .kpi.active { border-color: color-mix(in srgb, var(--acc) 55%, var(--vms-border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc) 30%, transparent), 0 0 22px var(--vms-glow); }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 42px;
  color: var(--kc, var(--acc)); background: color-mix(in srgb, var(--kc, var(--acc)) 16%, transparent); }
.kpi-value { display: block; font-size: 1.45rem; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { display: block; font-size: .78rem; color: var(--vms-muted); }
.kpi.tone-live { --kc: #22c55e; } .kpi.tone-info { --kc: #3b9cf0; } .kpi.tone-warning { --kc: #f5b301; } .kpi.tone-critical { --kc: #ef4444; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 1rem; }
.banner-card { padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.banner-preview .vb { margin: 0; }
.banner-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.banner-foot { display: flex; align-items: center; gap: .5rem; border-top: 1px solid var(--vms-border); padding-top: .7rem; margin-top: auto; }
.meta-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; padding: .2rem .55rem; border-radius: 999px;
  background: color-mix(in srgb, var(--vms-text) 7%, transparent); color: var(--vms-text); }
.state-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; }
.state-live { background: rgba(31, 185, 120, .16); color: #1fb978; } .state-scheduled { background: rgba(59, 156, 240, .16); color: #3b9cf0; }
.state-ended, .state-off { background: color-mix(in srgb, var(--vms-muted) 18%, transparent); color: var(--vms-muted); }
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-icon { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 22px; display: grid; place-items: center; font-size: 2rem; color: var(--acc);
  background: color-mix(in srgb, var(--acc) 14%, transparent); box-shadow: 0 0 30px var(--vms-glow); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .78rem; font-weight: 700; color: #fff; flex: 0 0 34px;
  background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 45%, #6d28d9)); }
.avatar.sm { width: 30px; height: 30px; flex-basis: 30px; }
.me-btn { border: 0; background: none; padding: 0; border-radius: 50%; display: grid; place-items: center; width: 38px; height: 38px; color: var(--vms-text); font-size: 1.4rem; }
.me-btn:hover .avatar { box-shadow: 0 0 0 3px var(--vms-glow); }
.me-menu { min-width: 15rem; }
.me-head { padding: .5rem 1rem .25rem; } .me-head b, .me-head span { display: block; } .me-head span { font-size: .8rem; color: var(--vms-muted); }
.me-build { padding: .35rem 1rem .1rem; font-size: .68rem; color: var(--vms-muted); opacity: .7; letter-spacing: .02em; }
.table-tools { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--vms-border); }
.input-icon { position: relative; } .input-icon > i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); opacity: .55; pointer-events: none; }
.input-icon > .form-control { padding-left: 2.1rem; }

/* editors */
.style-picks { display: flex; flex-wrap: wrap; gap: .5rem; }
.style-pick { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: 10px; cursor: pointer; font-size: .85rem;
  border: 1px solid var(--vms-border); }
.btn-check:checked + .style-pick { border-color: var(--vb); background: color-mix(in srgb, var(--vb) 16%, transparent); box-shadow: 0 0 0 1px var(--vb); }
.style-pick i { color: var(--vb); }
.icon-picks { display: flex; flex-wrap: wrap; gap: .35rem; }
.icon-pick { min-width: 38px; height: 38px; padding: 0 .55rem; display: inline-grid; place-items: center; border-radius: 10px; cursor: pointer; font-size: 1.05rem;
  border: 1px solid var(--vms-border); font-size: .8rem; }
.icon-pick i { font-size: 1.05rem; }
.btn-check:checked + .icon-pick { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 16%, transparent); }
.rte { min-height: 7rem; max-height: 16rem; overflow: auto; }
.fleet-box { max-height: 11rem; overflow: auto; border: 1px solid var(--vms-border); border-radius: 10px; padding: .5rem; }
.fleet-box.tall { max-height: 20rem; }
.fleet-chip { display: inline-flex; align-items: center; gap: .35rem; margin: .15rem; padding: .2rem .55rem; border-radius: 999px; font-size: .8rem; cursor: pointer;
  border: 1px solid var(--vms-border); }
.fleet-chip:has(input:checked) { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 16%, transparent); }
.fleet-chip input { margin: 0; }
.preview-pane { position: sticky; top: 0; padding: 1rem; border-radius: 14px; border: 1px dashed var(--vms-border);
  background: color-mix(in srgb, var(--vms-bg) 60%, transparent); }
.preview-label { font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--vms-muted); margin-bottom: .6rem; }

/* ==== THE BANNER - one design for banners, notices and overdue alerts, on both sites ==== */
.vb { --vb: #3b9cf0; position: relative; display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 2.6rem 1rem 1.1rem; margin-bottom: .8rem;
  border-radius: 14px; color: var(--vms-text); border: 1px solid color-mix(in srgb, var(--vb) 38%, transparent);
  background: linear-gradient(120deg, color-mix(in srgb, var(--vb) 18%, var(--vms-surface)) 0%, color-mix(in srgb, var(--vms-surface) 92%, transparent) 65%);
  box-shadow: inset 4px 0 0 var(--vb), 0 10px 26px rgba(0, 0, 0, .14); animation: vbIn .3s ease-out; }
@keyframes vbIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.vb.info, .style-pick.info { --vb: #3b9cf0; } .vb.success, .style-pick.success { --vb: #1fb978; } .vb.warning, .style-pick.warning { --vb: #e6a019; }
.vb.critical, .style-pick.critical { --vb: #e5484d; } .vb.promo, .style-pick.promo { --vb: #8b5cf6; }
.vb.promo { background: linear-gradient(120deg, color-mix(in srgb, #8b5cf6 24%, var(--vms-surface)) 0%, color-mix(in srgb, #3b9cf0 14%, var(--vms-surface)) 55%, var(--vms-surface) 100%); }
.vb-icon { flex: 0 0 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; color: #fff;
  background: linear-gradient(135deg, var(--vb), color-mix(in srgb, var(--vb) 55%, #000)); box-shadow: 0 6px 16px color-mix(in srgb, var(--vb) 38%, transparent); }
.vb-main { min-width: 0; flex: 1; }
.vb-title { font-weight: 700; font-size: 1rem; margin: .1rem 0 .15rem; }
.vb-body { font-size: .9rem; line-height: 1.5; color: color-mix(in srgb, var(--vms-text) 86%, transparent); overflow-wrap: anywhere; }
.vb-body p { margin: 0 0 .35rem; } .vb-body p:last-child, .vb-body ul:last-child { margin-bottom: 0; } .vb-body a { color: var(--vb); }
.vb-cta { display: inline-flex; align-items: center; margin-top: .6rem; padding: .35rem .85rem; border-radius: 9px; font-size: .85rem; font-weight: 600;
  text-decoration: none; color: #fff; background: var(--vb); box-shadow: 0 4px 14px color-mix(in srgb, var(--vb) 40%, transparent); }
.vb-cta:hover { color: #fff; filter: brightness(1.08); }
.vb-x { position: absolute; top: .55rem; right: .55rem; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--vms-text); opacity: .55; }
.vb-x:hover { opacity: 1; background: color-mix(in srgb, var(--vms-text) 8%, transparent); }
/* "Every page": a slim strip under the top bar */
.vb.strip { align-items: center; padding: .55rem 2.6rem .55rem .9rem; border-radius: 12px; }
.vb.strip .vb-icon { flex-basis: 30px; height: 30px; border-radius: 9px; font-size: 1rem; }
.vb.strip .vb-main { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .75rem; }
.vb.strip .vb-title { margin: 0; font-size: .92rem; }
.vb.strip .vb-body { font-size: .85rem; } .vb.strip .vb-body p { display: inline; margin: 0; }
.vb.strip .vb-cta { margin-top: 0; padding: .2rem .65rem; font-size: .8rem; }

/* ==== the customer site's frame: the menu across the TOP, the fleet -> vehicle tree on the LEFT (the owner, 2026-10-22) ==== */
:root { --topbar-h: 58px; }
body { overflow-x: hidden; }
.vms-topbar { height: var(--topbar-h); }
.vms-topbar .brand { display: flex; align-items: center; }
.vms-topbar .brand-logo { height: 28px; width: auto; }
.top-nav { display: flex; gap: .25rem; margin-left: 1.25rem; }
.top-link { display: flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 10px; color: var(--vms-muted); text-decoration: none; font-weight: 500; }
.top-link:hover { color: var(--vms-text); background: color-mix(in srgb, var(--acc) 10%, transparent); }
.top-link.active { color: var(--vms-text); background: color-mix(in srgb, var(--acc) 16%, transparent); box-shadow: inset 0 -2px 0 var(--acc); }
.product-switch { border: 1px solid var(--vms-border); border-radius: 10px; color: var(--vms-text); font-weight: 600; }
.vms-shell { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.vms-shell > .vms-main { flex: 1 1 auto; min-width: 0; }
.vms-tree { width: 300px; flex: 0 0 300px; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); display: flex; flex-direction: column;
  border-right: 1px solid var(--vms-border); background: color-mix(in srgb, var(--vms-surface) 92%, transparent); backdrop-filter: blur(10px); z-index: 1020; }
.tree-head { padding: .75rem; border-bottom: 1px solid var(--vms-border); }
.tree-counts { display: flex; justify-content: space-between; font-size: .75rem; color: var(--vms-muted); margin-top: .55rem; }
.tree-body { overflow-y: auto; flex: 1; padding: .4rem; }
.tree-fleet-head { width: 100%; display: flex; align-items: center; gap: .5rem; border: 0; background: none; color: var(--vms-text); padding: .55rem .6rem;
  border-radius: 10px; font-weight: 600; font-size: .9rem; text-align: left; }
.tree-fleet-head:hover { background: color-mix(in srgb, var(--acc) 10%, transparent); }
.chev { transition: transform .15s; font-size: .72rem; opacity: .65; } .tree-fleet.open > .tree-fleet-head .chev { transform: rotate(90deg); }
.tree-fleet-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-badge { font-size: .7rem; padding: .1rem .45rem; border-radius: 999px; background: color-mix(in srgb, var(--vms-text) 8%, transparent); color: var(--vms-muted); font-variant-numeric: tabular-nums; }
/* The fleet's colour: any online green, else any dormant yellow, else red; grey (above) only for an empty fleet. */
.tree-badge.tone-online { color: color-mix(in srgb, #22c55e 70%, var(--vms-text)); background: color-mix(in srgb, #22c55e 18%, transparent); }
.tree-badge.tone-dormant { color: color-mix(in srgb, #f5b301 70%, var(--vms-text)); background: color-mix(in srgb, #f5b301 18%, transparent); }
.tree-badge.tone-offline { color: color-mix(in srgb, #ef4444 70%, var(--vms-text)); background: color-mix(in srgb, #ef4444 18%, transparent); }
.tree-badge.bad { color: #e5484d; background: rgba(229, 72, 77, .15); }
.tree-vehicles { padding: .1rem 0 .4rem .95rem; border-left: 1px solid var(--vms-border); margin-left: 1rem; }
.tree-vehicle { width: 100%; display: flex; align-items: center; gap: .6rem; border: 0; background: none; color: var(--vms-text); padding: .42rem .55rem; border-radius: 9px; text-align: left; }
.tree-vehicle:hover { background: color-mix(in srgb, var(--acc) 9%, transparent); }
.tree-vehicle.active { background: color-mix(in srgb, var(--acc) 20%, transparent); box-shadow: inset 3px 0 0 var(--acc); }
.tv-main { min-width: 0; flex: 1; } .tv-main b { display: block; font-size: .86rem; font-weight: 600; }
.tv-main small { display: block; font-size: .72rem; color: var(--vms-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-speed { font-size: .72rem; color: #22c55e; font-weight: 700; white-space: nowrap; }
.tree-note { font-size: .8rem; color: var(--vms-muted); padding: .4rem .6rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 9px; background: #8a94a6; }
/* The state colours. */
.dot.st-online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.dot.st-dormant { background: #f5b301; box-shadow: 0 0 0 3px rgba(245, 179, 1, .18); } .dot.st-offline { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }
.dot.st-notConnected { background: transparent; border: 1.5px solid var(--vms-muted); }
.dot-label { display: inline-flex; align-items: center; gap: .35rem; }
.top-banners { padding: .7rem clamp(16px, 2vw, 28px) 0; } .top-banners:empty { display: none; } .top-banners .vb { margin-bottom: .5rem; }
.tree-toggle { display: none !important; }
#treeScrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1040; }
@media (max-width: 991.98px) {
  .tree-toggle { display: inline-grid !important; }
  .vms-tree { position: fixed; left: 0; top: 0; height: 100vh; z-index: 1045; transform: translateX(-105%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  body.tree-open .vms-tree { transform: none; } body.tree-open #treeScrim { display: block; }
  .top-nav { margin-left: .5rem; } .top-nav span { display: none; }
}

/* ==== dashboard ==== */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
@media (max-width: 1199.98px) { .dash-grid { grid-template-columns: 1fr; } }
.map-card { padding: 0; overflow: hidden; position: relative; }
#map { height: calc(100vh - var(--topbar-h) - 210px); min-height: 440px; width: 100%; background: color-mix(in srgb, var(--vms-surface) 80%, #000); }
.map-tools { position: absolute; top: .75rem; left: .75rem; display: flex; gap: .4rem; z-index: 2; }
.map-tool { border: 1px solid var(--vms-border); background: color-mix(in srgb, var(--vms-surface) 92%, transparent); color: var(--vms-text); border-radius: 10px;
  padding: .35rem .7rem; font-size: .82rem; font-weight: 500; backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.map-tool:hover, .map-tool.active { border-color: var(--acc); }
/* Traffic and Cluster are ON/OFF SWITCHES you can read at a glance (the owner, 2026-10-24): a track that fills and a knob that moves. */
.map-switch { display: inline-flex; align-items: center; gap: .45rem; }
.map-switch .track { width: 30px; height: 16px; border-radius: 999px; background: color-mix(in srgb, var(--vms-text) 25%, transparent); position: relative; transition: background .15s; flex: none; }
.map-switch .knob { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: left .15s; }
.map-switch.on { border-color: var(--acc); }
.map-switch.on .track { background: var(--acc); }
.map-switch.on .knob { left: 16px; }
/* Map | Satellite | Terrain (maps.js viewControl): joined map-tool buttons; inside a map they keep clear of its edge. */
.map-views { display: inline-flex; }
.map-views .map-tool { border-radius: 0; margin-left: -1px; }
.map-views .map-tool:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.map-views .map-tool:last-child { border-radius: 0 10px 10px 0; }
.map-views .map-tool.active { position: relative; z-index: 1; color: var(--acc); font-weight: 600; }
.map-views.in-map { margin: 10px; }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--vms-muted); padding: 2rem; }
.side-stack { display: flex; flex-direction: column; gap: 1rem; }
.veh-card { padding: 1.1rem; }
.veh-card .veh-title { font-size: 1.15rem; font-weight: 750; margin: 0; }
.veh-card .veh-sub { font-size: .8rem; color: var(--vms-muted); }
.veh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .9rem; }
.veh-stat { padding: .6rem .7rem; border-radius: 11px; background: color-mix(in srgb, var(--vms-text) 5%, transparent); }
.veh-stat span { display: block; font-size: .7rem; color: var(--vms-muted); text-transform: uppercase; letter-spacing: .06em; }
.veh-stat b { display: block; font-size: .98rem; margin-top: .1rem; font-variant-numeric: tabular-nums; }
.st-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px;
  background: color-mix(in srgb, var(--vms-text) 7%, transparent); }
.hint-card { padding: 1.4rem; text-align: center; color: var(--vms-muted); }
.hint-card i { font-size: 2rem; color: var(--acc); display: block; margin-bottom: .4rem; }

/* ==== settings ==== */
.profile-card { display: flex; align-items: center; gap: 1.1rem; padding: 1.25rem 1.4rem; position: relative; overflow: hidden;
  background: linear-gradient(110deg, color-mix(in srgb, var(--acc) 22%, var(--vms-surface)) 0%, color-mix(in srgb, var(--vms-surface) 92%, transparent) 60%), url("/brand/photos/home-dark.jpg") right 40% / 45% auto no-repeat; }
[data-bs-theme="light"] .profile-card { background: linear-gradient(110deg, color-mix(in srgb, var(--acc) 14%, #fff) 0%, rgba(255, 255, 255, .92) 60%), url("/brand/photos/home-light.jpg") right 40% / 45% auto no-repeat; }
.avatar.xl { width: 68px; height: 68px; flex-basis: 68px; font-size: 1.5rem; box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 25%, transparent), 0 0 30px var(--vms-glow); }
.profile-name { font-size: 1.3rem; font-weight: 750; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.settings-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 991.98px) { .settings-grid { grid-template-columns: 1fr; } }
.set-card { padding: 1.2rem 1.3rem; }
.set-head { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: 1rem; }
.set-head h2 { font-size: 1.02rem; font-weight: 700; margin: .15rem 0 .1rem; }
.set-head p { font-size: .84rem; color: var(--vms-muted); margin: 0; }
.set-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; color: var(--acc);
  background: color-mix(in srgb, var(--acc) 15%, transparent); }
.theme-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.theme-tile { display: flex; flex-direction: column; gap: .5rem; padding: .55rem; border-radius: 12px; border: 1px solid var(--vms-border); cursor: pointer; font-size: .85rem; text-align: center; }
.theme-tile input { display: none; }
.theme-tile:has(input:checked) { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 0 18px var(--vms-glow); }
.tt-prev { display: grid; grid-template-columns: 1fr 2fr; grid-template-rows: 10px 1fr; gap: 4px; height: 64px; padding: 6px; border-radius: 8px; }
.tt-prev i { border-radius: 3px; } .tt-prev i:first-child { grid-column: 1 / -1; }
.tt-prev.light { background: #eef2f8; } .tt-prev.light i { background: #d3dcea; } .tt-prev.light i:last-child { background: #fff; }
.tt-prev.dark { background: #070d1a; } .tt-prev.dark i { background: #1f3150; } .tt-prev.dark i:last-child { background: #0f1a2e; }
.tt-prev.auto { background: linear-gradient(135deg, #eef2f8 50%, #070d1a 50%); } .tt-prev.auto i { background: color-mix(in srgb, #8a94a6 55%, transparent); }
.product-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.product-tile { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--vms-border);
  background: none; color: var(--vms-muted); font-size: .8rem; }
.product-tile .tile-logo { height: 26px; width: auto; }
.product-tile.active { border-color: var(--acc); color: var(--vms-text); box-shadow: 0 0 0 1px var(--acc), 0 0 18px var(--vms-glow); }
.pref-foot { display: flex; align-items: center; gap: 1rem; margin-top: 1.1rem; flex-wrap: wrap; }
.pref-sample { flex: 1; font-size: .85rem; padding: .55rem .8rem; border-radius: 10px; background: color-mix(in srgb, var(--vms-text) 5%, transparent); }
.sec-row { display: flex; align-items: center; gap: .85rem; padding: .75rem 0; border-top: 1px solid var(--vms-border); }
.sec-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--vms-text) 6%, transparent); }
.sec-setup { padding: .5rem 0 .9rem; }
.product-switch { padding: .3rem .75rem; }

/* ==== dashboard v2 ==== */
#map { height: clamp(380px, 52vh, 620px); min-height: 0; }
.min-w-0 { min-width: 0; }
.map-vehicle { position: absolute; top: .75rem; right: .75rem; width: min(360px, calc(100% - 1.5rem)); z-index: 2; }
.map-vehicle:empty { display: none; }
.map-vehicle .veh-card { backdrop-filter: blur(12px); background: color-mix(in srgb, var(--vms-surface) 88%, transparent); box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }
.veh-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.chart-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 991.98px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-card { padding: 1rem 1.1rem .5rem; }
.chart-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .25rem; }
.chart-head h3 { font-size: .98rem; font-weight: 700; margin: 0; } .chart-head p { font-size: .78rem; color: var(--vms-muted); margin: 0; }
.chart-body { min-height: 300px; }
.chart-empty { height: 300px; display: flex; flex-direction: column; gap: .5rem; align-items: center; justify-content: center; color: var(--vms-muted); font-size: .9rem; }
.chart-empty i { font-size: 1.8rem; color: var(--acc); }
#range .btn.active { background: var(--acc); border-color: var(--acc); color: #fff; }

/* ==== video tiles (live and playback) ==== */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.toolbar .vsep { width: 1px; height: 26px; background: var(--vms-border); margin: 0 .25rem; }
.vwall { --cols: 2; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: .6rem; }
.vwall[data-cols="5"], .vwall[data-cols="6"] { gap: .45rem; }
/* The Columns buttons choose 1-6; a narrower screen gives way: at most 3 under 1200px, 1 on a phone. */
@media (max-width: 1199.98px) { .vwall[data-cols="4"], .vwall[data-cols="5"], .vwall[data-cols="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .vwall { grid-template-columns: 1fr; } }

/* The Columns buttons (video galleries, live, playback): a little picture of n columns beside the number. */
.ev-colbtn { display: inline-flex; align-items: center; }
.ev-colbtn.active { background: var(--vms-surface-2); color: var(--vms-text); border-color: var(--vms-cyan); }
.ev-colico { display: inline-flex; gap: 2px; height: 12px; }
.ev-colico i { width: 4px; height: 100%; border-radius: 1.5px; background: currentColor; opacity: .75; }
.vtile { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--vms-border); }
.vtile video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.vtile-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .5rem; padding: .35rem .55rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; font-size: .8rem; opacity: .95; }
.vtile-name { font-weight: 600; } .vtile-note { flex: 1; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vtile-note.err { color: #ff9a9d; }
.vtile-btn { border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 30px; height: 28px; border-radius: 7px; display: grid; place-items: center; }
.vtile-btn:hover { background: rgba(255, 255, 255, .26); }
/* A quality switch's new picture, under way behind the old one until it plays (VideoWall.setQuality). */
.vtile video.vtile-next { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
/* Live: HD | SD on every tile (the owner, 2026-10-24). */
.vtile-q { display: inline-flex; border: 1px solid rgba(255, 255, 255, .4); border-radius: 7px; overflow: hidden; flex: none; }
.vtile-q button { border: 0; background: transparent; color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .03em; padding: .2rem .45rem; cursor: pointer; }
.vtile-q button + button { border-left: 1px solid rgba(255, 255, 255, .3); }
.vtile-q button:hover { background: rgba(255, 255, 255, .18); }
.vtile-q button.on { background: var(--acc, #2f7cf6); }
.vtile-wait { position: absolute; inset: 0; display: flex; flex-direction: column; gap: .5rem; align-items: center; justify-content: center; color: #cbd6ea; font-size: .85rem; text-align: center; padding: 1rem; }
.vtile-wait i { font-size: 1.8rem; opacity: .7; }
.vtile.live .vtile-wait { display: none; }
.vtile .mt-watermark { position: absolute; top: .5rem; right: .6rem; height: 26px; opacity: .55; pointer-events: none; }
.pick-hint { padding: 3rem 1.5rem; text-align: center; color: var(--vms-muted); }
.pick-hint i { font-size: 2.4rem; color: var(--acc); display: block; margin-bottom: .6rem; }
.veh-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.veh-head h1 { margin: 0; }

/* ==== playback ==== */
.pb-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1199.98px) { .pb-grid { grid-template-columns: 1fr; } }
.cal { padding: 1rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .dow { font-size: .7rem; color: var(--vms-muted); padding: .2rem 0; }
.cal-day { border: 0; background: none; color: var(--vms-muted); border-radius: 9px; padding: .42rem 0; font-size: .85rem; }
.cal-day.has { color: var(--vms-text); background: rgba(31, 185, 120, .16); font-weight: 600; }
.cal-day.has:hover { background: rgba(31, 185, 120, .3); }
.cal-day.sel { background: var(--acc) !important; color: #fff; }
.cal-day.today { box-shadow: inset 0 0 0 1px var(--vms-border); }
.timeline { position: relative; height: 54px; border-radius: 10px; background: color-mix(in srgb, var(--vms-text) 6%, transparent); cursor: pointer; margin: .4rem 0 .2rem; overflow: hidden; }
.timeline .seg { position: absolute; top: 10px; bottom: 18px; background: linear-gradient(180deg, #2fd08f, #1fb978); border-radius: 3px; }
.timeline .pick { position: absolute; top: 4px; bottom: 14px; border-radius: 4px; background: color-mix(in srgb, var(--acc) 35%, transparent); border: 2px solid var(--acc); }
.timeline .hours { position: absolute; left: 0; right: 0; bottom: 0; height: 16px; display: flex; justify-content: space-between; padding: 0 4px; font-size: .62rem; color: var(--vms-muted); }
.pb-form { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; }

/* ==== videos ==== */
.vid-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 1rem; align-items: start; }
@media (max-width: 1199.98px) { .vid-layout { grid-template-columns: 1fr; } }
.vid-list { max-height: calc(100vh - var(--topbar-h) - 220px); overflow-y: auto; padding: .35rem; }
.vid-item { display: flex; gap: .7rem; width: 100%; text-align: left; border: 1px solid transparent; background: none; color: var(--vms-text); padding: .5rem; border-radius: 11px; }
.vid-item:hover { background: color-mix(in srgb, var(--acc) 8%, transparent); }
.vid-item.active { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); }
.vid-thumb { width: 108px; flex: 0 0 108px; aspect-ratio: 16 / 9; border-radius: 8px; background: #000 center / cover no-repeat; display: grid; place-items: center; color: #9fb0cc; }
.vid-meta { min-width: 0; flex: 1; } .vid-meta b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid-meta small { display: block; font-size: .74rem; color: var(--vms-muted); }
.vid-state { font-size: .72rem; font-weight: 600; } .vid-state.wait { color: #e6a019; } .vid-state.bad { color: #e5484d; }
.vid-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.vid-players video { width: 100%; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; }
.vid-players .vp { position: relative; } .vid-players .vp span { position: absolute; top: .4rem; left: .5rem; font-size: .75rem; color: #fff; text-shadow: 0 1px 3px #000; }

/* ==== tracking ==== */
.trk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
@media (max-width: 1199.98px) { .trk-grid { grid-template-columns: 1fr; } }
#trackMap { height: clamp(380px, 56vh, 640px); }
.trk-play { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-top: 1px solid var(--vms-border); }
.trk-play input[type=range] { flex: 1; }
.trk-stops { max-height: 340px; overflow-y: auto; }
.trk-kpis { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.trk-kpis .kpi-value { font-size: 1.2rem; white-space: nowrap; }
.trk-stop { display: flex; gap: .6rem; padding: .5rem .2rem; border-bottom: 1px solid var(--vms-border); font-size: .84rem; cursor: pointer; }
.trk-stop:hover { background: color-mix(in srgb, var(--acc) 8%, transparent); }
.trk-stop i { color: #e6a019; }

/* ==== live and playback: the vehicle card, tiles per page with a pager, a map beside the video ==== */
.media-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem 1rem; }
.media-head .grow { flex: 1 1 auto; min-width: 0; }
.media-pager { display: flex; align-items: center; gap: .4rem; }
.vms-icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; font-size: .9rem; display: inline-grid; place-items: center; }
.vms-icon-btn.active { color: var(--vms-cyan); border-color: color-mix(in srgb, var(--vms-cyan) 55%, var(--vms-border)); }
.live-body { display: flex; gap: 1rem; align-items: flex-start; }
.live-video { flex: 1 1 auto; min-width: 0; }
.live-map { flex: 0 0 340px; width: 340px; position: sticky; top: calc(var(--topbar-h) + 1rem); }
@media (min-width: 1600px) { .live-map { flex-basis: 400px; width: 400px; } }
.live-map-wrap { position: relative; }
.live-map-canvas { height: 420px; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--vms-surface) 80%, #000); }
.live-map .map-empty { border-radius: 12px; z-index: 1; }
.live-body.map-collapsed .live-map { flex-basis: 52px; width: 52px; }
.live-body.map-collapsed .live-map .map-inner { display: none !important; }
.live-body.map-wide .live-map { flex-basis: 46%; width: 46%; }
.live-body.map-wide .live-map-canvas { height: 560px; }
.map-wide-btn { display: none !important; }
@media (min-width: 1400px) { .map-wide-btn { display: inline-grid !important; } }
@media (max-width: 1199.98px) {
  .live-body { flex-direction: column; }
  .live-map, .live-body.map-wide .live-map { position: static; width: 100%; flex-basis: auto; }
  .live-body.map-collapsed .live-map { width: 100%; }
  .live-map-canvas, .live-body.map-wide .live-map-canvas { height: 320px; }
}
.map-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem .75rem; font-size: .8rem; }
.map-strip .lbl { color: var(--vms-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.map-strip .val { font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-word; display: flex; align-items: center; }
.live-video .toolbar { margin-bottom: .6rem; }

/* ==== playback: the evidence card's channels, and where it was / how fast under the video ==== */
.ev-chans { display: flex; flex-wrap: wrap; gap: .3rem; }
.ev-chans .fleet-chip { margin: 0; }
.pb-map-canvas { height: 330px; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--vms-surface) 80%, #000); }
.pb-where .map-empty { border-radius: 12px; z-index: 1; }
.pb-speed { min-height: 250px; }
@media (max-width: 575.98px) { .pb-map-canvas { height: 260px; } }

/* ==== playback: the map and speed graph sit in the LEFT column, under the evidence card (the owner, 2026-10-22) ==== */
.pb-where { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; }
/* A drawn chart keeps its pixel width; without these it props the card wider than the column. */
.pb-where > * { min-width: 0; } .pb-where .chart-card { overflow: hidden; }
.pb-side .pb-map-canvas { height: 300px; }
.pb-side .pb-speed { min-height: 300px; }
.vms-icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; font-size: .85rem; }
@media (min-width: 1200px) {
  .pb-grid.side-wide { grid-template-columns: minmax(0, 46%) minmax(0, 1fr); }
  .pb-grid.side-wide .pb-map-canvas { height: 460px; }
}
/* One column (under 1200px): the cards in the order they are used - the day, the time, the video, then where and how fast. */
@media (max-width: 1199.98px) {
  .pb-grid { display: flex; flex-direction: column; }
  .pb-side, .pb-main { display: contents !important; }
  .pb-grid > * , .pb-main > .mb-3 { margin-bottom: 0 !important; }
  #cal { order: 1; } .pb-tl { order: 2; } #videoCard { order: 3; } #where { order: 4; } #evCard { order: 5; }
}

/* ==== playback: HD / SD on the calendar, the channels to play under the times (the owner, 2026-10-22) ==== */
.cal-quality { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .6rem; }
.pb-chans { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }

/* ==== Manage pages: users, drivers, reason codes, alert scheduler, driver corrections, audit report ==== */
.table-vms { --bs-table-bg: transparent; --bs-table-color: var(--vms-text); --bs-table-border-color: var(--vms-border); margin: 0; }
.table-vms th { color: var(--vms-muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table-vms td { font-size: .88rem; }
.table-vms tr.inactive td { opacity: .55; }
.mg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--vms-border); }
.mg-tools .input-icon { flex: 1 1 14rem; max-width: 24rem; }
.mg-tools .form-select, .mg-tools .form-control { width: auto; }
@media (max-width: 575.98px) { .mg-tools .input-icon, .mg-tools .form-select, .mg-tools .form-control { flex: 1 1 100%; max-width: none; width: 100%; } }
.role-pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--vms-text) 8%, transparent); }
.role-pill.Admin { background: color-mix(in srgb, var(--acc) 18%, transparent); color: var(--acc); }
.role-pill.Manager { background: rgba(245, 179, 1, .16); color: #c98f00; }
[data-bs-theme="dark"] .role-pill.Manager { color: #f5b301; }
.st-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.st-badge.ok { background: rgba(34, 197, 94, .14); color: #16a34a; } [data-bs-theme="dark"] .st-badge.ok { color: #22c55e; }
.st-badge.warn { background: rgba(245, 179, 1, .16); color: #b98300; } [data-bs-theme="dark"] .st-badge.warn { color: #f5b301; }
.st-badge.bad { background: rgba(239, 68, 68, .15); color: #dc2626; } [data-bs-theme="dark"] .st-badge.bad { color: #f87171; }
.st-badge.off { background: color-mix(in srgb, var(--vms-muted) 18%, transparent); color: var(--vms-muted); }
.who { display: flex; align-items: center; gap: .6rem; min-width: 0; } .who b { display: block; } .who small { color: var(--vms-muted); }
.chip-input { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .35rem .5rem; border: 1px solid var(--vms-border); border-radius: .5rem;
  background: var(--bs-body-bg); min-height: 2.5rem; }
.chip-input .chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; padding: .15rem .3rem .15rem .6rem; border-radius: 999px;
  background: color-mix(in srgb, var(--acc) 16%, transparent); }
.chip-input .chip button { border: 0; background: none; color: inherit; line-height: 1; font-size: 1rem; padding: 0 .2rem; opacity: .7; }
.chip-input .chip-entry { flex: 1 1 12rem; border: 0; outline: 0; background: none; color: inherit; min-width: 8rem; font-size: .9rem; }
.chip-input .chip-entry.is-invalid { color: #ef4444; }
.type-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.type-box { max-height: 18rem; overflow: auto; border: 1px solid var(--vms-border); border-radius: 10px; padding: .5rem; }
.type-box .cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--vms-muted); margin: .4rem .2rem .2rem; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 1rem; }
.rule-card { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; }
.rule-card.off { opacity: .6; }
.rule-card h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.rule-card .rule-foot { display: flex; align-items: center; gap: .5rem; border-top: 1px solid var(--vms-border); padding-top: .6rem; margin-top: auto; }
.intro-card { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 1.1rem; margin-bottom: 1rem; }
.intro-card .set-icon { flex: 0 0 auto; }
.intro-card p { margin: 0; font-size: .88rem; color: var(--vms-muted); }
.fleet-group-head { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; font-weight: 700; border-bottom: 1px solid var(--vms-border);
  background: color-mix(in srgb, var(--vms-text) 3%, transparent); }
/* A narrow phone with the product switcher: the bar's own gaps are what tipped it 4px past the screen. */
@media (max-width: 399.98px) { .vms-topbar { gap: .45rem; padding-inline: .6rem; } .vms-topbar .ms-auto { gap: .35rem !important; } .vms-topbar .brand-logo { height: 24px; } }
/* Number tiles two to a row on a phone, not one tall stack. */
@media (max-width: 575.98px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; } .kpi { padding: .65rem .75rem; gap: .55rem; }
  .kpi .kpi-icon { width: 34px; height: 34px; flex-basis: 34px; font-size: 1rem; } .kpi-value { font-size: 1.2rem; } }

/* The replay bar: a thick track filled up to the ball, a ball big enough to grab; dragging it or clicking the track moves the map. */
.trk-scrub { flex: 1; min-width: 80px; height: 22px; margin: 0; cursor: pointer; appearance: none; -webkit-appearance: none; background: transparent; }
.trk-scrub::-webkit-slider-runnable-track { height: 8px; border-radius: 4px;
  background: linear-gradient(to right, var(--vms-cyan) var(--pct, 0%), color-mix(in srgb, var(--vms-muted) 35%, transparent) var(--pct, 0%)); }
.trk-scrub::-moz-range-track { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--vms-muted) 35%, transparent); }
.trk-scrub::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--vms-cyan); }
.trk-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -6px; border-radius: 50%; background: #fff;
  border: 3px solid var(--vms-blue); box-shadow: 0 0 0 4px var(--vms-glow), 0 2px 6px rgba(0, 0, 0, .35); cursor: grab; }
.trk-scrub::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--vms-blue); box-shadow: 0 0 0 4px var(--vms-glow); cursor: grab; }
.trk-scrub:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }
.trk-scrub:focus-visible { outline: none; } .trk-scrub:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px var(--vms-glow), 0 0 0 2px var(--vms-cyan); }

/* The product switch: each product's mark in the artwork for the theme shown (app.js). */
.prod-ico { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: .5rem; vertical-align: middle; flex: none; }
.prod-ico img { width: 24px; height: 24px; object-fit: contain; }
/* The highlighted (blue) row takes the white artwork in the light theme too, or the dark mark disappears into it. */
[data-bs-theme="light"] .dropdown-item.active .prod-ico .theme-light-only { display: none !important; }
[data-bs-theme="light"] .dropdown-item.active .prod-ico .theme-dark-only { display: inline-block !important; }
.product-switch, .dropdown-item:has(> .prod-ico) { display: inline-flex; align-items: center; }
.dropdown-item:has(> .prod-ico) { display: flex; padding-top: .4rem; padding-bottom: .4rem; }
/* The studios' own logos (the owner's artwork, 2026-10-25), in the top bar and in the account menu. */
.studio-btn { place-items: center; }
.studio-btn .studio-ico { width: 24px; height: 24px; object-fit: contain; }
.menu-ico { width: 18px; height: 18px; object-fit: contain; margin-right: .5rem; vertical-align: -4px; }

/* Vehicles page: one table per fleet, all with the SAME fixed columns, so they line up down the page as one list (the owner,
   2026-10-26 - sized to their own contents, every fleet put its columns somewhere else). */
.vehicles-table { table-layout: fixed; width: 100%; }
.vehicles-table th:nth-child(1) { width: 26%; } .vehicles-table th:nth-child(2) { width: 22%; } .vehicles-table th:nth-child(3) { width: 20%; }
.vehicles-table th:nth-child(5) { width: 64px; }
.vehicles-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pause / play on every tile and playback's 30-second jumps (the arrow with its 30 beneath). */
.vtile-btn[hidden] { display: none; }
.vtile-btn.jmp { grid-auto-flow: row; line-height: 1; font-size: .8rem; }
.vtile-btn.jmp small { font-size: .55rem; font-weight: 700; }

/* Tracking history while a new time loads: the map dimmed under the loading panel (the previous route is already gone). */
.map-empty.loading { background: color-mix(in srgb, var(--vms-surface, #0b1220) 60%, transparent); color: var(--vms-text); z-index: 2; }
/* A day that only POSSIBLY holds footage, while it is being checked (playback.js confirmMaybe): faint, dashed, breathing. */
.cal-day.maybe { color: var(--vms-text); background: transparent; border: 1px dashed rgba(31, 185, 120, .55); animation: calMaybe 1.4s ease-in-out infinite; }
@keyframes calMaybe { 50% { opacity: .45; } }

/* Tracking history: the place search over the map (tracking.js PLACE SEARCH), and Google's suggestion list in both themes. */
.trk-search { position: absolute; top: 10px; left: 10px; z-index: 3; width: min(360px, calc(100% - 20px)); }
/* As a control of the map (beside Map | Satellite | Terrain, full screen with the map): Google places it, we give it its size. */
.trk-search.in-map { position: static; margin: 10px 10px 0 0; width: min(340px, calc(100vw - 220px)); min-width: 200px; }
.trk-search-box { display: flex; align-items: center; gap: .45rem; padding: .3rem .55rem; border-radius: 10px; background: var(--vms-surface, var(--bs-body-bg));
  border: 1px solid var(--vms-border); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.trk-search-box i { opacity: .6; }
.trk-search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--vms-text); font-size: .9rem; }
.trk-search-box button { border: 0; background: transparent; color: inherit; opacity: .6; padding: 0 .15rem; }
.trk-place-note { margin-top: .4rem; padding: .45rem .65rem; border-radius: 10px; font-size: .82rem; line-height: 1.4; color: var(--vms-text);
  background: var(--vms-surface, var(--bs-body-bg)); border: 1px solid var(--vms-border); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.pac-container { z-index: 2000; border-radius: 10px; margin-top: 4px; font-family: inherit; }
[data-bs-theme="dark"] .pac-container { background: #101a2c; border: 1px solid #22314f; box-shadow: 0 8px 22px rgba(0, 0, 0, .5); }
[data-bs-theme="dark"] .pac-item { color: #8ea3c2; border-top-color: #1b2840; }
[data-bs-theme="dark"] .pac-item:hover, [data-bs-theme="dark"] .pac-item-selected { background: #17243d; }
[data-bs-theme="dark"] .pac-item-query { color: #e6edf7; }

/* Over the whole page while the loader shows - nothing underneath can be clicked (app.js setBusy). Above dialogs, below the loader bar. */
.vms-busy-shield { position: fixed; inset: 0; z-index: 1990; background: transparent; cursor: progress; }
.vms-busy-shield[hidden] { display: none; }

/* The privacy policy and terms of use (privacy.html, terms.html): open pages, a reading column under the two logos. */
.legal-links { display: flex; justify-content: center; gap: .6rem; margin-top: 1.25rem; font-size: .8rem; color: #a8b8d4; }
.legal-links a { color: #a8b8d4; text-decoration: none; } .legal-links a:hover { color: #fff; text-decoration: underline; }
.legal-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem;
  max-width: 860px; margin: 0 auto; padding: 1.5rem 16px .5rem; }
.legal-top .brand-pair { margin: 0; text-decoration: none; }
.legal-top nav { display: flex; gap: 1.25rem; font-size: .9rem; }
.legal-top nav a { color: var(--vms-muted); text-decoration: none; } .legal-top nav a:hover, .legal-top nav a[aria-current] { color: var(--vms-cyan); }
.legal { max-width: 860px; margin: 0 auto; padding: .5rem 16px 4rem; }
.legal article { background: color-mix(in srgb, var(--vms-surface) 88%, transparent); border: 1px solid var(--vms-border); border-radius: 16px;
  padding: clamp(1.25rem, 4vw, 2.5rem); line-height: 1.65; }
.legal h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: .25rem; }
.legal h2 { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 .5rem; color: var(--vms-cyan); }
.legal .legal-date { color: var(--vms-muted); margin-bottom: 1.5rem; }
.legal ul { padding-left: 1.2rem; } .legal li { margin-bottom: .5rem; }

/* The app-store badges (login card, top bar's phone menu): Apple's and Google's artwork as supplied, the same VISIBLE height.
   Google's PNG is 646x250 with the badge at 41..209 (168 px tall), so it is drawn 250/168 taller with its padding cut by margins. */
.store-badges { --badge-h: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; margin-top: 1.25rem; }
.store-cap { flex-basis: 100%; text-align: center; font-size: .8rem; color: #a8b8d4; }
.store-badge { display: block; height: var(--badge-h); overflow: hidden; border-radius: 7px; }
.store-badge img { display: block; height: 100%; width: auto; }
.store-badge.gp img { height: calc(var(--badge-h) * 250 / 168); margin: calc(var(--badge-h) * -41 / 168); }
.store-badge:focus-visible { outline: 2px solid var(--vms-cyan); outline-offset: 2px; }
.store-menu { padding: .25rem 1rem 1rem; min-width: 310px; }
.store-menu .store-badges { margin-top: .5rem; }
.store-menu .store-cap { color: var(--vms-muted); }
.store-menu-item .store-badges { margin: .5rem 1rem .75rem; }
.store-menu-item .store-cap { color: var(--vms-muted); }
