/* VehicleTracker base styles. Tokens come from the hardware team's dashboard so the two look related. */
@font-face{font-family:"Barlow";font-weight:400;font-display:swap;src:url(../fonts/barlow-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Barlow";font-weight:500;font-display:swap;src:url(../fonts/barlow-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"Barlow";font-weight:600;font-display:swap;src:url(../fonts/barlow-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Barlow Condensed";font-weight:500;font-display:swap;src:url(../fonts/barlow-condensed-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:"Barlow Condensed";font-weight:600;font-display:swap;src:url(../fonts/barlow-condensed-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Barlow Condensed";font-weight:700;font-display:swap;src:url(../fonts/barlow-condensed-latin-700-normal.woff2) format("woff2")}

:root{
  --ink:#10222b; --ink-2:#33464f; --muted:#5d6f78; --line:#d2d9dd; --fog:#e8ecee; --panel:#f6f7f7; --white:#fff;
  --plate:#f4c20d; --route:#f2b100; --alert:#b3261e; --ok:#14705f;
  --ui:"Barlow","Segoe UI",system-ui,sans-serif; --plate-font:"Barlow Condensed","Arial Narrow",sans-serif;
}
*{box-sizing:border-box}
html{font-size:100%}
body{margin:0;background:var(--panel);color:var(--ink);font:400 1rem/1.5 var(--ui)}
h1{font:600 1.75rem/1.2 var(--ui);margin:0 0 .25rem}
h2{font:600 1.15rem/1.3 var(--ui);margin:0 0 .75rem}
code{background:var(--fog);padding:.1rem .35rem;border-radius:4px;font-size:.9em}
.muted{color:var(--muted)}
/* One link colour everywhere, whether or not the link was visited. Buttons, chips, plates and menus set their own colour. */
a{color:var(--ink);text-decoration-thickness:1px;text-underline-offset:.18em;text-decoration-color:var(--muted)}
a:hover{text-decoration-color:var(--route);text-decoration-thickness:2px}
a:focus-visible{outline:3px solid var(--route);outline-offset:2px;border-radius:3px}
.grow{flex:1}
.page{max-width:1100px;margin:0 auto;padding:1.5rem 1rem 3rem}
.topbar{display:flex;gap:1rem;align-items:center;background:var(--ink);color:#fff;padding:.7rem 1rem}
.topbar .muted{color:#b7c5cc}
.brand{display:flex;align-items:center;gap:.6rem}
.brand-name{font:600 1.25rem var(--plate-font);letter-spacing:.02em}
.ring{width:22px;height:22px;border-radius:50%;border:3px solid var(--route);position:relative;display:inline-block}
.ring::after{content:"";position:absolute;inset:4px;border-radius:50%;background:var(--route)}
.card{background:var(--white);border:1px solid var(--line);border-radius:10px;padding:1rem 1.1rem;margin:1rem 0}
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.75rem;margin:1.25rem 0}
.tile{background:var(--white);border:1px solid var(--line);border-radius:10px;padding:.8rem 1rem;display:flex;flex-direction:column}
.tile b{font:600 1.9rem/1.1 var(--plate-font)}
.tile span{color:var(--muted);font-size:.95rem}
.tile small{display:block;color:var(--muted)}
.tile.warn b{color:var(--alert)}
.scroll{overflow-x:auto}
table{border-collapse:collapse;width:100%;font-size:.95rem}
th{text-align:left;font-weight:600;color:var(--ink-2);border-bottom:2px solid var(--line);padding:.45rem .6rem;white-space:nowrap}
td{border-bottom:1px solid var(--fog);padding:.45rem .6rem;vertical-align:middle}
td.empty{color:var(--muted);text-align:center;padding:1.2rem}
td.bad{color:var(--alert);font-weight:600}
.plate{display:inline-block;background:var(--plate);color:#1b1b1b;border:2px solid #1b1b1b;border-radius:5px;padding:.05rem .5rem;font:700 1rem var(--plate-font);letter-spacing:.06em}
.plate.unreg{background:var(--white);border-color:var(--muted);color:var(--ink-2)}
.tag{display:inline-block;background:var(--fog);color:var(--ink-2);border-radius:4px;padding:0 .4rem;font-size:.8rem;font-weight:600}
.tag.bad{background:#f6d9d6;color:var(--alert)}
.btn{font:500 1rem var(--ui);border:1px solid var(--line);background:var(--white);color:var(--ink);border-radius:8px;padding:.5rem .9rem;cursor:pointer;min-height:44px}
.topbar .btn{background:transparent;color:#fff;border-color:#4b6068}
.btn.primary{background:var(--ink);color:#fff;border-color:var(--ink)}
.btn:focus-visible,input:focus-visible{outline:3px solid var(--route);outline-offset:2px}
.signin{min-height:100vh;display:grid;place-items:center;padding:1rem}
.signin-card{width:100%;max-width:380px;display:flex;flex-direction:column;gap:.4rem}
.signin-card .brand{color:var(--ink);margin-bottom:.5rem}
label{font-weight:500;margin-top:.4rem}
input{font:400 1rem var(--ui);padding:.6rem .7rem;border:1px solid var(--line);border-radius:8px;min-height:44px}
.error{color:var(--alert);margin:.3rem 0}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.small{font-size:.85rem;margin-left:.4rem}
td .plate+.plate{margin-left:.4rem}

/* ------------------------------------------------------------------ app shell */
.shell{display:grid;grid-template-columns:232px 1fr;min-height:100vh;min-height:100dvh}
.side{background:var(--ink);color:#e7eef1;display:flex;flex-direction:column;padding:.9rem .7rem;position:sticky;top:0;height:100vh;height:100dvh}
.side .brand{padding:.3rem .6rem 1rem;color:#fff;flex:none}
/* The menu scrolls inside the dark panel when it is taller than the screen; the brand stays on top and the sign out block stays at the bottom. */
.side nav{display:flex;flex-direction:column;gap:.15rem;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#2a4350 transparent}
.nav-link{display:flex;align-items:center;gap:.7rem;padding:.65rem .7rem;border-radius:9px;color:#c4d1d7;text-decoration:none;font-weight:500;min-height:44px;border-left:4px solid transparent}
.nav-link svg{flex:none}
.nav-link:hover{background:#1b3440;color:#fff}
.nav-link[aria-current="page"]{background:#1b3440;color:#fff;border-left-color:var(--route)}
.nav-badge{margin-left:auto;background:var(--alert);color:#fff;border-radius:999px;font:600 .8rem var(--ui);padding:0 .5rem;min-width:1.4rem;text-align:center}
.side-foot{margin-top:auto;flex:none;padding:.6rem;border-top:1px solid #2a4350;font-size:.9rem}
.side-foot .who{color:#fff;font-weight:600}
.side-foot .role{color:#9fb2ba}
.side-foot button{margin-top:.5rem;width:100%}
.main{min-width:0;display:flex;flex-direction:column}
.bar{display:flex;gap:.8rem;align-items:center;background:var(--white);border-bottom:1px solid var(--line);padding:.55rem 1rem;position:sticky;top:0;z-index:30}
.bar .menu-btn{display:none}
.searchbox{position:relative;flex:1;max-width:560px}
.searchbox input{width:100%;padding-left:2.4rem;background:var(--panel)}
.searchbox .s-ico{position:absolute;left:.8rem;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.searchbox kbd{position:absolute;right:.7rem;top:50%;transform:translateY(-50%);border:1px solid var(--line);border-radius:5px;padding:0 .4rem;font:500 .8rem var(--ui);color:var(--muted);background:var(--white)}
.results{position:absolute;left:0;right:0;top:calc(100% + 6px);background:var(--white);border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 32px rgba(16,34,43,.18);max-height:70vh;overflow:auto;z-index:50;padding:.3rem}
.results h4{margin:.5rem .6rem .2rem;font:600 .78rem var(--ui);text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.results a,.results button.res{display:flex;gap:.7rem;align-items:center;width:100%;text-align:left;border:0;background:transparent;padding:.5rem .6rem;border-radius:8px;color:var(--ink);text-decoration:none;cursor:pointer;min-height:44px;font:400 1rem var(--ui)}
.results a:hover,.results button.res:hover,.results .active{background:var(--fog)}
.results .sub{color:var(--muted);font-size:.9rem}
.content{padding:1.25rem 1.25rem 3rem;max-width:1180px;width:100%}
.content.wide{max-width:none;padding:0}
.skip{position:absolute;left:-999px;top:0;background:var(--route);color:#000;padding:.6rem 1rem;z-index:100}
.skip:focus{left:0}
.flash{margin:0 0 1rem;padding:.7rem 1rem;border-radius:9px;border:1px solid;display:flex;gap:.6rem}
.flash.ok{background:#e4f2ee;border-color:#a9d3c8;color:#0d4a3e}
.flash.err{background:#f9e3e1;border-color:#e7b3ae;color:#7d1a14}
.flash.info{background:#fdf3d4;border-color:#ecd086;color:#5a4300}
.page-head{display:flex;flex-wrap:wrap;gap:.8rem;align-items:center;margin-bottom:1rem}
.page-head h1{margin:0}
.page-head .grow{flex:1}
.btn.danger{background:var(--alert);border-color:var(--alert);color:#fff}
.btn.small{min-height:36px;padding:.25rem .7rem;font-size:.92rem}
.btn[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.btn:disabled{opacity:.45;cursor:not-allowed}
a.btn{display:inline-flex;align-items:center;gap:.4rem;text-decoration:none}
select,textarea{font:400 1rem var(--ui);padding:.55rem .7rem;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);min-height:44px;width:100%}
textarea{min-height:90px}
.form{display:grid;gap:.9rem;max-width:620px}
.field{display:flex;flex-direction:column;gap:.25rem}
.field .help{color:var(--muted);font-size:.9rem}
.field .err{color:var(--alert);font-size:.92rem}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
.filters{display:flex;flex-wrap:wrap;gap:.5rem;margin:.3rem 0 1rem}
.chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:.3rem .9rem;min-height:40px;font:500 .95rem var(--ui);cursor:pointer;color:var(--ink);text-decoration:none;display:inline-flex;align-items:center;gap:.4rem}
.chip[aria-pressed="true"],.chip.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.pill{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;padding:.12rem .65rem;font:600 .85rem var(--ui);border:1px solid}
.pill.high{background:#e4f2ee;color:#0d4a3e;border-color:#a9d3c8}
.pill.medium{background:#fdf3d4;color:#5a4300;border-color:#ecd086}
.pill.low{background:#fbe8d8;color:#7a3b00;border-color:#efc29b}
.pill.old{background:var(--fog);color:var(--ink-2);border-color:var(--line)}
.pill.wanted{background:var(--alert);color:#fff;border-color:var(--alert)}
.pill.ok{background:#e4f2ee;color:#0d4a3e;border-color:#a9d3c8}
.pill.warn{background:#fdf3d4;color:#5a4300;border-color:#ecd086}
.pill.bad{background:#f9e3e1;color:#7d1a14;border-color:#e7b3ae}
.pill .dot{width:8px;height:8px;border-radius:50%;background:currentColor}
.list{list-style:none;margin:0;padding:0}
.list li{border-bottom:1px solid var(--fog)}
.list li:last-child{border-bottom:0}
.list a.item{display:flex;gap:.8rem;align-items:center;padding:.7rem .4rem;color:var(--ink);text-decoration:none;min-height:56px}
.list a.item:hover{background:var(--panel)}
.item .grow{min-width:0}
.item .l1{font-weight:600}
.item .l2{color:var(--muted);font-size:.93rem}
.empty{color:var(--muted);padding:1.2rem;text-align:center}
.kv{display:grid;grid-template-columns:max-content 1fr;gap:.35rem 1.2rem;margin:0}
.kv dt{color:var(--muted)}
.kv dd{margin:0}
.cols{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.help-box{background:#fff;border:1px dashed var(--line);border-radius:10px;padding:.8rem 1rem;color:var(--ink-2);font-size:.95rem}

/* ------------------------------------------------------------------ map pages */
.mapwrap{display:grid;grid-template-columns:400px 1fr;height:calc(100vh - 62px);height:calc(100dvh - 62px)}
.mappanel{overflow:auto;background:var(--panel);border-right:1px solid var(--line);padding:1rem}
.mapstage{position:relative;min-height:320px}
#map{position:absolute;inset:0}
.vhead{display:flex;gap:.7rem;align-items:center;flex-wrap:wrap}
.vhead .plate{font-size:1.5rem;padding:.1rem .7rem}
.vsub{color:var(--muted);margin:.2rem 0 .6rem}
.chips{display:flex;gap:.4rem;flex-wrap:wrap;margin:.3rem 0}
.lk-card{background:#fff;border:1px solid var(--line);border-left:6px solid var(--muted);border-radius:10px;padding:.9rem 1rem;margin:.8rem 0}
.lk-card.high{border-left-color:var(--ok)}
.lk-card.medium{border-left-color:var(--route)}
.lk-card.low{border-left-color:#d9822b}
.lk-card.old{border-left-color:var(--muted)}
.lk-card h2{margin:.2rem 0 .3rem;font:600 1.25rem/1.25 var(--ui)}
.lk-card p{margin:.3rem 0}
.lk-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.6rem}
#locate-note{font-size:.93rem;color:var(--ink-2);margin:.5rem 0 0}
.tiles.compact{grid-template-columns:repeat(2,1fr);margin:.7rem 0}
.tiles.compact .tile b{font-size:1.5rem}
.sectionlabel{font:600 .8rem var(--ui);text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:1.1rem 0 .4rem}
#custom-range{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin:.4rem 0}
.journey{list-style:none;margin:0;padding:0;position:relative}
.j-item{position:relative}
.j-item::before{content:"";position:absolute;left:19px;top:0;bottom:0;width:2px;background:var(--line)}
.j-item:first-child::before{top:50%}.j-item:last-child::before{bottom:50%}
.j-btn{position:relative;display:flex;gap:.7rem;align-items:flex-start;width:100%;text-align:left;border:0;background:transparent;padding:.55rem .3rem;cursor:pointer;color:var(--ink);font:400 1rem var(--ui);min-height:48px;border-radius:8px}
.j-btn:hover{background:#fff}
.j-ico{flex:none;width:28px;height:28px;border-radius:50%;background:#fff;border:2px solid var(--ink);display:grid;place-items:center;font:700 .85rem var(--ui);z-index:1}
.j-ico svg{width:16px;height:16px}
.j-item.stop .j-ico{background:var(--ink);color:#fff}
.j-item.checkpoint .j-ico{background:var(--route);border-color:var(--ink)}
.j-item.met .j-ico{border-color:var(--ok);color:var(--ok)}
.j-item.start .j-ico{background:var(--ok);color:#fff;border-color:var(--ok)}
.j-item.end .j-ico{background:var(--route)}
.j-text{display:flex;flex-direction:column;min-width:0;flex:1}
.j-title{font-weight:600}
.j-place{color:var(--muted);font-size:.9rem}
.j-when{color:var(--ink-2);font-size:.88rem;white-space:nowrap}
.layers{position:absolute;left:10px;top:10px;z-index:5;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 14px rgba(16,34,43,.15);padding:.3rem .5rem}
.layers summary{cursor:pointer;font-weight:600;padding:.4rem .2rem;min-height:36px;display:flex;align-items:center}
.layers label{display:flex;gap:.5rem;align-items:center;padding:.3rem .2rem;font-weight:400;margin:0;min-height:36px;cursor:pointer}
.layers input{min-height:0;width:18px;height:18px}
.legend{display:flex;flex-wrap:wrap;gap:.4rem .9rem;font-size:.85rem;color:var(--ink-2);margin-top:.3rem;padding-top:.4rem;border-top:1px solid var(--fog)}
.legend i{display:inline-block;width:12px;height:12px;border-radius:50%;vertical-align:-1px;margin-right:.3rem}
.replay{position:absolute;left:10px;right:10px;bottom:34px;z-index:5;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 18px rgba(16,34,43,.2);padding:.5rem .8rem;display:grid;grid-template-columns:auto 1fr auto;gap:.2rem .8rem;align-items:center;max-width:760px;margin:auto}
.replay .btn{min-width:44px;padding:.3rem}
.rp-mid{position:relative}
.rp-mid input[type=range]{width:100%;min-height:30px;accent-color:var(--ink);padding:0}
.rp-ticks{position:absolute;left:0;right:0;top:0;height:30px;pointer-events:none}
.tk{position:absolute;top:2px;width:3px;height:8px;background:var(--ink);border-radius:2px}
.tk.cp{background:var(--route);outline:1px solid var(--ink)}
.rp-time{grid-column:2;font-weight:600;font-size:.95rem}
.rp-speed{grid-column:3;display:flex;gap:.25rem}
.rp-speed .btn{min-width:40px;min-height:34px;font-size:.88rem}
.map-plate{background:var(--plate);color:#1b1b1b;border:2px solid #1b1b1b;border-radius:5px;padding:.02rem .45rem;font:700 .95rem var(--plate-font);letter-spacing:.06em;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.3);white-space:nowrap}
.map-plate.moving{background:var(--route);transform:translateY(-6px)}
.map-plate.wanted{background:var(--alert);color:#fff;border-color:#fff}
.map-plate.silent{background:#fff;color:var(--ink-2);border-color:var(--muted)}
.map-plate.low,.map-plate.old{background:#e9dfa6}
.map-badge{display:inline-flex;gap:.3rem;align-items:center;border-radius:999px;border:2px solid var(--ink);background:#fff;color:var(--ink);font:700 .85rem var(--ui);min-width:30px;height:30px;justify-content:center;padding:0 .35rem;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.map-badge svg{width:16px;height:16px}
.map-badge.stop{background:var(--ink);color:#fff;border-color:#fff}
.map-badge.start{background:var(--ok);color:#fff;border-color:#fff}
.map-badge.checkpoint{background:var(--route);padding:0 .6rem 0 .4rem}
.map-badge.gateway{background:#fff;color:var(--muted);border-color:var(--muted);width:28px;height:28px;min-width:0;padding:0}
.map-badge .tag-name{font:600 .8rem var(--ui);white-space:nowrap}
.lk-pin{position:relative;width:26px;height:26px;border:0;background:transparent;cursor:pointer}
.lk-dot{position:absolute;inset:4px;border-radius:50%;background:var(--route);border:3px solid var(--ink)}
.lk-pin::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:3px solid var(--route);animation:pulse 2s ease-out infinite}
.lk-pin.old::after{display:none}
.lk-pin.high .lk-dot{background:var(--ok);border-color:#fff}
@keyframes pulse{from{transform:scale(.6);opacity:.9}to{transform:scale(1.5);opacity:0}}
.me-dot{width:18px;height:18px;border-radius:50%;background:#2563eb;border:3px solid #fff;box-shadow:0 0 0 6px rgba(37,99,235,.25)}
.pop{font:400 .95rem var(--ui);color:var(--ink);line-height:1.4}
.pop .muted{color:var(--muted)}
.maplibregl-popup-content{border-radius:10px!important;padding:.7rem .9rem!important}

/* ------------------------------------------------------------------ small screens */
@media (max-width:900px){
  .shell{grid-template-columns:1fr}
  .side{position:fixed;left:0;top:0;bottom:0;width:260px;transform:translateX(-100%);z-index:60;transition:transform .2s}
  .side.open{transform:none}
  .scrim{position:fixed;inset:0;background:rgba(16,34,43,.55);z-index:55}
  .bar .menu-btn{display:inline-flex}
  .bar kbd{display:none}
  .mapwrap{grid-template-columns:1fr;grid-template-rows:56vh auto;height:auto}
  .mapstage{order:-1;min-height:56vh}
  .mappanel{border-right:0;overflow:visible}
  .replay{grid-template-columns:auto 1fr;bottom:30px}
  .rp-speed{grid-column:1 / -1;justify-content:flex-end}
  .cols,.row2{grid-template-columns:1fr}
  .content{padding:1rem}
}
@media (prefers-reduced-motion:reduce){.lk-pin::after{animation:none}.side{transition:none}}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
[hidden]{display:none!important}
.map-plate.hl{outline:3px solid var(--ink);z-index:5}
.vhead{display:flex;gap:.7rem;align-items:center;flex-wrap:wrap}
.help-box{background:#fff;border:1px dashed var(--line);border-radius:10px;padding:.8rem 1rem;color:var(--ink-2);font-size:.95rem}
.mapstage{position:relative;min-height:320px}

/* ------------------------------------------------------------------ bigger map */
.focus-btn{position:absolute;left:10px;top:10px;z-index:6;display:inline-flex;gap:.45rem;align-items:center;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 14px rgba(16,34,43,.18);padding:.45rem .8rem;min-height:44px;font:600 .95rem var(--ui);cursor:pointer}
.focus-btn:hover{background:var(--fog)}
.focus-btn:focus-visible{outline:3px solid var(--route);outline-offset:2px}
.layers{top:64px}
.map-focus .shell{grid-template-columns:1fr}
.map-focus .side,.map-focus .mappanel{display:none}
.map-focus .mapwrap{grid-template-columns:1fr}
.map-focus .mapstage{min-height:calc(100dvh - 62px)}
.map-focus .bar .menu-btn{display:inline-flex}
.map-focus .replay{max-width:900px}
@media (max-width:900px){.map-focus .mapwrap{grid-template-rows:calc(100dvh - 62px)}.focus-btn span{display:none}.focus-btn{padding:.45rem}}

/* Gateway and checkpoint badges: small, beside the line, name only on hover or focus, so they never hide the road */
.map-badge.checkpoint{padding:0;width:28px;height:28px;min-width:0;opacity:.92;gap:0;overflow:hidden;transition:width .15s,padding .15s}
.map-badge.checkpoint .tag-name{display:none}
.map-badge.checkpoint:hover,.map-badge.checkpoint:focus-visible{width:auto;padding:0 .6rem 0 .4rem;gap:.3rem;opacity:1;z-index:10;overflow:visible}
.map-badge.checkpoint:hover .tag-name,.map-badge.checkpoint:focus-visible .tag-name{display:inline}
.map-badge.gateway{opacity:.85}
.map-badge.gateway:hover{opacity:1}
@media (prefers-reduced-motion:reduce){.map-badge.checkpoint{transition:none}}

/* replay panel with skip controls */
.replay{display:block;max-width:820px}
.rp-row{display:flex;gap:.5rem;align-items:center}
.rp-row .rp-mid{flex:1;min-width:120px}
.rp-info{justify-content:space-between;margin-top:.2rem;flex-wrap:wrap}
.rp-time{font-weight:600}
.rp-now{color:var(--ink-2);font-size:.92rem;min-height:1.3em}
.rp-now b{color:var(--ink)}
.rp-opts{display:flex;gap:.8rem;align-items:center;flex-wrap:wrap}
.rp-skip{display:inline-flex;gap:.4rem;align-items:center;font-weight:400;margin:0;min-height:36px;cursor:pointer;font-size:.93rem}
.rp-skip input{width:18px;height:18px;min-height:0}
.rp-speed{display:inline-flex;gap:.25rem}
.rp-speed .btn{min-width:40px;min-height:34px;font-size:.88rem;padding:.2rem .5rem}
@media (max-width:900px){.replay{bottom:30px}.rp-opts{width:100%;justify-content:space-between}}
.tk.met{background:var(--ok);height:6px;top:4px;width:2px}
.map-plate.met-label{font-size:.78rem;padding:0 .35rem;background:#fff;border-width:1.5px;border-color:var(--ok);color:var(--ink);box-shadow:0 1px 4px rgba(0,0,0,.3);transform:translateY(-14px)}.map-plate.met-label.seenby{border-color:var(--ink-2)}
.fresh-btn{position:absolute;left:50%;top:10px;transform:translateX(-50%);z-index:7;background:var(--ink);color:#fff;border:2px solid var(--route);border-radius:999px;padding:.5rem 1.1rem;min-height:44px;font:600 .95rem var(--ui);cursor:pointer;box-shadow:0 6px 18px rgba(16,34,43,.3)}.fresh-btn:focus-visible{outline:3px solid var(--route);outline-offset:2px}

/* live status chip */
.live-chip{position:absolute;right:56px;top:10px;z-index:6;display:inline-flex;gap:.55rem;align-items:center;background:#fff;border:1px solid var(--line);border-radius:999px;box-shadow:0 4px 14px rgba(16,34,43,.18);padding:.25rem .5rem .25rem .8rem;min-height:44px;font:600 .9rem var(--ui);color:var(--ink)}
.live-dot{width:10px;height:10px;border-radius:50%;background:var(--ok);box-shadow:0 0 0 0 rgba(20,112,95,.5);animation:livepulse 1.8s ease-out infinite}
.live-chip.off .live-dot{background:var(--muted);animation:none}
.live-follow{display:inline-flex;gap:.3rem;align-items:center;font-weight:500;margin:0;cursor:pointer;min-height:32px}
.live-follow input{width:16px;height:16px;min-height:0}
.live-pause{border:1px solid var(--line);background:var(--panel);border-radius:999px;padding:.2rem .7rem;min-height:32px;font:600 .85rem var(--ui);cursor:pointer;color:var(--ink)}
@keyframes livepulse{0%{box-shadow:0 0 0 0 rgba(20,112,95,.55)}100%{box-shadow:0 0 0 10px rgba(20,112,95,0)}}
@media (max-width:900px){.live-chip{right:auto;left:10px;top:64px}.layers{top:118px}}
@media (prefers-reduced-motion:reduce){.live-dot{animation:none}}

.live-chip.lookback{background:var(--ink);color:#fff;border-color:var(--route)}
.live-chip.lookback .live-dot{background:var(--route);animation:none}
.live-back{border:0;background:var(--route);color:#10222b;border-radius:999px;padding:.25rem .85rem;min-height:32px;font:700 .88rem var(--ui);cursor:pointer}
.live-back:focus-visible{outline:3px solid #fff;outline-offset:2px}
.live-help summary{cursor:pointer;font-weight:600;min-height:32px;display:flex;align-items:center}
.live-help ul{margin:.4rem 0 0;padding-left:1.1rem}
.live-help li{margin:.3rem 0}

/* ------------------------------------------------------------------ home list, map choices, clusters, area */
.cnt{font-weight:500;opacity:.75;font-size:.9em}
.area-tools{display:flex;gap:.5rem;flex-wrap:wrap;margin:.4rem 0}
.area-chip{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap;background:#fff;border:2px solid var(--route);border-radius:10px;padding:.5rem .7rem;margin:.4rem 0;font-weight:500}
.tick-tools{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;margin:.4rem 0}
.row-tick{display:flex;align-items:center;gap:.3rem}
.row-tick .item{flex:1;min-width:0}
.tick{width:22px;height:22px;min-height:0;flex:none;accent-color:var(--ink);cursor:pointer;margin-left:.2rem}
.pager{display:flex;gap:.6rem;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:.6rem 0}
.pager .chip:disabled{opacity:.4;cursor:not-allowed}
.clu{min-width:42px;height:42px;border-radius:50%;border:3px solid #fff;background:var(--ink);color:#fff;font:700 1.05rem var(--plate-font);letter-spacing:.02em;box-shadow:0 0 0 3px rgba(16,34,43,.35),0 3px 8px rgba(0,0,0,.35);cursor:pointer;padding:0 .4rem}
.clu:hover{background:var(--ink-2)}
.clu.wanted{background:var(--alert);box-shadow:0 0 0 3px rgba(179,38,30,.4),0 3px 8px rgba(0,0,0,.35)}
.clu:focus-visible{outline:3px solid var(--route);outline-offset:2px}
.map-plate.sel{outline:3px solid var(--ink);outline-offset:1px}
.map-note{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);z-index:5;background:#fff;border:1px solid var(--line);border-radius:999px;box-shadow:0 4px 14px rgba(16,34,43,.18);padding:.45rem 1rem;font-size:.92rem;max-width:calc(100% - 24px);text-align:center}
.map-note[hidden]{display:none}
.journey li.more{padding:.5rem .3rem}

/* gateway analytics */
.bar-col{width:34%;min-width:120px}
.bar{display:block;height:.7rem;background:var(--fog,#e8ecee);border-radius:.35rem;overflow:hidden}
.bar i{display:block;height:100%;background:var(--route,#f2b100);border-radius:.35rem}
.hours{display:grid;grid-template-columns:repeat(24,1fr);gap:3px;align-items:end;height:9rem;padding-top:.4rem}
.hcol{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;min-width:0}
.hcol i{display:block;width:100%;min-height:2px;background:var(--route,#f2b100);border-radius:3px 3px 0 0}
.hcol span{font-size:.72rem;color:var(--muted,#5d6f78);height:1rem;line-height:1rem}
.batch-map{height:26rem;border-radius:10px;overflow:hidden;border:1px solid var(--line)}
@media (max-width:700px){.batch-map{height:20rem}}
.pill .live-dot{display:inline-block;width:8px;height:8px;margin-right:.3rem;vertical-align:middle}
.gw-results{position:absolute;z-index:30;left:0;right:0;background:var(--white);border:1px solid var(--line);border-radius:8px;max-height:14rem;overflow:auto;margin:.2rem 0 0;padding:0;list-style:none;box-shadow:0 6px 18px rgba(16,34,43,.14)}
.gw-results button{display:block;width:100%;text-align:left;padding:.6rem .75rem;background:none;border:0;cursor:pointer;font:inherit;color:inherit}
.gw-results button:hover,.gw-results button:focus-visible{background:var(--fog)}
a.plate,a.item,a.chip,a.btn{text-decoration:none}
.row-bad{background:rgba(179,38,30,.06)}
.side-foot .foot-links{display:grid;gap:.15rem;margin-bottom:.6rem;padding-bottom:.6rem;border-bottom:1px solid #2a4350}
.side-foot .foot-links a,.side-foot .foot-copy{color:#c4d1d7;font:500 .92rem var(--ui);text-decoration:underline;text-decoration-color:#4a6573;background:none;border:0;padding:.3rem 0;text-align:left;cursor:pointer;min-height:36px}
.side-foot .foot-links a:hover,.side-foot .foot-copy:hover{color:#fff;text-decoration-color:var(--route)}
.side-foot .foot-copy{width:auto;margin-top:0}

/* Live: a bright green blinking dot (heard from in the last two minutes) */
@keyframes liveblink{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.25;transform:scale(.7)}}
.map-plate.live{position:relative}
.map-plate.live::before{content:"";position:absolute;top:-6px;right:-6px;width:12px;height:12px;border-radius:50%;background:#1ec451;border:2px solid #fff;box-shadow:0 0 0 0 rgba(30,196,81,.6);animation:liveblink 1.1s ease-in-out infinite}
/* Live: a green ring that spreads out from the number plate box itself, in the plate's own shape */
.map-plate.live{animation:plateglow 1.8s ease-out infinite;box-shadow:0 0 0 3px #1ec451,0 0 0 3px rgba(30,196,81,.6),0 2px 6px rgba(0,0,0,.3)}
@keyframes plateglow{0%{box-shadow:0 0 0 3px #1ec451,0 0 0 3px rgba(30,196,81,.65),0 2px 6px rgba(0,0,0,.3)}100%{box-shadow:0 0 0 3px #1ec451,0 0 0 15px rgba(30,196,81,0),0 2px 6px rgba(0,0,0,.3)}}
.live-dot{background:#1ec451}
.l2 .live-dot,.pop .live-dot{display:inline-block;width:9px;height:9px;margin-right:.1rem;vertical-align:middle;animation:liveblink 1.1s ease-in-out infinite}
.lk-pin.live .lk-dot{background:#1ec451;border-color:#fff;animation:liveblink 1.1s ease-in-out infinite}
.lk-pin.live::after{border-color:#1ec451}
@media (prefers-reduced-motion:reduce){.map-plate.live::before,.l2 .live-dot,.pop .live-dot,.lk-pin.live .lk-dot{animation:none}.map-plate.live{animation:none;box-shadow:0 0 0 3px #1ec451,0 2px 6px rgba(0,0,0,.3)}}

/* Vehicles it met */
.met-list{list-style:none;margin:.2rem 0 .8rem;padding:0;display:grid;gap:.35rem;max-height:260px;overflow:auto}
.met-list li{display:flex;gap:.4rem;align-items:center}
.met-row{flex:1;display:flex;gap:.6rem;align-items:center;text-align:left;background:#fff;border:1px solid var(--line);border-radius:10px;padding:.4rem .6rem;min-height:44px;cursor:pointer;font:inherit;color:var(--ink)}
.met-row.on{border-color:var(--ok);box-shadow:inset 0 0 0 1px var(--ok)}
.met-row .map-plate{position:static;transform:none;flex:none}
.met-sub{font-size:.88rem;color:var(--ink-2)}
.met-open{flex:none;padding:.5rem .6rem;font-weight:600}
.map-plate.met-label.dim{opacity:.25}
.met-panel{position:absolute;left:10px;top:10px;z-index:6;width:min(320px,calc(100% - 20px));max-height:60%;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 14px rgba(16,34,43,.18);padding:.7rem}
.met-panel[hidden]{display:none}
.met-head{display:flex;justify-content:space-between;align-items:center;gap:.5rem}

/* Nyange kits: drawing a speed limit road, the officers map */
.szmap{position:relative;height:380px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.szmap.tall{height:min(62vh,560px)}
.szmap #szmap,.szmap #offmap{position:absolute;inset:0}
.map-badge.officer{background:#0b3d91;color:#fff;border:2px solid #fff;width:42px;height:42px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.4)}
.map-badge.officer.stale{opacity:.45;filter:grayscale(.6)}
.map-badge.officer.alerting{box-shadow:0 0 0 0 rgba(179,38,30,.7);animation:livepulse 1.4s ease-out infinite}
.sz-dot{width:12px;height:12px;border-radius:50%;background:var(--alert);border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.4)}

/* Side menu group headings */
.nav-head{margin:1rem .75rem .3rem;font:600 .72rem var(--ui);letter-spacing:.09em;text-transform:uppercase;color:#7f95a0}
.map-plate{position:relative}
.spd-tag{position:absolute;left:100%;top:50%;transform:translateY(-50%);margin-left:6px;background:var(--ink);color:#fff;font:600 .72rem var(--ui);letter-spacing:0;padding:.1rem .4rem;border-radius:999px;white-space:nowrap;pointer-events:none}
.lk-speed{margin:.2rem 0}
td .live-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:.35rem;vertical-align:middle;animation:liveblink 1.1s ease-in-out infinite}

/* Side menu drop downs */
.nav-group{border-radius:9px}
.nav-group>summary{list-style:none;cursor:pointer}
.nav-group>summary::-webkit-details-marker{display:none}
.nav-group>summary .chev{margin-left:auto;transition:transform .15s;opacity:.7}
.nav-group[open]>summary .chev{transform:rotate(180deg)}
.nav-group[open] .nav-badge-closed{display:none}
.nav-group>summary .nav-badge{margin-left:auto}
.nav-group>summary .nav-badge+.chev{margin-left:.5rem}
.nav-sub{display:flex;flex-direction:column;gap:.1rem;margin:.1rem 0 .4rem 1.55rem;padding-left:.45rem;border-left:1px solid #274553}
.nav-link.sub{min-height:38px;padding:.45rem .7rem;font-weight:400;font-size:.95rem}
@media (prefers-reduced-motion:reduce){.nav-group>summary .chev{transition:none}}
.map-badge.officer svg{width:32px;height:32px;margin-top:3px}
.nav-link svg [fill-rule]{fill:currentColor}
.idlist{display:flex;flex-wrap:wrap;gap:.4rem 1.4rem;margin:.1rem 0 .7rem}
.idlist div{display:flex;flex-direction:column}
.idlist dt{font:600 .72rem var(--ui);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.idlist dd{margin:0;font-weight:600}
.mapgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(15rem,1fr));gap:.6rem 1rem}

/* List pages (Officers): breadcrumb, header with the main action, filter bar, table card, edit windows */
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;color:var(--muted);font-size:.95rem;margin-bottom:.9rem}
.crumbs a{color:var(--ink-2);display:inline-flex}
.crumbs [aria-current]{color:var(--ink);font-weight:500}
.list-head{display:flex;flex-wrap:wrap;gap:1rem;align-items:flex-start;justify-content:space-between;margin-bottom:1.1rem}
.list-head h1{font-size:2rem;margin:0 0 .2rem}
.list-head p{margin:0}
.list-head .btn.primary{display:inline-flex;align-items:center;gap:.45rem;padding:.6rem 1.2rem;font-weight:600}
.list-head .btn.primary span{font-size:1.3rem;line-height:1}
.list-filters{display:flex;flex-wrap:wrap;gap:.7rem;align-items:center;padding:1rem 1.1rem;border-radius:14px}
.list-filters select{width:auto;min-width:11rem;flex:0 1 13rem}
.list-filters .search{flex:1 1 18rem;position:relative;margin:0;font-weight:400}
.list-filters .search svg{position:absolute;left:.8rem;top:50%;transform:translateY(-50%);color:var(--muted)}
.list-filters .search input{width:100%;padding-left:2.4rem}
.btn.outline{display:inline-flex;align-items:center;gap:.4rem;border:1.5px solid var(--ink);font-weight:600}
.btn.ghost{border-color:transparent;background:transparent;color:var(--ink-2);text-decoration:none;display:inline-flex;align-items:center}
.list-card{padding:0;border-radius:14px;overflow:hidden}
.list-count{text-align:right;margin:0;padding:.8rem 1.1rem;font-size:.95rem}
.list-table{min-width:54rem}
.list-table th{background:#dde4ea;color:var(--ink);border-bottom:0;padding:.85rem 1rem;font-size:1rem}
.list-table td{padding:.85rem 1rem;border-bottom:1px solid var(--fog)}
.list-table tbody tr:last-child td{border-bottom:0}
.list-table tbody tr:hover{background:#fafbfb}
.list-table .sub{display:block;font-size:.85rem}
.list-table td.actions{text-align:right;white-space:nowrap}
.list-card nav.filters{margin:0;padding:.7rem 1rem;border-top:1px solid var(--fog)}
.person{display:flex;align-items:center;gap:.8rem}
.person b,.person h2{display:block;margin:0;font-weight:600}
.person .muted{font-size:.9rem}
.avatar{flex:none;width:2.6rem;height:2.6rem;border-radius:50%;display:grid;place-items:center;font:600 .95rem var(--ui);letter-spacing:.02em}
.av0{background:#ece8fb;color:#4b2fa8}.av1{background:#e6edf5;color:#24466e}.av2{background:#e2f2ea;color:#1c6a45}
.av3{background:#fbefdc;color:#8a5200}.av4{background:#fbe4ec;color:#9c2452}.av5{background:#e3f1f4;color:#17606f}
.badge{display:inline-flex;align-items:center;gap:.4rem;border:1px solid;border-radius:6px;padding:.15rem .6rem;font:600 .8rem var(--ui);letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.badge.ok{background:#e9f5ee;color:#1c6a45;border-color:#b9dfc8}
.badge.bad{background:#fbe9e7;color:#9a2a20;border-color:#efc0ba}
.badge.off{background:var(--fog);color:var(--ink-2);border-color:var(--line)}
.link-btn{font:500 1rem var(--ui);background:none;border:0;color:var(--ink-2);cursor:pointer;display:inline-flex;align-items:center;gap:.35rem;padding:.4rem .3rem;min-height:36px;border-radius:6px}
.link-btn:hover{color:var(--ink)}
.link-btn:focus-visible{outline:3px solid var(--route);outline-offset:2px}
.modal{border:0;border-radius:14px;padding:0;width:min(34rem,calc(100vw - 2rem));max-height:calc(100vh - 2rem);color:var(--ink);box-shadow:0 20px 50px rgba(16,34,43,.25)}
.modal.wide{width:min(52rem,calc(100vw - 2rem))}
.modal::backdrop{background:rgba(16,34,43,.45)}
.modal-body{padding:1.2rem 1.3rem;display:flex;flex-direction:column;gap:.8rem}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.modal-head h2{margin:0}
.modal-body>p{margin:0}
.modal-foot{display:flex;justify-content:flex-end;gap:.6rem;margin-top:.4rem}
.edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.edit-part{border:1px solid var(--line);border-radius:10px;padding:.9rem 1rem;display:flex;flex-direction:column;gap:.55rem}
.edit-part.span2{grid-column:1/-1}
.edit-part h3{font:600 1rem var(--ui);margin:0;display:flex;align-items:center;gap:.4rem}
.edit-part .stack{display:flex;flex-direction:column;gap:.55rem}
.edit-part .stack+.stack{border-top:1px solid var(--fog);padding-top:.8rem;margin-top:.3rem}
.edit-part .btn{align-self:flex-start}
.edit-part label{margin-top:0}
.inline{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.inline select,.inline input{width:auto;min-width:0;flex:1 1 10rem}
.inline .btn,.inline form{flex:none}
.edit-grid>*,.modal .row2>*{min-width:0}
.modal .field input{width:100%;min-width:0}
@media (max-width:720px){
  .edit-grid,.row2{grid-template-columns:1fr}
  .list-filters select,.list-filters .btn{flex:1 1 100%}
}
.list-table td.mono,.mono{font-variant-numeric:tabular-nums;letter-spacing:.02em}
.badge.idle{background:#fdf6e3;color:#7a5a00;border-color:#ecd99c}
.steps{margin:0;padding-left:1.2rem;display:flex;flex-direction:column;gap:.35rem}
.err-list{margin:0;padding-left:1.1rem;max-height:14rem;overflow:auto;font-size:.92rem}
.modal input[type=file]{padding:.5rem;width:100%}

/* Live officers: layers, the officer panel, the alert filters */
.map-plate.speeding{background:#e07a00;color:#fff;border-color:#fff}
.map-badge.officer.selected{outline:3px solid var(--ink);outline-offset:2px;z-index:6}
.off-panel{margin:0 0 1rem;padding:.9rem 1rem}
.off-panel:not(:has(.phead)){padding:.7rem 1rem}
.off-panel:has(.phead){display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:.2rem 1.6rem;align-items:start;max-height:min(44vh,400px);overflow:auto}
.off-panel>.phead,.off-panel>.pstat,.off-panel>.plinks,.off-panel>p{grid-column:1/-1}
.off-panel>p{margin:0}
.off-panel .phead{display:flex;justify-content:space-between;gap:.6rem;align-items:flex-start}
.off-panel .phead h2{margin:0 0 .1rem;font-size:1.2rem}
.off-panel .pstat{margin:.1rem 0 .3rem}
.off-panel .psec{border-top:1px solid var(--line);padding:.7rem 0}
.off-panel .psec h3{margin:0 0 .45rem;font-size:.95rem;color:var(--ink-2);text-transform:none}
.off-panel .kv{display:flex;justify-content:space-between;gap:.8rem;padding:.12rem 0}
.off-panel .kv .k{color:var(--muted)}
.off-panel .kv .v{text-align:right;word-break:break-word}
.off-panel .plist{list-style:none;margin:0;padding:0}
.off-panel .plist li{padding:.4rem 0;border-top:1px solid var(--line)}
.off-panel .plist li:first-child{border-top:0}
.off-panel .plinks{display:flex;gap:.5rem;flex-wrap:wrap;margin:.6rem 0 0}
.off-panel select{width:100%}
.off-panel .met-list{display:flex;flex-direction:column;gap:.35rem}
.off-panel .met-row .map-plate{position:static;transform:none;flex:none}
.off-map{width:100%}
.off-map.szmap.tall{height:min(72vh,680px)}
.off-filters{display:flex;flex-wrap:wrap;gap:.7rem 1rem;align-items:flex-end;margin:.3rem 0 .8rem}
.report-filters{margin:.8rem 0}
tr.clickrow{cursor:pointer}
tr.clickrow:hover,tr.clickrow:focus-visible{background:var(--fog)}

/* Live officers: the four numbers, and the layer choices as plain checkboxes with a colour dot */
.off-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.75rem;margin:.9rem 0}
.off-tiles .tile b{font-size:1.6rem}
fieldset.laybar{display:flex;flex-wrap:wrap;gap:.45rem 1.4rem;align-items:center;margin:0 0 .9rem;padding:.55rem .9rem .65rem;border:1px solid var(--line);border-radius:10px;background:var(--white)}
fieldset.laybar legend{padding:0 .4rem;color:var(--muted);font-size:.88rem}
.lay{display:inline-flex;align-items:center;gap:.45rem;cursor:pointer;color:var(--ink);font-size:.97rem}
.lay input{width:18px;height:18px;margin:0;accent-color:var(--ink)}
.lay small{color:var(--muted)}
.lay.sep{padding-left:1.4rem;border-left:1px solid var(--line)}
.ldot{width:11px;height:11px;border-radius:50%;display:inline-block;flex:none;background:var(--muted)}
.ldot.wanted{background:var(--alert)}.ldot.speeding{background:#c26a00}.ldot.whitelisted{background:var(--ok)}.ldot.recent{background:var(--ink-2)}.ldot.all{background:#8a979d}
.map-plate.whitelist{background:var(--ok);color:#fff;border-color:#fff}
.gps{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:.92rem}
/* The vehicle page names the vehicle by its number plate at both ends of the trail: where the journey starts and where it is now */
.map-plate.start-label{transform:translateY(-46px);background:#fff;color:var(--ink);border-color:var(--ok);box-shadow:0 0 0 2px var(--ok),0 2px 6px rgba(0,0,0,.3);font-size:.85rem}
.map-plate.here-label{transform:translateY(-16px);z-index:4}
.map-plate.start-label{z-index:4}
/* A small spinner for anything that is waiting on another server */
@keyframes vt-spin{to{transform:rotate(360deg)}}
.spinner{display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:vt-spin .8s linear infinite;vertical-align:-.15em}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:2.4s}}
/* Camera sightings: the thumbnail is a play button, and the clip plays in the card */
.cam-thumb{position:relative;display:block;padding:0;border:0;background:none;cursor:pointer;border-radius:6px}
.cam-play{position:absolute;inset:0;margin:auto;width:28px;height:28px;border-radius:50%;background:rgba(16,34,43,.72);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.8rem;padding-left:2px}
.cam-thumb:hover .cam-play,.cam-thumb:focus-visible .cam-play{background:rgba(16,34,43,.9)}
.cam-media{flex:0 0 auto}
.cam-video{position:relative;width:min(100%,320px)}
.cam-video:has(video){min-width:240px}
.cam-wait{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:.4rem;background:rgba(16,34,43,.55);color:#fff;border-radius:6px;font-weight:600;text-align:center;padding:.5rem}
.cam-wait a{color:#fff}
.cam-row{flex-wrap:wrap}
/* A chosen vehicle on the owner form */
.chip-x{display:inline-flex;gap:.35rem;align-items:center;background:var(--fog);border:1px solid var(--line);border-radius:999px;padding:.15rem .3rem .15rem .55rem;font-size:.92rem}
.chip-x button{border:0;background:none;cursor:pointer;font-size:1.1rem;line-height:1;padding:0 .3rem;color:var(--ink)}
/* A clip that is maximized fills the window over a dark backdrop; Esc or Restore puts it back */
.cam-actions{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.3rem}
.cam-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.82);z-index:1990}
body.cam-lock{overflow:hidden}
.cam-stage{position:relative}
.row-cam{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem}
.row-cam .item{flex:1;min-width:0}
.cam-panel{flex:1 0 100%;padding:.1rem .6rem .7rem}
.cam-snap{position:fixed;inset:2.5vh 2.5vw;z-index:2000;background:#0b1418;border-radius:10px;display:flex;flex-direction:column;padding:.6rem;color:#fff}
.cam-snap .cam-actions{position:absolute;top:.7rem;right:.7rem;margin:0;background:rgba(0,0,0,.6);padding:.3rem;border-radius:8px;z-index:5}
.cam-snap-img{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.cam-snap-img img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px;display:block}
.cam-snap-cap{text-align:center;font-size:.9rem;padding-top:.4rem}
.cam-snap:fullscreen{inset:0;width:100vw;height:100vh;border-radius:0}
.cam-video.cam-max{position:fixed;inset:2.5vh 2.5vw;width:auto;max-width:none;min-width:0;z-index:2000;background:#000;border-radius:10px;padding:0;display:flex;flex-direction:column}
.cam-video.cam-max .cam-stage{flex:1;min-height:0}
.cam-video.cam-max .cam-actions,.cam-video:fullscreen .cam-actions{position:absolute;top:.7rem;right:.7rem;margin:0;background:rgba(0,0,0,.6);padding:.3rem;border-radius:8px;z-index:5}
.cam-video:fullscreen{display:flex;flex-direction:column}
.cam-video:fullscreen .cam-stage{flex:1;min-height:0}
.cam-video.cam-max video{width:100% !important;height:100% !important;max-height:none !important;object-fit:contain;border-radius:10px}
.cam-video:fullscreen{width:100vw;max-width:none;background:#000}
.cam-video:fullscreen video{width:100% !important;height:100% !important;max-height:none !important;object-fit:contain}

