/* 门店数据平台 · 页面样式（仅作用于 .rp-scope，避免污染现有页面）
   创建人：liuzy　时间：2026-11-16
   2026-11-18 liuzy：整站统一深蓝科技风，配色变量与 app.css / store_mobile.html 对齐；
   布局规则保持不变，仅替换视觉层。 */

.rp-scope {
  --rp-blue: #4f8cff;
  --rp-green: #3ddc97;
  --rp-red: #ff6b81;
  --rp-amber: #ffb63d;
  --rp-purple: #b18cff;
  --rp-cyan: #35e2ff;
}

/* 工具栏内的品牌切换（2026-11-18 liuzy：active 改为青蓝渐变亮块，与手机版一致） */
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
}
.seg-btn {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  font-size: 13px;
  color: #9db3e2;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line-2); }
.seg-btn:hover { background: rgba(79, 140, 255, .12); color: var(--text); }
.seg-btn.active {
  background: linear-gradient(135deg, rgba(53, 226, 255, .85), rgba(79, 140, 255, .9));
  color: #06122e; font-weight: 700;
}

.rp-toolbar { align-items: center; }
.rp-toolbar .btn-row-inline { display: inline-flex; gap: 4px; }

/* KPI 卡片 */
.rp-kpi .value { font-size: 26px; }
.rp-kpi .sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.rp-kpi .sub .up { color: var(--rp-green); text-shadow: 0 0 6px rgba(61, 220, 151, .45); }
.rp-kpi .sub .down { color: var(--rp-red); text-shadow: 0 0 6px rgba(255, 107, 129, .45); }

/* 左右分栏：左边型号占比，右边两个门店排名饼图 */
.rp-split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}
.rp-rank-col { display: flex; flex-direction: column; gap: 12px; }
.rp-rank-col .card { margin-bottom: 0; }
.rp-split > .card { margin-bottom: 0; }

/* 2026-11-16 liuzy：2x2 独立卡片布局；两行等高、图表撑满卡片剩余高度，
   保证首页 4 个图表、门店情况「型号占比 + 饼图」高度完全一致 */
.rp-grid2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.rp-grid2x2 .card {
  margin-bottom: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.rp-grid2x2 .card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rp-grid2x2 .card-body > .chart {
  flex: 1 1 300px;
  height: auto;
  min-height: 300px;
}
.rp-grid2x2 .card-body > .rp-model-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

/* 型号占比列表（进度条改为霓虹渐变 + 辉光，2026-11-18 liuzy） */
.rp-model-list { max-height: 230px; overflow: auto; padding-right: 4px; }
.rp-model {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px 96px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 12.5px;
}
.rp-model:last-child { border-bottom: 0; }
.rp-model .m-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-model .m-bar {
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
  margin-top: 5px;
}
.rp-model .m-bar > i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #4f8cff, #35e2ff);
  box-shadow: 0 0 8px rgba(53, 226, 255, .55);
}
.rp-model .m-active { text-align: right; font-weight: 600; }
.rp-model .m-sales { text-align: right; color: var(--muted); }

/* 定位标签（2026-11-18 liuzy：深色半透明底 + 霓虹文字） */
.type-tag {
  display: inline-block;
  font-size: 11px;
  line-height: 16px;
  padding: 0 7px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: 1px;
  border: 1px solid transparent;
}
.type-high { background: rgba(177, 140, 255, .14); color: #c9a6ff; border-color: rgba(177, 140, 255, .4); }
.type-low { background: rgba(61, 220, 151, .12); color: #6fe9b8; border-color: rgba(61, 220, 151, .38); }
.type-unknown { background: rgba(126, 147, 196, .14); color: #9db3e2; border-color: rgba(126, 147, 196, .35); }

/* 图表容器 */
.chart { width: 100%; height: 260px; }
.chart.tall { height: 300px; }
.chart-empty {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

/* 通用小表格（展开明细）（2026-11-18 liuzy：表头深色化） */
.rp-mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
/* 2026-11-16 liuzy：数值列表头右对齐，与明细中的数字列保持同一右边线 */
.rp-mini-table th.num { text-align: right; }
.rp-mini-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
  padding: 5px 10px;
  background: #0c1c46;
}
.rp-mini-table td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); }
.rp-mini-table tr:last-child td { border-bottom: 0; }
.rp-detail-cell { background: rgba(79, 140, 255, .06); padding: 10px 14px 14px 44px !important; }
.rp-detail-empty { color: var(--muted); font-size: 12.5px; padding: 8px 0; }

/* 完成率 / 同比颜色（2026-11-18 liuzy：加辉光增强科技感） */
.rp-good { color: var(--rp-green); font-weight: 600; text-shadow: 0 0 6px rgba(61, 220, 151, .45); }
.rp-bad { color: var(--rp-red); font-weight: 600; text-shadow: 0 0 6px rgba(255, 107, 129, .45); }
.rp-muted { color: var(--muted); }

/* 排名徽标（前三名改为霓虹青高亮，2026-11-18 liuzy） */
.rp-rank-no {
  display: inline-flex;
  width: 22px; height: 22px;
  align-items: center; justify-content: center;
  border-radius: 6px;
  background: rgba(126, 147, 196, .14);
  color: #9db3e2;
  font-size: 12px;
  font-weight: 600;
}
.rp-rank-no.top {
  background: rgba(53, 226, 255, .16); color: #35e2ff;
  border: 1px solid rgba(53, 226, 255, .45);
  box-shadow: 0 0 8px rgba(53, 226, 255, .35);
}

/* 配置页：二级 tab */
.rp-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.rp-tab {
  border: 0;
  background: transparent;
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.rp-tab:hover { color: var(--text); }
.rp-tab.active {
  color: var(--rp-cyan); border-bottom-color: var(--rp-cyan); font-weight: 600;
  text-shadow: 0 0 8px rgba(53, 226, 255, .5);
}

/* 配置表格内的紧凑控件 */
.rp-scope .tbl .input { padding: 4px 8px; font-size: 12.5px; }
.rp-scope .tbl .btn.sm { padding: 3px 8px; }
.rp-form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rp-save-hint { font-size: 11.5px; color: var(--muted); }
.rp-candidate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rp-candidate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px 5px 10px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, .05);
}
.rp-candidate .mono { color: var(--muted); }

/* 空行提示 */
.rp-empty { text-align: center; color: var(--muted); padding: 26px; }

@media (max-width: 980px) {
  .rp-split, .rp-grid2x2 { grid-template-columns: 1fr; }
  /* 2026-11-16 liuzy：窄屏单列堆叠时不再强制各行等高 */
  .rp-grid2x2 { grid-auto-rows: auto; }
  .rp-model-list { max-height: none; }
}
