/* The Coride web app, click-through prototype. Shared by web.html (the full app) and thumb.html (the compact one). */
@font-face { font-family: 'Inter'; src: url('inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
/* Layout: the real clickahoyweb shell - 280px sidebar + 48px header on the backdrop, one tinted content card. Tokens mirror ThemeProvider/AuraTheme (Coride light/dark). */
:root {
  --primary: #004BFF;
  --secondary: #1732BA;
  --sky: #5BC2FB;
  --on-primary: #F2F5F9;
  --link: var(--primary);
  --backdrop: #ffffff;
  --backdrop-fg: #01092B;
  --surface: #f7f9fc;
  --raised: #ffffff;
  --border: #e4e8ef;
  --content-border: #d0d3d6;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
  --popover-shadow: 0 1px 10px 0 rgba(0,0,0,.2);
  --chrome-hover: rgba(0,0,0,.08);
  --chrome-active: rgba(0,0,0,.14);
  --text: #444546;
  --heading: #2c2c2d;
  --muted: #797b7d;
  --th-bg: #f7f9fc;
  --th-border: #e7ebf2;
  --divider: #ecf0f5;
  --row-attn: #fef6f6;
  --ok: #15803d; --ok-bg: #dcfce7;
  --warn: #c2410c; --warn-bg: #ffedd5;
  --bad: #b91c1c; --bad-bg: #fee2e2;
  --info: #0369a1; --info-bg: #e0f2fe;
  --neutral: #475569; --neutral-bg: #f1f5f9;
  --dot-ok: #22c55e; --dot-warn: #f59e0b; --dot-bad: #ef4444; --dot-idle: #94a3b8;
  --geofence: #7c3aed;
  --map-land: #f3f4f1;
  --map-park: #e1ebd8;
  --map-water: #bfdbf3;
  --map-water-edge: #a6cbec;
  --map-road: #ffffff;
  --map-casing: #d8dce2;
  --map-label: #5c5d5f;
  --scrim: rgba(0,0,0,.45);
  --font: 'Inter', 'Heebo', Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --link: color-mix(in srgb, var(--primary) 65%, white);
    --backdrop: #01092b; --backdrop-fg: #F2F5F9; --surface: #101838; --raised: #1f2744;
    --border: #343a55; --content-border: #343a55; --shadow: 0 2px 10px rgba(0,0,0,.4);
    --popover-shadow: 0 4px 18px rgba(0,0,0,.5);
    --chrome-hover: rgba(255,255,255,.1); --chrome-active: rgba(255,255,255,.18);
    --text: #e6e6ea; --heading: #ffffff; --muted: #8d90a0;
    --th-bg: #1a2243; --th-border: #343a55; --divider: #2a3150; --row-attn: rgba(239,68,68,.08);
    --ok: #4ade80; --ok-bg: rgba(34,197,94,.16); --warn: #fb923c; --warn-bg: rgba(249,115,22,.16);
    --bad: #f87171; --bad-bg: rgba(239,68,68,.16); --info: #38bdf8; --info-bg: rgba(14,165,233,.16);
    --neutral: #cbd5e1; --neutral-bg: rgba(148,163,184,.16);
    --map-land: #141c3a; --map-park: #17283a; --map-water: #0a1430; --map-water-edge: #22305a;
    --map-road: #2a3354; --map-casing: #1d2546; --map-label: #8d90a0; --scrim: rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --link: color-mix(in srgb, var(--primary) 65%, white);
  --backdrop: #01092b; --backdrop-fg: #F2F5F9; --surface: #101838; --raised: #1f2744;
  --border: #343a55; --content-border: #343a55; --shadow: 0 2px 10px rgba(0,0,0,.4);
  --popover-shadow: 0 4px 18px rgba(0,0,0,.5);
  --chrome-hover: rgba(255,255,255,.1); --chrome-active: rgba(255,255,255,.18);
  --text: #e6e6ea; --heading: #ffffff; --muted: #8d90a0;
  --th-bg: #1a2243; --th-border: #343a55; --divider: #2a3150; --row-attn: rgba(239,68,68,.08);
  --ok: #4ade80; --ok-bg: rgba(34,197,94,.16); --warn: #fb923c; --warn-bg: rgba(249,115,22,.16);
  --bad: #f87171; --bad-bg: rgba(239,68,68,.16); --info: #38bdf8; --info-bg: rgba(14,165,233,.16);
  --neutral: #cbd5e1; --neutral-bg: rgba(148,163,184,.16);
  --map-land: #141c3a; --map-park: #17283a; --map-water: #0a1430; --map-water-edge: #22305a;
  --map-road: #2a3354; --map-casing: #1d2546; --map-label: #8d90a0; --scrim: rgba(0,0,0,.6);
  color-scheme: dark;
}

html { height: 100%; font-size: 14px; }
body {
  height: 100%; margin: 0; overflow: hidden; background: var(--backdrop); color: var(--text);
  font-family: var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, h5 { margin: 0; color: var(--heading); font-weight: 700; text-wrap: balance; }
h2 { font-size: 1.25rem; } h3 { font-size: 1.125rem; } h4 { font-size: 1rem; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.soft-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* ---------- shell ---------- */
.frame { display: flex; max-width: 1680px; height: 100%; margin: 0 auto; background: var(--backdrop); overflow: hidden; }
.sidebar { display: flex; flex-direction: column; width: 280px; flex-shrink: 0; margin-right: 6px; color: var(--backdrop-fg); background: var(--backdrop); overflow-y: auto; scrollbar-width: thin; }
.sidebar.collapsed { display: none; }
.sb-top { display: flex; align-items: center; justify-content: space-between; height: 48px; padding-left: 8px; flex-shrink: 0; }
.sb-top img, .sb-top .wordmark { height: 32px; max-width: 180px; object-fit: contain; padding-left: 12px; }
.round-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; }
.round-btn:hover { background: var(--chrome-hover); }
.sb-body { padding: 0 8px 16px 8px; display: flex; flex-direction: column; }
.searchbox { display: flex; align-items: center; gap: 6px; height: 32px; margin: 4px 0 16px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--raised); width: 100%; text-align: left; transition: border-color .15s; }
.searchbox:hover { border-color: var(--primary); }
.searchbox .ph { flex: 1; opacity: .5; }
.kbd { border: 1px solid var(--border); border-radius: 4px; padding: 1px 4px; font-size: .875rem; opacity: .6; }
.nav { list-style: none; margin: 0; padding: 0; }
.nav-item { display: flex; align-items: center; justify-content: space-between; margin: 1px 0; padding: 7px 8px 7px 0; border-radius: 6px; white-space: nowrap; cursor: pointer; width: 100%; text-align: left; }
.nav-item:hover { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.nav-item.active { background: color-mix(in srgb, var(--primary) 15%, transparent); font-weight: 600; }
.nav-item .ic { width: 2.5rem; display: flex; justify-content: center; opacity: .75; }
.nav-item:hover .ic, .nav-item.active .ic { opacity: 1; }
.nav-item .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-item.child { padding-left: 40px; }
.nav-item .chev { margin-right: 8px; font-size: .75rem; opacity: .7; transition: transform .2s; }
.nav-item .chev.closed { transform: rotate(180deg); }
.pill-count { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 20px; padding: 0 4px; border-radius: 999px; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 600; }
.sb-hr { height: 1px; border: 0; margin: 8px 0; background: var(--backdrop-fg); opacity: .2; }
.sb-label { padding: 6px 10px; font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; opacity: .6; }
.sb-veh { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; cursor: pointer; width: 100%; text-align: left; }
.sb-veh:hover { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.sb-veh .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }

.col { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.header { position: relative; z-index: 50; display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 8px; color: var(--backdrop-fg); background: var(--backdrop); flex-shrink: 0; }
.header .sq-logo { height: 28px; max-width: 120px; margin: 0 6px; }
.tabbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; height: 36px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 10px; border-radius: 6px; white-space: nowrap; }
.tab:hover { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.tab.active { background: color-mix(in srgb, var(--primary) 15%, transparent); font-weight: 600; }
.tab.locked { opacity: .5; }
.tab-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; flex-shrink: 0; }
.org-switch { display: flex; flex-direction: column; align-items: flex-end; margin: 0 4px; padding: 2px 10px; border-radius: 4px; line-height: 1.25; }
.org-switch:hover { background: var(--chrome-hover); }
.org-switch .k { font-size: .65rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; opacity: .7; }
.org-switch .v { max-width: 200px; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 999px; }
.hdr-btn:hover { background: var(--chrome-hover); }
.badge-dot { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #d91e18; color: #fff; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.avatar { position: relative; width: 28px; height: 28px; border-radius: 999px; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.avatar::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 99px; background: var(--dot-ok); border: 2px solid var(--backdrop); }
.only-narrow { display: none; }

.main { display: flex; flex: 1; min-height: 0; padding: 0 12px 12px 6px; }
.sidebar.collapsed + .col .main { padding-left: 12px; }
.card { position: relative; flex: 1; min-width: 0; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); scrollbar-width: thin; }
.screen { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.screen.flush { position: absolute; inset: 0; padding: 0; }
.scrim { position: fixed; inset: 0; z-index: 90; background: var(--scrim); }

@media (max-width: 1023px) {
  .sidebar { position: fixed; z-index: 100; top: 0; bottom: 0; left: 0; margin: 0; padding-left: env(safe-area-inset-left, 0px); box-shadow: 4px 0 24px rgba(0,0,0,.25); transform: translateX(-105%); transition: transform .2s; }
  .sidebar.collapsed { display: flex; }
  .sidebar.open { transform: none; }
  .only-narrow { display: inline-flex; }
  .main, .sidebar.collapsed + .col .main { padding: 0 max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
  .org-switch .k { display: none; }
  .org-switch .v { max-width: 110px; }
}

/* ---------- popovers / modals ---------- */
.pop { position: absolute; top: 44px; right: 8px; z-index: 200; width: 380px; max-width: calc(100vw - 32px); padding: 20px; border: 1px solid var(--border); border-radius: 6px; background: var(--raised); box-shadow: var(--popover-shadow); }
.pop h5 { font-size: 1rem; }
.pop-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.pop-row:first-of-type { border-top: 0; }
.pop-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 6px; text-align: left; }
.pop-link:hover { background: var(--chrome-hover); }
.modal-wrap { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: var(--scrim); }
.modal { width: 560px; max-width: 100%; max-height: 76vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--raised); box-shadow: var(--popover-shadow); animation: pop-in .16s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.cmd-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cmd-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1.07rem; }
.cmd-group { padding: 8px 10px 2px; font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.cmd-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 6px; text-align: left; }
.cmd-item .ic { width: 20px; text-align: center; opacity: .7; }
.cmd-item.sel { background: color-mix(in srgb, var(--primary) 15%, transparent); }
.acc-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 20px; text-align: left; border-top: 1px solid var(--border); }
.acc-item:hover { background: var(--chrome-hover); }
.acc-item.cur { background: color-mix(in srgb, var(--primary) 10%, transparent); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.toast { position: fixed; z-index: 400; top: 16px; right: max(16px, calc((100vw - 1680px)/2 + 28px)); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 12px 16px; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 6px; background: var(--raised); box-shadow: var(--popover-shadow); animation: pop-in .2s ease-out; }

/* ---------- design components ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-header .eyebrow { font-size: .75rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--link); }
.page-header h2 { margin: 2px 0; }
.page-header .sub { opacity: .7; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.box { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--raised); }
.box.flush { padding: 0; }
.box-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.box.flush .box-head { padding: 16px 16px 0; }
.box-head .sub { margin-top: 2px; font-size: .9rem; color: var(--muted); }
.box-foot { margin: 16px -16px -16px; padding: 12px 16px; border-top: 1px solid var(--border); }
.box.flush .box-foot { margin: 0; }
.dcard { padding: 24px; border: 1px solid var(--border); border-radius: 6px; background: var(--raised); box-shadow: 0 0 8px 0 rgba(0,0,0,.04); min-width: 0; display: flex; flex-direction: column; }
.dcard-head { display: flex; gap: 12px; margin-bottom: 16px; }
.dcard-head h2 { font-size: 1.125rem; font-weight: 600; }
.dcard-head .sub { margin-top: 4px; font-size: .875rem; opacity: .65; }
.tile { display: flex; flex-direction: column; min-height: 9rem; padding: 16px; border: 1px solid var(--content-border); border-radius: 12px; background: var(--raised); text-align: left; transition: transform .15s, box-shadow .15s; min-width: 0; }
button.tile:hover { transform: translateY(-2px); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tile .t-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tile .t-title { font-weight: 600; opacity: .7; }
.tile .t-val { margin-top: 8px; font-size: 1.5rem; font-weight: 700; color: var(--heading); }
.tile .t-val small { font-size: 1rem; font-weight: 600; opacity: .7; margin-left: 2px; }
.tile .t-sub { margin-top: auto; padding-top: 8px; opacity: .65; }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; font-weight: 600; }
.trend.up { color: var(--ok); } .trend.down { color: var(--bad); }
.progress { height: 6px; margin-top: 12px; border-radius: 99px; background: var(--content-border); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); transform-origin: left; animation: grow-x .9s cubic-bezier(.2,.7,.2,1); }
@keyframes grow-x { from { transform: scaleX(0); } }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g21 { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
.g12 { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); }
.span2 { grid-column: span 2; }
@media (max-width: 1279px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g21, .g12 { grid-template-columns: minmax(0,1fr); } .span2 { grid-column: auto; } }
@media (max-width: 680px) { .g4, .g3, .g2 { grid-template-columns: minmax(0,1fr); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--primary); border-radius: 6px; background: var(--primary); color: var(--on-primary); font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: color-mix(in srgb, var(--primary) 86%, black); }
.btn.sm { height: 30px; padding: 0 10px; font-size: .925rem; }
.btn.outlined { background: transparent; color: var(--link); }
.btn.outlined:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.btn.secondary { background: var(--neutral-bg); border-color: transparent; color: var(--text); }
.btn.secondary:hover { background: var(--chrome-hover); }
.btn.text { background: transparent; border-color: transparent; color: var(--link); }
.btn.text:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; font-size: .875rem; font-weight: 600; white-space: nowrap; line-height: 1.3; }
.tag svg { font-size: .8rem; }
.tag.success { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.danger { background: var(--bad-bg); color: var(--bad); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.secondary { background: var(--neutral-bg); color: var(--neutral); }
.tag.primary { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--link); }
.mini-pill { display: inline-block; padding: 1px 5px; border-radius: 4px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--link); vertical-align: middle; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); font-size: .925rem; white-space: nowrap; }
.chip b { font-weight: 600; color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--raised); white-space: nowrap; }
.toggle:hover { border-color: var(--primary); }
.toggle.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--link); font-weight: 600; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--raised); }
.seg button { height: 26px; padding: 0 10px; border-radius: 6px; white-space: nowrap; }
.seg button.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.input { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--content-border); border-radius: 6px; background: var(--raised); min-width: 0; }
.input:focus-within { border-color: var(--primary); }
.input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.select { height: 34px; padding: 0 30px 0 10px; border: 1px solid var(--content-border); border-radius: 6px; background: var(--raised); appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }

/* table (Table.module.css) */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { padding: .5rem 1rem; font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; line-height: 1.2; text-align: left; white-space: nowrap; background: var(--th-bg); border-top: 1px solid var(--th-border); border-bottom: 1px solid var(--th-border); color: var(--muted); }
.tbl td { padding: 1rem; white-space: nowrap; vertical-align: middle; border-bottom: 1px solid var(--divider); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--primary) 15%, transparent); }
.tbl tr.attn { background: var(--row-attn); }
.tbl td.wrap { white-space: normal; min-width: 240px; }
.tbl .r { text-align: right; }
.tbl.compact td { padding: .6rem 1rem; }
.cb { width: 16px; height: 16px; border: 1.5px solid var(--content-border); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; background: var(--raised); color: #fff; font-size: .6rem; }
.cb.on { background: var(--primary); border-color: var(--primary); }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell .soft-icon { width: 32px; height: 32px; }
.name-cell .nm { font-weight: 600; color: var(--heading); }
.batt { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.batt.low { color: var(--bad); }
.sec { display: block; font-size: .85rem; color: var(--muted); }
.tbl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--divider); color: var(--muted); }
.pager { display: flex; gap: 4px; }
.pager button { min-width: 30px; height: 30px; border-radius: 6px; }
.pager button.on { background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--link); font-weight: 600; }

