:root{
  --brand:#2b6cff;
  --brand-dark:#1b53d6;
  --brand-soft:#eef3ff;
  --bg:#f4f5f7;
  --card:#ffffff;
  --text:#171a1f;
  --text-2:#4c545e;
  --muted:#8b939e;
  --line:#e9ebef;
  --green:#12a150;
  --green-soft:#e8f8ee;
  --orange:#e8890c;
  --orange-soft:#fff4e2;
  --purple:#7c4dff;
  --purple-soft:#f1ecff;
  --red:#e5484d;
  --red-soft:#fdeced;
  --radius:14px;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 4px 14px rgba(16,24,40,.05);
  --sidebar-w:236px;
  --sidebar-w-mini:64px;
  --topbar-h:60px;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;height:100%}
body{
  background:var(--bg);
  color:var(--text);
  font:400 15px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  padding-bottom:env(safe-area-inset-bottom);
  -webkit-font-smoothing:antialiased;
}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer}
input,textarea,select{font:inherit;color:inherit}
img{display:block;max-width:100%}
svg{display:block}

/* ============================================================
   手机端基础布局（<960px）
   ============================================================ */
#app{min-height:100vh;background:var(--bg);position:relative}
#sidebar{display:none}

#main{display:flex;flex-direction:column;min-height:100vh}

/* ---------- 顶栏 ---------- */
#topbar{
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 18px 12px;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.sb-toggle{display:none}
.tb-left{min-width:0;flex:1}
.tb-title{font-size:18px;font-weight:650;letter-spacing:-.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tb-sub{font-size:12.5px;color:var(--muted);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tb-right{display:flex;align-items:center;gap:6px;flex:none}
.icon-btn{position:relative;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;color:var(--text-2)}
.icon-btn:active{background:#f0f2f5}
.icon-btn .badge{
  position:absolute;top:2px;right:1px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;
  background:var(--red);color:#fff;font-size:10.5px;font-style:normal;line-height:16px;text-align:center;font-weight:600;
}
.avatar{
  width:34px;height:34px;border-radius:50%;background:var(--brand);color:#fff;
  font-size:13px;font-weight:600;display:grid;place-items:center;letter-spacing:.3px;
  overflow:hidden;flex:none;
}
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}

/* 通用头像（列表 / 详情 / 选人） */
.av{
  display:inline-grid;place-items:center;border-radius:50%;overflow:hidden;flex:none;
  color:#fff;font-weight:640;letter-spacing:.2px;line-height:1;
  background:var(--brand);
}
.av img{width:100%;height:100%;object-fit:cover;display:block}
.av.ring{box-shadow:0 0 0 2px #fff,0 0 0 3.5px rgba(43,108,255,.22)}
.av-host{
  display:grid;place-items:center;flex:none;
  width:36px;height:36px;border-radius:50%;
}
.av-host:active{transform:scale(.94)}
.av-host:empty::after{content:"—";color:var(--muted)}

/* ---------- 布局 ---------- */
#view{padding:14px 14px 96px;flex:1;width:100%}
.section-title{font-size:13px;font-weight:600;color:var(--muted);margin:20px 2px 8px;letter-spacing:.3px}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.card + .card{margin-top:12px}
.pad{padding:16px}

/* ---------- 统计 ---------- */
.stat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:14px}
.stat{
  background:var(--card);border-radius:12px;padding:12px 8px;text-align:center;box-shadow:var(--shadow);
  display:flex;flex-direction:column;align-items:center;gap:6px;
}
.stat b{display:block;font-size:20px;font-weight:680;letter-spacing:-.5px}
.stat span{font-size:11.5px;color:var(--muted)}
.stat.warn b{color:var(--red)}
.stat.run b{color:var(--brand)}

/* 统计卡图标（仅 PC 显示，手机保持紧凑） */
.stat-ico{display:none}
.stat-body{display:flex;flex-direction:column;align-items:center}
.stat-ico svg{width:18px;height:18px}
.stat-ico.blue{background:var(--brand-soft);color:var(--brand)}
.stat-ico.orange{background:var(--orange-soft);color:var(--orange)}
.stat-ico.red{background:var(--red-soft);color:var(--red)}
.stat-ico.green{background:var(--green-soft);color:var(--green)}
.stat-ico.purple{background:var(--purple-soft);color:var(--purple)}

/* ---------- 搜索 ---------- */
.searchbar{display:flex;gap:8px;margin-bottom:12px}
.searchbar input{
  flex:1;height:40px;border-radius:11px;border:1px solid var(--line);background:#fff;
  padding:0 14px;outline:none;font-size:14px;
}
.searchbar input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}

/* ---------- 列表卡片 ---------- */
.order-card{
  background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);
  padding:15px 16px 13px;margin-bottom:11px;position:relative;
  transition:transform .12s ease,box-shadow .12s ease;
}
.order-card:active{transform:scale(.988)}
.oc-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
.oc-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;color:var(--muted);letter-spacing:.2px}
.oc-title{font-size:16px;font-weight:640;letter-spacing:-.2px;margin-bottom:3px}
.oc-meta{font-size:13px;color:var(--text-2);display:flex;flex-wrap:wrap;gap:4px 12px;margin-bottom:10px}
.oc-meta em{font-style:normal;color:var(--muted)}

