/* 点击行为分析看板：宽屏仪表盘，复用 common.css 的基础配色 */
#app { max-width: 1320px; }
#view { max-width: none; padding: 16px 20px 48px; }
.topbar { position: sticky; top: 0; z-index: 20; }

.an-hero, .an-toolbar, .an-stats, .an-grid, #view > .panel { margin: 12px 0 0; }
.an-hero { margin-top: 0; display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #4f46e5, #8b5cf6); color: #fff; border-radius: 14px; padding: 16px 18px; line-height: 1.7; font-size: 13px; }
.an-hero b { font-size: 16px; }
.an-live { margin-left: auto; font-size: 12px; background: rgba(255,255,255,.2); padding: 5px 12px; border-radius: 12px; white-space: nowrap; }

.an-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; }
.an-toolbar label { font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 5px; }
.an-toolbar input[type=datetime-local], .an-toolbar select, .an-detail-actions input, .an-detail-actions select {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 9px; font-size: 12px; background: #fff; color: #1e293b; outline: none;
}
.an-toolbar input:focus, .an-detail-actions input:focus { border-color: #6366f1; }
.an-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.an-preset { border: 1px solid #e2e8f0; background: #f8fafc; color: #64748b; border-radius: 8px; padding: 7px 12px; font-size: 12px; cursor: pointer; }
.an-preset.on { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.an-auto { margin-left: auto; cursor: pointer; }

.an-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.an-stat { background: #fff; border: 1px solid #eef2f7; border-radius: 12px; padding: 14px 16px; }
.an-stat .k { font-size: 12px; color: #64748b; }
.an-stat .v { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -.5px; }
.an-stat .v.hl { color: #4f46e5; }

.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.an-grid > .panel { margin: 0; min-width: 0; }
.an-sub { font-size: 11px; font-weight: 400; color: #94a3b8; margin-left: 6px; }

.an-rank-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.an-rank-row:last-child { border-bottom: none; }
.an-rank-row .rk { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; background: #f1f5f9; color: #64748b; font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.an-rank-row:nth-child(1) .rk { background: #4f46e5; color: #fff; }
.an-rank-row:nth-child(2) .rk { background: #818cf8; color: #fff; }
.an-rank-row:nth-child(3) .rk { background: #c7d2fe; color: #4338ca; }
.an-rank-main { flex: 1; min-width: 0; }
.an-rank-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.an-rank-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-rank-head b { color: #4f46e5; white-space: nowrap; }
.an-bar { height: 7px; background: #eef2ff; border-radius: 6px; margin: 6px 0 4px; overflow: hidden; }
.an-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 6px; }
.an-rank-sub { font-size: 11px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.an-trend { display: flex; align-items: flex-end; justify-content: flex-start; gap: 10px; height: 150px; overflow-x: auto; padding-top: 8px; }
.an-col { flex: 0 0 44px; width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.an-col .bar { width: 100%; max-width: 34px; background: linear-gradient(180deg, #818cf8, #4f46e5); border-radius: 5px 5px 0 0; min-height: 2px; }
.an-col .n { font-size: 10px; color: #64748b; margin-bottom: 3px; }
.an-col .lb { font-size: 9px; color: #94a3b8; white-space: nowrap; margin-top: 6px; }

.an-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.an-table th { text-align: left; background: #f8fafc; color: #64748b; font-weight: 600; font-size: 11px; padding: 9px 10px; white-space: nowrap; }
.an-table td { padding: 9px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.an-table tbody tr:hover { background: #fafbff; }
.an-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.an-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; background: #f1f5f9; color: #64748b; }
.an-badge.tool { background: #eef2ff; color: #4f46e5; }
.an-badge.click { background: #ecfdf5; color: #059669; }
.an-badge.view { background: #f8fafc; color: #94a3b8; }
.an-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: #475569; }
.an-empty { text-align: center; color: #94a3b8; padding: 32px 0; font-size: 13px; }

.an-detail-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.an-detail-actions input[type=search] { min-width: 220px; }
.an-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; font-size: 12px; color: #64748b; }
.an-pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 标签页 / 简历访客档案 ===== */
/* 面板被包进标签页容器后，补回原先 #view > .panel 的顶部间距 */
#pane-overview > .panel, #pane-resume > .panel { margin-top: 12px; }
.an-tabs { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.an-tab { border: 1px solid #e2e8f0; background: #fff; color: #64748b; border-radius: 10px 10px 0 0; padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; }
.an-tab.on { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.an-tab-link { margin-left: auto; font-size: 12px; color: #4f46e5; text-decoration: none; }
.an-tab-link:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.an-resume-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid #eef2f7; border-radius: 12px; padding: 14px 16px; margin-top: 12px; font-size: 12px; color: #64748b; line-height: 1.7; }
.an-resume-title b { font-size: 15px; color: #1e293b; }
.rv-note { font-size: 12px; color: #64748b; line-height: 1.9; padding: 4px 2px; }

.rv-chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; margin: 1px 4px 1px 0; white-space: nowrap; background: #f1f5f9; color: #64748b; }
.rv-chip.dl { background: #ecfdf5; color: #047857; }
.rv-chip.print { background: #eef2ff; color: #4f46e5; }
.rv-chip.msg { background: #fff7ed; color: #c2410c; }
.rv-chip.view { background: #f0f9ff; color: #0369a1; }
.rv-who { font-size: 13px; font-weight: 700; color: #1e293b; }
.rv-sub { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.rv-row { cursor: pointer; }
.rv-row:hover { background: #fafbff; }
.rv-detail td { background: #f8fafc; padding: 12px 16px; }
.rv-timeline { border-left: 2px solid #c7d2fe; margin-left: 6px; padding-left: 14px; }
.rv-tl-item { position: relative; font-size: 12px; color: #334155; padding: 3px 0; }
.rv-tl-item::before { content: ''; position: absolute; left: -19px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: #818cf8; }
.rv-tl-item .t { display: inline-block; min-width: 132px; color: #94a3b8; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; }
.rv-tl-item .k { color: #a5b4fc; font-size: 10px; margin-left: 6px; }
.rv-meta { font-size: 11px; color: #64748b; line-height: 1.9; margin-top: 8px; }
.rv-meta b { color: #334155; }
.an-table td.rv-flags { max-width: 230px; }

@media (max-width: 900px) {
  .an-grid { grid-template-columns: 1fr; }
  #view { padding: 12px 10px 40px; }
  .an-hero { flex-direction: column; align-items: flex-start; }
  .an-live { margin-left: 0; }
  .an-auto { margin-left: 0; }
  .an-detail-actions input[type=search] { min-width: 150px; }
  .an-resume-title { flex-direction: column; align-items: flex-start; }
  .an-tab-link { margin-left: 0; }
}