/* lists */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); }
.list-row:first-child { border-top: 0; padding-top: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .ttl { font-weight: 600; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sev { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sev.danger { background: var(--bad-bg); color: var(--bad); } .sev.warn { background: var(--warn-bg); color: var(--warn); } .sev.info { background: var(--info-bg); color: var(--info); } .sev.success { background: var(--ok-bg); color: var(--ok); }
.statband { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; border-radius: 8px; overflow: hidden; background: var(--border); border: 1px solid var(--border); }
.statband > div { padding: 14px 16px; background: color-mix(in srgb, var(--primary) 5%, var(--raised)); }
.statband .k { font-size: .85rem; color: var(--muted); }
.statband .v { margin-top: 4px; font-size: 1.35rem; font-weight: 700; color: var(--heading); }
.statband .v small { font-size: .9rem; font-weight: 600; opacity: .7; }
@media (max-width: 680px) { .statband { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.reading { padding: 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--divider); }
.reading .k { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.reading .v { margin-top: 4px; font-size: 1.3rem; font-weight: 700; color: var(--heading); }
.reading .v small { font-size: .85rem; font-weight: 600; opacity: .65; margin-left: 2px; }
button.reading { text-align: left; transition: border-color .15s, background .15s; }
button.reading:hover { border-color: var(--primary); }
button.reading.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--raised)); box-shadow: inset 3px 0 0 var(--primary); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--divider); }
.kv:first-child { border-top: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 500; text-align: right; }
.hbar { display: grid; grid-template-columns: 120px minmax(0,1fr) 54px; align-items: center; gap: 10px; padding: 5px 0; }
.hbar .track { height: 8px; border-radius: 99px; background: var(--divider); overflow: hidden; }
.hbar .track span { display: block; height: 100%; border-radius: 99px; background: var(--primary); transform-origin: left; animation: grow-x .9s cubic-bezier(.2,.7,.2,1); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--ok); }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 99px; background: var(--dot-ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot-ok) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
/* cropped from the left on a narrow window, so the banner's words stay whole and the picture gives way */
.hero { width: 100%; height: clamp(110px, 19vw, 320px); object-fit: cover; object-position: left center; border-radius: 8px; display: block; }
.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 320px; border: 1.5px dashed var(--content-border); border-radius: 8px; color: var(--muted); text-align: center; padding: 24px; }
.flash { animation: flash 1s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--primary) 18%, transparent); } }

