*{box-sizing:border-box;margin:0;padding:0}
:root{--green:#147A36;--green-d:#0f5e29;--green-l:#DFFFEC;--ink:#1f2a24;--muted:#66706a;--line:#e3e6e4;--bg:#f4f5f4;--danger:#b42318;--amber:#b06b00}
html,body{height:100%}
body{font-family:'Segoe UI',Arial,sans-serif;background:var(--bg);color:var(--ink);display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden;font-size:13px}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
[hidden]{display:none!important}
:focus-visible{outline:2px solid #18AA4B;outline-offset:2px}

#header{background:var(--green);color:#fff;padding:9px 16px;display:flex;align-items:center;gap:14px;flex-shrink:0;box-shadow:0 2px 6px rgba(0,0,0,.25);flex-wrap:wrap}
#header h1{font-size:17px;font-weight:700;letter-spacing:.2px}
#header .sub{font-size:12px;opacity:.88;margin-top:1px}
.header-actions{margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.admin-bar{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.hbtn{background:#fff;color:var(--green);border:0;border-radius:7px;padding:6px 11px;font-size:12px;font-weight:600;white-space:nowrap}
.hbtn:hover{background:#eefaf2}
.hbtn.ghost{background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.45)}
.hbtn.ghost:hover{background:rgba(255,255,255,.24)}
.menu-wrap{position:relative}
.menu{position:absolute;right:0;top:calc(100% + 6px);background:#fff;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.18);min-width:170px;padding:5px;z-index:3000}
.menu button{display:block;width:100%;text-align:left;background:none;border:0;padding:8px 10px;border-radius:5px;color:var(--ink)}
.menu button:hover{background:#f1f4f2}
#counter{background:rgba(255,255,255,.18);border-radius:8px;padding:4px 12px;text-align:center;min-width:72px}
#counter .num{font-size:20px;font-weight:700;line-height:1.05;font-variant-numeric:tabular-nums}
#counter .lbl{font-size:10px;opacity:.8}

#controls{background:#fff;border-bottom:1px solid #ddd;padding:7px 14px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;flex-shrink:0;box-shadow:0 1px 4px rgba(0,0,0,.06);position:relative;z-index:1100}
.ctrl-label{font-size:11px;font-weight:600;color:#555;white-space:nowrap}
.brand-btns{display:flex;flex-wrap:wrap;gap:5px}
.brand-btn{border:2px solid #ccc;background:#fff;border-radius:20px;padding:3px 10px;font-size:11px;transition:background .15s,color .15s;white-space:nowrap;font-weight:600}
.brand-btn[data-brand=ALL]{border-color:var(--green);color:var(--green)}
.brand-btn.active{color:#fff!important;border-color:transparent!important}
.brand-btn[data-brand=ALL].active{background:var(--green)}
#controls select{border:1px solid #ccc;border-radius:6px;padding:4px 8px;font-size:12px;background:#fff}
#search-box{border:1px solid #ccc;border-radius:6px;padding:4px 10px;font-size:12px;width:220px}
.sep{width:1px;background:#e0e0e0;height:24px;margin:0 2px;flex-shrink:0}
.cbtn{border:1px solid #bbb;background:#f5f5f5;border-radius:6px;padding:4px 10px;font-size:12px;white-space:nowrap}
.cbtn:hover{background:#e8e8e8}
.cbtn[aria-pressed=true]{background:var(--green);border-color:var(--green);color:#fff}

#main{flex:1;min-height:0;position:relative;display:flex}
#map{flex:1;min-width:0}
#list-panel,#drawer{background:#fff;display:flex;flex-direction:column;min-height:0;z-index:1050;box-shadow:0 0 18px rgba(0,0,0,.12)}
#list-panel{width:340px;border-right:1px solid var(--line)}
#drawer{width:410px;border-left:1px solid var(--line)}
.panel-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--line);background:#fafbfa;font-size:14px}
.xbtn{background:none;border:0;font-size:16px;color:var(--muted);padding:2px 6px;border-radius:5px}
.xbtn:hover{background:#eef0ef;color:var(--ink)}
.list-body{overflow:auto;flex:1}
.list-row{display:flex;gap:8px;align-items:flex-start;padding:8px 14px;border-bottom:1px solid #f0f1f0;cursor:pointer}
.list-row:hover{background:#f6faf7}
.list-row .ln{font-weight:600;font-size:12.5px;line-height:1.3}
.list-row .lt{font-size:11px;color:var(--muted);margin-top:1px}
.list-row .lb{display:flex;flex-wrap:wrap;gap:3px;margin-top:4px}
.list-row .grow{flex:1;min-width:0}
.dotb{width:8px;height:8px;border-radius:50%;display:inline-block}
.tag{font-size:10px;font-weight:700;border-radius:10px;padding:1px 7px;background:#fff4e0;color:var(--amber);white-space:nowrap}
.tag.grey{background:#eef0ef;color:#555}
.list-more{padding:10px 14px;color:var(--muted);font-size:12px}

.drawer-body{overflow:auto;flex:1;padding:12px 16px 20px;display:flex;flex-direction:column;gap:10px}
.drawer-body label{display:flex;flex-direction:column;gap:3px;font-size:11.5px;font-weight:600;color:#444}
.drawer-body input,.drawer-body textarea,.modal input,.modal select,.modal textarea{border:1px solid #cfd4d1;border-radius:6px;padding:6px 8px;font-size:13px;font-weight:400;background:#fff;width:100%}
.drawer-body input:focus,.drawer-body textarea:focus,.modal input:focus,.modal select:focus{border-color:#18AA4B;outline:none;box-shadow:0 0 0 3px rgba(24,170,75,.15)}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.inline{display:flex;gap:5px}
.inline input{flex:1;min-width:0}
.mini{border:1px solid #cfd4d1;background:#f6f7f6;border-radius:6px;padding:5px 9px;font-size:11.5px;font-weight:600;white-space:nowrap}
.mini:hover{background:#ecefed}
.mini.on{background:var(--green);color:#fff;border-color:var(--green)}
.hint{font-size:11.5px;color:var(--muted);font-weight:400;line-height:1.45}
.brand-checks{border:1px solid var(--line);border-radius:8px;padding:8px 10px}
.brand-checks legend{font-size:11.5px;font-weight:600;color:#444;padding:0 4px}
#brand-checks{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px}
#brand-checks label{flex-direction:row;align-items:center;gap:7px;font-weight:500;font-size:12.5px;color:var(--ink)}
#brand-checks input{width:auto}
.adv{border:1px solid var(--line);border-radius:8px;padding:8px 10px}
.adv summary{font-size:12px;font-weight:600;cursor:pointer;color:#444}
.adv[open]{display:flex;flex-direction:column;gap:8px}
.meta{font-size:11px;color:var(--muted)}
.drawer-actions{display:flex;gap:8px;margin-top:4px}
.danger-zone{display:flex;gap:8px;border-top:1px solid var(--line);padding-top:10px;margin-top:6px}
.pbtn{background:var(--green);color:#fff;border:0;border-radius:7px;padding:8px 14px;font-weight:600;font-size:13px}
.pbtn:hover{background:var(--green-d)}
.pbtn:disabled{opacity:.55;cursor:default}
.sbtn{background:#fff;border:1px solid #cfd4d1;border-radius:7px;padding:8px 14px;font-weight:600;font-size:13px}
.sbtn:hover{background:#f4f6f5}
.dbtn{background:#fff;border:1px solid #f0c7c3;color:var(--danger);border-radius:7px;padding:8px 14px;font-weight:600;font-size:13px}
.dbtn:hover{background:#fdf1f0}
.modal .dbtn#confirm-ok{background:var(--danger);color:#fff;border-color:var(--danger)}
.notice{background:#fff7e6;border:1px solid #f3d9a4;color:#7a4a00;border-radius:7px;padding:7px 10px;font-size:12px}
.notice.ok{background:var(--green-l);border-color:#a9e3bf;color:var(--green)}
.err{color:var(--danger);font-size:12px;min-height:16px}

.leaflet-popup-content-wrapper{border-radius:10px;box-shadow:0 4px 18px rgba(0,0,0,.2);padding:0;overflow:hidden;border:none}
.leaflet-popup-content{margin:0!important;padding:0;width:290px!important}
.popup-header{background:var(--green);color:#fff;padding:10px 14px 8px}
.popup-header .pname{font-weight:700;font-size:13px;line-height:1.3}
.popup-header .ptown{font-size:11px;opacity:.88;margin-top:2px}
.popup-body{padding:10px 14px}
.popup-row{display:flex;gap:6px;margin-bottom:4px;align-items:baseline;font-size:12px;line-height:1.4}
.popup-row .lbl{color:#888;width:54px;flex-shrink:0;font-size:11px}
.popup-row .val{color:#222;word-break:break-word;flex:1}
.popup-row a{color:var(--green);text-decoration:none}
.popup-row a:hover{text-decoration:underline}
.brand-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px;padding-top:8px;border-top:1px solid #eee}
.chip{border-radius:12px;padding:2px 9px;font-size:10px;font-weight:600;color:#fff;white-space:nowrap}
.pop-edit{margin-top:9px;width:100%;background:#f3f8f5;border:1px solid #cfe7d8;color:var(--green);border-radius:6px;padding:6px;font-weight:600;font-size:12px}
.pop-edit:hover{background:#e6f3eb}

#legend{position:absolute;bottom:28px;right:10px;z-index:1000;background:rgba(255,255,255,.96);border-radius:10px;padding:11px 15px;box-shadow:0 2px 12px rgba(0,0,0,.15);min-width:165px;font-size:11px;max-height:calc(100% - 50px);overflow-y:auto}
#drawer:not([hidden]) ~ #legend,#main.drawer-open #legend{right:420px}
#legend h4{font-size:11px;font-weight:700;color:#333;margin-bottom:7px;border-bottom:1px solid #eee;padding-bottom:4px}
.leg-row{display:flex;align-items:center;gap:7px;margin-bottom:5px}
.leg-dot{width:11px;height:11px;border-radius:50%;flex-shrink:0;border:1.5px solid rgba(0,0,0,.12)}
.leg-star{font-size:14px;flex-shrink:0;line-height:1}
.leg-note{font-size:9.5px;color:#18AA4B;margin-top:7px;font-weight:600;border-top:1px solid #eee;padding-top:6px}
.leg-toggle{display:none}

.overlay{position:fixed;inset:0;background:rgba(15,25,20,.45);z-index:4000}
.modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.3);z-index:4100;max-height:calc(100dvh - 40px);display:flex;flex-direction:column;width:calc(100vw - 32px)}
.modal.small{max-width:420px;padding:20px 22px}
.modal.small form{display:flex;flex-direction:column;gap:12px}
.modal.small label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600}
.modal.large{max-width:1040px;height:calc(100dvh - 60px)}
.modal h2{font-size:17px}
.modal-head{display:flex;align-items:center;gap:16px;padding:14px 20px;border-bottom:1px solid var(--line)}
.modal-head .xbtn{margin-left:auto}
.modal-body{overflow:auto;flex:1;padding:16px 20px}
.modal-foot{border-top:1px solid var(--line);padding:12px 20px;display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.modal-foot .grow{flex:1;color:var(--muted);font-size:12px}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}
#m-confirm p{margin:10px 0 14px;line-height:1.5}
.steps{display:flex;gap:4px;list-style:none;counter-reset:s}
.steps li{font-size:11.5px;color:var(--muted);padding:4px 10px;border-radius:14px;background:#f1f3f2;white-space:nowrap}
.steps li.on{background:var(--green);color:#fff;font-weight:600}
.steps li.done{background:var(--green-l);color:var(--green)}

.grid-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;align-items:start}
.field{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600}
.card{border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:#fbfcfb}
.card h3{font-size:13px;margin-bottom:6px}
.dropzone{border:2px dashed #b9cfc1;border-radius:12px;padding:26px;text-align:center;background:#f7fbf8;color:#3b4a41}
.dropzone.drag{background:#e9f6ee;border-color:#18AA4B}
.dropzone strong{display:block;font-size:14px;margin-bottom:4px}
table.t{width:100%;border-collapse:collapse;font-size:12px}
table.t th{position:sticky;top:0;background:#f4f6f5;text-align:left;font-weight:600;padding:6px 8px;border-bottom:1px solid var(--line);white-space:nowrap;z-index:1}
table.t td{padding:6px 8px;border-bottom:1px solid #f0f1f0;vertical-align:top}
table.t tr.off td{opacity:.5}
.tablewrap{border:1px solid var(--line);border-radius:8px;overflow:auto;max-height:420px}
.summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:14px}
.stat{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:#fff;text-align:left}
.stat .n{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}
.stat .l{font-size:11.5px;color:var(--muted)}
button.stat{cursor:pointer}
button.stat.on{border-color:var(--green);box-shadow:0 0 0 2px rgba(20,122,54,.18)}
.sec-head{display:flex;align-items:center;gap:10px;margin:4px 0 8px;flex-wrap:wrap}
.sec-head h3{font-size:14px}
.sec-head .hint{flex:1}
.chg{font-size:11.5px;line-height:1.5}
.chg del{color:#a33;text-decoration:line-through}
.chg ins{color:var(--green);text-decoration:none;font-weight:600}
.chg label{display:flex;gap:6px;align-items:flex-start;font-weight:400}
.chg input{width:auto;margin-top:3px}
.colour-in{width:40px!important;height:30px;padding:2px!important}
td input[type=text],td input:not([type]){min-width:90px}
.hist-row{display:flex;gap:10px;padding:7px 0;border-bottom:1px solid #f0f1f0;font-size:12px}
.hist-row .when{color:var(--muted);width:130px;flex-shrink:0}
.hist-row .what{flex:1}

#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#1f2a24;color:#fff;padding:10px 16px;border-radius:8px;z-index:5000;box-shadow:0 6px 20px rgba(0,0,0,.25);font-size:13px;max-width:calc(100vw - 32px)}
#toast.err{background:var(--danger)}
.loading{position:fixed;inset:0;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;background:rgba(244,245,244,.85);z-index:4500;font-weight:600;color:var(--green)}
.spinner{width:34px;height:34px;border:4px solid #cfe7d8;border-top-color:var(--green);border-radius:50%;animation:spin 0.8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.picking #map{cursor:crosshair}

@media (max-width:900px){
  #drawer{position:absolute;right:0;top:0;bottom:0;width:min(410px,100%)}
  #list-panel{position:absolute;left:0;top:0;bottom:0;width:min(340px,100%)}
  #main.drawer-open #legend{right:10px}
}
@media (max-width:640px){
  #header{padding:8px 12px;gap:8px}
  #header h1{font-size:15px}
  .header-actions{margin-left:0;width:100%;justify-content:flex-start}
  #counter{margin-left:auto;padding:3px 10px}
  #search-box{width:100%;order:10}
  #controls .sep{display:none}
  .row2{grid-template-columns:1fr}
  #legend{display:none}
  #legend.show{display:block;bottom:12px;right:8px;max-height:60%}
  .leg-toggle{display:block;position:absolute;bottom:12px;right:8px;z-index:1001;background:#fff;border:1px solid #ccc;border-radius:16px;padding:5px 12px;font-size:12px;font-weight:600;box-shadow:0 2px 8px rgba(0,0,0,.15)}
  .modal.large{height:calc(100dvh - 24px);width:calc(100vw - 16px)}
  .modal-head{flex-wrap:wrap;gap:8px}
  .steps{order:3;width:100%;overflow-x:auto}
  .modal-body{padding:12px}
}

.ctrl-pair{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.mini.danger{color:#b42318;border-color:#f0c4bf;background:#fff}
.model-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.models-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}
.models-actions{display:flex;gap:8px;margin-top:12px;align-items:center}
.models-edit input{min-width:90px}
.cmp-tab{border-color:var(--green);color:var(--green)}
.cmp-tab.on{background:var(--green);color:#fff}
.cmp-filters{display:flex;flex-wrap:wrap;gap:12px 18px;padding:12px;border:1px solid var(--line);border-radius:8px;background:#f8faf9;margin-bottom:6px}
.cmp-field{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600}
.cmp-field input[type=text],.cmp-field input:not([type]),.cmp-field select{width:180px}
.cmp-brands{flex-basis:100%}
.cmp-chks{display:flex;flex-wrap:wrap;gap:4px 12px;font-weight:400}
.cmp-chk{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;cursor:pointer}
.cmp-chk input{width:auto;margin:0}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:baseline}
.mtag{display:inline-block;font-size:10px;font-weight:600;padding:1px 6px;border-radius:9px;background:#e7f1ec;color:#1d5c3f;margin:0 3px 2px 0}
.cmp-side{margin:10px 0 4px}
table.cmp-table th[scope=row]{position:static;background:#f8faf9;white-space:nowrap;width:150px}
table.cmp-table thead th{white-space:normal;min-width:150px}
tr.cmp-on td{background:#f1f8f4}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.cmp-chk .dot{margin-right:0}
.cmp-field input.cmp-num{width:110px}

/* ---------- conversion view ---------- */
.conv-only{display:none}
body.conv-on .conv-only{display:inline}
body.conv-on .no-conv{display:none!important}
.conv-note{font-size:12px;color:var(--ink)}
#btn-conv[aria-pressed=true]{background:#fff3e0;color:#8a4b00}
#conv-panel{width:360px;border-right:1px solid var(--line);background:#fff;display:flex;flex-direction:column;min-height:0;z-index:1050;box-shadow:0 0 18px rgba(0,0,0,.12)}
.cv-head-acts{display:flex;align-items:center;gap:6px}
#conv-hide{display:none}
.conv-body{overflow:auto;flex:1;padding-bottom:12px}
.cv-sec{padding:10px 14px;border-bottom:1px solid #f0f1f0}
.cv-lbl{display:block;font-size:11.5px;font-weight:700;color:#333;margin:4px 0 5px}
.cv-sec select,.cv-row2 input{width:100%;border:1px solid #ccc;border-radius:6px;padding:5px 8px;font-size:12.5px;background:#fff;font-weight:400}
.cv-row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px}
.cv-row2 .cv-lbl{margin-bottom:0}
.cv-row2 input{margin-top:4px}
.cv-sec .hint{margin-top:6px;line-height:1.45}
.cv-help{margin-top:8px;border:1px solid #e3e3e3;border-radius:6px;padding:6px 9px;background:#fafafa;font-size:12px;line-height:1.45;color:#333}
.cv-help summary{font-weight:700;cursor:pointer;color:#333;font-size:12px}
.cv-help p{margin:7px 0 0}
.cv-help ul{margin:4px 0 0;padding-left:18px}
.cv-help li{margin:2px 0}
.cv-help .leg-dot{display:inline-block;width:10px;height:10px;margin-right:5px;vertical-align:-1px}
.cv-chips{display:flex;flex-wrap:wrap;gap:5px}
.cv-chip{display:inline-flex;align-items:center;gap:5px;border:2px solid var(--bc);color:var(--bc);border-radius:16px;padding:2px 9px 2px 6px;font-size:11.5px;font-weight:600;cursor:pointer;background:#fff;filter:saturate(.9)}
.cv-chip input{margin:0;accent-color:var(--bc)}
.cv-chip.on{background:var(--bc);color:#fff}
.cv-layer{display:flex;align-items:center;gap:7px;font-size:12px;padding:3px 0;cursor:pointer}
.cv-layer input{margin:0}
.cv-layer .grow,.cv-reg .grow{flex:1;min-width:0}
.cv-n{min-width:30px;text-align:right;font-weight:700;font-variant-numeric:tabular-nums;font-size:11.5px;color:#444}
.cv-tabs{display:flex;border-bottom:2px solid #e5e5e5;padding:0 8px;position:sticky;top:0;background:#fff;z-index:2}
.cv-tab{flex:1;background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-2px;padding:9px 4px;font-size:12px;font-weight:600;color:#777}
.cv-tab.on{color:var(--green);border-bottom-color:var(--green)}
.cv-pane{padding:8px 14px}
.cv-acts{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:2px 0 6px}
.cv-item{padding:8px 4px;border-bottom:1px solid #f0f1f0;cursor:pointer;border-radius:4px}
.cv-item:hover{background:#fff6f2}
.cv-item .ln{font-weight:600;font-size:12.5px;line-height:1.3;display:flex;align-items:center;gap:6px}
.cv-item .lt{font-size:11px;color:var(--muted);margin-top:1px}
.cv-item .cv-km{color:#7a3a10}
.cv-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0;background:#bbb}
.cv-dot.t1{background:#c0392b}.cv-dot.t2{background:#e67e22}.cv-dot.t3{background:#9aa0a6}
.cv-score{display:inline-block;background:#c0392b;color:#fff;border-radius:10px;padding:0 7px;font-size:10px;font-weight:700;margin-left:auto}
.cv-badge .cv-score{margin-left:6px}
.cv-reg{display:flex;align-items:center;gap:6px;width:100%;background:none;border:0;border-bottom:1px solid #f0f1f0;padding:6px 4px;text-align:left;font-size:12px;border-radius:4px}
.cv-reg:hover,.cv-reg.on{background:#eef6f1}
.cv-reg-h{font-size:10.5px;font-weight:700;color:#777;cursor:default}
.cv-reg-h:hover{background:none}
.cv-rn{display:block;font-weight:600}
.cv-bars{display:flex;gap:2px;margin-top:3px;height:7px}
.cv-bars i{display:block;height:7px;border-radius:2px}
.cv-badge{display:inline-block;border-radius:6px;padding:3px 9px;font-size:11px;font-weight:700;margin-bottom:8px;background:#f2f2f2;color:#444}
.cv-badge.t1{background:#fff0ee;color:#922b21}.cv-badge.t2{background:#fff6ea;color:#7a4410}.cv-badge.t3{background:#f3f3f3;color:#555}
.cv-badge.both{background:#eafaf1;color:#1a5c32}.cv-badge.net{background:#f1ecf8;color:#4b2a73}
.cv-pitch{background:#fff4f1;border:1px solid #f0b8ad;border-radius:6px;padding:7px 9px;margin-top:8px;font-size:11.5px;line-height:1.45}
.cv-pane .sb{background:#f3f8f5;border-left:3px solid var(--green);border-radius:0 6px 6px 0;padding:8px 10px;margin-top:10px;font-size:12px;line-height:1.5}
.cv-pane .sb.warn{border-left-color:#c0392b;background:#fff7f6}
.cv-pane .sb h4{font-size:12px;margin-bottom:4px}
.cv-pane .sb ul{padding-left:16px}
table.cv-pt th[scope=row]{white-space:normal;width:110px;background:#f8faf9;font-size:11.5px}
table.cv-pt td,table.cv-pt th{font-size:11.5px;vertical-align:top}
@media (max-width:900px){
  #conv-panel{position:absolute;left:0;top:0;bottom:0;width:min(360px,100%)}
  #conv-hide{display:inline-block}
}

/* Nearby dealers */
.nb-only{display:none}
body.nb-on .nb-only{display:inline}
body.nb-on #controls>*:not(.nb-only){display:none!important}
#btn-near[aria-pressed=true]{background:#e8f5ec;color:#0f5a28}
#near-panel{width:360px;border-right:1px solid var(--line);background:#fff;display:flex;flex-direction:column;min-height:0;z-index:1050;box-shadow:0 0 18px rgba(0,0,0,.12)}
#near-hide{display:none}
.nb-search{display:flex;gap:6px}
.nb-search input{flex:1;min-width:0;border:1px solid #ccc;border-radius:6px;padding:6px 9px;font-size:13px}
.nb-search .pbtn{padding:6px 14px;white-space:nowrap}
.nb-pickbtn{margin-top:8px;width:100%}
.nb-pickbtn.on{background:#fff3e0;border-color:#e6a23c;color:#8a4b00}
.nb-choices{border:1px solid #dfe3e0;border-radius:6px;margin-top:6px;max-height:280px;overflow:auto;background:#fff}
.nb-ch-h{font-size:10.5px;font-weight:700;color:#777;padding:6px 9px 2px;text-transform:uppercase;letter-spacing:.03em}
.nb-ch{display:block;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid #f2f3f2;padding:6px 9px;cursor:pointer}
.nb-ch:hover,.nb-ch:focus{background:#eef6f1}
.nb-ch .ln{display:block;font-weight:600;font-size:12.5px}
.nb-ch .lt{display:block;font-size:11px;color:var(--muted)}
.nb-ch-msg{font-size:11.5px;color:#666;padding:6px 9px}
.nb-origin{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;background:#f3f8f5;border:1px solid #d5e8dc;border-radius:6px;padding:7px 9px;margin:4px 0 8px}
.nb-origin .ln{font-weight:700;font-size:12.5px}
.nb-origin .lt{font-size:11px;color:var(--muted)}
.nb-item:hover{background:#f1f8f4}
.nb-rank{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;border-radius:50%;background:#147A36;color:#fff;font-size:10.5px;font-weight:700;flex-shrink:0}
.nb-rank.single{background:#6b7570}
.nb-km{margin-left:auto;font-size:11px;font-weight:700;color:#0f5a28;white-space:nowrap;padding-left:6px}
.nb-brands{display:flex;align-items:center;gap:3px;flex-wrap:wrap}
.nb-links{display:flex;gap:12px;flex-wrap:wrap;margin-top:3px}
.nb-links a,.linkbtn{font-size:11px;color:#1a6fb5}
.linkbtn{background:none;border:0;padding:0;cursor:pointer;text-decoration:underline}
.nb-num{width:24px;height:24px;border-radius:50%;background:#6b7570;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;border:2px solid #fff;box-shadow:0 1px 5px rgba(0,0,0,.45)}
.nb-num.multi{background:#147A36}
.nb-num.sm{width:18px;height:18px;font-size:9px;flex-shrink:0}
.nb-pin{width:22px;height:22px;border-radius:50% 50% 50% 0;background:#c0392b;transform:rotate(-45deg);border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.45);margin-top:2px}
.nb-pin.sm{width:14px;height:14px;margin:0 2px;flex-shrink:0}
.nb-ring{width:16px;height:16px;border-radius:50%;border:1.5px dashed #147A36;background:rgba(24,170,75,.08);flex-shrink:0}
.nb-pop{background:#f3f8f5;border-radius:6px;padding:5px 8px;margin-bottom:8px;font-size:11.5px}
.nb-pop a{margin-left:6px}
.pop-acts{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.pop-acts .pop-edit,.pop-acts .pop-near{margin-top:0;flex:1;width:auto}
.pop-near{background:#fff;border:1px solid #147A36;color:#147A36;border-radius:6px;padding:5px 10px;font-size:12px;font-weight:600;cursor:pointer}
.pop-near:hover{background:#eef6f1}
@media (max-width:900px){
  #near-panel{position:absolute;left:0;top:0;bottom:0;width:min(360px,100%)}
  #near-hide{display:inline-block}
}

/* ---------- accounts ---------- */
.signin-screen{position:fixed;inset:0;z-index:3500;background:linear-gradient(160deg,#eef5f0 0%,#f4f5f4 55%);display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto}
.signin-card{background:#fff;border-radius:14px;box-shadow:0 12px 40px rgba(20,60,35,.14);border:1px solid var(--line);width:100%;max-width:420px;padding:28px 28px 18px;font-size:14px;line-height:1.5}
.signin-brand{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.signin-brand h1{font-size:18px;color:var(--green);line-height:1.25}
.signin-card h2{font-size:18px;margin-bottom:8px}
.signin-card p{margin-bottom:12px}
.si-lead{color:var(--muted)}
#si-form{display:flex;flex-direction:column;gap:6px}
#si-form label{font-weight:600;font-size:13px}
#si-form input{font-size:15px;padding:10px 12px;border:1px solid #cfd4d1;border-radius:8px;width:100%}
#si-form input:focus{outline:2px solid var(--green);outline-offset:1px;border-color:var(--green)}
.si-btn{width:100%;padding:11px 14px;font-size:14px;margin-top:4px}
.si-btn+.si-btn{margin-top:8px}
.si-foot{border-top:1px solid var(--line);margin-top:18px;padding-top:12px;text-align:center}
.linkbtn{background:none;border:0;color:var(--muted);font-size:12px;text-decoration:underline;cursor:pointer;padding:2px}
.linkbtn:hover{color:var(--green)}
body.signed-out #header,body.signed-out #controls,body.signed-out #main{visibility:hidden}
.menu{min-width:220px}
.menu-head{padding:8px 10px 9px;border-bottom:1px solid var(--line);margin-bottom:4px;font-size:12px;color:var(--muted);line-height:1.4}
.menu-head strong{display:block;color:var(--ink);font-size:13px}
#acct-label{display:inline-block;max-width:220px;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}
.ob-list{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;margin:12px 0 6px;border:1px solid var(--line);border-radius:8px;padding:10px 12px;max-height:340px;overflow:auto}
.ob-list label{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:500}
.ob-list .dotb{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.ours-tag{font-size:9.5px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;border-radius:8px;padding:0 5px;margin-left:5px;background:var(--green-l);color:var(--green);vertical-align:1px}
.brand-btn.ours-btn{border-color:var(--green);color:var(--green);border-style:dashed}
.brand-btn.ours-btn.active{background:var(--green);color:#fff;border-style:solid}
.acc-form{display:grid;grid-template-columns:2fr 1.5fr 1.2fr auto;gap:8px;align-items:end;margin:6px 0 14px}
.acc-form label{display:flex;flex-direction:column;gap:3px;font-size:11.5px;font-weight:600}
.acc-form input,.acc-form select{padding:7px 9px;border:1px solid #cfd4d1;border-radius:7px;font-size:13px;width:100%}
.acc-sec{margin-bottom:18px}
.acc-sec h3{font-size:14px;margin-bottom:6px}
.role-help{font-size:11.5px;color:var(--muted);line-height:1.5;margin-bottom:10px}
.acc-acts{display:flex;gap:5px;flex-wrap:wrap}
.pill{font-size:10.5px;font-weight:700;border-radius:10px;padding:1px 8px;background:#eef0ef;color:#4a554e;white-space:nowrap}
.pill.on{background:var(--green-l);color:var(--green)}
.pill.off{background:#fdecea;color:var(--danger)}
@media (max-width:700px){.acc-form{grid-template-columns:1fr 1fr}.ob-list{grid-template-columns:1fr}}

/* My patch */
.seg{display:inline-flex;border:1px solid #bbb;border-radius:6px;overflow:hidden;vertical-align:middle}
.seg-btn{border:0;background:#f5f5f5;padding:4px 10px;font-size:12px;cursor:pointer;color:#333;white-space:nowrap}
.seg-btn+.seg-btn{border-left:1px solid #bbb}
.seg-btn.on{background:var(--green);color:#fff;font-weight:600}
.patch-note{background:#eef7f0;border-left:3px solid var(--green);font-size:12px;line-height:1.45;color:#234}
.t-areas{min-width:150px}
.t-areas .mini{margin-left:4px}
.ar-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0}
.ar-tools input{flex:1;min-width:200px;border:1px solid #ccc;border-radius:6px;padding:6px 9px;font-size:13px}
.ar-sum{font-size:12px;font-weight:600;color:#234}
.ar-list{max-height:52vh;overflow:auto;border:1px solid #e3e3e3;border-radius:8px;padding:4px 10px 10px}
.ar-reg{border:0;border-top:1px solid #eee;margin:0;padding:8px 0 4px}
.ar-reg:first-child{border-top:0}
.ar-reg legend{font-size:12.5px;font-weight:700;padding:0;color:#222}
.ar-reg legend label{cursor:pointer}
.ar-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:2px 12px;margin-top:4px}
.ar-item{display:flex;gap:6px;align-items:flex-start;font-size:12px;line-height:1.35;padding:2px 0;cursor:pointer}
.ar-item input{margin-top:2px}
.ar-other{font-size:11px;color:#a16207}
.ar-acts{margin-top:10px}
.team-key{position:absolute;top:10px;right:10px;z-index:1000;background:rgba(255,255,255,.97);border-radius:10px;padding:10px 13px;box-shadow:0 2px 12px rgba(0,0,0,.18);max-width:300px;max-height:60%;overflow:auto;font-size:12px;line-height:1.4}
.tk-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.tk-row{display:flex;gap:8px;align-items:flex-start;margin:5px 0}
.tk-sw{flex:none;width:13px;height:13px;border-radius:3px;margin-top:2px;opacity:.8}
.modal .ar-list input[type=checkbox]{width:auto;flex:none;padding:0;margin:2px 0 0;accent-color:var(--green)}
.ar-reg legend label{display:inline-flex;align-items:center;gap:6px}
.ar-reg legend input[type=checkbox]{margin:0}

/* Priority targets */
#btn-targets[aria-pressed=true]{background:#fff1ec;color:#a8320b}
.tg-count{display:inline-block;min-width:17px;height:17px;line-height:17px;border-radius:9px;background:#d4380d;color:#fff;font-size:10.5px;font-weight:700;text-align:center;margin-left:5px;padding:0 4px}
#tg-panel{width:360px;border-right:1px solid var(--line);background:#fff;display:flex;flex-direction:column;min-height:0;z-index:1050;box-shadow:0 0 18px rgba(0,0,0,.12)}
.tg-mk{position:relative}
.tg-mk>div{position:absolute;left:0;top:0}
.tg-star{position:absolute;top:-9px;right:-10px;width:15px;height:15px;line-height:14px;text-align:center;font-size:10px;border-radius:50%;background:#fff;color:#c26a00;border:1.5px solid #c26a00;box-shadow:0 1px 3px rgba(0,0,0,.35);pointer-events:none;z-index:2}
.tg-star.mine{background:#d4380d;color:#fff;border-color:#fff}
.tg-star-c{top:-5px;right:-5px;background:#d4380d;color:#fff;border-color:#fff}
.tg-leg{display:inline-block;width:14px;height:14px;line-height:13px;text-align:center;font-size:9px;border-radius:50%;background:#d4380d;color:#fff;flex-shrink:0}
.tg-box{background:#fff6f1;border:1px solid #f2c2ae;border-radius:6px;padding:7px 9px;margin-top:8px;font-size:12px;line-height:1.45}
.tg-bh{font-weight:700;color:#a8320b;font-size:12px}
.tg-ico{color:#c26a00;margin-right:4px}
.tg-ico.mine,.tg-bh .tg-ico{color:#d4380d}
.tg-who{margin-top:2px}
.tg-note{white-space:pre-wrap;margin-top:4px;color:#333;border-left:2px solid #f2c2ae;padding-left:7px;max-height:120px;overflow:auto}
.tg-meta{color:var(--muted);font-size:11px;margin-top:4px}
.pop-flag{background:#fff;border:1px solid #d4380d;color:#a8320b;border-radius:6px;padding:5px 10px;font-size:12px;font-weight:600;cursor:pointer;flex:1}
.pop-flag:hover{background:#fff1ec}
.tg-item .ln{gap:4px}
.tg-item .tg-edit{margin-left:auto}
.tg-to{color:#a8320b;font-weight:600}
.tg-rnote{font-size:11.5px;color:#333;margin-top:3px;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tg-maponly{margin-top:8px}
.tg-dealer{font-size:13px;color:var(--ink);margin:4px 0 10px}
.tg-form{display:flex;flex-direction:column;gap:12px}
.modal.small .tg-chk{flex-direction:row;align-items:center;gap:7px;font-weight:600}
.modal.small .tg-chk input{width:auto;margin:0}
.modal.small label .hint{font-weight:400}
.tg-clear{margin-right:auto}
@media (max-width:900px){
  #tg-panel{position:absolute;left:0;top:0;bottom:0;width:min(360px,100%)}
}

/* Platform admin support view ("log in as") */
#imp-bar{background:#ffd84d;color:#3d2e00;display:flex;align-items:center;gap:12px;padding:6px 16px;font-size:12.5px;line-height:1.4;flex-shrink:0;border-bottom:1px solid #e0b800;flex-wrap:wrap}
#imp-text{flex:1;min-width:0}
#imp-bar .imp-sub{color:#5c4600}
#imp-return{background:#3d2e00;color:#fff;border:0;border-radius:6px;padding:6px 12px;font-weight:700;font-size:12.5px;white-space:nowrap}
#imp-return:hover{background:#000}
@media (max-width:900px){#imp-bar{padding:6px 12px;font-size:12px;gap:8px}#imp-bar .imp-sub{display:none}}
/* Targets team note */
.tg-tnote{background:#fffbea;border:1px solid #f1dc8a;border-radius:8px;padding:9px 10px;margin:10px 12px 4px}
.tg-tnote .lt{font-size:11.5px;color:#666}
.tg-tnote.empty{background:none;border:1px dashed #cfd4d1;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tg-tnote-h{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.tg-tnote-h .cv-lbl{margin:0}
.tg-tnote-txt{font-size:12.5px;color:#222;white-space:pre-wrap;overflow-wrap:anywhere;margin-bottom:4px}
.tg-tnote textarea{width:100%;box-sizing:border-box;font:inherit;font-size:12.5px;padding:7px;border:1px solid #cfd4d1;border-radius:6px;resize:vertical;background:#fff}
.tg-tnote-acts{display:flex;gap:6px;justify-content:flex-end;margin-top:6px}
.tg-tnote-acts .danger{margin-right:auto}
/* Invites I've sent */
.pill.wait{background:#fff4d6;color:#8a5a00}
.inv-sum{font-size:13px;margin:6px 0 10px}
.inv-tabs{display:flex;gap:6px;margin-bottom:10px;flex-wrap:wrap}
.inv-tbl td .hint{font-size:11px;margin-top:2px}
/* Brand refresh: reviewed tracking on "Different details" */
.rv-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:12.5px;margin:0 0 8px}
.rv-hide{display:flex;align-items:center;gap:5px;font-weight:400;font-size:12.5px}
.rv-hide input{width:auto}
tr.rv td{background:#f1f8f3}
tr.rv td:first-child{box-shadow:inset 3px 0 0 var(--green)}
.rv-cell{width:1%;white-space:nowrap;vertical-align:top}

/* smart search (top bar) */
#header{position:relative;z-index:1200}
.ss-wrap{position:relative;flex:1 1 170px;max-width:440px;min-width:170px}
#ss-input{width:100%;border:1px solid rgba(255,255,255,.55);background:#fff;color:#1d2a22;border-radius:8px;padding:7px 34px 7px 12px;font-size:13px;outline:none}
#ss-input:focus{border-color:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.35)}
#ss-input::placeholder{color:#6b766f}
.ss-kbd{position:absolute;right:9px;top:50%;transform:translateY(-50%);font:600 11px/1 system-ui,sans-serif;color:#6b766f;border:1px solid #cfd6d2;border-radius:4px;padding:2px 6px;background:#f5f7f6;pointer-events:none}
#ss-input:focus~.ss-kbd,#ss-input:not(:placeholder-shown)~.ss-kbd{display:none}
.ss-results{position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;color:#1d2a22;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.25);max-height:min(470px,70vh);overflow-y:auto;z-index:1300;border:1px solid #dfe5e1}
.ss-row{display:flex;align-items:center;gap:10px;padding:8px 12px;cursor:pointer;border-bottom:1px solid #f0f2f1}
.ss-row.sel{background:#eefaf2}
.ss-row .grow{flex:1;min-width:0}
.ss-name{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ss-sub{font-size:11.5px;color:#56625b;margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ss-b{display:flex;align-items:center;gap:3px;margin-top:3px;flex-wrap:wrap}
.ss-acts{display:flex;gap:5px;flex-shrink:0}
.ss-acts button{border:1px solid #cfd6d2;background:#fff;color:#147A36;border-radius:6px;padding:4px 9px;font-size:11.5px;font-weight:600}
.ss-acts .ss-edit{background:#147A36;border-color:#147A36;color:#fff}
.ss-acts button:hover{filter:brightness(.95)}
.ss-foot{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:7px 12px;font-size:11px;color:#56625b;background:#f7f9f8;position:sticky;bottom:0}
.ss-empty{padding:14px 12px;font-size:12.5px;color:#56625b}
.ss-add{margin-left:6px;border:1px solid #147A36;background:#fff;color:#147A36;border-radius:6px;padding:4px 9px;font-size:12px;font-weight:600}
@media (max-width:900px){.ss-keys{display:none}}
@media (max-width:640px){
  .ss-wrap{order:3;flex:1 1 100%;max-width:none}
  .ss-kbd{display:none}
  .ss-results{max-height:60vh}
}
@media (min-width:641px){.ss-results{min-width:440px}}
@media (max-width:1700px) and (min-width:641px){
  #header{gap:10px}
  .header-actions{gap:5px}
  .hbtn{padding:6px 8px}
  .acct-org{display:none}
}

/* terms of use, usage counter, leak trace */
.modal.terms{max-width:620px;width:calc(100vw - 24px)}
.modal.terms .modal-body h3{font-size:14px;margin:14px 0 4px}
.modal.terms .modal-body p{font-size:13px;line-height:1.5;margin:0}
.modal.terms .modal-body .terms-intro{margin-bottom:4px;color:var(--muted)}
.terms-agree{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:600}
.terms-agree input{width:auto;margin:0;accent-color:var(--green)}
.modal.terms .err{padding:0 20px 10px;text-align:right}
.menu-usage{padding:2px 10px 8px;font-size:12px;color:var(--muted);border-bottom:1px solid var(--line);margin-bottom:4px}
.pop-contact{margin:2px 0 6px;font-size:12px}
.pop-contact.err{color:var(--danger)}
.pop-contact .mini{margin-left:6px}
#m-trace textarea{width:100%;font:inherit;font-size:12px;padding:8px;border:1px solid var(--line);border-radius:8px;resize:vertical;margin:8px 0}
#trace-out{margin-top:10px;font-size:12px;max-height:40vh;overflow:auto}
#trace-out .tr-hit{padding:8px 10px;border-radius:8px;background:#fdf2f2;border:1px solid #f1c4c4;margin-bottom:6px}
#trace-out .tr-none{padding:8px 10px;border-radius:8px;background:#f3f6f4;color:var(--muted)}
/* Nearby: brand-colour ring around the numbered pin (one slice per brand) */
.nb-ring-pin{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 5px rgba(0,0,0,.45);flex-shrink:0}
.nb-ring-pin .nb-num{box-shadow:none}
.nb-ring-pin.sm{width:22px;height:22px;box-shadow:0 1px 2px rgba(0,0,0,.3);display:inline-flex;margin-right:6px;vertical-align:middle}
.nb-ring-pin.sm .nb-num{width:15px;height:15px;font-size:8.5px;border-width:1.5px}
.nb-ring-pin.sm .nb-rank{min-width:16px;width:16px;height:16px;font-size:9px;border:1.5px solid #fff;box-sizing:border-box}
.leg-sub{font-size:11px;font-weight:700;color:#4a5550;margin:8px 0 3px;text-transform:uppercase;letter-spacing:.03em}
.nb-leg-b.faded{opacity:.45}
.nb-tipbox{padding:6px 8px;font-size:12px;line-height:1.45}
.nb-tip .dotb{margin-right:5px}
.cv-item .ln .nb-ring-pin.sm{margin-right:0}
/* Main map: brand-colour ring with white centre (one slice per brand) */
.mk-ring{width:12px;height:12px;border-radius:50%;position:relative;box-shadow:0 0 0 1.5px rgba(255,255,255,.95),0 1px 4px rgba(0,0,0,.45);flex-shrink:0}
.mk-ring::after{content:"";position:absolute;left:50%;top:50%;width:4px;height:4px;margin:-2px 0 0 -2px;border-radius:50%;background:#fff}
.mk-ring.multi{width:16px;height:16px}
.mk-ring.multi::after{width:6px;height:6px;margin:-3px 0 0 -3px}
.mk-ours{border-radius:50%;border:2.5px solid #147A36;background:rgba(255,255,255,.9);display:flex;align-items:center;justify-content:center;box-shadow:0 1px 4px rgba(0,0,0,.35);box-sizing:border-box;flex-shrink:0}
.mk-ours .mk-ring{box-shadow:none}
.tip-where{color:#5b6762;font-size:11px;margin-bottom:2px}

/* ---------- Companies House prospects ---------- */
#btn-px[aria-pressed=true]{background:#f1ebfe;color:#5b21b6;border-color:#c4b5fd}
#px-panel{width:360px;border-right:1px solid var(--line);background:#fff;display:flex;flex-direction:column;min-height:0;z-index:1050;box-shadow:0 0 18px rgba(0,0,0,.12)}
#px-hide{display:none}
.px-pin{width:16px;height:16px;transform:rotate(45deg);background:#fff;border:3px solid var(--pc);border-radius:3px;box-shadow:0 1px 4px rgba(0,0,0,.45);box-sizing:border-box;margin:2px}
.px-pin.off{opacity:.45;border-style:dashed}
.px-pin.sm{display:inline-block;width:11px;height:11px;border-width:2.5px;margin:0 3px 0 2px;flex-shrink:0;box-shadow:none;vertical-align:-1px}
.px-clu{background:#fff;border:2.5px solid #7c3aed;color:#5b21b6;border-radius:6px;transform:rotate(45deg);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:10.5px;box-shadow:0 2px 6px rgba(0,0,0,.3);box-sizing:border-box}
.px-clu span{transform:rotate(-45deg)}
.popup-header.px-head{background:var(--pc)}
.px-pop .px-kv{display:grid;grid-template-columns:104px 1fr;gap:6px;font-size:11.5px;padding:2px 0;line-height:1.35}
.px-pop .px-kv>span:first-child{color:var(--muted)}
.px-warn{background:#fff7e6;border:1px solid #f3d9a4;color:#7a4a00;border-radius:6px;padding:5px 8px;font-size:11.5px;margin:6px 0;line-height:1.4}
.px-acts{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.px-acts .mini{text-decoration:none;display:inline-flex;align-items:center}
.px-admin{border-top:1px solid #eee;padding-top:8px}
.px-item:hover{background:#f6f2ff}
.px-item .tag{margin-right:4px}
.px-item .nb-km{color:#5b21b6}
@media (max-width:900px){
  #px-panel{position:absolute;left:0;top:0;bottom:0;width:min(360px,100%)}
  #px-hide{display:inline-block}
}
#px-q{margin-top:8px;width:100%;border:1px solid #ccc;border-radius:6px;padding:6px 9px;font-size:13px;box-sizing:border-box}
@media (max-width:640px){.px-pop .px-kv{grid-template-columns:88px 1fr}}

/* Companies House drop-down in the dealer tile */
.pop-ch{margin-top:8px;padding-top:8px;border-top:1px solid #eee;font-size:12px}
.pop-ch summary{cursor:pointer;font-weight:600;color:#1d2a22;display:flex;align-items:center;gap:6px;list-style:none;user-select:none;padding:2px 0}
.pop-ch summary::-webkit-details-marker{display:none}
.pop-ch summary::after{content:"\25BE";margin-left:auto;color:#888;font-size:11px;transition:transform .15s}
.pop-ch[open] summary::after{transform:rotate(180deg)}
.pop-ch summary:focus-visible{outline:2px solid var(--green);outline-offset:2px;border-radius:3px}
.pop-ch .ch-sum{font-weight:400;color:#555}
.ch-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;display:inline-block}
.ch-dot.ch-ok{background:#1e8e3e}
.ch-dot.ch-watch{background:#e8a200}
.ch-dot.ch-risk{background:#c62828}
.pop-ch .ch-body{margin-top:6px;max-height:320px;overflow-y:auto;overscroll-behavior:contain;padding-right:2px}
.pop-ch .popup-row .lbl{width:78px}
.ch-issues{border-radius:4px;padding:5px 7px;margin-bottom:6px;line-height:1.4}
.ch-issues.ch-watch{background:#fff6dc;color:#6b4a00}
.ch-issues.ch-risk{background:#fde8e8;color:#8a1c1c}
.ch-tag{display:inline-block;background:#fde8e8;color:#8a1c1c;border-radius:3px;padding:0 4px;font-size:10px;font-weight:600}
.ch-note{background:#f3f4f6;border-radius:4px;padding:5px 7px;margin:6px 0;color:#444}
.ch-src{margin-top:6px;color:#666;font-size:11px;line-height:1.4}
.ch-src a{color:var(--green)}
.ch-err{color:var(--danger)}
.pop-ch .hint{color:#888}
