/* ============================================================
   锐调 Rayrate · AI 全域收益工具 V1.0
   设计系统 · 浅色主题 · 专业 SaaS 视觉
   约定：涨/收益上行=红，跌/下行=绿（中国市场约定）；货币 ¥
   ============================================================ */
:root {
  /* 品牌 */
  --brand: #2f5bff;
  --brand-600: #244ce0;
  --brand-700: #1c3dbd;
  --brand-soft: #eaf0ff;
  --accent: #10b3a3;
  --accent-soft: #e3f7f4;
  --gold: #e8a838;
  --gold-soft: #fdf3e0;
  --purple: #7c4dff;
  --purple-soft: #efe9ff;

  /* 语义色（中国约定：上行红 / 下行绿） */
  --up: #e5484d;      /* 涨 / 收益提升 / 溢价 */
  --up-soft: #fdecec;
  --down: #12a150;    /* 跌 / 降价 */
  --down-soft: #e7f6ee;
  --warn: #e8871e;
  --warn-soft: #fdf0e1;
  --info: #2f5bff;

  /* 中性 */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --line: #e8ebf3;
  --line-strong: #d7dbe6;
  --text: #1b2130;
  --text-2: #5a6478;
  --text-3: #8b94a7;

  /* 供需四档 */
  --lv-loose: #12a150;    /* 宽松 */
  --lv-mid: #2f5bff;      /* 中等 */
  --lv-tight: #e8871e;    /* 紧张 */
  --lv-full: #e5484d;     /* 满房 */

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20,30,60,.06), 0 1px 3px rgba(20,30,60,.04);
  --shadow: 0 4px 16px rgba(20,30,60,.08);
  --shadow-lg: 0 12px 40px rgba(20,30,60,.14);
  --sidebar-w: 244px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--brand-soft); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cdd3e0; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #b6bdcd; }