/* charts */
.chart { position: relative; width: 100%; }
.chart > svg { display: block; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid-l { stroke: var(--divider); stroke-width: 1; }
.chart .draw { stroke-dasharray: 1; animation: draw 1.3s cubic-bezier(.3,.6,.2,1) both; }
.chart .fade { animation: fadein 1.2s ease both; }
.chart .grow { transform-box: fill-box; transform-origin: bottom; animation: grow-y .8s cubic-bezier(.2,.7,.2,1) both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes grow-y { from { transform: scaleY(0); } }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 140px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--raised); box-shadow: var(--popover-shadow); font-size: .85rem; }
.chart-tip .tt { font-weight: 600; margin-bottom: 4px; }
.chart-tip .row { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .875rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.dash { height: 0; border-top: 2px dashed; border-radius: 0; width: 14px; vertical-align: 3px; }

/* map */
.map { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--map-land); touch-action: none; }
.map > svg { width: 100%; height: 100%; display: block; }
#root { height: 100%; }
.map .road-c { stroke: var(--map-casing); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map .road { stroke: var(--map-road); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map .town { fill: var(--map-label); font-size: 12px; font-weight: 600; font-family: var(--font); paint-order: stroke; stroke: var(--map-land); stroke-width: 3px; letter-spacing: .02em; }
.map .water-lbl { fill: color-mix(in srgb, var(--map-water-edge) 60%, var(--map-label)); font-size: 15px; font-style: italic; font-weight: 500; letter-spacing: .3em; font-family: var(--font); }
.map .gf { fill: color-mix(in srgb, var(--geofence) 14%, transparent); stroke: var(--geofence); stroke-width: 1.5; stroke-dasharray: 5 4; transition: fill .2s; }
.map .gf.hi { fill: color-mix(in srgb, var(--geofence) 32%, transparent); stroke-dasharray: none; stroke-width: 2.5; }
.map .gf-lbl { fill: var(--geofence); font-size: 11px; font-weight: 700; font-family: var(--font); paint-order: stroke; stroke: var(--map-land); stroke-width: 3px; }
.veh-marker { cursor: pointer; }
.veh-marker .ring { animation: ring 2s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { from { transform: scale(.6); opacity: .7; } to { transform: scale(2.2); opacity: 0; } }
.veh-marker .lbl { font-size: 12px; font-weight: 700; font-family: var(--font); fill: var(--heading); paint-order: stroke; stroke: var(--map-land); stroke-width: 4px; }
.map-ctrl { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--raised); box-shadow: var(--shadow); }
.map-ctrl button { width: 34px; height: 34px; } .map-ctrl button + button { border-top: 1px solid var(--border); }
.map-ctrl button:hover { background: var(--chrome-hover); }
.map-panel { position: absolute; left: 12px; bottom: 12px; width: 480px; max-width: calc(100% - 24px); height: 360px; max-height: calc(100% - 24px); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--raised) 94%, transparent); backdrop-filter: blur(6px); box-shadow: var(--popover-shadow); }
.map-panel .ph { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); }
.map-panel .list { flex: 1; overflow-y: auto; padding: 4px 6px; scrollbar-width: thin; }
.mp-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; border-radius: 6px; text-align: left; }
.mp-row:hover { background: var(--chrome-hover); }
.mp-row.on { background: color-mix(in srgb, var(--primary) 15%, transparent); }
.mp-row .nm { font-weight: 700; color: var(--heading); }
.mp-row .met { display: flex; gap: 12px; font-size: .85rem; color: var(--muted); }
.mp-row .st { margin-left: auto; text-align: right; font-size: .85rem; white-space: nowrap; }
@media (max-width: 680px) { .map-panel { height: 46%; } }

