﻿/* ============ 基础 ============ */
:root{
  --bg:#F4F5F8; --card:#fff; --ink:#12151C; --sub:#8B919E; --line:#EBEEF3;
  --brand:#0A59F7; --brand2:#4C8DFF; --brandsoft:#EAF1FF;
  --red:#E8402A; --amber:#FF8A00; --green:#12A56A;
  --r-lg:20px; --r-md:16px; --r-sm:12px;
  --shadow:0 1px 2px rgba(16,24,40,.05);
  --shadow-lift:0 1px 2px rgba(16,24,40,.05),0 10px 24px -14px rgba(10,89,247,.55);
  --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;height:100%}
body{
  font-family:"HarmonyOS Sans SC","HarmonyOS Sans","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  background:var(--bg); color:var(--ink); font-size:14px; line-height:1.5;
  -webkit-font-smoothing:antialiased; overflow:hidden;
}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0}
input,textarea,select{font:inherit;color:inherit;background:none;border:0;outline:none}
input::placeholder,textarea::placeholder{color:#B4BAC6}
a{color:var(--brand);text-decoration:none}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:#D9DEE7;border-radius:8px}
::-webkit-scrollbar-track{background:transparent}

.chip{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:8px;
  font-size:11.5px;background:#F2F4F8;color:#5C6472;white-space:nowrap;flex:none}
.chip.hi{background:#FFEDE9;color:#D63A21}
.chip.mid{background:#FFF3E2;color:#C47000}
.chip.go{background:var(--brandsoft);color:var(--brand)}
.chip.ok{background:#E6F7EF;color:var(--green)}
.chip.over{background:#FFEDE9;color:#D63A21}
.bar{height:6px;border-radius:4px;background:#E9ECF2;overflow:hidden}
.bar>i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,var(--brand),var(--brand2));transition:width .25s}
.muted{color:var(--sub)}
.empty{padding:44px 20px;text-align:center;color:#A6ACB8;font-size:13px;line-height:1.9}
.empty b{display:block;color:#5C6472;font-size:15px;margin-bottom:6px;font-weight:600}

/* ============ 布局 ============ */
.app{height:100dvh;display:block;position:relative;background:var(--bg)}
.side{display:none}
.listpane{height:100%;display:flex;flex-direction:column;min-width:0}
.detailpane{
  position:fixed;inset:0;z-index:60;background:#fff;display:flex;flex-direction:column;
  transform:translateX(100%);transition:transform .26s ease;box-shadow:-10px 0 40px rgba(16,24,40,.10);
}
.app.detail-open .detailpane{transform:none}

/* 顶部 */
.topbar{
  flex:none;padding:14px 16px 8px;background:var(--bg);position:sticky;top:0;z-index:5;
}
.topbar .line1{display:flex;align-items:center;justify-content:space-between;gap:10px}
.topbar h1{margin:0;font-size:26px;letter-spacing:-.6px;font-weight:700}
.topbar .sub{margin:2px 0 0;font-size:12px;color:var(--sub)}
.topbar .acts{display:flex;align-items:center;gap:10px}
.iconbtn{width:34px;height:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;
  background:#fff;box-shadow:var(--shadow);color:#5C6472;flex:none}
.iconbtn:active{transform:scale(.94)}
.searchwrap{padding:8px 16px 10px;flex:none}
.searchwrap input{width:100%;height:40px;border-radius:13px;background:#fff;padding:0 14px 0 38px;
  box-shadow:var(--shadow);font-size:13.5px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B919E' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.6-3.6'/></svg>");
  background-repeat:no-repeat;background-position:14px center}

.scroll{flex:1;overflow-y:auto;overflow-x:hidden;padding:2px 16px 28px;-webkit-overflow-scrolling:touch}
.sec{display:flex;align-items:center;justify-content:space-between;margin:18px 2px 8px;
  font-size:12px;color:var(--sub)}
.sec b{font-weight:600;color:#3C4452;font-size:12.5px}
.sec:first-child{margin-top:8px}

/* ============ 任务卡 ============ */
.task{display:flex;gap:11px;padding:13px 14px;background:#fff;border-radius:var(--r-md);
  margin-bottom:8px;box-shadow:var(--shadow);position:relative;transition:box-shadow .2s,transform .12s}
.task:active{transform:scale(.995)}
.task.active{box-shadow:var(--shadow-lift)}
.task.active::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;border-radius:16px 0 0 16px;
  background:linear-gradient(var(--brand),var(--brand2))}
.task.done{opacity:.62}
.task .body{flex:1;min-width:0}
.task .r1{display:flex;align-items:center;gap:8px}
.task .title{font-size:15px;font-weight:600;letter-spacing:-.2px;flex:1;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task.done .title{color:#A8AEBA;text-decoration:line-through;font-weight:500}
.task .meta{font-size:11.5px;color:var(--sub);display:flex;align-items:center;gap:6px;margin-top:4px;flex-wrap:wrap}
.task .meta .dot{width:2px;height:2px;border-radius:50%;background:#C8CEDB;flex:none}
.task .prog{display:flex;align-items:center;gap:9px;margin-top:10px}
.task .prog .bar{flex:1}
.task .pct{font-size:11px;font-weight:700;color:var(--brand);font-variant-numeric:tabular-nums;flex:none}

.cb{flex:none;width:20px;height:20px;border-radius:7px;border:1.6px solid #C8CEDB;margin-top:2px;
  display:flex;align-items:center;justify-content:center;transition:.15s;color:#fff;font-size:12px}
.cb.on{background:var(--brand);border-color:var(--brand)}
.cb:active{transform:scale(.9)}

/* ============ 底部导航 ============ */
.tabbar{
  position:fixed;left:0;right:0;bottom:0;z-index:50;height:calc(60px + var(--safe-b));
  padding-bottom:var(--safe-b);
  background:rgba(255,255,255,.94);backdrop-filter:blur(12px);
  border-top:1px solid #EAEDF2;display:flex;align-items:center;justify-content:space-around;
}
.tb{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:10px;color:#9AA1AE;width:58px;position:relative}
.tb.on{color:var(--brand)}
.tb svg{width:22px;height:22px}
.tb .badge{position:absolute;top:-4px;right:14px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;
  background:#F04A32;color:#fff;font-size:10px;display:flex;align-items:center;justify-content:center;font-weight:600}

.fab{position:fixed;right:18px;bottom:calc(78px + var(--safe-b));z-index:49;width:54px;height:54px;border-radius:20px;
  background:linear-gradient(145deg,#2A73FF,#0A59F7);color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:26px;font-weight:300;box-shadow:0 12px 26px -8px rgba(10,89,247,.65);transition:transform .15s}
.fab:active{transform:scale(.93)}
body.detail-open-flag .fab{display:none}

/* ============ 详情 ============ */
.dtop{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:12px 14px;border-bottom:1px solid var(--line);background:#fff}
.dtop .back{display:flex;align-items:center;gap:4px;color:#5C6472;font-size:13px}
.dbody{flex:1;overflow-y:auto;padding:16px;background:#fff}
.dbody .dt-title{font-size:22px;font-weight:700;letter-spacing:-.5px;line-height:1.35;
  width:100%;resize:none;min-height:30px;margin:0 0 10px;display:block;overflow:hidden}
.dchips{display:flex;gap:7px;margin-bottom:16px;flex-wrap:wrap}
.dchips select{height:26px;padding:0 8px;border-radius:8px;font-size:12px;background:#F2F4F8;color:#5C6472;
  appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:22px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='%238B919E'><path d='M12 16 5 9h14z'/></svg>");
  background-repeat:no-repeat;background-position:right 7px center}
.dchips select.go{background-color:var(--brandsoft);color:var(--brand)}
.dchips select.hi{background-color:#FFEDE9;color:#D63A21}

.pane{background:#fff;border-radius:var(--r-md);margin-bottom:10px;border:1px solid var(--line)}
.pane.pad{padding:4px 14px}
.krow{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;
  border-bottom:1px solid #F2F4F8;font-size:13.5px}
.krow:last-child{border-bottom:0}
.krow .k{color:#8B919E;font-size:13px;flex:none}
.krow .v{display:flex;align-items:center;gap:8px;font-weight:500;min-width:0;flex-wrap:wrap;justify-content:flex-end}
.krow input[type=number]{width:44px;text-align:right;font-weight:600}
.krow select{appearance:none;-webkit-appearance:none;padding:5px 22px 5px 9px;border-radius:9px;font-size:13px;font-weight:600;
  background-color:#F4F6FA;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='%238B919E'><path d='M12 16 5 9h14z'/></svg>");background-repeat:no-repeat;background-position:right 7px center;cursor:pointer}
.krow .plain{color:#12151C;font-weight:600;background:#F4F6FA;border-radius:9px;padding:5px 9px;font-size:13px}

.progbox{padding:14px;border:1px solid var(--line);border-radius:var(--r-md);margin-bottom:10px}
.progbox .top{display:flex;align-items:baseline;justify-content:space-between}
.progbox .top span{font-size:12px;color:var(--sub)}
.progbox .top em{font-style:normal;font-size:25px;font-weight:700;letter-spacing:-1px;color:var(--brand);font-variant-numeric:tabular-nums}
.progbox .top em i{font-style:normal;font-size:13px;font-weight:600}
input[type=range]{-webkit-appearance:none;width:100%;height:22px;background:transparent;margin:6px 0 0}
input[type=range]::-webkit-slider-runnable-track{height:6px;border-radius:4px;
  background:linear-gradient(90deg,var(--brand) 0%,var(--brand2) var(--pct,0%),#E9ECF2 var(--pct,0%),#E9ECF2 100%)}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:50%;
  background:#fff;border:3px solid var(--brand);box-shadow:0 3px 8px rgba(10,89,247,.35);margin-top:-7px}
input[type=range]::-moz-range-track{height:6px;border-radius:4px;background:#E9ECF2}
input[type=range]::-moz-range-progress{height:6px;border-radius:4px;background:var(--brand)}
input[type=range]::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#fff;border:3px solid var(--brand)}

.subrow{display:flex;align-items:center;gap:10px;min-height:42px;border-bottom:1px solid #F2F4F8;font-size:13.5px}
.subrow:last-child{border-bottom:0}
.subrow .t{flex:1;min-width:0}
.subrow.done .t{color:#A8AEBA;text-decoration:line-through}
.subrow .del{color:#C8CEDB;font-size:15px;padding:4px}
.addrow{display:flex;align-items:center;gap:8px;min-height:42px;color:var(--brand);font-size:13px}
.addrow input{flex:1;font-size:13.5px;color:#12151C}

.tl{display:flex;gap:10px;padding:7px 0;position:relative}
.tl .sp{width:8px;height:8px;border-radius:50%;background:#D7DCE6;margin-top:7px;flex:none;position:relative}
.tl .sp::before{content:"";position:absolute;left:3px;top:13px;width:1.5px;height:100%;background:#EEF1F6}
.tl:last-child .sp::before{display:none}
.tl .sp.on{background:var(--brand);box-shadow:0 0 0 4px var(--brandsoft)}
.tl .c{flex:1;font-size:13px;line-height:1.5;word-break:break-word}
.tl .c time{display:block;font-size:10.5px;color:#A6ACB8;margin-top:2px;font-variant-numeric:tabular-nums}
.tl .x{color:#D5DAE3;font-size:13px;opacity:0;transition:.15s}
.tl:hover .x{opacity:1}

.dfoot{flex:none;display:flex;gap:8px;align-items:center;padding:10px 14px calc(12px + var(--safe-b));
  border-top:1px solid var(--line);background:#fff}
.dfoot input{flex:1;height:40px;border-radius:13px;background:#F2F4F8;padding:0 14px;font-size:13.5px}
.dfoot .send{width:40px;height:40px;border-radius:13px;background:var(--brand);color:#fff;
  display:flex;align-items:center;justify-content:center;flex:none}
.danger{color:#E8402A}

/* ============ 快速记录 ============ */
.sheet{position:fixed;inset:0;z-index:80;display:none}
.sheet.open{display:block}
.sheet .backdrop{position:absolute;inset:0;background:rgba(18,21,28,.34);backdrop-filter:blur(2px)}
.sheet .panel{
  position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:24px 24px 0 0;
  padding:18px 18px calc(20px + var(--safe-b));animation:up .24s ease;max-height:88dvh;overflow:auto;
}
@keyframes up{from{transform:translateY(18px);opacity:.6}to{transform:none;opacity:1}}
.sheet h3{margin:0 0 4px;font-size:17px;letter-spacing:-.2px}
.sheet .hint{font-size:12px;color:var(--sub);margin:0 0 14px}
.sheet textarea{width:100%;min-height:92px;font-size:19px;line-height:1.6;resize:none;
  background:#F6F7FA;border-radius:16px;padding:14px 16px;letter-spacing:-.2px}
.parsed{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px;min-height:26px}
.pchip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 11px;border-radius:11px;
  background:#F2F4F8;font-size:12.5px;color:#3C4452}
.pchip b{font-weight:600}
.pchip button{color:#A6ACB8;font-size:11px}
.sheet .row2{display:flex;gap:9px;margin-top:18px}
.btn{flex:1;width:100%;height:48px;border-radius:15px;display:flex;align-items:center;justify-content:center;
  font-size:15px;font-weight:600;letter-spacing:.2px}
.btn.p{background:var(--brand);color:#fff;box-shadow:0 10px 22px -10px rgba(10,89,247,.7)}
.btn.g{background:#fff;color:#3C4452;border:1px solid var(--line);box-shadow:var(--shadow)}
.btn:active{transform:scale(.985)}

/* ============ 侧栏（PC） ============ */
.who{display:flex;align-items:center;gap:10px;padding:2px 8px 16px}
.av{width:34px;height:34px;border-radius:12px;background:linear-gradient(145deg,#2A73FF,#0A59F7);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;flex:none}
.who b{font-size:13.5px;display:block}
.who span{font-size:11px;color:var(--sub)}
.nv{display:flex;align-items:center;justify-content:space-between;height:36px;padding:0 10px;border-radius:10px;
  font-size:13px;color:#4A5261;margin-bottom:2px;width:100%;text-align:left}
.nv.on{background:var(--brandsoft);color:var(--brand);font-weight:600}
.nv em{font-style:normal;font-size:11px;color:#9AA1AE;font-variant-numeric:tabular-nums}
.nv.on em{color:var(--brand)}
.grp{font-size:10.5px;color:#A6ACB8;letter-spacing:.8px;padding:16px 10px 8px}
.sync{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--green)}
.sync::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--green)}

/* ============ 统计 ============ */
.stat{display:flex;gap:10px;margin-bottom:6px}
.stat .k{flex:1;background:#fff;border-radius:var(--r-md);padding:13px 14px;box-shadow:var(--shadow)}
.stat .k em{font-style:normal;font-size:23px;font-weight:700;letter-spacing:-1px;display:block;font-variant-numeric:tabular-nums}
.stat .k span{font-size:11.5px;color:var(--sub)}
.chart{display:flex;align-items:flex-end;gap:8px;height:96px;padding:12px 14px;background:#fff;
  border-radius:var(--r-md);box-shadow:var(--shadow);margin-bottom:10px}
.chart .col{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end}
.chart .col i{display:block;width:100%;max-width:26px;border-radius:6px 6px 3px 3px;
  background:linear-gradient(180deg,var(--brand2),var(--brand));min-height:4px;transition:height .3s}
.chart .col span{font-size:10px;color:#A6ACB8}
.pjrow{background:#fff;border-radius:var(--r-md);padding:13px 14px;margin-bottom:8px;box-shadow:var(--shadow)}
.pjrow .h{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:8px}
.pjrow .h b{font-size:14.5px;letter-spacing:-.2px}
.pjrow .h span{font-size:11.5px;color:var(--sub);flex:none}
.pjrow .f{display:flex;align-items:center;gap:10px;font-size:11.5px;color:var(--sub)}
.pjrow .f .bar{flex:1}
.pjrow .f em{font-style:normal;font-weight:700;color:var(--brand);font-variant-numeric:tabular-nums;flex:none}
.pjrow .f em.over{color:var(--red)}

/* ============ PC ============ */
@media (min-width:961px){
  body{font-size:14px}
  .app{display:grid;grid-template-columns:230px 396px 1fr;height:100vh;overflow:hidden;background:var(--bg)}
  .side{display:block;background:#fff;border-right:1px solid #EAEDF2;padding:16px 12px;overflow-y:auto}
  .tabbar{display:none}
  .fab{display:none}
  .listpane{border-right:1px solid #EAEDF2;background:#F9FAFC}
  .detailpane{position:static;transform:none;box-shadow:none;border:0;background:#fff;min-width:0}
  .app.detail-open .detailpane{transform:none}
  .topbar{padding:16px 20px 6px;background:#F9FAFC}
  .scroll{padding:2px 16px 30px}
  .dtop{padding:14px 24px}
  .dtop .back{visibility:hidden}
  .dbody{padding:18px 26px;max-width:760px}
  .sheet .panel{left:50%;bottom:auto;top:50%;transform:translate(-50%,-50%);width:560px;border-radius:22px;
    animation:pop .18s ease;padding-bottom:20px}
  .sheet{display:none}
  @keyframes pop{from{transform:translate(-50%,-46%) scale(.98);opacity:0}to{transform:translate(-50%,-50%);opacity:1}}
  .fab{display:none}
  .task:hover{box-shadow:0 2px 4px rgba(16,24,40,.06),0 10px 24px -16px rgba(16,24,40,.3)}
  .dempty{display:flex;align-items:center;justify-content:center;height:100%;color:#C0C6D0;font-size:13px}
}
@media (max-width:960px){
  .dempty{display:none}
  .scroll{padding-bottom:96px}
  .side{display:none}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ============ 手机访问 ============ */
.qrbox{display:flex;justify-content:center;padding:6px 0 14px}
.qrbox svg,.qrbox img{width:176px;height:176px;background:#fff;border-radius:16px;padding:8px;
  box-shadow:0 1px 2px rgba(16,24,40,.06),0 10px 26px -14px rgba(16,24,40,.35)}
.addrurl{font-size:16px;font-weight:600;text-align:center;letter-spacing:.2px;user-select:all;
  background:#F4F6FA;border-radius:12px;padding:12px 10px;word-break:break-all;font-variant-numeric:tabular-nums}
.steps{font-size:12.5px;color:#8B919E;line-height:2;margin-top:14px}
.pinrow{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px;font-size:12.5px;color:#8B919E}
.pinrow b{font-size:16px;letter-spacing:3px;color:#0A59F7;font-variant-numeric:tabular-nums;
  background:#EAF1FF;border-radius:9px;padding:5px 12px}
/* ============ 详情右上角菜单 ============ */
.menu{position:fixed;z-index:90;top:52px;right:14px;background:#fff;border-radius:14px;
  box-shadow:0 10px 30px rgba(16,24,40,.18),0 1px 3px rgba(16,24,40,.08);
  padding:6px;display:none;min-width:158px}
.menu.open{display:block}
.menu button{display:flex;width:100%;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;
  font-size:13.5px;text-align:left;color:#3C4452}
.menu button:hover{background:#F4F6FA}
.menu button.danger{color:#E8402A}
@media (min-width:961px){ .menu{top:60px;right:24px} }