.tag{display:inline-flex;align-items:center;gap:4px;height:23px;padding:0 9px;border-radius:7px;font-size:12px;font-weight:560;white-space:nowrap}
.tag.blue{background:var(--brand-soft);color:var(--brand-dark)}
.tag.orange{background:var(--orange-soft);color:#b26a06}
.tag.green{background:var(--green-soft);color:#0d7c3d}
.tag.purple{background:var(--purple-soft);color:#5d33d6}
.tag.red{background:var(--red-soft);color:#c62828}
.tag.gray{background:#f1f2f4;color:#6b7280}

.progress{height:5px;border-radius:3px;background:#eef0f3;overflow:hidden;margin:10px 0 8px}
.progress i{display:block;height:100%;border-radius:3px;background:linear-gradient(90deg,#4f86ff,#2b6cff);transition:width .4s ease}
.oc-foot{display:flex;align-items:center;justify-content:space-between;font-size:12.5px;color:var(--muted)}
.oc-stage{display:flex;align-items:center;gap:5px;color:var(--text-2);font-weight:520}
.oc-stage .pulse{width:6px;height:6px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 3px rgba(43,108,255,.16)}
.oc-stage.late{color:var(--red)}
.oc-stage.late .pulse{background:var(--red);box-shadow:0 0 0 3px rgba(229,72,77,.16)}

/* ---------- 空态 ---------- */
.empty{text-align:center;padding:64px 20px;color:var(--muted)}
.empty .ico{font-size:34px;opacity:.35;margin-bottom:10px}
.empty p{margin:0;font-size:14px}

/* ---------- 按钮 ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  height:46px;padding:0 20px;border-radius:11px;font-size:15px;font-weight:600;
  background:var(--brand);color:#fff;transition:opacity .15s,transform .1s;width:100%;
}
.btn:active{transform:scale(.985);opacity:.92}
.btn:disabled{background:#c9d2e3;color:#fff;cursor:not-allowed;transform:none}
.btn.ghost{background:#fff;color:var(--brand);border:1px solid #cddbff}
.btn.ghost:active{background:var(--brand-soft)}
.btn.danger{background:var(--red)}
.btn.danger-ghost{background:#fff;color:var(--red);border:1px solid #f6c9cb}
.btn.sm{height:36px;padding:0 14px;font-size:13.5px;width:auto;border-radius:9px}
.btn-row{display:flex;gap:10px}
.fab{
  position:fixed;bottom:calc(74px + env(safe-area-inset-bottom));right:20px;
  height:50px;padding:0 22px 0 18px;border-radius:25px;background:var(--brand);color:#fff;
  display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600;
  box-shadow:0 8px 24px rgba(43,108,255,.34);z-index:46;
}

/* ---------- 详情 ---------- */
.detail-head{background:linear-gradient(135deg,#2b6cff,#5b8bff);border-radius:var(--radius);padding:18px;color:#fff;margin-bottom:12px}
.detail-head .dh-code{font-family:ui-monospace,Menlo,monospace;font-size:12.5px;opacity:.82;letter-spacing:.4px}
.detail-head h1{margin:5px 0 3px;font-size:20px;font-weight:680;letter-spacing:-.3px}
.detail-head .dh-sub{font-size:13px;opacity:.9}
.detail-head .dh-tags{display:flex;gap:7px;margin-top:12px;flex-wrap:wrap}
.detail-head .dh-tags .tag{background:rgba(255,255,255,.2);color:#fff}

.kv{display:grid;grid-template-columns:88px 1fr;gap:9px 12px;font-size:14px}
.kv dt{color:var(--muted);font-size:13px}
.kv dd{margin:0;color:var(--text);word-break:break-word}
.kv dd.mono{font-family:ui-monospace,Menlo,monospace;font-size:13px}

/* 报价流程条 */
.qflow{
  display:flex;align-items:center;gap:0;
  background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:14px 16px;margin-bottom:12px;overflow-x:auto;
}
.qstep{display:flex;align-items:center;gap:7px;flex:none}
.qstep i{
  width:22px;height:22px;border-radius:50%;flex:none;
  display:grid;place-items:center;font-style:normal;font-size:11.5px;font-weight:650;
  background:#eef1f6;color:var(--muted);
}
.qstep span{font-size:12.5px;color:var(--muted);white-space:nowrap}
.qstep.done i{background:var(--green-soft);color:var(--green)}
.qstep.done span{color:var(--text-2)}
.qstep.cur i{background:var(--brand);color:#fff;box-shadow:0 0 0 4px rgba(43,108,255,.14)}
.qstep.cur span{color:var(--brand-dark);font-weight:640}
.qline{flex:1;min-width:16px;height:1.5px;background:#e6eaf0;margin:0 10px}
@media(max-width:600px){
  .qflow{padding:11px 12px}
  .qstep span{font-size:11.5px}
  .qline{margin:0 6px}
}

.files{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.files a,.files .fitem{
  display:flex;align-items:center;gap:6px;padding:7px 11px;border-radius:9px;background:#f5f7fa;
  font-size:12.5px;color:var(--text-2);text-decoration:none;max-width:100%;
}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:8px;margin-top:10px}
.thumbs img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:9px;border:1px solid var(--line)}

/* ---------- 时间轴 ---------- */
.timeline{position:relative;padding-left:0}
.stage{position:relative;padding:0 0 4px 34px}
.stage::before{
  content:"";position:absolute;left:11px;top:26px;bottom:-6px;width:2px;background:#dde2ea;
}
.stage:last-child::before{display:none}
.stage .node{
  position:absolute;left:2px;top:14px;width:20px;height:20px;border-radius:50%;
  background:#fff;border:2px solid #d5dae2;display:grid;place-items:center;font-size:11px;color:#fff;z-index:1;
}
.stage.done .node{background:var(--green);border-color:var(--green)}
.stage.active .node{background:var(--brand);border-color:var(--brand);box-shadow:0 0 0 4px rgba(43,108,255,.14)}
.stage.late .node{background:var(--red);border-color:var(--red);box-shadow:0 0 0 4px rgba(229,72,77,.14)}
.stage-body{background:var(--card);border-radius:12px;padding:13px 14px;box-shadow:var(--shadow);margin-bottom:10px}
.stage.active .stage-body{border:1px solid #bcd2ff;background:linear-gradient(180deg,#fbfcff,#fff)}
.stage.late .stage-body{border:1px solid #f7c5c7}
.st-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}
.st-name{font-size:15px;font-weight:620;display:flex;align-items:center;gap:7px}
.st-idx{font-size:11px;font-weight:600;color:var(--muted);background:#f1f2f4;border-radius:5px;padding:1px 6px}
.st-days{font-size:12px;color:var(--muted)}
.st-range{font-size:12.5px;color:var(--text-2);font-family:ui-monospace,Menlo,monospace;letter-spacing:-.2px}
.st-note{font-size:13px;color:var(--text-2);margin-top:8px;padding:8px 10px;background:#f7f8fa;border-radius:8px}
.st-conf{font-size:12px;color:var(--green);margin-top:8px;display:flex;align-items:center;gap:5px}
.st-late{font-size:12px;color:var(--red);margin-top:6px;font-weight:560}

/* ---------- 表单 ---------- */
.field{margin-bottom:16px}
.field label{display:block;font-size:13.5px;font-weight:560;color:var(--text-2);margin-bottom:7px}
.field label .req{color:var(--red);margin-left:3px}
.field input[type=text],.field input[type=password],.field input[type=number],.field input[type=date],.field textarea,.field select{
  width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;
  padding:11px 13px;outline:none;font-size:15px;transition:border-color .15s,box-shadow .15s;
}
.field textarea{min-height:88px;resize:vertical;line-height:1.55}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.field .hint{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5}
.field-row{display:flex;gap:10px}
.field-row>.field{flex:1}

.pick-input{
  width:100%;height:46px;border:1px solid var(--line);border-radius:10px;background:#fff;
  display:flex;align-items:center;gap:8px;padding:0 13px;font-size:15px;text-align:left;
  transition:border-color .15s;
}
.pick-input:active{background:var(--brand-soft);border-color:#cddbff}
.pick-input .chev{color:#c3c9d2;font-size:19px;line-height:1;margin-left:auto}

.uploader{
  border:1.5px dashed #cfd6e0;border-radius:11px;padding:20px;text-align:center;color:var(--muted);
  font-size:13.5px;background:#fbfcfd;cursor:pointer;transition:.15s;
}
.uploader:active{background:var(--brand-soft);border-color:var(--brand);color:var(--brand)}
.uploader .up-ico{font-size:22px;display:block;margin-bottom:4px;opacity:.5}

.picker{display:flex;flex-wrap:wrap;gap:8px}
.picker button{
  height:36px;padding:0 14px;border-radius:9px;border:1px solid var(--line);background:#fff;
  font-size:13.5px;color:var(--text-2);
}
.picker button.on{border-color:var(--brand);background:var(--brand-soft);color:var(--brand-dark);font-weight:600}

/* ---------- 弹层 ---------- */
.mask{position:fixed;inset:0;background:rgba(17,20,26,.45);z-index:100;display:flex;align-items:flex-end;justify-content:center;animation:fade .18s ease}
/* 成员选择浮层：叠在新建表单之上，不替换原弹层 */
#pickRoot .mask{z-index:120}
.sheet{
  width:100%;max-width:760px;background:#fff;border-radius:20px 20px 0 0;
  padding:8px 18px calc(18px + env(safe-area-inset-bottom));max-height:88vh;overflow-y:auto;
  animation:slideUp .24s cubic-bezier(.22,1,.36,1);
}
.sheet-head{display:flex;align-items:center;justify-content:space-between;padding:10px 0 14px;position:sticky;top:0;background:#fff;z-index:2}
.sheet-title{font-size:16.5px;font-weight:650}
.sheet-close{font-size:22px;color:var(--muted);padding:4px 8px}
@keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
@keyframes fade{from{opacity:0}to{opacity:1}}

.toast{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:200;
  background:rgba(23,26,31,.9);color:#fff;padding:11px 18px;border-radius:10px;font-size:14px;
  max-width:78%;text-align:center;animation:fade .15s ease;line-height:1.5;
}
.toast.err{background:rgba(200,40,45,.94)}

/* ---------- 通知 ---------- */
.notice{background:var(--card);border-radius:12px;padding:14px;margin-bottom:10px;box-shadow:var(--shadow);position:relative}
.notice.unread::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 3px 3px 0;background:var(--red)}
.notice h4{margin:0 0 5px;font-size:14.5px;font-weight:620}
.notice .n-body{font-size:13px;color:var(--text-2);white-space:pre-wrap;line-height:1.6}
.notice .n-time{font-size:11.5px;color:var(--muted);margin-top:8px}

/* ---------- 手机底部导航 ---------- */
#tabbar{
  position:fixed;bottom:0;left:0;right:0;width:100%;
  display:flex;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);
  border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom);z-index:45;
}
#tabbar[hidden]{display:none}
.tab{flex:1;height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11.5px;color:var(--muted);position:relative;gap:3px}
.tab svg{width:21px;height:21px}
.tab.active{color:var(--brand);font-weight:600}
.tab .dot{position:absolute;top:9px;right:calc(50% - 16px);width:7px;height:7px;border-radius:50%;background:var(--red)}

/* ---------- 用户选择 ---------- */
.user-list{display:flex;flex-direction:column;gap:9px}
.user-item{
  display:flex;align-items:center;gap:12px;padding:13px 14px;border-radius:12px;background:#fff;
  border:1px solid var(--line);text-align:left;width:100%;
}
.user-item:active{background:var(--brand-soft);border-color:#cddbff}
.user-item .u-av{width:38px;height:38px;border-radius:50%;background:#e8eefc;color:var(--brand-dark);display:grid;place-items:center;font-weight:600;font-size:14px;flex:none}
.user-item .u-name{font-size:15px;font-weight:600}
.user-item .u-role{font-size:12px;color:var(--muted);margin-top:1px}
.user-item .u-go{margin-left:auto;color:#c3c9d2;font-size:18px}

.banner{
  display:flex;gap:9px;padding:11px 13px;border-radius:11px;font-size:12.5px;line-height:1.55;
  background:var(--orange-soft);color:#8a5300;margin-bottom:12px;
}
.banner.info{background:var(--brand-soft);color:#1b4699}
.banner b{font-weight:650}

/* ============================================================
   PC 端（≥960px）：一级/二级可折叠侧边栏 + 全宽铺满
   ============================================================ */
@media(min-width:960px){
  html,body{overflow:hidden}
  body{background:var(--bg)}

  /* PC 端不显示手机底部导航 */
  #tabbar{display:none !important}

  #app{
    display:flex;
    width:100%;
    height:100vh;
    overflow:hidden;
  }

  /* ---------- 侧边栏 ---------- */
  #sidebar{
    display:flex;flex-direction:column;
    width:var(--sidebar-w);flex:none;
    height:100vh;
    background:#fff;
    border-right:1px solid var(--line);
    transition:width .22s cubic-bezier(.4,0,.2,1);
    overflow:hidden;
    z-index:60;
  }
  #app.sb-collapsed #sidebar{width:var(--sidebar-w-mini)}

  /* 品牌区 */
  .sb-brand{
    display:flex;align-items:center;gap:11px;
    height:var(--topbar-h);flex:none;
    padding:0 18px;
    border-bottom:1px solid var(--line);
    overflow:hidden;
  }
  .sb-logo{
    width:32px;height:32px;flex:none;border-radius:9px;
    background:linear-gradient(135deg,#2b6cff,#5b8bff);
    color:#fff;font-size:15px;font-weight:700;
    display:grid;place-items:center;
    box-shadow:0 3px 10px rgba(43,108,255,.3);
  }
  .sb-brand-text{min-width:0;transition:opacity .15s}
  .sb-name{font-size:15px;font-weight:680;letter-spacing:-.2px;white-space:nowrap}
  .sb-desc{font-size:10.5px;color:var(--muted);white-space:nowrap;margin-top:1px}
  #app.sb-collapsed .sb-brand{padding:0;justify-content:center;gap:0}
  #app.sb-collapsed .sb-brand-text{display:none}

  /* 菜单容器 */
  .sb-menu{
    flex:1;overflow-y:auto;overflow-x:hidden;
    padding:10px 10px 4px;
  }
  .sb-menu::-webkit-scrollbar{width:0}

  /* 一级菜单：分组标题，点击只展开/收起二级 */
  .menu-group{margin-bottom:2px}
  .menu-l1{
    display:flex;align-items:center;gap:11px;
    width:100%;height:42px;padding:0 11px;
    border-radius:9px;
    font-size:14px;font-weight:560;color:var(--text-2);
    transition:background .14s,color .14s;
    white-space:nowrap;overflow:hidden;
    position:relative;
  }
  .menu-l1:hover{background:#f5f7fa}
  .menu-l1 .mi{width:18px;height:18px;flex:none;color:#6b7480}
  .menu-l1 .ml-text{flex:1;text-align:left;transition:opacity .15s}
  /* 展开箭头（纯 CSS，避免额外标签） */
  .menu-l1::after{
    content:"";flex:none;width:6px;height:6px;margin-right:3px;
    border-right:1.6px solid #c3c9d2;border-bottom:1.6px solid #c3c9d2;
    transform:rotate(-45deg);
    transition:transform .2s,border-color .14s;
  }
  .menu-group.open > .menu-l1::after{transform:rotate(45deg);border-color:#9aa3af}
  /* 首页等无二级项的一级菜单：不显示展开箭头 */
  .menu-l1-flat::after{display:none !important}
  .menu-l1 .m-arrow{display:none}
  .menu-l1.active{background:var(--brand-soft);color:var(--brand-dark);font-weight:620}
  .menu-l1.active .mi{color:var(--brand)}
  .menu-l1.active::before{
    content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
    width:3px;height:16px;border-radius:0 3px 3px 0;background:var(--brand);
  }
  #app.sb-collapsed .menu-l1 {
    justify-content: center;
    padding: 0;
    gap: 0;
  }
  #app.sb-collapsed .menu-l1 .ml-text{display:none}
  #app.sb-collapsed .menu-l1::after{display:none}
  #app.sb-collapsed .menu-l1::before{display:none}
  #app.sb-collapsed .menu-l1.active{
    background:var(--brand-soft);
  }

  /* 二级菜单：折叠动画
     注：不用 grid-template-rows:0fr→1fr，因为容器高度是 auto 时 fr 轨道
     会按内容最小尺寸撑开，折叠失效；这里用 max-height 过渡更稳 */
  .menu-l2{
    display:block;
    max-height:0;
    overflow:hidden;
    opacity:0;
    transition:max-height .24s cubic-bezier(.4,0,.2,1), opacity .16s ease;
  }
  .menu-group.open > .menu-l2{max-height:260px;opacity:1}

  .menu-item{
    display:flex;align-items:center;gap:10px;
    width:100%;height:38px;padding:0 11px 0 39px;
    border-radius:8px;
    font-size:13.5px;color:var(--text-2);
    transition:background .14s,color .14s;
    white-space:nowrap;overflow:hidden;
    position:relative;
  }
  .menu-item .mi{width:15px;height:15px;flex:none;color:#a8b0bb;transition:color .14s}
  .menu-item:hover{background:#f5f7fa;color:var(--text)}
  .menu-item.active{background:var(--brand-soft);color:var(--brand-dark);font-weight:600}
  .menu-item.active .mi{color:var(--brand)}
  .menu-item.active::before{
    content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
    width:3px;height:16px;border-radius:0 3px 3px 0;background:var(--brand);
  }

  /* 侧栏收起态：二级隐藏，只留一级图标 */
  #app.sb-collapsed .menu-l2{max-height:0;opacity:0}
  #app.sb-collapsed .menu-item{padding:0;justify-content:center;height:40px}
  #app.sb-collapsed .menu-item > span{display:none}

  /* 底部固定项 */
  .sb-foot{
    flex:none;padding:8px 10px 12px;
    border-top:1px solid var(--line);
  }
  .sb-foot-item{padding-left:11px}
  .sb-foot-item .mi{width:17px;height:17px;color:#6b7480}
  .sb-foot-item .dot{
    position:absolute;right:11px;top:50%;margin-top:-8px;
    width:7px;height:7px;border-radius:50%;background:var(--red);
  }
  #app.sb-collapsed .sb-foot{padding:8px 8px 12px}
  #app.sb-collapsed .sb-foot-item{
    padding:0;justify-content:center;gap:0;
  }
  #app.sb-collapsed .sb-foot-item > span{display:none}
  #app.sb-collapsed .sb-foot-item .dot{right:14px;top:10px;margin-top:0}

  /* ---------- 主区域：全宽铺满 ---------- */
  #main{
    flex:1;min-width:0;
    height:100vh;
    display:flex;flex-direction:column;
    overflow:hidden;
    background:var(--bg);
  }

  #topbar{
    height:var(--topbar-h);flex:none;
    padding:0 24px;
    position:relative;
    background:#fff;
    border-bottom:1px solid var(--line);
    backdrop-filter:none;
    gap:14px;
  }
  .sb-toggle{
    display:grid;place-items:center;
    width:34px;height:34px;flex:none;
    border-radius:8px;color:var(--text-2);
    transition:background .14s;
  }
  .sb-toggle:hover{background:#f2f4f7}
  .tb-title{font-size:19px;font-weight:660}
  .tb-sub{font-size:12.5px}

  /* 内容区：占满剩余高度，可滚动 */
  #view{
    flex:1;min-height:0;
    overflow-y:auto;
    padding:22px 24px 40px;
    width:100%;
  }
  #view::-webkit-scrollbar{width:10px}
  #view::-webkit-scrollbar-thumb{background:#d8dde5;border-radius:5px;border:3px solid var(--bg)}
  #view::-webkit-scrollbar-thumb:hover{background:#c2c9d4}
  #view::-webkit-scrollbar-track{background:transparent}

  /* 统计卡在宽屏下更大更舒展 */
  .stat-row{gap:14px;margin-bottom:20px}
  .stat{
    display:flex;flex-direction:row;align-items:center;gap:14px;
    padding:18px 18px;border-radius:13px;text-align:left;
  }
  .stat-ico{
    display:grid;place-items:center;
    width:42px;height:42px;flex:none;border-radius:11px;
  }
  .stat-ico svg{width:22px;height:22px}
  .stat-body{align-items:flex-start}
  .stat b{font-size:26px;margin-bottom:0;line-height:1.2}
  .stat span{font-size:12.5px}

  /* 搜索栏 */
  .searchbar{margin-bottom:14px;max-width:520px}
  .searchbar input{height:42px}

  /* 列表：自适应多列网格，充分利用宽屏 */
  .order-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(340px,1fr));
    gap:14px;
  }
  .order-grid .order-card{margin-bottom:0}
  .order-grid .empty{grid-column:1 / -1}
  .order-card{padding:17px 19px 15px}
  .order-card:hover{box-shadow:0 4px 20px rgba(16,24,40,.09);transform:translateY(-1px)}
  .oc-title{font-size:16.5px}

  /* FAB 定位到内容区右下 */
  .fab{right:32px;bottom:32px}

  /* 详情页宽屏 */
  .detail-head{padding:22px 26px}
  .detail-head h1{font-size:23px}

  /* 弹层居中 */
  .mask{align-items:center;padding:30px 20px}
  .sheet{
    max-width:620px;border-radius:16px;
    padding:8px 26px 26px;
    animation:pop .2s ease;
  }
  @keyframes pop{from{opacity:0;transform:scale(.96) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}

  /* 登录页：隐藏侧栏 */
  #app.login-mode #sidebar{display:none}
  #app.login-mode #main{width:100%}
  #app.login-mode #view{display:flex;flex-direction:column;justify-content:center;align-items:center}
  #app.login-mode #topbar{display:none}
  .login-card{width:100%;max-width:420px;padding:28px 30px !important;margin:0 !important}

  /* 表单宽屏限制输入宽度 */
  #view>form.card{max-width:820px}
  .card .btn{max-width:340px}
}

@media(max-width:959.5px){
  .menu-l2{display:none !important}
  .sb-menu,.sb-brand,.sb-foot{display:none !important}
  #sidebar{display:none !important}
}

/* ============================================================
   首页综合看板
   ============================================================ */
.dash-hero{
  border-radius:16px;padding:20px 22px;color:#fff;margin-bottom:16px;
  background:linear-gradient(135deg,#2b6cff 0%,#4f86ff 55%,#6f9dff 100%);
  box-shadow:0 8px 26px rgba(43,108,255,.24);
}
.dash-hero .dh-hi{font-size:12.5px;opacity:.86;letter-spacing:.3px}
.dash-hero .dh-name{font-size:22px;font-weight:700;letter-spacing:-.4px;margin:3px 0 14px}
.dash-hero .dh-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.dash-hero .kpi{min-width:0}
.dash-hero .kpi b{display:block;font-size:23px;font-weight:700;letter-spacing:-.6px;line-height:1.15}
.dash-hero .kpi span{font-size:11.5px;opacity:.82}
.dash-hero .kpi.money b{font-size:19px}

.dash-grid{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:12px}
.dash-card{background:var(--card);border-radius:14px;box-shadow:var(--shadow);padding:16px 17px}
.dash-card h3{
  margin:0 0 13px;font-size:14px;font-weight:640;display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.dash-card h3 .more{font-size:12px;font-weight:500;color:var(--brand);cursor:pointer}

/* 首页：各阶段待处理事项 */
.todo-groups{display:grid;grid-template-columns:1fr;gap:14px}
.todo-group{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:#fcfdfe}
.tg-head{font-size:13px;font-weight:640;color:var(--text-2);display:flex;align-items:center;justify-content:space-between;cursor:pointer;margin-bottom:10px}
.tg-head span{color:var(--muted);font-weight:400}
.tg-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:8px}
.tg-item{background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.tg-item.warn{border-color:#ffd6d6;background:#fff7f7}
.tg-label{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tg-num{font-size:17px;font-weight:660;color:var(--text)}
.tg-item.warn .tg-num{color:var(--red)}
@media(min-width:900px){ .todo-groups{grid-template-columns:repeat(3,1fr)} }
.dash-line{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.dash-line:last-child{margin-bottom:0}
.dash-line .dl-name{font-size:13px;color:var(--text-2);width:78px;flex:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-line .dl-bar{flex:1;height:8px;border-radius:4px;background:#f0f2f5;overflow:hidden}
.dash-line .dl-bar i{display:block;height:100%;border-radius:4px;transition:width .5s ease}
.dash-line .dl-bar i.blue{background:linear-gradient(90deg,#6f9dff,#2b6cff)}
.dash-line .dl-bar i.orange{background:linear-gradient(90deg,#f7b955,#e8890c)}
.dash-line .dl-bar i.green{background:linear-gradient(90deg,#4bc47c,#12a150)}
.dash-line .dl-bar i.red{background:linear-gradient(90deg,#f4767a,#e5484d)}
.dash-line .dl-bar i.purple{background:linear-gradient(90deg,#a98bff,#7c4dff)}
.dash-line .dl-num{font-size:13px;font-weight:640;width:34px;text-align:right;flex:none;font-variant-numeric:tabular-nums}

.dash-tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.dash-tile{
  border-radius:12px;padding:13px 14px;background:#fafbfd;border:1px solid var(--line);
  display:flex;flex-direction:column;gap:3px;
}
.dash-tile .dt-label{font-size:12px;color:var(--muted)}
.dash-tile .dt-value{font-size:21px;font-weight:680;letter-spacing:-.5px;line-height:1.2}
.dash-tile .dt-value.money{font-size:16.5px}
.dash-tile.blue{background:#f4f7ff;border-color:#dbe5ff}
.dash-tile.blue .dt-value{color:var(--brand-dark)}
.dash-tile.orange{background:#fff9ef;border-color:#ffe6bf}
.dash-tile.orange .dt-value{color:#b26a06}
.dash-tile.green{background:#f3fcf6;border-color:#cceedd}
.dash-tile.green .dt-value{color:#0d7c3d}
.dash-tile.red{background:#fef5f5;border-color:#fbd7d8}
.dash-tile.red .dt-value{color:#c62828}
.dash-tile.purple{background:#f8f5ff;border-color:#e5dbff}
.dash-tile.purple .dt-value{color:#5d33d6}

.dash-feed{display:flex;flex-direction:column}
.dash-feed .feed-item{
  display:flex;gap:10px;padding:9px 0;border-bottom:1px solid #f3f4f6;font-size:13px;line-height:1.5;
}
.dash-feed .feed-item:last-child{border-bottom:0}
.dash-feed .fi-dot{width:7px;height:7px;border-radius:50%;flex:none;margin-top:7px;background:var(--brand)}
.dash-feed .fi-dot.bulk{background:var(--orange)}
.dash-feed .fi-dot.quote{background:var(--purple)}
.dash-feed .fi-body{min-width:0;flex:1}
.dash-feed .fi-code{font-family:ui-monospace,Menlo,monospace;font-size:11.5px;color:var(--muted)}
.dash-feed .fi-text{color:var(--text-2);word-break:break-word}
.dash-feed .fi-text b{font-weight:620;color:var(--text)}
.dash-feed .fi-time{font-size:11px;color:#b8bfc9;white-space:nowrap;flex:none;margin-top:2px}

.dash-cust{display:flex;flex-direction:column;gap:9px}
.dash-cust .cust-item{display:flex;align-items:center;gap:10px;font-size:13px}
.dash-cust .cust-av{
  width:30px;height:30px;border-radius:50%;flex:none;display:grid;place-items:center;
  background:#eef3ff;color:var(--brand-dark);font-size:11.5px;font-weight:640;
}
.dash-cust .cust-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:560}
.dash-cust .cust-phone{font-size:11.5px;color:var(--muted);font-family:ui-monospace,Menlo,monospace}
.dash-cust .cust-cnt{font-size:11.5px;color:var(--muted);white-space:nowrap}

.dash-trend{display:flex;align-items:flex-end;gap:8px;height:110px;padding-top:6px}
.dash-trend .tr-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end}
.dash-trend .tr-bars{display:flex;align-items:flex-end;gap:2px;height:100%;width:100%;justify-content:center}
.dash-trend .tr-bars i{width:5px;border-radius:2px 2px 0 0;min-height:2px;transition:height .45s ease}
.dash-trend .tr-date{font-size:10px;color:var(--muted);white-space:nowrap}
.tr-legend{display:flex;gap:14px;font-size:11.5px;color:var(--muted);margin-top:2px}
.tr-legend span{display:flex;align-items:center;gap:5px}
.tr-legend i{width:8px;height:8px;border-radius:2px}

/* ============================================================
   个人资料 / 头像
   ============================================================ */
.profile-card{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.pf-av{position:relative;flex:none}
.pf-av-btn{
  position:absolute;right:-2px;bottom:-2px;
  width:26px;height:26px;border-radius:50%;
  background:#fff;color:var(--brand);
  border:1px solid var(--line);
  display:grid;place-items:center;
  box-shadow:0 2px 6px rgba(16,24,40,.12);
}
.pf-av-btn:active{background:var(--brand-soft)}
.pf-main{min-width:0;flex:1}
.pf-name{font-size:19px;font-weight:680;letter-spacing:-.3px}
.pf-sub{font-size:13px;color:var(--muted);margin-top:2px}
.pf-tags{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}

.pf-edit{display:flex;align-items:center;gap:18px;margin-bottom:18px}
.pf-edit-av{flex:none}
.pf-edit-ops{display:flex;flex-direction:column;align-items:flex-start}


@media(min-width:760px){
  .dash-grid{grid-template-columns:1fr 1fr}
  .dash-tiles{grid-template-columns:repeat(4,1fr)}
  .dash-hero .dh-kpis{grid-template-columns:repeat(6,1fr)}
}
@media(min-width:1200px){
  .dash-grid{grid-template-columns:1.15fr 1fr}
  .dash-grid.wide{grid-template-columns:1fr 1fr 1fr}
}