/* prototype controls */
.proto { position: fixed; z-index: 500; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: 13px; }
.proto-fab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px; background: #01092B; color: #F2F5F9; box-shadow: 0 6px 20px rgba(1,9,43,.35); font-weight: 600; }
.proto-panel { width: 300px; max-width: calc(100vw - 32px); padding: 14px; border-radius: 12px; background: #01092B; color: #F2F5F9; box-shadow: 0 10px 30px rgba(1,9,43,.4); display: flex; flex-direction: column; gap: 12px; animation: pop-in .16s ease-out; }
.proto-panel .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .6; margin-bottom: 6px; }
.proto-panel .pseg { display: flex; gap: 4px; padding: 3px; border-radius: 8px; background: rgba(255,255,255,.08); }
.proto-panel .pseg button { flex: 1; height: 28px; border-radius: 6px; font-size: 12.5px; }
.proto-panel .pseg button.on { background: #F2F5F9; color: #01092B; font-weight: 700; }
.swatches { display: flex; gap: 8px; }
.swatches button { width: 28px; height: 28px; border-radius: 99px; border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
.swatches button.on { border-color: #F2F5F9; }
.proto-panel .row2 { display: flex; gap: 6px; }
.proto-panel .pbtn { flex: 1; height: 32px; border-radius: 8px; background: rgba(255,255,255,.1); font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.proto-panel .pbtn:hover { background: rgba(255,255,255,.18); }
.proto-panel .pbtn.on { background: var(--primary); color: #fff; }
.proto-panel .hint { font-size: 11.5px; opacity: .55; line-height: 1.4; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; letter-spacing: .12em; color: var(--backdrop-fg); white-space: nowrap; }
.wordmark .mk { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 55%, white), var(--primary)); }
.screen-enter { animation: screen-in .28s ease-out; }
@keyframes screen-in { from { opacity: .0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* icons: inline SVG glyphs from icons.js (was the Font Awesome CDN script) */
.svg-inline--fa { display: inline-block; height: 1em; overflow: visible; vertical-align: -.125em; box-sizing: content-box; }
.fa-2x { font-size: 2em; }

/* the lock in place of a map: only the owner sees where a vehicle is */
.lockcard { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 8px; border: 1px dashed var(--content-border); background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--muted) 7%, transparent) 10px 20px); color: var(--text); }
.lockcard > svg { flex: none; font-size: 1.1rem; margin-top: 2px; color: var(--primary); }
.lockcard b { display: block; color: var(--heading); margin-bottom: 4px; }
.lockcard span { display: block; font-size: .92rem; line-height: 1.45; }

/* ================= thumbnail (thumb.html): the app as an illustration ================= */
html.thumb, html.thumb body { height: 100%; overflow: hidden; background: transparent; }
.stage { position: absolute; left: 0; top: 0; overflow: hidden; transform-origin: 0 0; font-size: 14px; }
.stage.stripes::before, .stage.stripes::after { content: ''; position: absolute; pointer-events: none; }
.stage.stripes::before { right: 0; top: 0; width: 60%; height: 55%; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--primary) 30%, transparent) 0 1.5px, transparent 1.5px 10px); -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 60%); mask-image: linear-gradient(200deg, #000 10%, transparent 60%); }
.stage.stripes::after { left: 0; bottom: 0; width: 45%; height: 60%; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--sky) 45%, transparent) 0 1.5px, transparent 1.5px 10px); -webkit-mask-image: linear-gradient(20deg, #000 10%, transparent 55%); mask-image: linear-gradient(20deg, #000 10%, transparent 55%); }

.win { position: absolute; z-index: 1; overflow: hidden; border-radius: 14px; background: var(--raised); box-shadow: 0 0 0 1px var(--border), 0 30px 70px -25px color-mix(in srgb, var(--secondary) 45%, transparent); }
.wide .win { left: 220px; top: 18px; width: 962px; height: 680px; }
.square .win { left: 108px; top: 18px; width: 596px; height: 760px; }
.win-bar { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.win-bar i { width: 11px; height: 11px; border-radius: 99px; background: var(--content-border); }
.win-url { display: inline-flex; align-items: center; gap: 7px; margin: 0 auto; padding: 5px 80px; border-radius: 99px; background: var(--raised); font-size: .82rem; color: var(--muted); }
.win-url svg { font-size: .7rem; }
.square .win-url { padding: 5px 40px; }
.win-body { display: flex; height: calc(100% - 42px); }
.win-side { flex: none; width: 200px; padding: 18px 12px; border-right: 1px solid var(--border); background: var(--backdrop); }
.win-side img.big { height: 22px; margin: 4px 10px 22px; }
.win-side img.sq { display: none; }
.win-side .wordmark { margin: 4px 10px 22px; font-size: .9rem; }
.win-side ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.win-side li { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 11px; border-radius: 7px; font-weight: 500; color: var(--text); white-space: nowrap; }
.win-side li svg { width: 16px; color: var(--muted); }
.win-side li.on { background: color-mix(in srgb, var(--primary) 11%, transparent); font-weight: 600; color: var(--heading); }
.win-side li.on svg { color: var(--primary); }
.square .win-side { width: 64px; padding: 18px 10px; }
.square .win-side img.big, .square .win-side .wordmark .big, .square .win-side li span { display: none; }
.square .win-side img.sq { display: block; width: 26px; height: 26px; margin: 2px auto 20px; }
.square .win-side li { justify-content: center; padding: 0; }
.win-main { flex: 1; min-width: 0; overflow: hidden; padding: 30px 34px; }
.win-main h3 { font-size: 1.35rem; font-weight: 700; }
.win-main .lead { margin: 4px 0 20px; color: var(--muted); }
.win-main .map.fill { position: absolute; inset: 0; }
.square .win-main { padding: 26px 24px; }

.tt { width: 100%; border-collapse: collapse; }
.tt th { padding: 10px 12px; border-bottom: 1px solid var(--divider); text-align: left; font-size: .85rem; font-weight: 600; color: var(--heading); white-space: nowrap; }
.tt td { padding: 11px 12px; border-bottom: 1px solid var(--divider); color: var(--text); white-space: nowrap; }
.tt .r { text-align: right; }
.tt .hd, .tt .nm { color: var(--heading); font-weight: 500; }
.tt .nm { display: flex; align-items: center; gap: 11px; }
.tt .nm .soft-icon { width: 30px; height: 30px; border-radius: 99px; font-size: .8rem; }
.tt .nm small { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.tt .tags { display: inline-flex; gap: 6px; }
.tt .code { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--heading); }
.tt .dot { width: 8px; height: 8px; border-radius: 99px; }
.tt .dot.warn { background: var(--dot-warn); } .tt .dot.danger { background: var(--dot-bad); } .tt .dot.info { background: var(--primary); }
.square .w, .square .tt .tags .tag + .tag { display: none; }
.tt .nm > div { min-width: 0; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.square .tt .nm > div { max-width: 230px; }

.tks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.tks.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.square .tks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tk { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.tk span { display: block; font-size: .85rem; color: var(--muted); }
.tk b { display: block; margin-top: 4px; font-size: 1.45rem; color: var(--heading); }
.tk b small { font-size: .85rem; font-weight: 500; color: var(--muted); }
/* the importer's market: map left, dealers right */
.mk { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.mk-map { height: 310px; border: 1px solid var(--border); border-radius: 10px; }
.mk-b circle { fill: var(--primary); fill-opacity: .55; stroke: var(--primary); stroke-width: 2; }
.mk-b.off circle { fill: var(--dot-warn); stroke: var(--dot-warn); }
.mk .tt td { padding: 9px 10px; } .mk .tt th { padding: 8px 10px; }
.square .mk { grid-template-columns: 1fr; gap: 12px; }
.square .mk-map { height: 190px; }
.square .mk + * , .square .mk .tt td { padding-top: 7px; padding-bottom: 7px; }
.fws { display: grid; gap: 12px; }
.fw { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; }
.fw-top { display: flex; align-items: center; gap: 8px; }
.fw-top b { color: var(--heading); }
.fw .progress { margin: 10px 0 6px; }
.fw small { color: var(--muted); }

.float { position: absolute; z-index: 3; top: 150px; padding: 22px 24px; border-radius: 16px; background: var(--raised); box-shadow: 0 0 0 1px var(--border), 0 22px 50px -14px rgba(1, 9, 43, .3); animation: float-in .55s .1s both cubic-bezier(.2, .8, .2, 1); }
.wide .float { left: 24px; width: 380px; }
.square .float { left: 16px; width: 300px; }
@keyframes float-in { from { opacity: 0; transform: translateY(16px); } }
.fc-head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.fc-head .soft-icon { width: 46px; height: 46px; border-radius: 99px; font-size: 18px; }
.fc-head b { display: block; font-size: 1.15rem; color: var(--heading); }
.fc-head span { font-size: .85rem; color: var(--muted); }
.fc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); }
.fc-row .k { color: var(--text); }
.fc-row .v { font-weight: 600; color: var(--heading); }
.fc-text { margin: 0 0 12px; line-height: 1.5; color: var(--heading); }
.fc-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .88rem; color: var(--muted); }
.fc-note svg { color: var(--primary); }
.fc-note.up, .fc-note.up svg { color: var(--ok); }
.fc-big { font-size: 2.2rem; font-weight: 700; color: var(--heading); }
.fc-doc { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--divider); font-weight: 500; color: var(--heading); }
.fc-doc svg { color: var(--primary); }
.bubble { margin-bottom: 10px; padding: 11px 14px; border-radius: 14px 14px 14px 4px; background: var(--surface); line-height: 1.45; color: var(--heading); }
.bubble.me { margin: 0 0 0 36px; border-radius: 14px 14px 4px 14px; background: color-mix(in srgb, var(--primary) 11%, var(--raised)); }
.bubble small { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .78rem; color: var(--muted); }

.wire { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wire path { fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-dasharray: .004 .009; stroke-linecap: round; }
.wire circle { fill: var(--raised); stroke: var(--primary); stroke-width: 2; }
.wire-pill { position: absolute; z-index: 2; padding: 5px 11px; border-radius: 7px; background: var(--raised); box-shadow: 0 0 0 1px var(--border), 0 2px 6px rgba(0, 0, 0, .08); font-weight: 700; color: var(--heading); white-space: nowrap; transform: translate(-50%, -50%); opacity: 0; transition: opacity .35s .35s; }
.wire-pill.on { opacity: 1; }
.th-dots { position: absolute; z-index: 4; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 7px; }
.th-dots button { width: 8px; height: 8px; border-radius: 99px; background: var(--content-border); transition: width .25s, background .25s; }
.th-dots button.on { width: 22px; background: var(--primary); }
.win-main { position: relative; }

/* plain: only the window, bigger */
.wide.plain .win { left: 60px; top: 40px; width: 1080px; height: 660px; }
.square.plain .win { left: 36px; top: 36px; width: 648px; height: 740px; }

/* popout: the window as placeholders; the menu item and one card pop out of it */
.stage { --skel: color-mix(in srgb, var(--muted) 22%, transparent); }
.wide.popout .win { left: 130px; top: 40px; width: 820px; height: 660px; }
.square.popout .win { left: 70px; top: 36px; width: 560px; height: 740px; }
.popout .win-url { color: transparent; background: var(--skel); padding: 0; width: 280px; height: 18px; }
.popout .win-url svg { display: none; }
.popout .win-side li:not(.on) span { height: 9px; width: 62%; border-radius: 99px; background: var(--skel); color: transparent; overflow: hidden; }
.popout .win-side li.on { visibility: hidden; }
.popout .win-main .tt th, .popout .win-main .tt td, .popout .tk span, .popout .tk b, .popout .fw-top > *, .popout .fw small, .popout .legend span {
  color: transparent; background: linear-gradient(var(--skel), var(--skel)) no-repeat left center / 68% 9px; border-color: transparent; }
.popout .win-main .tt th { background-size: 45% 8px; }
.popout .win-main .tt td:nth-child(2) { background-size: 52% 9px; }
.popout .win-main .tt td:nth-child(3) { background-size: 38% 9px; }
.popout .win-main .tt td.r { background-position: right center; }
.popout .win-main .tt td *, .popout .tk b *, .popout .fw-top > * *, .popout .legend span i { visibility: hidden; }
.popout .win-main .tt tr { border-bottom: 1px solid var(--divider); }
.popout .tk b { margin-top: 10px; background-size: 55% 14px; }
.popout .fw .progress > span, .popout .win-main .chart, .popout .win-main .map { opacity: .45; filter: saturate(.4); }
.nav-pop { position: absolute; z-index: 4; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 18px 0 22px; border-radius: 9px; background: var(--primary); color: var(--on-primary); font-size: 1.05rem; font-weight: 700; white-space: nowrap; box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--primary) 70%, transparent); animation: pop-out .5s .1s both cubic-bezier(.2, .8, .2, 1.2); }
.nav-pop svg { width: 18px; }
.square .nav-pop span { display: none; }
@keyframes pop-out { from { opacity: 0; transform: scale(.85); } }
.popout .float { top: auto !important; left: auto; animation-name: pop-out; }
.wide.popout .float { right: 50px; bottom: 34px; width: 470px; }
.square.popout .float { right: 24px; bottom: 30px; width: 380px; }
.popout .float .fc-head b { font-size: 1.3rem; }

