/* ============ 设计系统 ============ */
:root {
  --primary: #165DFF;
  --primary-l: #E8F0FF;
  --primary-d: #0E42D2;
  --success: #00B42A;
  --success-l: #E8FFEA;
  --warning: #FF7D00;
  --warning-l: #FFF7E8;
  --danger: #F53F3F;
  --danger-l: #FFECE8;
  --t1: #1D2129;
  --t2: #4E5969;
  --t3: #86909C;
  --t4: #C9CDD4;
  --border: #E5E6EB;
  --bg: #F5F6F7;
  --radius: 12px;
  --tab-h: 58px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--t1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

input, textarea, select, button { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============ 启动画面 ============ */
.boot {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
}
.boot-logo {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(145deg, #165DFF, #4A9BFF);
  color: #fff; font-weight: 800; font-size: 22px; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center;
}
.boot-text { color: var(--t3); font-size: 13px; }

/* ============ 应用外壳 ============ */
#app { min-height: 100vh; }

.shell { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 52px; flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
}
.topbar .back { font-size: 22px; width: 28px; line-height: 1; opacity: .95; }
.topbar .title { font-size: 17px; font-weight: 600; flex: 1; }
.topbar .action { font-size: 14px; opacity: .95; }

.page {
  flex: 1;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px);
  max-width: 900px; width: 100%; margin: 0 auto;
}
.page.nopad { padding-bottom: 12px; }

/* 底部 tab */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  max-width: 900px; margin: 0 auto;
}
.tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--t3); font-size: 10px;
}
.tab .ic { font-size: 19px; line-height: 1; filter: grayscale(1); opacity: .5; }
.tab.on { color: var(--primary); font-weight: 600; }
.tab.on .ic { filter: none; opacity: 1; }

/* ============ 通用组件 ============ */
.card {
  background: #fff; border-radius: var(--radius);
  margin: 12px; padding: 14px;
}
.sec {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 8px; font-size: 14px; font-weight: 600;
}
.sec .more { font-size: 12px; color: var(--t3); font-weight: 400; }

