/* 店铺数据：蓝白科技风 · 八板块信息架构 */
.shop-view {
  display: none;
  min-width: 0;
}

.shop-view.visible {
  display: block;
}

body.view-shop .workbench-layout {
  grid-template-columns: 190px minmax(0, 1fr);
}

body.view-shop .workbench-tools {
  display: none;
}

@media (min-width: 1181px) {
  body.view-shop .workbench-content { grid-column: 2; }
}

@media (max-width: 1180px) {
  body.view-shop .workbench-layout {
    grid-template-columns: 1fr;
  }
}

.shop-shell {
  --shop-blue: #2563eb;
  --shop-blue-soft: #eff6ff;
  --shop-card-border: #e6ebf5;
  --shop-card-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .04);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding-bottom: 28px;
}

/* ── 顶部操作栏 ─────────────────────────── */

.shop-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2px 2px 0;
}

.shop-head-main {
  min-width: 220px;
}

.shop-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.02em;
}

.shop-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-end;
}

.shop-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.shop-field > span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.shop-field select,
.shop-field input {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--shop-card-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.shop-field select:focus,
.shop-field input:focus {
  border-color: var(--a-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.shop-field-shop select {
  min-width: 210px;
  padding-right: 30px;
}

.shop-select-wrap {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.shop-manage-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--shop-card-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
}

.shop-manage-btn:hover {
  color: var(--shop-blue);
  border-color: #bfdbfe;
  background: var(--shop-blue-soft);
}

.shop-manage-btn svg,
.shop-btn svg {
  width: 15px;
  height: 15px;
}

.shop-datebar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border: 1px solid var(--shop-card-border);
  border-radius: 12px;
  background: var(--surface);
}

.shop-datebar-info {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.shop-datebar-period {
  color: var(--text-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.shop-datebar-compare {
  font-size: 12px;
  color: var(--text-muted);
}

.shop-datebar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.shop-date-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: #f3f6fa;
}

.shop-date-btn,
.shop-date-nav button,
.shop-date-pop summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.shop-date-btn:hover,
.shop-date-nav button:not(:disabled):hover,
.shop-date-pop summary:hover {
  color: var(--shop-blue);
  background: #e8f0fe;
}

.shop-date-btn.is-active {
  border-color: var(--shop-blue);
  background: #fff;
  color: var(--shop-blue);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .14);
}

.shop-date-nav button:disabled {
  opacity: .35;
  cursor: default;
}

.shop-date-nav button svg,
.shop-date-pop summary svg {
  width: 15px;
  height: 15px;
}

.shop-date-pop {
  position: relative;
}

.shop-date-pop summary {
  list-style: none;
}

.shop-date-pop summary::-webkit-details-marker {
  display: none;
}

.shop-date-pop-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 9px;
  width: 246px;
  padding: 12px;
  border: 1px solid var(--shop-card-border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}

.shop-date-pop-panel label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.shop-date-pop-panel input[type="date"] {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--shop-card-border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
}

.shop-date-apply {
  min-height: 32px;
  border: 1px solid var(--shop-blue);
  border-radius: 9px;
  background: var(--shop-blue);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.shop-date-apply:hover {
  background: #1d4ed8;
}

.shop-search input {
  min-width: 200px;
}

.shop-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.shop-btn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  font-size: 12.5px;
}

/* ── 店铺管理条 ─────────────────────────── */

.shop-shopstrip {
  padding: 14px 16px;
  border: 1px solid var(--shop-card-border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shop-card-shadow);
}

.shop-shopstrip-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.shop-shopstrip-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.shop-shopstrip-head span {
  font-size: 11px;
  color: var(--text-muted);
}

.shop-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.shop-card {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 11px 13px;
  border: 1px solid var(--shop-card-border);
  border-radius: 12px;
  background: var(--surface);
  min-width: 0;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.shop-card:hover {
  border-color: #c7d7fe;
}

.shop-card.is-active {
  border-color: var(--shop-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.shop-card.is-off {
  opacity: .6;
}

.shop-card-main {
  min-width: 0;
}

.shop-card-name {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-platform {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--shop-blue-soft);
  color: var(--shop-blue);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.shop-card-meta {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-link {
  flex-shrink: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--shop-blue);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

/* ── 分类 Tab ───────────────────────────── */

.shop-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--shop-card-border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shop-card-shadow);
  overflow-x: auto;
  scrollbar-width: thin;
}

.shop-tab {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.shop-tab:hover {
  background: rgba(37, 99, 235, .06);
  color: var(--shop-blue);
}

.shop-tab-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
}

.shop-tab-icon svg {
  width: 16px;
  height: 16px;
}

.shop-tab.is-active {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .28);
}

/* ── 提示 / 骨架 ────────────────────────── */

.shop-alert {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
}

.shop-alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.shop-alert button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #c2410c;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.shop-skeleton {
  border-radius: 16px;
  background: linear-gradient(100deg, #eef2f9 30%, #f8fafc 45%, #eef2f9 60%);
  background-size: 220% 100%;
  animation: shopShimmer 1.3s ease-in-out infinite;
}

.shop-skeleton-kpi {
  height: 116px;
}

.shop-skeleton-card {
  height: 268px;
}

@keyframes shopShimmer {
  from { background-position: 120% 0; }
  to { background-position: -20% 0; }
}

/* ── 布局 ───────────────────────────────── */

.shop-stack,
.shop-overview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.shop-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.shop-grid {
  display: grid;
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.shop-grid-3 {
  grid-template-columns: 1.06fr 1.06fr .92fr;
}

.shop-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-grid-2-1 {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}

.shop-grid-service {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

/* ── 卡片 ───────────────────────────────── */

.shop-panel {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--shop-card-border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shop-card-shadow);
}

.shop-panel-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.shop-panel-head h3 {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.shop-panel-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--shop-blue-soft);
  color: var(--shop-blue);
  flex-shrink: 0;
}

.shop-panel-icon svg {
  width: 16px;
  height: 16px;
}

.shop-panel-meta {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: right;
}

.shop-panel-body {
  min-width: 0;
}

.shop-panel-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.shop-panel-link {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--shop-blue);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.shop-panel-link:hover {
  text-decoration: underline;
}

.shop-detail-panel {
  padding: 16px 18px 12px;
}

.shop-panel-table {
  padding-bottom: 8px;
}

.shop-nodata {
  padding-bottom: 18px;
}

/* ── KPI ────────────────────────────────── */

.shop-kpi {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--shop-card-border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shop-card-shadow);
  font: inherit;
  text-align: left;
  cursor: default;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.shop-kpi[onclick] {
  cursor: pointer;
}

.shop-kpi[onclick]:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .09);
}

.shop-kpi.is-empty {
  opacity: .62;
}

.shop-kpi-top {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.shop-kpi-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--shop-blue-soft);
  color: var(--shop-blue);
  flex-shrink: 0;
}

.shop-kpi-icon svg {
  width: 15px;
  height: 15px;
}

.shop-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-kpi-value {
  display: block;
  margin-top: 9px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-kpi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
  min-height: 17px;
}

.shop-chip {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .15);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.shop-chip.is-up {
  background: rgba(22, 163, 74, .12);
  color: #15803d;
}

.shop-chip.is-down {
  background: rgba(220, 38, 38, .11);
  color: #b91c1c;
}

/* ── 指标网格 ───────────────────────────── */

.shop-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 14px 16px;
}

.shop-tile {
  min-width: 0;
}

.shop-tile-label {
  font-size: 10.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-tile-value {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-tile-bar {
  margin-top: 7px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
  overflow: hidden;
}

.shop-tile-bar i,
.shop-rank-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.shop-tile-trend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.shop-inline-empty {
  padding: 14px 12px;
  border: 1px dashed var(--border);
  border-radius: 11px;
  color: var(--text-muted);
  font-size: 11.5px;
  text-align: center;
  line-height: 1.6;
}

/* ── 仪表环 ─────────────────────────────── */

.shop-gauges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shop-gauge {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.shop-gauge-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(var(--gauge-color) calc(var(--pct) * 1%), rgba(148, 163, 184, .16) 0);
}

.shop-gauge-ring::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--surface);
}

.shop-gauge-ring span {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.shop-gauge-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.shop-gauge-note {
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ── 概览风险提示 ───────────────────────── */

.shop-risk-mini {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--border);
  list-style: none;
}

.shop-risk-mini li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #fff7ed;
  font-size: 10.5px;
  line-height: 1.5;
  color: #9a3412;
}

.shop-risk-mini li.is-high {
  background: #fef2f2;
  color: #991b1b;
}

.shop-risk-mini li b {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

.shop-risk-safe {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 11px;
  text-align: center;
}

/* ── 广告统计 ───────────────────────────── */

.shop-ad-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px 10px;
  margin-bottom: 14px;
}

.shop-ad-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.shop-ad-stat span {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.shop-ad-stat strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 排行榜 ─────────────────────────────── */

.shop-rank-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.shop-rank-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 4px 9px;
  align-items: center;
  font-size: 11.5px;
}

.shop-rank-no {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--shop-blue-soft);
  color: var(--shop-blue);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.shop-rank-name {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-rank-value {
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.shop-rank-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
  overflow: hidden;
}

.shop-rank-sub {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
}

.shop-subtext {
  color: var(--text-muted);
}

/* ── 经营建议 ───────────────────────────── */

.shop-advice {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-advice li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 11px;
  border: 1px solid var(--shop-card-border);
  border-radius: 11px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.shop-advice li:hover {
  border-color: #bfdbfe;
  background: var(--shop-blue-soft);
}

.shop-advice-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--shop-blue-soft);
  color: var(--shop-blue);
  flex-shrink: 0;
}

.shop-advice-icon svg {
  width: 14px;
  height: 14px;
}

.shop-advice li.is-high .shop-advice-icon {
  background: #fef2f2;
  color: #dc2626;
}

.shop-advice li.is-medium .shop-advice-icon {
  background: #fff7ed;
  color: #ea580c;
}

.shop-advice li.is-info .shop-advice-icon {
  background: #f0fdf4;
  color: #16a34a;
}

/* ── 客户资产 / 接待账号 / 经营诊断 ─────── */

.shop-callout {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.65;
}

.shop-facts {
  display: flex;
  flex-direction: column;
}

.shop-facts > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed var(--shop-card-border);
}