/* vehicle access: the history column, and an ended access dimmed */
.acc-hist { list-style: none; margin: 0; padding: 0; display: grid; }
.acc-hist li { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); }
.acc-hist li:first-child { border-top: 0; padding-top: 2px; }
.acc-hist .hd { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.acc-hist .hd b { color: var(--heading); font-weight: 600; }
.acc-hist .hd span { font-size: .82rem; white-space: nowrap; }
.acc-hist li > div > .muted { font-size: .88rem; line-height: 1.45; margin-top: 2px; }
.acc-hist .soft-icon.warn { color: #f59e0b; } .acc-hist .soft-icon.danger { color: #ef4444; } .acc-hist .soft-icon.success { color: #22c55e; }
.tbl tr.dim td { opacity: .55; }
.avatar.sm { width: 30px; height: 30px; flex-shrink: 0; font-size: .7rem; background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary); }
.avatar.sm::after { display: none; }

/* thumb, maintenance for a partner: the workshop's day above the error codes.
   One scale with the table: labels .85rem/600 like its header, times .75rem, jobs .78/.72rem. */
.ws { position: relative; margin: 0 0 30px; }
.ws-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); }
.ws-row > span { align-self: center; font-size: .85rem; font-weight: 600; color: var(--heading); }
.ws-track { position: relative; height: 100%; }
.ws-axis .ws-track { height: 22px; }
.ws-axis i { position: absolute; top: 0; font-style: normal; font-size: .75rem; font-weight: 500; color: var(--muted); transform: translateX(-50%); }
.ws-axis i:first-child { transform: none; }
.ws-axis em { position: absolute; top: 0; left: calc(var(--now) * 1%); transform: translateX(-50%); padding: 0 3px; background: var(--surface); font-style: normal; font-size: .75rem; font-weight: 600; color: var(--bad); }
.ws-lane { height: 42px; border-top: 1px solid var(--divider); }
.ws-lane:last-child { border-bottom: 1px solid var(--divider); }
.ws-lane .ws-track { background: repeating-linear-gradient(90deg, var(--divider) 0 1px, transparent 1px calc(100% / 9)); }
.ws-job { position: absolute; top: 5px; bottom: 5px; display: grid; align-content: center; gap: 1px; padding: 0 8px; border-left: 3px solid var(--primary); border-radius: 4px; background: var(--info-bg); overflow: hidden; white-space: nowrap; line-height: 1.15; }
.ws-job b { overflow: hidden; text-overflow: ellipsis; font-size: .78rem; font-weight: 600; color: var(--heading); }
.ws-job small { overflow: hidden; text-overflow: ellipsis; font-size: .72rem; color: var(--muted); }
.ws-job.done { border-left-color: var(--dot-idle); background: var(--neutral-bg); }
.ws-job.now { border-left-color: var(--warn); background: var(--warn-bg); }
.ws::after { content: ""; position: absolute; top: 20px; bottom: 0; left: calc(56px + (100% - 56px) * var(--now) / 100); border-left: 1.5px solid var(--bad); pointer-events: none; }
.win-main .ws-sub { margin: 0 0 6px; font-size: 1rem; font-weight: 700; color: var(--heading); }