.tag {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 4px;
  font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap;
}
.tag.blue { background: var(--primary-l); color: var(--primary); }
.tag.green { background: var(--success-l); color: var(--success); }
.tag.orange { background: var(--warning-l); color: var(--warning); }
.tag.red { background: var(--danger-l); color: var(--danger); }
.tag.gray { background: #F2F3F5; color: var(--t2); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; border-radius: 10px;
  background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 600;
  transition: opacity .15s;
}
.btn:active { opacity: .8; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.danger { background: var(--danger); }
.btn.disabled { background: #F2F3F5; color: var(--t4); pointer-events: none; }
.btn.sm { height: 34px; font-size: 13px; border-radius: 17px; padding: 0 16px; }

.kv { display: flex; justify-content: space-between; padding: 9px 0; gap: 16px; font-size: 13px; }
.kv .k { color: var(--t3); flex: 0 0 auto; }
.kv .v { color: var(--t1); text-align: right; font-weight: 500; flex: 1; word-break: break-all; }

.mono { font-family: "SF Mono", Menlo, Consolas, monospace; }
.muted { color: var(--t3); font-size: 12px; }
.divider { height: 1px; background: var(--border); margin: 10px 0; }

.empty {
  padding: 60px 30px; text-align: center; color: var(--t3); font-size: 13px;
}
.empty .ic { font-size: 34px; display: block; margin-bottom: 10px; opacity: .4; }

.chips { display: flex; gap: 8px; padding: 10px 12px; background: #fff; overflow-x: auto; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 16px;
  font-size: 12px; background: var(--bg); color: var(--t2);
  border: 1px solid transparent; white-space: nowrap;
}
.chip.on { background: var(--primary-l); color: var(--primary); font-weight: 600; border-color: #B8D0FF; }

/* ============ 表单 ============ */
.field { padding: 10px 14px; }
.field label { display: block; font-size: 12px; color: var(--t2); margin-bottom: 7px; font-weight: 500; }
.field label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 9px;
  padding: 11px 12px; font-size: 14px; background: var(--bg);
  outline: none; transition: border-color .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); background: #fff; }
.textarea { resize: vertical; min-height: 70px; }
.select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386909C' d='M6 8L1.5 3.5h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

/* ============ 登录页 ============ */
.login {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 24px; max-width: 420px; margin: 0 auto;
}
.login-logo {
  width: 62px; height: 62px; border-radius: 18px; margin-bottom: 20px;
  background: linear-gradient(145deg, #165DFF, #4A9BFF);
  color: #fff; font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.login h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.login .sub { color: var(--t3); font-size: 13px; margin-bottom: 28px; line-height: 1.6; }
.login .field { padding: 0 0 14px; }
.login .err { color: var(--danger); font-size: 13px; margin: 4px 0 12px; min-height: 18px; }

/* ============ 工作台 ============ */
.hero {
  background: linear-gradient(150deg, #165DFF 0%, #2B7BFF 55%, #4A9BFF 100%);
  padding: 18px 18px 46px; color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -50px; top: -50px;
  width: 180px; height: 180px; background: rgba(255,255,255,.09); border-radius: 50%;
}
.hero-row { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.hero-name { font-size: 19px; font-weight: 600; }
.hero-sub { font-size: 12px; opacity: .82; margin-top: 4px; }
.hero-avatar {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
}

.stats {
  display: flex; margin: -34px 12px 0;
  background: #fff; border-radius: 14px; padding: 16px 0;
  box-shadow: 0 6px 20px rgba(22,93,255,.12); position: relative; z-index: 5;
}
.stat { flex: 1; text-align: center; position: relative; cursor: pointer; }
.stat + .stat::before {
  content: ''; position: absolute; left: 0; top: 5px; bottom: 5px;
  width: 1px; background: var(--border);
}
.stat b { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat b.blue { color: var(--primary); }
.stat b.red { color: var(--danger); }
.stat b.orange { color: var(--warning); }
.stat span { font-size: 11px; color: var(--t3); margin-top: 3px; display: block; }

.alert {
  margin: 12px; padding: 12px 14px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
  background: var(--danger-l); border: 1px solid #FFD4CC; cursor: pointer;
}
.alert .ico { font-size: 17px; }
.alert .txt { flex: 1; font-size: 13px; color: #C22B1F; font-weight: 600; line-height: 1.4; }
.alert .txt small { display: block; font-weight: 400; color: #E05A4A; font-size: 11px; margin-top: 2px; }

.quick { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; background: #fff; margin: 12px; border-radius: 14px; padding: 16px 6px; }
.q { display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; }
.q .ic { width: 44px; height: 44px; border-radius: 13px; background: var(--primary-l); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.q span { font-size: 11px; color: var(--t2); }

/* 待办条 */
.todo {
  background: #fff; border-radius: 12px; margin: 0 12px 10px; padding: 13px 14px;
  border-left: 3px solid var(--primary); cursor: pointer;
}
.todo.overdue { border-left-color: var(--danger); }
.todo.soon { border-left-color: var(--warning); }
.todo-t { font-size: 14px; font-weight: 600; line-height: 1.4; }
.todo-m { font-size: 12px; color: var(--t3); margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.due.overdue { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--warning); font-weight: 600; }

/* 订单卡片 */
.ocard {
  background: #fff; border-radius: 12px; margin: 10px 12px; padding: 14px;
  position: relative; overflow: hidden; cursor: pointer;
  border-left: 3px solid var(--primary);
}
.ocard.risk { border-left-color: var(--danger); }
.ocard.done { border-left-color: var(--success); }
.oc-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.oc-no { font-size: 13px; font-weight: 600; font-family: Menlo, monospace; }
.oc-cust { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.oc-sku {
  display: inline-block; font-size: 11px; font-family: Menlo, monospace;
  color: var(--t2); background: var(--bg); padding: 2px 6px; border-radius: 4px;
  margin-right: 4px; margin-bottom: 2px;
}
.oc-meta { display: flex; gap: 14px; font-size: 12px; color: var(--t3); margin-top: 8px; flex-wrap: wrap; }
.oc-next {
  margin-top: 10px; padding: 9px 11px; background: #F7F9FF; border-radius: 8px;
  display: flex; align-items: center; gap: 8px; border: 1px dashed #C6D8FF;
}
.oc-next.risk { background: #FFF5F2; border-color: #FFCCC2; }
.oc-next .lbl { font-size: 10px; color: var(--primary); font-weight: 700; flex: 0 0 auto; }
.oc-next.risk .lbl { color: var(--danger); }
.oc-next .val { font-size: 12px; color: var(--t1); flex: 1; line-height: 1.4; }
.oc-next .due { font-size: 11px; font-weight: 600; flex: 0 0 auto; color: var(--t3); }

/* 搜索 */
.searchbar { display: flex; gap: 8px; padding: 10px 12px; background: #fff; position: sticky; top: 52px; z-index: 30; }
.search-inp {
  flex: 1; height: 36px; background: var(--bg); border-radius: 18px;
  padding: 0 14px; display: flex; align-items: center; gap: 6px;
}
.search-inp input { flex: 1; border: none; background: none; outline: none; font-size: 13px; }
.search-inp .ic { opacity: .5; font-size: 13px; }

/* 订单详情 */
.detail-hero { background: linear-gradient(150deg, #165DFF, #3D82FF); padding: 14px 16px 30px; color: #fff; }
.dh-no { font-size: 12px; opacity: .85; font-family: Menlo, monospace; }
.dh-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.dh-stage { font-size: 20px; font-weight: 700; }
.dh-tag { background: rgba(255,255,255,.22); padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 600; }
.dh-tag.warn { background: var(--warning); }

.actionbar {
  margin: -14px 12px 0; background: #fff; border-radius: 12px; padding: 12px 14px;
  position: relative; z-index: 5; border: 1px solid #FFE4C4;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.actionbar.done { border-color: #C6F0CE; }
.ab-lbl { font-size: 10px; color: var(--warning); font-weight: 700; letter-spacing: .8px; }
.ab-act { font-size: 14px; font-weight: 600; margin-top: 5px; line-height: 1.45; padding-right: 90px; }
.ab-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--t3); flex-wrap: wrap; }
.ab-go {
  position: absolute; right: 12px; bottom: 12px;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 16px;
}

.progress { display: flex; align-items: flex-start; padding: 16px 6px 4px; overflow-x: auto; }
.progress::-webkit-scrollbar { height: 0; }
.pstep { flex: 0 0 auto; width: 56px; text-align: center; position: relative; cursor: pointer; }
.pstep:active .dot { transform: scale(0.9); }
.pstep:active .nm { color: var(--primary); }
.pstep .dot {
  width: 18px; height: 18px; border-radius: 50%; margin: 0 auto;
  background: #E5E6EB; display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #fff; font-weight: 700; position: relative; z-index: 2;
}
.pstep.done .dot { background: var(--success); }
.pstep.cur .dot { background: var(--primary); box-shadow: 0 0 0 4px rgba(22,93,255,.15); }
.pstep .nm { font-size: 9px; color: var(--t3); margin-top: 6px; line-height: 1.3; }
.pstep.cur .nm { color: var(--primary); font-weight: 700; }
.pstep::after {
  content: ''; position: absolute; top: 9px; left: calc(50% + 10px);
  width: 36px; height: 2px; background: #E5E6EB;
}
.pstep:last-child::after { display: none; }
.pstep.done::after { background: var(--success); }

.tabs { display: flex; background: #fff; border-bottom: 1px solid var(--border); padding: 0 6px; position: sticky; top: 52px; z-index: 20; }
.tabx { flex: 1; text-align: center; padding: 12px 0 10px; font-size: 13px; color: var(--t2); position: relative; cursor: pointer; }
.tabx.on { color: var(--primary); font-weight: 600; }
.tabx.on::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 2.5px; background: var(--primary); border-radius: 2px; }

.item { padding: 11px 0; border-bottom: 1px dashed var(--border); }
.item:last-child { border-bottom: none; }
.item.linkable { cursor: pointer; }
.item.linkable:active { background: #F7F9FF; }
.item-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item-code { font-size: 12px; font-family: Menlo, monospace; font-weight: 600; }
.item-sub { font-size: 11px; color: var(--t3); margin-top: 4px; }
.item-line { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--t2); }
.item-line .amt { color: var(--t1); font-weight: 600; }
.report-flag { display: inline-block; margin-top: 6px; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.report-flag.valid { background: var(--success-l); color: var(--success); }
.report-flag.expiring { background: var(--warning-l); color: var(--warning); }
.report-flag.expired { background: var(--danger-l); color: var(--danger); }
.report-flag.none { background: #F2F3F5; color: var(--t3); }

.tl { display: flex; gap: 10px; padding-bottom: 16px; position: relative; }
.tl:not(:last-child)::before {
  content: ''; position: absolute; left: 5px; top: 16px; bottom: 0; width: 1px; background: var(--border);
}
.tl-dot { width: 11px; height: 11px; border-radius: 50%; background: #D6E2FF; border: 2px solid var(--primary); flex: 0 0 auto; margin-top: 4px; z-index: 2; }
.tl-t { font-size: 13px; font-weight: 600; }
.tl-m { font-size: 11px; color: var(--t3); margin-top: 3px; }
.tl-r { font-size: 12px; color: var(--t2); margin-top: 4px; line-height: 1.5; }

/* 产品库 */
.gcard { display: flex; gap: 12px; padding: 12px 14px; background: #fff; margin: 10px 12px; border-radius: 12px; cursor: pointer; }
.thumb {
  width: 70px; height: 70px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(145deg, #3A3A3C, #161618);
  display: flex; align-items: flex-end; padding: 8px; position: relative; overflow: hidden;
}
.thumb::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 3px, transparent 3px 8px); }
.thumb-code { font-size: 10px; color: rgba(255,255,255,.75); font-family: Menlo, monospace; position: relative; z-index: 2; }
.g-info { flex: 1; min-width: 0; }
.g-name { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.g-spec { font-size: 11px; color: var(--t3); margin-bottom: 8px; }
.g-bot { display: flex; gap: 5px; flex-wrap: wrap; }

.colorgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px; }
@media (min-width: 560px) { .colorgrid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 800px) { .colorgrid { grid-template-columns: repeat(8, 1fr); } }
.cg { cursor: pointer; }
.cg .sw { width: 100%; padding-top: 100%; border-radius: 10px; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.06); }
.cg .cnt { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 8px; font-weight: 600; }
.cg .lock { position: absolute; left: 4px; top: 4px; background: rgba(245,63,63,.9); color: #fff; font-size: 9px; padding: 1px 4px; border-radius: 4px; font-weight: 700; }
.cg .cc { font-size: 11px; text-align: center; margin-top: 5px; font-weight: 600; font-family: Menlo, monospace; }
.cg .cn { font-size: 10px; text-align: center; color: var(--t3); }

/* 看板 */
.board { display: flex; gap: 10px; padding: 12px; overflow-x: auto; height: calc(100vh - 52px - var(--tab-h) - 44px); }
.board::-webkit-scrollbar { height: 6px; }
.col { flex: 0 0 240px; display: flex; flex-direction: column; }
.col-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #fff; border-radius: 10px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.col-h .n { background: var(--bg); color: var(--t2); padding: 1px 7px; border-radius: 9px; font-size: 11px; }
.col-body { flex: 1; overflow-y: auto; padding-right: 2px; }
.bcard { background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; border-left: 3px solid var(--primary); }
.bcard.risk { border-left-color: var(--danger); background: #FFFBF9; }
.b-no { font-size: 12px; font-weight: 600; font-family: Menlo, monospace; }
.b-cust { font-size: 13px; font-weight: 600; margin-top: 4px; }
.b-sku { font-size: 10px; color: var(--t3); font-family: Menlo, monospace; margin-top: 3px; }
.b-meta { font-size: 10px; color: var(--t3); margin-top: 6px; }
.b-next { font-size: 10px; color: var(--t2); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); line-height: 1.4; }

/* 弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 560px; background: #fff;
  border-radius: 18px 18px 0 0; padding: 8px 0 calc(20px + env(safe-area-inset-bottom));
  max-height: 85vh; overflow-y: auto; animation: up .22s ease;
}
@keyframes up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-h { text-align: center; padding: 16px 16px 6px; font-size: 16px; font-weight: 600; position: relative; }
.sheet-h .close { position: absolute; right: 16px; top: 14px; font-size: 18px; color: var(--t3); }
.sheet-sub { text-align: center; font-size: 12px; color: var(--t3); padding-bottom: 6px; }
.sheet-body { padding: 6px 0; }

.chk { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; padding: 6px 0; }
.chk .box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--t4); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; flex: 0 0 auto; }
.chk.on .box { background: var(--primary); border-color: var(--primary); }

/* Toast */
#toast-root { position: fixed; left: 0; right: 0; top: 50%; z-index: 999; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.toast {
  background: rgba(0,0,0,.78); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 8px; max-width: 80%;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 桌面端：侧边栏 */
@media (min-width: 900px) {
  .shell { flex-direction: row; }
  .tabbar {
    position: fixed; left: 0; top: 0; bottom: 0; right: auto;
    width: 190px; height: 100vh; flex-direction: column;
    padding: 16px 0; gap: 4px; border-top: none; border-right: 1px solid var(--border);
    max-width: none; margin: 0; background: #fff;
  }
  .tab { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 22px; font-size: 14px; }
  .tab .ic { font-size: 18px; }
  .main { margin-left: 190px; flex: 1; }
  .topbar { position: sticky; }
  .page { padding-bottom: 24px; }
  .board { height: calc(100vh - 52px - 44px); }
}

/* ============ V2 新增样式 ============ */
:root {
  --green: #00B42A;
  --orange: #FF7D00;
  --red: #F53F3F;
}
.red { color: var(--red) !important; }
.green { color: var(--green) !important; }
.orange { color: var(--orange) !important; }

/* 首页头部 */
.home-hero {
  padding: 22px 18px 16px;
  background: linear-gradient(135deg, #165DFF 0%, #4080FF 100%);
  color: #fff;
}
.home-hero .hello { font-size: 20px; font-weight: 600; }
.home-hero .hello-sub { font-size: 13px; opacity: .85; margin-top: 6px; }

/* 统计 */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding: 12px; background: #fff;
  border-bottom: 1px solid var(--border);
}
.stat {
  text-align: center; padding: 10px 4px; border-radius: 10px;
  background: var(--bg); cursor: pointer;
}
.stat:active { opacity: .7; }
.stat .num { font-size: 20px; font-weight: 700; color: var(--t1); }
.stat .num.blue { color: var(--primary); }
.stat .num.red { color: var(--red); }
.stat .num.orange { color: var(--orange); }
.stat .lb { font-size: 11px; color: var(--t3); margin-top: 3px; }

.sec-title {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 16px 8px; font-size: 14px; font-weight: 600;
}
.sec-title .more { font-size: 12px; color: var(--primary); font-weight: 400; cursor: pointer; }

/* 客户分组 */
.cust-group { margin: 0 12px 10px; background: #fff; border-radius: 12px; overflow: hidden; }
.cust-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 8px; font-weight: 600; font-size: 14px;
}
.todo-row {
  display: flex; gap: 10px; padding: 11px 14px;
  border-top: 1px solid var(--border); cursor: pointer;
}
.todo-row:active { background: #F7F9FF; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 13px; font-weight: 500; }
.todo-sub { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.todo-next { font-size: 12px; color: var(--t3); }
.todo-right { text-align: right; flex: 0 0 auto; }
.todo-right .due { font-size: 12px; font-weight: 600; }
.todo-right .due.red { color: var(--red); }
.todo-right .due.orange { color: var(--orange); }
.todo-right .due.gray { color: var(--t3); }

/* 订单卡片 */
.ord-card {
  margin: 0 12px 10px; padding: 13px 14px; background: #fff;
  border-radius: 12px; cursor: pointer;
}
.ord-card:active { opacity: .75; }
.ord-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ord-cust { font-size: 15px; font-weight: 600; }
.ord-items { font-size: 12px; color: var(--t3); margin-top: 6px; }
.ord-b { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.ord-amt { margin-left: auto; font-size: 13px; font-weight: 600; }

/* 卡片标题 */
.card-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

/* 当前环节提示 */
.cur-hint {
  margin-top: 10px; padding: 9px 12px; background: #F7F9FF;
  border-radius: 8px; font-size: 12px; color: #4E5969; line-height: 1.6;
}

/* 操作栏 */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--border);
  max-width: 900px; margin: 0 auto;
}
.action-bar .btn { flex: 1; }

/* 行式链接 */
.row-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px dashed var(--border); cursor: pointer;
}
.row-link:last-child { border-bottom: none; }
.row-link:active { opacity: .7; }
.row-static {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px dashed var(--border);
}
.row-static:last-child { border-bottom: none; }

/* 日志 */
.log-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.log-row:last-child { border-bottom: none; }
.log-time { flex: 0 0 96px; font-size: 11px; color: var(--t4); }
.log-body { flex: 1; font-size: 12px; line-height: 1.6; }
.log-warn { color: var(--orange); font-weight: 600; }

/* 明细补充 */
.item-b { font-size: 12px; color: var(--t2); margin-top: 6px; }
.item-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.item-remark { font-size: 11px; color: var(--t3); margin-top: 5px; background: var(--bg); padding: 5px 8px; border-radius: 6px; }

/* 色号网格 */
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.color-item { cursor: pointer; }
.color-item .sw {
  height: 52px; border-radius: 9px; border: 1px solid rgba(0,0,0,.06);
}
.color-info { margin-top: 5px; }
.color-code { font-size: 12px; font-weight: 500; }
.color-item .tag { margin-top: 3px; font-size: 10px; padding: 1px 6px; }

/* 头像 */
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, #165DFF, #4080FF); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600;
}
.avatar.sm { width: 38px; height: 38px; font-size: 15px; }

/* 菜单 */
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 14px; cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg); }

/* 员工行 */
.user-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.user-row:last-child { border-bottom: none; }
.user-row:active { background: var(--bg); }

/* 中止环节 */
.pstep.cancel .dot { background: var(--red) !important; color: #fff; }

/* 色号多选 */
.color-pick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px;
  max-height: 50vh; overflow-y: auto; padding: 2px;
}
.color-pick { cursor: pointer; text-align: center; }
.color-pick .sw {
  height: 46px; border-radius: 8px; border: 2px solid transparent;
  position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.color-pick.on .sw { border-color: var(--primary); }
.color-pick .ck {
  position: absolute; right: 3px; top: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 10px; line-height: 16px; display: none;
}
.color-pick.on .ck { display: block; }
.color-pick .cc { font-size: 11px; font-weight: 600; margin-top: 4px; }
.color-pick .cn { font-size: 10px; color: var(--t3); }

/* 配置行 */
.cfg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border-bottom: 1px solid var(--border);
}
.cfg-row:last-child { border-bottom: none; }
.cfg-del { font-size: 12px; color: var(--red); cursor: pointer; flex: 0 0 auto; }
.cfg-act { font-size: 12px; color: var(--primary); cursor: pointer; flex: 0 0 auto; }
