:root {
  --ink: #1b2533; --muted: #6b7686; --faint: #98a2b3; --line: #e4e7ec; --line-2: #eef0f3;
  --bg: #f5f6f8; --card: #ffffff; --brand: #1f3a5f; --brand-2: #2d5585; --brand-soft: #e8eef6;
  --moon: #e3ad3c; --moon-soft: #fbf3e2;
  --ok: #2f7d4f; --ok-soft: #e6f3eb; --warn: #a86a12; --warn-soft: #fbf0dc;
  --err: #b8372b; --err-soft: #fbe9e7; --info: #2d5585; --info-soft: #e8eef6;
  --violet: #6a4fb3; --violet-soft: #efebfa; --grey-soft: #eef0f3;
  --radius: 10px;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.55; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }

/* top bar */
.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 54px; }
.logo { font-weight: 700; font-size: 15px; letter-spacing: .5px; white-space: nowrap; color: #fff; display: flex; align-items: center; gap: 8px; }
.logo:hover { text-decoration: none; }
.logo .moon { width: 18px; height: 18px; border-radius: 50%; background: var(--moon); box-shadow: inset -5px -2px 0 0 #f6dc9a; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav > a, .grp-b { color: #cfdbea; padding: 7px 11px; border-radius: 7px; white-space: nowrap; background: none; border: 0; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.nav > a:hover, .grp:hover .grp-b, .grp:focus-within .grp-b { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav > a.on, .grp.on .grp-b { background: rgba(255,255,255,.14); color: #fff; }
.grp { position: relative; }
.grp-b i { width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; opacity: .7; }
.dd { display: none; position: absolute; top: 100%; left: 0; min-width: 148px; padding: 6px; margin-top: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.14); z-index: 20; }
.grp:hover .dd, .grp:focus-within .dd { display: block; }
.dd a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink); white-space: nowrap; }
.dd a:hover { background: var(--bg); text-decoration: none; }
.dd a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-toggle { display: none; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 7px; padding: 6px 12px; font: inherit; cursor: pointer; }
.search { flex: 1; display: flex; max-width: 420px; margin-left: auto; }
.search input { width: 100%; border: 0; border-radius: 8px; padding: 8px 12px; font-size: 14px; background: rgba(255,255,255,.12); color: #fff; outline: none; }
.search input::placeholder { color: #a9bbd1; }
.search input:focus { background: #fff; color: var(--ink); }
.me { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: #cfdbea; font-size: 13px; }
.me a { color: #cfdbea; }
.role { background: rgba(255,255,255,.14); padding: 1px 7px; border-radius: 10px; font-size: 12px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 20px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.head .sub { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 14px 18px 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 960px) {
  .g2, .g3, .g-main { grid-template-columns: minmax(0, 1fr); }
  .top-in { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px 12px; }
  .nav-toggle { display: block; order: 1; }
  .nav { order: 4; width: 100%; display: none; flex-direction: column; align-items: stretch; padding-bottom: 6px; }
  .nav-open .nav { display: flex; }
  .grp-b { pointer-events: none; color: #8fa5c0; font-size: 12px; padding: 8px 4px 2px; }
  .grp-b i { display: none; }
  .grp.on .grp-b, .grp:hover .grp-b { background: none; color: #8fa5c0; }
  .dd { display: flex; flex-wrap: wrap; gap: 4px; position: static; box-shadow: none; border: 0; background: none; padding: 2px 0; min-width: 0; }
  .dd a, .nav > a { color: #dbe5f1; padding: 7px 10px; background: rgba(255,255,255,.06); border-radius: 7px; }
  .dd a.on { background: rgba(255,255,255,.18); color: #fff; }
  .search { order: 2; max-width: none; flex: 1 1 160px; }
  .me .role { display: none; }
  .wrap { padding: 14px 12px; }
  .card { padding: 14px; }
}

/* stats */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 960px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: block; color: var(--ink); }
.stat:hover { border-color: var(--brand-2); text-decoration: none; }
.stat .v { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: 12.5px; }
.stat.alert .v { color: var(--err); }

/* key-value */
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-all; }

/* tables */
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tr.overdue td { background: #fff7f6; }
.t td.r, .t th.r { text-align: right; }
.scroll { overflow-x: auto; }
.empty { padding: 28px; text-align: center; color: var(--faint); }

/* tags */
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 20px; white-space: nowrap; background: var(--grey-soft); color: var(--muted); }
.tag.blue { background: var(--info-soft); color: var(--info); }
.tag.amber { background: var(--warn-soft); color: var(--warn); }
.tag.green { background: var(--ok-soft); color: var(--ok); }
.tag.red { background: var(--err-soft); color: var(--err); }
.tag.violet { background: var(--violet-soft); color: var(--violet); }
.tag.moon { background: var(--moon-soft); color: #8a5d09; }
.tag.solid-red { background: var(--err); color: #fff; }

/* forms */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 7px 14px; border-radius: 8px; font-size: 13.5px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.btn:hover { border-color: var(--brand-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { color: var(--err); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }
.f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.f label, .lbl { font-size: 12.5px; color: var(--muted); }
.f label .req { color: var(--err); }
input[type=text], input[type=number], input[type=month], input[type=search], select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand-2); }
textarea { min-height: 70px; resize: vertical; }
input[type=file] { font-size: 13px; }
.fr { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { width: auto; min-width: 110px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
details.panel { border: 1px dashed var(--line); border-radius: var(--radius); padding: 0; margin-top: 12px; }
details.panel > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; color: var(--brand-2); list-style: none; }
details.panel > summary::before { content: "＋ "; }
details.panel[open] > summary::before { content: "－ "; }
details.panel > .body { padding: 4px 14px 14px; }

/* flash */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; border: 1px solid; }
.flash.ok { background: var(--ok-soft); border-color: #bfe0cb; color: #1f5e39; }
.flash.warn { background: var(--warn-soft); border-color: #f0d9a8; color: #7a4d0b; }
.flash.err { background: var(--err-soft); border-color: #f2c3bd; color: #8e2a20; }

/* thumbnails */
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs a { display: block; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--grey-soft); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs.lg a { width: 96px; height: 96px; }
.thumbs .file { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); text-align: center; padding: 4px; }

/* timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); margin-left: 6px; }
.tl li:last-child { border-left-color: transparent; }
.tl li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-2); }
.tl li.sys::before { border-color: var(--moon); }
.tl li.st::before { background: var(--brand-2); }
.tl .meta { font-size: 12px; color: var(--muted); }
.tl .txt { white-space: pre-wrap; }

/* status path */
.path { display: flex; gap: 0; flex-wrap: wrap; margin: 6px 0 2px; }
.path span { padding: 4px 12px; font-size: 12.5px; background: var(--grey-soft); color: var(--faint); position: relative; margin-right: 4px; border-radius: 4px; }
.path span.done { background: var(--brand-soft); color: var(--brand-2); }
.path span.cur { background: var(--brand); color: #fff; font-weight: 600; }

.pkg { border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; overflow-x: auto; }
.pkg-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.remark { font-size: 12.5px; color: var(--muted); white-space: pre-wrap; background: #fafbfc; border-radius: 6px; padding: 6px 8px; margin-top: 6px; }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #16283f 0%, #1f3a5f 55%, #2b4c76 100%); padding: 20px; }
.login-card { background: #fff; border-radius: 14px; padding: 32px 30px; width: 380px; max-width: 100%; }
.login-card .logo { color: var(--ink); font-size: 18px; margin-bottom: 4px; }
.feishu-btn { width: 100%; justify-content: center; padding: 11px; font-size: 15px; margin: 18px 0 8px; }
.sep { text-align: center; color: var(--faint); font-size: 12px; margin: 18px 0 10px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
hr.soft { border: 0; border-top: 1px solid var(--line-2); margin: 14px 0; }
.nw, .t .mono { white-space: nowrap; }

/* incentive */
.month-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.month-tabs a { padding: 5px 12px; border-radius: 16px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; }
.month-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.month-tabs a:hover { text-decoration: none; border-color: var(--brand-2); }
.inc-net { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0 10px; }
.inc-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.inc-item { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; color: var(--ink); background: #fafbfc; }
.inc-item:hover { text-decoration: none; border-color: var(--brand-2); }
.inc-item.on { border-color: var(--brand); background: var(--brand-soft); }
.inc-item .k { font-size: 12px; color: var(--muted); }
.inc-item .v { font-weight: 650; font-variant-numeric: tabular-nums; }
.neg { color: var(--err); }
.t tr.dim td { color: var(--faint); background: #fcfcfd; }
.t tr.total td { background: #fafbfc; font-weight: 600; border-top: 1px solid var(--line); }
.inc-sum td a { color: inherit; }
.rank td { padding: 7px 8px; }
.rank tr.me-row td { background: var(--moon-soft); font-weight: 650; }
details.fb { position: relative; }
details.fb > summary { list-style: none; }
details.fb > summary::-webkit-details-marker { display: none; }
.fb-form { position: absolute; right: 0; z-index: 5; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.12); padding: 12px; display: flex; flex-direction: column; gap: 6px; white-space: normal; }
.fb-form.wide { width: 320px; }
.fb-item { border-bottom: 1px solid var(--line-2); padding: 8px 0; }
.fb-item:last-child { border-bottom: 0; }
.t tr.grp td { background: var(--brand-soft); font-weight: 650; color: var(--brand); border-bottom: 1px solid var(--line); }
.t td.why { min-width: 280px; max-width: 520px; }
.drop { position: relative; display: flex; flex-direction: column; gap: 4px; border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer; background: #fafbfc; }
.drop:hover, .drop.on { border-color: var(--brand-2); background: var(--brand-soft); }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop ul { margin: 6px 0 0; padding-left: 18px; }
.prog-head { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0 6px; font-weight: 600; }
.bar { height: 8px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--brand-2); transition: width .2s; }
.bar.mini { height: 4px; width: 110px; margin-top: 4px; }
.t.q td { padding: 7px 10px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist .mark { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: none; margin-top: 1px; }
.checklist li.ok .mark { background: var(--ok-soft); color: var(--ok); }
.checklist li.no .mark { background: var(--err-soft); color: var(--err); }

/* 三期：账号与角色 */
.tag.solid-moon { background: var(--moon); color: #fff; }
.roles-cell { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-width: 330px; }
.roles-cell .chk { font-size: 13px; gap: 4px; }
.users-t tr.muted td { color: var(--faint); }

/* 统一上传框 */
.up { display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius); }
.up-drop { display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 14px 12px; cursor: pointer; background: #fafbfc; min-height: 64px; outline: none; }
.up-drop b { font-weight: 600; }
.up-drop:hover, .up-drop:focus-visible, .up.over .up-drop { border-color: var(--brand-2); background: var(--brand-soft); }
.up.active .up-drop { border-color: #b9c9de; }
.up.over .up-drop { border-style: solid; }
.up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.up-list:empty { display: none; }
.up-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.up-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: var(--line-2); }
.up-ext { display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.up-mid { flex: 1; min-width: 0; }
.up-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-bar { height: 4px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin: 4px 0 2px; }
.up-bar > div { height: 100%; width: 0; background: var(--brand-2); transition: width .2s; }
.up-msg { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.up-item.done .up-bar > div { background: var(--ok); }
.up-item.done .up-msg { color: var(--ok); }
.up-item.fail { border-color: #f0c4be; background: #fffafa; }
.up-item.fail .up-bar > div { background: var(--err); }
.up-item.fail .up-msg { color: var(--err); }
.up-x { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--faint); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.up-x:hover { background: var(--line-2); color: var(--ink); }
.up-note { color: var(--err); }
.up.compact .up-drop { min-height: 48px; padding: 10px; }
.up.compact .up-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.job { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.job.running { border-color: #b9c9de; background: #fbfcfe; }
.job-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.job details { margin-top: 6px; }
.plat-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pick { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; background: #fff; font-size: 13.5px; }
.pick:has(input:checked) { border-color: var(--brand-2); background: var(--brand-soft); }
.pick.taken { background: #fafbfc; }
.share-sec { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fcfdfe; }
.share-sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.share-sec-h .up-x { margin-left: auto; }
details.act { position: relative; display: inline-block; text-align: left; }
details.act > summary { list-style: none; }
details.act > summary::-webkit-details-marker { display: none; }
.act-body { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.14); padding: 12px; white-space: normal; }
.act-body .f { margin-bottom: 8px; }

/* 订单页：左侧筛选 */
.olayout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; align-items: start; }
.ofilter { position: sticky; top: 70px; max-height: calc(100vh - 86px); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.of-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.of-sec { padding: 10px 0; border-top: 1px solid var(--line-2); }
.of-sec .lbl { font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: 13px; }
.of-sec select { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 14px; padding: 2px 9px; font-size: 12.5px; cursor: pointer; background: #fff; user-select: none; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:has(input:checked) .faint { color: #c7d4e5; }
.chip:has(input:focus-visible) { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.dates { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.dates input { min-width: 0; flex: 1; font-size: 12.5px; padding: 5px 6px; }
.sub-chk { padding-left: 20px; display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px; }
.otable td.goods { min-width: 160px; font-size: 13px; }
.otable td.tags .tag { margin: 1px 2px 1px 0; }
#ftoggle { display: none; }
@media (max-width: 960px) {
  .olayout { grid-template-columns: minmax(0, 1fr); }
  .ofilter { display: none; position: static; max-height: none; }
  .show-filter .ofilter { display: block; }
  #ftoggle { display: inline-flex; }
}
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.cat-t tr.todo td { background: #fffbf2; }
.clamp { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 产品分析 */
.pf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf select, .pf input[type=date] { width: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.kpi .v { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.kpi .k { color: var(--muted); font-size: 12.5px; }
.delta { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { color: var(--ok); } .delta.down { color: var(--err); }
.t tr.flag td { background: #fff4f2; }
.t tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hb { display: grid; grid-template-columns: minmax(80px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-t { height: 10px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.hb-f { display: block; height: 100%; background: #2a78d6; border-radius: 0 4px 4px 0; min-width: 2px; }
.hb-v { min-width: 70px; text-align: right; }
.chart { position: relative; }
.chart svg { width: 100%; height: 220px; display: block; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .ax { fill: var(--faint); font-size: 11px; }
.chart .cross { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(16,24,40,.12); padding: 6px 10px; font-size: 12.5px; white-space: nowrap; z-index: 3; }
.tip b { display: block; margin-bottom: 2px; }
.alerts { display: flex; flex-direction: column; gap: 6px; }
.stock-t input[type=number], .stock-t input[type=text], .stock-t input[type=date] { width: 84px; padding: 4px 6px; }
.stock-t tr.red td { background: #fff4f2; }
.stock-t tr.amber td { background: #fffaf0; }
.catpick { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.cp-row { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.cp-row:last-child { border-bottom: 0; }
.cp-s { min-width: 64px; font-size: 12.5px; color: var(--muted); }
.cp-row .chips { margin-top: 0; }

/* 实时毛利 */
.mscroll { max-height: calc(100vh - 150px); overflow: auto; border-top: 1px solid var(--line); }
.mscroll .t thead th { position: sticky; top: 0; z-index: 2; }
.t.mt tr.mr { cursor: pointer; }
.t.mt tr.mr:hover td { background: #f7f9fc; }
.t.mt tr.mr.open td { background: #eef3fa; }
.t.mt tr.neg-row td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.t.mt tr.md > td { background: #f9fafc; padding: 8px 18px 12px; }
.t.mlines { background: var(--card); border: 1px solid var(--line-2); border-radius: 6px; max-width: 980px; }
.t.mlines td { border-bottom: 1px solid var(--line-2); }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--brand-2); }
.covt td, .covt th { white-space: nowrap; }
.t.mt th, .t.mt td { padding: 8px 9px; }
.t.mt td { font-size: 13px; }
.t.mt td .small { font-size: 12px; }

/* 渠道运营 */
.ckpi .big { font-size: 28px; font-weight: 650; letter-spacing: -.01em; }
.ckpi .mini { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.ckpi .mini div { display: flex; flex-direction: column; min-width: 0; }
.ckpi .mini b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.ckpi .mini span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.t tr.grp td { background: #fafbfc; }
.t tr.sub td { font-size: 13px; color: var(--ink); }
.t tr.tot td { border-top: 2px solid var(--line); font-weight: 600; }
.prog { position: relative; height: 10px; background: var(--line-2); border-radius: 5px; }
.prog .pf-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: #2a78d6; }
.prog .pf-fill.behind { background: #e8833a; }
.prog .pf-time { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }
@media (max-width: 700px) { .ckpi .mini { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.as-subnav { display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:12px 0; margin-bottom:18px; border-bottom:1px solid var(--line); }
.as-subnav > span { font-weight:700; margin-right:12px; }
.as-subnav a { padding:7px 11px; border-radius:7px; color:var(--muted); font-size:13px; }
.as-subnav a.on { background:var(--primary-soft, #e8eef5); color:var(--primary, #244260); font-weight:650; }
.as-subnav a:hover { background:#edf1f5; text-decoration:none; }
