:root{
  --bg:#f4f6f9;
  --card:#ffffff;
  --ink:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --brand:#1a6ee0;
  --brand-dark:#1457b3;
  --brand-soft:#e8f1fd;
  --ok:#0e9f6e;
  --ok-soft:#e3f8ef;
  --warn:#d97706;
  --warn-soft:#fdf3e3;
  --bad:#dc2626;
  --bad-soft:#fdeaea;
  --radius:14px;
  --shadow:0 1px 2px rgba(15,23,42,.04),0 8px 24px rgba(15,23,42,.06);
  --shadow-sm:0 1px 2px rgba(15,23,42,.06);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Roboto,sans-serif;
  background:var(--bg);color:var(--ink);font-size:15px;line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{margin:0;font-weight:650;letter-spacing:-.01em}
a{color:var(--brand);text-decoration:none}
button{font-family:inherit;font-size:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}

/* ---------- 通用组件 ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  padding:10px 16px;border-radius:10px;font-weight:600;font-size:14px;
  background:var(--brand);color:#fff;transition:.15s;white-space:nowrap;
}
.btn:hover{background:var(--brand-dark)}
.btn:active{transform:scale(.98)}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow-sm)}
.btn.ghost:hover{background:#f8fafc}
.btn.soft{background:var(--brand-soft);color:var(--brand-dark)}
.btn.soft:hover{background:#dbe9fb}
.btn.wa{background:#25d366;color:#fff}
.btn.wa:hover{background:#1eb955}
.btn.ok{background:var(--ok)}
.btn.sm{padding:6px 11px;font-size:13px;border-radius:8px}
.btn.block{width:100%}
.btn:disabled{opacity:.5;cursor:not-allowed}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);border:1px solid rgba(226,232,240,.7)}
.pill{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:600;background:#eef2f7;color:var(--muted);white-space:nowrap}
.pill.ok{background:var(--ok-soft);color:#06724f}
.pill.warn{background:var(--warn-soft);color:#a5590a}
.pill.bad{background:var(--bad-soft);color:#a91b1b}
.pill.info{background:var(--brand-soft);color:var(--brand-dark)}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.field label{font-size:13px;font-weight:600;color:var(--muted)}
.field input,.field select,.field textarea{
  padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;
  outline:none;transition:.15s;width:100%;
}
.field textarea{resize:vertical;min-height:96px;line-height:1.5}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(26,110,224,.12)}
.muted{color:var(--muted)}
.small{font-size:13px}
.tiny{font-size:12px}
.hidden{display:none!important}
.row{display:flex;align-items:center;gap:10px}
.between{display:flex;align-items:center;justify-content:space-between;gap:10px}
.empty{padding:44px 20px;text-align:center;color:var(--muted);font-size:14px}

/* ---------- 登录页 ---------- */
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px;
  background:radial-gradient(1000px 500px at 50% -10%,#dce9fb 0%,var(--bg) 60%)}
.login-card{width:100%;max-width:400px;background:#fff;border-radius:20px;padding:32px 26px;box-shadow:0 12px 48px rgba(15,23,42,.1)}
.logo{display:flex;align-items:center;gap:10px;margin-bottom:22px}
.logo-mark{width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,#1a6ee0,#38bdf8);display:grid;place-items:center;color:#fff;font-weight:800;font-size:18px}
.logo-mark svg{width:22px;height:22px}
.logo b{font-size:17px;letter-spacing:-.02em}
.logo span{display:block;font-size:11.5px;color:var(--muted);font-weight:500}

/* ---------- 业务员端 ---------- */
.appbar{
  position:sticky;top:0;z-index:20;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);padding:12px 16px;display:flex;align-items:center;justify-content:space-between;
}
.appbar .who{font-size:14px;font-weight:650}
.appbar .where{font-size:11.5px;color:var(--muted);font-weight:500}
.phone{max-width:520px;margin:0 auto;padding:16px 14px 96px}
.stat-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
.stat-strip .cell{background:#fff;border-radius:12px;padding:10px 8px;text-align:center;box-shadow:var(--shadow-sm);border:1px solid rgba(226,232,240,.7)}
.stat-strip .v{font-size:19px;font-weight:750;letter-spacing:-.02em}
.stat-strip .k{font-size:11px;color:var(--muted);margin-top:1px}
.day-label{display:flex;align-items:center;justify-content:space-between;margin:18px 2px 10px}
.day-label h3{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:700}
.task{background:#fff;border-radius:14px;box-shadow:var(--shadow);margin-bottom:12px;overflow:hidden;border:1px solid rgba(226,232,240,.7)}
.task-head{padding:14px 14px 12px;display:flex;gap:11px}
.task-idx{width:26px;height:26px;border-radius:8px;background:var(--brand-soft);color:var(--brand-dark);display:grid;place-items:center;font-size:12.5px;font-weight:750;flex:0 0 auto}
.task-title{font-weight:650;font-size:15.5px;line-height:1.3}
.task-sub{font-size:12.5px;color:var(--muted);margin-top:2px}
.task-purpose{font-size:12.5px;color:#334155;margin-top:6px;background:#f8fafc;border-radius:7px;padding:5px 8px;display:inline-block}
.task-body{padding:0 14px 14px;display:flex;flex-direction:column;gap:9px}
.geo-box{border-radius:10px;padding:9px 11px;font-size:13px;display:flex;align-items:center;gap:8px;font-weight:600}
.geo-box.ok{background:var(--ok-soft);color:#06724f}
.geo-box.bad{background:var(--warn-soft);color:#a5590a}
.geo-box.neutral{background:#f1f5f9;color:var(--muted)}
.thumbs{display:flex;gap:7px;flex-wrap:wrap}
.thumbs img{width:62px;height:62px;object-fit:cover;border-radius:9px;border:1px solid var(--line)}
.thumbs .add{width:62px;height:62px;border-radius:9px;border:1.5px dashed #c8d3e2;display:grid;place-items:center;color:var(--muted);font-size:22px;background:#fbfdff}
.tabs-bottom{position:fixed;bottom:0;left:0;right:0;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-top:1px solid var(--line);display:flex;max-width:520px;margin:0 auto}
.tabs-bottom button{flex:1;padding:9px 4px 11px;font-size:11px;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:3px;font-weight:600}
.tabs-bottom button.on{color:var(--brand)}
.tabs-bottom svg{width:21px;height:21px}

/* 报告表单 */
.sheet{position:fixed;inset:0;z-index:60;background:rgba(15,23,42,.45);display:flex;align-items:flex-end;justify-content:center;backdrop-filter:blur(2px)}
.sheet-in{background:#fff;width:100%;max-width:520px;border-radius:18px 18px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom));max-height:92vh;overflow:auto;animation:up .22s ease}
@keyframes up{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.sheet-head h3{font-size:16px}
.chips{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:14px}
.chip{padding:7px 12px;border-radius:999px;border:1px solid var(--line);font-size:13px;font-weight:600;color:#475569;background:#fff}
.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}

/* ---------- 管理端 ---------- */
.topnav{position:sticky;top:0;z-index:30;background:#fff;border-bottom:1px solid var(--line);padding:0 20px;display:flex;align-items:center;gap:24px;height:58px}
.topnav .logo{margin:0;gap:9px}
.topnav nav{display:flex;gap:2px;height:100%}
.topnav nav button{padding:0 14px;height:100%;font-size:14px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;transition:.15s}
.topnav nav button:hover{color:var(--ink)}
.topnav nav button.on{color:var(--brand);border-bottom-color:var(--brand)}
.topnav .right{margin-left:auto;display:flex;align-items:center;gap:10px}
.wrap{max-width:1280px;margin:0 auto;padding:22px 20px 60px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.page-head h1{font-size:21px;letter-spacing:-.02em}
.page-head .sub{font-size:13px;color:var(--muted);margin-top:3px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:18px}
.kpi{background:#fff;border-radius:14px;padding:15px 16px;box-shadow:var(--shadow);border:1px solid rgba(226,232,240,.7)}
.kpi .l{font-size:12.5px;color:var(--muted);font-weight:600;display:flex;align-items:center;gap:6px}
.kpi .v{font-size:27px;font-weight:750;letter-spacing:-.03em;margin-top:6px;line-height:1.1}
.kpi .d{font-size:12px;color:var(--muted);margin-top:3px}
.bar{height:6px;border-radius:99px;background:#eef2f7;overflow:hidden;margin-top:9px}
.bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#1a6ee0,#38bdf8)}
.bar.g i{background:linear-gradient(90deg,#0e9f6e,#34d399)}
.grid2{display:grid;grid-template-columns:1.35fr 1fr;gap:16px;align-items:start}
@media(max-width:960px){.grid2{grid-template-columns:1fr}}
.panel{background:#fff;border-radius:14px;box-shadow:var(--shadow);border:1px solid rgba(226,232,240,.7);overflow:hidden}
.panel-head{padding:14px 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}
.panel-head h3{font-size:14.5px}
.panel-body{padding:14px 16px}
table{width:100%;border-collapse:collapse;font-size:13.5px}
th{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:700;padding:9px 12px;border-bottom:1px solid var(--line);white-space:nowrap;background:#fbfcfe}
td{padding:10px 12px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
tbody tr:hover{background:#fbfdff}
tbody tr:last-child td{border-bottom:none}
.rank{width:22px;height:22px;border-radius:7px;background:#f1f5f9;display:inline-grid;place-items:center;font-size:12px;font-weight:750;color:var(--muted)}
.rank.r1{background:#fff4d6;color:#a16207}
.rank.r2{background:#eef2f7;color:#475569}
.rank.r3{background:#fdeee3;color:#9a5b2a}
.mini-bar{width:64px;height:5px;border-radius:99px;background:#eef2f7;overflow:hidden;display:inline-block;vertical-align:middle}
.mini-bar i{display:block;height:100%;background:var(--ok);border-radius:99px}
.rep-cell{display:flex;align-items:center;gap:9px}
.avatar{width:29px;height:29px;border-radius:50%;background:linear-gradient(135deg,#dbe9fb,#eef6ff);color:var(--brand-dark);display:grid;place-items:center;font-size:12px;font-weight:750;flex:0 0 auto}
.list-row{display:flex;gap:11px;padding:11px 0;border-bottom:1px solid #f1f5f9}
.list-row:last-child{border-bottom:none}
.list-row .dot{width:8px;height:8px;border-radius:50%;margin-top:7px;flex:0 0 auto}
.toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.toolbar select,.toolbar input{padding:8px 11px;border:1px solid var(--line);border-radius:9px;background:#fff;font-size:13.5px}
.modal{position:fixed;inset:0;z-index:80;background:rgba(15,23,42,.45);display:grid;place-items:center;padding:20px;backdrop-filter:blur(2px)}
.modal-in{background:#fff;border-radius:16px;width:100%;max-width:560px;max-height:86vh;overflow:auto;padding:20px;box-shadow:0 24px 64px rgba(15,23,42,.2)}
.check-list{max-height:280px;overflow:auto;border:1px solid var(--line);border-radius:10px}
.check-list label{display:flex;align-items:center;gap:9px;padding:9px 12px;border-bottom:1px solid #f1f5f9;font-size:13.5px;cursor:pointer;white-space:nowrap}
.check-list label:last-child{border-bottom:none}
.check-list label:hover{background:#f8fafc}
.check-list input{width:16px;height:16px;accent-color:var(--brand)}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.photo-grid img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:9px;border:1px solid var(--line)}
.report-text{background:#f8fafc;border-radius:10px;padding:11px 13px;font-size:13.5px;line-height:1.6;white-space:pre-wrap;border:1px solid #eef2f7}
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%) translateY(10px);background:#0f172a;color:#fff;padding:10px 18px;border-radius:10px;font-size:13.5px;font-weight:500;opacity:0;pointer-events:none;transition:.25s;z-index:200;box-shadow:0 8px 28px rgba(15,23,42,.3)}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:720px){
  .topnav{padding:0 12px;gap:12px}
  .topnav nav button{padding:0 8px;font-size:13px}
  .wrap{padding:16px 12px 60px}
  .hide-sm{display:none}
}
