:root{--teal:#06484a;--teal2:#043b3d;--teal3:#0a5a5c;--green:#16c45b;--green2:#0fae4e;--greenbg:#e9f9ef;--greenline:#22c55e;--ink:#1d2433;--muted:#6b7280;--line:#e7ebef;--bg:#ffffff;--soft:#f6f8fa;--side:56px;--top:56px;--radius:10px}
*{box-sizing:border-box}html,body{margin:0;height:100%}
body{font-family:Poppins,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--ink);background:var(--bg);font-size:13px;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}button{font-family:inherit;font-size:inherit;cursor:pointer}input,select,textarea{font-family:inherit;font-size:13px}
svg.i{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
/* top bar */
.top{position:fixed;inset:0 0 auto 0;height:var(--top);background:var(--teal);display:flex;align-items:center;z-index:50;border-bottom:2px solid var(--greenline)}
.top .brand{width:var(--side);display:flex;justify-content:center;align-items:center;height:100%}
.top .brand img{height:30px;width:auto}
.gsearch{position:relative;margin-left:0;width:430px}
.gsearch input{width:100%;height:30px;border-radius:6px;border:1px solid #0c5f61;background:#0b3133;color:#e8f3f3;padding:0 12px 0 32px;outline:none}
.gsearch input::placeholder{color:#9db7b8}.gsearch svg{position:absolute;left:10px;top:7px;color:#9db7b8}
.gsearch .res{position:absolute;top:36px;left:0;right:0;background:#fff;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.2);padding:6px;display:none;max-height:420px;overflow:auto}
.gsearch .res.open{display:block}.gsearch .res h6{margin:6px 8px;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.gsearch .res a{display:flex;gap:8px;align-items:center;padding:7px 8px;border-radius:6px}.gsearch .res a:hover,.gsearch .res a.sel{background:var(--greenbg)}
.top .right{margin-left:auto;display:flex;align-items:center;height:100%;color:#cfe3e3}
.plus{width:28px;height:28px;border-radius:50%;border:1.5px solid #cfe3e3;background:transparent;color:#fff;display:grid;place-items:center;margin:0 18px}
.vsep{width:1px;height:30px;background:#2c6b6d;margin:0 8px}
.ticon{position:relative;background:none;border:0;color:#cfe3e3;width:30px;height:30px;display:grid;place-items:center;border-radius:6px;margin:0 3px}.ticon:hover{background:var(--teal3);color:#fff}
.ticon .badge{position:absolute;top:1px;right:0;background:#ef4444;color:#fff;font-size:9px;border-radius:8px;padding:0 4px;line-height:14px;min-width:14px}
.uchip{display:flex;align-items:center;gap:8px;color:#fff;background:none;border:0;padding:0 18px 0 12px;height:100%;font-weight:500}
.av{width:24px;height:24px;border-radius:50%;background:var(--green);color:#fff;display:grid;place-items:center;font-size:10px;font-weight:600;text-transform:uppercase}
.av.lg{width:42px;height:42px;font-size:14px;background:#94a3b8}
.menu{position:absolute;background:var(--teal2);color:#e6f1f1;border-radius:6px;box-shadow:0 12px 30px rgba(0,0,0,.25);padding:6px;min-width:180px;z-index:80;display:none}
.menu.open{display:block}.menu h5{margin:4px 8px 8px;font-size:12px;color:#fff}.menu a,.menu button{display:flex;gap:8px;align-items:center;width:100%;background:none;border:0;color:inherit;text-align:left;padding:7px 8px;border-radius:5px;font-size:12px}.menu a:hover,.menu button:hover{background:var(--teal3)}
.menu.light{background:#fff;color:var(--ink);border:1px solid var(--line)}.menu.light a:hover,.menu.light button:hover{background:var(--greenbg)}
/* sidebar */
.side{position:fixed;top:var(--top);bottom:0;left:0;width:var(--side);background:var(--teal);z-index:40;padding-top:10px;display:flex;flex-direction:column;align-items:center;gap:6px}
.side .it{position:relative;width:34px;height:34px;border-radius:7px;display:grid;place-items:center;color:#cfe3e3}
.side .it:hover,.side .it.on{background:#0b3133;color:#fff}.side .it a.ic{width:100%;height:100%;display:grid;place-items:center;color:inherit}.side .it svg{width:17px;height:17px}
.fly{position:absolute;left:44px;top:-4px;background:#13262a;color:#e7f0f0;border-radius:6px;min-width:190px;padding:6px 0 8px;display:none;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.side .it:hover .fly{display:block}.fly h5{margin:6px 12px 8px;font-size:13px;font-weight:500;color:#fff;padding-bottom:8px;border-bottom:1px solid #2a3c40}
.fly a{display:flex;gap:6px;align-items:center;padding:7px 14px;font-size:13px}.fly a:hover{background:#1d3439}.fly a:before{content:"›";color:#9fb3b5}
.fly.tip{min-width:auto;white-space:nowrap;padding:6px 12px;top:4px}
/* main */
.main{margin-left:var(--side);padding:calc(var(--top) + 16px) 20px 30px;min-height:100vh}
.ph{display:flex;align-items:flex-start;gap:12px;margin-bottom:14px}
.ph h1{margin:0;font-size:20px;color:var(--green);font-weight:600}.ph .sub{color:var(--muted);font-size:12px;margin-top:2px}
.ph .act{margin-left:auto;display:flex;gap:8px;align-items:center}
.crumb{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:600}.crumb .home{width:30px;height:30px;border-radius:8px;background:var(--greenbg);display:grid;place-items:center;color:var(--green2);border:1px solid #c9efd7}
.crumb b{color:var(--green)}
.btn{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:6px;border:1px solid var(--green);background:#fff;color:var(--green2);font-weight:500;font-size:12px;white-space:nowrap}
.btn.solid{background:var(--green);color:#fff}.btn.solid:hover{background:var(--green2)}.btn:hover{background:var(--greenbg)}
.btn.ghost{border-color:var(--line);color:var(--ink)}.btn.dark{background:var(--teal);border-color:var(--teal);color:#fff}
.btn.red{border-color:#fecaca;color:#b91c1c}.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn.sm{height:26px;padding:0 9px;font-size:11px}
.drp{display:inline-flex;align-items:center;gap:8px;height:30px;border:1px solid var(--line);border-radius:6px;padding:0 10px;background:#fff;font-size:11px;color:var(--ink)}
.drp .x{color:var(--muted);margin-left:4px}
.pop{position:absolute;z-index:90;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 12px 30px rgba(15,23,42,.15);padding:10px;min-width:220px}
.pop .opt{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:5px;cursor:pointer}.pop .opt:hover,.pop .opt.on{background:var(--greenbg)}
.pop .opt.on{color:var(--green2);font-weight:500}
.pop input[type=text],.pop input[type=date]{width:100%;height:30px;border:1px solid var(--line);border-radius:6px;padding:0 8px;margin-bottom:6px}
.pop .row2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pop .list{max-height:260px;overflow:auto}
/* cards */
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:14px}
.card{background:#fff;border-radius:var(--radius);box-shadow:0 1px 3px rgba(16,24,40,.08),0 1px 2px rgba(16,24,40,.04);padding:16px 22px 22px;min-height:138px;border:1px solid #f0f2f4}
.card h3{margin:0 0 14px;font-size:13px;font-weight:600}
.stat{display:flex;align-items:center;justify-content:space-around;gap:10px;margin-bottom:12px}
.stat .k{text-align:center;min-width:90px}.stat .k .l{font-weight:500;font-size:12.5px}.stat .k .v{color:var(--green);font-weight:600;font-size:15px;margin-top:3px}
.chk{list-style:none;margin:0;padding:0;font-size:10.5px;color:#374151}.chk li{display:flex;align-items:center;gap:6px;margin:2px 0}
.chk li:before{content:"";width:12px;height:12px;border-radius:50%;background:var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/8px no-repeat}
.ca{display:grid;grid-template-columns:repeat(3,1fr);row-gap:16px;text-align:center}.ca .l{font-weight:500;font-size:11.5px}.ca .v{color:var(--green);font-weight:600;font-size:13px;margin-top:3px}
.illu{width:62px;height:62px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,#e0f2fe,#dcfce7)}
/* leads */
.tgl{display:inline-flex;border:2px solid var(--green);border-radius:20px;overflow:hidden;height:30px}.tgl button{border:0;background:#fff;padding:0 26px;font-size:12px;color:var(--green2)}.tgl button.on{background:var(--green);color:#fff}
.vt{display:inline-flex;gap:2px;margin-left:6px}.vt button{width:20px;height:20px;border-radius:4px;border:0;background:#eef2f5;color:#475569;display:grid;place-items:center}.vt button.on{background:#d9dee5;color:#111}.vt svg{width:12px;height:12px}
.fbar{display:flex;align-items:center;gap:6px;background:#e4f5ec;border-radius:22px;padding:6px 10px;margin-bottom:12px;flex-wrap:wrap}
.fbar .sbtn{width:30px;height:30px;border-radius:50%;background:var(--teal);color:#fff;border:0;display:grid;place-items:center}
.fbar .sinp{height:30px;border:1px solid #cde9d8;border-radius:16px;padding:0 12px;width:200px;outline:none}
.fdd{background:none;border:0;font-weight:500;font-size:11.5px;color:#1f2937;display:inline-flex;align-items:center;gap:4px;padding:6px 8px;border-radius:6px}.fdd:hover{background:#d4efdf}.fdd.set{color:var(--green2);background:#d4efdf}
.fdd svg{width:13px;height:13px}.fbar .reset{margin-left:auto}
.kb{display:flex;gap:16px;overflow-x:auto;padding-bottom:10px;align-items:flex-start;min-height:calc(100vh - 230px)}
.col{flex:0 0 152px}.col .hd{border-radius:7px 7px 0 0;color:#fff;font-weight:500;font-size:11px;padding:5px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.col .bd{display:flex;flex-direction:column;gap:9px;padding-top:12px;max-height:calc(100vh - 250px);overflow-y:auto;padding-right:3px}
.lc{background:#fff;border-radius:6px;box-shadow:0 1px 4px rgba(15,23,42,.12);border-left:3px solid var(--c,#16c45b);padding:9px 9px 8px;font-size:10px;cursor:pointer;color:#374151}
.lc:hover{box-shadow:0 4px 12px rgba(15,23,42,.18)}
.lc .t{display:flex;gap:4px;justify-content:space-between;font-weight:600;font-size:11px;color:#111827;border-bottom:1px solid var(--line);padding-bottom:6px;margin-bottom:6px;word-break:break-word}
.lc .t svg{width:12px;height:12px;color:#6b7280}
.lc .r{display:flex;align-items:center;gap:5px;margin:3px 0;color:#4b5563}.lc .r svg{width:11px;height:11px;color:#6b7280}
.lc .pr{color:#15803d;display:flex;align-items:center;gap:4px;margin:4px 0;font-weight:500;background:none;border:0;padding:0;font-size:10px}
.lc .pr svg{fill:#16c45b;stroke:#16c45b;width:10px;height:10px}
.lc .ts{background:#eefbf3;color:#166534;border-radius:3px;padding:3px 5px;margin-top:5px;display:block}.lc .up{color:#374151;margin-top:6px;display:block}
.lc .warn{display:block;background:#fff7ed;color:#c2410c;border-radius:3px;padding:3px 5px;margin-top:5px;font-weight:500}
.col .more{border:1px dashed #cbd5e1;background:#fff;border-radius:6px;padding:6px;font-size:11px;color:var(--muted)}
.col .empty{color:#9ca3af;font-size:11px;text-align:center;padding:16px 0}
/* tables */
.tw{overflow:auto;border-radius:6px}.tbl{width:100%;border-collapse:collapse;font-size:11.5px}
.tbl th{color:var(--green);font-weight:600;text-align:left;padding:12px 10px;border-bottom:1px solid var(--line);white-space:nowrap;position:sticky;top:0;background:#fff;cursor:pointer;user-select:none;font-size:11px}
.tbl th.nosort{cursor:default}.tbl th .ar{color:#9aa4b2;margin-left:4px;font-size:10px}
.tbl td{padding:12px 10px;border-bottom:1px solid #f1f3f5;white-space:nowrap;color:#1f2937;font-weight:500}.tbl tr.cl{cursor:pointer}.tbl tr.cl:hover td{background:#f7fcf9}
.pg{display:flex;justify-content:flex-end;align-items:center;gap:18px;padding:12px 6px;font-size:11px;color:#4b5563}.pg select{border:0;background:none}.pg button{background:none;border:0;color:#374151;font-size:14px;padding:2px 6px}.pg button[disabled]{color:#cbd5e1}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:10px}.tabs button{background:none;border:0;padding:8px 10px;color:#1f2937;font-size:12px;border-bottom:2px solid transparent;font-weight:500}.tabs button.on{color:var(--green2);border-bottom-color:var(--green)}
.tools{display:flex;gap:8px;align-items:flex-end;margin:10px 0;flex-wrap:wrap}.tools .fld{display:flex;flex-direction:column;font-size:10px;color:#4b5563}
.tools input.srch{height:30px;width:200px;border:1px solid #cfd6dd;border-radius:6px;padding:0 10px;outline:none}
.sel{height:30px;min-width:120px;border:1px solid #cfd6dd;border-radius:6px;padding:0 8px;background:#fff;font-size:11.5px}
.counters{display:flex;justify-content:center;gap:6px;margin:-8px 0 14px}.counters .card{min-height:auto;width:240px;text-align:center;padding:12px}.counters .card .l{font-weight:600;font-size:12px}.counters .card .v{color:var(--green);font-weight:600;font-size:16px;margin-top:6px}
.pill{display:inline-block;padding:2px 8px;border-radius:10px;font-size:10.5px;font-weight:500;background:#eef2f5;color:#334155}
.pill.g{background:var(--greenbg);color:#15803d}.pill.y{background:#fef9c3;color:#854d0e}.pill.r{background:#fee2e2;color:#b91c1c}.pill.b{background:#dbeafe;color:#1e40af}
/* reports */
.rgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px 18px}.rc{border-left:3px solid var(--green);background:#fff;border-radius:6px;box-shadow:0 1px 3px rgba(16,24,40,.08);padding:12px 8px 12px 10px}
.rc .h{display:flex;align-items:center;gap:10px}.rc .h .ic{width:22px;height:22px;display:grid;place-items:center;color:#334155}.rc .h b{font-size:13.5px;font-weight:600}.rc .h .tag{margin-left:auto;border:1px solid #bbf7d0;color:#15803d;border-radius:5px;font-size:9.5px;padding:2px 6px}
.rc p{margin:10px 0 8px;font-size:11px;color:#374151}.rc .ft{display:flex;gap:8px;padding-left:8px}.rc .dl{flex:1;justify-content:center;height:26px;font-size:11px}
.rc .pv{width:26px;height:26px;padding:0;justify-content:center}
.chips{display:flex;gap:8px;margin:2px 0 16px}.chips span{background:var(--greenbg);color:#166534;border-radius:5px;padding:3px 8px;font-size:10.5px;font-weight:500}.chips span+span{background:#fff;border:1px solid #d1fae5}
/* lead detail overlay */
.ov{position:fixed;inset:var(--top) 0 0 var(--side);background:rgba(15,23,42,.35);z-index:45;display:flex}
.ldl{width:300px;background:#fff;overflow-y:auto;padding:14px 18px 30px;border-right:1px solid var(--line);flex:none}
.ldr{flex:1;background:#fff;overflow:auto;display:flex;flex-direction:column;margin-left:8px}
.back{display:flex;align-items:center;gap:10px;color:var(--green);font-weight:500;font-size:14px;margin:6px 0 16px;background:none;border:0;padding:0}
.who{display:flex;gap:10px;align-items:center}.who b{font-size:13px;font-weight:500}.who small{display:block;color:var(--muted);font-size:10.5px}
.qa{display:flex;gap:6px;margin:12px 0 18px}.qa button,.qa a{width:30px;height:30px;border-radius:50%;border:1px solid #d6dbe1;background:#f8fafc;display:grid;place-items:center;color:#334155}.qa button:hover,.qa a:hover{border-color:var(--green);color:var(--green2)}
.about{border-top:1px solid var(--line);padding-top:12px}.about .hh{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.about .hh b{color:var(--green);font-weight:500;font-size:13.5px}
.edit{width:26px;height:26px;border-radius:50%;background:var(--greenbg);border:0;color:var(--green2);display:grid;place-items:center}
.kv{margin:9px 0}.kv .k{font-size:10.5px;color:#4b5563}.kv .v{font-size:12px;font-weight:500;margin-top:2px;word-break:break-word;min-height:4px}
.kv input,.kv select{width:100%;height:28px;border:1px solid #d1d5db;border-radius:5px;padding:0 6px;margin-top:3px}
.prog{background:#fff;padding:12px 14px 14px;box-shadow:0 2px 8px rgba(15,23,42,.08);border-radius:0 0 10px 10px}.prog h4{margin:0 0 12px;font-size:12px;font-weight:500}
.steps{display:flex;align-items:center;gap:8px;overflow-x:auto;padding-bottom:8px}.steps button{flex:none;border:0;border-radius:18px;height:30px;min-width:106px;padding:0 18px;font-weight:500;font-size:11px;color:#fff;opacity:.55}
.steps button.done{opacity:.85}.steps button.cur{opacity:1;box-shadow:0 0 0 3px rgba(22,196,91,.25);font-weight:600}.steps .ch{color:#9ca3af;flex:none}
.ltabs{padding:12px 10px 0}.tl{padding:0 10px 30px}.tl .e{display:flex;justify-content:space-between;gap:14px;padding:14px 12px;border-bottom:1px solid #f1f3f5}.tl .e b{font-weight:500;font-size:12px}.tl .e p{margin:5px 0 0;font-size:11px;color:#374151}
.tl .e .d{color:var(--green2);font-size:10.5px;white-space:nowrap;display:flex;gap:5px;align-items:flex-start;font-weight:500}.tl .e .d svg{width:12px;height:12px}
.tl .e.sys b{color:#0f766e}.tl .e.alert{background:#fff7ed}
.form{display:grid;gap:10px;padding:12px;background:var(--soft);border-radius:8px;margin:10px}.form .r{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.form label{display:flex;flex-direction:column;font-size:10.5px;color:#4b5563;gap:3px}.form input,.form select,.form textarea{border:1px solid #d1d5db;border-radius:6px;padding:6px 8px;background:#fff}.form textarea{min-height:60px}
.banner{margin:10px;border-radius:8px;padding:10px 12px;font-size:11.5px;display:flex;gap:10px;align-items:center}.banner.warn{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.banner.info{background:#f0f9ff;color:#075985;border:1px solid #bae6fd}
/* modal + toast */
.mb{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:100;display:grid;place-items:center;padding:20px}
.md{background:#fff;border-radius:12px;width:min(640px,100%);max-height:90vh;overflow:auto;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.md.wide{width:min(1100px,100%)}.md .mh{display:flex;align-items:center;padding:14px 18px;border-bottom:1px solid var(--line)}.md .mh b{font-size:15px;color:var(--green2);font-weight:600}.md .mh button{margin-left:auto;background:none;border:0;font-size:20px;color:var(--muted)}
.md .mc{padding:16px 18px}.md .mf{display:flex;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid var(--line)}
.md .fg{display:grid;grid-template-columns:1fr 1fr;gap:12px}.md label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#4b5563}.md label.full{grid-column:1/-1}
.md input,.md select,.md textarea{height:34px;border:1px solid #d1d5db;border-radius:6px;padding:0 10px;background:#fff}.md textarea{height:70px;padding:8px 10px}
.md .chkl{flex-direction:row;align-items:center;gap:8px}.md .chkl input{height:auto}
.err{color:#b91c1c;font-size:11.5px;margin-top:8px}
.toasts{position:fixed;right:18px;bottom:18px;z-index:200;display:flex;flex-direction:column;gap:8px}.toast{background:#0f2f31;color:#fff;padding:10px 14px;border-radius:8px;font-size:12px;box-shadow:0 8px 20px rgba(0,0,0,.2);max-width:380px;border-left:4px solid var(--green)}.toast.warn{border-left-color:#f59e0b}.toast.err{border-left-color:#ef4444}
.notif{width:360px;max-height:440px;overflow:auto;right:150px;top:52px}.notif .n{padding:8px;border-bottom:1px solid #1d4a4c;font-size:11.5px}.notif .n.unread{background:#0b5153}.notif .n small{display:block;color:#9fc0c1;margin-top:3px}
/* login */
.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(160deg,var(--teal) 0%,#032b2c 100%)}
.lbox{background:#fff;border-radius:14px;padding:30px 34px;width:min(380px,92vw);box-shadow:0 30px 60px rgba(0,0,0,.35)}
.lbox .lg{background:var(--teal);border-radius:10px;display:grid;place-items:center;padding:16px;margin-bottom:18px}.lbox .lg img{height:96px}
.lbox h2{margin:0 0 4px;font-size:18px}.lbox p{margin:0 0 18px;color:var(--muted);font-size:12px}
.lbox label{display:block;font-size:11px;color:#4b5563;margin-bottom:12px}.lbox input{width:100%;height:38px;border:1px solid #d1d5db;border-radius:7px;padding:0 10px;margin-top:4px}
.lbox .btn{width:100%;justify-content:center;height:38px;font-size:13px}.demo{margin-top:14px;font-size:11px;color:var(--muted);background:var(--soft);border-radius:8px;padding:8px 10px}
.muted{color:var(--muted)}.mt{margin-top:14px}
.box{background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}.kpis .card{min-height:auto;padding:12px 16px}.kpis .l{font-size:11px;color:var(--muted)}.kpis .v{font-size:18px;font-weight:600;color:var(--green2)}
@media (max-width:1100px){.grid3{grid-template-columns:1fr 1fr}.grid4,.rgrid{grid-template-columns:1fr 1fr}.gsearch{width:260px}}
@media (max-width:700px){.grid3,.grid4,.rgrid,.kpis{grid-template-columns:1fr}.gsearch{display:none}.ldl{width:100%}.ov{flex-direction:column;overflow:auto}.ldr{margin:0}}
