/* ============================================================
 * 新媒体平台经营看板 · 视觉系统
 * 基调：暖白纸感 + 深墨主色 + 香槟金点缀，细发丝描边与柔和投影
 * ============================================================ */
:root {
  --bg: #F4F5F7;
  --bg-soft: #FAFBFC;
  --ink: #0E1624;
  --ink-2: #2C3546;
  --sub: #8B94A4;
  --sub-2: #B0B7C3;
  --line: #E7EAF0;
  --line-soft: #F0F2F6;
  --card: #FFFFFF;
  --gold: #C6A567;
  --gold-soft: #F7F1E4;
  --ok: #12734A;
  --ok-bg: #EAF6EF;
  --warn: #A9702B;
  --warn-bg: #FBF3E6;
  --err: #BE3B30;
  --err-bg: #FBEDEB;
  --primary: #0E1624;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 11px;
  --sheen: 0 1px 2px rgba(14, 22, 36, .04), 0 10px 28px -14px rgba(14, 22, 36, .12);
  --sheen-hi: 0 2px 6px rgba(14, 22, 36, .05), 0 24px 48px -22px rgba(14, 22, 36, .22);
  --ease: cubic-bezier(.22, .68, .28, 1);
}

/* ============================================================
 * 未登录门禁（v=20261104b）：未登录不加载任何业务数据
 * ============================================================ */
#loginWall {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
#loginWall[hidden] { display: none; }
.wall-card {
  width: min(94vw, 442px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--sheen-hi);
  padding: 32px 32px 24px;
  text-align: center;
}
.wall-head {
  display: flex;
  align-items: center;
  gap: 11px;
  justify-content: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 26px;
}
.wall-mark {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 11px;
  background: var(--ink);
  color: #E8C88A;
  display: flex; align-items: center; justify-content: center;
}
.wall-name { font-size: 14px; font-weight: 700; letter-spacing: .01em; text-align: left; }
.wall-sub { font-size: 11px; color: var(--sub); margin-top: 3px; text-align: left; letter-spacing: .06em; }
.wall-lock {
  width: 62px; height: 62px; margin: 0 auto 18px;
  border-radius: 19px;
  background: var(--gold-soft);
  color: #8A6D2F;
  display: flex; align-items: center; justify-content: center;
}
.wall-title { font-size: 20.5px; margin: 0 0 12px; letter-spacing: .01em; font-weight: 700; }
.wall-text { font-size: 13px; line-height: 1.9; color: var(--ink-2); margin: 0 auto 22px; max-width: 320px; text-wrap: pretty; }
.wall-tip {
  font-size: 12.5px; color: var(--err); background: var(--err-bg);
  border: 1px solid #F6D9D5; border-radius: 11px;
  padding: 9px 12px; margin: 0 0 16px; text-align: left;
}
.wall-btn { width: 100%; padding: 13px; font-size: 14.5px; font-weight: 700; }
.wall-foot { font-size: 11px; color: var(--sub-2); margin: 18px 0 0; letter-spacing: .03em; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 600px at 78% -12%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #F6F7F9 0%, #F3F4F7 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
button, input { font-family: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(198, 165, 103, .28); }

.num, .metric-value, .plat-profit, .store-profit, .store-metrics b,
td.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- 品牌标 ---------- */
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  background: linear-gradient(155deg, #1C2637 0%, #0B1320 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 6px 16px -6px rgba(14,22,36,.55);
  flex: 0 0 auto;
}

.eyebrow {
  font-size: 10.5px; font-weight: 600; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--gold);
}