.shop-facts > div:last-child {
  border-bottom: 0;
}

.shop-facts > div.full {
  grid-template-columns: minmax(0, 1fr);
  padding: 0 0 9px;
}

.shop-facts span {
  font-size: 12px;
  color: var(--text-secondary);
}

.shop-facts strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.55;
}

.shop-facts strong.is-ok {
  color: #15803d;
}

.shop-facts strong.is-bad {
  color: #dc2626;
}

.shop-facts p {
  grid-column: 2;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.shop-facts.is-gaps > div {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.shop-facts.is-gaps p {
  grid-column: auto;
}

.shop-staff-table td:first-child strong {
  display: block;
  font-size: 13px;
}

.shop-diag-prod td:first-child {
  max-width: 260px;
  font-size: 12.5px;
  line-height: 1.45;
}

.shop-diag-prod td:first-child .shop-muted {
  margin-top: 1px;
  font-size: 10.5px;
}

.shop-muted {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  color: var(--text-muted);
}

.shop-table tr.is-low td {
  background: #fff7ed;
}

.shop-cell-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 130px;
}

.shop-cell-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
  overflow: hidden;
}

.shop-cell-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.shop-cell-bar em {
  min-width: 34px;
  font-style: normal;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  text-align: right;
}

.shop-advice-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.shop-advice-text strong {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.shop-advice-text span {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── 新老客户对比 / 小统计 ──────────────── */

.shop-split {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-split-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, .16);
}

.shop-split-bar i {
  display: block;
  height: 100%;
}

.shop-split-bar i.is-new,
.shop-split-legend i.is-new {
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.shop-split-bar i.is-old,
.shop-split-legend i.is-old {
  background: linear-gradient(90deg, #4ade80, #16a34a);
}

.shop-split-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 11px;
  color: var(--text-secondary);
}

.shop-split-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.shop-split-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.shop-mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 12px 14px;
  margin-top: 14px;
}

.shop-mini-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.shop-mini-stats span {
  font-size: 10.5px;
  color: var(--text-muted);
}

.shop-mini-stats strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.shop-mini-stats strong.is-muted {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── 趋势图 ─────────────────────────────── */

.shop-chart {
  width: 100%;
}

.shop-chart svg {
  display: block;
  width: 100%;
  height: 190px;
  overflow: visible;
}

.shop-chart-grid {
  stroke: rgba(148, 163, 184, .22);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.shop-chart-axis,
.shop-chart-label {
  fill: var(--text-muted);
  font-size: 9.5px;
  font-family: inherit;
}

.shop-chart-dot {
  fill: #2563eb;
  stroke: #fff;
  stroke-width: 1.6;
  cursor: default;
}

.shop-chart-empty {
  display: grid;
  place-items: center;
  min-height: 168px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.7;
  text-align: center;
}

.shop-mini-select {
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--shop-card-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 11px;
  outline: none;
}

/* ── 风险预警 ───────────────────────────── */

.shop-risk-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.shop-risk-badge {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 12px;
  background: #f0fdf4;
  color: #15803d;
}

.shop-risk-badge.is-medium {
  background: #fff7ed;
  color: #c2410c;
}

.shop-risk-badge.is-high {
  background: #fef2f2;
  color: #b91c1c;
}

.shop-risk-badge span {
  font-size: 13px;
  font-weight: 700;
}

.shop-risk-badge strong {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.shop-risk-badge em {
  font-style: normal;
  font-size: 11px;
  opacity: .8;
}

.shop-risk-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.shop-risk-counts > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  padding: 9px 12px;
  border: 1px solid var(--shop-card-border);
  border-radius: 11px;
  background: #fbfdff;
}

.shop-risk-counts span {
  font-size: 11px;
  color: var(--text-secondary);
}

.shop-risk-counts strong {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.shop-risk-counts .is-high strong { color: #dc2626; }
.shop-risk-counts .is-medium strong { color: #ea580c; }
.shop-risk-counts .is-low strong { color: #16a34a; }

.shop-risk-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-risk-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 13px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fffbf5;
}

.shop-risk-list li.is-high {
  border-color: #fecaca;
  background: #fff7f7;
}

.shop-risk-level {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 11px;
  font-weight: 700;
}

.shop-risk-list li.is-high .shop-risk-level {
  background: #fee2e2;
  color: #b91c1c;
}

.shop-risk-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.shop-risk-body strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.shop-risk-body em {
  font-style: normal;
  color: var(--text-muted);
}

.shop-risk-link {
  flex-shrink: 0;
  margin-left: auto;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--shop-blue);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* ── 服务分 ─────────────────────────────── */

.shop-service-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.shop-service-score {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 12px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
  border: 1px solid #dbeafe;
}

.shop-service-score > span {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
}

.shop-service-score em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-secondary);
}

.shop-service-grade {
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.shop-service-grade.is-grade-good {
  background: #dcfce7;
  color: #15803d;
}

.shop-service-grade.is-grade-mid {
  background: #fef3c7;
  color: #b45309;
}

.shop-service-grade.is-grade-bad {
  background: #fee2e2;
  color: #b91c1c;
}

.shop-service-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px 20px;
  flex: 1;
  min-width: 240px;
}

.shop-service-meta > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shop-service-meta span {
  font-size: 10.5px;
  color: var(--text-muted);
}

.shop-service-meta strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.shop-service-card {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--shop-card-border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shop-card-shadow);
}

.shop-service-card-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.shop-service-card-head h4 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-service-card-score {
  margin-top: 10px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.shop-service-card-score em {
  margin-left: 3px;
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.shop-service-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 6px 0 8px;
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ── 实时数据 ───────────────────────────── */

.shop-realtime-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.shop-realtime-card {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--shop-card-border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shop-card-shadow);
}

.shop-realtime-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.shop-realtime-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.shop-realtime-head span {
  font-size: 10.5px;
  color: var(--text-muted);
}

.shop-realtime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 14px 12px;
}

.shop-realtime-grid > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.shop-realtime-grid .shop-chip {
  align-self: flex-start;
  margin-top: 2px;
}

.shop-realtime-grid span {
  font-size: 10.5px;
  color: var(--text-secondary);
}

.shop-realtime-grid strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-realtime-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.shop-realtime-extra > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.shop-realtime-extra span {
  font-size: 10.5px;
  color: var(--text-muted);
}

.shop-realtime-extra strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.shop-section-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, .08);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.7;
}

/* ── 明细区 ─────────────────────────────── */

.shop-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.shop-subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.shop-subtab {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--shop-card-border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.shop-subtab em {
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .16);
  color: var(--text-muted);
  font-size: 10px;
  font-style: normal;
}

.shop-subtab.is-active {
  border-color: #bfdbfe;
  background: var(--shop-blue-soft);
  color: var(--shop-blue);
}

.shop-subtab.is-active em {
  background: rgba(37, 99, 235, .14);
  color: var(--shop-blue);
}

.shop-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.shop-section-head h3 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.shop-section-head .shop-section-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.shop-section-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.shop-compare {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.shop-compare select {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 11px;
}

.shop-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.shop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.shop-table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(241, 245, 249, .55);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.shop-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
}

.shop-table tbody tr:last-child td {
  border-bottom: 0;
}

.shop-table tbody tr:hover td {
  background: rgba(59, 130, 246, .035);
}

.shop-table th.is-num,
.shop-table td.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.shop-table td.is-note {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-plan-table th,
.shop-plan-table td {
  padding: 10px 12px;
}

.shop-source {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .16);
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
}

.shop-source.is-accio {
  background: var(--shop-blue-soft);
  color: var(--shop-blue);
}

.shop-op-col {
  width: 96px;
}

.shop-op {
  display: flex;
  gap: 8px;
}

.shop-op button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--shop-blue);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.shop-op button.is-danger {
  color: #dc2626;
}