/* ================= coride fleet scenes (thumb.html?view=board|alerts|booking|service|assistant|help|usage) ================= */
.ws.bk .ws-row { grid-template-columns: 104px minmax(0, 1fr); }
.ws.bk::after { left: calc(104px + (100% - 104px) * var(--now) / 100); }
.ws.bk .ws-lane { height: 46px; }
.ws.bk .ws-lane .ws-track { background: repeating-linear-gradient(90deg, var(--divider) 0 1px, transparent 1px calc(100% / var(--slots, 11))); }
.ws.bk .ws-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.ws-job.svc { border-left-color: var(--muted); background: repeating-linear-gradient(135deg, var(--neutral-bg) 0 8px, transparent 8px 16px); }
.square .ws.bk .ws-row { grid-template-columns: 84px minmax(0, 1fr); }
.square .ws.bk::after { left: calc(84px + (100% - 84px) * var(--now) / 100); }
.mbar { width: 120px; height: 6px; border-radius: 99px; background: var(--divider); overflow: hidden; }
.mbar span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.mbar.warn span { background: var(--warn); } .mbar.danger span { background: var(--bad); }
.as { display: grid; gap: 10px; max-width: 640px; }
.as .bubble { margin: 0; max-width: 86%; justify-self: start; }
.as .bubble.me { margin: 0; justify-self: end; }
.as .bubble p { margin: 0; display: flex; align-items: center; gap: 8px; }
.as .bubble p svg { color: var(--ok); }
.as .as-n { margin-top: 8px; font-size: .88rem; color: var(--muted); }
.as-li { display: grid; grid-template-columns: 26px minmax(0, 1fr) 52px 110px; align-items: center; gap: 10px; margin-top: 8px; padding: 7px 10px; border-radius: 8px; background: var(--raised); box-shadow: 0 0 0 1px var(--border); }
.as-li .soft-icon { width: 26px; height: 26px; border-radius: 99px; font-size: .7rem; }
.as-li b { color: var(--heading); font-weight: 600; }
.as-li span.tnum { font-size: .88rem; color: var(--text); }
.square .as-li { grid-template-columns: 26px minmax(0, 1fr) 46px; } .square .as-li span.tnum:last-child { display: none; }
.as-in { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 12px 16px; border-radius: 99px; background: var(--raised); box-shadow: 0 0 0 1px var(--border); color: var(--muted); }
.as-in svg { color: var(--primary); }
.float .bubble.me { margin: 0 0 10px 36px; }
.cal-full { padding: 22px 24px; overflow: visible; }

