/* ===== 探店排期管理 · 移动端样式 ===== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #14161a;
  --ink-2: #5b6472;
  --ink-3: #97a0ad;
  --line: #eceef2;
  --line-2: #f2f4f7;
  --brand: #fe2c55;
  --brand-soft: #ffe9ee;
  --dark: #16181d;
  --ok: #0f9d63;
  --ok-soft: #e6f7ef;
  --warn: #e8810b;
  --warn-soft: #fdf1e0;
  --info: #2f6bff;
  --info-soft: #e9efff;
  --danger: #e13b3b;
  --danger-soft: #fdeaea;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 6px 20px rgba(20, 22, 26, .05);
  --shadow-lg: 0 12px 40px rgba(20, 22, 26, .14);
  --nav-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-size: 15px;
  line-height: 1.5;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background: var(--bg);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);
}
.app.no-nav { padding-bottom: 0; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: rgba(244, 245, 247, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.topbar .sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.topbar .grow { flex: 1; min-width: 0; }
.topbar .icon-btn {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow);
  color: var(--ink-2);
}
.topbar .icon-btn:active { transform: scale(.94); }

.page { padding: 0 16px 24px; }
.section { margin-top: 18px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 2px 10px;
}
.section-head h2 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.section-head .link { font-size: 12.5px; color: var(--ink-3); }
.section-head .link:active { opacity: .6; }

/* ===== 卡片 ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card.tight { padding: 12px 14px; }
.card.flush { padding: 0; overflow: hidden; }

/* ===== 登录 ===== */
.login-wrap {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 56px) 24px calc(env(safe-area-inset-bottom) + 28px);
  background: var(--surface);
}
.brand-mark {
  width: 62px; height: 62px; border-radius: 20px;
  background: linear-gradient(135deg, #fe2c55 0%, #ff5c78 55%, #25f4ee 160%);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 27px; letter-spacing: -1px;
  box-shadow: 0 10px 24px rgba(254, 44, 85, .28);
  margin-bottom: 22px;
}
.login-wrap h1 { font-size: 25px; margin: 0 0 6px; letter-spacing: -.6px; font-weight: 800; }
.login-wrap .lead { color: var(--ink-3); font-size: 13.5px; margin: 0 0 34px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-foot { margin-top: auto; padding-top: 28px; text-align: center; color: var(--ink-3); font-size: 12px; line-height: 1.7; }
.login-foot b { color: var(--ink-2); font-weight: 600; }

/* ===== 表单 ===== */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .2px; }
.field > label .req { color: var(--brand); margin-left: 2px; }
.input, .textarea, select.input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
  line-height: 1.35;
}
.input:focus, .textarea:focus, select.input:focus {
  border-color: #ffc2cf; background: #fff;
  box-shadow: 0 0 0 3.5px rgba(254, 44, 85, .08);
}
.input::placeholder, .textarea::placeholder { color: #b9c0ca; }
.textarea { min-height: 82px; resize: vertical; }
select.input {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2397a0ad' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix .prefix {
  position: absolute; left: 14px; color: var(--ink-3); font-size: 14px; pointer-events: none;
}
.input-affix .input { padding-left: 30px; }
.input-affix .suffix-btn {
  position: absolute; right: 6px;
  height: 34px; padding: 0 12px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft);
}
.input-affix .suffix-btn:disabled { color: var(--ink-3); background: var(--line-2); }
.hint { font-size: 12px; color: var(--ink-3); }
.hint.err { color: var(--danger); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 18px; border-radius: 13px;
  font-size: 15px; font-weight: 600; letter-spacing: .2px;
  transition: transform .12s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(254, 44, 85, .22); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-soft { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { cursor: not-allowed; }

/* ===== 标签 / 徽章 ===== */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 13px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); font-weight: 500;
  transition: all .15s;
}
.chip:active { transform: scale(.96); }
.chip.on {
  background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600;
}
.chip.on.brand { background: var(--brand); border-color: var(--brand); }