/* ---------- 顶栏 ---------- */
.topbar {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.topbar-title {
  font-size: 14.5px; font-weight: 650; letter-spacing: .4px; color: var(--ink);
  white-space: nowrap;
}
.topbar-sub { font-size: 10.5px; color: var(--sub); letter-spacing: .6px; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.user-chip {
  font-size: 11.5px; color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 4px 12px; border-radius: 999px;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.nav {
  display: flex; gap: 2px;
  background: var(--line-soft);
  padding: 4px; border-radius: 999px;
  flex: 0 1 auto; overflow-x: auto; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  border: none; background: transparent; color: var(--sub);
  font-size: 12.5px; font-weight: 500; letter-spacing: .2px;
  padding: 6px 18px; border-radius: 999px; cursor: pointer;
  transition: all .22s var(--ease);
  white-space: nowrap;
}
.nav-item:hover { color: var(--ink-2); }
.nav-item.active {
  background: #fff; color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(14,22,36,.06), 0 4px 12px -6px rgba(14,22,36,.22);
}

/* ---------- 布局 ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 26px 28px 44px; }
.view { animation: fade .4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.layout { display: grid; grid-template-columns: 400px 1fr; gap: 20px; align-items: start; }
.layout.single { grid-template-columns: 1fr; }
/* 抖音计算页：上传卡 + 售后扣减卡并排，结果卡独占整行满宽 */
#dyResultCard { grid-column: 1 / -1; }
/* 计算结果查看页：归档切换工具栏 */
.result-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; margin-bottom: 20px; flex-wrap: wrap; }
.result-toolbar label { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.result-toolbar select {
  min-width: 320px; max-width: 60vw; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); font-size: 13px; color: var(--ink);
}
@media (max-width: 1080px) { .layout { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--sheen);
  padding: 20px 22px 22px;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.head-left { display: flex; flex-direction: column; gap: 2px; }
.card-head h2 { font-size: 14.5px; font-weight: 650; letter-spacing: .3px; }
.hint { font-size: 11.5px; color: var(--sub); line-height: 1.7; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 26px;
  padding: 30px 32px;
  background: linear-gradient(140deg, #111B29 0%, #1A2434 46%, #0C1420 100%);
  color: #fff;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 22px; flex-wrap: wrap;
  box-shadow: 0 28px 60px -34px rgba(11, 18, 32, .75);
  margin-bottom: 20px;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(120% 100% at 10% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 100% at 10% 0%, #000 0%, transparent 72%);
}
.hero-glow {
  position: absolute; right: -8%; top: -60%; width: 460px; height: 460px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(198,165,103,.26), rgba(198,165,103,0) 70%);
}
.hero-main { position: relative; min-width: 0; }
.hero-main h1 {
  font-size: 27px; font-weight: 600; letter-spacing: 1px; margin-top: 8px;
  color: #fff;
}
.hero-sub {
  font-size: 12px; color: rgba(255,255,255,.58); margin-top: 7px; letter-spacing: .3px;
}
.hero-tools {
  position: relative;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.hero .seg { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); }
.hero .seg button { color: rgba(255,255,255,.68); }
.hero .seg button:hover { color: #fff; }
.hero .seg button.active {
  background: #fff; color: var(--ink);
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.6);
}
.hero .date-input {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  color-scheme: dark;
}
.hero .date-input:focus { border-color: rgba(198,165,103,.55); }
.range-sep {
  color: rgba(255,255,255,.45);
  font-size: 12px;
  margin: 0 -4px;
  user-select: none;
}

/* ---------- 分段控件 ---------- */
.seg { display: flex; gap: 2px; border-radius: 999px; padding: 3px; }
.seg button {
  border: none; background: transparent; color: var(--sub);
  font-size: 12px; font-weight: 500; letter-spacing: .2px;
  padding: 5px 14px; border-radius: 999px; cursor: pointer;
  transition: all .22s var(--ease);
}
.seg button:hover { color: var(--ink-2); }
.seg button.active {
  background: #fff; color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(14,22,36,.08);
}

.date-input {
  border-radius: 999px; padding: 6px 12px;
  font-size: 12px; letter-spacing: .2px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  outline: none; transition: border-color .2s var(--ease);
}
.date-input:focus { border-color: var(--gold); }

/* ---------- 平台总览三卡 ---------- */
.plat-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.plat-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 17px;
  cursor: pointer; text-align: left;
  box-shadow: var(--sheen);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
  font-family: inherit;
}
.plat-card::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px;
  border-radius: 2px; background: var(--accent); opacity: .9;
}
.plat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sheen-hi);
  border-color: #DDE2EA;
}
.plat-card.locked { background: linear-gradient(180deg, #FCFCFD, #F8F9FB); }
.plat-card.locked::before { background: #D7DCE4; }
.plat-mark {
  width: 44px; height: 44px; border-radius: 13px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 600; letter-spacing: .5px;
  color: var(--accent);
  background: #F3F5F8;
  background: color-mix(in srgb, var(--accent) 9%, #FFFFFF);
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
}
.plat-card.locked .plat-mark { color: #A7AEB9; background: #F1F3F6; border-color: #E7EAF0; }
.plat-body { min-width: 0; flex: 1; }
.plat-name {
  font-size: 12px; font-weight: 600; color: var(--sub);
  letter-spacing: .8px; text-transform: none;
  display: flex; align-items: center; gap: 8px;
}
.plat-profit {
  font-size: 24px; font-weight: 600; letter-spacing: -.4px; color: var(--ink);
  margin-top: 3px; line-height: 1.25;
}
.plat-profit.neg { color: var(--err); }
.plat-profit.muted { color: #C3C9D3; font-size: 20px; letter-spacing: 0; }
.plat-sub {
  font-size: 12.5px; color: var(--ink-2); margin-top: 5px; letter-spacing: .2px;
  font-weight: 500;
  display: inline-flex; align-items: center;
  background: var(--gold-soft);
  border: 1px solid #EFE4CB;
  border-radius: 8px;
  padding: 3px 10px;
}
.plat-sub b { font-weight: 700; color: var(--ink); margin-left: 2px; }
.plat-arrow { color: #CBD2DC; font-size: 17px; flex: 0 0 auto; transition: transform .25s var(--ease), color .25s; }
.plat-card:hover .plat-arrow { transform: translateX(3px); color: var(--ink-2); }

.tag {
  font-size: 9.5px; font-weight: 600; letter-spacing: .6px;
  padding: 2px 8px; border-radius: 999px;
}
.tag.ok { color: var(--ok); background: var(--ok-bg); }
.tag.wait { color: var(--warn); background: var(--warn-bg); }

/* ---------- 趋势卡 ---------- */
.trend-card { margin-bottom: 20px; }
.trend-box { height: 176px; position: relative; }

/* ---------- 平台板块 ---------- */
.plat-sec {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--sheen);
  padding: 20px 22px 22px;
  margin-bottom: 18px;
  animation: rise .5s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.plat-sec.reserved { background: linear-gradient(180deg, #FCFCFD 0%, #F8F9FB 100%); box-shadow: none; }

.plat-sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.plat-sec-title { display: flex; align-items: center; gap: 10px; }
.plat-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.plat-sec-title h2 { font-size: 15px; font-weight: 650; letter-spacing: .3px; }
.plat-sec-meta { font-size: 11.5px; color: var(--sub); letter-spacing: .2px; }
.plat-sec-meta b { color: var(--ink); font-weight: 600; }
.plat-sec-meta b.neg { color: var(--err); }

.plat-badge {
  font-size: 10px; padding: 2px 9px; border-radius: 5px;
  font-weight: 600; letter-spacing: .6px;
  background: var(--line-soft); color: var(--sub);
}
.plat-badge.kuaishou { background: #FFF1EA; color: #C4520F; }
.plat-badge.douyin { background: #FFEDF0; color: #B7253E; }
.plat-badge.weixin { background: #E9F7EF; color: #0B7A44; }

/* ---------- 店铺卡 ---------- */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.store-card {
  position: relative;
  display: flex; flex-direction: column; min-width: 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #FDFDFE 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px 14px;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.store-card:hover {
  transform: translateY(-3px);
  border-color: #DCE2EA;
  box-shadow: var(--sheen-hi);
}
.store-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.store-name {
  font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.store-profit {
  font-size: 29px; font-weight: 600; letter-spacing: -.8px;
  color: var(--ink); margin-top: 8px; line-height: 1.15;
}
.store-profit.neg { color: var(--err); }
.store-ratio {
  display: inline-block; align-self: flex-start;
  font-size: 10.5px; color: var(--sub); letter-spacing: .3px;
  background: var(--line-soft); border-radius: 999px;
  padding: 1px 9px; margin-top: 4px;
}
.store-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 14px; padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.store-metrics > div { display: flex; flex-direction: column; min-width: 0; padding-left: 10px; }
.store-metrics > div:first-child { padding-left: 0; }
.store-metrics > div + div { border-left: 1px solid var(--line-soft); }
.store-metrics span { font-size: 10.5px; color: var(--sub); letter-spacing: .5px; }
.store-metrics b {
  font-size: 14.5px; font-weight: 700; color: var(--ink); letter-spacing: -.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 总收入数值加金色高亮底，和成本/订单区分开 */
.store-metrics > div:first-child b {
  display: inline-block; margin-top: 2px;
  background: var(--gold-soft); border: 1px solid #EFE4CB;
  border-radius: 7px; padding: 2px 7px;
  max-width: 100%;
}
/* 结算拆分（已结算 / 未结算） */
.store-settle {
  display: grid; grid-template-columns: repeat(2, 1fr);
  padding: 8px 0 2px;
  border-bottom: 1px solid var(--line-soft);
}
.store-settle > div { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.store-settle > div + div { padding-left: 10px; border-left: 1px solid var(--line-soft); }
.store-settle span { font-size: 10.5px; color: var(--sub); letter-spacing: .5px; white-space: nowrap; }
.store-settle b {
  font-size: 12.5px; font-weight: 650; color: var(--ink-2, #5a5347);
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.store-settle b.muted { color: var(--sub-2); font-weight: 500; }
.muted { color: var(--sub-2); }

/* 按时间 · 每日汇总表 */
.time-view { margin-top: 4px; }
.time-view h3 { font-size: 13px; font-weight: 650; letter-spacing: .3px; }
.time-table-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 14px; }
.time-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.time-table th, .time-table td { padding: 8px 12px; white-space: nowrap; text-align: left; }
.time-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--paper-2, #faf7f1); font-size: 11px; font-weight: 600; color: var(--sub);
  letter-spacing: .4px; border-bottom: 1px solid var(--line);
}
.time-table td { border-bottom: 1px dashed var(--line-soft); color: var(--ink); }
.time-table tbody tr:hover td { background: rgba(198, 165, 103, .07); }
.time-table td.period { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.time-table td.neg { color: #c0392b; }
.time-table tfoot td {
  position: sticky; bottom: 0; background: #fff; font-weight: 700;
  border-top: 1px solid var(--line); border-bottom: none;
}
.time-table .num { text-align: right; }

.store-meta {
  display: flex; flex-direction: column; gap: 1px;
  margin-top: 9px; font-size: 10.5px; color: var(--sub-2); letter-spacing: .2px;
}
.store-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.mini-badge {
  font-size: 9.5px; padding: 1px 7px; border-radius: 4px;
  background: var(--line-soft); color: var(--sub); letter-spacing: .2px;
}
.mini-badge.warn { background: var(--err-bg); color: var(--err); }
  .mini-badge.seal { background: rgba(198,165,103,.14); border-color: rgba(198,165,103,.55); color: #8a6d2f; }
.store-ops { display: flex; gap: 8px; margin-top: 12px; }
.store-ops .btn { flex: 1; padding: 6px 10px; font-size: 11.5px; }

/* ---------- 空态 / 预留 ---------- */
.plat-empty {
  border: 1px dashed #DCE1E9;
  border-radius: var(--radius);
  padding: 24px 20px; text-align: center;
  color: var(--sub); font-size: 12.5px; line-height: 1.9;
  background: #FCFDFE;
}
.plat-empty .btn { margin-top: 10px; }
.plat-empty-mark {
  width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--line-soft); color: var(--sub-2);
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.reserved-box { text-align: left; border-style: dashed; background: #FBFCFD; }
.reserved-head { display: flex; align-items: flex-start; gap: 13px; }
.reserved-head b { font-size: 13px; color: var(--ink-2); font-weight: 600; letter-spacing: .2px; }
.reserved-head .hint { margin-top: 3px; }
.reserved-mark {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px;
  background: #EEF1F5; color: #9BA5B3; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.reserved-detail {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px; margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed #E4E8EF;
}
.reserved-detail > div { display: flex; flex-direction: column; gap: 3px; }
.reserved-detail span { font-size: 9.5px; color: var(--sub-2); letter-spacing: 1px; text-transform: uppercase; }
.reserved-detail b { font-size: 11.5px; color: #6B7585; font-weight: 500; line-height: 1.75; letter-spacing: .2px; }

/* ---------- 内页标题 ---------- */
.view-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.view-head h1 { font-size: 22px; font-weight: 600; letter-spacing: .6px; margin-top: 5px; }
.view-head .hint { margin-top: 4px; }

/* ---------- 文件行 ---------- */
.file-list { display: flex; flex-direction: column; gap: 9px; }
.file-row,
.dy-file-row {
  display: grid; grid-template-columns: 104px 1fr;
  align-items: center; gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  background: #FDFDFE;
  transition: border-color .22s var(--ease), background .22s var(--ease), box-shadow .22s var(--ease);
}
.file-row.dragover,
.dy-file-row.dragover { border-color: var(--gold); background: var(--gold-soft); }
.file-row.filled,
.dy-file-row.filled { border-color: #D9E2EC; background: #FCFDFF; box-shadow: 0 1px 2px rgba(14,22,36,.03); }
.file-meta { display: flex; align-items: center; gap: 7px; }
.file-name { font-size: 12.5px; font-weight: 600; letter-spacing: .2px; }
.file-tag { font-size: 9px; padding: 1px 6px; border-radius: 4px; letter-spacing: .5px; }
.file-tag.must { color: var(--err); background: var(--err-bg); }
.file-tag.opt { color: var(--sub); background: var(--line-soft); }
.file-drop { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.file-picked {
  font-size: 11.5px; color: var(--sub-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-row.filled .file-picked,
.dy-file-row.filled .file-picked { color: var(--ink-2); }

.field-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.field-row label { font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
.field-row input[type="text"] {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 12.5px; color: var(--ink);
  background: #FDFDFE; outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field-row input[type="text"]:focus { border-color: var(--gold); background: #fff; }
.field-row input::placeholder { color: var(--sub-2); }

.action-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.action-row.right { justify-content: flex-end; }
.check { font-size: 11.5px; color: var(--sub); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.check input { accent-color: var(--ink); }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .3px;
  cursor: pointer;
  transition: all .22s var(--ease);
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, #1A2434 0%, #0D1523 100%);
  color: #F6F7F9;
  box-shadow: 0 1px 2px rgba(14,22,36,.2), 0 8px 18px -10px rgba(14,22,36,.55);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #222E42 0%, #131C2C 100%);
  box-shadow: 0 2px 4px rgba(14,22,36,.22), 0 12px 26px -12px rgba(14,22,36,.6);
}
.btn-ghost {
  background: #fff; color: var(--ink-2);
  border-color: #E2E6ED;
}
.btn-ghost:hover:not(:disabled) { background: #F7F8FA; border-color: #D6DBE4; }
.btn-hairline {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
  border-color: rgba(255,255,255,.16);
}
.btn-hairline:hover:not(:disabled) { background: rgba(255,255,255,.12); color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 11.5px; border-radius: 9px; }
.btn-block { width: 100%; padding: 12px; font-size: 13px; margin-top: 2px; border-radius: 11px; }
.btn-link {
  background: none; border: none; color: var(--sub);
  font-size: 11.5px; cursor: pointer; padding: 2px 6px;
  border-radius: 6px; transition: color .18s, background .18s;
}
.btn-link:hover { color: var(--ink); background: var(--line-soft); }

/* ---------- 进度 ---------- */
.progress-wrap { margin-top: 18px; }
.progress { height: 4px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #C6A567, #0E1624);
  border-radius: 999px; transition: width .3s var(--ease);
}
.progress-text { font-size: 11px; color: var(--sub); margin-top: 8px; letter-spacing: .3px; }

/* ---------- 空态 ---------- */
.empty { text-align: center; padding: 46px 16px; color: var(--sub); font-size: 12.5px; line-height: 1.95; }
.empty.small { padding: 28px 16px; }
.empty-icon {
  width: 48px; height: 48px; margin: 0 auto 12px;
  border-radius: 14px; background: var(--line-soft);
  color: var(--sub-2);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 指标卡 ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } }

/* 结果卡日期筛选行 */
.dy-flt-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.dy-flt-row .hint { font-size: 12px; }
.dy-flt-row .range-sep { color: var(--muted, #8a8f9c); margin: 0 -2px; }
.flt-date {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FDFDFE;
  color: var(--ink, #0E1624);
  padding: 5px 8px;
  font-size: 12.5px;
  font-family: inherit;
  color-scheme: light;
}
/* 快捷筛选选项（昨日 / 近7天） */
.flt-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FDFDFE;
  color: var(--ink-2, #2C3546);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.flt-chip:hover { border-color: var(--gold, #C6A567); color: var(--ink, #0E1624); }
.flt-chip.active { background: var(--gold-soft, #F7F1E4); border-color: var(--gold, #C6A567); color: var(--ink, #0E1624); }
/* 快手结果卡快捷选项（flt-chip2：避免被抖音筛选绑定捕获） */
.flt-chip2 {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FDFDFE;
  color: var(--ink-2, #2C3546);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.flt-chip2:hover { border-color: var(--gold, #C6A567); color: var(--ink, #0E1624); }
.flt-chip2.active { background: var(--gold-soft, #F7F1E4); border-color: var(--gold, #C6A567); color: var(--ink, #0E1624); }
/* 快手计算页：结果卡满宽（与抖音结果卡同布局） */
#ksResultCard { grid-column: 1 / -1; }
/* 计算结果页：店铺名大标题 */
.result-shop-head {
  display: flex; align-items: center; gap: 14px;
  margin: 0 2px 18px;
}
.result-shop-head .shop-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink, #0E1624);
  letter-spacing: .3px;
  line-height: 1.25;
}
.result-shop-head .shop-head-text .hint { margin-top: 2px; }
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  background: #FDFDFE;
  min-width: 0;
}
.metric.primary {
  background: linear-gradient(150deg, #18212F 0%, #0C1421 100%);
  border-color: transparent;
  box-shadow: 0 14px 28px -18px rgba(14,22,36,.7);
}
.metric-label { font-size: 10.5px; color: var(--sub); letter-spacing: .5px; }
.metric-value {
  font-size: 19px; font-weight: 600; color: var(--ink);
  margin-top: 3px; letter-spacing: -.3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.metric-sub { font-size: 10px; color: var(--sub-2); margin-top: 2px; }
.metric.primary .metric-label { color: rgba(255,255,255,.55); }
.metric.primary .metric-value { color: #fff; font-size: 22px; letter-spacing: -.5px; }
.metric.primary .metric-value.neg { color: #FF9C90; }
.metric.primary .metric-sub { color: var(--gold); }

/* ---------- 警告 ---------- */
.warn-box {
  margin-top: 14px;
  border: 1px solid #F0E1C8;
  background: linear-gradient(180deg, #FDF9F1, #FCF6EC);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 12px;
  color: #8A6423;
  line-height: 1.8;
}
.warn-box b { color: #6E4E14; font-weight: 600; }
.warn-box .warn-item + .warn-item { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #EFE0C6; }

/* ---------- 图表 ---------- */
.chart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; margin-top: 16px; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-box {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 13px 8px; background: #FDFDFE;
}
.chart-title { font-size: 10.5px; color: var(--sub); letter-spacing: .5px; margin-bottom: 6px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th {
  font-size: 10.5px; color: var(--sub-2); font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  background: transparent; border-bottom: 1px solid var(--line);
}
th.num, td.num { text-align: right; }
th.ops, td.ops { text-align: right; }
tbody tr { transition: background .18s; }
tbody tr:hover { background: #FAFBFC; }
tbody tr:last-child td { border-bottom: none; }
td.profit { font-weight: 600; color: var(--ink); }
td.profit.neg { color: var(--err); }
td.period { color: var(--sub); font-size: 11.5px; }
td.ops { white-space: nowrap; }
td.ops .btn-link + .btn-link { margin-left: 2px; }

.foot {
  text-align: center; color: var(--sub-2);
  font-size: 10.5px; letter-spacing: .3px; margin-top: 26px; line-height: 1.9;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: rgba(14, 22, 36, .94);
  color: #F2F4F7;
  padding: 10px 22px; border-radius: 999px; font-size: 12.5px;
  letter-spacing: .3px;
  z-index: 99;
  box-shadow: 0 18px 40px -16px rgba(14,22,36,.7);
  animation: toastIn .28s var(--ease);
}
.toast.err { background: rgba(150, 45, 38, .95); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* ---------- 权限：角色标签 / 只读提示 / 授权页 ---------- */
.role-chip {
  font-size: 10px; font-weight: 600; letter-spacing: .8px;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid transparent;
}
.role-chip.role-owner { color: #8A6A22; background: #FBF3E2; border-color: #F0E2C4; }
.role-chip.role-manager, .role-chip.role-editor { color: #0E6B45; background: #EAF6EF; border-color: #CFEBDD; }
.role-chip.role-general { color: #1F5C8B; background: #EAF2FA; border-color: #CFE1F2; }
.role-chip.role-viewer { color: var(--sub); background: var(--line-soft); border-color: var(--line); }
.role-chip.role-unclaimed { color: var(--warn); background: var(--warn-bg); border-color: #F0E0C6; }

.gate-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: linear-gradient(180deg, #FFFFFF, #FBFCFD);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--sheen);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.gate-icon {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  background: linear-gradient(155deg, #1C2637, #0B1320);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 18px -10px rgba(14,22,36,.6);
}
.gate-body { min-width: 0; }
.gate-body h3 { font-size: 15px; font-weight: 650; letter-spacing: .3px; }
.gate-body p { font-size: 12.5px; color: var(--sub); line-height: 1.85; margin-top: 5px; }
.gate-id { display: inline-block; margin-top: 8px; font-size: 11.5px; color: var(--sub); }
.gate-id code, code.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; color: var(--ink-2);
  background: var(--line-soft); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 8px; letter-spacing: .2px;
}
.gate-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .auth-grid { grid-template-columns: 1fr; } }
.id-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.id-row:last-child { border-bottom: none; }
.id-row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; color: var(--ink-2);
  background: var(--line-soft); border-radius: 6px; padding: 3px 9px;
  letter-spacing: .2px; word-break: break-all;
}
.id-label { font-size: 11.5px; color: var(--sub-2); letter-spacing: .5px; min-width: 68px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 12.5px; color: var(--ink);
  background: #FDFDFE; outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.auth-form input:focus { border-color: var(--gold); background: #fff; }
.auth-form .btn { align-self: flex-start; }
.auth-tip { margin-top: 12px; }

/* 权限分组选择器 */
.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 4px; }
@media (max-width: 560px) { .role-picker { grid-template-columns: 1fr; } }
.role-opt {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #FDFDFE; color: var(--ink);
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.role-opt b { font-size: 12.5px; font-weight: 600; letter-spacing: .2px; }
.role-opt span { font-size: 11px; color: var(--sub-2); line-height: 1.4; }
.role-opt:hover { border-color: var(--gold-soft, #E4D6B4); background: #FCFAF5; }
.role-opt.is-active {
  border-color: var(--gold); background: #FBF6EA;
  box-shadow: 0 0 0 3px rgba(198, 165, 103, .12);
}
.role-opt.is-active b { color: #8A6A22; }

/* 权限分组说明表 */
.perm-legend-card { margin-top: 18px; }
.perm-legend { font-size: 12px; }
.perm-legend th.perm-col { text-align: center; }
.perm-legend th.perm-col span { display: block; font-weight: 400; font-size: 10.5px; color: var(--sub-2); margin-top: 2px; }
.perm-legend td { text-align: center; }
.perm-legend td:first-child { text-align: left; }
.perm-legend td.yes { color: #0E6B45; font-weight: 600; }
.perm-legend td.no { color: var(--sub-2); }

/* 授权列表里的分组标签 */
.role-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .2px;
  border: 1px solid transparent; cursor: pointer;
  transition: filter .2s var(--ease);
}
.role-tag:hover { filter: brightness(.96); }
.role-tag.is-manager { color: #0E6B45; background: #EAF6EF; border-color: #CFEBDD; }
.role-tag.is-general { color: #1F5C8B; background: #EAF2FA; border-color: #CFE1F2; }
.role-hint { font-size: 10.5px; color: var(--sub-2); margin-left: 6px; }
/* 售后扣减记录的生效状态标记 */
.ded-status {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .2px; vertical-align: 1px;
  border: 1px solid transparent; white-space: nowrap;
}
.ded-status.is-on { color: #0E6B45; background: #EAF6EF; border-color: #CFEBDD; }
.ded-status.is-off { color: #8A5A00; background: #FBF3E2; border-color: #F0E2C0; }
.ded-status.is-gone { color: #6B7280; background: #F1F2F5; border-color: #E2E4EA; }
.ded-status.is-other { color: #1F5C8B; background: #EAF2FA; border-color: #CFE1F2; }

/* 授权列表里的分组下拉（手动分配分组） */.role-select {
  appearance: none; -webkit-appearance: none;
  padding: 3px 22px 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .2px;
  border: 1px solid #D8DCE4; background: #FBFBFC; color: var(--ink);
  cursor: pointer; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.role-select:hover { border-color: #B9C0CC; }
.role-select:focus { outline: none; border-color: #C6A567; box-shadow: 0 0 0 3px rgba(198,165,103,.15); }
.role-select.is-manager { color: #0E6B45; background-color: #EAF6EF; border-color: #CFEBDD; }
.role-select.is-general { color: #1F5C8B; background-color: #EAF2FA; border-color: #CFE1F2; }

/* 邀请码（2026-11-04 邀请制注册） */
.invite-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.invite-opts select {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 10px; font-size: 12.5px; color: var(--ink);
  background: #FDFDFE; outline: none; cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.invite-opts select:focus { border-color: var(--gold); background: #fff; }
.invite-result {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 12px 14px;
  background: #FBF6EA; border: 1px dashed rgba(198, 165, 103, .62);
  border-radius: var(--radius-sm);
}
.invite-result[hidden] { display: none; }
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px; font-weight: 700; letter-spacing: 4px; color: #8A6A22;
}
.invite-code-cell { letter-spacing: 1.5px; font-weight: 600; color: #8A6A22 !important; }
.status-chip {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .2px; white-space: nowrap;
  border: 1px solid transparent;
}
.status-chip.is-on { color: #0E6B45; background: #EAF6EF; border-color: #CFEBDD; }
.status-chip.is-off, .status-chip.is-exp { color: #8A5A00; background: #FBF3E2; border-color: #F0E2C0; }
.status-chip.is-used { color: #6B7280; background: #F1F2F5; border-color: #E2E4EA; }
.btn-link.is-danger { color: #B4453F; }
.btn-link.is-danger:hover { color: #8F2F2A; background: rgba(180, 69, 63, .08); }

/* ---------- 弹窗（售后扣减明细） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(14, 22, 36, .38);
  backdrop-filter: blur(2px);
  animation: modalFade .18s var(--ease);
}
.modal-mask[hidden] { display: none; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  width: min(1080px, 100%); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--sheen-hi); overflow: hidden;
  animation: modalRise .22s var(--ease);
}
@keyframes modalRise { from { transform: translateY(10px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 22px 14px; border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { margin: 4px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.modal-head .hint { margin: 6px 0 0; }
.modal-body { padding: 18px 22px 22px; overflow: auto; }
.modal-body .as-sec-title { margin-top: 4px; }
@media (max-width: 620px) { .modal-mask { padding: 10px; } .modal-box { max-height: calc(100vh - 20px); } }

/* 售后扣减记录表 */
#dedTable td.file-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dedTable .ded-shop { font-weight: 500; }

/* ---------- 售后扣减 ---------- */
.as-result {
  margin-top: 10px; font-size: 11.5px; line-height: 1.7; color: var(--ok);
  background: var(--ok-bg); border-radius: 9px; padding: 8px 10px;
}
.as-result.warn { color: var(--warn); background: var(--warn-bg); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .plat-summary { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; height: auto; padding: 12px 18px; gap: 10px; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .nav-item { flex: 1; }
  .page { padding: 18px 16px 34px; }
  .hero { padding: 24px 22px; border-radius: 20px; }
  .hero-main h1 { font-size: 22px; }
  .hero-tools { width: 100%; }
  .plat-sec { padding: 16px; }
}

/* 板块内维度切换：按店铺 / 按运营 */
.plat-seg { display: inline-flex; gap: 6px; margin: 2px 0 12px; }
.plat-seg-btn {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line, #e5ddcf);
  background: transparent; color: var(--ink-2, #5a5347); font-size: 12.5px; cursor: pointer;
  transition: all .15s ease;
}
.plat-seg-btn:hover { color: var(--ink, #0E1624); }
.plat-seg-btn.active {
  background: var(--ink, #0E1624); color: #fff; border-color: var(--ink, #0E1624);
}

/* 店铺名选择 + 管理面板 */
.shop-field { display: flex; gap: 8px; align-items: center; }
.shop-field input { flex: 1; }
.shop-manage {
  margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line, #e5ddcf);
  border-radius: 14px; background: var(--paper-2, #faf7f1);
}
.shop-add { display: flex; gap: 8px; margin-bottom: 8px; }
.shop-add input {
  flex: 1; padding: 7px 10px; border: 1px solid var(--line, #e5ddcf);
  border-radius: 10px; background: #fff; font-size: 13px;
}
.shop-list .shop-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 2px; border-bottom: 1px dashed var(--line, #e5ddcf);
}
.shop-list .shop-item:last-child { border-bottom: none; }
.shop-item-name { font-size: 13px; color: var(--ink, #0E1624); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.shop-item-ops { display: flex; gap: 6px; }
.shop-item-ops button {
  border: 1px solid var(--line, #e5ddcf); background: #fff; border-radius: 8px;
  padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--ink-2, #5a5347);
}
.shop-item-ops button:hover { color: var(--ink, #0E1624); border-color: var(--ink-2, #5a5347); }
.shop-item-ops button[data-act="del"]:hover { color: #c0392b; border-color: #c0392b; }
.shop-empty { font-size: 12.5px; color: var(--ink-3, #8a8272); margin: 0; }

/* 店铺名自绘下拉（输入框已有内容时也能看到并点选全部已保存店名） */
.shop-field { position: relative; }
.combo-caret {
  flex: 0 0 auto; width: 30px; height: 32px; padding: 0;
  border: 1px solid var(--line, #e5ddcf); border-radius: var(--radius-sm, 10px);
  background: #FDFDFE; color: var(--ink-2, #5a5347); font-size: 11px; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, color .15s ease;
}
.combo-caret:hover { color: var(--ink, #0E1624); border-color: var(--gold, #C6A567); }
.combo-caret svg { display: block; }
.combo-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  max-height: 264px; overflow-y: auto; padding: 6px;
  border: 1px solid var(--line, #e5ddcf); border-radius: 14px; background: #fff;
  box-shadow: 0 16px 36px rgba(14, 22, 36, .16);
}
.combo-pop[hidden] { display: none; }
/* 下方空间不足时向上展开（店铺名行靠近卡片底部） */
.combo-pop.up { top: auto; bottom: calc(100% + 6px); }
.combo-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink, #0E1624); font-size: 13px; text-align: left;
  cursor: pointer; font-family: inherit;
}
.combo-item:hover, .combo-item.active { background: rgba(198, 165, 103, .16); }
.combo-item.current { font-weight: 700; }
.combo-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-tick { color: var(--gold, #C6A567); font-size: 12px; }
.combo-empty { margin: 6px 8px; font-size: 12.5px; color: var(--ink-3, #8a8272); line-height: 1.6; }

/* 成本维护页 */
.cost-upload { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cost-current { border-top: 1px solid rgba(14, 22, 36, 0.08); padding-top: 14px; }
.cost-file { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cost-file-info b { font-size: 15px; }
.cost-file-ops { display: flex; gap: 8px; }

/* 顶栏「我的ID」按钮 + 成本维护页我的ID卡 */
.id-chip {
  font: inherit;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(198, 165, 103, 0.55);
  background: rgba(198, 165, 103, 0.12);
  color: #8a6d2f;
  cursor: pointer;
  white-space: nowrap;
}
.id-chip:hover { background: rgba(198, 165, 103, 0.22); }
.myid-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.myid-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(14, 22, 36, 0.05);
  border: 1px solid rgba(14, 22, 36, 0.08);
  word-break: break-all;
  user-select: all;
}

/* 售后扣减板块 */
.as-select {
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(14, 22, 36, 0.14);
  background: #fff;
  min-width: 320px;
  max-width: 100%;
}
.as-rule { margin: 10px 0 14px; line-height: 1.7; }
.as-result { margin-top: 16px; }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.as-metric { background: rgba(14, 22, 36, 0.03); border: 1px solid rgba(14, 22, 36, 0.07); border-radius: 12px; padding: 10px 12px; }
.as-metric span { display: block; font-size: 11.5px; color: #7c8493; margin-bottom: 4px; }
.as-metric b { font-size: 16px; font-variant-numeric: tabular-nums; }
.as-metric.accent b { color: #a8823c; }
.as-table-wrap { max-height: 320px; overflow: auto; border: 1px solid rgba(14, 22, 36, 0.08); border-radius: 12px; }
.as-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.as-table-wrap th { position: sticky; top: 0; background: #faf8f4; text-align: left; padding: 8px 10px; font-weight: 600; white-space: nowrap; }
.as-table-wrap td { padding: 7px 10px; border-top: 1px solid rgba(14, 22, 36, 0.06); white-space: nowrap; }
.as-table-wrap td.num { text-align: right; font-variant-numeric: tabular-nums; }
.as-sec-title { font-size: 13px; font-weight: 600; margin: 14px 0 8px; }
.as-warn { color: #b5482f; }

/* 按运营卡片：运营姓名加大加重（2026-11-02） */
.store-name.op-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .5px;
}

/* ================= 售后看板（2026-11-03） ================= */
.af-import-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.af-file-drop {
  display: flex; align-items: center; gap: 10px; flex: 1 1 340px; min-width: 0;
  border: 1.5px dashed var(--line, #d8d2c2); border-radius: 12px;
  padding: 10px 14px; cursor: pointer; background: var(--paper-2, #faf7f0);
  transition: border-color .15s ease, background .15s ease;
}
.af-file-drop:hover { border-color: var(--gold, #C6A567); }
.af-file-drop .file-picked { font-size: 13px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-note {
  flex: 0 1 260px; min-width: 160px; font-size: 13px; padding: 8px 12px;
  border: 1px solid var(--line, #d8d2c2); border-radius: 10px; background: #fff; color: var(--ink, #0E1624);
}
.af-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.af-filters select, .af-filters input[type="date"] {
  font-size: 13px; padding: 7px 10px; border: 1px solid var(--line, #d8d2c2);
  border-radius: 10px; background: #fff; color: var(--ink, #0E1624);
}
.af-metrics { margin-top: 6px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .af-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.af-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.af-table th {
  position: sticky; top: 0; z-index: 1; background: var(--ink, #0E1624); color: #fff;
  font-size: 12px; font-weight: 600; padding: 8px 10px; text-align: left; white-space: nowrap;
}
.af-table th.num, .af-table td.num { text-align: right; }
.af-table td { font-size: 12.5px; padding: 7px 10px; border-bottom: 1px solid var(--line-weak, #eee7d8); vertical-align: top; }
.af-table tbody tr:nth-child(even) { background: var(--paper-2, #faf7f0); }
.af-table td.hint { color: var(--ink-3, #8a8272); font-size: 11.5px; max-width: 260px; }

/* 售后看板 · 商品汇总合计行 */
.af-table tr.af-total-row td { background: rgba(198,165,103,.10); border-top: 1px solid rgba(198,165,103,.45); }

/* 售后看板 · 商品分块卡片（复用店铺卡样式，微调） */
.store-card.af-goods-card .store-profit { font-size: 22px; letter-spacing: -.4px; }
.store-card.af-goods-card .store-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