/* boat readings and the 24-hour strip (view=boat), shore power in the boat list */
.shore { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--ok); }
.shore svg { font-size: .8rem; }
.rds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.square .rds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rd { display: flex; gap: 11px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.rd .soft-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 99px; font-size: .85rem; color: var(--primary); }
.rd span { display: block; font-size: .82rem; color: var(--muted); }
.rd b { display: block; margin-top: 2px; font-size: 1.3rem; color: var(--heading); }
.rd small { display: block; margin-top: 2px; font-size: .76rem; color: var(--muted); white-space: nowrap; }
.square .rd { padding: 11px 9px; gap: 0; } .square .rd .soft-icon { display: none; } .square .rd small { white-space: normal; }
.tl { display: grid; gap: 0; }
.tl-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; height: 46px; border-top: 1px solid var(--divider); }
.tl-row:last-child { border-bottom: 1px solid var(--divider); }
.tl-row > span { font-size: .85rem; font-weight: 600; color: var(--heading); }
.tl-axis { height: 24px; border-top: 0; }
.tl-axis div { position: relative; height: 100%; }
.tl-axis i { position: absolute; top: 2px; font-style: normal; font-size: .75rem; font-weight: 500; color: var(--muted); transform: translateX(-50%); }
.tl-axis i:first-child { transform: none; } .tl-axis i:last-child { transform: translateX(-100%); }
.tl-track { position: relative; height: 18px; border-radius: 5px; background: var(--neutral-bg); overflow: hidden; }
.tl-track i { position: absolute; top: 0; bottom: 0; transform-origin: 0 50%; animation: grow-x .7s both cubic-bezier(.2, .7, .2, 1); }
.tl-track i.on { background: color-mix(in srgb, var(--ok) 55%, var(--raised)); }
.tl-track i.off { background: repeating-linear-gradient(135deg, var(--bad-bg) 0 6px, color-mix(in srgb, var(--bad) 35%, var(--raised)) 6px 8px); animation-delay: .5s; }
.tl-track i.on + i.off + i.on { animation-delay: 1s; }
.tl-track.batt { height: 30px; background: none; overflow: visible; }
.tl-track.batt svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tl-track.batt { clip-path: inset(-4px 100% -4px 0); animation: wipe-x 1.6s .2s both ease-out; }
.tl-track.batt path { fill: none; stroke: var(--primary); stroke-width: 2; vector-effect: non-scaling-stroke; }
@keyframes wipe-x { to { clip-path: inset(-4px 0 -4px 0); } }
.tl-track.ticks { background: none; overflow: visible; }
.tl-track.ticks em { position: absolute; top: 1px; width: 16px; height: 16px; margin-left: -8px; border-radius: 99px; background: var(--sky, var(--primary)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky, var(--primary)) 25%, transparent); animation: pop-out .4s both; }

