:root{
  --orange:#FF6B00; --orange-d:#E25C00; --orange-soft:#FFF1E8;
  --ink:#1B1F24; --muted:#7A828C; --line:#E6E9ED; --bg:#F4F6F8; --card:#fff;
  --blue:#2D6BE3; --green:#1FA463; --red:#D64545; --green-soft:#E8F6EF;
  --r:14px; --sh:0 1px 3px rgba(20,30,45,.06),0 8px 24px rgba(20,30,45,.05);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;background:var(--bg);color:var(--ink);overflow-x:hidden;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:15px;line-height:1.45}
button{font-family:inherit}
a{color:inherit;text-decoration:none}
.hidden{display:none!important}

/* layout */
.app{max-width:560px;margin:0 auto;min-height:100vh;background:var(--bg);
  display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid var(--line);
  display:flex;align-items:center;gap:10px;padding:12px 16px}
.topbar .logo{display:flex;align-items:center;gap:9px;font-weight:800;font-size:17px}
.topbar .logo .mark{width:26px;height:26px;border-radius:7px;background:var(--orange);
  display:grid;place-items:center;color:#fff;font-size:15px}
.topbar .sp{flex:1}
.topbar .who{font-size:12px;color:var(--muted);text-align:right;line-height:1.2}
.topbar .who b{display:block;color:var(--ink);font-size:13px}
.content{flex:1;padding:16px;padding-bottom:90px}

/* bottom nav */
.tabbar{position:fixed;bottom:0;left:0;right:0;max-width:560px;margin:0 auto;background:#fff;
  border-top:1px solid var(--line);display:flex;z-index:20}
.tabbar button{flex:1;border:0;background:none;padding:9px 4px 10px;color:var(--muted);
  font-size:11px;font-weight:600;display:flex;flex-direction:column;align-items:center;gap:3px;cursor:pointer}
.tabbar button .i{font-size:19px;line-height:1}
.tabbar button.on{color:var(--orange)}

/* cards / blocks */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);
  padding:15px;margin-bottom:12px;box-shadow:var(--sh)}
.h1{font-size:21px;font-weight:800;margin:4px 0 14px}
.h2{font-size:13px;font-weight:700;color:var(--muted);text-transform:uppercase;
  letter-spacing:.5px;margin:20px 2px 10px}
.sub{color:var(--muted);font-size:13px;margin:0 0 14px}
.muted{color:var(--muted)}
.row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.infoline{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--line);font-size:14px}
.infoline:last-child{border:0}
.infoline .k{color:var(--muted)}
.infoline .v{font-weight:600;text-align:right}
.note{background:#FAFBFC;border:1px dashed var(--line);border-radius:12px;padding:13px;
  font-size:13px;color:var(--muted)}
.note b{color:var(--ink)}

/* buttons */
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;border:0;
  background:var(--orange);color:#fff;font-size:15px;font-weight:700;padding:14px;border-radius:13px;cursor:pointer}