/* ===== 多选达人 ===== */
.pick-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pick-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 7px 6px 11px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 13px; font-weight: 600; max-width: 100%;
}
.pick-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-x {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  background: rgba(254, 44, 85, .14); color: var(--brand);
  font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.pick-x:active { background: rgba(254, 44, 85, .26); }
.pick-list { max-height: 44vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pick-row {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 9px; border-radius: 12px; border: 1px solid transparent;
  text-align: left; margin-bottom: 2px;
}
.pick-row:active { background: var(--surface-2); }
.pick-row.on { background: var(--brand-soft); border-color: rgba(254, 44, 85, .22); }
.pick-box {
  width: 21px; height: 21px; flex-shrink: 0; border-radius: 7px;
  border: 1.5px solid #d5d9e0; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
}
.pick-row.on .pick-box { background: var(--brand); border-color: var(--brand); }
.pick-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-row .pn { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .pm { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
  white-space: nowrap;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-brand { background: var(--brand-soft); color: var(--brand); }
.pill-muted { background: var(--surface-2); color: var(--ink-3); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }

.tag {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  background: var(--surface-2); color: var(--ink-3);
  font-size: 11px; font-weight: 500; white-space: nowrap;
}

/* ===== 数据卡 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-grid.three { grid-template-columns: repeat(3, 1fr); }
.stat {
  background: var(--surface); border-radius: 14px; padding: 13px 14px;
  box-shadow: var(--shadow);
}
.stat .k { font-size: 11.5px; color: var(--ink-3); }
.stat .v { font-size: 21px; font-weight: 800; letter-spacing: -.5px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.stat .d { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* ===== 列表 ===== */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line-2);
  background: var(--surface);
}
.row:last-child { border-bottom: none; }
.row:active { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-size: 14.5px; font-weight: 600; letter-spacing: -.1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .desc { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .end { text-align: right; flex-shrink: 0; }
.row .end .amt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.row .end .meta { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.row .chev { color: #c6ccd6; flex-shrink: 0; }

.avatar {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 700; font-size: 14px;
}
.avatar.dark { background: #eef0f4; color: var(--ink-2); }

/* 日期分组 */
.day-group { margin-bottom: 14px; }
.day-head {
  display: flex; align-items: center; gap: 8px;
  padding: 0 4px 8px;
  font-size: 12.5px; color: var(--ink-3); font-weight: 600;
}
.day-head b { color: var(--ink); font-size: 13.5px; font-weight: 700; }
.day-head .today-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.day-head .sum { margin-left: auto; font-variant-numeric: tabular-nums; }

.entry {
  background: var(--surface); border-radius: 15px; box-shadow: var(--shadow);
  padding: 13px 14px; margin-bottom: 9px;
  display: flex; gap: 11px; align-items: flex-start;
}
.entry:active { transform: scale(.995); }
.entry .body { flex: 1; min-width: 0; }
.entry .line1 { display: flex; align-items: baseline; gap: 6px; }
.entry .client { font-size: 15px; font-weight: 700; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .amount { margin-left: auto; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.4px; flex-shrink: 0; }
.entry .line2 { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; display: flex; align-items: center; gap: 5px; overflow: hidden; }
.entry .line2 .dot { color: #d3d8e0; }
.entry .line3 { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.entry .owner { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }

/* 达人服务榜（可点击） */
.inf-row {
  width: 100%; text-align: left; background: transparent;
  border: 0; border-bottom: 1px solid var(--line-2);
  font-family: inherit; color: inherit;
}
.inf-row:last-child { border-bottom: none; }
.inf-row .title { display: flex; align-items: center; }
.inf-row .chev { color: #c6ccd6; font-size: 15px; }
.inf-row .desc { margin-top: 3px; }

/* 达人订单明细卡 */
.o-card {
  display: block; width: 100%; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 13px; padding: 11px 12px; margin-bottom: 8px;
  font-family: inherit; color: inherit;
}
.o-card:active { background: #f0f2f6; }
.o-card .r1 { display: flex; align-items: baseline; gap: 8px; }
.o-card .cl {
  font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.o-card .am {
  margin-left: auto; flex-shrink: 0;
  font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px;
}
.o-card .r2 { font-size: 12px; color: var(--ink-3); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-card .r3 { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.o-card .r3 .ow { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }

/* 排行 */
.rank-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.rank-row + .rank-row { border-top: 1px solid var(--line-2); }
.rank-no {
  width: 21px; height: 21px; border-radius: 7px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-3);
}
.rank-no.top1 { background: #fff3d6; color: #b47200; }
.rank-no.top2 { background: #eef1f6; color: #6b7480; }
.rank-no.top3 { background: #fdeee3; color: #a35b22; }
.rank-main { flex: 1; min-width: 0; }
.rank-main .n { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.rank-main .n .me { font-size: 10px; padding: 1px 5px; border-radius: 5px; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.bar { height: 5px; border-radius: 4px; background: var(--line-2); margin-top: 7px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ff7a92, var(--brand)); }
.bar.grey > i { background: linear-gradient(90deg, #c8d0db, #a8b2c0); }
.rank-amt { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rank-amt .a { font-size: 14px; font-weight: 700; }
.rank-amt .c { font-size: 11px; color: var(--ink-3); margin-top: 1px; }

/* 图表 */
.chart-wrap { margin-top: 4px; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-x { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }

/* ===== 底栏 ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  max-width: 560px; margin: 0 auto;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; color: var(--ink-3); font-weight: 500;
  padding-top: 6px;
}
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--brand); font-weight: 700; }
.nav-item.active svg { stroke: var(--brand); }
.nav-item:active { opacity: .6; }

/* FAB */
.fab {
  position: fixed; z-index: 45;
  right: max(16px, calc(50vw - 280px + 16px));
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  height: 50px; padding: 0 20px 0 16px; border-radius: 26px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 700;
  box-shadow: 0 10px 24px rgba(254, 44, 85, .34);
}
.fab:active { transform: scale(.95); }

/* ===== 月切换 ===== */
.month-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0 12px;
}
.month-bar .m {
  font-size: 17px; font-weight: 800; letter-spacing: -.3px;
  min-width: 108px; text-align: center;
}
.month-bar .nav-btn {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow); color: var(--ink-2);
}
.month-bar .nav-btn:active { transform: scale(.92); }
.month-bar .today-btn {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--brand);
  padding: 5px 10px; border-radius: 8px; background: var(--brand-soft);
}

/* 搜索 */
.search {
  position: relative; margin-bottom: 10px;
}
.search input {
  width: 100%; height: 40px; padding: 0 14px 0 36px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); outline: none; font-size: 14px;
}
.search input:focus { border-color: #ffc2cf; }
.search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; stroke: var(--ink-3); fill: none; stroke-width: 2;
}

/* ===== 空态 ===== */
.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty .icon { font-size: 30px; opacity: .5; margin-bottom: 10px; }
.empty .t { font-size: 13.5px; }
.empty .s { font-size: 12px; margin-top: 4px; opacity: .8; }

/* ===== 底部弹层 ===== */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 18, 22, .42);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.sheet-overlay.in { opacity: 1; }
.sheet {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(env(safe-area-inset-bottom) + 18px);
  max-height: 88dvh; overflow-y: auto;
  transform: translateY(24px); transition: transform .24s cubic-bezier(.2,.8,.3,1);
  box-shadow: var(--shadow-lg);
}
.sheet-overlay.in .sheet { transform: translateY(0); }
.sheet .handle { width: 36px; height: 4px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.sheet h3 { margin: 0 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.sheet .sheet-sub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 16px; }
.sheet .sheet-body { display: flex; flex-direction: column; gap: 13px; }
.sheet .row-actions { display: flex; gap: 9px; margin-top: 16px; }
.sheet .row-actions > * { flex: 1; }

.dl { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.dl:last-child { border-bottom: none; }
.dl .k { color: var(--ink-3); flex-shrink: 0; }
.dl .v { text-align: right; font-weight: 600; }

/* ===== Toast ===== */
#toast-root { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 12px); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  max-width: 88%; padding: 10px 16px; border-radius: 12px;
  background: rgba(22, 24, 29, .92); color: #fff;
  font-size: 13.5px; line-height: 1.45; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  transform: translateY(-10px); opacity: 0; transition: all .22s;
  backdrop-filter: blur(8px);
}
.toast.in { transform: none; opacity: 1; }
.toast.err { background: rgba(190, 40, 40, .95); }
.toast.ok { background: rgba(15, 140, 85, .95); }

/* ===== 详情/其它 ===== */
.muted { color: var(--ink-3); }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; }
.kpi-inline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.dot-sep { color: #d3d8e0; }

/* ===== 分段控件 ===== */
.seg {
  display: flex; gap: 4px; padding: 4px;
  background: #e9ebf0; border-radius: 13px;
}
.seg-item {
  flex: 1; height: 34px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: all .16s;
}
.seg-item.on {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 22, 26, .1);
}

/* ===== 快捷入口 ===== */
.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 9px; margin-top: 14px;
}
.quick {
  background: var(--surface); border-radius: 14px;
  padding: 11px 4px 10px; text-align: center;
  font-size: 11.5px; color: var(--ink-2); font-weight: 500;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.quick:active { transform: scale(.96); }
.quick .qi {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 600; line-height: 1;
}

.skeleton { background: linear-gradient(90deg, #eef0f4 25%, #f6f7f9 37%, #eef0f4 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 10px; }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.spinner.dark { border-color: rgba(0,0,0,.12); border-top-color: var(--ink-2); }
@keyframes spin { to { transform: rotate(360deg) } }

.loading-screen { min-height: 100dvh; display: grid; place-items: center; }

/* ===== 微信登录 / 绑定 ===== */
.btn-wx {
  background: #07c160; color: #fff;
  box-shadow: 0 6px 16px rgba(7, 193, 96, .22);
  gap: 8px;
}
.btn-wx:disabled { opacity: .6; }
.avatar.wx { background: #e6f8ee; color: #07a854; }

.login-or {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 18px;
  color: var(--ink-3); font-size: 12px;
}
.login-or::before, .login-or::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.notice {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.65;
}
.notice b { color: var(--ink); }
.notice-err {
  background: var(--danger-soft);
  border-color: #f9d5d5;
  color: var(--danger);
  margin-bottom: 16px;
}

/* 浅色按钮里的 loading 圈可见性 */
.btn-soft .spinner, .btn-ghost .spinner, .btn-danger .spinner {
  border-color: rgba(0, 0, 0, .12); border-top-color: var(--ink-2);
}

/* iOS Safari / 微信内置浏览器：输入框字号 <16px 会触发页面放大 */
.input, .textarea, select.input { font-size: 16px; }
.input::placeholder, .textarea::placeholder { font-size: 15px; }

/* ===== 排期表 · 时间线 UI ===== */
.tl-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 0 0 16px;
}
.tl-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 13px; padding: 10px 11px;
  font-family: inherit; text-align: left; cursor: pointer;
  transition: transform .08s ease;
}
.tl-stat:active { transform: scale(.96); }
.tl-stat .k { font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.tl-stat .v { font-size: 17px; font-weight: 800; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.tl-stat .v small { font-size: 10px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.tl-stat .a { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-stat.c-warn .v { color: var(--warn); }
.tl-stat.c-brand .v { color: var(--brand); }
.tl-stat.c-ok .v { color: var(--ok); }
.tl-stat.on { border-color: var(--brand); background: var(--brand-soft); }

.tl-day { display: flex; gap: 10px; }
.tl-rail { width: 40px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.tl-date {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--surface); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1;
}
.tl-date b { font-size: 15px; font-weight: 800; letter-spacing: -.3px; }
.tl-date span { font-size: 9.5px; color: var(--ink-3); margin-top: 2px; }
.tl-day.today .tl-date { background: var(--brand); }
.tl-day.today .tl-date b, .tl-day.today .tl-date span { color: #fff; }
.tl-day.today .tl-date span { opacity: .8; }
.tl-line { flex: 1; width: 2px; margin-top: 6px; border-radius: 2px; background: var(--line); min-height: 18px; }
.tl-col { flex: 1; min-width: 0; padding-bottom: 18px; }
.tl-dayhead {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 2px 8px;
}
.tl-dayhead b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.tl-day.today .tl-dayhead b::after {
  content: '今天'; margin-left: 6px; font-size: 10px; font-weight: 700;
  color: var(--brand); background: var(--brand-soft);
  padding: 2px 6px; border-radius: 6px; vertical-align: 1px;
}
.tl-dayhead .sum { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.tl-card {
  position: relative;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 13px 11px 16px; margin-bottom: 8px;
  cursor: pointer; overflow: hidden;
  transition: transform .08s ease;
}
.tl-card::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3.5px; border-radius: 0 4px 4px 0; background: var(--stc, var(--ink-3));
}
.tl-card:active { transform: scale(.985); }
.tl-card.st-planned   { --stc: var(--warn); }
.tl-card.st-shot      { --stc: var(--info); }
.tl-card.st-published { --stc: var(--brand); }
.tl-card.st-settled   { --stc: var(--ok); }

.tl-card .r1 { display: flex; align-items: baseline; gap: 8px; }
.tl-card .client { font-size: 15px; font-weight: 700; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-card .amount { margin-left: auto; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.4px; flex-shrink: 0; }
.tl-card .r2 { display: flex; align-items: center; gap: 6px; margin-top: 5px; overflow: hidden; }
.tl-card .r2 .tag {
  font-size: 10.5px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 1.5px 7px; flex-shrink: 0;
}
.tl-card .r2 .svc { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-card .r3 { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.tl-card .tl-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--stc, var(--ink-2));
}
.tl-card .tl-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--stc, var(--ink-3)); }
.tl-card .tl-inf {
  font-size: 10.5px; font-weight: 600; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 9px;
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tl-card .tl-inf.more { color: var(--ink-3); background: transparent; }
.tl-card .tl-none { font-size: 11px; color: var(--ink-3); }
.tl-card .r4 {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--ink-3);
}
.tl-card .r4 .sales { color: var(--ink-2); font-weight: 600; }
.tl-card .r4 .owner { margin-left: auto; }

/* ===== 客户明细 · 卡片式 ===== */
.cust-list { display: flex; flex-direction: column; gap: 8px; }
.cust-row {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  background: var(--surface); border: 0; font-family: inherit; color: inherit;
  border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 13px; cursor: pointer;
  transition: transform .08s ease;
}
.cust-row:active { transform: scale(.985); }
.cust-ava {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ffe9ee, #ffd6df);
  color: var(--brand); font-weight: 800; font-size: 15px;
}
.cust-main { flex: 1; min-width: 0; }
.cust-main .n { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cust-main .cn {
  font-size: 14.5px; font-weight: 700; letter-spacing: -.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cust-main .st-dot {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  font-size: 10px; font-weight: 700;
}
.cust-main .st-dot i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cust-main .st-dot.planned { color: var(--warn); }
.cust-main .st-dot.shot { color: var(--info); }
.cust-main .st-dot.published { color: var(--brand); }
.cust-main .st-dot.settled { color: var(--ok); }
.cust-main .meta {
  display: flex; align-items: center; gap: 6px; margin-top: 4px; overflow: hidden;
}
.cust-main .meta .tag {
  font-size: 10.5px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; flex-shrink: 0;
}
.cust-main .meta .svc {
  font-size: 11.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cust-side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cust-side .amt {
  font-size: 15.5px; font-weight: 800; letter-spacing: -.4px;
  color: var(--brand); font-variant-numeric: tabular-nums;
}
.cust-side .sales { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.cust-side .s-ico {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-soft); position: relative;
}
.cust-side .s-ico::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--brand); opacity: .85;
}
.cust-side .date { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ===== 月度指标进度 ===== */
.tg-row { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tg-row:last-child { border-bottom: 0; }
.tg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.tg-head b { font-size: 14px; font-weight: 700; letter-spacing: -.2px; }
.tg-head .pct { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tg-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tg-line .k { width: 30px; flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.tg-line .tg-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.tg-line .tg-bar i { display: block; height: 100%; border-radius: 4px; transition: width .3s ease; }
.tg-line.signed .tg-bar i { background: var(--brand); }
.tg-line.paid .tg-bar i { background: var(--ok); }
.tg-line .v { flex-shrink: 0; font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.tg-line .v em { font-style: normal; margin-left: 6px; font-size: 11px; color: var(--ink-3); font-weight: 700; }
.tg-line .v .hit { color: var(--ok); font-size: 10.5px; }
.tg-line .v .no-tg { color: var(--ink-3); font-weight: 500; }

/* 团队总览（环形） */
.tg-team { padding: 14px 14px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff7f9 0%, var(--surface) 100%); }
.tg-team-top { display: flex; align-items: baseline; gap: 8px; }
.tg-team-top b { font-size: 13.5px; font-weight: 800; letter-spacing: -.3px; }
.tg-team-top span { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.tg-rings { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; }
.tg-ring-col { display: flex; flex-direction: column; align-items: center; }
.tg-ring-wrap { position: relative; width: 62px; height: 62px; }
.tg-ring { display: block; width: 62px; height: 62px; transform: rotate(-90deg); }
.tg-ring circle { fill: none; stroke-width: 6; }
.tg-ring .trk { stroke: #eef0f4; }
.tg-ring .bar { stroke-linecap: round; transition: stroke-dashoffset .45s ease; }
.tg-ring-col.signed .bar { stroke: var(--brand); }
.tg-ring-col.paid .bar { stroke: var(--ok); }
.tg-ring-wrap .pc {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums;
}
.tg-ring-wrap .pc small { font-size: 9.5px; font-weight: 700; margin: 1px 0 0 1px; }
.tg-ring-col.signed .pc { color: var(--brand); }
.tg-ring-col.paid .pc { color: var(--ok); }
.tg-ring-col .cap { font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-top: 4px; }
.tg-ring-col .amt { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tg-ring-col .amt b { font-size: 12px; color: var(--ink); font-weight: 800; }
.tg-ring-col .amt .notg { font-weight: 500; }
.tg-team-foot { margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--ink-2); line-height: 1.7; font-variant-numeric: tabular-nums; }
.tg-team-foot .miss { color: var(--warn); font-weight: 700; }
.tg-team-foot .over { color: var(--ok); font-weight: 700; }
.tg-team-foot .muted { font-size: 10.5px; margin-top: 2px; }

/* 员工管理 · 月度指标行 */
.tg-edit-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: transparent; border: 0; font-family: inherit; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; color: inherit; }
.tg-edit-row:last-child { border-bottom: 0; }
.tg-edit-row .t { flex: 1; min-width: 0; }
.tg-edit-row .n { font-size: 14px; font-weight: 700; }
.tg-edit-row .d { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.tg-edit-row .d b { color: var(--ink-2); }
.tg-edit-row .chev { color: var(--ink-3); }
.tg-month-nav { display: flex; align-items: center; gap: 4px; }
.tg-month-nav button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); cursor: pointer; line-height: 1; }
.tg-month-nav b { font-size: 12.5px; min-width: 74px; text-align: center; }

/* 指标进度 · 单数与可点行 */
.tg-ring-col .cap .cn { font-size: 10px; font-weight: 600; color: var(--ink-3); margin-left: 4px; }
.tg-row.tappable { cursor: pointer; transition: background .12s ease; }
.tg-row.tappable:active { background: var(--surface-2); }
.tg-head .cnt { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tg-head .chev { margin-left: auto; font-size: 15px; color: var(--ink-3); line-height: 1; }

/* 个人业务明细弹层 */
.sb-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 12px; }
.sb-sum .cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; }
.sb-sum .k { font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.sb-sum .v { font-size: 15px; font-weight: 800; letter-spacing: -.4px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.sb-sum .v.ok { color: var(--ok); }
.sb-sum .v.warn { color: var(--warn); }
.sb-sum .d { font-size: 10px; color: var(--ink-3); margin-top: 1px; }
.sb-target { margin-bottom: 12px; }
.sb-line { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.sb-line .k { width: 30px; flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.sb-bar { flex: 1; height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.sb-bar i { display: block; height: 100%; border-radius: 4px; }
.sb-line.signed .sb-bar i { background: var(--brand); }
.sb-line.paid .sb-bar i { background: var(--ok); }
.sb-line .v { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sb-line .v em { font-style: normal; color: var(--ink-3); }
.sb-line .pc { font-size: 11px; font-weight: 700; color: var(--ink-2); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