/* ---- motion for the fleet scenes. Each tells one small story, once. ---- */
html.thumb:not(.play) .stage *, html.thumb:not(.play) .stage *::before, html.thumb:not(.play) .stage *::after { animation-play-state: paused !important; }
html.thumb:not(.play) .wire-pill.on { opacity: 0; }
/* alerts: the newest one arrives */
.tt tr.new { animation: alert-in .6s .5s both; }
.tt tr.new td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.tt tr.new .dot { animation: ring-dot 1.6s 1.1s 3; }
@keyframes alert-in { from { opacity: 0; transform: translateY(-10px); background: var(--bad-bg); } 60% { background: var(--bad-bg); } }
@keyframes ring-dot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.stage:has(tr.new) .float { animation-delay: 1.1s; }
/* bookings: the day fills in, then the new booking lands */
.ws.bk .ws-job { transform-origin: 0 50%; animation: grow-x .5s both cubic-bezier(.2, .7, .2, 1); }
.ws.bk .ws-lane:nth-child(3) .ws-job { animation-delay: .08s; } .ws.bk .ws-lane:nth-child(4) .ws-job { animation-delay: .16s; }
.ws.bk .ws-lane:nth-child(5) .ws-job { animation-delay: .24s; } .ws.bk .ws-lane:nth-child(6) .ws-job { animation-delay: .32s; } .ws.bk .ws-lane:nth-child(7) .ws-job { animation-delay: .4s; }
.ws.bk .ws-job.new { border-left-color: var(--ok); background: var(--ok-bg); animation: job-new .7s 1.5s both cubic-bezier(.2, .9, .3, 1.3); }
@keyframes job-new { from { opacity: 0; transform: scale(.6); } }
.stage:has(.ws-job.new) .float { animation-delay: 1.7s; }
/* maintenance: the hours fill up */
.mbar span { transform-origin: 0 50%; animation: grow-x 1s .3s both cubic-bezier(.2, .7, .2, 1); }
/* assistant: a short conversation */
.as > * { animation: as-in .45s both cubic-bezier(.2, .8, .2, 1); }
.as > :nth-child(1) { animation-delay: .4s; } .as > :nth-child(2) { animation-delay: 1.3s; } .as > :nth-child(3) { animation-delay: 3s; } .as > :nth-child(4) { animation-delay: 3.9s; } .as > :nth-child(5) { animation-delay: 0s; }
.as .as-li { animation: as-in .35s both; } .as .as-li:nth-of-type(1) { animation-delay: 1.6s; } .as .as-li:nth-of-type(2) { animation-delay: 1.8s; } .as .as-li:nth-of-type(3) { animation-delay: 2s; }
@keyframes as-in { from { opacity: 0; transform: translateY(8px); } }
.stage:has(.as) .float { animation-delay: 4.6s; }

/* ---- coride fleet edition (edition=fleet) ---- */
.nav-item .pill-count, .nav-item .mini-pill { margin-left: auto; margin-right: 4px; }
.fleet-map { display: block; height: 300px; border-radius: 10px; border: 1px solid var(--divider); cursor: pointer; padding: 0; }
.fleet-map svg { width: 100%; height: 100%; display: block; }
.dcard .fleet-cal { padding: 4px 0 0; }
.dcard .fleet-cal .ws { margin-top: 0; }
@media (max-width: 680px) { .fleet-map { height: 220px; } }
/* narrow: the day's calendar keeps its hours readable and scrolls sideways */
@media (max-width: 680px) { .cal-full { overflow-x: auto; } .cal-full .ws { min-width: 640px; } }
/* camper return (view=handover) */
.chk { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--heading); }
.chk svg { color: var(--ok); }
.tt tbody tr:has(.chk) { animation: as-in .4s both; }
.tt tbody tr:has(.chk):nth-child(2) { animation-delay: .25s; } .tt tbody tr:has(.chk):nth-child(3) { animation-delay: .5s; } .tt tbody tr:has(.chk):nth-child(4) { animation-delay: .75s; }
.tt tbody tr:has(.chk):nth-child(5) { animation-delay: 1s; } .tt tbody tr:has(.chk):nth-child(6) { animation-delay: 1.25s; }
.stage:has(.chk) .float { animation-delay: 1.7s; }
