/* 数据分析 #/auto/ana */
.an-filter { position: relative; z-index: 5; }
.an-pick { position: relative; flex: 1 1 280px; max-width: 420px; }
.an-pick .inp { width: 100%; padding-left: 32px; }
.an-pick-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: flex; color: var(--sub); pointer-events: none; }
.an-pick-ico svg { width: 15px; height: 15px; }
.an-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 4px; max-height: 340px; overflow: auto; }
.an-drop button { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; width: 100%; text-align: left;
  padding: 7px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; color: var(--fg); font: inherit; }
.an-drop button.on, .an-drop button:hover { background: var(--accent-weak); }
.an-drop b { font-weight: 550; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-drop i { font-style: normal; font-size: 11.5px; color: var(--sub); grid-column: 1; }
.an-drop span { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 12.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.an-none { padding: 12px; color: var(--sub); font-size: 13px; text-align: center; }

.an-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; min-height: 4px; }
.an-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 4px 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.an-chip > i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.an-chip button { display: flex; border: 0; background: none; padding: 3px; border-radius: 50%; cursor: pointer; color: var(--sub); }
.an-chip button:hover { background: var(--hover); color: var(--fg); }
.an-chip button svg { width: 13px; height: 13px; }

.an-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; text-align: center; color: var(--sub); }
.an-empty svg { width: 34px; height: 34px; color: #5e5ce6; opacity: .8; }
.an-empty b { color: var(--fg); font-size: 15px; }
.an-empty p { margin: 0; font-size: 13px; line-height: 1.7; }

.an-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; }
.an-card { position: relative; padding: 14px 14px 10px; cursor: pointer; overflow: hidden; transition: box-shadow .15s, transform .15s; border-top: 3px solid var(--c); }
.an-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.an-card.on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 55%, transparent), var(--shadow); }
.an-card header { display: flex; gap: 8px; align-items: flex-start; }
.an-card header > i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-top: 6px; }
.an-card header div { min-width: 0; display: flex; flex-direction: column; }
.an-card header b { font-weight: 600; font-size: 14px; line-height: 1.4; word-break: break-all; }
.an-card header span { font-size: 11.5px; color: var(--sub); }
.an-hero { margin: 12px 0 2px; display: flex; flex-direction: column; }
.an-hero span { font-size: 12px; color: var(--sub); }
.an-hero b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.an-hero .bz-d { margin-left: 0; }
.an-spark { display: block; width: 100%; height: 34px; margin: 6px 0 4px; }
.an-spark-gap { height: 44px; }
.an-card ul { list-style: none; margin: 0; padding: 0; }
.an-card li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.an-card li span { color: var(--sub); }
.an-card li b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.an-card li .bz-d { grid-column: 1 / 3; justify-self: end; margin: 0; font-size: 11.5px; }
.an-card li.best b::before, .an-best-tip { content: '●'; color: var(--c, #5e5ce6); font-size: 8px; vertical-align: 2px; margin-right: 5px; }
.an-best-tip { color: #5e5ce6; }
.an-bench { --c: var(--c-gray); cursor: default; border-top-style: dashed; background: color-mix(in srgb, var(--panel) 70%, var(--bg2)); }
.an-bench:hover { transform: none; box-shadow: var(--shadow); }

.an-tabs { margin-bottom: 10px; flex-wrap: wrap; }
.an-tabs button { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-tabs button i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.an-why { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 10px; font-size: 13.5px; line-height: 1.75;
  border-left: 3px solid var(--c); }
.an-why > svg { flex: none; width: 16px; height: 16px; margin-top: 4px; color: var(--c); }
.an-why b { font-weight: 650; margin: 0 2px; }
.an-why b.up { color: #d92d20; } .an-why b.down { color: #079455; }
.an-pv th i { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }
.an-pv td:first-child { color: var(--sub); }
.an-pv td.n .bz-d { display: block; margin-left: 0; }

.an-bchk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sub); cursor: pointer; margin-left: auto; }
.an-trend { position: relative; padding: 10px 8px 4px; }
.an-svg { display: block; }
.an-grid { stroke: var(--line); stroke-width: 1; }
.an-ax { fill: var(--sub); font-size: 11px; font-variant-numeric: tabular-nums; }
.an-benchline { fill: none; stroke: var(--c-gray); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .8; }
.an-cur { stroke: var(--line2); stroke-width: 1; }
.an-tip { position: absolute; top: 14px; pointer-events: none; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 8px 10px; font-size: 12.5px; min-width: 180px; z-index: 3; }
.an-tip b { display: block; margin-bottom: 4px; font-weight: 600; }
.an-tip div { display: grid; grid-template-columns: 8px 1fr auto; gap: 7px; align-items: center; padding: 2px 0; }
.an-tip div i { width: 8px; height: 8px; border-radius: 50%; }
.an-tip div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; color: var(--sub); }
.an-tip div em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-tip-b i { background: none; border: 1.5px dashed var(--c-gray); box-sizing: border-box; }
.an .au-sec-h { flex-wrap: wrap; gap: 8px 12px; }
.bz-ana { cursor: pointer; }
.bz-ana:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) {
  .an-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .an-hero b { font-size: 20px; }
  .an-bchk { margin-left: 0; }
}
@media (max-width: 420px) { .an-cards { grid-template-columns: 1fr; } }
/* 拖动排序 */
.an-card[draggable="true"], .an-chip[draggable="true"] { cursor: grab; }
.an-card.dragging, .an-chip.dragging { opacity: .45; }
.an-card.dz-before { box-shadow: -4px 0 0 -1px var(--accent), var(--shadow); }
.an-card.dz-after { box-shadow: 4px 0 0 -1px var(--accent), var(--shadow); }
.an-chip.dz-before { box-shadow: -3px 0 0 0 var(--accent); }
.an-chip.dz-after { box-shadow: 3px 0 0 0 var(--accent); }
.an-card header { min-height: 58px; } /* 店名多数两行内，留够高度让各卡片下面的行对齐 */
/* 推广 · 活动 */
.an-card li.an-sep { border-top: 1px dashed var(--line2); margin-top: 4px; padding-top: 8px; }
.an-card li.an-sep span { font-weight: 600; color: var(--fg2); }
.an-card li.an-sep b { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.an-ad { color: var(--sub); } .an-ad.on { color: #079455; }
.an-card li.an-acts { grid-template-columns: 1fr; row-gap: 5px; }
.an-acts div { display: flex; flex-wrap: wrap; gap: 4px; }
.an-acts i { font-style: normal; font-size: 11.5px; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--fg2); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.an-acts b { justify-self: start; }
/* 横向排列：每店一行，左侧店名+昨日收入+走势，右侧指标横排（11-17） */
.an-cards { display: flex; flex-direction: column; gap: 10px; }
.an-card { display: grid; grid-template-columns: 200px 1fr; column-gap: 14px; align-items: start; border-top: 1px solid var(--line); border-left: 3px solid var(--c); padding: 12px 14px; }
.an-card:hover { transform: none; }
.an-bench { border-top-style: solid; border-left-style: dashed; }
.an-side { min-width: 0; }
.an-card header { min-height: 0; }
.an-card .an-hero { margin-top: 8px; }
.an-card ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px 6px; align-content: start; }
.an-card li { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 3px 8px 4px; border-top: 0; border-left: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.an-card li b { text-align: left; font-size: 14px; }
.an-card .an-hero b { font-size: 22px; }
.an-card li .bz-d { justify-self: auto; align-self: flex-start; }
.an-card li.an-sep { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; border-left: 0; border-top: 1px dashed var(--line2); margin-top: 4px; padding: 6px 0 0; }
.an-card li.an-sep b { font-size: 11.5px; }
.an-card li.an-acts { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
.an-card li.an-acts b { font-size: 13px; }
.an-card.dz-before { box-shadow: 0 -4px 0 -1px var(--accent), var(--shadow); }
.an-card.dz-after { box-shadow: 0 4px 0 -1px var(--accent), var(--shadow); }
@media (max-width: 760px) {
  .an-card { grid-template-columns: 1fr; row-gap: 8px; }
  .an-card ul { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}
/* 压成一行：指标不换行，各店同步横移，底部滑块（11-17 v1.23.3） */
.an-card { align-items: center; }
.an-card ul { display: flex; flex-wrap: nowrap; gap: 0; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%); }
.an-at-start .an-card ul { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%); }
.an-at-end .an-card ul { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px); mask-image: linear-gradient(90deg, transparent 0, #000 18px); }
.an-at-start.an-at-end .an-card ul { -webkit-mask-image: none; mask-image: none; }
.an-panning .an-card ul { cursor: grabbing; }
.an-card li { flex: none; width: 104px; padding: 4px 10px; }
.an-card li.an-sep { flex: none; width: 74px; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0 0 0 6px; padding: 4px 10px; border-top: 0; border-left: 2px dashed var(--line2); white-space: normal; }
.an-card li.an-sep span { font-size: 12px; line-height: 1.35; }
.an-card li.an-acts { flex: none; width: auto; display: flex; flex-direction: column; padding: 4px 10px; border-left: 1px solid var(--line); }
.an-acts div { flex-wrap: nowrap; }
.an-card li .bz-d { white-space: nowrap; }
.an-card .an-side header b { font-size: 13.5px; }
.an-card .an-spark { height: 26px; margin: 4px 0 0; }
.an-hbar { position: sticky; bottom: 10px; z-index: 4; height: 14px; margin: 10px 0 0 214px; border-radius: 99px; cursor: pointer; touch-action: none;
  background: color-mix(in srgb, var(--fg) 8%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.an-hbar i { position: absolute; left: 0; top: 2px; bottom: 2px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 32%, transparent); cursor: grab; transition: background .15s; }
.an-hbar:hover i, .an-hbar.drag i { background: color-mix(in srgb, var(--accent) 75%, transparent); }
.an-hbar.drag i { cursor: grabbing; }
@media (max-width: 760px) { .an-hbar { margin-left: 0; } }
.an-hbar { height: 18px; padding: 4px; box-sizing: border-box; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 4px 14px rgba(0,0,0,.12); -webkit-backdrop-filter: none; backdrop-filter: none; }
.an-hbar i { top: 3px; bottom: 3px; }
.an-card { grid-template-columns: 220px 1fr; }
.an-card .an-hero { margin-top: 4px; }
.an-card li.an-pad { padding: 0; border: 0; min-width: 0; }
