/* additions on top of the design's app.css */
input,select,textarea,button{font:inherit;color:inherit}
.search input{border:0;outline:0;background:transparent;flex:1;min-width:0;color:var(--tx)}
.in input{border:0;outline:0;background:transparent;flex:1;min-width:0}
.fl select,.btn select{border:0;outline:0;background:transparent;font-weight:500;color:inherit;cursor:pointer;max-width:190px;appearance:none;-webkit-appearance:none;padding-right:2px}
.sel{font-weight:500}.w{width:100%}select.sel{appearance:auto}
.ta{display:block;width:100%;border:1px solid var(--bd2);border-radius:8px;padding:8px 10px;resize:vertical;background:#fff;outline:0}
.sel:focus,.ta:focus,.cin:focus{outline:2px solid #c7cbff;border-color:var(--ac)}
.cin{height:30px;border:1px solid var(--bd2);border-radius:7px;padding:0 8px;background:#fff;min-width:0}
.lbl{font-size:12px;font-weight:600;color:var(--tx2);margin:12px 0 6px}.lbl:first-child{margin-top:0}
.tx2{color:var(--tx2)}.tx3{color:var(--tx3)}.ell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.empty{color:var(--tx3);text-align:center;padding:24px 12px;margin:0}
.empty a{color:var(--ac);font-weight:600}
code{font:500 12px ui-monospace,monospace;background:var(--bg);padding:2px 6px;border-radius:5px}
/* toast */
.toast{position:fixed;left:50%;top:16px;transform:translateX(-50%);z-index:50;background:var(--tx);color:#fff;padding:10px 16px;border-radius:10px;box-shadow:var(--sh2);font-weight:600;transition:opacity .4s}
.toast.err{background:var(--red)}.toast.hide{opacity:0;pointer-events:none}
.top .btn{position:relative}.dot{position:absolute;top:6px;right:7px;width:7px;height:7px;border-radius:50%;background:var(--red);border:1.5px solid #fff}
/* leads table — fit at 1440 */
.tscroll{overflow-x:auto}
.tbl.leads th,.tbl.leads td{padding:9px 8px}.tbl.leads th:first-child,.tbl.leads td:first-child{padding-left:14px;width:20px}
.tbl.leads .who b{max-width:150px;overflow:hidden;text-overflow:ellipsis;display:block}
.ellc{max-width:150px;overflow:hidden;text-overflow:ellipsis}.ellc .who,.ellc .who div{min-width:0;overflow:hidden}.ellc b,.ellc span{overflow:hidden;text-overflow:ellipsis;display:block}
.tbl th a{color:inherit}.tbl tbody tr:hover td{background:#fafbff}
.pager{display:flex;align-items:center;gap:8px;padding:12px 16px;border-top:1px solid var(--bd);color:var(--tx3);font-size:12.5px}.pager span{margin-left:auto;display:flex;gap:6px}
.btn.dis{pointer-events:none;opacity:.45}
dialog.modal{border:0;padding:0}dialog::backdrop{background:rgba(15,23,41,.45);backdrop-filter:blur(2px)}
/* radios via :has */
.rgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:6px}
.radio input{position:absolute;opacity:0;pointer-events:none}.radio{position:relative;cursor:pointer}
.radio:has(input:checked){border-color:var(--ac);background:var(--acs);box-shadow:0 0 0 3px rgba(79,70,229,.12)}.radio:has(input:checked) i{border:5px solid var(--ac)}
/* pipeline */
.board{overflow-x:auto;padding-bottom:8px}.dc a{color:inherit}.dc:focus{outline:2px solid #c7cbff}
.mvsel{display:none;height:30px;border:1px solid var(--bd2);border-radius:7px;background:#fff;font-size:12px}
/* lead page */
.stages button{flex:1;height:30px;border:0;cursor:pointer;font-size:11.5px;font-weight:600;color:var(--tx3);background:var(--bg);clip-path:polygon(0 0,calc(100% - 9px) 0,100% 50%,calc(100% - 9px) 100%,0 100%,9px 50%)}
.stages button:first-child{clip-path:polygon(0 0,calc(100% - 9px) 0,100% 50%,calc(100% - 9px) 100%,0 100%);border-radius:6px 0 0 6px}
.stages button:hover{background:#e7e9ff;color:var(--ac2)}.stages button.done{background:#e0e3ff;color:var(--ac2)}.stages button.cur{background:var(--ac);color:#fff}
.lostbar{margin:0 20px 16px;padding:9px 12px;border-radius:8px;background:var(--reds);color:var(--red);font-weight:600;display:flex;gap:8px;align-items:center}.lostbar svg{width:15px;height:15px}
.comp textarea.tx{display:block;width:100%;border:0;outline:0;resize:vertical;color:var(--tx);min-height:56px;background:transparent}
.comp .ct a{cursor:pointer}.comp .row2{display:flex;gap:14px;align-items:center;padding:0 12px 8px;color:var(--tx2);font-size:12.5px;flex-wrap:wrap}.comp .cx[hidden]{display:none}
.comp .cx:not(.row2){padding:8px 12px 0}.comp .cx .cin{width:100%}
.comp .cf{flex-wrap:wrap}
.tl{padding:4px 16px 12px}.cb .trow:first-child{margin-top:0}
.trow{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--bd)}.trow:last-of-type{border-bottom:0}.trow svg{width:16px;height:16px}
.trow .ring{flex:none}.trow.done b{text-decoration:line-through;color:var(--tx3)}.trow.od .tx3{color:var(--red)}.trow form{margin:0}
.addtask{display:flex;gap:6px;flex-wrap:wrap;align-items:center;padding-top:12px;margin-top:4px;border-top:1px solid var(--bd)}.addtask .cin[name=title],.addtask .cin[name=name]{flex:1;min-width:140px}
.fuh{display:flex;gap:6px;align-items:center;font-size:11px;font-weight:700;letter-spacing:.04em;color:var(--amb)}.fuh svg{width:13px;height:13px}
.fu.od{border-left-color:var(--red)}.fu.od .fuh{color:var(--red)}
.fua{display:flex;gap:6px;margin-top:12px;flex-wrap:wrap}.fua form{margin:0}
.side2{display:flex;flex-direction:column;gap:16px;min-width:0}
.deal .row,.cb .row{display:flex;justify-content:space-between;gap:10px;padding:4px 0;color:var(--tx2)}.deal .row b,.cb .row b{color:var(--tx)}
.menu{position:relative}.menu .pop{right:0;width:230px}.pop[hidden]{display:none}
.pop a,.pop button{display:flex;align-items:center;gap:8px;width:100%;justify-content:space-between;padding:7px 9px;border-radius:6px;font-weight:500;background:none;border:0;cursor:pointer;text-align:left;color:var(--tx)}
.menu .pop>a,.menu .pop .lnk{justify-content:flex-start}.pop svg{width:14px;height:14px}
.pop a:hover,.pop button:hover,.pop .h{background:var(--bg)}.pop button span{color:var(--tx3);font-size:12px}.pop form{margin:0}
/* forms */
.g2f{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}
.formc{padding:20px}.fld{display:flex;flex-direction:column;gap:6px;margin-bottom:4px}.fld>span{font-size:12px;font-weight:600;color:var(--tx2)}.fld .sel{height:36px}
.formc>.fld{margin-top:14px}
.errbox{padding:10px 14px;border-radius:8px;background:var(--reds);color:var(--red);font-weight:600}
.walist{margin-top:14px}
/* dashboard helpers */
.bwrap{display:flex;align-items:flex-end;gap:6px;height:160px;padding:8px 0}.bcol{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;height:100%;font-size:10.5px;color:var(--tx3)}
.bcol .bnew{width:100%;max-width:22px;background:#c7cbff;border-radius:4px 4px 0 0;position:relative;min-height:2px}.bcol .bq{position:absolute;left:0;right:0;bottom:0;background:var(--ac);border-radius:4px 4px 0 0}
.donutw{display:flex;gap:18px;align-items:center}.donut{width:132px;height:132px;border-radius:50%;flex:none;display:grid;place-items:center}.donut:after{content:"";width:84px;height:84px;border-radius:50%;background:#fff;grid-area:1/1}
.donut b{grid-area:1/1;z-index:1;font-size:18px;text-align:center;line-height:1.1}.donut b small{display:block;font-size:11px;color:var(--tx3);font-weight:500}
.dleg{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}.dleg div{display:flex;align-items:center;gap:8px}.dleg i{width:9px;height:9px;border-radius:3px;flex:none}.dleg span{margin-left:auto;font-weight:600}
/* import */
.dropz{display:block;border:2px dashed var(--bd2);border-radius:12px;padding:30px;text-align:center;color:var(--tx2);cursor:pointer}.dropz.on{border-color:var(--ac);background:var(--acs)}
.mapscroll{max-height:46vh;overflow:auto}.sumchips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.invlist{max-height:180px;overflow:auto;font-size:12.5px;color:var(--tx2)}
.g3d{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
@media (max-width:760px){
 .toast{top:64px;width:max-content;max-width:90vw}
 .board{display:flex;flex-direction:column;gap:12px}.board .col{min-height:0}.mvsel{display:block}.dc .grip{display:none}
 .g2f,.g3d,.rgrid{grid-template-columns:1fr}.donutw{flex-direction:column;align-items:stretch}.donut{margin:0 auto}
 .comp{margin:12px}.tl{padding:4px 12px 12px}.tbl.leads .who b{max-width:120px}
 .modal{max-height:calc(100vh - 32px);overflow:auto}
}
.lgd{display:inline-block;width:9px;height:9px;border-radius:3px;vertical-align:0}
.dropz input{display:block;margin:0 auto 10px}.dropz b{display:block;margin-bottom:6px;color:var(--tx)}.dropz span{font-size:12.5px}
/* ---- summary card */
.sumc{padding:16px 18px}.sumh{display:flex;align-items:center;gap:10px;margin-bottom:10px}.sumh h3{margin:0;font-size:14px;font-weight:700;display:flex;align-items:center;gap:7px}.sumh h3 svg{width:15px;height:15px;color:var(--ac)}
.sumu{margin-left:auto;font-size:11.5px;color:var(--tx3)}
.sumw{background:var(--sub);border:1px solid var(--bd);border-radius:10px;padding:12px 14px;margin-bottom:12px}
.sumt{margin:0;white-space:pre-wrap;line-height:1.55;color:var(--tx)}.sume{color:var(--tx3)}.summ{font-size:11.5px;color:var(--tx3);margin-top:6px}
.sumed{margin-top:10px}.sumed>summary{list-style:none;display:inline-flex}.sumed>summary::-webkit-details-marker{display:none}.sumed[open]>summary{display:none}
.sumed textarea{width:100%;box-sizing:border-box;min-height:96px;padding:9px 11px;border:1px solid var(--bd2);border-radius:8px;font:13px/1.5 var(--f);resize:vertical}.sumb{display:flex;gap:8px;margin-top:8px}
.kp{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:0 24px}
.kp li{display:grid;grid-template-columns:110px 1fr;gap:10px;padding:8px 0;border-top:1px solid var(--bd);font-size:13px;min-width:0}
.kp li>span{color:var(--tx2);font-weight:500;font-size:12.5px}.kp li>div{min-width:0;overflow-wrap:anywhere}.kp em{font-style:normal;color:var(--tx3)}
.kp .kpo{color:var(--tx2);font-size:12.5px;margin-top:2px}.kp .kpn{grid-column:1/-1}.kp .kpn p{margin:0 0 6px}.kp .kpn p em{display:block;font-size:11.5px}
.kpod{background:var(--reds,#fdecec);color:var(--red);border-color:#f6c9c9}
.dvh{padding:16px 18px;display:flex;flex-wrap:wrap;gap:12px;align-items:center}.dvh h1{margin:0;font-size:20px}.dvk{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
@media(max-width:760px){.kp{grid-template-columns:1fr}.kp li{grid-template-columns:96px 1fr}.sumu{display:none}.dvk{grid-template-columns:1fr 1fr}.sumc{padding:14px}}
/* ---- live indicator */
.live{position:fixed;right:14px;bottom:14px;z-index:60;display:flex;align-items:center;gap:6px;height:24px;padding:0 9px;border-radius:99px;background:#fff;border:1px solid var(--bd);box-shadow:var(--sh);font:600 11.5px var(--f);color:var(--tx2)}
.live i{width:7px;height:7px;border-radius:50%;background:var(--tx3)}.live.live i{background:var(--grn,#16a34a);box-shadow:0 0 0 3px #16a34a22}.live.polling i{background:var(--amb,#d97706)}.live.offline i{background:var(--red,#e5484d)}
@media(max-width:760px){.live{bottom:70px;right:10px}}
/* ---- reconnecting banner (live.js) */
.live-banner{position:fixed;left:50%;top:12px;transform:translateX(-50%);z-index:70;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 24px);padding:8px 10px 8px 14px;border-radius:10px;background:#fff7ed;border:1px solid #fdba74;color:#9a3412;box-shadow:var(--sh);font:500 13px var(--f)}
.live-banner i{flex:none;width:8px;height:8px;border-radius:50%;background:#ea580c;animation:livepulse 1.2s infinite}
.live-banner button{flex:none;border:1px solid #fdba74;background:#fff;color:#9a3412;border-radius:7px;padding:3px 9px;font:600 12px var(--f);cursor:pointer}
@keyframes livepulse{50%{opacity:.3}}
@media(max-width:760px){.live-banner{top:8px;left:8px;right:8px;transform:none;max-width:none;font-size:12px}}