/* ================= 通用 ================= */
.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--text-3); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  line-height: 1.7;
}
.badge.free { background: #eef1f6; color: #61708c; }
.badge.basic { background: var(--brand-soft); color: var(--brand-700); }
.badge.pro { background: var(--gold-soft); color: #b9791a; }
.badge.up { background: var(--up-soft); color: var(--up); }
.badge.down { background: var(--down-soft); color: var(--down); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--down-soft); color: var(--down); }
.badge.dot::before { content:""; width:6px; height:6px; border-radius:50%; background: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
  background: var(--brand); color: #fff; transition: .15s; white-space: nowrap;
}
.btn:hover { background: var(--brand-600); box-shadow: 0 6px 16px rgba(47,91,255,.28); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.gold { background: linear-gradient(120deg, #f0b24a, #e8981e); color: #4a2f00; }
.btn.gold:hover { filter: brightness(1.03); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.pulse { animation: btnPulse 1.6s ease-in-out infinite; }
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(44, 90, 255, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(44, 90, 255, 0); }
}

.compliance-note {
  font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px;
}
.compliance-note svg { flex-shrink: 0; }

/* ================= 登录 / 落地 ================= */
#login {
  min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr;
}
.login-hero {
  position: relative; overflow: hidden; padding: 56px 60px;
  background: linear-gradient(150deg, #1c2c66 0%, #26379b 45%, #2f5bff 100%);
  color: #fff; display: flex; flex-direction: column;
}
.login-hero::after {
  content:""; position: absolute; right: -120px; bottom: -120px; width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(0,212,255,.25), transparent 62%); border-radius: 50%;
}
.login-hero::before {
  content:""; position: absolute; left: -80px; top: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 60%); border-radius: 50%;
}
.brand-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.brand-logo-r {
  width: 72px; height: 72px; border-radius: 14px; display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-text-group { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.brand-wordmark { font-size: 30px; font-weight: 800; letter-spacing: 1.5px; color: #fff; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; }
.brand-sub-cn { font-size: 13.5px; font-weight: 400; color: rgba(255,255,255,0.6); font-family: system-ui,-apple-system,sans-serif; letter-spacing: 0.8px; }
.brand-dot { color: rgba(255,77,79,0.85); font-weight: 700; margin: 0 2px; }
.brand-saas { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 500; color: #7ff0e2; background: rgba(127,240,226,0.1); border: 1px solid rgba(127,240,226,0.2); margin-left: auto; letter-spacing: 0.2px; flex-shrink: 0; }
.saas-dot { width: 6px; height: 6px; border-radius: 50%; background: #7ff0e2; flex-shrink: 0; }
.brand-slogan { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: 0.5px; margin-bottom: 3px; }
.brand-slogan-cn { font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 18px; font-weight: 400; }
.hero-copy { font-size: 13px; line-height: 1.65; opacity: .88; max-width: 480px; margin-bottom: 14px; }
.hero-copy b { color: #7ff0e2; }
.hero-mid { margin-top: auto; margin-bottom: auto; position: relative; z-index: 1; }
.hero-tag {
  display: inline-block; padding: 5px 13px; border-radius: 999px; font-size: 12.5px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); margin-bottom: 22px;
}
.hero-mid h1 { font-size: 28px; line-height: 1.28; font-weight: 800; letter-spacing: .5px; }
.hero-mid h1 .hl { color: #7ff0e2; }
.hero-mid p.sub { margin-top: 14px; font-size: 13.5px; opacity .88; max-width: 460px; line-height: 1.7; }
.hero-feats { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; max-width: 480px; }
.hero-feat { display: flex; gap: 10px; align-items: flex-start; }
.hero-feat .ic { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.14); display: grid; place-items: center; flex-shrink: 0; }
.hero-feat b { font-size: 12.5px; font-weight: 700; }
.hero-feat span { font-size: 11px; opacity .78; display: block; }
.hero-foot { position: relative; z-index: 1; margin-top: 40px; font-size: 12px; opacity: .72; }

.login-panel { display: grid; place-items: center; padding: 40px; background: var(--surface); }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 24px; font-weight: 800; }
.login-card .lead { color: var(--text-2); margin-top: 8px; margin-bottom: 28px; font-size: 13.5px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.field input, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: var(--surface-2); transition: .15s; color: var(--text);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.tier-pick { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 20px; }
.tier-opt {
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 8px; text-align: center;
  transition: .15s; background: var(--surface-2);
}
.tier-opt:hover { border-color: var(--brand); }
.tier-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.tier-opt b { display: block; font-size: 13px; font-weight: 700; }
.tier-opt span { font-size: 11px; color: var(--text-3); }
.login-card .btn { width: 100%; padding: 12px; font-size: 15px; }
.login-hint { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text-3); }
.login-link { display: block; text-align: center; margin-top: 14px; font-size: 13px; color: var(--brand); text-decoration: none; font-weight: 600; }
.login-link:hover { text-decoration: underline; }

/* ================= 应用外壳 ================= */
#app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: #131a2e; color: #b9c2d6; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .s-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; }
.sidebar .s-brand .brand-logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg,var(--brand),var(--accent)); border: none; }
.sidebar .s-brand b { color: #fff; font-size: 16px; font-weight: 800; }
.sidebar .s-brand small { font-size: 10.5px; color: #6f7b96; display: block; }
.nav-group { padding: 6px 12px; }
.nav-group .g-title { font-size: 10.5px; color: #5c6784; text-transform: uppercase; letter-spacing: 1px; padding: 12px 10px 6px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; font-size: 13.5px;
  color: #b9c2d6; transition: .13s; margin-bottom: 2px; position: relative; cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.on { background: linear-gradient(90deg, rgba(47,91,255,.28), rgba(47,91,255,.06)); color: #fff; }
.nav-item.on::before { content:""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent); }
.nav-item .ni-ic { width: 18px; display: grid; place-items: center; flex-shrink: 0; }
.nav-item .lock { margin-left: auto; opacity: .6; }
.sidebar-foot { margin-top: auto; padding: 14px; }
.plan-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 13px;
}
.plan-card .pc-top { display: flex; justify-content: space-between; align-items: center; }
.plan-card .pc-top b { color: #fff; font-size: 13px; }
.plan-card .pc-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); margin: 10px 0 6px; overflow: hidden; }
.plan-card .pc-bar i { display: block; height: 100%; background: linear-gradient(90deg,var(--accent),#4de0cf); border-radius: 3px; }
.plan-card small { font-size: 11px; color: #8b95ad; }
.plan-card .btn { width: 100%; margin-top: 11px; }

/* ================= 主区 ================= */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 26px; position: sticky; top: 0; z-index: 20;
}
.topbar .page-title { font-size: 17px; font-weight: 800; }
.topbar .page-title small { font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 10px; }
.topbar .spacer { flex: 1; }
.store-pill {
  display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 8px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-size: 13px; background: var(--surface-2);
}
.store-pill .sp-ic { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); font-weight: 800; font-size: 12px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); position: relative; }
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--up); border: 1.5px solid #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,var(--brand),var(--accent)); color:#fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* 登录：注册/演示 标签 */
.auth-tabs { display:flex; gap:6px; background:var(--bg); padding:4px; border-radius:10px; margin-bottom:18px; }
.auth-tab { flex:1; border:0; background:transparent; padding:9px; border-radius:8px; font-size:13px; font-weight:600; color:var(--text-3); cursor:pointer; }
.auth-tab.on { background:var(--surface); color:var(--brand); box-shadow:var(--shadow-sm); }
.auth-divider { display:flex; align-items:center; gap:12px; color:var(--text-3); font-size:12px; margin:16px 0 12px; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background:var(--line); }
.tb-user { font-size:12.5px; color:var(--text-2); background:var(--bg); padding:7px 12px; border-radius:20px; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* 数据采集视图 */
.src-tag { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; padding:3px 9px; border-radius:20px; font-weight:600; }
.src-tag.real { background:var(--down-soft); color:var(--down); }
.src-tag.est { background:var(--gold-soft); color:var(--gold); }
.collect-stat { display:flex; gap:14px; flex-wrap:wrap; }
.collect-stat .cs { flex:1; min-width:130px; border:1px solid var(--line); border-radius:12px; padding:14px; }
.collect-stat .cs b { display:block; font-size:21px; font-weight:800; line-height:1.2; }
.collect-stat .cs span { font-size:12px; color:var(--text-3); }
.snap-list { list-style:none; margin:0; }
.snap-list li { display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); font-size:13px; }
.shield-status { display:flex; flex-wrap:wrap; gap:10px; }
.shield-status .ss { display:flex; align-items:center; gap:8px; background:var(--bg); border-radius:10px; padding:10px 13px; font-size:12.5px; }
.shield-status .ss b { color:var(--brand); }

.content { padding: 24px 26px 60px; flex: 1; }
.view-head { margin-bottom: 20px; }
.view-head h1 { font-size: 21px; font-weight: 800; }
.view-head p { color: var(--text-2); margin-top: 5px; font-size: 13.5px; }

/* 卡片 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease; }
.card:hover { box-shadow: var(--shadow); }
.card-h { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card-h h3 { font-size: 15px; font-weight: 700; position: relative; padding-left: 11px; }
.card-h h3::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 15px; border-radius: 2px; background: var(--brand); }
.card-h .sub { font-size: 12px; color: var(--text-3); }
.card-h .spacer { flex: 1; }
.card-b { padding: 18px; }

/* 导入 AI 淡旺季表卡片：默认收起，点击标题展开/收起 */
#cal-import-card.collapsed .card-b { display: none; }
#cal-import-card .card-h.collapsible { cursor: pointer; user-select: none; }
#cal-import-card .card-h.collapsible .cal-toggle-icon { display: inline-flex; align-items: center; color: var(--text-3); transition: transform .2s ease; }
#cal-import-card.collapsed .card-h.collapsible .cal-toggle-icon { transform: rotate(-90deg); }
#cal-import-card .card-h.collapsible:hover h3 { color: var(--brand); }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi .k-top { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.kpi .k-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(47,91,255,.12); }
.kpi .k-val { font-size: 27px; font-weight: 800; margin-top: 12px; letter-spacing: -.5px; }
.kpi .k-val small { font-size: 14px; font-weight: 600; color: var(--text-3); }
.kpi .k-foot { margin-top: 7px; font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.kpi .k-spark { position: absolute; right: 12px; top: 14px; opacity: .9; }

.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.grid-2b { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.pp-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (max-width: 1180px){ .kpi-grid{grid-template-columns:repeat(2,1fr);} .grid-2,.grid-2b,.grid-3{grid-template-columns:1fr;} }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .rt { text-align: right; }
.tbl .ct { text-align: center; }
.cell-name { font-weight: 600; }
.cell-sub { font-size: 11.5px; color: var(--text-3); }

/* 供需等级条 */
.lv-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.lv-loose { background: var(--down-soft); color: var(--lv-loose); }
.lv-mid { background: var(--brand-soft); color: var(--lv-mid); }
.lv-tight { background: var(--warn-soft); color: var(--lv-tight); }
.lv-full { background: var(--up-soft); color: var(--lv-full); }

/* 进度/迷你条 */
.mini-bar { height: 7px; border-radius: 4px; background: #eef1f7; overflow: hidden; min-width: 70px; }
.mini-bar i { display: block; height: 100%; border-radius: 4px; }

/* 调价方案卡 */
.price-plan { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.price-plan .pp-h { padding: 10px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pp-move { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; }
.pp-move .now { font-size: 11.5px; color: var(--text-3); }
.pp-move .rec { font-size: 18px; font-weight: 800; }
.pp-body { padding: 10px 14px; display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
@media (max-width: 1180px){ .pp-body { grid-template-columns: repeat(3,1fr); } }
.pp-metric { background: var(--surface-2); border-radius: 8px; padding: 6px 8px; }
.pp-metric span { font-size: 11px; color: var(--text-3); display: block; margin-bottom: 1px; }
.pp-metric b { font-size: 13px; }
.pp-reason { padding: 0 14px 10px; font-size: 12px; color: var(--text-2); line-height: 1.55; }

/* 报告 */
.report-block { margin-bottom: 18px; }
.report-block h4 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.report-block h4 .num { width: 22px; height: 22px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.report-list { list-style: none; }
.report-list li { padding: 7px 0 7px 22px; position: relative; font-size: 13px; color: var(--text); border-bottom: 1px dashed var(--line); }
.report-list li:last-child { border-bottom: none; }
.report-list li::before { content:""; position: absolute; left: 4px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* 七层稳跑 */
.shield-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.shield {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 13px;
  background: var(--surface); transition: .15s;
}
.shield:hover { box-shadow: var(--shadow); }
.shield .sh-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--down-soft); color: var(--down); display: grid; place-items: center; flex-shrink: 0; }
.shield b { font-size: 14px; }
.shield p { font-size: 12.5px; color: var(--text-2); margin-top: 3px; line-height: 1.6; }
.shield .st { margin-top: 8px; }

/* 定价 */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.plan-col { border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 24px; background: var(--surface); position: relative; }
.plan-col.feat { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.plan-col.feat::before { content:"最受欢迎"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 14px; border-radius: 999px; }
.plan-col h3 { font-size: 17px; font-weight: 800; }
.plan-col .price { font-size: 34px; font-weight: 800; margin: 12px 0 2px; }
.plan-col .price small { font-size: 14px; color: var(--text-3); font-weight: 600; }
.plan-col .yr { font-size: 12.5px; color: var(--text-3); }
.plan-col ul { list-style: none; margin: 18px 0; }
.plan-col li { padding: 7px 0 7px 25px; position: relative; font-size: 13px; color: var(--text-2); }
.plan-col li::before { content:"✓"; position: absolute; left: 0; color: var(--down); font-weight: 800; }
.plan-col li.off { color: var(--text-3); }
.plan-col li.off::before { content:"✕"; color: var(--text-3); font-weight: 600; }
.plan-col .btn { width: 100%; }

/* 空/锁定态 */
.locked-overlay {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 40px; text-align: center;
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 12px, var(--surface-2) 12px, var(--surface-2) 24px);
}
.locked-overlay .lk-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; margin: 0 auto 14px; }
.locked-overlay h3 { font-size: 16px; font-weight: 800; }
.locked-overlay p { color: var(--text-2); margin: 8px auto 18px; max-width: 420px; font-size: 13px; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content:""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-strong); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content:""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--line-strong); }
.tl-item.done::before { background: var(--down); border-color: var(--down); }
.tl-item.active::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.tl-item b { font-size: 13.5px; }
.tl-item p { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

/* toast */
#toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #1b2130; color: #fff; padding: 12px 16px; border-radius: 11px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; display: flex; align-items: center; gap: 10px; animation: slideIn .25s ease; max-width: 340px;
}
.toast .t-ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; }
.toast.ok .t-ic { background: var(--down); }
.toast.warn .t-ic { background: var(--warn); }
.toast.info .t-ic { background: var(--brand); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 弹层 */
.modal-mask { position: fixed; inset: 0; background: rgba(20,26,46,.5); backdrop-filter: blur(2px); z-index: 500; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); overflow: hidden; animation: slideIn .2s; }
.modal-wide { max-width: 640px; }
.modal-h { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal-h h3 { font-size: 17px; font-weight: 800; }
.modal-b { padding: 22px; }
.modal-f { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }
.gauge-wrap { display: inline-block; width: 100%; }
.gauge-center { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); text-align: center; line-height: 1; }
.gauge-center b { font-size: 40px; font-weight: 800; color: var(--text); }
.gauge-center small { font-size: 14px; color: var(--text-3); margin-left: 2px; }

.seg { display: inline-flex; background: var(--bg); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 13px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

.dl-row { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.dl-row:last-child { border-bottom: none; }
.dl-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

.info-banner {
  display: flex; gap: 12px; padding: 15px 18px; border-radius: var(--radius); font-size: 13px; line-height: 1.7;
  background: linear-gradient(90deg, var(--brand-soft), #f4f8ff); color: var(--brand-700);
  border: 1px solid #cfdbff; border-left: 3px solid var(--brand); margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.info-banner.warn { background: var(--warn-soft); color: #9a5a12; border-color: #f6dcb6; }
.info-banner .ib-ic { flex-shrink: 0; }

/* ---------- 配置管理表单（门店设置 / 房型 / 竞品） ---------- */
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; }
.form-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px 18px; }
.form-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 4px 14px; }
.form-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; flex-wrap: wrap; }
.form-row.full { grid-column: 1 / -1; }
.form-row > label { width: 86px; color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.form-row.full > label { width: 86px; }
.form-row.price > label { width: 92px; }
.f-in {
  flex: 1; min-width: 0; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 9px;
  font-size: 13.5px; color: var(--text); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.f-in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.f-in.sm { width: 92px; flex: none; text-align: left; padding: 6px 9px; }
.f-in.xs { width: 76px; flex: none; text-align: left; padding: 6px 9px; }
.f-in.mono { font-family: var(--mono, ui-monospace, "SFMono-Regular", Menlo, monospace); }

/* 带单位数字输入 & 下拉框 */
.input-unit { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.input-unit .f-in { flex: 1; min-width: 0; }
.input-unit .unit { color: var(--text-3); font-size: 13px; white-space: nowrap; }
select.f-in { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236b7488' d='M0 1l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px; cursor: pointer; }
select.f-in:invalid { color: var(--text-3); }

/* 开关 */
.sw { position: relative; display: inline-flex; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw span { width: 42px; height: 24px; border-radius: 14px; background: var(--line-strong); transition: background .18s; display: block; }
.sw span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s; }
.sw input:checked + span { background: var(--accent); }
.sw input:checked + span::after { transform: translateX(18px); }

/* 行内小按钮 */
.mini-btn {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--brand);
  padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s;
}
.mini-btn:hover { background: var(--brand-soft); border-color: #b9c8ff; }
.mini-btn.danger { color: var(--up); }
.mini-btn.danger:hover { background: var(--up-soft); border-color: #f3bcbc; }

/* 设置中心跳转卡片 */
.manage-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.manage-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #b9c8ff; }
.manage-card .mc-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.manage-card > div:nth-child(2) { flex: 1; }
.manage-card > div:nth-child(2) b { font-size: 15px; }
.manage-card > div:nth-child(2) p { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.manage-card .mc-arrow { font-size: 22px; color: var(--brand); font-weight: 800; }

/* 管理页徽标（订阅/角色小标） */
.badge.free { background: #eef0f4; color: #6b7488; }
.badge.basic { background: var(--brand-soft); color: var(--brand); }
.badge.pro { background: var(--gold-soft); color: var(--gold); }
.badge.ok { background: var(--down-soft); color: var(--down); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* ===== 跨OTA价差 / 收益模拟器 / 集团聚合 视图样式 ===== */
.wf-field { margin-bottom: 14px; }
.wf-field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.wf-field label b { color: var(--brand); }
.wf-field input[type="range"] { accent-color: var(--brand); cursor: pointer; }
.wf-out-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wf-out { background: #f6f8fc; border: 1px solid #e7ecf5; border-radius: 10px; padding: 10px 12px; }
.wf-out span { display: block; font-size: 11.5px; color: #8b94a7; }
.wf-out b { font-size: 18px; font-weight: 800; }

/* ===== 真实数据采集视图（傻瓜模式） ===== */
.seg-tabs { display: flex; gap: 6px; background: #eef1f8; padding: 5px; border-radius: 12px; margin-bottom: 16px; }
.seg { flex: 1; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .15s; }
.seg:hover { color: var(--text); }
.seg.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.seg-tabs.sm { background: #eef1f8; padding: 4px; border-radius: 10px; margin: 0 0 12px; }
.seg-tabs.sm .seg { flex: 1; padding: 6px 10px; font-size: 12.5px; }

.ch-row { display: flex; gap: 20px; flex-wrap: wrap; margin: 4px 0 12px; }
.ch-box { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; cursor: pointer; user-select: none; }
.ch-box input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

.collect-card { margin-bottom: 16px; }
.field-row { display: flex; gap: 12px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.grow { flex: 1; }
.field label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.field .f-in { width: 100%; }
.block-sm { width: auto; }
.block-sm { min-width: 150px; }

.room-list { display: flex; flex-direction: column; gap: 8px; }
.room-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.rr-name { flex: 1; font-size: 13.5px; font-weight: 600; min-width: 96px; }
.rr-inputs { display: flex; gap: 8px; }
.rr-inputs .f-in.sm { width: 96px; flex: none; text-align: right; }
.rr-inputs .f-in.sm::placeholder { text-align: right; color: var(--text-3); }
.rr-bf { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); flex: none; white-space: nowrap; }
.rr-bf input { width: auto; height: auto; }
.rr-head { background: transparent; border: none; padding: 2px 10px; }
.rr-head .rr-name { color: var(--text-3); font-weight: 700; font-size: 12px; }
.rr-inputs .rr-h { width: 84px; flex: none; text-align: right; font-size: 12px; color: var(--text-3); font-weight: 600; }

.comp-mini { display: flex; flex-direction: column; }
.comp-mini-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.comp-mini-row:last-child { border-bottom: none; }
.cm-name { flex: 1; font-size: 13.5px; font-weight: 600; }
.res-card { margin-top: 12px; border-color: #cfe9d8 !important; background: var(--down-soft); }

.est-tag { display:inline-block; margin-left:5px; font-size:10px; line-height:1; padding:2px 6px; border-radius:8px; background:var(--brand-soft); color:var(--brand); vertical-align:middle; font-weight:700; }
textarea.f-in { width:100%; resize:vertical; min-height:62px; font-family:inherit; line-height:1.6; padding:10px 12px; }

.src-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.src-tag.real { background: var(--down-soft); color: var(--down); }
.src-tag.est { background: var(--gold-soft); color: var(--gold); }

.guard-chip { display:inline-flex; align-items:center; gap:4px; background:var(--down-soft); color:var(--down); font-size:12px; font-weight:700; padding:3px 9px; border-radius:20px; margin-right:8px; vertical-align:middle; }

@media (max-width: 720px) {
  .form-2 { grid-template-columns: 1fr; }
  .form-3 { grid-template-columns: 1fr; }
  .form-4 { grid-template-columns: 1fr 1fr; }
  .modal-wide { max-width: 100%; }
  .wf-out-grid { grid-template-columns: 1fr 1fr; }

  /* 采集视图移动适配 */
  .seg { font-size: 13px; padding: 10px 8px; }
  .field-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .field { max-width: none !important; }
  .field.grow { width: 100%; }
  .block-sm { width: 100%; min-width: 0; }
  .room-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .rr-name { min-width: 0; }
  .rr-inputs { justify-content: space-between; }
  .rr-inputs .f-in.sm { flex: 1; width: auto; text-align: right; }
  .comp-mini-row { padding: 10px 14px; }
}

/* ---- 本店档案：分层说明 + 辐射范围快捷键 ---- */
.tr-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tr-h b { font-size: 14.5px; color: var(--brand-700); }
.tr-tag { font-size: 11px; font-weight: 700; color: var(--brand); background: #fff; border: 1px solid #c9d8ff; padding: 2px 9px; border-radius: 999px; }
.tr-matrix { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tr-matrix span { font-size: 12.5px; color: var(--text-2); background: #fff; border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; }
.tr-matrix b { color: var(--text-1); font-weight: 800; }
.tr-matrix .tr-comm { color: var(--gold); border-color: #f0dcb4; background: var(--gold-soft); }
.tr-body { margin: 0; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.chip-mini { cursor: pointer; user-select: none; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border: 1px solid #c9d8ff; padding: 3px 10px; border-radius: 999px; transition: .15s; }
.chip-mini:hover { background: var(--brand); color: #fff; }
.bt-hint { margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--text-2); }
.bt-hint b { color: var(--brand-700); }
.bt-note { color: var(--text-3); }

/* ---- 分层说明紧凑卡片 ---- */
.tier-hint { font-size: 12px; line-height: 1.6; color: var(--text-3); background: var(--bg); border-left: 3px solid var(--brand); padding: 6px 10px; border-radius: 0 8px 8px 0; margin-top: 2px; }
.param-banner { font-size: 12.5px; line-height: 1.6; color: var(--text-2); background: linear-gradient(90deg, var(--brand-soft), transparent); border: 1px solid #d7e2ff; border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; }
.param-banner b { color: var(--brand-700); }
.sec-sub { font-size: 11.5px; font-weight: 500; color: var(--text-3); margin-left: 6px; }

/* ---- 收益兜底参数：成本明细 ---- */
.cost-section, .channel-section, .season-section { margin-bottom: 22px; }
.cost-section:last-child, .channel-section:last-child, .season-section:last-child { margin-bottom: 0; }

/* ---- 收益兜底参数：成本 C + 毛利率 双列并排 ---- */
.params-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.params-top-row .cost-section,
.params-top-row .margin-section {
  margin-bottom: 0;
  min-width: 0;
}
.params-top-row .cost-result-card,
.params-top-row .margin-result-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sec-h { font-size: 13.5px; font-weight: 700; color: var(--text-1); margin-bottom: 12px; }
.sec-note { font-weight: 400; color: var(--text-3); font-size: 12px; margin-left: 5px; }
.channel-sec-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.channel-sec-h .spacer { flex: 1; }
.comm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin-bottom: 14px; }
.chan-tag { display: inline-block; font-size: 10px; font-weight: 600; color: var(--brand-700); background: var(--brand-soft); border: 1px solid #d7e2ff; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.comm-tip { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.7; color: var(--text-2); background: var(--brand-soft); border: 1px solid #d7e2ff; border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; padding: 10px 12px; margin-bottom: 12px; }
.comm-tip .ct-ic { color: var(--brand-700); flex-shrink: 0; margin-top: 2px; }
.comm-tip b { color: var(--brand-700); }
.comm-cost { display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.cc-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cc-label { font-size: 12.5px; color: var(--text-2); font-weight: 600; display: flex; flex-direction: column; gap: 2px; min-width: 170px; }
.cc-hint { font-size: 11px; color: var(--text-3); font-weight: 400; }
.cc-input { display: flex; align-items: center; gap: 4px; }
.cc-input .f-in { width: 64px; text-align: right; }
.cc-out { font-size: 12.5px; color: var(--text-2); margin-left: auto; }
.cc-out b { color: var(--up); font-weight: 800; }
.season-hint { font-size: 12px; line-height: 1.6; color: var(--text-3); background: var(--bg); border-left: 3px solid var(--brand); padding: 7px 10px; border-radius: 0 8px 8px 0; margin-bottom: 12px; }
.season-hint b { color: var(--brand-700); }
.cost-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cost-tbl th { text-align: left; padding: 10px 12px; background: var(--surface-2); color: var(--text-2); font-weight: 600; border-bottom: 1px solid var(--line); }
.cost-tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text-1); }
.cost-tbl .cost-total { background: var(--down-soft); font-weight: 800; }
.cost-tbl .cost-total td { border-bottom: none; color: var(--down); }
.cost-tbl input { width: 110px; text-align: right; }

/* ---- 单房可变成本 C 注解面板 ---- */
.cost-anno-toggle { margin-left: auto; font-size: 12.5px; }
.cost-anno-toggle.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }

/* ---- 单房可变成本 C 折叠结果卡片 ---- */
.cost-result-card {
  background: linear-gradient(135deg, var(--down-soft) 0%, var(--surface) 100%);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.cost-result-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cost-result-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.cost-result-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.cost-result-value .mono {
  font-size: 34px;
  font-weight: 800;
  color: var(--down);
  line-height: 1;
  letter-spacing: -0.5px;
}
.cost-result-unit {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}
.cost-result-tier {
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
  line-height: 1.6;
}
.cost-result-tier b { color: var(--text-2); }
.cost-result-hint {
  display: inline-block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}
.cost-toggle svg { transition: transform .22s ease; }
.cost-toggle.expanded svg { transform: rotate(180deg); }
.cost-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .28s ease, opacity .2s ease, margin .2s ease;
}
.cost-detail.open {
  max-height: 800px;
  opacity: 1;
  margin-top: 12px;
}
.cost-detail-inner { padding-top: 2px; }

/* ---- 目标毛利率折叠结果卡片 ---- */
.red-label { color: var(--up); font-weight: 700; }
.margin-result-card {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface) 100%);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.margin-result-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.margin-result-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 4px;
}
.margin-result-value {
  font-size: 34px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.margin-result-sublabel {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}
.margin-toggle svg { transition: transform .22s ease; }
.margin-toggle.expanded svg { transform: rotate(180deg); }
.margin-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .28s ease, opacity .2s ease, margin .2s ease;
}
.margin-detail.open {
  max-height: 800px;
  opacity: 1;
  margin-top: 12px;
}
.margin-detail-inner { padding-top: 2px; }

.cost-anno { margin-top: 14px; padding: 16px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: 14px; max-height: 460px; overflow-y: auto; }
.cost-anno-head { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--line-strong); }
.cost-anno-title { font-size: 14px; font-weight: 800; color: var(--text-1); letter-spacing: .2px; }
.cost-anno-tip { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--text-3); }
.cost-ref-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; transition: .15s; }
.cost-ref-card:last-child { margin-bottom: 0; }
.cost-ref-card.current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cost-ref-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.cost-ref-name { font-size: 13.5px; font-weight: 800; color: var(--text-1); }
.cost-ref-ex { margin-left: 8px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.cost-ref-c { font-size: 18px; font-weight: 900; color: var(--brand); white-space: nowrap; }
.cost-ref-c span { font-size: 11px; font-weight: 600; color: var(--text-3); margin-left: 3px; }
.cost-ref-desc { font-size: 12px; line-height: 1.6; color: var(--text-2); margin-bottom: 10px; }
.cost-ref-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cost-ref-tbl th { text-align: left; padding: 7px 10px; background: var(--surface-2); color: var(--text-2); font-weight: 600; border-bottom: 1px solid var(--line); }
.cost-ref-tbl th.rt { text-align: right; }
.cost-ref-tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--text-1); vertical-align: top; }
.cost-ref-tbl tr:last-child td { border-bottom: none; }
.cost-ref-tbl td.rt { text-align: right; font-weight: 700; color: var(--text-1); white-space: nowrap; }
.cost-ref-note { color: var(--text-3); line-height: 1.55; }

/* ---- 当前生效毛利率大卡 ---- */
.margin-section { border-top: none; padding-top: 0; }
.margin-current { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.mc-pct { font-size: 42px; font-weight: 900; color: var(--brand); line-height: 1; }
.mc-label { font-size: 13.5px; color: var(--text-2); }
.margin-tabs { display: flex; gap: 10px; margin-bottom: 14px; }
.margin-tabs span { cursor: pointer; user-select: none; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); transition: .15s; }
.margin-tabs span:hover { background: var(--surface-3); }
.margin-tabs span.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.margin-matrix { margin-bottom: 0; }
.margin-matrix input { width: 74px; text-align: right; margin-right: 2px; }

.margin-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.margin-sec-actions { display: flex; align-items: center; gap: 8px; }
.margin-sec-h .btn { font-size: 12.5px; font-weight: 600; padding: 6px 12px; }
.margin-sec-h .btn.ghost { color: var(--text-3); border-color: transparent; background: transparent; padding: 6px 10px; }
.margin-sec-h .btn.ghost:hover { background: var(--surface-2); color: var(--text-2); }
.margin-sec-h .btn.save-btn { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 2px 6px rgba(44,90,255,.22); }
.margin-sec-h .btn.save-btn:hover { background: var(--brand-600); }
.floor-formula { margin-top: 12px; padding: 14px 16px; background: var(--gold-soft); border: 1px solid #f0dcb4; border-radius: 10px; font-size: 12.5px; line-height: 1.8; color: #8a5a12; }
.floor-formula .formula-title { font-weight: 800; margin-bottom: 6px; color: #7a4e0f; }

/* ---- 周期与渠道 ---- */
.season-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.season-chip { cursor: pointer; user-select: none; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line); transition: .15s; }
.season-chip.shoulder { background: var(--surface-2); color: var(--text-2); }
.season-chip.low { background: var(--down-soft); color: var(--down); border-color: #e5c7c7; }
.season-chip.peak { background: var(--up-soft); color: var(--up); border-color: #c7e5cf; }
.season-chip.super { background: linear-gradient(135deg, #ffe7b8, #ffd0e0); color: #c2375e; border-color: #f0c0cf; font-weight: 800; }
.season-hint { font-size: 12.5px; line-height: 1.6; color: var(--text-2); margin: 8px 0 4px; }
.season-hint b { color: var(--brand-700); }
.season-hint.warn { color: var(--up); }
.season-hint.warn b { color: var(--up); }
.season-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sl-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.sl-item .season-chip { width: 14px; height: 14px; padding: 0; border-radius: 4px; cursor: default; pointer-events: none; }
.sl-tip { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.src-badge { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--purple); background: var(--purple-soft); border: 1px solid #d9ccff; border-radius: 6px; padding: 1px 8px; vertical-align: middle; }

/* ---- 商圈智能适配 / 精细化业态 ---- */
.geo-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.refine-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.refine-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--brand-700); background: var(--brand-soft); border: 1px solid #cfdbff; border-radius: 8px; padding: 5px 10px; }
.refine-chip .x { cursor: pointer; color: var(--text-3); font-weight: 800; line-height: 1; padding: 0 2px; border-radius: 4px; }
.refine-chip .x:hover { color: var(--up); background: var(--up-soft); }

/* ---- 周度策略面板（方案A：展示主业态/精细化业态 week 策略；方案B：融合来源提示） ---- */
.bt-week-panel { margin-top: 10px; }
.week-src { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; line-height: 1.5; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); }
.week-src-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.week-src-names { color: var(--brand-700); }
.week-src-sub { width: 100%; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.week-src--fusion { background: var(--accent-soft); border-color: #cdeee9; color: var(--text-2); }
.week-src--fusion .week-src-dot { background: var(--accent); }
.week-merged { margin-top: 10px; padding: 11px 14px; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid #cdeee9; border-left: 3px solid var(--accent); border-radius: 10px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.week-merged b { color: var(--accent-700, var(--brand-700)); }
.week-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.week-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.week-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.week-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.week-card-h { font-size: 12.5px; font-weight: 800; color: var(--brand-700); }
.week-card-w { font-size: 12px; line-height: 1.6; color: var(--text-2); margin-top: 4px; }
.week-single { margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.week-single-line { font-size: 13px; color: var(--text-2); }
.week-single-line b { color: var(--brand-700); }
.week-single-w { font-size: 12.5px; line-height: 1.6; color: var(--text-2); margin: 6px 0 4px; }

/* ---- 地址 → 区/商圈 AI 识别提示 ---- */
.ai-tag { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; flex-shrink: 0; letter-spacing: .3px; }
.geo-ai-hint { align-items: center; gap: 6px; margin-top: 8px; padding: 7px 10px; background: var(--accent-soft); border: 1px solid #cdeee9; border-radius: 8px; color: var(--text-2); font-size: 12px; line-height: 1.4; }

/* ---- 导入 AI 淡旺季表 ---- */
.cal-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cal-col { display: flex; flex-direction: column; gap: 8px; }
.cal-text { width: 100%; min-height: 168px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.7; color: var(--text); font-family: inherit; }
.cal-text:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); outline: none; }
.cal-preview { display: flex; flex-wrap: wrap; gap: 8px; min-height: 120px; align-content: flex-start; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); }
.cal-empty { color: var(--text-3); font-size: 12.5px; padding: 8px; }
.cal-sum { font-size: 13px; font-weight: 700; color: var(--text-2); margin-top: 4px; }
@media (max-width: 720px) { .cal-2 { grid-template-columns: 1fr; } .geo-2 { grid-template-columns: 1fr; } }


@media (max-width: 720px) {
  .tr-matrix span { font-size: 11.5px; padding: 3px 8px; }
  .mc-pct { font-size: 34px; }
  .margin-tabs { flex-wrap: wrap; }
  .margin-tabs span { padding: 6px 12px; font-size: 12px; }
  .cost-tbl input { width: 90px; }
  .params-top-row { grid-template-columns: 1fr; gap: 18px; }
}

/* ============ 收益副驾驶（三板斧） ============ */
.badge.gold { background: var(--gold-soft, #fdf3e0); color: var(--gold); }
.cp-hero { overflow: hidden; background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 60%, #eef2ff 100%); }
.cp-hero-b { display: grid; grid-template-columns: 200px 1fr 190px; gap: 28px; align-items: center; padding: 26px 28px; }
.cp-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cp-ring { width: 150px; height: 150px; border-radius: 50%; padding: 11px;
  background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--line) 0); position: relative;
  animation: cpRingIn .8s cubic-bezier(.2,.7,.3,1); }
@keyframes cpRingIn { from { filter: saturate(.2); transform: scale(.92); opacity: 0; } to { filter: none; transform: none; opacity: 1; } }
.cp-ring-in { width: 100%; height: 100%; border-radius: 50%; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: inset 0 0 0 1px var(--line); }
.cp-score { font-size: 44px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.cp-score-lb { font-size: 12px; color: var(--text-2); }
.cp-subs { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cp-sub-t { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; }
.cp-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 4px 0 2px; }
.cp-bar i { display: block; height: 100%; border-radius: 99px; transition: width .6s cubic-bezier(.2,.7,.3,1); }
.cp-sub-n { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-stats { display: flex; flex-direction: column; gap: 14px; border-left: 1px solid var(--line); padding-left: 24px; }
.cp-stat-l { font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.cp-stat-v { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.cp-stat-v small { font-size: 14px; font-weight: 600; color: var(--text-2); }
.cp-status { padding: 11px 28px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.cp-status.ok { color: var(--down); background: var(--down-soft); }
.cp-status.warn { color: var(--warn); background: var(--warn-soft); }
.cp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cp-chip { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.cp-chip.up { background: var(--up-soft); border-color: transparent; color: var(--up); }
.cp-chip.down { background: var(--down-soft); border-color: transparent; color: var(--down); }
.cp-chip.gold { background: var(--gold-soft, #fdf3e0); border-color: transparent; color: var(--gold); }
.cp-price { font-size: 17px; font-weight: 800; color: var(--brand); }
.cp-tbl td { vertical-align: middle; }
.cp-redline { margin-top: 14px; padding: 10px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  color: var(--up); background: var(--up-soft); display: flex; align-items: center; gap: 8px; }
.cp-guard { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cp-guard-item { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: var(--surface-2); transition: .15s; }
.cp-guard-item.watch { border-color: #f2d9a6; background: var(--warn-soft); }
.cp-guard-item.bad { border-color: #f3b8ba; background: var(--up-soft); }
.cp-guard-t { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-bottom: 8px; }
.cp-guard-p { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; flex-wrap: wrap; }
.cp-guard-p b { color: var(--text); }
.cp-guard-a { font-size: 12px; color: var(--text-2); line-height: 1.5; }
/* 从其他页跳入时，定位锚点高亮 */
.flash-anchor { animation: flashAnchor 1.6s ease-out; }
@keyframes flashAnchor {
  0%   { box-shadow: 0 0 0 3px var(--brand), 0 6px 22px rgba(47,91,255,.18); }
  100% { box-shadow: 0 0 0 0 transparent, 0 0 0 rgba(47,91,255,0); }
}
.cp-snap { display: flex; align-items: center; gap: 14px; }
.rep-pill { display: inline-block; min-width: 34px; padding: 3px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 800;
  background: var(--brand-soft); color: var(--brand); cursor: help; }
@media (max-width: 980px) {
  .cp-hero-b { grid-template-columns: 1fr; gap: 18px; }
  .cp-stats { border-left: none; padding-left: 0; flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .cost-result-main { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cost-result-tier { text-align: left; }
  .cost-result-value .mono { font-size: 28px; }
  .margin-result-main { flex-direction: column; align-items: flex-start; gap: 12px; }
  .margin-result-value { font-size: 28px; }
}

/* ---- 12 月目标毛利率联动网格（单源驱动：淡旺平季 → 档位 → 毛利率）---- */
.margin-month-grid {
  margin-top: 12px;
  padding: 14px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.mmg-head { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mmg-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--text-1); letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mmg-avg { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; background: var(--brand-soft, #e8f0ff); border: 1px solid var(--brand-line, #c7d8ff); border-radius: 8px; padding: 5px 11px; }
.mmg-avg-label { font-size: 12px; font-weight: 500; color: #4a6fcb; white-space: nowrap; }
.mmg-avg-val { font-size: 14px; font-weight: 800; color: var(--brand, #2a6cff); font-variant-numeric: tabular-nums; }
.mmg-cells {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.mmg-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px;
  transition: .15s;
}
.mmg-cell .mmg-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.mmg-cell .mmg-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-3);
}
.mmg-cell .mmg-month { font-weight: 700; color: var(--text-1); font-size: 12.5px; }
.mmg-cell .mmg-val { font-weight: 800; font-variant-numeric: tabular-nums; }
.mmg-cell.editable { cursor: pointer; }
.mmg-cell.editable:hover { box-shadow: inset 0 0 0 1.5px var(--brand, #2a6cff); }
.mmg-cell .mmg-edit-input {
  width: 48px; box-sizing: border-box; text-align: center;
  border: 1px solid var(--brand, #2a6cff); border-radius: 6px;
  font-size: 13px; font-weight: 800; padding: 2px 3px; color: var(--text-1);
  background: #fff; outline: none; -moz-appearance: textfield;
}
.mmg-cell .mmg-edit-input::-webkit-outer-spin-button,
.mmg-cell .mmg-edit-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.m-override {
  position: absolute; top: 3px; right: 5px;
  font-size: 9px; font-weight: 700; line-height: 1;
  color: #fff; background: #c2375e; border-radius: 4px; padding: 2px 4px;
  letter-spacing: .2px; pointer-events: none;
}
.mmg-cell.low { background: var(--down-soft); border-color: #e5c7c7; color: var(--down); }
.mmg-cell.low .mmg-dot { background: var(--down); }
.mmg-cell.shoulder { background: var(--surface-2); border-color: var(--line); color: var(--text-2); }
.mmg-cell.shoulder .mmg-dot { background: var(--text-2); }
.mmg-cell.peak { background: var(--up-soft); border-color: #c7e5cf; color: var(--up); }
.mmg-cell.peak .mmg-dot { background: var(--up); }
.mmg-cell.super { background: linear-gradient(135deg, #ffe7b8, #ffd0e0); border-color: #f0c0cf; color: #c2375e; font-weight: 700; }
.mmg-cell.super .mmg-dot { background: #c2375e; }
.mmg-cell.active {
  box-shadow: 0 0 0 2px var(--brand), 0 4px 12px rgba(67,97,238,0.18);
  transform: translateY(-2px);
  z-index: 1;
}
.m-override {
  position: absolute; top: -7px; right: -6px;
  font-size: 10px; font-weight: 700; color: var(--purple);
  background: var(--purple-soft); border: 1px solid #d9ccff;
  border-radius: 6px; padding: 0 5px; line-height: 15px; white-space: nowrap;
}
.margin-link-hint {
  margin-top: 10px; font-size: 11.5px; line-height: 1.6; color: var(--text-3);
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.margin-link-hint b { color: var(--brand, #2a6cff); font-weight: 700; }
.margin-sync-flash {
  margin-top: 10px; padding: 8px 12px; border-radius: 9px;
  font-size: 12.5px; font-weight: 700; color: var(--down);
  background: var(--down-soft); border: 1px solid #a9e0c4;
  animation: mmgFlash .4s ease;
}
@keyframes mmgFlash { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px) {
  .mmg-cells { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
  .mmg-cells { grid-template-columns: repeat(3, 1fr); }
}

/* ===== 门店档案 4 分组子卡片 ===== */
.subcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--bg); }
.subcard:last-of-type { margin-bottom: 0; }
.subcard-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.subcard-h::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); }
.subcard .form-2 { gap: 2px 22px; }

/* 门店档案分组可折叠（点击标题展开/收起，默认展开） */
.subcard-h.collapsible { cursor: pointer; user-select: none; transition: color .15s ease; }
.subcard-h.collapsible:hover { color: var(--brand); }
.subcard-h.collapsible::after { content: '▾'; margin-left: auto; font-size: 12px; line-height: 1; color: var(--text-3); transition: transform .2s ease; }
.subcard.collapsed .subcard-h.collapsible::after { transform: rotate(-90deg); }
.subcard.collapsed .subcard-body { display: none; }

/* ===== 门店身份 4 列布局（严格按示意图） ===== */
.identity-grid { grid-template-columns: repeat(4, 1fr); }
.identity-grid .form-row { flex-direction: column; align-items: stretch; gap: 5px; padding: 5px 0; }
.identity-grid .form-row > label { width: auto; }
.identity-grid .form-row.hint-col { justify-content: center; }
.identity-grid .form-row.hint-col .tier-hint { margin: 0; border-left: none; padding: 0; background: transparent; color: var(--text-3); font-size: 12px; line-height: 1.6; }
@media (max-width: 980px) {
  .identity-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .identity-grid { grid-template-columns: 1fr; }
}

/* ===== 演示态：管理员视角开关 ===== */
.demo-admin-ctl { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); }
.demo-admin-ctl .dac-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--text-1); }
.demo-admin-ctl small { display: block; margin-top: 6px; color: var(--text-2); font-size: 11.5px; line-height: 1.5; }
.switch { position: relative; width: 40px; height: 22px; border-radius: 999px; border: none; background: var(--line); cursor: pointer; transition: .18s; flex: none; padding: 0; }
.switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .18s; }
.switch.on { background: var(--brand); }
.switch.on i { left: 20px; }

/* ===== 演示态：三角色工作区切换器 ===== */
.ws-switcher { margin-top: 12px; padding: 11px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); }
.ws-sw-title { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; letter-spacing: .3px; }
.ws-seg { display: flex; gap: 4px; background: var(--bg-tertiary, #f1f3f8); border-radius: 9px; padding: 4px; }
.ws-opt { flex: 1; padding: 7px 4px; border: none; border-radius: 7px; background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .15s; }
.ws-opt:hover { color: var(--brand); }
.ws-opt.on { background: var(--brand); color: #fff; box-shadow: 0 1px 4px rgba(47,91,255,.25); }
.ws-switcher small { display: block; margin-top: 8px; color: var(--text-2); font-size: 11.5px; line-height: 1.5; }

/* ---- 房型批量导入 ---- */
.imp-wrap { padding: 2px 0; }
.imp-step { padding: 12px 0; border-top: 1px dashed var(--line); }
.imp-step:first-child { border-top: none; }
.imp-step-h { font-size: 13px; font-weight: 800; color: var(--text-1); margin-bottom: 4px; }
.imp-file { display: block; margin-top: 8px; font-size: 13px; }
.imp-preview { margin-top: 6px; max-height: 340px; overflow: auto; }
.imp-tbl td, .imp-tbl th { padding: 6px 8px; white-space: nowrap; }
.imp-in { width: 88px; }
.imp-err { border-color: #e5484d !important; background: #fdecec; }
.imp-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---- 公开页采集 ---- */
.crawl-wrap { padding: 2px 0; }
.crawl-step { padding: 12px 0; border-top: 1px dashed var(--line); }
.crawl-step:first-child { border-top: none; }
.crawl-step-h { font-size: 13px; font-weight: 800; color: var(--text-1); margin-bottom: 8px; }
.rd { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.rd input { accent-color: var(--brand); }
#cr-tbl th:nth-child(4), #cr-tbl th:nth-child(5) { color: var(--up); }

/* ---- 本店采集快照 ---- */
.snap-item { padding: 10px 2px; border-bottom: 1px solid var(--border); }
.snap-item:last-child { border-bottom: none; }
.snap-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.snap-detail { padding: 10px 0 2px; }
.snap-detail .tbl th:nth-child(4), .snap-detail .tbl th:nth-child(5) { color: var(--up); }
