/* ================= ParkGrid admin additions (built on the team's styles.css) ================= */
[hidden]{ display:none !important; }
.boot{ position:fixed; inset:0; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:14px; }
.page{ padding:22px 26px; overflow-x:hidden; }
/* Sidebar stays in view while the page scrolls (scrolls itself only if taller than the window). */
.sidebar{ position:sticky; top:0; height:100vh; height:100dvh; overflow-y:auto; }
textarea{
  background:var(--panel-2); border:1px solid var(--border); color:var(--text);
  padding:9px 11px; border-radius:8px; width:100%; font-family:inherit; font-size:inherit; resize:vertical; min-height:70px;
}
textarea:focus{ outline:none; border-color:var(--accent); box-shadow:var(--ring); }
input[type=checkbox]{ width:16px; height:16px; accent-color:var(--accent); }
.hint{ font-size:11.5px; color:var(--muted); margin-top:5px; line-height:1.45; }
.muted{ color:var(--muted); }
.mono{ font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.nowrap{ white-space:nowrap; }
.right{ text-align:right; }
.spacer{ flex:1; }
.btn[disabled]{ opacity:.45; cursor:not-allowed; }
.btn-link{ background:none; border:none; color:#60a5fa; cursor:pointer; padding:0; font-weight:600; }
.btn-link:hover{ text-decoration:underline; }

/* skeleton / empty / error */
.skeleton-wrap{ display:grid; gap:12px; }
.skeleton{ height:54px; border-radius:10px; background:linear-gradient(90deg,var(--panel) 0%,rgba(148,163,184,.10) 50%,var(--panel) 100%); background-size:200% 100%; animation:sk 1.2s linear infinite; }
@keyframes sk{ from{ background-position:200% 0 } to{ background-position:-200% 0 } }
.empty-state{ padding:40px 16px; text-align:center; color:var(--muted); display:flex; flex-direction:column; align-items:center; gap:10px; }
.empty-state .ei{ font-size:30px; }
.empty-state.error{ color:#fca5a5; }

/* modal */
.modal{ max-height:calc(100dvh - 32px); overflow:hidden; }
.modal-error{ color:#f87171; font-size:12.5px; min-height:0; margin-top:6px; }
.modal-error:empty{ display:none; }
.cred-box{ display:grid; gap:10px; margin-top:12px; background:var(--panel-2); border:1px solid var(--border); border-radius:10px; padding:14px; }
.cred-box div{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
.cred-box span{ color:var(--muted); font-size:12px; }
.cred-box code{ font-size:15px; font-weight:700; color:#c7f9cc; user-select:all; }

/* pager */
.pager{ display:flex; align-items:center; gap:8px; justify-content:flex-end; margin-top:14px; flex-wrap:wrap; }
.pager .muted{ margin-right:auto; font-size:12.5px; }

/* tables */
table{ width:100%; border-collapse:collapse; }
th{ text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); padding:10px 10px; border-bottom:1px solid var(--border); white-space:nowrap; }
td{ padding:11px 10px; border-bottom:1px solid rgba(148,163,184,.08); vertical-align:top; }
tr.clickable{ cursor:pointer; }
tr.clickable:hover td{ background:rgba(59,130,246,.06); }
td small, .sub{ color:var(--muted); font-size:11.5px; }
.table-wrap{ overflow-x:auto; }

/* key-value grid */
.kv{ display:grid; grid-template-columns:minmax(120px,auto) 1fr; gap:8px 14px; font-size:13px; }
.kv > span:nth-child(odd){ color:var(--muted); }
.detail-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:18px; }
.section-title{ display:flex; align-items:center; gap:10px; margin:22px 0 10px; }
.section-title h3{ margin:0; font-size:15px; }
.back-link{ display:inline-flex; gap:6px; align-items:center; color:#60a5fa; cursor:pointer; margin-bottom:14px; font-weight:600; font-size:13px; }

/* KPI tiles — extra variants */
.kpi-grid.kpi-6{ grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); }
.kpi .value.small{ font-size:18px; }

/* map picker */
.map-picker{ height:260px; border-radius:10px; border:1px solid var(--border); overflow:hidden; margin-bottom:10px; }
.map-large{ height:420px; border-radius:12px; border:1px solid var(--border); overflow:hidden; }
.leaflet-container{ background:#0f172a; font-family:inherit; }
.leaflet-popup-content{ font-size:12.5px; }

/* checkbox grid */
.check-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:6px 14px; max-height:260px; overflow-y:auto; padding:10px; background:var(--panel-2); border:1px solid var(--border); border-radius:8px; }
.check-grid label{ display:flex; gap:8px; align-items:flex-start; font-size:12.5px; cursor:pointer; line-height:1.35; }
.check-grid label input{ margin-top:1px; flex-shrink:0; }

/* layout editor */
.floor-card{ background:var(--panel-2); border:1px solid var(--border); border-radius:12px; padding:14px; margin-bottom:14px; }
.floor-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.floor-head h4{ margin:0; font-size:14px; }
.lane-row{ border-top:1px dashed rgba(148,163,184,.16); padding-top:10px; margin-top:10px; }
.lane-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12.5px; margin-bottom:8px; }
.lane-head b{ font-size:13px; }
.slot-grid.compact{ grid-template-columns:repeat(auto-fill,minmax(86px,1fr)); gap:8px; }
.slot.reserved{ background:rgba(59,130,246,.18); border-color:rgba(59,130,246,.55); }
.slot.inactive{ opacity:.35; }
.slot .sid{ font-size:11.5px; }

/* QR print sheet preview */
.qr-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.qr-cell{ background:#fff; color:#111; border-radius:10px; padding:10px; text-align:center; }
.qr-cell svg{ width:100%; height:auto; }
.qr-cell b{ display:block; font-size:15px; margin-top:4px; }
.qr-cell small{ color:#555; font-size:11px; }

/* verdict (ANPR / plate check) */
.verdict{ border-radius:12px; padding:14px 16px; border:1px solid; display:flex; gap:12px; align-items:center; margin:12px 0; }
.verdict .vi{ font-size:26px; }
.verdict b{ font-size:16px; display:block; }
.verdict.valid{ border-color:rgba(34,197,94,.6); background:rgba(34,197,94,.10); }
.verdict.expired, .verdict.unregistered{ border-color:rgba(239,68,68,.6); background:rgba(239,68,68,.10); }
.verdict.upcoming{ border-color:rgba(59,130,246,.6); background:rgba(59,130,246,.10); }
.verdict.unpaid, .verdict.no_booking{ border-color:rgba(245,158,11,.6); background:rgba(245,158,11,.10); }
.plate-chip{ display:inline-block; font-family:ui-monospace,Menlo,Consolas,monospace; font-weight:800; letter-spacing:.08em; padding:4px 10px; border-radius:6px; background:#fef08a; color:#1c1917; border:2px solid #1c1917; }

/* perms matrix */
.perm-group{ margin-bottom:8px; }
.dropzone{ border:2px dashed var(--border); border-radius:12px; padding:22px; text-align:center; color:var(--muted); cursor:pointer; }
.dropzone:hover{ border-color:var(--accent); color:var(--text); }
.scan-preview{ max-width:100%; max-height:260px; border-radius:10px; margin-top:10px; display:block; }

.sidebar-footer .who{ color:var(--text); font-weight:600; }
.role-pill{ font-size:10.5px; padding:2px 8px; border-radius:999px; background:var(--accent-soft); color:#93c5fd; font-weight:700; }

@media (max-width:640px){
  .page{ padding:14px; }
  .kv{ grid-template-columns:1fr; gap:2px 0; }
  .kv > span:nth-child(odd){ margin-top:8px; }
  .map-large{ height:300px; }
  th, td{ padding:9px 8px; }
}

a{ color:#60a5fa; text-decoration:none; }
a:hover{ text-decoration:underline; }
.dropzone{ display:block; margin-top:6px; }
@media (max-width:640px){ .kpi-grid.kpi-6{ grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* ---------- Live Zones ---------- */
.zone-card{ margin-top:14px; }
.zone-card.lz-offline{ opacity:.85; border-color:rgba(239,68,68,.35); }
.zone-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.lz-meta{ margin:6px 0 10px; }
.lz-row{ cursor:pointer; }
.lz-row:hover td{ background:var(--panel-2); }
.lz-row.lz-dim td{ opacity:.55; }
.lz-row.lz-critical td:first-child{ box-shadow:inset 3px 0 0 var(--red); }
.lz-row.lz-attention td:first-child{ box-shadow:inset 3px 0 0 var(--amber); }
.lz-cam{ font-weight:800; padding:4px 10px; border-radius:999px; font-size:13px; }
.lz-cam.on{ background:rgba(34,197,94,.15); color:var(--green); }
.lz-cam.off{ background:rgba(239,68,68,.15); color:var(--red); }
.lz-grid{ display:grid; grid-template-columns:minmax(220px,320px) 1fr; gap:14px; margin:8px 0; }
@media (max-width:760px){ .lz-grid{ grid-template-columns:1fr; } }
.lz-preview{ position:relative; background:#05070b; border:1px solid var(--border); border-radius:10px; min-height:160px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.lz-preview img{ width:100%; height:100%; max-height:360px; object-fit:contain; display:block; }
.lz-preview .cam-live{ position:absolute; top:8px; left:8px; }
.lz-preview .lz-read-age{ position:absolute; left:8px; bottom:8px; z-index:2; padding:2px 7px; border-radius:6px; background:rgba(5,7,11,.78); color:#e6e9ef; font-size:11px; pointer-events:none; }
.lz-nopreview{ color:var(--muted); font-size:13px; padding:20px; text-align:center; }
.lz-preview img{ transform-origin:center; transition:transform .12s ease; touch-action:none; user-select:none; }
.lz-preview.lz-zoomed img{ cursor:grab; transition:none; }
.lz-preview.lz-zoomed img:active{ cursor:grabbing; }
.lz-ctl{ position:absolute; top:8px; right:8px; z-index:2; display:flex; flex-direction:column; border:1px solid rgba(255,255,255,.18); border-radius:6px; overflow:hidden; }
.lz-ctl button{ width:28px; height:28px; padding:0; border:0; border-bottom:1px solid rgba(255,255,255,.12); background:rgba(15,23,42,.82); color:#e2e8f0; font:600 16px/28px inherit; cursor:pointer; }
.lz-ctl button:last-child{ border-bottom:0; }
.lz-ctl button:hover:not(:disabled){ background:rgba(30,41,59,.95); }
.lz-ctl button:disabled{ opacity:.4; cursor:default; }
.lz-preview:fullscreen{ border:0; border-radius:0; }
.lz-preview:fullscreen img{ max-height:none; }
/* Slot occupancy dots over the camera preview (one per outlined Slot) */
.lz-dots{ position:absolute; pointer-events:none; z-index:1; }
.lz-dot{ position:absolute; width:12px; height:12px; margin:-6px 0 0 -6px; border-radius:50%; border:2px solid rgba(255,255,255,.85); box-shadow:0 0 0 1px rgba(0,0,0,.35); pointer-events:auto; }
.lz-preview.lz-zoomed .lz-dot{ pointer-events:none; }
.lz-dot-available{ background:var(--green); }
.lz-dot-occupied{ background:var(--red); }
.lz-dot-uncertain{ background:var(--amber); }
.lz-dot-reserved{ background:#60a5fa; }
.lz-dot-unknown{ background:#94a3b8; }
.lz-dot-unavailable{ background:#475569; }
/* Plate boxes over the analysed frame (fractions of the frame, laid out like the dots) */
.lz-boxes{ position:absolute; pointer-events:none; z-index:1; }
.lz-box{ position:absolute; box-sizing:border-box; border:2px solid; border-radius:2px; box-shadow:0 0 0 1px rgba(0,0,0,.45); }
.lz-box-label{ position:absolute; left:-2px; bottom:100%; margin-bottom:2px; padding:1px 5px; border-radius:3px; white-space:nowrap; font:700 11px/16px ui-monospace, SFMono-Regular, Menlo, monospace; color:#fff; }
.lz-box-below .lz-box-label{ bottom:auto; top:100%; margin:2px 0 0; }
.lz-box-end .lz-box-label{ left:auto; right:-2px; }
/* Zoom scales the picture and the boxes, never the labels (anchored where they attach). */
.lz-box-label{ transform:scale(calc(1 / var(--lz-zoom, 1))); transform-origin:left bottom; }
.lz-box-below .lz-box-label{ transform-origin:left top; }
.lz-box-end .lz-box-label{ transform-origin:right bottom; }
.lz-box-end.lz-box-below .lz-box-label{ transform-origin:right top; }
.lz-box-confirmed{ border-color:#22c55e; }
.lz-box-confirmed .lz-box-label{ background:#15803d; }
.lz-box-uncertain{ border-color:#ef4444; }
.lz-box-uncertain .lz-box-label{ background:#b91c1c; }
/* Amber: unconfirmed plate for which the angle-correction shadow suggests a reading (never authoritative). */
.lz-box-recovered{ border-color:#f59e0b; border-style:dashed; }
.lz-box-recovered .lz-box-label{ background:#b45309; }
.lz-box-label .lz-l1, .lz-box-label .lz-l2, .lz-box-label .lz-l3{ display:block; }
.lz-box-label::before{ content:attr(data-n); float:left; margin-right:4px; padding:0 4px; border-radius:3px; background:rgba(0,0,0,.35); }
.lz-preview.lz-compact .lz-box-label .lz-l2, .lz-preview.lz-compact .lz-box-label .lz-l3{ display:none; }
.lz-boxlist{ margin:6px 0 0; padding:0; list-style:none; display:grid; gap:3px; font-size:12px; }
.lz-boxlist li{ padding:3px 6px; border-left:3px solid; border-radius:3px; background:var(--surface-2, rgba(127,127,127,.08)); }
.lz-boxlist li b{ display:inline-block; min-width:14px; }
.lz-boxlist-confirmed{ border-color:#22c55e; }
.lz-boxlist-uncertain{ border-color:#ef4444; }
.lz-boxlist-recovered{ border-color:#f59e0b; border-left-style:dashed; }
.lz-boxlist .lz-note{ color:#b45309; font-weight:600; }
.lz-box-label .lz-l2{ font-weight:500; font-size:10px; line-height:13px; opacity:.92; }
.lz-box-label .lz-l3{ font-weight:600; font-size:10px; line-height:13px; color:#fde68a; }
/* The plate's own vehicle (only when its category is reliable) */
.lz-vbox{ position:absolute; box-sizing:border-box; border:1px dashed; border-radius:3px; opacity:.75; }
.lz-vbox-confirmed{ border-color:#22c55e; }
.lz-vbox-uncertain{ border-color:#ef4444; }
.lz-vbox-recovered{ border-color:#f59e0b; }
.lz-frame-msg{ position:absolute; inset:0; z-index:1; display:flex; align-items:center; justify-content:center; padding:20px 46px; text-align:center; color:var(--muted); font-size:13px; }
.lz-frame-msg[hidden]{ display:none; }
/* The analysed frame stays invisible (no broken-image icon) until its own frame is confirmed. */
.lz-preview img[data-analysis]:not([data-frame-ok="1"]){ visibility:hidden; }
/* Caption under the preview: Live / Plate boxes switch, analysed time + legend */
.lz-bar{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 10px; margin-top:6px; }
.lz-legend{ display:flex; flex-wrap:wrap; align-items:center; gap:2px 12px; color:var(--muted); }
.lz-legend > span{ display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
/* Quick reads under the live picture (zone_worker --instant) */
.lz-instant:empty{ display:none; }
.lz-instant{ margin-top:6px; }
.lz-instant .lz-legend > span.muted{ white-space:normal; }
.lz-key{ display:inline-block; width:10px; height:10px; border:2px solid; border-radius:2px; }
.lz-key-confirmed{ border-color:#22c55e; }
.lz-key-uncertain{ border-color:#ef4444; }
.lz-key-recovered{ border-color:#f59e0b; border-style:dashed; }
.lz-mode .tab{ padding:4px 10px; font-size:12px; }
.lz-slots{ margin-top:6px; }
/* Slot-area editor (Cameras -> Slots) */
.sz-grid{ display:grid; grid-template-columns:minmax(0,2fr) minmax(200px,1fr); gap:14px; }
@media (max-width:760px){ .sz-grid{ grid-template-columns:1fr; } }
.sz-stage{ position:relative; background:#05070b; border:1px solid var(--border); border-radius:10px; overflow:hidden; min-height:160px; }
.sz-stage img{ display:block; width:100%; height:auto; cursor:crosshair; user-select:none; }
.sz-stage svg{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.sz-stage polygon{ fill:rgba(34,197,94,.18); stroke:#22c55e; stroke-width:.004; }
.sz-stage polygon.sz-cur{ fill:rgba(59,130,246,.25); stroke:#3b82f6; }
.sz-stage polyline.sz-draft{ fill:none; stroke:#f59e0b; stroke-width:.004; stroke-dasharray:.012 .008; }
.sz-stage circle{ fill:#f59e0b; }
.sz-stage text{ font-size:.03px; fill:#fff; text-anchor:middle; dominant-baseline:middle; paint-order:stroke; stroke:#000; stroke-width:.006px; }
.lz-block{ margin-bottom:10px; }
.lz-kv{ margin-top:4px; }
.lz-staff{ border:1px solid rgba(239,68,68,.35); border-radius:10px; padding:8px 10px; }
.chip.lz-unconfirmed{ border-style:dashed; color:var(--muted); }


/* Admin location modal map containment fix */
.modal-bg {
  z-index: 2000;
  overflow: hidden;
  isolation: isolate;
}
.modal {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(640px, 94vw);
}
.modal > h3,
.modal > .modal-error,
.modal > .modal-actions {
  flex-shrink: 0;
}
.modal-body {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}
.map-picker {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 220px;
  box-sizing: border-box;
  isolation: isolate;
  z-index: 0;
}

/* ---------- Vehicle analytics (dashboard) ----------
   Vehicle-type colours: validated categorical palette (adjacent CVD ΔE ≥ 8.4,
   normal-vision ≥ 19) stepped separately for Night and Day; heatmap is one
   blue hue, light → dark. */
:root{
  --va-car:#3987e5; --va-bike:#d95926; --va-auto:#199e70; --va-heavy:#c98500; --va-other:#d55181;
  --va-seq:#3987e5; --va-band:rgba(200,245,66,.07);
}
:root[data-theme="light"]{
  --va-car:#2a78d6; --va-bike:#eb6834; --va-auto:#1baf7a; --va-heavy:#eda100; --va-other:#e87ba4;
  --va-seq:#2a78d6; --va-band:rgba(42,120,214,.07);
}
.va-head{ display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; align-items:flex-start; margin-bottom:14px; }
.va-head h3{ margin:0; }
.va-filters{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.va-filters select, .va-filters input{ width:auto; min-width:0; }
.va-note{ border:1px dashed var(--border); border-radius:12px; padding:10px 14px; margin-bottom:14px; color:var(--muted); font-size:13px; }
.va-kpis{ margin-bottom:8px; }
.va-sub{ margin:8px 0 10px; font-size:13px; color:var(--muted); font-weight:600; }
.va-types{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; }
.va-type{ display:flex; gap:10px; align-items:flex-start; border:1px solid var(--border); border-radius:12px; padding:10px 12px; background:var(--panel-2); }
.va-swatch{ width:10px; height:10px; border-radius:3px; margin-top:5px; flex:none; }
.va-type-name{ font-weight:600; font-size:13.5px; }
.va-type-name small, .va-type-val small{ color:var(--muted); font-weight:400; }
.va-type-val{ font-size:13px; margin-top:2px; }
.va-inner{ background:var(--panel-2); }
.va-panel-head{ display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; align-items:center; margin-bottom:10px; }
.va-panel-head h3{ margin:0; }
.va-tabs .tab{ padding:5px 10px; font-size:12.5px; }
.va-details{ margin-top:6px; font-size:13px; }
.va-details summary{ cursor:pointer; color:var(--muted); }
.va-table{ margin-top:10px; max-height:420px; overflow:auto; }
.va-heat-wrap{ overflow-x:auto; }
.va-heat{ border-collapse:separate; border-spacing:2px; width:100%; min-width:560px; font-size:10.5px; }
.va-heat th{ color:var(--muted); font-weight:500; white-space:nowrap; padding:0 4px 0 0; text-align:left; background:none; }
.va-heat thead th{ text-align:center; padding:0 0 4px; }
.va-heat td{ height:24px; min-width:18px; border-radius:4px; text-align:center; padding:0; cursor:default; }
.va-l-1{ background:transparent; outline:1px dashed var(--border); outline-offset:-1px; }
.va-l0{ background:color-mix(in srgb, var(--va-seq) 7%, var(--panel)); }
.va-l1{ background:color-mix(in srgb, var(--va-seq) 22%, var(--panel)); color:var(--text); }
.va-l2{ background:color-mix(in srgb, var(--va-seq) 40%, var(--panel)); color:var(--text); }
.va-l3{ background:color-mix(in srgb, var(--va-seq) 60%, var(--panel)); color:#fff; }
.va-l4{ background:color-mix(in srgb, var(--va-seq) 80%, var(--panel)); color:#fff; }
.va-l5{ background:var(--va-seq); color:#fff; font-weight:600; }
.va-heat-legend{ display:flex; align-items:center; gap:4px; margin-top:8px; font-size:11.5px; color:var(--muted); flex-wrap:wrap; }
.va-heat-legend i{ display:inline-block; width:16px; height:12px; border-radius:3px; }
.va-heat-legend span{ margin:0 4px; }
.va-empty{ display:flex; align-items:center; justify-content:center; }

/* ---------- Cameras: card list + vehicle count popup ---------- */
.cc-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(320px,100%),1fr)); gap:14px; }
.cc{ border:1px solid var(--border); border-radius:14px; background:var(--panel-2); padding:14px; display:flex; flex-direction:column; gap:10px; min-width:0; }
.cc-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.cc-name{ display:flex; gap:10px; align-items:flex-start; min-width:0; }
.cc-name b{ display:block; font-size:14.5px; overflow-wrap:anywhere; }
.cc-name small{ display:block; color:var(--muted); font-size:12.5px; margin-top:2px; }
.cc-dot{ width:9px; height:9px; border-radius:50%; margin-top:6px; flex:none; }
.cc-dot.cc-on{ background:var(--green); box-shadow:0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.cc-dot.cc-warn{ background:var(--amber); }
.cc-dot.cc-off{ background:var(--muted); }
.cc-badge{ font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:999px; white-space:nowrap; border:1px solid var(--border); }
.cc-badge.cc-on{ color:var(--green); border-color:color-mix(in srgb, var(--green) 40%, transparent); }
.cc-badge.cc-warn{ color:var(--amber); border-color:color-mix(in srgb, var(--amber) 40%, transparent); }
.cc-badge.cc-off{ color:var(--muted); }
.cc-count{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; padding:10px 12px; border-radius:10px; background:var(--hover); }
.cc-count b{ font-size:22px; line-height:1; }
.cc-count span{ font-size:13px; }
.cc-count small{ color:var(--muted); font-size:12px; margin-left:auto; }
.cc-count.cc-none{ color:var(--muted); font-size:13px; }
.cc-meta{ display:flex; flex-wrap:wrap; gap:6px 14px; color:var(--muted); font-size:12.5px; }
.cc-actions{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; border-top:1px solid var(--line); padding-top:10px; }
.cc-actions .spacer{ flex:1; }
.btn-icon{ padding-left:9px; padding-right:9px; }

.cm-grid{ display:grid; grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr); gap:20px; align-items:start; }
@media (max-width:820px){ .cm-grid{ grid-template-columns:1fr; } }
.cm-stage{ align-self:start; }
.cm-live{ position:absolute; top:8px; right:8px; padding:3px 8px; border-radius:999px; background:rgba(220,38,38,.9); color:#fff; font-size:11px; font-weight:800; letter-spacing:.04em; pointer-events:none; }
.cm-live.stale{ background:rgba(71,85,105,.9); }
.cm-legend{ display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:8px; font-size:12px; color:var(--muted); }
.cm-legend i{ display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:5px; vertical-align:-1px; }
.cm-legend i.cm-dash{ background:none; border:1.5px dashed #facc15; }
.cm-empty{ aspect-ratio:16/9; border:1.5px dashed var(--border); border-radius:12px; background:var(--panel-2); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:6px; padding:20px; color:var(--muted); font-size:13px; }
.cm-empty b{ color:var(--text); font-size:15px; }
.cm-empty span{ max-width:340px; }
.cm-empty-icon{ font-size:30px; opacity:.7; }
.cm-side h4{ margin:0 0 8px; font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.cm-side h4:not(:first-child){ margin-top:18px; }
.cm-note{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:12px 14px; border-radius:12px; background:var(--hover); border:1px solid var(--border); font-size:13px; }
.cm-note span{ color:var(--muted); }
.cm-note .btn{ margin-top:4px; }
.cm-now{ display:flex; flex-direction:column; gap:8px; }
.cm-now-total{ display:flex; align-items:baseline; gap:8px; }
.cm-now-total b{ font-size:30px; line-height:1; }
.cm-now-total span{ color:var(--muted); font-size:13px; }
.cm-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.cm-chip{ display:inline-flex; align-items:center; gap:5px; font-size:12.5px; padding:4px 9px; border-radius:999px; border:1px solid var(--border); background:var(--panel-2); }
.cm-chip i{ width:8px; height:8px; border-radius:2px; }
.cm-table{ border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.cm-row{ display:grid; grid-template-columns:minmax(0,1fr) 70px 70px; gap:8px; align-items:center; padding:9px 12px; font-size:13.5px; border-top:1px solid var(--line); }
.cm-row:first-child{ border-top:0; }
.cm-row > :not(:first-child){ text-align:right; font-variant-numeric:tabular-nums; }
.cm-row small{ display:block; color:var(--muted); font-size:11.5px; }
.cm-head{ background:var(--thead-bg); color:var(--muted); font-size:12px; font-weight:600; }
.cm-hi{ background:color-mix(in srgb, var(--va-car) 8%, transparent); }
.cm-total{ background:var(--hover); }
.cm-total > :first-child{ font-weight:700; }
.cm-total b{ font-size:16px; color:var(--green); }
.cm-status{ display:flex; gap:8px; align-items:flex-start; margin-top:10px; padding:10px 12px; border-radius:10px; font-size:13px; border:1px solid var(--border); }
.cm-status.warn{ border-color:color-mix(in srgb, var(--amber) 50%, transparent); background:color-mix(in srgb, var(--amber) 8%, transparent); }
.cm-status.ok{ border-color:color-mix(in srgb, var(--green) 40%, transparent); background:color-mix(in srgb, var(--green) 7%, transparent); }
.modal:has(.cm-grid){ width:min(1040px, 94vw); max-width:1040px; }

/* ---------- Parking area editor (zoom, pan, full screen, draggable corners) ---------- */
.modal:has(.pa-editor){ width:min(1100px, 96vw); max-width:1100px; }
.pa-editor{ display:flex; flex-direction:column; gap:10px; }
.pa-editor:fullscreen{ background:var(--bg); padding:16px; height:100vh; box-sizing:border-box; }
.pa-editor:fullscreen .pa-view{ max-height:none; flex:1; }
.pa-toolbar{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.pa-group{ display:flex; align-items:center; gap:6px; }
.pa-zoom{ min-width:48px; text-align:center; font-size:13px; font-variant-numeric:tabular-nums; color:var(--muted); }
.pa-info{ margin-left:auto; font-size:13px; color:var(--muted); }
.pa-info.ok{ color:var(--green); font-weight:600; }
.pa-view{ position:relative; overflow:auto; max-height:62vh; border:1px solid var(--border); border-radius:12px; background:#05070b; cursor:crosshair; overscroll-behavior:contain; }
.pa-view.zoomed{ cursor:grab; }
.pa-view.panning{ cursor:grabbing; }
.pa-canvas{ position:relative; width:100%; margin:0 auto; touch-action:none; user-select:none; }
.pa-editor:fullscreen .pa-view{ max-height:calc(100vh - 130px); }
.pa-canvas img{ display:block; width:100%; height:auto; pointer-events:none; }
.pa-canvas svg{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.pa-poly{ fill:rgba(250,204,21,.16); stroke:#facc15; stroke-width:2px; vector-effect:non-scaling-stroke; }
.pa-draft{ fill:none; stroke:#facc15; stroke-width:2px; stroke-dasharray:6 4; vector-effect:non-scaling-stroke; }
.pa-handles{ position:absolute; inset:0; pointer-events:none; }
.pa-h{ position:absolute; width:22px; height:22px; margin:-11px 0 0 -11px; border-radius:50%; background:#facc15; color:#1a1400; font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; box-shadow:0 0 0 2px rgba(0,0,0,.55); pointer-events:auto; cursor:move; }
.pa-h:hover{ transform:scale(1.15); }
.pa-help{ margin:0; }
.cm-head small{ display:block; font-weight:400; font-size:10.5px; }
.cm-kinds{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; margin-bottom:10px; }
.cm-kinds > div{ border:1px solid var(--border); border-radius:10px; padding:8px 6px; text-align:center; background:var(--panel-2); position:relative; }
.cm-kinds i{ position:absolute; top:6px; left:6px; width:7px; height:7px; border-radius:2px; }
.cm-kinds b{ display:block; font-size:18px; line-height:1.1; }
.cm-kinds span{ display:block; font-size:11px; color:var(--muted); line-height:1.25; }
.cm-row{ grid-template-columns:minmax(0,1fr) 96px 96px; }