.shop-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.shop-pagination label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.shop-pagination input {
  width: 52px;
  min-height: 28px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 11.5px;
  text-align: center;
}

.shop-page-btn {
  min-width: 28px;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.shop-page-btn:disabled {
  opacity: .4;
  cursor: default;
}

.shop-empty {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 11px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

/* ── 弹窗与表单 ─────────────────────────── */

.shop-modal {
  width: min(560px, 94vw);
}

.shop-modal-wide {
  width: min(900px, 96vw);
}

.shop-modal-wide .modal-body {
  max-height: 68vh;
  overflow-y: auto;
}

.shop-metric-more {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: 9px;
}

.shop-metric-more summary {
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.shop-metric-more .shop-metric-grid {
  margin-top: 9px;
}

.shop-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.shop-form-grid .shop-field.full {
  grid-column: 1 / -1;
}

.shop-check {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.shop-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.shop-form-hint {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
}

.shop-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

/* ── 响应式 ─────────────────────────────── */

@media (max-width: 1360px) {
  .shop-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-grid-3 > .shop-panel:last-child {
    grid-column: 1 / -1;
  }
  .shop-grid-2-1 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .shop-kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .shop-toolbar {
    justify-content: flex-start;
  }
  .shop-grid-3,
  .shop-grid-2,
  .shop-grid-service {
    grid-template-columns: minmax(0, 1fr);
  }
  .shop-grid-3 > .shop-panel:last-child {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .shop-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-toolbar {
    width: 100%;
  }
  .shop-field-shop,
  .shop-select-wrap,
  .shop-field-shop select {
    width: 100%;
  }
  .shop-search,
  .shop-search input {
    width: 100%;
  }
  .shop-datebar {
    align-items: flex-start;
  }
  .shop-datebar-controls {
    width: 100%;
  }
  .shop-date-pop-panel {
    right: auto;
    left: 0;
  }
  .shop-gauges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-form-grid,
  .shop-metric-grid {
    grid-template-columns: 1fr;
  }
  .shop-op-col {
    width: 82px;
  }
}