.btn:active{filter:brightness(.96)}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--line)}
.btn.danger{background:#fff;color:var(--red);border:1px solid #f3c9c9}
.btn.sm{width:auto;padding:9px 14px;font-size:13px;border-radius:10px}
.btn[disabled]{opacity:.5;pointer-events:none}

/* forms */
.fld{display:block;margin-bottom:13px}
.fld .cap{display:block;font-size:12px;color:var(--muted);margin-bottom:6px;font-weight:600}
.inp{width:100%;border:1px solid var(--line);border-radius:12px;padding:13px;font-size:15px;
  background:#fff;color:var(--ink);outline:none}
.inp:focus{border-color:var(--orange)}
.seg{display:flex;gap:8px}
.seg .opt{flex:1;text-align:center;border:1px solid var(--line);border-radius:12px;padding:12px;
  font-size:14px;font-weight:600;cursor:pointer;background:#FAFBFC}
.seg.col{flex-direction:column}.seg.col .opt{text-align:left}
.seg .opt.on{border-color:var(--orange);background:var(--orange-soft);color:var(--orange-d)}
.check{display:flex;gap:10px;align-items:flex-start;font-size:13px;color:var(--muted);cursor:pointer}
.check input{margin-top:2px;width:18px;height:18px;accent-color:var(--orange);flex:none}

/* lead list */
.lead{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);
  border-radius:13px;padding:13px;margin-bottom:10px;cursor:pointer;box-shadow:var(--sh)}
.lead:active{transform:scale(.995)}
.lead .av{width:42px;height:42px;border-radius:11px;background:var(--orange-soft);color:var(--orange-d);
  display:grid;place-items:center;font-weight:800;font-size:15px;flex:none}
.lead .lt{flex:1;min-width:0}
.lead .lt b{font-size:15px}
.lead .lt small{display:block;color:var(--muted);font-size:12px;margin-top:2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lead .chev{color:#c2c8cf;font-size:22px;font-weight:700;flex:none}
.pill{font-size:11px;font-weight:700;padding:4px 9px;border-radius:7px;white-space:nowrap}
.pill.blue{background:#EAF1FF;color:var(--blue)}
.pill.green{background:var(--green-soft);color:var(--green)}
.pill.gray{background:#EEF1F4;color:var(--muted)}
.pill.orange{background:var(--orange-soft);color:var(--orange-d)}
.pill.red{background:#FCE9E9;color:var(--red)}

/* funnel */
.stage{border:1px solid var(--line);border-radius:13px;padding:13px;margin-bottom:10px;background:#fff}
.stage.cur{border-color:var(--orange);background:var(--orange-soft)}
.stage.done{opacity:.92}
.stage .sh{display:flex;align-items:center;gap:11px}
.stage .num{width:30px;height:30px;border-radius:9px;background:#EEF1F4;color:var(--muted);
  display:grid;place-items:center;font-weight:800;font-size:14px;flex:none}
.stage.cur .num{background:var(--orange);color:#fff}
.stage.done .num{background:var(--green);color:#fff}
.stage .st{flex:1}
.stage .st b{font-size:15px}.stage .st small{display:block;color:var(--muted);font-size:12px}
.subs{margin:11px 0 2px;padding-left:42px;display:flex;flex-direction:column;gap:9px}
.subs .s{display:flex;align-items:center;gap:9px;font-size:14px;cursor:pointer}
.subs .s .dot{width:16px;height:16px;border-radius:50%;border:2px solid #cfd6dd;flex:none}
.subs .s.on .dot{background:var(--green);border-color:var(--green)}
.subs .s.on{color:var(--ink)}
.subs .s .dot.cur{border-color:var(--orange);background:var(--orange)}

/* commission box */
.calc{background:linear-gradient(180deg,#fff,#FFF7F1);border:1px solid #ffe2cf;border-radius:13px;padding:15px}
.calc .big{font-size:26px;font-weight:800;color:var(--orange-d)}
.calc table{width:100%;border-collapse:collapse;margin-top:8px;font-size:13px}
.calc td{padding:5px 0;border-bottom:1px solid #f0e3d8}
.calc td:last-child{text-align:right;font-weight:700}
.calc tr:last-child td{border:0}

/* reminders */
.rem{display:flex;gap:11px;align-items:center;background:#fff;border:1px solid var(--line);
  border-radius:13px;padding:13px;margin-bottom:10px}
.rem.hot{border-color:#ffd9bf;background:var(--orange-soft)}
.rem .ic{width:38px;height:38px;border-radius:11px;background:#EAF1FF;color:var(--blue);
  display:grid;place-items:center;font-size:17px;flex:none}
.rem .rt{flex:1;min-width:0;cursor:pointer}
.rem .rt b{font-size:14px}.rem .rt small{display:block;color:var(--muted);font-size:12px;margin-top:1px}
.rem .dpill{flex:none;background:#EEF1F4;color:var(--muted);font-size:11px;font-weight:700;padding:4px 8px;border-radius:7px;white-space:nowrap}
.rem .chev{color:#c2c8cf;font-size:22px;flex:none}

/* appbar (sub-page) */
.appbar{display:flex;align-items:center;gap:6px;margin:-4px 0 10px}
.appbar .back{width:36px;height:36px;border-radius:10px;border:1px solid var(--line);background:#fff;
  font-size:20px;cursor:pointer;display:grid;place-items:center}
.appbar .ttl{font-weight:800;font-size:18px}

/* modal sheet */
.modal{position:fixed;inset:0;background:rgba(16,22,30,.45);z-index:40;display:none;
  align-items:flex-end;justify-content:center}
.modal.open{display:flex}
.sheet{background:#fff;width:100%;max-width:560px;border-radius:20px 20px 0 0;padding:18px 18px 26px;
  animation:up .2s ease}
@keyframes up{from{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}
.grab{width:40px;height:4px;border-radius:3px;background:#dfe3e8;margin:0 auto 12px}
.sheet h3{margin:2px 0 4px;font-size:18px}

/* toast */
.toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%) translateY(20px);
  background:#1B1F24;color:#fff;padding:11px 18px;border-radius:12px;font-size:14px;font-weight:600;
  opacity:0;transition:.25s;z-index:60;max-width:90%;text-align:center}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* login */
.login{max-width:380px;margin:0 auto;padding-top:8vh}
.login .brand{text-align:center;margin-bottom:26px}
.login .brand .mark{width:56px;height:56px;border-radius:15px;background:var(--orange);color:#fff;
  display:grid;place-items:center;font-size:30px;margin:0 auto 12px}
.login .brand h1{font-size:23px;margin:0}
.login .brand p{color:var(--muted);font-size:13px;margin:5px 0 0}
.linkbtn{background:none;border:0;color:var(--orange-d);font-weight:700;font-size:13px;cursor:pointer;padding:8px}
.spinner{width:18px;height:18px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;
  animation:spin .7s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}
.empty{text-align:center;color:var(--muted);padding:40px 20px}
.empty .e{font-size:40px;margin-bottom:10px}
