:root {
  --reference-body-font: Roboto, "PingFang SC", -apple-system, "Noto Sans CJK SC", system-ui, sans-serif;
  --reference-control-font: "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #172033;
  background: #f6f8fc;
  color-scheme: light;
  --ink: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --green: #2563eb;
  --green-soft: #eff6ff;
  --yellow: #f59e0b;
  --danger: #d6455d;
  --inline-remove-hover: #e3503b;
  --inline-remove-hover-bg: #fdf5f4;
  --date-calendar-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='black'%3E%3Cpath d='M5 1H4v1H2a1 1 0 00-1 1v10a1 1 0 001 1h12a1 1 0 001-1V3a1 1 0 00-1-1h-2V1h-1v1H5V1zM4 3v2h1V3h6v2h1V3h2v4H2V3h2zM2 8h12v5H2V8z'/%3E%3C/svg%3E");
}

.bi-floating-message { position: fixed; z-index: 10000; top: 50%; left: 50%; width: max-content; max-width: min(560px, calc(100% - 32px)); color: #374151; background: transparent; font-size: 16px; font-weight: 400; line-height: 24px; text-align: center; overflow-wrap: anywhere; pointer-events: none; transform: translate(-50%, -50%); animation: bi-message-rise 2.4s ease-out forwards; }
@keyframes bi-message-rise { 0% { opacity: 1; transform: translate(-50%, -50%); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, calc(-50% - 64px)); } }
@media (prefers-reduced-motion: reduce) { .bi-floating-message { animation-name: bi-message-fade; } }
@keyframes bi-message-fade { 0%, 25% { opacity: 1; } 100% { opacity: 0; } }

.bi-saved-notice { position: fixed; z-index: 10000; top: 28px; left: 50%; transform: translateX(-50%); box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 32px); padding: 10px 14px; border: 1px solid #c5e9df; border-radius: 3px; background: #eaf7f2; color: #374151; font-size: 14px; line-height: 22px; }
.bi-saved-icon { display: grid; place-items: center; flex: 0 0 14px; height: 14px; border-radius: 50%; background: #13a781; color: #fff; font-size: 10px; line-height: 14px; }
.bi-saved-text { min-width: 0; overflow-wrap: anywhere; }
.bi-saved-notice button { flex: 0 0 auto; height: 28px; min-width: 28px; padding: 0 4px; border: 0; border-radius: 3px; background: transparent; color: #2563eb; font: inherit; }
.bi-saved-notice [data-saved-close] { color: #374151; font-size: 22px; }
.bi-saved-notice button:active { box-shadow: inset 0 0 0 999px rgba(0,0,0,.12); }

@media (max-width: 700px) {
  .upload-endpoints { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* 隐藏焦点外框，保留控件的其他焦点反馈。 */
:focus { outline:none !important; }
body { margin: 0; }
button, input, select { letter-spacing: 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: #fff; color: var(--ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sidebar:has(.tree-dashboard-menu:not([hidden])) { z-index:21; }
.sidebar:has(.tree-folder-menu:not([hidden])) { z-index:21; }
.project-switcher { width: calc(100% - 16px); height: 46px; min-height: 46px; margin: 10px 8px 0; padding: 0 10px; border-color: #d8dfdc; background: #fff; color: var(--ink); display: flex; align-items: center; gap: 7px; text-align: left; cursor: pointer; }
.project-switcher > img { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; object-fit: cover; }
.funnel-empty-image, .dashboard-empty-illustration, .login-brand-mark,
.project-switcher > img, .project-game-icon, .project-member-avatar, .project-member-avatar img {
  pointer-events:none;
  -webkit-user-drag:none;
  -webkit-user-select:none;
  user-select:none;
}
.project-switcher strong { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.project-switcher-chevron { flex: 0 0 auto; color: #64748b; font-size: 15px; line-height: 1; }
.data-sidebar { flex: 1; padding: 18px 8px; overflow-y: auto; }
.data-sidebar h2 { margin: 0 8px 18px; font-size: 18px; }
.data-sidebar-group { display: grid; gap: 4px; margin-bottom: 18px; }
.data-sidebar-group > strong { padding: 0 12px 6px; color: var(--muted); font-size: 12px; }
.data-sidebar-item { min-height: 40px; border: 0; border-left: 3px solid transparent; border-radius: 3px; background: transparent; color: var(--ink); padding: 9px 12px; text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.data-sidebar-item.active { background: var(--green-soft); color: var(--ink); border-left-color: transparent; font-weight: 700; }
#user-sidebar .data-sidebar-item { border-left-width:0; padding-left:15px; }
.analysis-nav-sidebar { flex: 1; padding: 18px 8px; overflow-y: auto; }
.analysis-nav-sidebar h2 { margin: 0 8px 18px; font-size: 18px; }
.analysis-nav-sidebar .data-sidebar-item { display: block; width: 100%; }
.data-workspace .personal-space, .data-workspace #dashboard-nav { display: none !important; }
.analysis-navigation .personal-space, .analysis-navigation #dashboard-nav { display: none !important; }
.analysis-workspace > .workspace > main { width: 100%; max-width: none; margin: 0; padding: 0; }
.analysis-template-view { max-width: 1540px; margin: 0 auto; padding: 20px 24px 40px; }
.analysis-template-filters { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.data-workspace .topbar-title, .data-workspace #filters { display: none !important; }
.compact-workspace .topbar-title, .compact-workspace #filters { display: none !important; }
.sidebar nav { padding: 12px 8px; flex: 1; overflow-y: auto; }
.sidebar .admin-sidebar-nav { flex: 0 0 auto; padding: 8px; border-top: 1px solid var(--line); overflow: visible; }
.nav-item { width: 100%; min-height: 44px; border: 0; border-left: 3px solid transparent; border-radius: 3px; background: transparent; color: var(--ink); padding: 10px 12px; text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.nav-item.active { background: var(--green-soft); color: var(--ink); border-left-color: transparent; font-weight: 700; }
.personal-space { position:relative; display:flex; flex-direction:column; min-height:0; padding:12px 8px 8px; color:#333; }
@media (min-width:801px) {
  .app-shell:has(#personal-space:not([hidden])) { grid-template-columns:202px minmax(0,1fr); }
}
.personal-tree-search { display:flex; flex:0 0 auto; align-items:center; gap:6px; padding:0 8px; height:33px; border-bottom:1px solid #dedede; border-radius:4px; background:#fff; color:#333; }
.personal-tree-search:focus-within { border-bottom-color:#707070; }
.personal-tree-search input { min-width:0; width:100%; height:30px; min-height:0; padding:0; border:0; border-radius:2px; background:transparent; color:inherit; font:inherit; font-size:14px; }
.personal-tree-search input::placeholder { color:#bdbebf; }
.personal-tree-search svg, .personal-tree-icon { flex:0 0 16px; width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.2; stroke-linecap:round; stroke-linejoin:round; }
.space-heading { display:flex; flex:0 0 auto; align-items:center; justify-content:space-between; margin-top:32px; padding-left:4px; color:#808080; }
.space-heading h2 { margin:0; font:inherit; font-size:12px; }
.space-heading button { width:24px; height:24px; padding:0; border:0; border-radius:3px; background:transparent; color:#555; font-size:14px; font-weight:400; cursor:pointer; }
.personal-tree { --tree-folder-indent:20px; --tree-dashboard-indent:16px; display:grid; min-height:0; overflow:auto; }
.tree-folder-title { width:100%; border:0; border-radius:4px; background:transparent; display:flex; align-items:center; min-height:40px; color:inherit; font:inherit; font-size:14px; text-align:left; }
.tree-folder-title > button:first-child, .tree-dashboard { display:flex; align-items:center; gap:8px; min-width:0; min-height:40px; }
.tree-folder-title > button:first-child { flex:1; border:0; background:transparent; color:inherit; padding:0 4px; text-align:left; font:inherit; cursor:pointer; }
.personal-tree .tree-folder-children { padding-inline-start:var(--tree-folder-indent); }
.personal-tree .tree-folder-children > .tree-dashboard-row { margin-inline-start:var(--tree-dashboard-indent); }
.tree-disclosure { display:grid; place-items:center; flex:0 0 12px; color:#808080; }
.tree-disclosure::before { content:""; width:0; height:0; border:4px solid transparent; border-right:0; border-left-color:currentColor; }
[data-folder-toggle][aria-expanded="true"] .tree-disclosure::before { transform:rotate(90deg); }
.tree-label { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.tree-add { border:0; background:transparent; color:var(--ink); font-size:18px; cursor:pointer; }
.tree-folder-title { position:relative; }
.tree-folder-title > .tree-add, .tree-folder-more { visibility:hidden; width:26px; height:28px; flex:0 0 26px; padding:0; }
.tree-folder-more { border:0; background:transparent; color:var(--muted); font-size:18px; cursor:pointer; }
.tree-folder-title:hover > .tree-add, .tree-folder-title:hover > .tree-folder-more,
.tree-folder-title:focus-within > .tree-add, .tree-folder-title:focus-within > .tree-folder-more { visibility:visible; }
.tree-folder-menu { position:fixed; width:80px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow:auto; z-index:20; background:white; padding:4px; box-shadow:0 4px 16px #0002; border:1px solid var(--line); border-radius:4px; }
.tree-folder-menu button { display:block; width:100%; border:0; background:white; color:var(--ink); text-align:left; padding:8px 12px; }
.folder-action-dialog { position:fixed; inset:0; z-index:120; background:#0005; display:grid; place-items:center; padding:16px; }
.folder-action-dialog[hidden] { display:none; }
.folder-action-dialog > section { width:min(640px,100%); background:white; border-radius:6px; padding:24px; }
.folder-action-dialog header { display:flex; align-items:center; justify-content:space-between; }
.folder-action-dialog h2 { margin:0; font-size:16px; }
.folder-action-dialog header button { border:0; background:transparent; color:var(--ink); font-size:22px; padding:0 6px; }
.folder-action-dialog p { white-space:pre-line; overflow-wrap:anywhere; font-size:14px; line-height:1.7; }
.folder-action-dialog input { width:100%; margin-top:16px; }
.folder-action-dialog footer { display:flex; justify-content:flex-end; gap:12px; border-top:1px solid var(--line); margin-top:24px; padding-top:12px; }
#folder-action-cancel { background:white; color:var(--ink); border:0; }
#folder-action-error { color:var(--danger); }
.folder-danger { background:#ef4939; border-color:#ef4939; }
@media (hover:none) { .tree-folder-title > .tree-add, .tree-folder-more { visibility:visible; } }
.tree-folder-children { display:grid; }
.tree-dashboard-row { position:relative; display:flex; align-items:center; border-radius:4px; }
.personal-tree .tree-dashboard-row::before {
  content:""; position:absolute; inset:0;
  inset-inline-start:calc(-1 * (var(--tree-folder-depth, 1) * var(--tree-folder-indent) + var(--tree-dashboard-indent)));
  border-radius:inherit; pointer-events:none;
}
.personal-tree .tree-dashboard-row:not([data-tree-drop]):has(> .tree-dashboard.active)::before { background:#e8ecfc; }
.personal-tree .tree-dashboard-row > :is(.tree-dashboard,.tree-dashboard-role,.tree-more) { position:relative; }
.tree-dashboard { flex:1; border:0; background:transparent; color:inherit; padding:0 4px; text-align:left; cursor:pointer; font:inherit; font-size:14px; }
.tree-dashboard.active { background:transparent; color:inherit; font-weight:400; }
.tree-dashboard.active .personal-tree-icon { color:#1e76f0; }
.tree-more { display:grid; place-items:center; flex:0 0 24px; width:24px; height:24px; margin-inline-end:8px; padding:0; border:0; border-radius:4px; background:transparent; color:#585b68; cursor:pointer; }
.tree-more svg { width:16px; height:16px; fill:currentColor; }
.tree-more:not(:disabled):is(:hover,:focus-visible), .tree-more:has(+ .tree-dashboard-menu:not([hidden])) { background:#d3d7e6; }
.tree-dashboard-menu { position:fixed; z-index:1100; left:0; top:0; display:grid; gap:4px; width:68px; max-width:calc(100vw - 16px); max-height:calc(100vh - 16px); overflow:auto; padding:4px; border-radius:4px; background:#fff; box-shadow:0 4px 14px rgba(10,16,50,.02),0 10px 20px rgba(10,16,50,.03),0 14px 24px rgba(10,16,50,.05); }
.tree-dashboard-menu button { height:38px; padding:8px; border:0; border-radius:4px; background:transparent; color:#333; font-family:inherit; font-size:14px; font-weight:400; line-height:22px; text-align:left; white-space:nowrap; cursor:pointer; }
.tree-dashboard-menu button:not(:disabled):is(:hover,:focus-visible) { background:#f0f1f5; }
.tree-dashboard-menu [data-dashboard-action="delete"]:not(:disabled):is(:hover,:focus-visible) { background:#fff2f0; color:#ff4d4f; }
.tree-empty { margin:0; padding:12px 4px; color:var(--muted); font-size:13px; }
.tree-dashboard-role { flex:0 0 auto; color:#8fa09a; padding-right:4px; font-size:10px; }
@media (hover:hover) {
  .space-heading > #space-add, .tree-dashboard-row > .tree-more { opacity:0; }
  .space-heading:is(:hover,:focus-within) > #space-add, .tree-dashboard-row:is(:hover,:focus-within,:has(.tree-dashboard-menu:not([hidden]))) > .tree-more { opacity:1; }
  .tree-folder-title:not([data-tree-drop]):has(> [data-folder-toggle]:hover),
  .personal-tree .tree-dashboard-row:not([data-tree-drop]):has(> .tree-dashboard:not(.active):hover)::before { background:#f4f5f7; }
}
.nav-item[hidden] { display: none; }
.upload-management-panel { max-width: 760px; }
.upload-endpoints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.upload-endpoints > div { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); background: #f8faf9; }
.upload-endpoints code { color: var(--green); font-size: 13px; }
.nav-managing .nav-item { outline: 1px dashed #6f857d; }
.nav-actions { float: right; display: inline-flex; gap: 2px; margin-left: 8px; }
.nav-actions button { border: 0; background: transparent; color: var(--muted); padding: 0 3px; cursor: pointer; font-size: 14px; line-height: 18px; }
.project-connected { color:#0e9f83; }
.project-connected::before { content:""; display:inline-block; width:6px; height:6px; margin-right:8px; border-radius:50%; background:currentColor; vertical-align:middle; }
.project-row-actions .project-verify img, .project-row-actions .project-switch img { filter: grayscale(1) brightness(.25); }
.nav-settings { display: flex; gap: 8px; padding: 8px 12px; }
.nav-settings button { border: 1px solid #d8dfdc; background: transparent; color: var(--ink); padding: 5px 8px; cursor: pointer; font: inherit; font-size: 12px; }
.sidebar-account { min-height: 76px; padding: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 9px; }
.sidebar-account > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.sidebar-account strong, .sidebar-account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account strong { font-size: 13px; }
.sidebar-account span { color: var(--muted); font-size: 11px; }
.user-avatar { width: 34px; aspect-ratio: 1; border-radius: 50%; background: #f59e0b center/cover; display: grid; place-items: center; color: #fff; font-weight: 700; }
.sidebar-account button { width: 42px; height: 30px; border-color: #b8c4c0; background: transparent; color: var(--ink); padding: 0; font-size: 12px; cursor: pointer; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 58px; padding: 8px 26px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-start; gap: 22px; }
.topbar-title { min-width: 220px; }
.top-nav { display:flex; align-items:center; gap:4px; margin-left:0; }
.top-nav-item { border:0; background:transparent; color:#333; padding:10px 16px; border-bottom:2px solid transparent; cursor:pointer; font-size:16px; font-weight:400; }
.top-nav-item { text-decoration:none; display:inline-block; }
.top-nav-item.active { color:#333; border-bottom-color:#1890ff; }
.top-nav-item:is(:hover,:focus-visible,:active,[aria-expanded="true"]) { color:#333; box-shadow:none; }
#analysis-top-trigger:focus-visible { outline:none; border-bottom-color:var(--green); }
.topbar-title, #filters { display: none !important; }
.topbar h1 { margin: 0; font-size: 22px; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
form { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; }
label { display: grid; gap: 5px; font-size: 12px; color: #53605c; }
input, select, button { height: 36px; border: 1px solid #b8c5c1; border-radius: 4px; background: #fff; padding: 0 10px; font: inherit; color: var(--ink); }
form button { border-color: var(--green); background: var(--green); color: #fff; font-weight: 700; cursor: pointer; padding: 0 18px; }
main { max-width: 1540px; margin: 0 auto; padding: 20px 24px 40px; }
.view { display: none; }
.view.active { display: block; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.metrics-seven { grid-template-columns: repeat(7, minmax(120px, 1fr)); }
.metrics article, .panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.metrics article { min-height: 92px; padding: 14px 15px; border-top: 3px solid var(--green); }
.metrics article:nth-child(4n+2) { border-top-color: var(--yellow); }
.metrics article:nth-child(4n+3) { border-top-color: #507aa4; }
.metrics article:nth-child(4n) { border-top-color: #a75c4f; }
.metrics span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.metrics strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.panel { margin-bottom: 14px; overflow: hidden; }
.panel-head { min-height: 56px; padding: 9px 14px 9px 16px; border-bottom: 1px solid #e6ebe9; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-head > div:first-child { min-width: 140px; }
.panel-title { flex: 1 1 470px; min-width: 0 !important; }
.panel h2 { font-size: 15px; margin: 0; }
.panel-head span { display: block; margin-top: 4px; font-size: 12px; color: #77817e; }
.data-management-columns { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.data-search { width:220px; max-width:40%; }
#user-profile-identity::placeholder { font-size:13px; font-weight:400; }
.data-event-form { display:grid; grid-template-columns:1fr 1fr 140px auto; gap:10px; align-items:end; padding:0 16px 16px; }
.data-event-form label { display:grid; gap:5px; font-size:12px; color:var(--muted); }
.data-event-form button { height:36px; }
.data-properties-head { margin-top:4px; }
.data-fixed-panel, [data-view-panel="properties"] > .panel { min-height:650px; }
.data-loading { min-height:180px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:#77817e; font-size:13px; }
.data-loading i { width:28px; height:28px; border:3px solid #dce5e1; border-top-color:#2563eb; border-radius:50%; animation:data-spin .8s linear infinite; }
@keyframes data-spin { to { transform:rotate(360deg); } }
#data-events-table + * {}
.data-detail-dialog:not([hidden]) { position:fixed; z-index:1400; left:50%; top:50%; transform:translate(-50%,-50%); width:min(100%,1490px); height:min(700px,calc(100vh - 48px)); min-height:min(573px,calc(100dvh - 48px)); max-height:calc(100dvh - 48px); background:#fff; border:1px solid #dce1e8; border-radius:6px; box-shadow:0 18px 48px rgba(0,0,0,.24); overflow:auto; }
.data-detail-dialog .table-wrap { max-height:573px; }
.data-detail-dialog .dialog-close { margin-left:auto; font-size:22px; line-height:28px; }
.data-detail-dialog > .panel-head:has(> .dialog-close) { align-items:flex-start; flex-flow:row nowrap; }
.data-detail-dialog > .panel-head > div:first-child { min-width:0; overflow-wrap:anywhere; }
.data-detail-dialog > .panel-head > .dialog-close { flex:none; }
.property-display-name { position: relative; min-width: 170px; }
.property-edit-button { visibility: hidden; width: 26px; height: 26px; margin-left: 7px; padding: 0; border: 0; background: #eef0f3; color: #374151; cursor: pointer; font-size: 16px; line-height: 26px; }
.property-display-name:hover .property-edit-button, .property-edit-button:focus { visibility: visible; }
.event-display-name { position: relative; min-width: 170px; }
.event-display-name:hover .property-edit-button, .event-display-name .property-edit-button:focus { visibility: visible; }
.event-description { position: relative; min-width: 180px; max-width: 280px; }
.event-description span { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.event-description:hover .property-edit-button, .event-description .property-edit-button:focus { visibility: visible; }
.link-button { border:0; background:none; color:var(--green); cursor:pointer; padding:0; font:inherit; }
#tags-table [data-tag-open] { outline:none; box-shadow:none; }
#tags-table [data-tag-open]:focus-visible { text-decoration:underline; text-underline-offset:3px; }
#segments-table [data-segment-members] { height:18px; min-height:0; line-height:18px; outline:none; }
#segments-table [data-segment-members]:focus-visible { text-decoration:underline; text-underline-offset:3px; }
.status-pill { color:#0f766e; background:#ecfdf5; border-radius:999px; padding:3px 8px; font-size:12px; }
.status-pill.disabled { color:#be3455; background:#fff1f2; }
.status-pill.pending { color:#b45309; background:#fffbeb; }
.analysis-builder-section { border-top: 1px solid #e6ece9; padding-top: 12px; margin-top: 4px; }
.analysis-builder-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; color:#43504c; }
.analysis-builder-row { display:flex; align-items:center; gap:7px; margin:6px 0; }
.analysis-builder-subheading { display:flex; align-items:center; justify-content:space-between; margin:16px 0 6px; color:var(--ink); font-size:13px; font-weight:700; }
.analysis-builder-subheading .icon-button { width:24px; min-width:24px; height:24px; padding:0; color:#2563eb; }
.analysis-builder-row select, .analysis-builder-row input, .analysis-event-picker select { min-width:0; height:32px; padding:0 8px; border:1px solid #cbd5e1; border-radius:4px; background:#fff; color:#334155; color-scheme:light; }
.analysis-builder-row select { flex:0 1 180px; }
.analysis-filter-row { position: relative; display: grid; grid-template-columns: minmax(44px, max-content) minmax(44px, max-content) calc(3em + 18px) 30px; }
.analysis-filter-operator { position: relative; flex: 0 1 auto; width: fit-content; min-width: 44px; max-width: 78px; }
.analysis-filter-operator-trigger { position: relative; width: 100%; height: 32px; overflow: hidden; padding: 0 9px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #334155; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font: inherit; font-size: 12px; }
.analysis-filter-operator-menu { position: absolute; z-index: 90; top: calc(100% + 4px); right: auto; left: 0; width: max-content; min-width: 108px; max-width: 220px; max-height: 260px; overflow: auto; padding: 4px; border: 1px solid #e2e8f0; border-radius: 5px; background: #fff; box-shadow: 0 10px 24px rgba(15,23,42,.14); }
.analysis-filter-operator-menu[hidden] { display: none; }
.analysis-filter-operator-menu button { display: block; width: 100%; height: 30px; padding: 0 8px; border: 0; border-radius: 3px; background: #fff; color: #334155; text-align: left; white-space: nowrap; cursor: pointer; font: inherit; font-size: 12px; }
.analysis-filter-operator-menu button.active { background: #eef7f3; color: var(--green); font-weight: 700; }
.analysis-metric-row .analysis-event-trigger, .analysis-metric-row .analysis-metric-trigger, .analysis-metric-row .analysis-metric-aggregation-trigger { flex: 0 1 auto; width: fit-content; min-width: 44px; max-width: 78px; }
.analysis-metric-row .analysis-metric-aggregation-trigger { flex:0 0 auto; width:calc(3em + 20px); min-width:calc(3em + 20px); max-width:calc(3em + 20px); }
.analysis-builder-row input { flex:1 1 180px; }
.analysis-field-row { align-items: stretch; }
.analysis-field-trigger { flex: 0 1 auto; width: fit-content; min-width: 44px; max-width: 78px; height: 32px; padding: 0 9px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #334155; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font: inherit; font-size: 12px; }
.analysis-event-picker { display:flex; gap:7px; }
.analysis-event-picker select { flex:1; }
.icon-button { width:30px; height:30px; padding:0; border:1px solid #cbd5e1; border-radius:4px; background:#fff; color:#2563eb; cursor:pointer; font-size:17px; line-height:1; }
.analysis-builder-row > [data-remove-metric],
.analysis-builder-row > [data-remove-filter],
.analysis-builder-row > [data-remove-group] {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748b;
}
.analysis-chip-list { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; min-height:26px; }
.analysis-chip { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border-radius:4px; background:#eff6ff; color:#2563eb; font-size:12px; }
.analysis-chip button { border:0; padding:0; background:none; color:inherit; cursor:pointer; font-size:15px; line-height:1; }
.analysis-inline-check { display:flex; align-items:center; gap:7px; color:#53605c; font-size:12px; margin-top:12px; }
.analysis-preview { margin-top:12px; border:1px solid #dfe8e4; border-radius:4px; padding:10px; background:#fafcfb; }
.analysis-preview strong { display:block; margin-bottom:7px; color:#43504c; font-size:12px; }
@media (max-width: 900px) { .topbar { flex-wrap:wrap; } .top-nav { order:-1; width:auto; margin:0; } .data-management-columns { grid-template-columns:1fr; } .data-event-form { grid-template-columns:1fr 1fr; } }
.module-filter { display: flex; align-items: end; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.module-filter label { display: grid; grid-template-columns: auto 132px; align-items: center; gap: 6px; color: #66726f; font-size: 11px; }
.module-filter input { width: 132px; height: 30px; padding: 0 7px; font-size: 12px; }
.module-filter button { height: 30px; border-color: var(--green); background: var(--green); color: #fff; padding: 0 13px; font-size: 12px; font-weight: 700; cursor: pointer; }
.module-filter button:disabled { cursor: wait; opacity: .65; }
.module-error { padding: 9px 14px; border-bottom: 1px solid #f3b7c2; background: #fff1f2; color: var(--danger); font-size: 12px; }
.panel-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.panel-tools select { height: 32px; max-width: 150px; font-size: 12px; }
.view-switch { display: inline-flex; flex: 0 0 auto; border: 1px solid #b7c4c0; border-radius: 4px; overflow: hidden; background: #fff; }
.view-switch button { height: 30px; border: 0; border-right: 1px solid #cdd6d3; border-radius: 0; padding: 0 10px; color: #4d5a56; font-size: 12px; cursor: pointer; }
.view-switch button:last-child { border-right: 0; }
.view-switch button.active { background: var(--green); color: #fff; }
.view-switch.single { pointer-events: none; }
.viz-content { min-height: 240px; overflow-x: auto; }
.panel[data-card] > .module-loading:not([hidden]) { position: static; inset: auto; z-index: auto; min-height: 240px; background: transparent; }
.panel.module-is-loading > .viz-content { display: none; }
.table-wrap { overflow: auto; max-height: 430px; }
[data-view-panel="properties"] .table-wrap, [data-view-panel="data"] .table-wrap { max-height: calc(430px * 4 / 3); }
.payment-overview-content .table-wrap { max-height: 520px; }
.payment-overview-content th:first-child, .payment-overview-content td:first-child { position: sticky; left: var(--table-grid-edge,1px); z-index: 2; background: #fff; box-shadow: calc(-1 * var(--table-grid-edge,1px)) 0 #dce1e6, 1px 0 #e1e7e5; }
.payment-overview-content th:first-child { z-index: 3; background: #f7f9f8; box-shadow: calc(-1 * var(--table-grid-edge,1px)) 0 #dce1e6, 0 calc(-1 * var(--table-grid-edge,1px)) #dce1e6, 1px 0 #e1e7e5; }
.chapter-pass-content .table-wrap { max-height: 620px; }
.chapter-pass-content table { min-width: 660px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { height: 42px; padding: 9px 13px; text-align: right; border-bottom: 1px solid #edf0ef; white-space: nowrap; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { position: sticky; top: var(--table-grid-edge,1px); z-index: 1; background: #f7f9f8; color: #53605c; font-weight: 600; box-shadow:0 calc(-1 * var(--table-grid-edge,1px)) #dce1e6; }
.event-analysis-table .event-table-sticky { position: sticky; z-index: 2; width: auto; min-width: 100px; max-width: none; box-sizing: border-box; text-align: center; background: #fff; box-shadow: calc(-1 * var(--table-grid-edge,1px)) 0 #dce1e6, inset -1px 0 0 #edf0ef; }
.event-analysis-table th.event-table-sticky { z-index: 3; background: #f7f9f8; box-shadow:calc(-1 * var(--table-grid-edge,1px)) 0 #dce1e6, 0 calc(-1 * var(--table-grid-edge,1px)) #dce1e6, inset -1px 0 0 #edf0ef; }
.event-analysis-table tr:hover td.event-table-sticky { background: #fff; }
.event-analysis-table .event-table-total { font-weight: 600; background: #fafbfb; }
.event-analysis-table th { padding: 0; }
.event-table-sort { width: 100%; height: 42px; min-height: 0; padding: 0 13px; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.event-table-sort span { color: #a3ada9; font-size: 10px; }
.event-table-sort.active span { color: var(--green); }
.bi-card-data th { position:static; }
.line-chart { min-width: 620px; min-height: 285px; padding: 8px 12px 0; overflow: hidden; }
.line-chart svg { display: block; width: 100%; height: 277px; }
.line-chart .chart-legend { padding: 0 0 6px; }
.line-chart .axis { stroke: #cbd4d1; stroke-width: 1; }
.line-chart polyline { fill: none; stroke: var(--green); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.line-chart circle { fill: #fff; stroke: var(--green); stroke-width: 3; }
.line-chart text { fill: #697572; font-size: 11px; }
.line-chart .report-point-value { fill: #374151; }
.report-values-hidden .report-point-value,
.report-values-hidden .ranking-board-value { visibility: hidden; }
.unavailable { color: #8a9491; }
.overview-distribution { min-height: 340px; padding: 24px; display: grid; grid-template-columns: minmax(180px, 250px) minmax(560px, 1fr); align-items: stretch; gap: 30px; }
.overview-totals { display: grid; align-content: center; gap: 18px; border-right: 1px solid #edf0ef; padding-right: 24px; }
.overview-totals article { position: relative; display: grid; gap: 3px; padding-left: 13px; }
.overview-totals i { position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; }
.overview-totals span { color: var(--muted); font-size: 12px; }
.overview-totals strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.distribution-bars { min-width: 560px; height: 292px; display: grid; grid-template-columns: repeat(7, minmax(58px, 1fr)); align-items: end; gap: 12px; border-bottom: 1px solid #d7dedb; }
.distribution-item { height: 100%; min-width: 0; display: grid; grid-template-rows: 28px minmax(0, 1fr) 40px; align-items: end; text-align: center; }
.distribution-item > strong { align-self: center; overflow: hidden; color: #34413d; font-size: 11px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.distribution-item > span { align-self: center; color: var(--muted); font-size: 11px; line-height: 16px; }
.distribution-track { height: 100%; display: flex; align-items: end; justify-content: center; border-bottom: 1px dashed #edf0ef; }
.distribution-track i { display: block; width: min(46px, 70%); min-height: 2px; border-radius: 2px 2px 0 0; }
.overview-trend { min-width: 760px; min-height: 390px; padding: 20px; display: grid; grid-template-columns: 190px minmax(560px,1fr); gap: 22px; }
.overview-focus { display: grid; grid-template-columns: 1fr; align-content: center; gap: 8px; padding-right: 20px; border-right: 1px solid #edf0ef; }
.overview-focus time { grid-column: 1/-1; color: #52605c; font-size: 12px; }
.overview-focus article { position: relative; display: grid; gap: 3px; padding-left: 11px; min-width: 0; }
.overview-focus article i { position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 2px; }
.overview-focus article span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.overview-focus article strong { overflow: hidden; font-size: 18px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.overview-trend-plot { min-width: 0; }
.overview-trend-plot svg { display: block; width: 100%; height: 320px; }
.overview-trend-plot polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.overview-trend-plot circle { fill: #fff; stroke-width: 2.5; pointer-events: none; }
.overview-trend-plot text { fill: #697572; font-size: 11px; }
.overview-grid line { stroke: #dfe5e3; stroke-width: 1; stroke-dasharray: 4 4; }
.overview-focus-line { stroke: #9aa7a3; stroke-width: 1; stroke-dasharray: 4 4; pointer-events: none; }
.overview-hit { fill: transparent; cursor: crosshair; }
.overview-legend .unavailable-series { color: #8a9491; }
.bar-list { min-height: 240px; max-height: 480px; overflow: auto; padding: 18px; display: grid; align-content: start; gap: 10px; }
.bar-row { min-height: 30px; display: grid; grid-template-columns: minmax(100px, 190px) minmax(180px, 1fr) 100px; align-items: center; gap: 12px; font-size: 13px; }
.bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { height: 22px; background: #edf1ef; border-radius: 3px; overflow: hidden; }
.bar-track i { display: block; height: 100%; min-width: 2px; background: var(--green); }
.bar-row:nth-child(4n+2) .bar-track i { background: #f59e0b; }
.bar-row:nth-child(4n+3) .bar-track i { background: #3f6f9f; }
.bar-row:nth-child(4n) .bar-track i { background: #a7564a; }
.column-chart { min-height: 340px; overflow-x: auto; padding: 20px 18px 12px; }
.column-plot { height: 306px; display: grid; align-items: end; gap: 16px; border-bottom: 1px solid #d7dedb; }
.column-item { height: 100%; min-width: 0; display: grid; grid-template-rows: 34px minmax(0,1fr) 50px; align-items: end; text-align: center; }
.column-item > strong { align-self: center; overflow: hidden; color: #34413d; font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.column-track { height: 100%; display: flex; align-items: end; justify-content: center; }
.column-track i { display: block; width: min(58px,70%); min-height: 0; border-radius: 3px 3px 0 0; background: var(--green); }
.column-item:nth-child(4n+2) .column-track i { background: #f59e0b; }
.column-item:nth-child(4n+3) .column-track i { background: #3f6f9f; }
.column-item:nth-child(4n) .column-track i { background: #a7564a; }
.column-item > span { align-self: center; overflow: hidden; color: #53605c; font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
/* 环形图在报表中水平居中，最大宽度为原来的 1.5 倍。 */
.pie-layout { min-height: 310px; padding: 20px 26px; display: flex; align-items: center; justify-content: center; }
.pie-layout > .pie-chart { flex: 0 1 690px; width: 100%; }
.pie-chart { min-width: 0; }
.pie-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
/* 悬停的扇区以圆心为原点放大。 */
.pie-slice { stroke: #fff; stroke-width: 1.5; cursor: pointer; transform-box: view-box; transform-origin: 220px 140px; transition: transform .15s ease; }
.pie-slice:hover { transform: scale(1.06); }
.pie-value-label polyline { fill: none; stroke-width: 1; opacity: .7; }
.pie-value-label text { fill: #4b5563; font-size: 12px; }
.report-values-hidden .pie-value-label { visibility: hidden; }
/* 合计放在 SVG 内，随环形图一起缩放。 */
.pie-total-value { fill: var(--ink); font-size: 20px; font-weight: 700; }
.pie-total-label { fill: var(--muted); font-size: 11px; }
.retention-matrix td.heat-cell { background: rgba(23,107,91,var(--heat)); color: #173630; min-width: 92px; }
.retention-matrix .heat-cell strong, .retention-matrix .heat-cell span { display: block; text-align: right; }
.retention-matrix .heat-cell span { margin-top: 2px; color: #49645e; font-size: 11px; }
.retention-trend { min-width: 620px; min-height: 330px; padding: 8px 14px 10px; }
.retention-trend svg { display: block; width: 100%; height: 290px; }
.retention-trend polyline { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.retention-trend circle { fill: #fff; stroke-width: 3; }
.retention-trend text { fill: #697572; font-size: 11px; }
.retention-grid line { stroke: #dfe5e3; stroke-width: 1; stroke-dasharray: 4 4; }
.chart-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; min-height: 26px; color: #53605c; font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 2px; }
.funnel { min-height: 240px; max-height: 520px; padding: 18px; overflow: auto; display: grid; align-content: start; gap: 7px; }
.funnel-row { display: grid; grid-template-columns: minmax(120px, 220px) minmax(160px, 1fr) 100px; align-items: center; gap: 12px; font-size: 13px; }
.funnel-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel-track { height: 22px; background: #edf1ef; border-radius: 3px; overflow: hidden; }
.funnel-fill { height: 100%; min-width: 2px; background: var(--green); }
.funnel-value { text-align: right; font-variant-numeric: tabular-nums; color: #4e5b57; }
.segmented { display: inline-flex; border: 1px solid #b7c4c0; border-radius: 4px; overflow: hidden; margin-bottom: 14px; background: #fff; }
.segment { border: 0; border-right: 1px solid #cdd6d3; border-radius: 0; cursor: pointer; color: #4d5a56; }
.segment:last-child { border-right: 0; }
.segment.active { background: var(--green); color: #fff; }
.notice { padding: 12px 14px; margin: 0 0 14px; border: 1px solid #e5c679; background: #fff8e7; color: #765717; border-radius: 4px; font-size: 13px; }
.notice:empty { display: none; }
.empty, .empty-state { padding: 34px !important; text-align: center !important; color: #7a8582; }
.empty-state { min-height: 220px; display: grid; place-items: center; }
.loading { min-height:180px; padding:24px 14px; box-sizing:border-box; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; background:#fff; border:0; color:#77817e; font-size:13px; }
.loading[hidden] { display:none; }
.loading::before { content:""; width:28px; height:28px; box-sizing:border-box; border:3px solid #dce5e1; border-top-color:#2563eb; border-radius:50%; animation:data-spin .8s linear infinite; }
.bi-card-data > .loading { height:100%; }
#error { background: #fff0ed; border: 1px solid #d9998d; color: var(--danger); padding: 12px 14px; margin-bottom: 14px; border-radius: 4px; }
.admin-toolbar { min-height: 68px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-toolbar h2 { margin: 0; font-size: 18px; }
.admin-toolbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.admin-toolbar button, .admin-access button { border-color: var(--green); background: var(--green); color: #fff; font-weight: 700; cursor: pointer; }
.admin-toolbar button { height: 30px; padding: 0 13px; font-size: 12px; }
.admin-toolbar button:disabled { cursor: default; opacity: .65; }
.admin-toolbar button:disabled[aria-busy="true"] { cursor:wait; }
.admin-toolbar-actions { display: flex; gap: 8px; }
.bi-columns { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr); gap: 14px; margin-bottom: 14px; }
.bi-list { display: grid; gap: 8px; padding: 14px; min-height: 90px; }
.bi-list-item { position: relative; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; text-align: left; display: grid; gap: 4px; cursor: pointer; }
.bi-list-item.active { border-color: var(--green); background: var(--green-soft); }
.bi-list-item small { color: var(--muted); font-size: 11px; }
.bi-list-item button { position: absolute; right: 10px; top: 13px; height: 28px; padding: 0 9px; border: 1px solid var(--green); background: #fff; color: var(--green); cursor: pointer; }
.bi-chart-form { margin-bottom: 14px; padding: 16px 18px; display: grid; grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(130px, .7fr)) minmax(180px, 1fr) auto; align-items: end; gap: 12px; }
.bi-chart-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.bi-chart-form input, .bi-chart-form select { height: 36px; min-width: 0; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; font: inherit; color: var(--ink); background: #fff; }
.bi-chart-form > div:last-child { display: flex; gap: 8px; }
.bi-chart-form button { height: 36px; padding: 0 13px; border: 1px solid var(--green); background: var(--green); color: #fff; font-weight: 700; cursor: pointer; }
.bi-chart-form button.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.bi-canvas { min-height: 150px; padding: 16px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; background: #f5f8f6; }
.bi-card { grid-column: span 6; min-height: 180px; border: 1px solid var(--line); background: #fff; cursor: grab; }
.bi-card:active { cursor: grabbing; }
.bi-card header { min-height: 48px; padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.bi-card-heading { min-width: 0; display: grid; gap: 4px; }
.bi-card-heading strong, .bi-card-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-card-heading .bi-card-title-link { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-card-heading .bi-card-description { color: var(--muted); font-size: 12px; }
.bi-card-date-controls { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:6px; }
.bi-card-date-controls select, .bi-card-date-controls input { height:30px; min-width:0; padding:0 7px; border:1px solid var(--line); border-radius:3px; background:#fff; color:var(--ink); font:inherit; font-size:12px; }
.bi-card-date-controls input { width:122px; }
.bi-card-date-controls span { color:var(--muted); font-size:12px; }
.bi-card-date-controls button { height:30px; padding:0 10px; border:1px solid var(--green); border-radius:3px; background:var(--green); color:#fff; cursor:pointer; font:inherit; font-size:12px; font-weight:700; }
.bi-card header span { color: var(--muted); font-size: 11px; }
.bi-card-actions { display:flex; flex:0 0 auto; align-items:center; gap:4px; }
.dashboard-card-controls { display:grid; flex:none; row-gap:10px; justify-items:end; align-self:flex-start; }
.dashboard-card-display { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:4px; }
.dashboard-card-display:empty { display:none; }
.custom-dashboard-view .bi-card > header { align-items:flex-start; }
.dashboard-card-icon, .dashboard-card-viz {
  display:inline-flex; align-items:center; justify-content:center; gap:4px; height:24px; padding:0;
  border:0; border-radius:4px; background:transparent; color:#333; font:400 14px/20px Arial,"PingFang SC",sans-serif;
  cursor:pointer;
}
.dashboard-card-icon { width:24px; flex:0 0 24px; }
.dashboard-card-viz { min-width:78px; padding-inline:7px; border:1px solid transparent; line-height:22px; }
.bi-card header .dashboard-card-viz span { font:inherit; color:inherit; white-space:nowrap; }
.dashboard-card-icon svg, .dashboard-card-viz svg { flex:none; }
.dashboard-card-icon:enabled:is(:hover,:focus-visible,[aria-expanded=true]) { background:rgba(185,190,207,.2); }
.dashboard-card-viz:enabled:is(:hover,:focus-visible,[aria-expanded=true]) { background:#f9f9fb; }
:is(.dashboard-card-icon,.dashboard-card-viz):enabled:active { background:#e9ebf2; }
.dashboard-card-icon:disabled { color:#b9becf; cursor:default; }
.dashboard-card-menu {
  position:fixed; z-index:135; width:80px; padding:4px; max-height:calc(100dvh - 16px);
  overflow:auto; border-radius:4px; background:#fff;
  box-shadow:0 4px 14px #0a103205,0 10px 20px #0a103208,0 14px 24px #0a10320d;
}
.dashboard-card-viz-menu { width:84px; }
.dashboard-card-menu-group { display:grid; gap:4px; }
.dashboard-card-menu-separator { height:1px; background:#ececf1; }
.dashboard-card-menu button {
  min-height:38px; padding:0 8px; border:0; border-radius:4px; background:transparent; color:#333;
  font-size:14px; font-weight:400; text-align:left; white-space:nowrap; cursor:pointer;
}
.dashboard-card-menu button[aria-checked=true],.dashboard-card-menu button:enabled:is(:hover,:focus-visible) { background:#f2f3f8; }
.dashboard-card-menu button.menu-danger:enabled:is(:hover,:focus-visible) { color:#e84d37; background:#fff2f0; }
.dashboard-card-menu button:disabled { color:#b9becf; cursor:default; }
.bi-card:has([data-report-ranking]) > header { flex-wrap:wrap; }
.bi-card:has([data-report-ranking]) { min-width:0; }
.dashboard-card-display .ranking-controls { align-items:center; }
.dashboard-card-display .ranking-control-menu { z-index:40; }
.bi-card-data { min-height: 160px; padding: 12px; color: var(--muted); font-size: 12px; overflow: auto; }
.custom-dashboard-view { min-height: calc(100vh - 118px); }
.custom-dashboard-view.active { display: flex; flex-direction: column; }
main:has(> .custom-dashboard-view.active) { padding-top:10px; }
.custom-dashboard-toolbar { min-height: 46px; margin-bottom: 7px; display: flex; align-items: center; gap: 18px; }
.custom-dashboard-heading { min-width: 0; display: grid; gap: 5px; }
.custom-dashboard-heading h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size:24px; font-weight:500; line-height:38px; color:#212121; }
#custom-dashboard-summary { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
#custom-dashboard-title-edit, #custom-dashboard-title-input {
  box-sizing:border-box; max-width:100%; height:38px; padding:0 4px; border:1px solid transparent;
  border-radius:4px; background:transparent; color:inherit; font:inherit; vertical-align:top;
}
#custom-dashboard-title-edit { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
#custom-dashboard-title-edit:hover:not(:disabled) { background:#d8dae3; }
#custom-dashboard-title-input { width:min(240px,100%); min-width:44px; border-color:#212121; outline:none; box-shadow:none; }
@supports (field-sizing:content) { #custom-dashboard-title-input { width:auto; field-sizing:content; } }
body:has(#custom-dashboard-title-edit[aria-describedby~="app-tooltip"]) .app-tooltip { padding:8px 12px; text-align:left; }
body:has(#custom-dashboard-title-edit[aria-describedby~="app-tooltip"]) .app-tooltip-detail { margin-top:2px; color:#bdbdbd; font-size:14px; line-height:20px; }
.custom-dashboard-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dashboard-toolbar-icon { width:34px; height:34px; padding:0; border:1px solid var(--line); border-radius:4px; background:#fff; color:#43504c; display:grid; place-items:center; cursor:pointer; }
.dashboard-toolbar-icon:focus { background:#f7f9f8; color:var(--green); outline:0; }
.dashboard-toolbar-icon span { font-size:18px; line-height:1; }
.dashboard-toolbar-add { border-color: #2563eb; background: #2563eb; color: #fff; }
.dashboard-toolbar-add:focus { background: #1d4ed8; color: #fff; }
.custom-dashboard-actions .dashboard-toolbar-icon { width:32px; height:32px; flex:0 0 32px; border:0; color:#202241; }
.custom-dashboard-actions .dashboard-toolbar-icon svg { width:16px; height:16px; }
.custom-dashboard-actions .dashboard-toolbar-icon:disabled { color:#b9becf; cursor:default; }
.custom-dashboard-actions .dashboard-toolbar-icon:not(:disabled):is(:hover,:focus-visible) { background:#fff; color:#747c94; box-shadow:none; }
.custom-dashboard-actions .dashboard-toolbar-icon:not(:disabled):active { background:#f2f3f8; color:#202241; box-shadow:none; }
.custom-dashboard-actions .dashboard-toolbar-add { margin-inline-start:16px; background:#1e76f0; color:#fff; }
.custom-dashboard-actions .dashboard-toolbar-add:not(:disabled):is(:hover,:focus-visible,[aria-expanded="true"]) { background:#3583ef; color:#fff; box-shadow:none; }
.custom-dashboard-actions .dashboard-toolbar-add:not(:disabled):active { background:#185ec0; color:#fff; box-shadow:none; }
.custom-dashboard-view .bi-canvas { flex: 1; min-height: 320px; padding: 0; background: transparent; }
.custom-dashboard-view .bi-canvas > .empty-state { grid-column: 1 / -1; background: transparent; border: 0; }
.custom-dashboard-view .bi-canvas:has(> .dashboard-empty-add) { background: #fff; }
.dashboard-empty-add {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #303030;
  text-align: center;
}
.dashboard-empty-illustration {
  display:block; width:min(420px,100%); aspect-ratio:420 / 280; margin-bottom:18px;
  background:center / contain no-repeat url("/static/dashboard-empty.png");
}
.dashboard-empty-add p { margin: 0 0 24px; font-size: 16px; font-weight: 500; line-height: 24px; }
.dashboard-empty-add .dashboard-empty-add-button {
  flex: 0 0 32px;
  min-width: 108px;
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  background: #1e76f0;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
}
.dashboard-empty-add .dashboard-empty-add-button:is(:hover,:focus-visible,[aria-expanded="true"]) { background:#3583ef; box-shadow:none; }
.dashboard-empty-add .dashboard-empty-add-button:active { background:#185ec0; box-shadow:none; }
.dashboard-empty-add-button span {
  width: 12px;
  height: 12px;
  background: linear-gradient(currentColor,currentColor) center / 12px 1.5px,
    linear-gradient(currentColor,currentColor) center / 1.5px 12px;
  background-repeat: no-repeat;
}
.dashboard-add-menu { position: fixed; z-index: 120; width:108px;padding:4px;border:0;border-radius:4px;background:#fff;box-shadow:0 4px 14px #0a103205,0 10px 20px #0a103208,0 14px 24px #0a10320d; }
.dashboard-add-menu-item { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; height:38px;padding:8px;border:0;border-radius:4px;background:#fff;color:#333;text-align:left;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;cursor:pointer; }
.dashboard-add-menu-item:is(:hover,:focus-visible) { background:#f2f3f8;box-shadow:none; }
.dashboard-add-submenu { position: absolute; top: -7px; right: calc(100% + 6px); display: none; width:105px;padding:4px;border:0;border-radius:4px;background:#fff;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d; }
.dashboard-add-submenu::after { position: absolute; top: 0; bottom: 0; left: 100%; width: 6px; content: ''; }
.dashboard-add-menu-parent:hover > .dashboard-add-submenu, .dashboard-add-saved:hover > .dashboard-add-submenu, .dashboard-add-menu-item:focus-within > .dashboard-add-submenu { display: block; }
@media (max-width: 360px) { .dashboard-add-submenu { top: 100%; right: 0; } }
.dashboard-add-submenu button { display:block;width:100%;height:38px;padding:8px;border:0;border-radius:4px;background:#fff;color:#333;text-align:left;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;cursor:pointer; }
.dashboard-add-submenu button:not(:disabled):is(:hover,:focus-visible) { background:#f2f3f8;box-shadow:none; }
.dashboard-add-menu-empty { display: block; padding: 8px 9px; color: #8a9591; font-size: 12px; white-space: nowrap; }
.saved-reports-dialog { position:fixed; inset:0; z-index:150; display:grid; place-items:center; padding:20px; background:rgba(22,29,32,.42); }
.saved-reports-dialog[hidden] { display:none; }
.saved-reports-panel { width:min(780px,100%); height:min(670px,calc(100dvh - 40px)); display:flex; flex-direction:column; overflow:hidden; background:#fff; border-radius:7px; box-shadow:0 18px 50px rgba(20,31,36,.2); }
.saved-reports-panel > header, .saved-reports-panel > footer { display:flex; align-items:center; justify-content:space-between; flex:none; padding:15px 30px; }
.saved-reports-panel > header h2 { margin:0; font-size:16px; font-weight:600; }
.saved-reports-panel > footer { justify-content:flex-end; gap:12px; border-top:1px solid #e3e6e9; }
.saved-reports-body { display:grid; grid-template-columns:1fr 1fr; min-height:0; flex:1; margin:0 30px 20px; border:1px solid #e1e5e8; border-radius:4px; overflow:hidden; }
.saved-reports-layout, .saved-reports-library { min-width:0; min-height:0; display:flex; flex-direction:column; }
.saved-reports-layout { border-right:1px solid #e1e5e8; }
.saved-reports-section-head { height:48px; flex:none; display:flex; align-items:center; justify-content:space-between; padding:0 20px; font-size:13px; }
.saved-reports-section-head strong { font-weight:500; }
.saved-reports-section-head span { color:#92999d; font-size:12px; }
.saved-reports-selected { flex:1; min-height:250px; overflow:auto; padding:0 5px 16px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:56px; align-content:start; gap:4px; }
.saved-reports-tile { position:relative; min-width:0; display:flex; align-items:center; background:#e8edff; border:0; color:#34404c; font-size:12px; }
.saved-reports-tile[data-size="large"] { grid-column:span 2; }
.saved-reports-tile:is(.is-selected,:hover,:focus-within) { box-shadow:inset 0 0 0 1px #3b82f6; }
.saved-reports-tile > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:0 9px; flex:1; }
.saved-reports-tile > button { position:absolute; inset:0 0 0 auto; display:grid; width:30px; height:100%; padding:0; border:0; border-radius:0; background:#3b82f6; color:#fff; line-height:1; cursor:pointer; place-items:center; opacity:0; pointer-events:none; }
.saved-reports-tile:is(.is-selected,:hover,:focus-within) > button { opacity:1; pointer-events:auto; }
.saved-reports-tile:is(.is-selected,:hover,:focus-within) > span { padding-inline-end:39px; }
@media (hover:none) {
  .saved-reports-tile > button { opacity:1; pointer-events:auto; }
  .saved-reports-tile > span { padding-inline-end:39px; }
}
.saved-reports-size-menu { position:absolute; z-index:2; right:0; top:100%; min-width:80px; padding:4px; background:#fff; box-shadow:0 5px 18px rgba(0,0,0,.17); }
.saved-reports-size-menu button { display:block; width:100%; border:0; background:#fff; padding:8px; text-align:left; font-size:12px; cursor:pointer; }
.saved-reports-size-menu button:not(:disabled):hover { background:#eff6ff; }
.saved-reports-tabs { height:45px; flex:none; display:flex; border-bottom:1px solid #e1e5e8; }
.saved-reports-tabs button { flex:1; border:0; border-bottom-left-radius:0; border-bottom-right-radius:0; background:#fff; color:#737d83; font:inherit; font-size:13px; cursor:pointer; }
.saved-reports-tabs button[aria-selected="true"] { color:#245caa; border-bottom:2px solid #3b82f6; }
.saved-reports-tabs button:focus { outline:none; box-shadow:none; }
.saved-reports-tabs button:focus-visible { text-decoration:underline; text-underline-offset:3px; }
.saved-reports-filters { display:flex; height:48px; flex:none; gap:8px; padding:8px 14px; }
.saved-reports-filters input { min-width:0; flex:1; border:0; font:inherit; font-size:12px; }
.saved-reports-filters select { max-width:110px; border:0; background:#fff; font:inherit; font-size:12px; }
.saved-reports-available { min-height:250px; flex:1; overflow:auto; padding:14px 20px; background:#f6f7f9; }
.saved-reports-option { display:flex; align-items:center; gap:8px; width:100%; min-height:42px; margin-bottom:8px; padding:0 8px; border:1px solid transparent; background:#fff; color:#39444a; font-size:12px; cursor:grab; }
.saved-reports-option:hover { border-color:#b8cce8; }
.saved-reports-option .saved-report-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.saved-reports-option .saved-report-type { color:#899298; white-space:nowrap; }
.saved-reports-option button { visibility:hidden; flex:0 0 26px; display:grid; place-items:center; width:26px; height:26px; padding:0; border:0; border-radius:3px; background:#edf3ff; color:#2563eb; font-size:18px; line-height:1; cursor:pointer; }
.saved-reports-option:hover button, .saved-reports-option button:focus-visible { visibility:visible; }
.saved-reports-empty { grid-column:1 / -1; padding:24px 8px; color:#899298; text-align:center; font-size:12px; }
.saved-reports-panel > .module-error { margin:0 30px 12px; }
@media (max-width:600px) { .saved-reports-dialog { padding:8px; } .saved-reports-panel { height:calc(100dvh - 16px); } .saved-reports-panel > header, .saved-reports-panel > footer { padding:12px 16px; } .saved-reports-body { grid-template-columns:1fr; overflow:auto; margin:0 16px 12px; } .saved-reports-layout { border-right:0; border-bottom:1px solid #e1e5e8; } .saved-reports-selected, .saved-reports-available { min-height:170px; max-height:230px; } }
.custom-dashboard-view .analysis-result-series { margin-bottom: 12px; }
.custom-dashboard-view .analysis-result-series:last-child { margin-bottom: 0; }
.custom-dashboard-view .bi-canvas .bi-card { min-width:0; height:420px; min-height:0; align-self:start; display:grid; grid-template-rows:auto minmax(0,1fr); }
.custom-dashboard-view .bi-canvas .bi-card.report-large { height:1120px; }
.custom-dashboard-view .bi-canvas .bi-card-data { min-width:0; min-height:0; overflow:auto; }
.custom-dashboard-view .bi-card-data .table-wrap { max-height:none; overflow:visible; }
.custom-dashboard-view .bi-card-data .ranking-board { min-width:max(100%,calc(236px + var(--ranking-metric-count) * 196px)); }
@media (max-width: 980px) { .bi-columns { grid-template-columns: 1fr; } .bi-chart-form { grid-template-columns: 1fr 1fr; } .bi-chart-form > div:last-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .bi-canvas { grid-template-columns: 1fr; } .bi-card { grid-column: span 1 !important; } .bi-chart-form { grid-template-columns: 1fr; } }
#project-details-dialog { width: min(520px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 18px 48px rgba(0,0,0,.2); overflow: auto; }
#project-details-dialog::backdrop { background: rgba(18,28,25,.4); }
.create-project-form { margin: 0; padding: 20px; display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; }
.project-avatar-field { display: grid; gap: 8px; }
.project-avatar-title { color: var(--muted); font-size: 12px; }
.project-avatar-controls { display: flex; align-items: flex-start; gap: 20px; }
.project-avatar-controls.drag-over { outline: 2px solid #2563eb; outline-offset: 4px; background: #eff6ff; border-radius: 4px; }
.project-icon-upload { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
#create-project-form #choose-project-icon { width: 64px; height: 64px; flex: 0 0 64px; padding: 0; border: 1px dashed #aebbd0; border-radius: 4px; background: #fff; color: #64748b; font-size: 30px; font-weight: 400; line-height: 1; }
.project-avatar-field .project-icon-preview { flex: 0 0 auto; }
.project-avatar-field #project-icon-preview { width: 64px; height: 64px; flex-basis: 64px; }
.create-project-form > div:first-child, .create-project-form > div:last-child { grid-column: 1 / -1; }
.project-icon-preview { display: flex; align-items: center; gap: 8px; }
.project-icon-preview img, .project-game-icon { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; border-radius: 4px; }
.project-list-identity { display: flex; align-items: center; gap: 10px; }
.project-list-identity > div { min-width: 0; }
.project-list-identity strong, .project-list-identity small { overflow-wrap: anywhere; }
.project-list-identity small { display: block; }
#project-icon-error { color: #b91c1c; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  #create-project-form { grid-template-columns: minmax(0,1fr); }
  .admin-toolbar { flex-wrap: wrap; gap: 12px; }
  .admin-toolbar-actions { flex: 0 0 100%; }
  .admin-toolbar-actions button { white-space: nowrap; }
}
.create-project-form[hidden] { display: none; }
.create-project-form h2 { margin: 0; font-size: 17px; }
.create-project-form p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.create-project-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.create-project-form input { height: 36px; min-width: 0; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; font: inherit; color: var(--ink); }
.create-project-form > div:last-child { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
#create-project-form > div:last-child > button { width: auto; flex: 0 0 auto; }
.create-project-form button { height: 36px; padding: 0 14px; border-color: var(--green); background: var(--green); color: #fff; font-weight: 700; cursor: pointer; }
.create-project-form button.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.admin-projects-panel .table-wrap { max-height: calc(100vh - 210px); }
.admin-projects-panel table { min-width: 760px; }
.admin-projects-panel button { height: 30px; border-color: var(--green); background: var(--green); color: #fff; font-weight: 700; cursor: pointer; }
.permission-actions { display: flex; gap: 8px; }
.project-row-actions { margin-left: auto; display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.admin-projects-panel .project-row-actions button { flex: 0 0 30px; width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border-color: transparent; opacity: 0; pointer-events: none; }
.admin-projects-panel tr:hover .project-row-actions button,
.admin-projects-panel tr:focus-within .project-row-actions button { opacity: 1; pointer-events: auto; }
@media (hover: none) { .admin-projects-panel .project-row-actions button { opacity: 1; pointer-events: auto; } }
.admin-projects-panel button.secondary { background: #fff; color: var(--green); }
.project-access-editor { margin-top: 12px; padding: 18px; }
.project-access-editor .panel-head > button { height: 30px; }
.access-mode { display: flex; gap: 20px; padding: 14px 0; }
.access-mode label { display: flex; align-items: center; gap: 9px; }
.access-mode label { font-size: 16px; }
.access-mode input, .project-member input { width: 18px; height: 18px; flex: 0 0 18px; }
.project-member-options { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 14px 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.project-member { min-height: 68px; padding: 8px 12px; border: 2px solid transparent; border-radius: 8px; cursor: pointer; transition: border-color .15s, background-color .15s; display: flex; align-items: center; gap: 10px; }
.project-member:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.project-member:has(input[data-user-enabled]:checked) { border-color: var(--green); background: var(--green-soft); }
.project-member-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 17px; font-weight: 700; }
.project-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.project-member strong { font-size: 17px; font-weight: 600; color: var(--ink); }
.project-member-admin { cursor: default; }
.project-member-admin input { opacity: .72; }
.member-identity { display: grid; gap: 3px; min-width: 0; white-space: nowrap; overflow: hidden; }
.member-identity small { color: var(--muted); font-size: 12px; }
.manager-intro { margin: 14px 0 0; padding: 14px 16px; border-radius: 8px; background: var(--green-soft); display: grid; gap: 4px; }
.manager-intro span { color: var(--muted); font-size: 13px; }
#project-manager-loading:not([hidden]) { position: static; background: transparent; }
#admin-view-loading:not([hidden]) { position: static; inset: auto; z-index: auto; min-height: calc(100vh - 160px); background: transparent; }
[data-view-panel="admin"].admin-loading > :not(#admin-view-loading) { display: none !important; }
.manager-member-options { margin-top: 16px; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); }
.member-identity strong, .member-identity small { overflow: hidden; text-overflow: ellipsis; }
.manager-status { margin-left: auto; padding: 5px 9px; border-radius: 999px; background: #edf1ef; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.manager-member:has(input:checked) .manager-status { background: var(--green); color: #fff; }
.admin-user { display: grid; grid-template-columns: 34px minmax(150px,1fr); align-items: center; gap: 9px; }
.admin-user > span { width: 34px; aspect-ratio: 1; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; overflow: hidden; color: var(--green); font-weight: 700; }
.admin-user img { width: 100%; height: 100%; object-fit: cover; }
.admin-user div { display: grid; gap: 3px; }
.admin-user small { color: var(--muted); font-size: 11px; }
.admin-access { min-width: 460px; display: grid; grid-template-columns: 80px minmax(240px,1fr) 58px; align-items: center; gap: 10px; }
.account-toggle { display: flex; align-items: center; gap: 5px; }
.account-toggle input, .project-check input { width: 15px; height: 15px; }
.admin-users { display:grid; gap:8px; padding:16px; grid-template-columns:repeat(auto-fit,minmax(360px,1fr)); }
.admin-account { display:grid; grid-template-columns:44px minmax(130px,1fr) auto auto; align-items:center; gap:12px; padding:12px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.admin-account > div { display:grid; gap:3px; min-width:0; }
.admin-account small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; }
.admin-account.is-admin { border: 2px solid var(--primary, #1890ff); }
.admin-account.is-enabled:not(.is-admin) { border: 2px solid var(--green); }
.admin-account:not(.is-admin):not(.is-enabled) { border: 2px solid transparent; }
.admin-user-search { width: 220px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.project-checks { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.project-checks [data-project-options] { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.project-checks [hidden] { display: none; }
.project-check { display: flex; align-items: center; gap: 4px; color: #45534f; }
.all-projects { color: var(--green); font-weight: 700; }
.admin-access button { height: 30px; padding: 0 10px; }
.admin-access button:disabled { border-color: #c8d0cd; background: #e5eae8; color: #89938f; cursor: default; }
#filters[data-admin="true"] { display: none; }

.project-picker { position: fixed; inset: 0; z-index: 100; pointer-events: none; background: transparent; }
.project-picker > section { position: fixed; width: min(300px,calc(100vw - 16px)); max-height: min(420px,calc(100vh - 16px)); box-sizing:border-box; height:420px; display:flex; flex-direction:column; overflow:hidden; padding: 8px; border: 1px solid #e2e8f0; border-radius: 5px; background: #fff; box-shadow: 0 10px 24px rgba(15,23,42,.16); pointer-events: auto; }
.project-picker > section > :not(.project-picker-options) { flex:none; }
.project-picker h2 { margin: 4px 0 6px; font-size: 16px; }
.project-picker p { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.project-picker-options { flex:1; min-height:0; overflow:auto; align-content:start; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.project-picker-option { min-height: 40px; height: 40px; padding: 0 4px; border: 1px solid transparent; border-radius: 4px; background: #fff; display: flex; align-items: center; gap: 4px; text-align: left; }
.project-picker-option.current { border-color: #dbe4f3; background: #f5f8fc; }
.project-picker-option strong { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.project-picker-select { min-width: 0; flex: 1; height: 38px; padding: 0 4px; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; gap: 8px; text-align: left; }
.project-picker-select .project-game-icon { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 4px; }
.project-picker-favorite { width: 28px; min-width: 28px; height: 28px; padding: 0; border: 0; background: transparent; color: #77817e; font-size: 18px; line-height: 1; opacity: 0; }
.project-picker-favorite.active { opacity: 1; color: #c28b00; }
.project-picker-option:hover, .project-picker-option:focus-within { background: #f1f3f7; }
.project-picker-option:hover .project-picker-favorite, .project-picker-option:focus-within .project-picker-favorite { opacity: 1; }
#project-picker-search { width: 100%; height: 32px; min-height: 32px; margin-bottom: 5px; border: 0; border-bottom: 1px solid #e2e8f0; border-radius: 0; padding: 0 6px; font-size: 13px; }
#project-picker-error { color: #b42318; font-size: 12px; padding: 4px; }
@media (hover: none) { .project-picker-favorite { opacity: 1; } }

.dashboard-share-dialog { position:fixed; inset:0; z-index:110; padding:24px; background:rgba(18,28,25,.58); display:grid; place-items:center; }
.dashboard-share-dialog > section { width:min(680px,100%); max-height:min(720px,calc(100vh - 48px)); overflow:auto; padding:22px; border-radius:6px; background:#fff; box-shadow:0 18px 48px rgba(0,0,0,.25); }
.dashboard-share-dialog header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.dashboard-share-dialog h2 { margin:0; font-size:20px; }
.dashboard-share-dialog header span { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.dashboard-share-dialog .dialog-close { width:32px; height:32px; padding:0; border:0; background:transparent; color:var(--muted); font-size:24px; cursor:pointer; }
.dashboard-share-search { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; margin-top:20px; color:var(--muted); font-size:13px; }
.dashboard-share-search input { min-width:0; height:36px; padding:0 10px; border:1px solid var(--line); border-radius:4px; font:inherit; }
.dashboard-share-members { display:grid; margin-top:14px; border-top:1px solid var(--line); }
#dashboard-share-dialog > section, #dashboard-handover-dialog > section, #report-transfer-dialog > section { box-sizing:border-box; height:600px; display:flex; flex-direction:column; }
:is(#dashboard-share-dialog,#dashboard-handover-dialog,#report-transfer-dialog) > section > :not(.dashboard-share-members) { flex:none; }
:is(#dashboard-share-members,#dashboard-handover-users,#report-transfer-users).dashboard-share-members { flex:1; min-height:72px; overflow:auto; align-content:start; }
#dashboard-share-owner { min-height:1em; }
.dashboard-share-member { min-height:58px; display:grid; grid-template-columns:20px 36px minmax(0,1fr) 116px; align-items:center; gap:10px; border-bottom:1px solid var(--line); }
.dashboard-share-member > input { width:17px; height:17px; }
.dashboard-share-member .project-member-avatar { width:36px; height:36px; font-size:14px; }
.dashboard-share-member .member-identity strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.dashboard-share-member select { width:116px; height:32px; border:1px solid var(--line); border-radius:4px; background:#fff; font:inherit; font-size:13px; }
.dashboard-share-member select:disabled { color:#8a9692; background:#f2f4f3; }
.dashboard-share-dialog footer { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.dashboard-share-dialog footer button { min-height:36px; padding:0 14px; border-color:var(--green); background:var(--green); color:#fff; font-weight:700; cursor:pointer; }
.dashboard-share-dialog button.secondary { border-color:var(--line); background:#fff; color:var(--ink); }
@media (max-width:520px) { .dashboard-share-dialog { padding:10px; } .dashboard-share-dialog > section { max-height:calc(100vh - 20px); padding:16px; } .dashboard-share-member { grid-template-columns:20px 32px minmax(0,1fr); padding:8px 0; } .dashboard-share-member select { grid-column:3; width:100%; } }

.dashboard-settings-dialog { position:fixed; inset:0; z-index:112; padding:24px; background:rgba(18,28,25,.58); display:grid; place-items:center; }
.dashboard-settings-dialog > section { width:min(560px,100%); max-height:calc(100vh - 48px); overflow:auto; padding:22px; border-radius:6px; background:#fff; box-shadow:0 18px 48px rgba(0,0,0,.25); }
.dashboard-settings-dialog header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.dashboard-settings-dialog h2 { margin:0; font-size:20px; }
.dashboard-settings-dialog .dialog-close { width:32px; height:32px; padding:0; border:0; background:transparent; color:var(--muted); font-size:24px; cursor:pointer; }
.dashboard-settings-dialog form { display:grid; gap:16px; margin-top:18px; }
.dashboard-settings-dialog form > label, .dashboard-settings-range { display:grid; grid-template-columns:82px minmax(0,1fr); align-items:center; gap:12px; color:#46534f; font-size:13px; }
.dashboard-settings-dialog input[type="text"], .dashboard-settings-dialog input[type="date"], .dashboard-settings-dialog select { height:36px; min-width:0; padding:0 10px; border:1px solid var(--line); border-radius:4px; background:#fff; color:var(--ink); font:inherit; color-scheme:light; }
.dashboard-settings-dialog select { width:112px; }
.dashboard-settings-range > div { min-width:0; display:flex; align-items:center; gap:8px; }
.dashboard-settings-range input { flex:1 1 0; }
.dashboard-settings-dialog fieldset { display:grid; grid-template-columns:82px minmax(0,1fr); align-items:center; gap:12px; min-width:0; margin:0; padding:0; border:0; }
.dashboard-settings-dialog legend { display:block; min-width:82px; padding:0; color:#46534f; font-size:13px; line-height:1.4; white-space:nowrap; writing-mode:horizontal-tb; }
.dashboard-size-options { width:220px; max-width:100%; display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--line); border-radius:4px; overflow:hidden; }
.dashboard-size-options label { position:relative; min-width:0; }
.dashboard-size-options input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; pointer-events:none; }
.dashboard-size-options span { height:34px; display:grid; place-items:center; border-right:1px solid var(--line); background:#fff; color:#53605c; cursor:pointer; font-size:13px; }
.dashboard-size-options label:last-child span { border-right:0; }
.dashboard-size-options input:checked + span { background:var(--green); color:#fff; font-weight:700; }
.dashboard-visualization-options { width:126px; max-width:100%; display:inline-flex; border:1px solid var(--line); border-radius:4px; overflow:hidden; }
.dashboard-visualization-options button { width:42px; height:34px; padding:0; border:0; border-right:1px solid var(--line); background:#fff; color:#596660; cursor:pointer; font-size:18px; line-height:1; }
.dashboard-visualization-options button:last-child { border-right:0; }
.dashboard-visualization-options button.active { background:var(--green); color:#fff; }
.dashboard-settings-dialog .module-error { border:1px solid #e7aaa0; border-radius:4px; }
.dashboard-settings-dialog footer { display:flex; justify-content:flex-end; gap:8px; padding-top:2px; }
.dashboard-settings-dialog footer button { min-height:36px; padding:0 14px; border-color:var(--green); background:var(--green); color:#fff; font-weight:700; cursor:pointer; }
.dashboard-settings-dialog footer button.secondary { border-color:var(--line); background:#fff; color:var(--ink); }
.dashboard-settings-dialog footer button:disabled { cursor:wait; opacity:.65; }
#report-settings-dialog { background:#0005; }
#report-settings-dialog > section { width:min(516px,100%); padding:16px 32px 12px; border-radius:8px; box-shadow:0 0 20px #0a103205,0 14px 40px #0a103208,0 20px 60px #0a10320d; }
#report-settings-dialog header { padding-bottom:16px; border:0; }
#report-settings-dialog h2 { color:#212121; font-size:16px; font-weight:500; line-height:25px; }
#report-settings-dialog .dialog-close { display:grid; place-items:center; width:24px; height:24px; border-radius:4px; color:#333; font-size:20px; line-height:24px; }
#report-settings-dialog form { gap:24px; margin-top:20px; }
#report-settings-dialog :is(form > label,.dashboard-settings-range,.report-settings-option-row) {
  display:grid; align-items:center;
  grid-template-columns:61px minmax(0,1fr); gap:19px; color:#212121; font-size:14px; line-height:22px;
}
#report-settings-dialog :is(input[type=text],select,textarea,.date-range-trigger,.dashboard-select-trigger) {
  border:1px solid #e3e4e5; border-radius:4px; color:#333; font-size:14px; font-weight:400;
}
#report-settings-dialog :is(input[type=text],select,.dashboard-select-trigger) { height:32px; }
#report-settings-dialog input[type=text] { padding:0 8px; }
#report-settings-dialog select { width:auto; max-width:100%; justify-self:start; }
#report-settings-dialog .dashboard-select-trigger { justify-self:start; }
#report-settings-dialog :is(form > label > span:first-child,.dashboard-settings-range > span,.report-settings-option-row > span) { text-align:right; }
#report-settings-dialog textarea { display:block; width:100%; height:78px; padding:5px 8px; font-family:inherit; line-height:22px; resize:vertical; }
#report-settings-dialog .report-settings-notes { align-items:start; }
#report-settings-note-count { display:block; margin-top:4px; color:#7e7f80; text-align:right; }
#report-settings-dialog .dashboard-visualization-options { width:max-content; border-color:#e3e4e5; }
#report-settings-dialog .dashboard-visualization-options button { display:grid; place-items:center; width:31px; height:30px; border-color:#e3e4e5; color:#7e7f80; }
#report-settings-dialog .dashboard-visualization-options button[hidden] { display:none; }
#report-settings-dialog .dashboard-visualization-options button:not(:has(~ button:not([hidden]))) { width:30px; border-right:0; }
#report-settings-dialog .dashboard-visualization-options button:is(:hover,:focus-visible) { background:#f9f9fb; color:#333; }
#report-settings-dialog .dashboard-visualization-options button.active { background:#ebedf3; color:#333; }
#report-settings-dialog .dashboard-visualization-options svg { width:14px; height:14px; }
#report-settings-dialog .dashboard-size-options { display:flex; flex-wrap:wrap; gap:16px; width:auto; border:0; overflow:visible; }
#report-settings-dialog .dashboard-size-options label { display:flex; align-items:center; gap:8px; cursor:pointer; }
#report-settings-dialog .dashboard-size-options input { position:static; width:16px; height:16px; opacity:1; pointer-events:auto; accent-color:#1e76f0; }
#report-settings-dialog .dashboard-size-options span { height:auto; border:0; background:transparent; color:#333; font-size:14px; font-weight:400; }
#report-settings-dialog footer { gap:12px; padding-top:12px; }
#report-settings-dialog footer button { min-height:32px; min-width:60px; padding:0 12px; border:0; border-radius:4px; background:#1e76f0; color:#fff; font-size:14px; font-weight:400; }
#report-settings-dialog footer button.secondary { background:transparent; color:#333; }
#report-settings-dialog footer button:enabled:hover { background:#3583ef; }
#report-settings-dialog footer button:enabled:active { background:#185ec0; }
#report-settings-dialog footer button.secondary:enabled:is(:hover,:focus-visible), #report-settings-dialog .dialog-close:is(:hover,:focus-visible) { background:#f2f3f8; }
#report-settings-dialog footer button.secondary:enabled:active { background:#e9ebf2; }
#report-settings-dialog :is(input[type=text],textarea,.dashboard-select-trigger):is(:focus-visible,[aria-expanded=true]) { outline:0; border-color:#1e76f0; box-shadow:0 0 0 3px #dae9fb; }
#delete-confirm-dialog.confirmation-report-remove > section { width:min(320px,100%); border-radius:8px; }
#delete-confirm-dialog.confirmation-report-remove h2 { font-weight:500; }
#delete-confirm-dialog.confirmation-report-remove footer { margin-top:16px; padding-top:0; border:0; }
#delete-confirm-dialog.confirmation-report-remove footer button { height:32px; min-height:32px; border:0; border-radius:4px; font-size:14px; font-weight:400; }
#delete-confirm-dialog.confirmation-report-remove #delete-confirm-submit { background:#e84d37; }
#delete-confirm-dialog.confirmation-report-remove #delete-confirm-cancel { background:transparent; color:#333; }
@media (max-width:520px) {
  #report-settings-dialog > section { padding:18px 16px 14px; }
  #report-settings-dialog form { gap:16px; }
  #report-settings-dialog :is(form > label,.dashboard-settings-range,.report-settings-option-row) { grid-template-columns:1fr; gap:7px; }
  #report-settings-dialog :is(form > label > span:first-child,.dashboard-settings-range > span,.report-settings-option-row > span) { text-align:left; }
}
@media (max-width:520px) { .dashboard-settings-dialog { padding:10px; } .dashboard-settings-dialog > section { max-height:calc(100vh - 20px); padding:16px; } .dashboard-settings-dialog form { grid-template-columns:1fr; } .dashboard-settings-dialog form > label, .dashboard-settings-range, .dashboard-settings-dialog fieldset { grid-template-columns:1fr; gap:7px; } .dashboard-settings-range > div { display:grid; grid-template-columns:1fr auto 1fr; } .dashboard-settings-dialog select, .dashboard-size-options { width:100%; } .dashboard-settings-dialog footer button { width:auto; } }

.login-page { min-height: 100vh; background: #f1f5f9; }
.login-main { min-height: 100vh; padding: 28px 18px; display: grid; place-items: center; }
.login-panel { width: min(400px,100%); padding: 36px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: center; box-shadow: 0 14px 40px rgba(25,48,42,.08); }
.login-brand-mark { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 20px; display: block; background:center / cover no-repeat url("/static/hoopu-analytics-icon.png"); box-shadow: 0 8px 24px rgba(23,42,61,.16); }
.login-panel h1 { margin: 0; font-size: 24px; }
.login-panel > p { margin: 9px 0 26px; color: var(--muted); }
.login-panel small { display: block; margin-top: 20px; color: #7b8682; line-height: 1.6; }
.feishu-login { min-height: 44px; border: 1px solid #2563eb; border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #1d4ed8; text-decoration: none; font-weight: 700; }
.feishu-login span { width: 24px; aspect-ratio: 1; border-radius: 4px; background: #2563eb; display: grid; place-items: center; color: #fff; }
.login-error { margin-bottom: 16px; padding: 10px; border: 1px solid #f3b7c2; background: #fff1f2; color: var(--danger); font-size: 13px; text-align: left; }

@media (max-width: 1180px) {
  .metrics-seven { grid-template-columns: repeat(4, 1fr); }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .panel-head { align-items: flex-start; }
  .panel-tools { flex-wrap: wrap; }
}

@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { display: flex; overflow-x: auto; padding: 7px; }
  .sidebar-account { min-height: 58px; border-top: 0; border-bottom: 1px solid #3b4643; }
  .nav-item { width: auto; min-width: max-content; border-left: 0; border-bottom: 3px solid transparent; }
  .nav-item.active { border-left: 0; border-bottom-color: var(--yellow); }
  .topbar { align-items: flex-start; flex-direction: column; padding: 16px 18px; }
  .metrics, .metrics-seven { grid-template-columns: repeat(2, 1fr); }
  main { padding: 14px; }
  main:has(> .custom-dashboard-view.active) { padding-top:7px; }
  .panel-head { flex-direction: column; gap: 10px; }
  .panel-title { width: 100%; flex-basis: auto; }
  .panel-tools { width: 100%; justify-content: space-between; }
  .line-chart { overflow-x: auto; }
  .retention-trend { overflow-x: auto; }
  .overview-distribution { grid-template-columns: minmax(0, 1fr); overflow-x: auto; }
  .overview-totals { grid-template-columns: repeat(4, minmax(130px, 1fr)); border-right: 0; border-bottom: 1px solid #edf0ef; padding: 0 0 20px; }
  .overview-trend { min-width: 0; grid-template-columns: minmax(0,1fr); }
  .overview-focus { grid-template-columns: repeat(4,minmax(0,1fr)); border-right: 0; border-bottom: 1px solid #edf0ef; padding: 0 0 18px; }
  .overview-focus time { grid-column: 1/-1; }
  .overview-trend-plot { overflow-x: auto; }
  .overview-trend-plot svg { min-width: 620px; }
  .funnel-row, .bar-row { grid-template-columns: 110px minmax(120px, 1fr) 82px; }
}

@media (max-width: 520px) {
  form { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  form label:nth-child(3) { grid-column: 1 / 2; }
  input, select, form button { width: 100%; }
  .metrics, .metrics-seven { grid-template-columns: 1fr 1fr; }
  .metrics article { min-height: 82px; padding: 12px; }
  .metrics strong { font-size: 20px; }
  .panel-head { padding: 12px 14px; min-height: unset; }
  .module-filter { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .module-filter label { grid-template-columns: 1fr; gap: 4px; }
  .module-filter input { width: 100%; }
  .module-filter button { grid-column: 1 / -1; width: 100%; }
  .panel-tools { align-items: stretch; flex-direction: column; }
  .panel-tools select { max-width: none; }
  .overview-distribution { padding: 18px 14px; }
  .overview-totals { grid-template-columns: 1fr 1fr; gap: 14px; }
  .overview-totals strong { font-size: 20px; }
  .overview-trend { padding: 16px 14px; }
  .overview-focus { grid-template-columns: 1fr 1fr; }
  .view-switch { width: 100%; }
  .view-switch button { flex: 1; min-width: 0; padding: 0 7px; }
  .funnel-row, .bar-row { grid-template-columns: 88px minmax(90px, 1fr) 72px; font-size: 12px; gap: 8px; }
  .pie-layout { padding: 20px 14px; }
}

/* 数数式事件分析编辑器 */
#bi-chart-form.analysis-page { display: flex; width: 100%; align-items: stretch; flex-direction: column; gap: 0; margin: 0; padding: 0; background: transparent; border: 0; }
#bi-editor-loading:not([hidden]) { position: static; min-height: 96px; background: #fff; }
.analysis-layout { min-height: 0; display: grid; grid-template-columns: 300px minmax(552px, 1fr); background: #f6f8f7; }
.analysis-sidebar { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; }
.analysis-sidebar-section { padding: 16px 14px 8px; border-bottom: 1px solid #edf0ef; }
#bi-chart-form .analysis-sidebar-section:not(#bi-analysis-mode-section):not(#bi-analysis-settings-section) { padding-left:calc(14px + 2em); }
.analysis-sidebar-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--ink); font-size: 13px; }
.analysis-sidebar-title .analysis-section-heading { font-size:15.6px; }
.analysis-mode-heading-only { display:flex; align-items:center; min-height:58px; box-sizing:border-box; padding-top:0; padding-bottom:0; }
.analysis-mode-heading-only .analysis-sidebar-title { width:100%; margin-bottom:0; }
#bi-analysis-mode-section > .analysis-sidebar-title { justify-content:center; }
#bi-analysis-mode-title { font-size:20.8px; text-align:center; }
.analysis-sidebar-title .icon-button { width: 24px; height: 24px; }
.analysis-mode-hint { margin: -2px 0 10px; color: #78837f; font-size: 12px; line-height: 1.5; }
.analysis-identity-setting { display: grid; gap: 4px; color: #5e6b66; font-size: 12px; }
.analysis-identity-setting select { width: 100%; height: 32px; min-width: 0; box-sizing: border-box; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.ranking-field-setting { display: flex; align-items: center; gap: 6px; min-height: 32px; color: #47524e; font-size: 13px; white-space: nowrap; }
.ranking-field-setting .analysis-field-trigger { position: relative; min-width: 0; max-width: 132px; height: 30px; padding: 0 24px 0 8px; overflow: hidden; border: 1px solid #d8dfdc; border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; line-height: 28px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.ranking-field-setting .analysis-field-trigger::after { position: absolute; top: 12px; right: 9px; width: 0; height: 0; border-top: 4px solid #7b8581; border-right: 3px solid transparent; border-left: 3px solid transparent; content: ''; }
.analysis-retention-settings { display: grid; gap: 9px; }
.retention-options { display:grid; gap:12px; margin-top:8px; color:var(--ink); }
.analysis-retention-settings .retention-option-toggle { display:grid; justify-items:start; gap:6px; color:var(--muted); font-size:13px; cursor:pointer; }
.retention-options input[role=switch] { appearance:none; width:36px; height:20px; min-height:0; padding:0; margin:0; border:0; border-radius:12px; background:#d9dfe8; cursor:pointer; }
.retention-options input[role=switch]::before { content:''; display:block; width:14px; height:14px; margin:3px; background:#fff; border-radius:50%; }
.retention-options input[role=switch]:checked { background:#2563eb; }
.retention-options input[role=switch]:checked::before { transform:translateX(16px); }
.retention-options-fields { display:grid; min-width:0; gap:7px; }
.retention-option-description, .retention-option-expression > span { color:var(--muted); font-size:13px; }
.retention-option-expression { display:flex; min-width:0; align-items:center; flex-wrap:wrap; gap:6px; }
.retention-option-expression > span { flex:none; }
.retention-display-result { margin-top:3px; font-size:12px; }
.retention-display-result > span { color:var(--muted); }
.retention-subject { display:flex; align-items:center; gap:8px; padding-bottom:5px; min-width:0; color:var(--ink); font-size:14px; }
.retention-subject .retention-setting-trigger { display:inline-flex; align-items:center; justify-content:space-between; gap:10px; width:auto; min-width:62px; font-size:13px; }
.retention-subject .retention-setting-trigger::after { content:''; width:5px; height:5px; border:solid currentColor; border-width:0 1px 1px 0; transform:rotate(45deg) translateY(-2px); }
.retention-subject .retention-setting-trigger[aria-expanded="true"] { border-color:#7ca8f4; }
.retention-subject .retention-setting-trigger[aria-expanded="true"]::after { transform:rotate(225deg); }
.analysis-sidebar-section#bi-analysis-settings-section.retention-settings-section { padding-left:calc(14px + 2em); }
.retention-event-item { display:grid; gap:4px; min-width:0; color:#5e6b66; font-size:12px; }
.analysis-retention-settings [data-retention-name] { justify-self:start; max-width:100%; padding:0; border:0; outline:none; box-shadow:none; background:transparent; color:var(--ink); font:inherit; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.analysis-retention-settings [data-retention-name]:not(:disabled):is(:hover,:focus-visible,:active) { color:#2563eb; outline:none; box-shadow:none; }
.analysis-retention-settings [data-retention-name-input] { width:100%; height:20px; padding:0; border:0; outline:0; box-shadow:none; background:transparent; color:#2563eb; font:inherit; }
.analysis-retention-settings [data-retention-name-input]::placeholder { color:#aeb4bb; }
.analysis-retention-settings [data-retention-editing] [data-edit-retention-event-name] { visibility:hidden; }
.retention-event-controls { display:flex; align-items:center; gap:6px; min-width:0; min-height:34px; }
.retention-event-actions { display:flex; flex:none; gap:4px; margin-left:auto; }
.retention-event-item [data-retention-filters] { min-width:0; }
.retention-event-item .metric-filters-list { margin-top:4px; }
.retention-event-item .analysis-filter-row { flex-wrap:wrap; }
.analysis-retention-settings select[hidden] { display: none; }
.retention-setting-trigger { width: 100%; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.analysis-select-menu { position: fixed; z-index: 150; right: auto; box-sizing: border-box; max-width: none; }
.analysis-select-menu:is([aria-label="分析主体"],.retention-result-mode-menu) {
  --retention-menu-width:128px;
  min-width:min(var(--retention-menu-width), calc(100vw - 16px));
  padding:4px;
}
.analysis-select-menu.retention-result-mode-menu { --retention-menu-width:64px; }
.analysis-select-menu:is([aria-label="分析主体"],.retention-result-mode-menu) button {
  height:40px;
  font-size:14px;
}
.analysis-select-menu:is([aria-label="分析主体"],.retention-result-mode-menu) button[aria-checked="true"] {
  background:#f1f3f6;
  color:var(--ink);
  font-weight:400;
}
.analysis-granularity-menu { min-width:0; }
.analysis-retention-settings label { display: grid; gap: 4px; color: #5e6b66; font-size: 12px; }
.analysis-retention-settings select, .analysis-retention-settings .analysis-field-trigger { width: 100%; height: 32px; min-width: 0; box-sizing: border-box; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; text-align: left; }
.analysis-retention-settings .analysis-field-trigger { padding: 0 8px; cursor: pointer; }
.analysis-retention-settings :is(.retention-event-controls > .analysis-field-trigger, #bi-retention-display-trigger, #bi-retention-display-metric, [data-retention-association-source]) {
  width:fit-content; max-width:min(180px, 100%); flex:0 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.group-field-picker-panel [data-picker-field][aria-current=true] { background:#edf0f6; }
.analysis-retention-settings #bi-retention-display-options .analysis-field-trigger { width:max-content; min-width:44px; max-width:100%; border-color:#cbd5e1; border-radius:4px; color:#334155; padding:0 9px; }
#bi-retention-settings .retention-event-controls > .analysis-field-trigger {
  height:26px; min-width:0; max-width:min(160px,100%); border:1px solid #dcdde0; color:#333; font-size:14px;
}
#bi-retention-settings .retention-event-controls > [data-open-analysis-event-picker]::before {
  display:inline-block; width:14px; height:14px; margin-right:5px; vertical-align:-2px; content:"";
  background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10 13H2.5V3h11v6M6 6h5l-2 2.5V12l-1.5-.8V8.5L6 6Z' fill='none' stroke='black' stroke-width='1.15' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.analysis-sidebar-footer { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px 14px; padding-inline-end:48px; border-top: 1px solid var(--line); background: #fff; }
.analysis-sidebar-footer label { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; }
.information-icon {
  display:inline-block; width:14px; height:14px; flex:none; vertical-align:middle; pointer-events:none;
  background:#7e7f80;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black'%3E%3Ccircle cx='7' cy='7' r='5.25'/%3E%3Cpath d='M7 6.25v3.5'/%3E%3Ccircle cx='7' cy='4.5' r='.6' fill='black' stroke='none'/%3E%3C/svg%3E") center/contain no-repeat;
}
.analysis-approximate-help { display:flex; flex:0 0 14px; cursor:default; }
.analysis-sidebar-footer input { width: 14px; height: 14px; flex: 0 0 14px; margin: 0; padding: 0; }
.analysis-save { flex: 1 1 0; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--green); background: var(--green); color: #fff; font-weight: 700; white-space: nowrap; cursor: pointer; }
/* 侧栏底部：左侧“近似计算”（仅事件分析显示），右侧“计算”按钮。 */
#bi-chart-form #bi-calculate {
  flex:0 0 auto; width:80px; height:32px; margin-inline-start:auto; padding:5px 16px;
  border:0; border-radius:4px; background:#f2f3f8; color:#202241;
  font-size:14px; font-weight:400; white-space:nowrap; cursor:pointer;
}
#bi-chart-form #bi-calculate:enabled:hover { background:#f6f6f9; box-shadow:none; }
#bi-chart-form.retention-analysis-form #bi-calculate:enabled:hover:not(:active) { background:#ebedf3; }
#bi-chart-form #bi-calculate:enabled:active { background:#dfe3ee; }
#bi-chart-form #bi-calculate:disabled { color:#bdbebf; cursor:not-allowed; }
/* 分析操作与结果展示控件分行。 */
.analysis-toolbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.analysis-toolbar-actions > button { flex: 0 0 auto; height: 30px; padding: 0 14px; font-size: 14px; }
.analysis-toolbar-actions > [hidden] { display: none; }
.bi-card-title-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
/* 报表标题悬停只变蓝，不显示下划线和全局悬停阴影。 */
.bi-card-title-link:hover, .bi-card-title-link:focus-visible { color: var(--green); text-decoration: none; box-shadow: none; }
.analysis-save:active, .analysis-save:disabled { border-color: #93b4f5; background: #93b4f5; }
.analysis-main { min-width: 0; width: 100%; max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.analysis-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: flex-end; padding: 0 18px; border-bottom: 1px solid var(--line); background: #fff; }
.analysis-date-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; margin-right: auto; }
.analysis-date-controls select, .analysis-date-controls input { height: 32px; min-width: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.analysis-date-controls select[hidden] { display:none; }
.analysis-granularity-trigger { position:relative; flex:none; min-width:64px; height:32px; padding:0 24px 0 9px; border:1px solid var(--line); border-radius:3px; background:#fff; color:var(--ink); text-align:left; font:inherit; font-size:12px; cursor:pointer; }
.analysis-granularity-trigger::after { position:absolute; top:12px; right:9px; width:0; height:0; border-top:4px solid #64748b; border-right:3px solid transparent; border-left:3px solid transparent; content:''; }
#bi-retention-result-mode-trigger::after {
  top:50%; width:5px; height:5px; border:solid currentColor; border-width:0 1px 1px 0;
  transform:translateY(-70%) rotate(45deg);
}
#bi-retention-result-mode-trigger[aria-expanded="true"]::after { transform:translateY(-30%) rotate(225deg); }
.analysis-granularity-trigger.retention-period-trigger { min-width:56px; font-size:14px; color:#333; }
.retention-period-trigger::after { top:12px; width:5px; height:5px; border:solid currentColor; border-width:0 1px 1px 0; transform:rotate(45deg); }
.retention-period-trigger[aria-expanded=true]::after { top:14px; transform:rotate(225deg); }
.analysis-granularity-trigger[hidden] { display:none; }
.analysis-date-controls input { width: 132px; }
.analysis-date-controls select, .bi-card-date-controls select { -webkit-appearance: none; appearance: none; padding-right: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; cursor: pointer; }
#refresh-data-events:not(:disabled):active,
#bi-report-details-confirm:not(:disabled):active {
  border-color: #93b4f5;
  background: #93b4f5;
}
.analysis-date-controls span { color: var(--muted); font-size: 12px; }
.analysis-viz-switch { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--line); background: #fff; }
.analysis-viz-switch button { width: 34px; height: 30px; padding: 0; border: 0; border-right: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.analysis-viz-switch button:last-child { border-right: 0; }
.analysis-viz-switch button:not([hidden]):not(:has(~ button:not([hidden]))) { border-right: 0; }
.analysis-viz-switch button.active { background: var(--green-soft); color: var(--green); }
.analysis-event-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.analysis-event-bar select { height: 32px; min-width: 145px; padding: 0 8px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.analysis-event-bar select:first-child { min-width: 92px; }
.analysis-event-bar button.secondary { height: 32px; padding: 0 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-size: 12px; }
.analysis-event-bar .analysis-chip-list { flex: 1 1 100%; margin-top: 0; }
.analysis-result { flex: 1; min-height: 260px; overflow: auto; padding: 18px; background: #fff; }
.analysis-result > strong { display: block; margin-bottom: 12px; color: var(--ink); font-size: 13px; }
.analysis-result .table-wrap { max-height: calc(100vh - 300px); }
.ranking-board { min-width: max(100%, 420px); overflow: hidden; border-top: 1px solid #edf0ef; background: #fff; }
.ranking-board-head, .ranking-board-row { display: grid; grid-template-columns: 52px minmax(140px, 1.2fr) repeat(var(--ranking-metric-count), minmax(180px, 1fr)); align-items: center; column-gap: 16px; }
.ranking-board-head { min-height: 38px; padding: 0 14px; border-bottom: 1px solid #edf0ef; color: #84908b; font-size: 12px; }
.ranking-board-head > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-board-row { min-height: 68px; padding: 0 14px; border-bottom: 1px solid #f0f3f2; color: var(--ink); font-size: 13px; }
.ranking-board-row:last-child { border-bottom: 0; }
.ranking-board-rank { display: inline-grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: #f0f3f2; color: #67736e; font-size: 12px; font-weight: 700; }
.ranking-board-rank-1 { background: #f7d66c; color: #674d00; }
.ranking-board-rank-2 { background: #d8e0e4; color: #46545b; }
.ranking-board-rank-3 { background: #e5c19b; color: #694523; }
.ranking-board-identity { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ranking-board-metric { min-width: 0; display: grid; gap: 7px; }
.ranking-board-value { color: #35413d; font-variant-numeric: tabular-nums; font-weight: 600; }
.ranking-board-bar { height: 5px; overflow: hidden; border-radius: 3px; background: #edf1ef; }
.ranking-board-bar span { display: block; height: 100%; border-radius: inherit; background: #38a9db; transition: width .2s ease; }
.ranking-controls { position: relative; display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.ranking-controls[hidden], .ranking-control-menu[hidden] { display: none; }
.ranking-control-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid #dce1e7; border-radius: 4px; color: #485566; background: #fff; cursor: pointer; }
.ranking-control-trigger > span:first-child { font-size: 20px; }
.ranking-controls > .ranking-control-trigger { flex: 0 0 auto; width: auto; white-space: nowrap; font-size: 14px; }
.ranking-display-label { align-self: center; color: #485566; font-size: 14px; white-space: nowrap; }
.ranking-controls > .ranking-limit-trigger { gap: 8px; font-weight: 400; }
.ranking-limit-trigger::after { content: ''; width: 6px; height: 6px; margin-top: -3px; border-right: 1px solid #84908b; border-bottom: 1px solid #84908b; transform: rotate(45deg); }
.ranking-control-menu { position: absolute; top: 38px; right: 0; z-index: 30; width: 184px; padding: 6px; border: 1px solid #e0e4ea; border-radius: 6px; background: #fff; color: #354154; box-shadow: 0 6px 20px #1724381a; color-scheme: light; }
.ranking-control-menu > button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 4px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.ranking-control-menu button[aria-pressed="true"] { background: #eaf4ff; color: #2277bb; }
.ranking-control-menu label { display: block; padding: 9px 12px 5px; font-size: 12px; }
.ranking-custom { display: flex; gap: 6px; padding: 4px 6px 6px; }
.ranking-custom input { width: 0; min-width: 0; flex: 1; height: 32px; border: 1px solid #dce1e7; border-radius: 4px; padding: 0 6px; }
.ranking-custom button { width: 32px; height: 32px; border: 1px solid #dce1e7; border-radius: 4px; background: #fff; color: #2277bb; cursor: pointer; }
.ranking-board-empty { color: #a2aba7; }
.analysis-result-series + .analysis-result-series { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.analysis-result-series > strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 13px; }
.analysis-empty { flex: 1; min-height: 320px; display: grid; place-items: center; padding: 30px; color: var(--muted); background: #fff; font-size: 13px; }
/* 点击计算后结果区中心显示旋转加载动画，占满结果区且不覆盖顶部工具栏；id 选择器覆盖 .data-loading 的绝对定位。 */
#analysis-loading:not([hidden]) { position: static; inset: auto; z-index: auto; flex: 1; min-height: 320px; background: #fff; }
.analysis-empty strong { font-weight: 400; }
.analysis-page > .module-error { margin: 10px 18px 0; }
.bi-field-picker { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.bi-field-picker[hidden] { display: none; }
.bi-field-picker-panel { position: fixed; max-height: min(520px, calc(100vh - 16px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d9dfdd; border-radius: 5px; background: #fff; box-shadow: 0 12px 32px rgba(28,47,42,.2); pointer-events: auto; }
.bi-field-picker-head { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 12px; border-bottom: 1px solid #e8ecea; color: var(--ink); font-size: 13px; }
.bi-field-picker:has(.metric-editor-popover) .bi-field-picker-head,
.retention-analysis-form .event-picker-panel .bi-field-picker-head,
.funnel-analysis-form :is(.event-picker-panel,.funnel-step-field-picker) .bi-field-picker-head { display:none; }
.bi-field-picker-head .icon-button { width: 26px; height: 26px; }
.bi-field-picker-tabs { display: flex; gap: 0; min-height: 46px; padding: 0 10px 8px; box-sizing: border-box; border-bottom: 1px solid #e8ecea; overflow-x: auto; }
.bi-field-picker-tabs button { position: relative; height: 38px; flex: 0 0 auto; padding: 0 9px; border: 0; background: transparent; color: #64748b; cursor: pointer; font: inherit; font-size: 12px; }
.bi-field-picker-tabs button.active { color: var(--ink); font-weight: 700; }
.bi-field-picker-tabs button.active::after { position: absolute; right: 8px; bottom: -1px; left: 8px; height: 2px; background: #2563eb; content: ''; }
.bi-field-picker-tools { padding: 9px 12px 7px; }
.bi-field-picker-tools input { width: 100%; height: 30px; box-sizing: border-box; padding: 0 9px; border: 1px solid #d8dfdc; border-radius: 3px; color: var(--ink); font: inherit; font-size: 12px; }
.bi-field-picker-content { min-height: 80px; overflow: auto; padding: 0 9px 10px; }
.ranking-field-picker .bi-field-picker-panel { height:520px; }
.ranking-field-picker :is(.bi-field-picker-head,.bi-field-picker-tools,.bi-field-picker-tabs) { flex:none; }
.ranking-field-picker .bi-field-picker-content { flex:1; min-height:0; }
/* 事件选择弹窗顶部有搜索框，整体加高 46px，保持列表可视行数不变。 */
.bi-field-picker-panel.event-picker-panel { height: min(452px, calc(100vh - 16px)); }
.bi-field-picker-content.event-picker-content { flex: 1; min-height: 0; padding: 0; overflow: hidden; }
.event-picker-content > .event-picker-search-result { height: 100%; box-sizing: border-box; border-top: 1px solid #e8ecea; }
.event-picker-layout { display: grid; grid-template-columns: 94px minmax(0, 1fr); min-height: 0; height: 100%; }
.event-picker-navigation { display: grid; align-content: start; gap: 2px; padding: 8px 0; border-right: 1px solid #e8ecea; background: #fff; }
.event-picker-navigation button { min-height: 34px; padding: 0 8px; border: 0; border-left: 2px solid transparent; background: #fff; color: #4c5854; text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.event-picker-navigation button.active { background: #f4f8ff; color: #2563eb; font-weight: 700; }
.event-picker-navigation button:focus { outline: none; box-shadow: none; }
.event-picker-navigation button:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.event-picker-list { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 8px 9px 10px; }
.event-picker-list > section { margin-bottom: 8px; }
.event-picker-list > section > strong { display: block; min-height: 30px; padding: 0 7px; color: #6d7874; font-size: 12px; font-weight: 700; line-height: 30px; }
.event-picker-list .bi-field-picker-entry > button:first-child { padding-left: 7px; }
.event-picker-list .bi-field-picker-favorite-empty, .event-picker-list .bi-field-picker-empty { padding-right: 7px; padding-left: 7px; }
.bi-field-picker-group > strong { display: block; padding: 7px 6px 5px; color: #8a9591; font-size: 11px; font-weight: 700; }
.bi-field-picker-favorite-empty { padding: 6px; color: #b0b8b5; font-size: 11px; }
.bi-field-picker-entry { display: flex; align-items: center; min-height: 34px; }
.bi-field-picker-entry > button:first-child { display: flex; align-items: center; justify-content: space-between; flex: 1; min-width: 0; height: 32px; padding: 0 8px; border: 0; border-radius: 3px; background: transparent; color: #334155; text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.bi-field-picker-entry.unavailable > button:first-child { color: #a7afac; cursor: not-allowed; }
.bi-field-picker-entry.unavailable > button:first-child small { color: #c0c7c4; }
.bi-field-picker-entry-label { display: inline-flex; align-items: center; min-width: 0; gap: 6px; }
.bi-field-picker-entry-label i { width: 14px; color: #9aa5a1; font-style: normal; text-align: center; }
.bi-field-picker-entry > button:first-child span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-field-picker-entry > button:first-child small { flex: 0 0 auto; margin-left: 12px; color: #a1aaa7; font-size: 10px; }
.bi-field-picker-favorite { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; color: #adb6b2; cursor: pointer; font-size: 16px; line-height: 1; }
.bi-field-picker-favorite.active { color: #e1a300; }
.bi-field-picker-empty { padding: 32px 12px; color: #9aa39f; text-align: center; font-size: 12px; }
.bi-save-folder-picker { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(27,42,38,.18); }
.bi-save-folder-picker[hidden] { display: none; }
.bi-save-folder-panel { width: min(360px, calc(100vw - 32px)); max-height: min(520px, calc(100vh - 32px)); overflow: hidden; border: 1px solid #d9dfdd; border-radius: 5px; background: #fff; box-shadow: 0 12px 32px rgba(28,47,42,.2); }
.bi-save-folder-panel { display:flex; flex-direction:column; width:min(440px,calc(100vw - 32px)); }
.bi-save-folder-options { flex:1; min-height:100px; }
.save-tree-toolbar { display:flex; align-items:center; gap:8px; padding:12px; flex-wrap:wrap; }
.save-tree-toolbar strong { margin-right:auto; font-size:13px; }
.save-tree-toolbar button, .save-tree-create button { border:1px solid #dce3ee; background:#fff; border-radius:4px; padding:5px 8px; color:#2563eb; cursor:pointer; }
.save-tree-toolbar > button, .save-tree-create > button, .bi-save-folder-actions > button { width:auto; flex:0 0 auto; white-space:nowrap; }
.save-tree-create > button { color:var(--ink); font-weight:400; }
.bi-save-folder-panel > :not(.bi-save-folder-options) { flex-shrink:0; }
.save-tree-toolbar > button { font-size:12px; font-weight:400; color:var(--ink); }
.save-tree-folder-row { display:flex; align-items:center; min-height:34px; border-radius:4px; }
.save-tree-folder-row.active { background:#eff6ff; }
.save-tree-folder-row button { border:0; background:transparent; text-align:left; color:var(--ink); cursor:pointer; padding:6px; font:inherit; font-size:14px; font-weight:400; }
.save-tree-folder-row button:first-child { flex:0 0 26px; width:26px; }
.save-tree-folder-row button:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.save-tree-children { padding-left:18px; }
.save-tree-children[hidden], .save-tree-create[hidden] { display:none; }
.bi-save-folder-option span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bi-save-folder-option:disabled { color:#94a3b8; cursor:not-allowed; }
.save-tree-create { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:10px 12px; border-top:1px solid #e5e7eb; }
.save-tree-create label { width:100%; font-size:12px; }
.save-tree-create input { flex:1; min-width:80px; width:0; height:30px; border:1px solid #cbd5e1; border-radius:4px; padding:0 6px; }
#save-tree-error { margin:0 12px 8px; }
.bi-save-folder-description { margin: 0; padding: 12px 14px 4px; color: #77817e; font-size: 12px; }
.bi-save-folder-options { max-height: 300px; overflow: auto; padding: 6px 12px 10px; }
.bi-save-folder-option { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 34px; margin: 2px 0; padding: 0 9px; border: 1px solid transparent; border-radius: 4px; background: #fff; color: #334155; text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.bi-save-folder-option.active { border-color: #bfdbfe; background: #eff6ff; color: var(--green); }
.bi-save-folder-option small { color: var(--green); font-size: 11px; }
.bi-save-folder-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid #e8ecea; }
.bi-save-folder-actions > button { min-width: 64px; height: 32px; padding: 0 12px; border: 1px solid #c8d3cf; border-radius: 4px; background: #fff; color: #53605c; cursor: pointer; font: inherit; font-size: 12px; }
.bi-save-folder-actions > button.analysis-save { flex: 0 0 auto; border-color: var(--green); background: var(--green); color: #fff; }

.bi-dashboard-name-dialog { position:fixed; inset:0; z-index:111; display:grid; place-items:center; padding:16px; background:rgba(18,28,25,.35); }
.bi-dashboard-name-dialog[hidden] { display:none; }
.name-editor-follow { display:block; z-index:2000; background:transparent; padding:0; pointer-events:none; }
.name-editor-follow > section { position:fixed; pointer-events:auto; overflow:auto; box-sizing:border-box; margin:0; }
.bi-dashboard-name-panel { width:min(464px,100%); overflow:hidden; border-radius:6px; background:#fff; box-shadow:0 18px 48px rgba(0,0,0,.25); }
.bi-dashboard-name-panel header { display:flex; align-items:center; justify-content:space-between; min-height:64px; padding:0 32px; border-bottom:1px solid #e8ecea; }
.bi-dashboard-name-panel h2 { margin:0; font-size:17px; }
.bi-dashboard-name-panel .dialog-close { width:28px; height:28px; padding:0; border:0; background:transparent; color:#334155; font-size:25px; line-height:1; cursor:pointer; }
.bi-dashboard-name-panel form { display:block; margin:0; }
.bi-dashboard-name-panel form > label { display:grid; grid-template-columns:64px minmax(0,1fr); align-items:center; gap:10px; padding:24px 32px 28px; color:#334155; font-size:14px; }
.bi-dashboard-name-panel input { width:100%; min-width:0; height:32px; box-sizing:border-box; padding:0 10px; border:1px solid #d8dfdc; border-radius:4px; color:var(--ink); font:inherit; font-size:13px; }
.bi-report-details-panel form > label { grid-template-columns:64px minmax(0,1fr); }
.bi-report-details-panel textarea { width:100%; min-width:0; min-height:74px; resize:vertical; padding:7px 10px; border:1px solid #d8dfdc; border-radius:4px; color:var(--ink); font:inherit; font-size:14px; line-height:1.5; }
.bi-report-details-panel textarea::placeholder { color:#bdbebf; font-weight:400; opacity:1; }
.bi-dashboard-name-panel .module-error { margin:0 32px 16px; }
.bi-dashboard-name-panel footer { display:flex; justify-content:flex-end; gap:16px; min-height:56px; padding:0 32px; border-top:1px solid #e8ecea; }
.bi-dashboard-name-panel footer button { min-width:64px; height:32px; margin:auto 0; padding:0 12px; border:1px solid #2563eb; border-radius:4px; background:#2563eb; color:#fff; cursor:pointer; font:inherit; font-size:14px; }
.bi-dashboard-name-panel footer button.secondary { border-color:transparent; background:transparent; color:#334155; }
.bi-dashboard-name-panel footer button:disabled { border-color:#93b4f5; background:#93b4f5; cursor:not-allowed; opacity:1; }
#property-name-dialog .bi-dashboard-name-panel h2 { color:#334155; font-size:16px; }
#property-name-dialog { z-index:1401; }
#property-name-dialog .bi-dashboard-name-panel form > label { color:#334155; }
#property-name-dialog .bi-dashboard-name-panel input { color:#172033; }
#property-name-dialog .bi-dashboard-name-panel footer button.secondary { color:#334155; }
@media (max-width:520px) { .bi-dashboard-name-dialog { padding:10px; } .bi-dashboard-name-panel header { padding:0 18px; } .bi-dashboard-name-panel form > label { grid-template-columns:60px minmax(0,1fr); padding:20px 18px 24px; } .bi-dashboard-name-panel .module-error { margin-right:18px; margin-left:18px; } .bi-dashboard-name-panel footer { padding:0 18px; } }

@media (min-width: 801px) {
  .app-shell.analysis-workspace { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .analysis-workspace > .workspace { height: 100vh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .analysis-workspace > .workspace > .topbar { flex: 0 0 auto; }
  .analysis-workspace > .workspace > main { flex: 1 1 auto; min-height: 0; width: 100%; max-width: none; height: auto; margin: 0; display: flex; flex-direction: column; overflow: hidden; }
  .analysis-workspace > .workspace > main > [data-view-panel="bi"].active { flex: 1 1 auto; min-height: 0; }
  #bi-chart-form.analysis-page { height: 100%; min-height: 0; }
  .analysis-layout { flex: 1 1 auto; height: auto; min-height: 0; }
  .analysis-sidebar { min-height: 0; overflow-y: auto; }
  .analysis-main { min-height: 0; }
}

@media (max-width: 800px) {
  .analysis-layout { width: 100%; min-height: 0; margin-left: 0; grid-template-columns: 1fr; }
  .analysis-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .analysis-sidebar-section { padding: 12px 14px 6px; }
  .analysis-sidebar-footer { margin-top: 0; }
  .analysis-toolbar { padding: 12px 14px; }
  .analysis-date-controls input { flex: 1 1 120px; width: auto; }
  .analysis-viz-switch { align-self: flex-end; }
  .analysis-event-bar, .analysis-result { padding-left: 14px; padding-right: 14px; }
  .bi-field-picker-panel { max-height: calc(100vh - 16px); }
}
.tree-root-drop { height: 8px; border: 1px solid transparent; }
[data-tree-drop="inside"] { outline: 2px solid #93c5fd; outline-offset: -2px; background-color: #eff6ff; }
[data-tree-drop="before"] { box-shadow: inset 0 3px #93c5fd; }
[data-tree-drop="after"] { box-shadow: inset 0 -3px #93c5fd; }
[data-tree-touch-dragging] { opacity: .55; }
[data-tree-kind="dashboard"] > .bi-save-folder-option { width: 100%; }

#delete-confirm-dialog > section { width: min(460px,100%); }
#delete-confirm-dialog h2 { font-weight: 400; }
#delete-confirm-dialog #delete-confirm-submit, #folder-action-dialog #folder-action-confirm.folder-danger { min-width: 60px; background: #ef4939; border-color: #ef4939; color: #fff; cursor: pointer; }
#delete-confirm-dialog #delete-confirm-cancel, #folder-action-dialog #folder-action-cancel { min-width: 60px; background: #fff; border: 0; color: #475569; cursor: pointer; }
#delete-confirm-dialog.confirmation-save #delete-confirm-submit { background: #2563eb; border-color: #2563eb; }
#delete-confirm-dialog.confirmation-save #delete-confirm-cancel { border: 1px solid #c8d3cf; border-radius: 4px; }

.app-tooltip { position: fixed; z-index: 10000; box-sizing: border-box; width: max-content; max-width: min(320px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 4px; background: #222; color: #fff; font-size: 14px; font-weight: 400; line-height: 20px; text-align: center; white-space: normal; overflow-wrap: anywhere; pointer-events: none; }
.app-tooltip[hidden] { display: none; }
.app-tooltip-detail { margin-top:4px; font-size:12px; line-height:18px; }
.app-tooltip-chart { width:249px; text-align:left; }
.app-tooltip-chart svg { display:block; width:100%; height:auto; margin-top:6px; border-radius:4px; background:#fff; }
.app-tooltip::after { position: absolute; top: 100%; left: var(--tooltip-arrow-left, 50%); width: 0; height: 0; border: 6px solid transparent; border-top-color: #222; transform: translateX(-50%); content: ''; }
.app-tooltip[data-placement=below]::after { top:auto; bottom:100%; border-top-color:transparent; border-bottom-color:#222; }
body:has(.analysis-approximate-help[aria-describedby~="app-tooltip"]) .app-tooltip { width:250px; padding:8px 12px; background:#212121; line-height:22px; text-align:left; }
body:has(.analysis-approximate-help[aria-describedby~="app-tooltip"]) .app-tooltip::after { border-top-color:#212121; }
body:has(.analysis-approximate-help[aria-describedby~="app-tooltip"]) .app-tooltip[data-placement=below]::after { border-top-color:transparent; border-bottom-color:#212121; }
.app-tooltip-side { width:242px; text-align:left; }
.app-tooltip-side::after { top:var(--tooltip-arrow-top,50%); left:auto; transform:translateY(-50%); border-color:transparent; }
.app-tooltip-side[data-placement="right"]::after { right:100%; border-right-color:#222; }
.app-tooltip-side[data-placement="left"]::after { left:100%; border-left-color:#222; }
body:has(.funnel-title-help[aria-describedby~="app-tooltip"]) .app-tooltip-side { width:216px; padding:8px 12px; background:#222; line-height:22px; }
body:has(.funnel-window-help[aria-describedby~="app-tooltip"]) .app-tooltip-side { width:242px; padding:8px 12px; background:#212121; line-height:22px; }
body:has(.funnel-window-help[aria-describedby~="app-tooltip"]) .app-tooltip-side[data-placement="right"]::after { border-right-color:#212121; }
body:has(.funnel-window-help[aria-describedby~="app-tooltip"]) .app-tooltip-side[data-placement="left"]::after { border-left-color:#212121; }

.sdk-management { border-top: 1px solid var(--line); padding: 16px 0; min-width: 0; }
.sdk-management h2 { font-size: 16px; font-weight: 500; }
.sdk-management .panel-head { padding: 0 0 12px; }
#sdk-config-form { display: block; width: 100%; }
#sdk-config-fields { width: 100%; }
.sdk-management .panel-head { flex-direction: row; align-items: center; margin-bottom: 12px; }
.sdk-management .panel-head > div { display: flex; align-items: center; gap: 10px; }
.sdk-management button:disabled { opacity: .45; cursor: not-allowed; }
#sdk-config-fields { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; max-width: 880px; }
#sdk-config-fields label { display: grid; gap: 8px; font-size: 13px; min-width: 0; }
#sdk-config-fields input, #sdk-config-fields textarea, .sdk-lookup input { width: 100%; min-width: 0; border: 1px solid #c8d3cf; border-radius: 4px; padding: 8px 10px; font: inherit; background: #fff; color: #24342c; }
#sdk-config-fields textarea { resize: vertical; }
#sdk-save { justify-self: start; min-height: 34px; }
.sdk-lookup { display: flex; flex-wrap: nowrap; gap: 8px; max-width: 680px; }
.sdk-lookup input { flex: 1; }
.sdk-lookup button { flex-shrink: 0; width: auto; }
#sdk-lookup-result { padding-top: 12px; overflow-wrap: anywhere; }
#sdk-receipts td { overflow-wrap: anywhere; }
#sdk-refresh { width: 34px; height: 34px; }
@media (max-width: 600px) { #sdk-config-fields { grid-template-columns: minmax(0,1fr); } }

/* 普通控件悬停加深背景；蓝框控件仅显示外圈，保留原有底色。 */
@media (hover: hover) {
  :is(button:not([data-folder-toggle]):not(.tree-dashboard):not(.project-picker-select):not(.bi-card-title-link):not(.metric-display-name):not([data-retention-name]), a, select, input:not([type="checkbox"]):not([type="radio"]):not([data-event-group-search]):not(.metric-display-name-input):not([data-retention-name-input]), .tree-folder-title:not(:has(button:not([data-folder-toggle]):hover)), .tree-dashboard-row:has(> .tree-dashboard:not(:disabled):hover), .bi-list-item:not(:has(button:not(:disabled):hover, a:hover, input:hover, select:hover))):not(:disabled):not([aria-disabled="true"]):not([data-tree-drop]):not(:where(
    .top-nav-item,
    .custom-dashboard-actions .dashboard-toolbar-icon,
    .dashboard-empty-add-button,
    .dashboard-card-icon,
    .dashboard-card-viz,
    .dashboard-card-menu button,
    #report-settings-dialog footer button,
    .analysis-toolbar-actions .analysis-tool-icon,
    #bi-analysis-toolbar #bi-save-chart,
    .dimension-list-search input,
    .dimension-list-create,
    .dimension-create-menu button,
    .personal-tree-search input,
    .personal-tree :is(.tree-folder-title,.tree-dashboard-row),
    .report-destination-tree .save-tree-folder-row > button,
    .report-boards-menu button,
    .report-attach-picker .report-destination-trigger,
    .retention-user-count button,
    .retention-user-list [data-users-profile],
    .retention-users-dialog[data-analysis-type="retention"] :is([data-users-close],.event-result-pagination *,.retention-users-actions button,.activity-profile-options footer button,button[type=submit]),
    .event-detail-value,
    .bi-event-detail [data-event-detail-edit="display_name"],
    .metric-property-detail-head > :is([data-property-edit],[data-global-property-edit="display_name"]),
    .virtual-property-body main a,
    .event-virtual-property-create button,
    .segment-editor :is(.workspace-page-actions button,[data-action="add"]),
    .analysis-model-example a,
    .saved-reports-tabs button,
    .event-picker-navigation button,
    .date-range-trigger,
    [data-activity-date],
    .event-sidebar-toggle,
    .dashboard-add-menu-item,
    .dashboard-add-submenu button,
    #custom-dashboard-title-edit,
    #custom-dashboard-title-input,
    .report-manager-tools [role=tab],
    .report-manager-create-menu button,
    .report-manager-action,
    .global-filter-logic,
    .funnel-analysis-form :is(.retention-subject .retention-setting-trigger,.funnel-step-head .analysis-event-trigger,#bi-add-filter,#bi-add-group,.funnel-user-link),
    .funnel-step-grip,
    .funnel-user-group,
    [data-funnel-settings-close],
    .funnel-step-actions .icon-button,
    .funnel-popover [data-mutate],
    .analysis-filter-operator-menu button,
    .bi-field-picker-tabs button,
    .catalog-directory .catalog-icon,
    .catalog-directory :is(.catalog-manage, [data-create-virtual-property]),
    .catalog-manage-popup button,
    :is(#create-tag,#create-segment,#query-user-profile),
    .user-inspection-filter :is(.analysis-field-trigger,.analysis-filter-operator-trigger),
    :is(#segments-table,#tags-table) :is(.segment-list-actions,.tag-list-actions) button,
    .retention-cycle-menu button:is([aria-pressed=true],[aria-expanded=true]),
    .date-range-presets button[aria-pressed=true],
    .date-range-calendar-choices button[aria-pressed=true],
    .date-range-calendar button:is(.selected,.today)
  )):hover {
    box-shadow: inset 0 0 0 999px rgba(0,0,0,.07);
  }
  tbody tr:not(:has(button:not(:disabled):hover, a:hover, input:hover, select:hover)):not(:where(.segment-members tr:has(summary:hover),.funnel-result-table tr)):hover { box-shadow: inset 0 0 0 999px rgba(0,0,0,.035); }
  :is(.analysis-field-trigger, .analysis-granularity-trigger, .analysis-date-controls select, .analysis-date-controls input, .bi-card-date-controls select, .bi-card-date-controls input, .save-tree-toolbar [data-save-create="dashboard"], #project-switcher, .retention-setting-trigger, .analysis-filter-operator-trigger, .ranking-control-trigger, .feishu-login, .segment-editor button, .segment-editor select, .segment-editor input:not([type="checkbox"]), .segment-editor textarea, .segment-picker button, .segment-picker input):not(:disabled):not([aria-disabled="true"]):not(:where(.funnel-analysis-form :is(.retention-subject .retention-setting-trigger,.funnel-step-head .analysis-event-trigger),.segment-editor :is(.workspace-page-actions button,[data-action="add"]),.user-inspection-filter button)):hover {
    box-shadow: 0 0 0 1px #2563eb, 0 0 0 3px rgba(37,99,235,.12);
  }
}
#bi-chart-form .analysis-metric-row .analysis-metric-trigger[aria-expanded="true"] { border-color:#cbd5e1; outline:0; box-shadow:none; }
#bi-chart-form .analysis-metric-trigger,
#bi-chart-form .analysis-metric-aggregation-trigger { caret-color:transparent; }
/* 日期浮层独立于报表布局，桌面双日历，窄屏纵向排列。 */
/* 日期入口共用边框反馈。紧凑看板卡片使用单独的尺寸。 */
:is(.date-range-trigger,.activity-toolbar [data-activity-date]) {
  display:inline-flex; align-items:center; justify-content:space-between; gap:12px;
  box-sizing:border-box; min-height:32px; height:auto; min-width:0; max-width:100%; padding:0 10px;
  white-space:normal; overflow-wrap:anywhere; text-align:left;
  font:inherit; font-size:14px; font-weight:400; line-height:20px;
  color:#212121; background:#fff; border:1px solid #e3e4e5; border-radius:4px;
}
:is(.date-range-trigger,.activity-toolbar [data-activity-date]):not(:disabled,[aria-disabled="true"]) { cursor:pointer; }
:is(.date-range-trigger,.activity-toolbar [data-activity-date])::after {
  content:""; display:block; flex:none; width:14px; height:14px;
  background:#7e7f80; mask:var(--date-calendar-icon) center / contain no-repeat;
}
.segment-editor [data-action="date"]::after { content:""; display:inline-block; width:14px; height:14px; margin-left:8px; vertical-align:-2px; background:center / 14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23868b94' stroke-width='1.3' stroke-linecap='round'%3E%3Crect x='3' y='4.5' width='14' height='12.5' rx='1.5'/%3E%3Cpath d='M6.5 2.5v4m7-4v4M3 8.5h14'/%3E%3C/svg%3E"); }
:is(.date-range-trigger,.activity-toolbar [data-activity-date]):not(:disabled,[aria-disabled="true"]):hover {
  border-color:var(--date-trigger-hover-border,#3583ef); background-color:#fff; box-shadow:none;
}
:is(.date-range-trigger,.activity-toolbar [data-activity-date]):not(:disabled,[aria-disabled="true"]):is(:focus-visible,[aria-expanded="true"]) {
  border-color:#1e76f0; background-color:#fff;
  box-shadow:3px -3px #dae9fb,-3px 3px #dae9fb,-3px -3px #dae9fb,3px 3px #dae9fb;
}
.date-range-popover { position:fixed; z-index:1500; width:700px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow:auto; border:1px solid #dce1e8; border-radius:6px; background:#fff; color:#263244; box-shadow:0 6px 24px #0002; font:13px/1.5 Arial,sans-serif; letter-spacing:0; }
.date-range-popover * { box-sizing:border-box; letter-spacing:0; }
.date-range-bounded { container-type:inline-size; }
@container (max-width:650px) {
  .date-range-bounded .date-range-main { flex-direction:column; }
  .date-range-bounded .date-range-presets { flex-basis:auto; border-right:0; border-bottom:1px solid #e6e9ee; }
  .date-range-bounded .date-range-calendars { grid-template-columns:1fr; }
  .date-range-bounded .date-range-endpoint + .date-range-endpoint { border-left:0; border-top:1px solid #e6e9ee; }
  .date-range-bounded footer { position:sticky; bottom:0; background:#fff; flex-wrap:wrap; }
}
.date-range-main { display:flex; }
.date-range-result { padding:10px 12px; border-bottom:1px solid #e6e9ee; font-size:16px; text-align:center; overflow-wrap:anywhere; min-width:0; }
.date-range-presets { flex:0 0 190px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:6px 8px; padding:10px 8px; border-right:1px solid #e6e9ee; }
.date-range-popover button { font:inherit; color:inherit; border:1px solid transparent; border-radius:3px; background:transparent; height:30px; padding:3px 8px; }
.date-range-presets { background:#f3f4f6; }
.date-range-presets button { text-align:center; white-space:nowrap; background:#fff; }
.date-range-presets button[data-date-preset="previous_week"] { grid-row:2; grid-column:1; }
.date-range-presets button[data-date-preset="this_week"] { grid-row:2; grid-column:2; }
.date-range-presets button[data-date-preset="previous_month"] { grid-row:3; grid-column:1; }
.date-range-presets button[data-date-preset="this_month"] { grid-row:3; grid-column:2; }
.date-range-presets button[data-date-since] { grid-column:1 / -1; }
.date-range-presets button[aria-pressed=true] { background:#edf4ff; color:#2563eb; }
.date-range-calendars { flex:1; min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.date-range-endpoint { min-width:0; padding:12px; }
.date-range-endpoint + .date-range-endpoint { border-left:1px solid #e6e9ee; }
.date-range-modes { display:flex; align-items:center; gap:8px; white-space:nowrap; font-size:12px; }
.date-range-modes label { display:inline-flex; align-items:center; gap:3px; margin:0; }
.date-range-modes input { width:13px; height:13px; margin:0; accent-color:#2563eb; }
.date-range-main:has([data-date-column="end"] input[data-date-mode="static"]:checked) [data-date-column="start"] label:has(input[data-date-mode="dynamic"]) { display:none; }
.date-range-value { height:48px; display:flex; align-items:center; gap:8px; }
.date-range-value input { width:100%; min-width:0; height:30px; padding:4px 8px; border:1px solid #dce1e8; border-radius:3px; font:inherit; }
.date-range-value span { flex-shrink:0; }
.date-range-month { display:flex; align-items:center; justify-content:space-between; height:38px; }
.date-range-month-label { flex:1; min-width:0; text-align:center; }
.date-range-month [data-date-month] { flex:0 0 30px; padding:0; font-size:22px; }
.date-range-month button.date-range-month-label { margin-inline:4px; }
.date-range-month button.date-range-month-label:hover { background:#f3f4f6; }
.date-range-calendar-choices { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:repeat(3,1fr); align-items:center; gap:4px; height:216px; }
.date-range-calendar-choices button { width:100%; padding-inline:0; }
.date-range-calendar-choices button[aria-pressed=true] { background:#edf4ff; color:#2563eb; }
.date-range-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); grid-template-rows:24px; grid-auto-rows:30px; gap:2px 0; text-align:center; }
.date-range-calendar button { width:100%; height:30px; padding:0; font-size:12px; }
.date-range-calendar button:not(:disabled):not(.today):hover { z-index:1; border-color:#93b4f5 !important; }
.date-range-calendar button:not(:disabled):not(.selected,.today):hover { box-shadow:0 0 0 2px rgba(147,180,245,.35) !important; }
.date-range-calendar .outside { color:#a5acb8; }
.date-range-calendar .in-range { background:#edf4ff; border-radius:0; }
.date-range-calendar .today { position:relative; }
.date-range-calendar .today::after { position:absolute; bottom:3px; left:50%; width:4px; height:4px; border-radius:50%; background:#1677ff; transform:translateX(-50%); content:''; pointer-events:none; }
.date-range-calendar .today.selected::after { background:#b9d5ff; }
.date-range-calendar .selected { background:#2563eb; color:#fff; border-radius:3px; }
.date-range-popover footer { display:flex; align-items:center; justify-content:flex-end; gap:12px; border-top:1px solid #e6e9ee; padding:10px 12px; }
.date-range-popover footer>div { display:flex; gap:8px; flex-shrink:0; }
.date-range-popover footer button { border-color:#dce1e8; min-width:54px; }
.date-range-popover footer .primary { background:#2563eb; border-color:#2563eb; color:#fff; }
.date-range-popover button:disabled { opacity:.4; cursor:default; }
.bi-card-date-controls [data-report-date-picker] {
  --date-trigger-hover-border:#1e76f0;
  flex:0 1 auto; min-height:27px; height:auto; padding:0;
  background:#fff; color:#333; font-size:14px; font-weight:400; border-color:transparent; border-radius:4px;
}
.bi-card-date-controls [data-report-date-picker]::after { content:none; }
.custom-dashboard-actions { flex-wrap:wrap; }
.builtin-date-toolbar { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-bottom:14px; }
@media(max-width:700px) {
  .date-range-main { flex-direction:column; }
  .date-range-presets { flex-basis:auto; grid-template-columns:repeat(2,minmax(0,1fr)); border-right:0; border-bottom:1px solid #e6e9ee; }
  .date-range-presets button { font-size:12px; padding:2px; text-align:center; }
  .date-range-presets button[data-date-since] { grid-column:span 2; }
  .date-range-calendars { grid-template-columns:1fr; }
  .date-range-endpoint + .date-range-endpoint { border-left:0; border-top:1px solid #e6e9ee; }
  .date-range-popover footer { position:sticky; bottom:0; background:#fff; flex-wrap:wrap; }
  .date-range-popover footer>div { margin-left:auto; }
  .custom-dashboard-toolbar { flex-wrap:wrap; gap:8px; }
}

.data-detail-tabs { display:flex; align-items:center; gap:4px; min-height:38px; }
.data-detail-tabs > button { height:auto; border:0; border-radius:0; background:transparent; color:var(--ink); padding:10px 16px; border-bottom:2px solid transparent; cursor:pointer; font-size:14px; font-weight:400; }
.data-detail-tabs > button.active { color:var(--ink); border-bottom-color:var(--green); }
.event-property-search-toolbar { display:flex; justify-content:flex-end; margin-left:auto; padding:0 16px; min-width:0; }
#event-detail-property-search, #property-detail-event-search { width:280px; max-width:100%; height:34px; }
:is(#data-event-search, #event-property-search, #user-property-search, #event-detail-property-search, #property-detail-event-search, #user-property-detail-search) { width:280px; max-width:100%; min-width:0; height:34px; font-size:13px; font-weight:400; color:var(--ink); outline:none; transition:border-color .15s, box-shadow .15s; }
:is(#data-event-search, #event-property-search, #user-property-search, #event-detail-property-search, #property-detail-event-search, #user-property-detail-search)::placeholder { color:#98a0a8; font-size:13px; font-weight:400; opacity:1; }
:is(#data-event-search, #event-property-search, #user-property-search, #event-detail-property-search, #property-detail-event-search, #user-property-detail-search):not(:disabled):hover { border-color:#2563eb; }
:is(#data-event-search, #event-property-search, #user-property-search, #event-detail-property-search, #property-detail-event-search, #user-property-detail-search):not(:disabled):hover { box-shadow:0 0 0 2px rgba(37,99,235,.12); }

.data-updating { min-height:0; height:32px; flex-direction:row; justify-content:flex-end; padding:0 16px; }
.data-updating i { width:16px; height:16px; border-width:2px; }
.panel:has(> .data-loading), #data-event-properties-pane, #data-event-impact-pane { position:relative; }
.data-loading:not(.data-updating):not([hidden]) { position:absolute; inset:64px 0 0; z-index:2; background:#fff; }
.data-loading:not(.data-updating):not([hidden]) ~ .table-wrap { visibility:hidden; }

.data-updating { position:absolute; top:58px; right:0; z-index:3; background:#fff; }
#data-event-properties-pane, #data-event-impact-pane { min-height:480px; }
.data-detail-dialog .data-loading:not(.data-updating):not([hidden]) { inset:42px 0 0; }
.data-detail-dialog .data-loading:not(.data-updating):not([hidden]) ~ .table-wrap { visibility:visible; }
.data-detail-dialog .data-updating { top:44px; }
@media (max-width:600px) {
  .data-detail-tabs { flex-wrap:wrap; }
  #data-event-detail > .data-detail-tabs, #data-property-detail > .data-detail-tabs { padding-bottom:2px; }
  .event-property-search-toolbar { padding:0 4px; }
}

.property-detail-pane { position:relative; min-height:480px; }

/* 事件关联属性为空时，提示居中于表头下的完整内容区。 */
#data-event-detail:has(#data-properties-table tbody > tr:only-child > td.empty):not([hidden]) { display:flex; flex-direction:column; }
#data-event-detail:has(#data-properties-table tbody > tr:only-child > td.empty) > .panel-head,
#data-event-detail:has(#data-properties-table tbody > tr:only-child > td.empty) > .data-detail-tabs { flex-shrink:0; }
#data-event-properties-pane:has(tbody > tr:only-child > td.empty) { flex:1; min-height:0; }
#data-event-properties-pane:has(tbody > tr:only-child > td.empty) > .table-wrap { height:100%; max-height:none; }
#data-properties-table:has(tbody > tr:only-child > td.empty) { height:100%; }
#data-properties-table:has(tbody > tr:only-child > td.empty) thead { height:42px; }
#data-properties-table tbody > tr:only-child > td.empty { border-bottom:0; vertical-align:middle; }

/* 分群和标签共用列设置，列宽随字段移动。 */
:is(#segments-table,#tags-table) { min-width:1200px; table-layout:fixed; font:400 14px/18px var(--reference-body-font); color:#333; }
:is(#segments-table,#tags-table) th { height:48px; background:#fff; color:#212121; font-weight:500; white-space:nowrap; }
:is(#segments-table,#tags-table) th,:is(#segments-table,#tags-table) td { text-align:left; padding:9px 13px; overflow-wrap:anywhere; }
:is(#segments-table,#tags-table) td { height:56px; vertical-align:middle; }
:is(#segments-table,#tags-table) .segment-list-description { min-width:0;max-width:260px;white-space:normal;overflow-wrap:anywhere; }
:is(#segments-table,#tags-table) .segment-list-status { display:block;color:#8a9491;margin-top:4px; }
:is(#segments-table,#tags-table) .segment-list-status:is([data-state="queued"],[data-state="running"])::before { content:""; display:inline-block; width:12px; height:12px; margin-right:4px; vertical-align:-2px; border:2px solid #dbe3ee; border-top-color:#2563eb; border-radius:50%; animation:data-spin .8s linear infinite; }
:is(#segments-table,#tags-table) :is(.segment-list-actions,.tag-list-actions) { display:flex;justify-content:center;flex-shrink:0;gap:6px;visibility:hidden; }
:is(#segments-table .segment-list-actions,#tags-table .tag-list-actions) { visibility:visible; }
:is(#segments-table,#tags-table) tr:hover :is(.segment-list-actions,.tag-list-actions),:is(#segments-table,#tags-table) tr:focus-within :is(.segment-list-actions,.tag-list-actions) { visibility:visible; }
:is(#segments-table,#tags-table) :is(.segment-list-actions,.tag-list-actions) button { display:grid;place-items:center;width:24px;height:24px;padding:4px;border:0;border-radius:4px;background:transparent;color:#333;cursor:pointer; }
:is(#segments-table,#tags-table) :is(.segment-list-actions,.tag-list-actions) button:enabled:is(:hover,:focus-visible,[aria-expanded=true]) { background:#f2f3f8; }
:is(#segments-table,#tags-table) :is(.segment-list-actions,.tag-list-actions) button:enabled:active { background:#e9ebf2; }
:is(#segments-table,#tags-table) :is(.segment-list-actions,.tag-list-actions) button:disabled { color:#b9becf;cursor:not-allowed; }
:is(#segments-table,#tags-table) :is(.segment-list-actions,.tag-list-actions) svg { width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
@media(hover:none) { :is(#segments-table,#tags-table) :is(.segment-list-actions,.tag-list-actions) { visibility:visible; } }

:is(#segments-table,#tags-table) th[data-audience-column="name"] { width:17%; }
:is(#segments-table,#tags-table) th[data-audience-column="display_name"] { width:14.7%; }
:is(#segments-table,#tags-table) th[data-audience-column="subject"] { width:7.3%; }
:is(#segments-table,#tags-table) th[data-audience-column="creator"] { width:7.4%; }
:is(#segments-table,#tags-table) th[data-audience-column="schedule"] { width:8%; }
:is(#segments-table,#tags-table) th[data-audience-column="calculated_at"] { width:18.5%; }
:is(#segments-table,#tags-table) th[data-audience-column="member_count"] { width:4.7%; }
:is(#segments-table,#tags-table) th[data-audience-column="description"] { width:12.4%; }
:is(#segments-table,#tags-table) th[data-audience-column="actions"] { width:10%; }

/* 全站数据表格共用网格与对齐规则，覆盖详情弹窗和各业务表格的局部对齐。 */
table th, table td {
  border:1px solid #dce1e6 !important;
  text-align:center !important;
  vertical-align:middle !important;
}
.retention-matrix .heat-cell strong, .retention-matrix .heat-cell span { text-align:center; }
:is(#segments-table,#tags-table) .segment-list-cell { justify-content:center; }

/* 列宽随内容伸展；宽表由现有表格容器或看板数据区横向滚动。 */
table { table-layout:auto !important; width:max-content !important; min-width:100% !important; max-width:none !important; }
table th, table td { width:auto !important; max-width:none !important; white-space:nowrap !important; overflow-wrap:normal !important; word-break:normal !important; }
.table-wrap, .event-result-table, .segment-members-scroll { min-width:0; max-width:100%; }
:is(#segments-table,#tags-table) .segment-list-description { max-width:none; white-space:nowrap; overflow-wrap:normal; }

/* 标签与分群：文字编辑入口和固定右侧操作列。 */
:is(#segments-table,#tags-table) .audience-metadata:hover .property-edit-button,
:is(#segments-table,#tags-table) .audience-metadata:focus-within .property-edit-button { visibility:visible; }
:is(#segments-table,#tags-table) .property-edit-button:is(:hover,:focus,:active) { outline:none !important; box-shadow:none !important; border:0 !important; background:#dce1e6 !important; }
:is(#segments-table,#tags-table) .property-edit-button:focus-visible { text-decoration:underline; }
:is(#segments-table,#tags-table) :is(th,td):last-child { position:sticky; right:0; z-index:2; background:#fff; box-shadow:-3px 0 5px rgba(0,0,0,.08); }
:is(#segments-table,#tags-table) th:last-child { box-shadow:-3px 0 5px rgba(0,0,0,.08),0 calc(-1 * var(--table-grid-edge,1px)) #dce1e6; }
:is(#segments-table,#tags-table) th:last-child { z-index:3; }

/* 蓝色文字与数字入口统一采用下划线反馈，不影响普通按钮。 */
:is(.link-button, .segment-members summary, .event-result-table summary):not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible, :active) {
  color:#2563eb !important;
  text-decoration:underline !important;
  text-decoration-color:currentColor !important;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
  background:transparent !important;
  border:0 !important;
  outline:none !important;
  box-shadow:none !important;
}

.link-button:is([data-segment-members], [data-detail-members]):not(:disabled):not([aria-disabled="true"]):hover {
  color:#3583ef !important;
  text-decoration:none !important;
}

/* 分析事件选择器的资料卡片，与列表并排，窄屏放到列表下方。 */
.bi-event-detail { position:fixed; pointer-events:auto; box-sizing:border-box; max-height:280px; overflow:auto; border:1px solid #e8e8ef; border-radius:5px; background:white; box-shadow:0 10px 28px #17203322; font-size:13px; color:#303342; }
.bi-event-detail[hidden] { display:none; }
.bi-event-detail header { padding:14px; background:#f7f7fa; }
.event-detail-heading { display:flex; align-items:flex-start; gap:6px; }
.event-detail-heading > button { flex:1; min-width:0; font-weight:600; }
.event-detail-heading small { color:#909098; white-space:nowrap; font-size:12px; }
.bi-event-detail button { border:0; border-radius:3px; background:transparent; color:inherit; text-align:left; cursor:pointer; font:inherit; padding:3px; overflow-wrap:anywhere; }
.bi-event-detail button:enabled:hover { background:#e9e9f0; }
.bi-event-detail button:disabled { cursor:default; opacity:1; }
.event-detail-original { margin:3px 0 0 20px; font-size:11px; overflow-wrap:anywhere; }
.event-detail-description { min-height:112px; padding:14px; }
.event-detail-description > button { white-space:pre-wrap; width:100%; }
.event-detail-editor { flex:1; min-width:0; }
.event-detail-editor label { display:block; font-size:12px; }
.event-detail-editor input { width:100%; box-sizing:border-box; margin:5px 0; min-height:32px; }
.event-detail-editor [data-event-detail-save] { color:#2563eb; margin-right:8px; }
.event-detail-editor [role=alert] { display:block; color:#b42318; font-size:12px; }

/* 指标标题独占一行，事件和计算方式继续沿用原有控件。 */
.analysis-metric-row.named-metric-row { flex-wrap:wrap; row-gap:2px; margin-bottom:14px; }
.metric-display-name { flex:0 0 100%; min-width:0; padding:3px 0; border:0; background:transparent; text-align:left; color:var(--ink); font:inherit; font-size:14.4px; font-weight:400; overflow-wrap:anywhere; cursor:pointer; }
.metric-display-name:not(:disabled):is(:hover, :focus-visible, :active) { color:#2563eb; text-decoration:none; outline:none; box-shadow:none; }
.named-metric-row .metric-display-name-input { flex:0 0 100%; width:100%; min-width:0; box-sizing:border-box; border:0; padding:3px 0; background:transparent; color:#2563eb; font:inherit; font-size:14.4px; font-weight:400; outline:none; box-shadow:none; }
.named-metric-row .metric-display-name-input:focus { outline:none; box-shadow:none; }
.analysis-metric-row .analysis-metric-relation { flex:none; color:var(--ink); font-size:12px; }

/* 事件分析选定属性后，编辑行按“事件 的 属性·计算方式”展示；属性选择仍由同一行状态驱动。 */
.analysis-metric-row[data-metric-has-property] .analysis-metric-trigger { display:none; }
.analysis-metric-row[data-metric-has-property] .analysis-metric-aggregation-trigger { flex:0 1 auto; width:fit-content; min-width:44px; max-width:78px; }
#bi-metrics-list.event-metrics-numbered > .analysis-metric-row :is(.analysis-event-trigger,.analysis-metric-trigger,.analysis-metric-aggregation-trigger) { max-width:117px; }
.metric-editor-popover { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:16px 18px; color:#303342; font-size:14px; line-height:32px; }
.metric-editor-event { max-width:100%; white-space:normal; overflow-wrap:anywhere; font-weight:600; }
.metric-editor-button { width:max-content; min-width:0; max-width:100%; min-height:32px; padding:0 10px; border:1px solid #cbd5e1; border-radius:4px; background:#fff; color:#303342; font:inherit; text-align:left; overflow-wrap:anywhere; cursor:pointer; }
.metric-editor-button:not(:disabled):hover { border-color:#2563eb; }
.metric-editor-button:not(:disabled):hover { box-shadow:0 0 0 2px #dbeafe; }

/* 指标卡片内的属性、计算方式在按钮下方展开，保留卡片上下文。 */
.bi-field-picker-panel:has(.metric-editor-popover), .bi-field-picker-content:has(.metric-editor-popover) { overflow:visible; }
.metric-editor-dropdown { position:fixed; display:flex; flex-direction:column; box-sizing:border-box; overflow:hidden; border:1px solid #e8ecea; border-radius:4px; background:#fff; box-shadow:0 5px 18px rgba(28,47,42,.15); color:#303342; font-size:14px; line-height:1.5; z-index:1; }
.metric-editor-dropdown input { flex:0 0 auto; width:100%; height:36px; min-height:36px; box-sizing:border-box; border:0; border-bottom:1px solid #e8ecea; border-radius:0; padding:0 10px; font:inherit; outline:none; }
.metric-editor-options { min-height:0; overflow:auto; padding:4px 6px; }
.metric-editor-dropdown[data-metric-editor-dropdown="property"] { height:320px; }
.metric-editor-dropdown[data-metric-editor-dropdown="property"] .metric-editor-options { flex:1; }
.metric-editor-option-group + .metric-editor-option-group { border-top:1px solid #e8ecea; margin-top:6px; }
.metric-editor-options :is(strong,.dashboard-select-category) { display:block; padding:8px 6px; color:#8b8e96; font-size:12px; font-weight:400; }
.metric-editor-options .metric-editor-option { display:block; box-sizing:border-box; width:100%; height:auto; min-height:36px; border:0; border-radius:3px; background:transparent; color:inherit; padding:7px 6px; text-align:left; font:inherit; overflow-wrap:anywhere; cursor:pointer; }
.metric-editor-dropdown:not(:has(> input)) .metric-editor-option { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.metric-editor-option:not(:disabled):hover, .metric-editor-option:is(.active,:focus-visible,.is-highlighted) { background:#f3f4f8; }
.metric-property-detail { position:fixed; z-index:2; box-sizing:border-box; border:1px solid #e8ecea; border-radius:4px; background:#fff; color:#303342; box-shadow:0 6px 24px #1c2f2a26; font-size:13px; line-height:1.5; }
.metric-property-detail-head { padding:12px; background:#f7f7fa; overflow-wrap:anywhere; }
.metric-property-detail-head > button { border:0; padding:0; background:transparent; color:inherit; font:inherit; font-weight:600; cursor:pointer; }
:is(.bi-event-detail button[data-event-detail-edit="display_name"],.metric-property-detail-head > button:is([data-property-edit],[data-global-property-edit="display_name"])):enabled:is(:hover,:focus-visible,:active) {
  color:#1e76f0; background:transparent; box-shadow:none;
}
.metric-property-detail-head small { float:right; color:#8b8e96; }
.metric-property-detail-head input { width:100%; box-sizing:border-box; }
.metric-property-detail-description { min-height:80px; padding:16px 12px; overflow-wrap:anywhere; }
.metric-property-detail footer { border-top:1px solid #e8ecea; padding:8px 12px; color:#8b8e96; }
.metric-property-detail { pointer-events:auto; }
.analysis-metric-row.named-metric-row { position:relative; }
#bi-metrics-list.event-metrics-numbered { counter-reset:event-metric; }
#bi-metrics-list.event-metrics-numbered > :is([data-metric-row],[data-formula-row]) { counter-increment:event-metric; padding-left:34px; }
#bi-metrics-list.event-metrics-numbered > :is([data-metric-row],[data-formula-row])::before,
#bi-groups-list > [data-group-row] > [data-common-group-index] { display:grid; place-items:center; width:24px; height:24px; border-radius:3px; background:#23233f; color:#fff; font-size:12px; font-weight:600; line-height:1; }
#bi-groups-list > [data-group-row] > [data-common-group-index] { background:#eceef2; color:#3f4652; }
#bi-metrics-list.event-metrics-numbered > :is([data-metric-row],[data-formula-row])::before { content:counter(event-metric); position:absolute; top:3px; left:0; }
#bi-groups-list { counter-reset:analysis-group; }
#bi-groups-list > [data-group-row] { position:relative; padding-left:34px; counter-increment:analysis-group; }
#bi-groups-list > [data-group-row]::before { content:counter(analysis-group); position:absolute; top:4px; left:0; display:grid; place-items:center; width:24px; height:24px; border-radius:3px; background:#f4f5f8; color:#8b94a3; font-size:12px; line-height:1; }
#bi-groups-list > [data-group-row] > [data-remove-group] { opacity:0; pointer-events:none; }
#bi-groups-list > [data-group-row]:hover > [data-remove-group], #bi-groups-list > [data-group-row]:focus-within > [data-remove-group] { opacity:1; pointer-events:auto; }
.named-metric-row .metric-display-name { padding-right:92px; box-sizing:border-box; }
.metric-hover-actions { position:absolute; right:0; top:0; display:flex; gap:4px; opacity:0; pointer-events:none; background:var(--panel,#fff); }
.analysis-metric-row .metric-hover-actions { top:7px; }
.named-metric-row:hover .metric-hover-actions, .named-metric-row:focus-within .metric-hover-actions { opacity:1; pointer-events:auto; }
.metric-hover-actions button { border:0; background:transparent; color:#737b86; cursor:pointer; width:20px; height:23px; padding:0; font-size:15px; }
.analysis-section-add-label { display:none; }
.analysis-formula-row { display:block; position:relative; padding-bottom:10px; }
.analysis-formula-row .metric-display-name { display:block; width:100%; padding-right:72px; }
.formula-editor { position:relative; width:100%; max-width:412px; }
.formula-editor [data-formula-expression] { box-sizing:border-box; width:100%; height:35px; border:0; border-bottom:1px solid transparent; padding:6px 2px; background:#f8f9fc; color:#283247; font:inherit; font-size:12px; line-height:20px; }
.formula-editor [data-formula-expression]::placeholder { color:#bdc1ca; opacity:1; }
.formula-editor [data-formula-expression]:focus { border-bottom-color:#3b82f6; outline:0; box-shadow:none; }
.formula-keypad { position:relative; z-index:3; display:grid; grid-template-columns:88px 56px 116px; justify-content:space-between; box-sizing:border-box; width:100%; gap:0; margin-top:0; padding:16px; background:#fff; border:1px solid #eceef3; border-top:0; border-radius:0 0 5px 5px; box-shadow:0 8px 24px #1c2c4614; }
.formula-keypad[hidden] { display:none; }
.formula-key-grid { display:grid; grid-auto-rows:24px; column-gap:8px; row-gap:4px; align-content:start; }
.formula-number-grid { grid-template-columns:repeat(3,24px); }
.formula-operator-grid { grid-template-columns:repeat(2,24px); }
.formula-key-grid button,.formula-key-actions button { box-sizing:border-box; height:24px; min-height:24px; border:0; border-radius:3px; padding:0; background:#f1f3f9; color:#232c46; font:500 12px/1.2 Inter,"PingFang SC","Microsoft YaHei",sans-serif; cursor:pointer; }
.formula-number-grid [data-formula-key="."],.formula-operator-grid [data-formula-key="Del"] { grid-column:span 2; }
.formula-key-actions { display:grid; grid-template-rows:32px 14px 32px 14px; row-gap:6px; align-content:start; }
.formula-key-actions button { display:flex; align-items:center; justify-content:center; gap:5px; height:32px; font-size:13px; white-space:nowrap; }
.formula-key-actions button:enabled:is(:hover,:focus-visible,.shortcut-active) { color:#fff; box-shadow:none !important; }
.formula-key-actions [data-insert-formula-event]:enabled:is(:hover,:focus-visible,.shortcut-active) { background:#2563eb; }
.formula-key-actions [data-formula-clear]:enabled:is(:hover,:focus-visible,.shortcut-active) { background:#dc2626; }
.formula-key-actions svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; }
.formula-key-shortcut { color:#c4c7ce; text-align:center; font-size:10px; line-height:14px; }
.formula-operands { display:flex; flex-direction:column; gap:5px; margin-top:6px; }
.formula-operand-row { display:flex; flex-wrap:wrap; gap:4px; margin:0; }
.formula-operand-label { align-self:center; min-width:25px; font-size:12px; color:#334155; }
.formula-operand-row [data-add-metric-filter] { border:0; background:transparent; cursor:pointer; }
.analysis-formula-row .formula-remove { position:absolute; right:0; bottom:5px; }
.metric-filters-list { position:relative; flex:0 0 100%; min-width:0; border-left:1px solid #dbe1e8; padding-left:8px; box-sizing:border-box; }
.metric-filters-list:not(:has(> [data-filter-row], > [data-metric-filter-group])) { display:none; }
.metric-filters-list .analysis-filter-row { display:grid; grid-template-columns:minmax(44px,max-content) minmax(44px,max-content) minmax(40px,90px) 20px 20px; justify-content:start; gap:4px; margin:6px 0; }
.metric-filters-list .analysis-filter-row > input[data-filter-value] { width:90px; min-width:40px; }
.metric-filters-list .analysis-filter-row > [data-add-metric-parallel-filter], .metric-filters-list .analysis-filter-row > [data-remove-filter] { width:20px; min-width:20px; height:24px; margin-left:0; padding:0; border:0; border-radius:0; background:transparent; color:#64748b; font-size:12px; box-shadow:none; }
.metric-filters-list .analysis-filter-row > [data-add-metric-parallel-filter], .metric-filters-list .analysis-filter-row > [data-remove-filter] { opacity:0; }
.metric-filters-list .analysis-filter-row:hover > [data-add-metric-parallel-filter], .metric-filters-list .analysis-filter-row:hover > [data-remove-filter], .metric-filters-list .analysis-filter-row:focus-within > [data-add-metric-parallel-filter], .metric-filters-list .analysis-filter-row:focus-within > [data-remove-filter] { opacity:1; }
.metric-filter-group { position:relative; min-width:0; }
.metric-filter-group.multiple { padding-left:24px; }
.metric-filter-group.multiple::before { content:''; position:absolute; left:10px; top:6px; bottom:6px; border-left:1px solid #d8dee7; }
.metric-filter-group [data-metric-filter-children] { min-width:0; }
.global-filter-group { position:relative; min-width:0; }
.global-filter-group.multiple { padding-left:24px; }
.global-filter-group .global-filter-group.multiple::before { content:''; position:absolute; left:10px; top:6px; bottom:6px; border-left:1px solid #d8dee7; }
#bi-filters-list > .global-filter-group.multiple { padding-left:0; }
#bi-filters-list > .global-filter-group.multiple > [data-toggle-filter-logic] { left:-24px; width:21px; box-sizing:border-box; }
.global-filter-logic { position:absolute; left:0; top:50%; transform:translateY(-50%); min-width:21px; padding:2px; border:1px solid #d0d6df; border-radius:3px; background:#fff; color:#626b77; font:inherit; font-size:12px; cursor:pointer; z-index:1; }
.global-filter-logic:hover, .global-filter-logic:focus-visible { color:#2563eb; }
.global-filter-logic:hover { border-color:#2563eb; }
.metric-filters-list.multiple { padding-left:12px; }
.metric-filters-list > .metric-filter-logic { left:-11px; right:auto; width:21px; box-sizing:border-box; }
.metric-filter-group > [data-toggle-metric-group-logic] { left:0; right:auto; width:21px; box-sizing:border-box; }
.global-filter-group [data-filter-children] { min-width:0; }
#bi-filters-list { position:relative; padding-left:34px; }
#bi-filters-list:has([data-filter-row])::before { content:''; position:absolute; top:6px; bottom:6px; left:20px; border-left:1px solid #d8dee7; pointer-events:none; }
#bi-filters-list .analysis-filter-row { flex-wrap:wrap; gap:4px; }
#bi-filters-list [data-add-parallel-filter] { opacity:0; }
#bi-filters-list .analysis-filter-row:hover [data-add-parallel-filter], #bi-filters-list .analysis-filter-row:focus-within [data-add-parallel-filter] { opacity:1; }
#bi-filters-list .analysis-filter-row { grid-template-columns:minmax(36px,max-content) 50px minmax(32px,54px) 20px 20px; justify-content:start; }
#bi-filters-list .analysis-filter-row > input[data-filter-value] { width:100%; box-sizing:border-box; padding:0 4px; }
#bi-filters-list .analysis-filter-row > .icon-button { width:20px; min-width:20px; padding:0; }
#bi-filters-list .analysis-filter-row > [data-add-parallel-filter] { height:24px; border:0; border-radius:0; background:transparent; color:#64748b; font-size:11.9px; box-shadow:none; }
#bi-filters-list .analysis-filter-row > [data-add-parallel-filter]:hover { box-shadow:0 2px 6px rgba(15,23,42,.18); }
#bi-filters-list .analysis-filter-row > [data-remove-filter] { opacity:0; }
#bi-filters-list .analysis-filter-row:hover > [data-remove-filter], #bi-filters-list .analysis-filter-row:focus-within > [data-remove-filter] { opacity:1; }
/* 分析入口统一放在顶部，原侧栏空间并入条件编辑区。 */
.app-shell.analysis-workspace { grid-template-columns:minmax(0,1fr); }
.analysis-workspace > .sidebar { display:none; }
.analysis-workspace .topbar > .project-switcher { width:214px; min-width:0; flex:0 1 214px; height:44px; min-height:44px; margin:0; }
.analysis-top-menu { position:relative; }
.analysis-top-menu > .top-nav-item { display:flex; align-items:center; height:44px; gap:4px; }
.analysis-top-menu > .top-nav-item svg { width:10px; height:10px; }
.analysis-top-menu > .top-nav-item[aria-expanded="true"] svg { transform:rotate(180deg); }
.analysis-top-options { position:absolute; top:calc(100% + 3px); z-index:30; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 14px; width:366px; max-width:100vw; padding:16px 24px 24px; border-radius:8px; background:#fff; box-shadow:0 14px 20px #0a103205,0 20px 40px #0a103208,0 40px 60px #0a10320d; overflow:auto; }
.analysis-top-options button { display:flex; align-items:center; width:100%; height:48px; gap:12px; padding:4px 8px; border:0; border-radius:4px; background:transparent; color:#333; text-align:left; font-size:16px; font-weight:500; line-height:24px; white-space:nowrap; cursor:pointer; }
@media (max-width:541px) {
  .analysis-top-options { row-gap:12px; padding-inline:16px; }
}
.analysis-top-options button[aria-current="page"] { color:#1e76f0; }
.analysis-top-options button:is(:hover,:focus-visible) { background:#f1f2f5; }
.analysis-top-icon { display:grid; place-items:center; flex:0 0 40px; height:40px; border-radius:4px; background:#f6f6f9; }
.analysis-top-icon svg { width:24px; height:24px; }
.analysis-workspace .analysis-layout { --analysis-left-gutter:26px; position:relative; box-sizing:border-box; width:100%; padding-left:var(--analysis-left-gutter); background:#fff; }
.analysis-workspace .analysis-layout::before { position:absolute; top:0; bottom:0; left:calc(var(--analysis-left-gutter) - 1px); border-left:1px solid var(--line); content:''; pointer-events:none; }
@media (min-width:801px) { .analysis-workspace .analysis-layout { grid-template-columns:calc(min(536px,42vw) - var(--analysis-left-gutter)) minmax(0,1fr); } }
@media (max-width:800px) { .analysis-workspace .analysis-layout { --analysis-left-gutter:16px; } .analysis-workspace .topbar { flex-direction:row; align-items:center; flex-wrap:wrap; gap:8px; padding:8px; } .analysis-workspace .top-nav { order:0; } }
.formula-expression-surface { min-height:35px; display:flex; flex-wrap:wrap; align-items:center; gap:3px; border-bottom:1px solid transparent; padding:3px 0; }
.formula-expression-surface:focus-within { border-bottom-color:#3b82f6; }
.formula-expression-surface > [data-formula-segment] { min-width:8px; max-width:100%; height:28px; flex:0 1 auto; border:0; padding:0; outline:0; box-shadow:none; background:transparent; font-size:12px; }
.formula-expression-surface > [data-formula-segment]:first-child:placeholder-shown:not(:only-child) { width:12px !important; min-width:12px; flex-shrink:0; margin-left:-12px; margin-right:-3px; cursor:text; }
.formula-expression-surface .formula-operand-row { display:inline-flex; flex-wrap:nowrap; flex:0 1 auto; max-width:100%; }
.formula-expression-surface [data-remove-formula-operand] { display:none; }
.formula-event-filter { display:grid; place-items:center; flex:0 0 24px; width:24px; height:26px; padding:3px; border:1px solid transparent; border-radius:3px; background:transparent; color:#77808d; cursor:pointer; }
.formula-operand-row .formula-event-filter:hover { border-color:#2563eb; }
.formula-event-filter.has-conditions { color:#2563eb; background:#eff5ff; }
.formula-event-filter svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.4; }
.formula-filter-popover { position:fixed; z-index:70; padding:16px; border:1px solid #e4e8ed; border-radius:5px; background:#fff; box-shadow:0 8px 28px #17203326; font-size:13px; }
.formula-filter-popover [data-formula-filter-body] { max-height:180px; overflow:auto; }
.formula-filter-popover .analysis-filter-operator-menu { position:fixed; right:auto; top:0; left:0; }
.formula-filter-popover > strong { display:block; margin-bottom:20px; font-weight:400; }
.formula-filter-popover [data-formula-filter-add] { border:0; padding:0; background:transparent; color:#2563eb; cursor:pointer; }
.formula-filter-popover footer { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:20px; }
.formula-filter-popover footer button { border:0; height:26px; padding:0 10px; background:transparent; font:inherit; cursor:pointer; }
.formula-filter-popover [data-formula-filter-done] { background:#2563eb; color:#fff; }
.formula-filter-popover [role=alert] { color:#b91c1c; margin-right:auto; }
.formula-filter-draft .analysis-filter-row { grid-template-columns:minmax(50px,max-content) minmax(44px,max-content) 90px 20px 20px; column-gap:5px; }

/* 全局筛选使用卡片内编辑与按钮下方列表，列表独立滚动。 */
.filter-operator-symbol { display:inline-block; flex:0 0 16px; min-width:16px; margin-right:6px; text-align:center; font-size:12px; }
.analysis-filter-operator-menu button { display:flex; align-items:center; }
#bi-filters-list .analysis-filter-row { grid-template-columns:minmax(36px,max-content) minmax(52px,max-content) 20px 20px; }
#bi-filters-list .analysis-filter-row > input[data-filter-value] { display:none; }
#bi-filters-list .analysis-filter-operator-trigger { display:flex; align-items:center; max-width:180px; width:auto; }
.global-filter-summary-value { max-width:95px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.global-filter-editor { position:fixed; z-index:85; box-sizing:border-box; border:1px solid #d9dfdd; border-radius:5px; background:#fff; box-shadow:0 12px 32px #1c2f2a33; color:#303342; font-size:14px; }
.global-filter-editor[hidden], .global-filter-dropdown[hidden] { display:none; }
.global-filter-editor-main { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:18px; }
.global-filter-editor-main > input { box-sizing:border-box; min-width:0; max-width:100%; width:150px; height:32px; border:1px solid #d9dfdd; border-radius:4px; padding:0 8px; font:inherit; }
.global-filter-editor-main > input[type=datetime-local] { width:235px; }
.global-filter-editor-main .metric-editor-button { display:flex; align-items:center; }
.global-filter-editor-help { padding:12px 18px; border-top:1px solid #eceef1; background:#f8f9fb; color:#8a919d; line-height:1.7; font-size:12px; border-radius:0 0 5px 5px; }
.global-filter-editor-help > span { color:#e7b03c; }
.global-filter-editor [role=alert] { color:#d54c4c; }
.global-filter-dropdown { position:fixed; display:flex; flex-direction:column; box-sizing:border-box; border:1px solid #e8ecea; border-radius:4px; background:#fff; box-shadow:0 5px 18px #1c2f2a26; overflow:hidden; }
.global-filter-dropdown > input { box-sizing:border-box; flex-shrink:0; min-width:0; width:100%; height:36px; border:0; border-bottom:1px solid #e8ecea; padding:0 10px; font:inherit; }
.global-filter-dropdown nav { display:flex; flex-wrap:wrap; gap:3px; flex-shrink:0; padding:5px; border-bottom:1px solid #eceef1; }
.global-filter-dropdown button { display:flex; align-items:center; gap:4px; width:100%; padding:10px 6px; border:0; background:transparent; color:#303342; font:inherit; text-align:left; cursor:pointer; overflow-wrap:anywhere; }
.global-filter-dropdown nav button { width:auto; padding:4px; font-size:11px; }
.global-filter-dropdown button.active, .global-filter-dropdown button:not(:disabled):hover { background:#f0f2f8; }
.global-filter-dropdown button:disabled { opacity:.45; cursor:default; }
.global-filter-dropdown button small { margin-left:auto; color:#8a919d; font-size:10px; }
.global-filter-dropdown [data-global-filter-options] { min-height:0; overflow:auto; padding:4px 6px; }
#bi-filters-list .analysis-filter-operator { min-width:0; max-width:180px; }
#bi-filters-list .analysis-filter-operator-trigger > span:not(.filter-operator-symbol) { min-width:0; overflow:hidden; text-overflow:ellipsis; }

/* 指标与全局筛选统一保留两个可见按钮，值只在条件弹窗中编辑。 */
:is(#bi-filters-list, .metric-filters-list) .analysis-filter-row { grid-template-columns:minmax(36px,max-content) minmax(76px,max-content) 20px 20px; }
:is(#bi-filters-list, .metric-filters-list) .analysis-filter-row > .analysis-field-trigger { max-width:93.6px; }
.metric-filters-list .analysis-filter-row > input[data-filter-value] { display:none; }
:is(#bi-filters-list, .metric-filters-list) .analysis-filter-operator { font-size:12px; min-width:calc(52px + 2em); max-width:180px; }
:is(#bi-filters-list, .metric-filters-list) .analysis-filter-operator-trigger { display:flex; align-items:center; box-sizing:border-box; min-width:calc(52px + 2em); max-width:180px; width:auto; }

/* 双入口沿用既有字段选择器和属性资料卡样式，仅补充布局约束。 */
.global-filter-selector { display:flex; flex-direction:column; }
.global-filter-selector > .global-filter-selector-search,
.global-filter-selector > .global-filter-selector-tabs { flex-shrink:0; }
.global-filter-selector > .global-filter-selector-options { flex:1; }
.global-filter-selector .bi-field-picker-tabs { min-width:0; }
.global-filter-selector .bi-field-picker-content { overflow:auto; min-height:0; }
.global-filter-selector .metric-property-detail { overflow:auto; }
.global-filter-selector .metric-property-detail-description button { padding:0; border:0; background:transparent; color:inherit; font:inherit; text-align:left; white-space:pre-wrap; cursor:pointer; }
.global-filter-selector .metric-property-detail form { display:block; width:auto; padding:12px; }
.global-filter-selector .metric-property-detail form input, .global-filter-selector .metric-property-detail textarea { box-sizing:border-box; width:100%; }
.global-filter-selector .metric-property-detail textarea { min-height:80px; }
.global-filter-selector .metric-property-detail form > div { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
.global-filter-selector .metric-property-detail form button { width:auto; }
.global-filter-selector .metric-property-detail form [role=alert] { color:#b91c1c; }

/* 用户细查使用同一属性/条件编辑器，结果在独立弹窗内分页浏览。 */
.workspace:has([data-view-panel="user-profile"].active) { background:#f0f0f2; }
.workspace:has([data-view-panel="user-profile"].active) > main { max-width:none; }
#user-inspection-title { margin:0 0 16px; color:#212121;font-size:24px;line-height:36px;font-weight:500; }
.user-inspection-card { min-height:calc(100vh - 156px); min-width:0; border-radius:4px; background:#fff; }
.user-inspection-conditions { padding:24px; border-bottom:1px solid #e6e6e8; }
.user-inspection-filter { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.user-inspection-filter > input[data-filter-value] { display:none; }
.user-inspection-filter .analysis-filter-operator { max-width:220px; }
.user-inspection-filter .analysis-field-trigger,
.user-inspection-filter .analysis-filter-operator-trigger { width:auto; max-width:220px; height:32px; padding:0 10px; border:1px solid #e3e4e5; border-radius:4px; background:#fff; color:#333; font:400 14px/26px var(--reference-body-font); }
.user-inspection-filter .analysis-filter-operator-trigger { min-width:76px; text-align:left; font-weight:500; }
.user-inspection-filter :is(.analysis-field-trigger,.analysis-filter-operator-trigger):enabled:hover { border-color:#3583ef; box-shadow:none; }
.user-inspection-filter :is(.analysis-field-trigger,.analysis-filter-operator-trigger):enabled:is(:focus-visible,[aria-expanded=true]) {
  border-color:#1e76f0; box-shadow:3px -3px #dae9fb,-3px 3px #dae9fb,-3px -3px #dae9fb,3px 3px #dae9fb;
}
.user-inspection-filter .analysis-field-trigger::before { content:''; display:inline-block; width:14px; height:14px; margin-right:6px; vertical-align:-2px; background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2344464b'%3E%3Ccircle cx='8' cy='5' r='2.4'/%3E%3Cpath d='M3 13v-1a5 5 0 0 1 10 0v1'/%3E%3C/svg%3E"); }
:is(#create-tag,#create-segment,#query-user-profile) { height:32px; min-width:108px; border:0; border-radius:4px; background:#1e76f0; color:#fff; font:400 14px/22px var(--reference-control-font); }
#query-user-profile { min-width:60px; }
:is(#create-tag,#create-segment,#query-user-profile):enabled:is(:hover,:focus-visible) { background:#3583ef; }
:is(#create-tag,#create-segment,#query-user-profile):enabled:active { background:#185ec0; }
:is(#create-tag,#create-segment,#query-user-profile):disabled { background:#99b4f3;opacity:1;cursor:default; }
#user-profile-table { padding:18px 24px 24px; }
.user-inspection-summary { display:flex; flex-wrap:wrap; align-items:center; gap:12px; min-height:32px; margin-bottom:12px; font-size:14px; }
.user-inspection-summary .link-button, .user-inspection-result-scroll .link-button { color:#1677ff; padding:0; }
.user-inspection-summary [data-inspection-refresh] { margin-left:auto; }
.user-inspection-summary details { position:relative; }
.user-inspection-summary summary { padding:6px 10px; border:1px solid #dedee2; border-radius:4px; cursor:pointer; }
.user-inspection-summary details > div { position:absolute; z-index:3; top:calc(100% + 4px); left:0; width:max-content; max-width:220px; max-height:50vh; overflow:auto; background:#fff; border:1px solid #dedee2; border-radius:4px; box-shadow:0 6px 20px #0002; padding:6px; }
.user-inspection-summary details label { display:block; padding:5px; }
#user-profile-table [role=alert] { color:#a52626; margin-bottom:10px; }
#user-profile-table [role=alert]:empty { display:none; }
.user-inspection-result-scroll { overflow:auto; max-height:65vh; }
.user-inspection-result-scroll table { width:100%; }
.user-inspection-result-scroll th { position:sticky; top:var(--table-grid-edge,1px); background:#f5f5f7; z-index:1; font-weight:500; }
[data-view-panel="user-profile"] .user-inspection-result-scroll :is(th,td) { height:36px; padding:4px 12px; white-space:nowrap; text-align:left; }
.user-inspection-result-scroll td .link-button { height:auto; min-height:24px; }
.user-inspection-result-scroll td.empty { text-align:center; }
[data-view-panel="user-profile"] .user-inspection-result-scroll td.numeric { text-align:right; font-variant-numeric:tabular-nums; }
#user-profile-table footer { display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-top:12px; }
#user-profile-table footer[hidden] { display:none; }
@media(max-width:520px) { .user-inspection-conditions, #user-profile-table { padding:12px; } }


/* 分组字段选择器固定在按钮上方，加载与内容变化不改变锚点。 */
.bi-field-picker-panel.group-field-picker-panel { overflow:visible; }
.group-field-picker-panel .bi-field-picker-head { min-height:34px; flex-shrink:0; }
.group-field-picker-panel .bi-field-picker-tabs { min-height:38px; padding-bottom:4px; flex-shrink:0; }
.group-field-picker-panel .bi-field-picker-tabs button { height:30px; }
.group-field-picker-panel .bi-field-picker-tools { flex-shrink:0; }
.group-field-picker-panel .bi-field-picker-content { flex:1; min-height:0; overflow:auto; }
.group-field-picker-panel.group-field-picker-short { overflow:auto; }
.group-field-picker-short .bi-field-picker-content { flex:0 0 100px; }

/* 报表管理独立保存报表，看板仅维护显示关联。 */
.saved-reports-panel > footer .report-manager-entry { margin-right:auto; }
.personal-space > .report-manager-entry { margin:12px 16px; font-size:13px; }
.report-manager-dialog { position:fixed; inset:0; z-index:151; display:grid; place-items:center; padding:24px; background:#18212c66; }
.report-manager-dialog[hidden] { display:none; }
.report-manager-panel { display:flex; flex-direction:column; width:min(1500px,100%); height:min(780px,calc(100dvh - 48px)); min-height:0; background:#fff; border-radius:7px; box-shadow:0 16px 50px #0003; overflow:hidden; }
.report-manager-panel > header,.report-manager-panel > footer { display:flex; align-items:center; justify-content:space-between; padding:16px 24px; gap:12px; flex-shrink:0; }
.report-manager-panel h2 { margin:0;color:#212121;font-size:24px;line-height:36px;font-weight:500; }
.report-manager-panel > header > div { display:flex; gap:10px; align-items:center; }
.report-manager-tools { display:flex; justify-content:space-between; gap:16px; padding:8px 24px 16px; }
.report-manager-tools [role=tablist] { display:flex; gap:8px; }
.report-manager-tools [role=tab] { border:0; background:transparent; color:#7e7f80; font-weight:400; }
.report-manager-tools [role=tab][aria-selected=true] { background:#f2f3f8;color:#333; }
.report-manager-tools input { width:250px; min-width:0; }
.report-manager-table-wrap { overflow:auto; min-height:0; flex:1; padding:0 24px; }
#report-manager-table { min-width:1100px; font-size:13px; }
#report-manager-table th { position:sticky; top:0; background:#fff; z-index:1; }
.report-manager-note { display:inline-block; max-width:180px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; vertical-align:middle; }
.report-manager-actions { display:flex; gap:6px; justify-content:center; }
.report-manager-action { width:30px; height:30px; padding:0; background:transparent; border:0; font-size:17px; }
.report-manager-action:hover { color:#2563eb; }
.report-manager-action[data-report-delete]:hover { color:#dc2626; }
.report-manager-permission { background:#eef2ff; color:#4067d5; padding:3px 7px; white-space:nowrap; }
#report-manager-status { padding:0 24px; color:#7a818b; }
#report-transfer-loading { position:static; flex:none; justify-content:center; }
.report-transfer-dialog { z-index:152; }
#report-transfer-more { margin-top:8px; }
#delete-confirm-dialog { z-index:1900; }
@media(max-width:600px) { .report-manager-dialog { padding:8px; } .report-manager-panel { height:calc(100dvh - 16px); } .report-manager-panel > header,.report-manager-panel > footer,.report-manager-tools { padding:12px; } .report-manager-tools { flex-wrap:wrap; } .report-manager-tools input { width:100%; } .report-manager-panel > header { align-items:flex-start; } .report-manager-panel > header > div { flex-wrap:wrap; justify-content:flex-end; } .report-manager-table-wrap { padding:0 12px; } }

.report-manager-create { position:relative; }
#report-manager-create { display:flex;align-items:center;justify-content:center;gap:8px;width:108px;height:32px;padding:0 8px;border:0;border-radius:4px;background:#1e76f0;color:#fff;font-size:14px;font-weight:400; }
#report-manager-create > [aria-hidden] { font-size:16px;line-height:1; }
#report-manager-create:not(:disabled):is(:hover,[aria-expanded=true]) { background:#3583ef;box-shadow:none; }
.report-manager-create-menu { position:absolute; top:calc(100% + 6px); left:0; right:auto; z-index:5; width:108px; padding:4px; border:0; border-radius:4px; background:#fff; box-shadow:0 4px 14px #0a103205,0 10px 20px #0a103208,0 14px 24px #0a10320d; }
.report-manager-create-menu[hidden] { display:none; }
.report-manager-create-menu button { display:block;width:100%;height:38px;border:0;border-radius:4px;background:#fff;color:#333;padding:8px;text-align:left;font-size:14px;font-weight:400;line-height:22px; }
.report-manager-create-menu button:not(:disabled):is(:hover,:focus-visible) { background:#f2f3f8;box-shadow:none; }

.dashboard-home-panel { min-height:180px; padding:24px; }
.dashboard-home-panel h2 { margin:0 0 12px; font-size:20px; }
.dashboard-home-panel p { margin:0; color:var(--muted); }
@media(min-width:801px) {
  .sidebar .admin-sidebar-nav { margin-top:auto; flex-shrink:0; }
  .sidebar-account { margin-top:auto; flex-shrink:0; }
  .sidebar .admin-sidebar-nav:not([hidden]) + .sidebar-account { margin-top:0; }
}

/* 结果状态属于已计算快照，草稿编辑继续使用手动计算。 */

/* 分析保存弹窗：看板为可选的展示位置。 */
.bi-report-details-panel { width:min(540px,100%); max-height:calc(100dvh - 32px); overflow:auto; }
.bi-report-details-panel footer { position:sticky; bottom:0; background:white; }
.bi-report-details-panel form > label { padding:16px 32px; }
.report-save-destination { min-width:0; }
#bi-report-board-status { display:block; margin-top:6px; color:#64748b; font-size:12px; overflow-wrap:anywhere; }
#bi-report-board-status:empty { display:none; }
.report-board-create { box-sizing:border-box; width:min(452px,calc(100% - 24px)); max-width:none; max-height:calc(100% - 24px); padding:0; border:0; border-radius:8px; color:#333; overflow:auto; }
.report-board-create::backdrop { background:#0006; }
.report-board-create header { min-height:56px; border:0; }
.report-board-create h2 { font-size:16px; font-weight:500; }
.report-board-create .dialog-close { color:#333; font-size:22px; }
.report-board-fields { box-sizing:border-box; display:grid; grid-template-columns:56px minmax(0,1fr); align-content:start; align-items:center; column-gap:16px; row-gap:16px; min-height:138px; padding:10px 32px 24px; font-size:14px; }
.report-board-fields > label { text-align:right; }
.report-board-error { grid-column:1 / -1; padding:8px 12px; border-radius:4px; background:#fff1f2; color:var(--danger); font-size:13px; overflow-wrap:anywhere; }
.report-board-fields input { font-size:14px; border-color:#dedede; }
.report-board-fields input::placeholder { color:#bdbebf; opacity:1; }
.report-board-folder-control { position:relative; min-width:0; }
.report-board-folder-control svg { position:absolute; z-index:1; inset-inline-start:9px; top:9px; width:14px; height:14px; fill:none; stroke:currentColor; pointer-events:none; }
.report-board-folder-control :is(.dashboard-select-trigger,select) { width:100%; height:32px; padding-inline-start:26px; border-color:#dedede; font-size:14px; }
.report-board-create footer button { min-width:60px; border:0; font-weight:400; }
.report-board-create footer button:not(.secondary) { background:#1e76f0; }
.report-board-create footer button:disabled:not(.secondary) { background:#99b4f3; }
.report-board-create footer button.secondary { color:#333; }
@media(max-width:480px) { .report-board-fields { padding-inline:18px; column-gap:12px; } }
@media (max-width:480px) { .bi-report-details-panel form > label { padding:12px 16px; } }
.bi-report-details-panel form > label { grid-template-columns:74px minmax(0,1fr); }
.bi-report-details-panel form > label > span { white-space:nowrap; }
.bi-report-details-panel footer button { width:auto; }
.bi-saved-text { white-space:nowrap; flex-shrink:0; }
@media (max-width:480px) { .bi-saved-text { white-space:normal; flex-shrink:1; } }

/* 仅由公式键盘输入触发，与插入事件复用250ms反馈；鼠标交互规则保持。 */
.formula-key-grid button:enabled.shortcut-active { background:#2563eb; color:#fff; box-shadow:none !important; }
/* 保存位置复用个人空间目录树，使用页面内白色浮层，避免原生菜单随系统主题变化。 */
.bi-report-details-panel form > .report-save-field { display:grid; grid-template-columns:74px minmax(0,1fr); align-items:start; gap:10px; padding:16px 32px; color:#334155; font-size:14px; }
.report-save-field > span { padding-top:8px; white-space:nowrap; }
.report-destination-control { position:relative; }
.report-destination-control .report-destination-trigger { height:32px; padding-inline-end:30px; font-size:14px; font-weight:400; }
.report-destination-trigger::placeholder { color:#bdbebf; opacity:1; }
.report-destination-control .report-destination-trigger.has-selection { padding-inline-end:52px; }
.report-destination-search-icon { position:absolute; inset-inline-end:9px; top:50%; transform:translateY(-50%); width:14px; height:14px; fill:none; stroke:#bdbebf; stroke-width:1.2; pointer-events:none; }
.report-destination-clear { position:absolute; inset-inline-end:26px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:20px; height:20px; padding:0; border:0; border-radius:3px; background:#fff; color:#64748b; cursor:pointer; }
.report-destination-clear[hidden] { display:none; }
.report-destination-clear:not(:disabled):is(:hover,:focus-visible) { background:#f1f3f5; color:#334155; }
.report-destination-clear svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.5; }
.report-destination-trigger[aria-expanded=true] { border-color:#7ca8f4; outline:2px solid #5084e629; outline-offset:0; }
.report-destination-menu { position:fixed; z-index:180; box-sizing:border-box; display:flex; flex-direction:column; overflow:hidden; border:1px solid #dbe1e8; border-radius:6px; background:#fff; color:var(--ink); box-shadow:0 8px 24px #17203326; }
.report-destination-menu[hidden] { display:none; }
.report-destination-tree { overflow:auto; min-height:40px; padding:6px; }
#bi-report-dashboard-menu { height:300px; }
:is(#bi-report-dashboard-menu,.report-attach-picker) .report-destination-tree { flex:1; min-height:0; }
.report-destination-tree .bi-save-folder-option { font-size:13px; gap:6px; margin:0; padding:6px 8px; }
.report-destination-tree .bi-save-folder-option > span:first-child { display:flex; align-items:center; gap:7px; }
.report-destination-tree .bi-save-folder-option i { flex:0 0 14px; color:#64748b; font-style:normal; }
.report-destination-tree .report-destination-check { flex:0 0 16px; color:#2563eb; text-align:right; }
.report-destination-tree .save-tree-folder-row button { height:32px; font-size:13px; }
@media (hover: hover) {
  .report-destination-tree .save-tree-folder-row:hover { box-shadow:inset 0 0 0 999px rgba(0,0,0,.07); }
}
.report-destination-tree .save-tree-folder-row > [data-report-save-toggle] {
  flex:0 0 14px; width:14px; padding-inline:0; text-align:center;
}
.report-destination-tree .save-tree-folder-row > [data-report-save-folder] { padding-inline-start:0; }
.report-destination-tree .save-tree-children { padding-left:22px; }
.report-destination-empty { padding:20px 8px; color:#94a3b8; font-size:13px; text-align:center; }
.report-destination-add { flex:0 0 auto; height:38px; width:100%; padding:8px 14px; border:0; border-top:1px solid #edf0f3; background:#fff; color:#2563eb; font:inherit; font-size:13px; text-align:left; cursor:pointer; }
@media(max-width:480px) { .bi-report-details-panel form > .report-save-field { padding:12px 16px; } }
.bi-report-details-panel form > .report-save-field[hidden] { display:none; }

/* 卡片留白属于固定外框，数据只在内部单一滚动区移动。 */
.custom-dashboard-view .bi-card-frame { min-width:0; min-height:0; padding:12px 24px; overflow:hidden; display:flex; }
.custom-dashboard-view .bi-canvas .bi-card-frame > .bi-card-data { flex:1; min-width:0; min-height:0; padding:0; overflow:auto; }
/* 看板表头仍随纵向数据滚动；指标／分组只在横向固定。 */
.custom-dashboard-view .event-analysis-table th.event-table-sticky { top:auto; }
/* 固定单元格自行绘制边框，避免合并边框随底层日期列滚走。 */
table { --table-grid-edge:1px; border-collapse:separate !important; border-spacing:0; border:solid #dce1e6; border-width:var(--table-grid-edge) 0 0 var(--table-grid-edge); }
table :is(th,td) { border-width:0 1px 1px 0 !important; }
/* 分组和指标由实际内容撑宽，固定偏移根据真实列宽同步。 */
.event-analysis-table :is(th,td).event-table-sticky { width:auto !important; min-width:100px !important; max-width:none !important; white-space:nowrap; }
/* 报表管理原有横向留白移到滚动容器外，两端滚动后仍然相等。 */
.report-manager-table-wrap { padding:0; margin:0 24px; }
@media(max-width:600px) { .report-manager-table-wrap { padding:0; margin:0 12px; } }
/* 无独立滚动的表格包装层必须随整张表伸展，否则窄屏固定列会被包装层右边界挤回。 */
.custom-dashboard-view .bi-card-data .table-wrap { width:max-content; min-width:100%; max-width:none; }

/* 固定范围由实际列宽与可见区域共同决定，窄区域为数值保留空间。 */
/* 短表按内容高度收起滚动区，横向滚动条紧贴表底；长表仍受卡片剩余高度约束。 */
.custom-dashboard-view .bi-card-frame > .bi-card-data:has(> .table-wrap) { align-self:flex-start; max-height:100%; }

/* 看板二维位置：固定尺寸的原卡片只改坐标，内容区继续独立滚动。 */
.custom-dashboard-view .bi-canvas:has(> [data-bi-card]) { position:relative; display:block; flex:0 0 auto; }
.custom-dashboard-view .bi-canvas > [data-bi-card] { position:absolute; cursor:auto; z-index:1; transition:transform .2s; }
.custom-dashboard-view [data-bi-drag-handle] { cursor:grab; touch-action:none; }
.custom-dashboard-view [data-bi-drag-handle] :is(button,a,input,select,textarea) { touch-action:auto; }
.custom-dashboard-view .bi-canvas[aria-busy="true"] [data-bi-drag-handle] { cursor:wait; }
.bi-grid-placeholder { position:absolute; box-sizing:border-box; border:0; background:#b9becf4d; opacity:.6; z-index:0; pointer-events:none; transition:transform .1s; }
.custom-dashboard-view .bi-canvas > .bi-card-moving { z-index:3; transition:none; will-change:transform; }

.dashboard-handover-help { color:var(--muted); font-size:12px; line-height:1.7; margin:10px 0 18px; }
.dashboard-share-member.dashboard-handover-member { grid-template-columns:20px 36px minmax(0,1fr); }

.custom-dashboard-view [data-bi-drag-handle] :is(.bi-card-heading,.bi-card-actions,.dashboard-card-controls) { cursor:initial; }

.custom-dashboard-view .bi-canvas.bi-grid-initial > [data-bi-card] { transition:none; }

/* 选字由合法区域事件阻止；拖动游标只作用于捕获指针的标题空白，避免大表继承样式重算。 */
.custom-dashboard-view [data-bi-drag-handle] { -webkit-user-select:none; user-select:none; }
.custom-dashboard-view .bi-canvas { overflow-anchor:none; }

.custom-dashboard-view [data-bi-drag-handle].bi-grid-drag-handle-active { cursor:grabbing !important; }

/* 已存报表使用看板同一20列网格，外层滚动、内层承载真实缩略坐标。 */
.saved-reports-selected { display:block; scrollbar-gutter:stable; overflow-anchor:none; }
.saved-reports-grid { position:relative; width:100%; min-height:56px; }
.saved-reports-grid > .saved-reports-tile { position:absolute; top:0; left:0; transition:transform .2s; cursor:grab; touch-action:none; -webkit-user-select:none; user-select:none; }
.saved-reports-grid > .saved-reports-tile.saved-reports-moving { z-index:4; transition:none; will-change:transform; cursor:grabbing; }
.saved-reports-grid > .saved-reports-tile.is-selected { z-index:5; }
.saved-reports-drop-remove { box-shadow:inset 0 0 0 1px #b8cce8; }

.saved-reports-selected { overflow-x:hidden; overflow-y:auto; }
.saved-reports-grid.saved-grid-initial > .saved-reports-tile { transition:none; }

/* 浮层脱离缩略网格裁剪，滚动区继续只承载布局。 */
.saved-reports-drag-preview { position:fixed; top:0; left:0; z-index:6; pointer-events:none; transition:none; will-change:transform; }
.saved-reports-dialog > .saved-reports-size-menu { position:fixed; right:auto; width:max-content; max-width:calc(100vw - 16px); z-index:7; overflow:auto; }
.segment-actions-menu { position:fixed; z-index:1501; min-width:80px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow:auto; padding:4px; border:1px solid #e5e8ed; border-radius:4px; background:#fff; box-shadow:0 6px 20px #17203320; }
.segment-actions-menu button { display:block; width:100%; padding:9px 8px; border:0; border-radius:2px; background:#fff; color:#4c5854; text-align:left; font:inherit; font-size:13px; cursor:pointer; }
.segment-actions-menu button:is(:hover,:focus-visible) { outline:none; box-shadow:none; background:#f0f2f5; }
.segment-actions-menu button:disabled { opacity:.4; cursor:not-allowed; }

/* 仅在已调整的详情页连接桌面端项目区和主导航的底边。 */
@media (min-width:801px) {
  .app-shell:has(#data-segment-detail:not([hidden]),.segment-members,.view.active [data-catalog-detail]:not([hidden]),.view.active .dimension-page-detail) {
    --detail-topbar-height:61px;
  }
  .app-shell:has(#data-segment-detail:not([hidden]),.segment-members,.view.active [data-catalog-detail]:not([hidden]),.view.active .dimension-page-detail) > .workspace > .topbar {
    min-height:var(--detail-topbar-height);
  }
  .app-shell:has(#data-segment-detail:not([hidden]),.segment-members,.view.active [data-catalog-detail]:not([hidden]),.view.active .dimension-page-detail) > .sidebar::after {
    content:''; position:absolute; inset-inline:0 -1px; top:calc(var(--detail-topbar-height) - 1px);
    border-top:1px solid var(--line); pointer-events:none;
  }
}

/* 分群详情在现有顶部栏下通栏展示。 */
.app-shell:has(#data-segment-detail:not([hidden]),.segment-members) {
  --segment-project-column:236px;
  grid-template-columns:var(--segment-project-column) minmax(0,1fr);
}
.app-shell:has(#data-segment-detail:not([hidden]),.segment-members) > .sidebar { height:var(--detail-topbar-height,62px); z-index:21; }
.app-shell:has(#data-segment-detail:not([hidden]),.segment-members) > .sidebar > :not(.project-switcher) { display:none; }
.workspace > main:has(#data-segment-detail:not([hidden]),.segment-members) {
  max-width:none; margin:0 0 0 calc(-1 * var(--segment-project-column)); padding:0;
}
#data-segment-detail:not([hidden]) {
  position:static; display:flex; flex-direction:column; width:100%; max-width:none;
  min-height:calc(100dvh - var(--detail-topbar-height,62px)); margin:0; padding:22px 24px 24px;
  border:0; border-radius:0; box-shadow:none; overflow:visible; background:#f0f0f2; color:#333;
}
.segment-detail-header { display:flex; align-items:center; gap:12px; min-height:32px; margin-bottom:16px; }
.segment-detail-breadcrumb { display:flex; align-items:center; gap:12px; min-width:0; font-size:14px; }
.segment-detail-breadcrumb [aria-hidden] { color:#b7bac2; }
.segment-detail-breadcrumb .link-button { padding:0; height:auto; color:#7e7f80; text-decoration:none; }
.segment-detail-breadcrumb .link-button:hover { color:#1e76f0; }
#segment-detail-actions { display:flex; flex:none; gap:8px; margin-left:auto; }
#segment-detail-actions button {
  display:grid; place-items:center; width:32px; height:32px; padding:7px; border:0; border-radius:4px;
  background:#fff; color:#20243d;
}
#segment-detail-actions button:enabled:is(:hover,:focus-visible) { background:#fff; color:#1e76f0; }
#segment-detail-actions button:disabled { opacity:.4; cursor:default; }
#segment-detail-actions svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.segment-detail-summary,.segment-detail-content { background:#fff; border-radius:4px; min-width:0; }
.segment-detail-summary { padding:18px 24px 24px; margin:0 0 16px; }
.segment-detail-names { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; overflow-wrap:anywhere; }
.segment-detail-names h2 { margin:0; font-size:20px; line-height:28px; font-weight:500; color:#222; }
#segment-detail-subtitle { color:#7e7f80; font-size:16px; }
.segment-detail-badge { display:inline-block; margin:20px 0 24px; padding:1px 4px; background:#e9ebf2; color:#303445; font-size:12px; }
.segment-detail-metadata { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); font-size:14px; }
.segment-detail-metadata dl { margin:0; min-width:0; display:grid; align-content:start; gap:12px; }
.segment-detail-metadata dl > div { display:grid; grid-template-columns:116px minmax(0,1fr); gap:8px; align-items:baseline; min-height:22px; }
.segment-detail-metadata dl:first-child > div { grid-template-columns:60px minmax(0,1fr); }
.segment-detail-metadata dt { color:#7e7f80; }
.segment-detail-metadata dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.segment-detail-metadata [data-detail-members] { height:auto; min-height:0; padding:0; line-height:inherit; }
.segment-detail-content { flex:1; min-height:220px; padding-bottom:24px; }
.segment-detail-content .data-detail-tabs { display:flex; align-items:stretch; gap:32px; min-height:58px; padding:8px 24px 0; border-bottom:1px solid #e1e2e4; }
.segment-detail-content .data-detail-tabs > button { min-height:49px; padding:10px 0 8px; border-bottom-width:4px; color:#7e7f80; white-space:nowrap; }
#data-segment-detail .data-detail-tabs > button[aria-selected="true"] { border-bottom-color:#1e76f0!important; color:#333; font-weight:600; }
.segment-detail-content .data-detail-tabs > button:focus-visible { text-decoration:underline; text-underline-offset:4px; }
.segment-detail-content .property-detail-pane,.segment-detail-log { margin:20px 24px 0; }
.segment-detail-content .table-wrap { overflow:auto; max-height:none; }
.segment-detail-content .data-loading:not([hidden]) { position:relative!important; inset:auto!important; min-height:90px; }
#segment-impact-search { margin:16px 24px 0; justify-content:flex-end; }
#segment-definition-pane { margin:20px 24px 0; border:1px solid #e1e2e4; border-radius:4px; padding:20px 28px; min-width:0; overflow:auto; }
#segment-definition-pane .segment-condition:last-child { padding-bottom:0; }
#segment-definition-pane .segment-condition-fields :is(button,input,select) { background:transparent; color:#414141; }
#segment-definition-pane .segment-condition-fields button[data-action="event"] { border:1px solid #eceef1; }
.segment-detail-log { padding:24px; color:#7e7f80; text-align:center; }
@media(max-width:800px) {
  .workspace > main:has(#data-segment-detail:not([hidden]),.segment-members) { margin-left:0; }
  #data-segment-detail:not([hidden]) { min-height:0; padding:16px 12px; }
  .segment-detail-breadcrumb { gap:6px; flex-wrap:wrap; }
  .segment-detail-summary { padding:16px; }
  .segment-detail-metadata { grid-template-columns:1fr; gap:12px; }
  .segment-detail-metadata dl:first-child > div { grid-template-columns:116px minmax(0,1fr); }
  .segment-detail-content .data-detail-tabs { gap:16px; padding-inline:12px; }
  .segment-detail-content :is(.property-detail-pane,.segment-detail-log),#segment-impact-search,#segment-definition-pane { margin-inline:12px; }
  #segment-definition-pane { padding:14px 10px; }
}

/* 事件分析选择项按名称伸展，长项换行，外层面板保持原宽。 */
#bi-metrics-list.event-metrics-numbered > .analysis-metric-row { min-width:0;flex-wrap:wrap;padding-right:28px; }
#bi-metrics-list.event-metrics-numbered > .analysis-metric-row :is(.analysis-event-trigger,.analysis-metric-trigger,.analysis-metric-aggregation-trigger),
#bi-groups-list .analysis-field-trigger { flex:0 0 auto;width:max-content;min-width:44px;max-width:100%;box-sizing:border-box; }
#bi-metrics-list.event-metrics-numbered > .analysis-metric-row input:is(.analysis-metric-trigger,.analysis-metric-aggregation-trigger) { field-sizing:content;width:auto; }
#bi-groups-list .analysis-builder-row { flex-wrap:wrap;min-width:0;padding-right:28px; }
#bi-metrics-list.event-metrics-numbered > .analysis-metric-row .metric-display-name { height:auto;min-height:0;line-height:1.4; }
#bi-metrics-list.event-metrics-numbered > :is([data-metric-row],[data-formula-row]) > .metric-display-name {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#bi-chart-form:has(#bi-metrics-list.event-metrics-numbered) :is(#bi-filters-list,.metric-filters-list) .analysis-filter-row { display:flex;flex-wrap:wrap;min-width:0; }
#bi-chart-form:has(#bi-metrics-list.event-metrics-numbered) :is(#bi-filters-list,.metric-filters-list) .analysis-filter-row > .analysis-field-trigger { flex:0 0 auto;width:max-content;max-width:100%;box-sizing:border-box; }

/* 报表管理与数数的两类报表表格对齐。 */
.report-manager-panel { width:min(1620px,100%);height:calc(100dvh - 48px);max-height:1000px;background:#f4f4f7;border-radius:4px;padding:20px 20px 0; }
.report-manager-panel > header { padding:0 0 20px; }
.report-manager-tools { background:#fff;padding:24px 24px 14px;align-items:center; }
.report-manager-tools [role=tablist] { gap:4px; }
.report-manager-tools [role=tab] { height:32px;min-height:32px;padding:4px 12px;border-radius:3px;font-size:14px; }
.report-manager-tools .report-manager-search { display:flex;align-items:center;gap:8px;border:1px solid #e3e4e5;border-radius:4px;height:32px;min-width:0;width:216px;padding:0 16px 0 8px;color:#333;background:#fff; }
.report-manager-search svg { flex:none;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.2; }
.report-manager-search input { width:100%;min-width:0;border:0;outline:0;box-shadow:none;padding:0;height:30px;border-radius:2px;color:#333;font-size:14px; }
.report-manager-search input::placeholder { color:#bdbebf; }
.report-manager-search input:focus { box-shadow:none;outline:0; }
.report-manager-bulk { display:flex;align-items:center;gap:20px;padding:4px 24px 10px;background:#fff;font-size:13px; }
.report-manager-bulk[hidden] { display:none; }
.report-manager-bulk button { background:transparent;color:#2f6bff;padding:0;border:0;min-height:26px; }
.report-manager-bulk button:disabled { opacity:.4;cursor:default; }
.report-manager-table-wrap { background:#fff;padding:0 24px; }
#report-manager-table { --table-grid-edge:0px;table-layout:fixed;min-width:1330px;width:100%;border:0;border-collapse:collapse; }
#report-manager-table :is(th,td) { border:0;border-bottom:1px solid #e1e2e6;background:#fff;text-align:left;font-size:13px;font-weight:400;line-height:20px;padding:15px 10px;height:56px;box-sizing:border-box;vertical-align:middle; }
#report-manager-table th { position:sticky;top:0;z-index:2;color:#25262a;white-space:nowrap; }
#report-manager-table tbody tr:is(:hover,:focus-within) td { background:#f6f6f9; }
#report-manager-table .report-manager-select { text-align:center; }
#report-manager-table input[type=checkbox] { width:16px;height:16px;min-height:0;margin:0;vertical-align:middle;accent-color:#2f6bff; }
#report-manager-table col.report-select-column { width:48px; }
#report-manager-table col.report-column-name { width:140px; }
#report-manager-table col.report-column-description { width:140px; }
#report-manager-table col.report-column-type { width:125px; }
#report-manager-table col.report-column-creation { width:145px; }
#report-manager-table col.report-column-dashboard_count { width:170px; }
#report-manager-table col.report-column-dashboards { width:175px; }
#report-manager-table col.report-column-owner { width:155px; }
#report-manager-table col.report-column-updater { width:180px; }
#report-manager-table col.report-column-permission { width:140px; }
#report-manager-table col.report-column-updated_at { width:190px; }
#report-manager-table col.report-column-actions { width:132px; }
.report-manager-heading { display:flex;align-items:center;gap:5px; }
.report-manager-heading > button { display:flex;align-items:center;gap:4px;padding:0;border:0;background:transparent;color:inherit;font:inherit;min-height:24px; }
.report-sort-mark { display:inline-block;font-size:10px;line-height:6px;color:#c0c2c8; }
.report-sort-mark:is(.asc,.desc) { color:#2f6bff; }
.report-filter-trigger { display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:24px;min-height:24px; }
.report-filter-trigger.active { color:#2f6bff; }
.report-filter-trigger svg { width:16px;height:16px; }
.report-manager-heading [data-report-columns] { margin-left:auto; }
.report-manager-cell { display:flex;align-items:center;gap:4px;min-width:0; }
#report-manager-table .report-manager-name { display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:transparent;border:0;border-radius:0;padding:0;min-height:20px;color:#2f6bff;cursor:pointer;font:inherit;text-align:left; }
#report-manager-table .report-manager-name:hover { box-shadow:none; text-decoration:underline; }
.report-manager-note,.report-manager-board-names { display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.report-manager-inline-trigger { visibility:hidden;display:flex;align-items:center;justify-content:center;border:0;background:transparent;flex:none;width:20px;height:24px;min-height:24px;padding:2px;color:#444; }
#report-manager-table tr:is(:hover,:focus-within) .report-manager-inline-trigger { visibility:visible; }
.report-manager-inline-trigger svg { width:15px;height:15px; }
.report-manager-inline { display:flex;align-items:center;gap:3px; }
.report-manager-inline input { width:100%;min-width:0;height:30px;padding:4px;font:inherit; }
.report-manager-inline button { width:22px;min-width:22px;min-height:24px;padding:2px;border:0;background:transparent; }
.report-manager-inline button svg { width:16px;height:16px; }
.report-manager-inline [data-report-inline-cancel] { color:#e24b4b; }
.report-manager-inline [data-report-inline-save] { color:#2f6bff; }
.report-manager-actions { justify-content:flex-start;gap:4px; }
.report-manager-action { display:flex;align-items:center;justify-content:center;width:24px;height:24px;min-height:24px;color:#42434a; }
.report-manager-action svg { width:16px;height:16px; }
.report-manager-permission { padding:2px 7px;font-size:13px; }
.report-manager-permission.readonly { background:#eeeef3;color:#303044; }
.report-manager-permission.editable { background:#edf2ff;color:#5082ff; }
.report-manager-panel > footer { background:#fff;min-height:24px;padding:10px 24px;justify-content:flex-end; }
#report-manager-pagination { display:flex;align-items:center;gap:14px;font-size:12px; }
#report-manager-pagination[hidden] { display:none; }
#report-manager-pagination button { padding:2px;min-width:24px;min-height:26px;border:0;background:transparent; }
#report-manager-pagination select { width:104px;padding:4px;height:30px;min-height:30px; }
#report-manager-status,#report-manager-error { background:#fff;margin:0; }
.report-manager-popup { position:fixed;z-index:154;width:216px;max-width:calc(100vw - 16px);overflow:auto;background:#fff;border:1px solid #e4e6eb;border-radius:3px;box-shadow:0 6px 24px #202e4c26;font-size:13px;padding:4px; }
.report-manager-popup > input { width:100%;height:30px;padding:4px 8px;border:0;border-bottom:1px solid #eee;box-sizing:border-box;font-size:12px; }
.report-manager-popup [data-filter-choices] { max-height:300px;overflow:auto; }
.report-manager-popup.report-search-filter { display:flex; flex-direction:column; box-sizing:border-box; height:280px; overflow:hidden; }
.report-search-filter > input { flex:none; }
.report-search-filter [data-filter-choices] { flex:1; min-height:0; }
.report-manager-popup [data-filter-choices] > :is(button,label) { display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;background:#fff;color:#30333b;font:inherit;text-align:left;min-height:32px; }
.report-manager-popup [data-filter-choices] > :is(button,label):hover,.report-manager-popup [data-filter-choices] > button.active { background:#f3f4f8; }
.report-manager-popup input[type=checkbox] { width:14px;height:14px;min-height:0;margin:0; }
.report-filter-all { border-top:1px solid #eee!important; }
.report-manager-popup [data-column-options] { max-height:310px;overflow:auto; }
.report-manager-popup [data-column-key] { display:flex;align-items:center;gap:9px;padding:6px;min-height:32px; }
.report-manager-popup [data-column-key][draggable=true] { cursor:grab; }
.report-manager-popup [data-column-key] > button { margin-left:auto;border:0;background:transparent;padding:2px;min-height:22px;width:22px; }
.report-manager-popup [data-column-key] svg { width:16px;height:16px; }
.report-manager-popup [data-column-toggle][aria-pressed=false] { opacity:.25; }
.report-manager-popup footer { display:flex;justify-content:flex-end;gap:10px;padding:8px 4px; }
.report-manager-popup footer button { padding:3px 8px;font-size:12px;min-height:24px;border:0;background:#fff; }
.report-manager-popup [data-column-confirm] { background:#2f6bff;color:#fff;border-radius:3px; }
/* 字段配置按数数的204px紧凑浮层；搜索和页脚固定，字段列表内部滚动。 */
.report-manager-popup.report-columns-popup { display:flex;flex-direction:column;box-sizing:border-box;width:204px;padding:0;overflow:hidden;border:0;border-radius:2px;font-size:14px;color:#333;box-shadow:0 0 20px rgba(10,16,50,.02),0 14px 40px rgba(10,16,50,.03),0 20px 60px rgba(10,16,50,.05); }
.report-columns-popup .report-column-search-header { flex:none;height:38px;border-bottom:1px solid #f0f0f0; }
.report-columns-popup .report-column-search { display:flex;align-items:center;gap:8px;box-sizing:border-box;height:32px;padding:0 8px; }
.report-columns-popup .report-column-search > svg { flex:none;width:14px;height:14px; }
.report-columns-popup .report-column-search input { flex:1;min-width:0;width:100%;height:30px;min-height:0;padding:0;border:0;border-radius:0;background:transparent;font-size:14px;line-height:22px;outline:0;box-shadow:none; }
.report-columns-popup .report-column-search input::placeholder { color:#b9becf; }
#report-manager-dialog .report-column-search input:is(:hover,:focus) { background:transparent;box-shadow:none;outline:0; }
.report-columns-popup [data-column-options] { flex:0 1 290px;box-sizing:border-box;min-height:0;height:290px;max-height:290px;padding:4px;overflow:hidden auto; }
.report-columns-popup [data-column-key] { box-sizing:border-box;height:32px;min-height:32px;gap:4px;padding:4px 8px 4px 0;line-height:22px;border-radius:2px; }
.report-columns-popup [data-column-key]:hover { background:#f5f5f5; }
.report-columns-popup [data-column-key]:is(:focus,:focus-visible) { outline:none!important;box-shadow:none!important; }
.report-columns-popup [data-column-key]:focus-visible { background:#f5f5f5; }
.report-columns-popup .report-column-handle { display:flex;align-items:center;justify-content:center;flex:none;width:24px;color:#666; }
.report-columns-popup .report-column-handle.fixed { color:#b9becf; }
.report-columns-popup [data-column-key][data-visible=false] .report-column-label { color:#bdbebf; }
.report-columns-popup [data-column-key] > button { display:flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:24px;height:24px;min-height:24px;padding:4px;color:#333; }
.report-columns-popup [data-column-key] > .report-column-handle { margin-left:0;cursor:grab;touch-action:none; }
.report-columns-popup [data-column-key] > button:disabled { color:#b9becf;opacity:1; }
.report-columns-popup [data-column-key] > button:not(:disabled):hover { background:#eee;box-shadow:none; }
.report-columns-popup [data-column-toggle][aria-pressed=false] { opacity:1; }
.report-columns-popup footer { flex:none;box-sizing:border-box;min-height:44px;gap:8px;padding:6px 8px;align-items:center; }
.report-columns-popup footer button { height:24px;min-height:24px;padding:0 8px;font-size:14px;line-height:22px; }
.report-columns-popup [data-column-confirm] { background:#2f6bff;border-radius:2px; }
.report-columns-popup.report-columns-dragging { user-select:none;cursor:grabbing; }
.report-columns-popup:focus { outline:none; }
.report-columns-popup .report-column-origin { opacity:.25; }
.report-column-drag-preview { position:fixed;z-index:155;display:flex;align-items:center;gap:4px;height:32px;padding:4px 8px 4px 0;background:#fff;box-shadow:0 4px 12px #202e4c26;pointer-events:none;line-height:22px; }
.report-column-drag-preview > button { display:flex;align-items:center;justify-content:center;width:24px;height:24px;min-height:24px;margin-left:auto;border:0;background:transparent;padding:4px;color:#333; }
.report-column-drag-preview > .report-column-handle { margin-left:0; }
.report-column-drag-preview svg { width:16px;height:16px; }
.report-column-drag-preview[data-visible=false] .report-column-label { color:#bdbebf; }
/* 搜索框只在鼠标悬停时显示外框。 */
#report-manager-dialog :is(.report-manager-search,.report-column-search):is(:hover,:focus-within) { box-shadow:none;background:#fff; }
#report-manager-dialog :is(.report-manager-search,.report-column-search):hover { outline:1px solid #2563eb;outline-offset:0; }
#report-manager-dialog .report-column-search:hover { outline-offset:-1px; }
#report-manager-dialog .report-manager-search:focus-within { border-color:#185ec0;outline:0;box-shadow:3px -3px #dae9fb,-3px 3px #dae9fb,-3px -3px #dae9fb,3px 3px #dae9fb; }
#report-manager-search:is(:hover,:focus) { outline:0;box-shadow:none;background:transparent; }
@media(max-width:600px) { .report-manager-panel { padding:12px 8px 0; } .report-manager-tools { padding:14px 12px; } .report-manager-tools .report-manager-search { width:100%; } .report-manager-table-wrap { padding:0 12px; } }
/* 此弹窗使用数数式横向分隔线，隔离全站数据表的网格／居中强制规则。 */
.report-manager-table-wrap { margin:0;padding:0 24px; }
#report-manager-table { table-layout:fixed!important;width:100%!important;min-width:1100px!important;border-collapse:collapse!important; }
#report-manager-table :is(th,td) { border:0!important;border-bottom:1px solid #e1e2e6!important;text-align:left!important; }
#report-manager-table .report-manager-select { text-align:center!important; }
#report-manager-table col.report-select-column { width:3%; }
#report-manager-table col.report-column-name { width:10%; }
#report-manager-table col.report-column-description { width:9%; }
#report-manager-table col.report-column-type { width:8%; }
#report-manager-table col.report-column-creation { width:9%; }
#report-manager-table col.report-column-dashboard_count { width:11%; }
#report-manager-table col.report-column-dashboards { width:11%; }
#report-manager-table col.report-column-owner { width:10%; }
#report-manager-table col.report-column-updater { width:12%; }
#report-manager-table col.report-column-permission { width:10%; }
#report-manager-table col.report-column-updated_at { width:15%; }
#report-manager-table col.report-column-actions { width:12%; }
.report-manager-heading > button { height:24px; }
#report-manager-table .report-manager-name { height:20px; }
@media(max-width:600px) { .report-manager-table-wrap { margin:0;padding:0 12px; } }

/* 已存报表搜索：无外框，左侧搜索图标，右侧按分析类型筛选。 */
.saved-reports-filters { align-items:center;gap:12px;height:48px;padding:0 20px;background:#fff; }
.saved-reports-search-box { display:flex;align-items:center;gap:8px;flex:1;min-width:0; }
.saved-reports-search-box > svg { flex:none;width:16px;height:16px;fill:none;stroke:#35383e;stroke-width:1.5; }
.saved-reports-search-box > #saved-reports-search { flex:1;min-width:0;width:100%;height:32px;min-height:0;padding:0;border:0;border-radius:0;outline:none;box-shadow:none;background:transparent;color:#30333b;font-size:13px; }
#saved-reports-search::placeholder { color:#b8bbc2; }
#saved-reports-search::-webkit-search-cancel-button { display:none; }
.saved-reports-type-filter { flex:none; }
.saved-reports-type-filter[hidden] { display:none; }
#saved-reports-type-trigger { display:flex;align-items:center;gap:5px;min-height:32px;height:32px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none;color:#30333b;font-size:13px;font-weight:400; }
#saved-reports-type-trigger:not(:disabled):hover { color:#2563eb; }
#saved-reports-type-trigger > svg { width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1; }
.saved-reports-type-menu { position:fixed;z-index:8;width:80px;padding:4px;background:#fff;border:1px solid #e7e9ed;border-radius:3px;box-shadow:0 6px 20px #26354c26;overflow:auto; }
.saved-reports-type-menu[hidden] { display:none; }
.saved-reports-type-menu > button { display:block;width:100%;height:34px;min-height:34px;padding:6px;white-space:nowrap;border:0;border-radius:2px;background:#fff;color:#30333b;font-size:13px;font-weight:400;text-align:left; }
.saved-reports-type-menu > button:is(:hover,:focus-visible,[aria-selected="true"]) { background:#f3f4f8;outline:none;box-shadow:none; }

/* 勾选后批量操作替换同一行表头，表格和数据行不发生位移。 */
#report-manager-table thead th { height:48px;padding-top:11px;padding-bottom:11px; }
#report-manager-table .report-manager-bulk { display:flex;align-items:center;gap:12px;height:24px;padding:0;background:#fff;white-space:nowrap; }
#report-manager-table .report-manager-bulk > span { margin-right:4px; }
#report-manager-table .report-manager-bulk button { display:inline-flex;align-items:center;gap:4px;height:24px;min-height:24px;padding:0;border:0;background:transparent;color:#333;font-size:13px;font-weight:400; }
#report-manager-table .report-manager-bulk button svg { width:15px;height:15px; }

/* 事件拆分：事件专属维度与公共分组保留各自序号和层级。 */
#bi-groups-section .analysis-sidebar-title{gap:8px}
#bi-groups-section .analysis-sidebar-title strong{margin-right:auto}
.event-split-toggle svg,.event-split-metric svg,.event-split-symbol svg,.event-split-index svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.3;vertical-align:middle}
.event-split-toggle.active,.event-split-metric.active{color:#315fff;background:#f0f2f8}
.event-split-metric{display:grid;place-items:center;border:0;border-radius:2px;background:#f3f4f8;color:#808795;width:25px;height:26px;padding:0;flex:none;cursor:pointer}
.event-split-metric[hidden],.event-split-block[hidden],.event-split-popup [hidden]{display:none!important}
.event-split-block{padding:6px 0 8px;margin:0 0 4px;font-size:14px;color:#656a73}
.event-split-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap;line-height:26px}
.event-split-heading button,.event-split-fields [data-select-split-field]{display:inline-flex;align-items:center;gap:5px;min-width:0;border:1px solid transparent;border-radius:3px;background:#f0f1f5;color:#303644;padding:2px 8px;cursor:pointer;font:inherit}
.event-split-heading button:hover,.event-split-fields [data-select-split-field]:hover{background:#e8ebf1}
.event-split-heading [data-split-events]{max-width:160px}
.event-split-heading [data-split-events] span,.event-split-fields [data-select-split-field] span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.event-split-heading [data-split-events] svg,.event-split-fields [data-select-split-field] svg,.event-split-popup [data-choose-split-field] svg{width:14px;height:14px;flex:none}
.event-split-symbol,.event-split-index{display:inline-flex;align-items:center;justify-content:center;gap:2px;height:24px;border-radius:3px;background:#f4f5f7;color:#838994;flex:none}
.event-split-symbol{width:24px}
.event-split-index{width:36px;font-size:11px}
.event-split-symbol svg,.event-split-index svg{width:12px;height:12px}
.event-split-block > .event-split-fields{border-left:1px solid #d6d8de;margin:13px 0 12px 40px;padding-left:16px}
.event-split-block > .event-split-fields > div{display:flex;align-items:center;gap:6px;min-height:26px;margin:4px 0}
.event-split-fields [data-select-split-field]{max-width:200px}
.event-split-row-action{display:inline-grid;place-items:center;flex:none;width:26px;height:26px;border:1px solid transparent;background:transparent;color:#6e7380;cursor:pointer;border-radius:3px;padding:0;opacity:0;pointer-events:none;font:inherit}
[data-split-field-row]:hover .event-split-row-action,[data-group-row]:hover .event-split-row-action,.event-split-row-action:focus-visible,.event-split-row-action[aria-expanded=true]{opacity:1;pointer-events:auto}
.event-split-row-action:not([data-remove-split-field]):is(:hover,[aria-expanded=true]){background:#eef2fb;color:#315fff;border-color:#c7d5f4}
.event-split-remove{margin-left:auto}
.event-split-add{border:0;background:transparent;color:#2874e7;cursor:pointer;font:inherit;padding:3px 0;margin-left:30px}
.event-split-add span{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:3px;background:#edf2ff;margin-right:6px}
#bi-groups-list > [data-group-row]{gap:6px}
#bi-groups-list > [data-group-row] [data-remove-group]{order:3;margin-left:auto}
#bi-groups-list > [data-group-row] > [data-common-group-index]{flex:none;align-self:center;margin-right:4px}
#bi-groups-list > [data-group-row] > :is([data-group-setting],[data-remove-group]){align-self:center}
@media (hover:none){.event-split-row-action{opacity:1;pointer-events:auto}}
.event-split-popup{position:fixed;z-index:2600;background:#fff;border:1px solid #e0e4ec;box-shadow:0 5px 22px #182d5126;border-radius:3px;color:#303644;overflow:auto;font-size:13px;box-sizing:border-box}
.event-split-menu{min-width:100px;max-width:320px;padding:5px}
.event-split-menu>button,.event-split-fields [data-split-field-options]>button,.event-split-popup [data-choose-split-field]{border:0;background:#fff;display:flex;align-items:center;gap:12px;width:100%;text-align:left;font:inherit;padding:8px 10px;cursor:pointer;border-radius:2px}
.event-split-menu>button:hover,.event-split-popup [data-choose-split-field]:hover{background:#f2f3f8}
.event-split-menu>label{display:flex;gap:8px;align-items:center;padding:8px;cursor:pointer}
.event-split-popup.event-split-fields{width:300px;margin:0;padding:8px}
.event-split-fields input[type=search]{width:100%;padding:7px;border:1px solid #d7dce6;border-radius:2px;box-sizing:border-box}
.event-split-popup small{color:#9298a4;margin-left:auto}
.event-split-empty{padding:16px;color:#8c939f}
.event-group-tabs{display:flex;border-bottom:1px solid #ebeef3;padding:0 12px;gap:16px;white-space:nowrap}
.event-group-tabs button{font:inherit;font-size:12px;border:0;background:#fff;padding:10px 0;cursor:pointer;color:#777}
.event-group-tabs [aria-selected=true]{color:#30343b;font-weight:600}
.event-group-setting-body{padding:12px;min-height:40px}
.event-group-example{font-size:11px;color:#9297a1;line-height:22px;overflow-wrap:anywhere}
.event-group-boundaries{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.event-group-boundaries input{width:75px;min-width:0;padding:5px;border:1px solid #dbe0e8;border-radius:2px}
.event-group-boundaries button{border:0;color:#3768ff;background:#fff;font:inherit;font-size:12px;cursor:pointer}
.event-group-setting-body textarea{width:100%;min-height:80px;box-sizing:border-box;border:1px solid #dbe0e8;padding:8px;resize:vertical}
.event-split-settings footer{display:flex;justify-content:flex-end;gap:12px;border-top:1px solid #ebeef3;padding:8px 12px}
.event-split-settings footer button{border:0;background:#fff;color:#424750;padding:4px 12px;font:inherit;font-size:12px;cursor:pointer;border-radius:2px}
.event-split-settings footer .primary{background:#2874ff;color:#fff}
.event-group-error{font-size:12px;color:#c33434;padding:0 12px 10px}
#bi-groups-section button:focus:not(:focus-visible),.event-split-popup button:focus:not(:focus-visible){outline:none;box-shadow:none}

#bi-groups-list > [data-group-row]{padding-left:0}
#bi-groups-list > [data-group-row]::before{display:none}
.metric-drag-handle{display:none}
#bi-metrics-list.event-metrics-numbered:has(> :nth-child(2)) > :is([data-metric-row],[data-formula-row]) > .metric-drag-handle{display:grid;place-items:center;position:absolute;top:3px;left:0;width:24px;height:24px;opacity:0;cursor:grab;z-index:1}
#bi-metrics-list.event-metrics-numbered:has(> :nth-child(2)) > :is([data-metric-row],[data-formula-row]):hover::before{opacity:0}
#bi-metrics-list.event-metrics-numbered:has(> :nth-child(2)) > :hover > .metric-drag-handle{opacity:1}
.event-split-fields:has(> :nth-child(2)) [data-split-drag],#bi-groups-list:has(> :nth-child(2)) [data-common-group-index]{position:relative;cursor:grab}
.event-split-fields:has(> :nth-child(2)) > :hover > [data-split-drag],#bi-groups-list:has(> :nth-child(2)) > :hover > [data-common-group-index]{color:transparent;background:transparent}
:is(.metric-drag-handle,[data-split-drag],[data-common-group-index])::after{content:"";position:absolute;inset:0;margin:auto;width:6px;height:12px;background:radial-gradient(circle,#2874ff 0.8px,transparent 1.2px) 0 0/3px 4px;visibility:hidden;pointer-events:none}
#bi-metrics-list > :hover > .metric-drag-handle::after,.event-split-fields:has(> :nth-child(2)) > :hover > [data-split-drag]::after,#bi-groups-list:has(> :nth-child(2)) > :hover > [data-common-group-index]::after{visibility:visible}
.event-split-heading>button,.event-split-fields [data-select-split-field]{height:26px;min-height:0;box-sizing:border-box}
.event-split-popup button{min-height:0}
.event-group-tabs button{padding:8px 0}
.event-group-setting-body{box-sizing:border-box;padding:8px 12px;min-height:40px}
.event-split-row-action svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.2;vertical-align:middle}

.event-split-settings .event-group-tabs{gap:12px;overflow-x:auto}
.event-split-settings .event-group-tabs button{font-size:13px}
.event-group-setting-body .event-group-example{font-size:12px}
.event-split-popup [data-split-field-options] > button{gap:6px}
.event-split-popup [data-split-field-options] > button[aria-current=true]{background:#eef3ff;color:#245cce}

/* 数数事件拆分：工具按钮、字段胶囊和锚定浮层各自使用对应的交互状态。 */
#bi-groups-section .analysis-sidebar-title .icon-button{width:36px;height:36px;border:0;border-radius:4px;background:transparent;color:#30343b;box-shadow:none}
#bi-groups-section .analysis-sidebar-title .icon-button:hover{background:#f3f4f6}
#bi-groups-section .analysis-sidebar-title .event-split-toggle[aria-pressed=true]{background:#f3f4f6;color:#286cda}
#bi-groups-section .analysis-sidebar-title .event-split-toggle:active{background:#e8ebf2}
#bi-chart-form.event-analysis-form :is(#bi-add-metric,#bi-add-formula,#bi-add-filter,#bi-add-group) {
  border:0; border-radius:4px; background:transparent; color:#3f4652; box-shadow:none;
}
#bi-chart-form.event-analysis-form #bi-add-formula { flex:none; width:28px; height:28px; margin-inline:4px; }
#bi-chart-form.event-analysis-form :is(#bi-add-filter,#bi-add-group) { color:#7b8593; }
#bi-chart-form.event-analysis-form :is(#bi-add-metric,#bi-add-formula,#bi-add-filter,#bi-add-group):is(:hover,:focus-visible):enabled {
  background:#eef1f5; color:#334155; box-shadow:none;
}
#bi-chart-form.event-analysis-form .analysis-sidebar-title:has(> .analysis-section-add) {
  gap:4px;
}
#bi-chart-form.event-analysis-form .analysis-sidebar-title:has(> .analysis-section-add) > .analysis-section-heading {
  display:none;
}
#bi-chart-form.event-analysis-form .analysis-sidebar-title > .analysis-section-add {
  display:flex; flex:1 1 auto; align-items:center; justify-content:space-between;
  width:auto; min-width:0; height:40px; padding:0 12px 0 10px;
}
#bi-chart-form.event-analysis-form .analysis-section-add-label {
  display:block; color:#333; font-size:16px; font-weight:500;
}
#bi-chart-form.event-analysis-form .analysis-section-add > [aria-hidden] {
  position:relative; width:12px; height:12px; font-size:0;
}
#bi-chart-form.event-analysis-form .analysis-section-add > [aria-hidden]::before {
  content:""; position:absolute; inset:0; margin:auto; width:10px; height:10px;
  background:linear-gradient(currentColor,currentColor) center / 2px 100% no-repeat,
    linear-gradient(currentColor,currentColor) center / 100% 2px no-repeat;
}
#bi-chart-form.event-analysis-form [data-toggle-event-split]:not([hidden]) {
  display:grid; place-items:center;
}
#bi-chart-form.event-analysis-form .analysis-section-add:disabled {
  cursor:default; opacity:.5;
}
#bi-chart-form.event-analysis-form {
  --analysis-row-hover:#f4f4f7;
  --event-section-inline-padding:24px;
}
#bi-chart-form.event-analysis-form :is(#bi-metrics-list > .named-metric-row,#bi-filters-list [data-filter-row],.metric-filters-list [data-filter-row],#bi-groups-list > [data-group-row]) {
  position:relative; isolation:isolate;
}
#bi-chart-form.event-analysis-form :is(#bi-metrics-list > .named-metric-row,.metric-filters-list [data-filter-row]):is(:hover,:focus-within)::after {
  content:''; position:absolute; z-index:-1; inset:0 -12px; background:var(--analysis-row-hover); pointer-events:none;
}
#bi-chart-form.event-analysis-form :is(#bi-filters-list [data-filter-row],#bi-groups-list > [data-group-row])::after {
  content:''; position:absolute; z-index:-1; inset-block:0; inset-inline-end:calc(-1 * var(--event-section-inline-padding));
}
/* 左侧由可滚动侧栏裁切，任意层级的条件行都使用同一条面板边缘。 */
#bi-chart-form.event-analysis-form #bi-filters-list [data-filter-row]::after { inset-inline-start:-100vw; }
#bi-chart-form.event-analysis-form #bi-groups-list > [data-group-row]::after { inset-inline-start:calc(-1 * var(--event-section-inline-padding)); }
#bi-chart-form.event-analysis-form :is(#bi-filters-list [data-filter-row],#bi-groups-list > [data-group-row]):is(:hover,:focus-within)::after {
  background:#f9f9fb;
}
#bi-chart-form.event-analysis-form #bi-filters-list [data-filter-row] { padding-block:6px; }
#bi-chart-form.event-analysis-form #bi-groups-list > [data-group-row] { padding-block:4px; }
#bi-chart-form.event-analysis-form #bi-filters-list::before,
#bi-chart-form.event-analysis-form #bi-filters-list .global-filter-group::before { z-index:1; pointer-events:none; }
#bi-chart-form.event-analysis-form #bi-metrics-list > .named-metric-row:has(> [data-formula-precision][open]) { z-index:2; }
#bi-chart-form.event-analysis-form #bi-metrics-list > .named-metric-row > :is(.metric-display-name,.metric-display-name-input) {
  box-sizing:border-box; height:30px; padding:0 128px 0 0; line-height:30px;
}
#bi-chart-form.event-analysis-form #bi-metrics-list > .named-metric-row {
  padding-inline-end:0;
}
.event-analysis-form #bi-metrics-list > .named-metric-row .metric-hover-actions {
  top:3px; right:8px; gap:6px; background:transparent;
}
.event-analysis-form .metric-hover-actions > button {
  width:24px;
}
#bi-chart-form.event-analysis-form :is(#bi-groups-list > [data-group-row],#bi-filters-list [data-filter-row],.metric-filters-list [data-filter-row]) {
  padding-inline-end:8px;
}
#bi-chart-form.event-analysis-form :is(#bi-filters-list,.metric-filters-list) [data-filter-row] > [data-remove-filter] {
  margin-inline-start:auto;
}
.event-analysis-form #bi-filters-list [data-filter-row] > :is([data-add-parallel-filter],[data-remove-filter]) { opacity:0; pointer-events:none; }
.event-analysis-form #bi-filters-list [data-filter-row]:is(:hover,:focus-within) > :is([data-add-parallel-filter],[data-remove-filter]) { opacity:1; pointer-events:auto; }
#bi-chart-form.event-analysis-form :is(.metric-hover-actions > button,:is(#bi-filters-list,.metric-filters-list) [data-filter-row] > :is([data-add-parallel-filter],[data-add-metric-parallel-filter],[data-remove-filter]),#bi-groups-list [data-remove-group]) {
  display:inline-grid; place-items:center; height:24px; border:0; border-radius:4px;
  background:transparent; color:#7e7f80; box-shadow:none;
}
#bi-chart-form.event-analysis-form :is(.metric-hover-actions > button:not([data-event-remove]),:is(#bi-filters-list,.metric-filters-list) [data-filter-row] > :is([data-add-parallel-filter],[data-add-metric-parallel-filter])):is(:hover,:focus-visible) {
  background:#e9edf2; color:#334155; outline:0; box-shadow:none;
}
#bi-chart-form.event-analysis-form :is(.metric-hover-actions > button,:is(#bi-filters-list,.metric-filters-list) [data-filter-row] > :is([data-add-parallel-filter],[data-add-metric-parallel-filter],[data-remove-filter]),#bi-groups-list [data-remove-group]) {
  position:relative; font-size:0;
}
.event-analysis-form :is(.metric-hover-actions > button,:is(#bi-filters-list,.metric-filters-list) [data-filter-row] > :is([data-add-parallel-filter],[data-add-metric-parallel-filter],[data-remove-filter]),#bi-groups-list [data-remove-group])::before {
  content:""; position:absolute; inset:0; margin:auto; width:16px; height:16px; background:currentColor;
  mask:var(--row-action-icon) center / contain no-repeat;
  pointer-events:none;
}
#bi-chart-form :is([data-add-metric-filter],[data-add-formula-filter],[data-add-parallel-filter],[data-add-metric-parallel-filter],[data-add-retention-filter]) {
  --row-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 3h11L9.3 8.5v3.6l-2.6 1V8.5z' fill='none' stroke='black' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.event-analysis-form [data-switch-metric-kind] {
  --row-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12 3H4l4 5-4 5h8' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.event-analysis-form [data-copy-metric] {
  --row-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.5 2.5h8v8m-11-5h8v8h-8z' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#bi-chart-form :is([data-remove-filter],[data-remove-group],[data-event-remove]) {
  --row-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.3'/%3E%3Cpath d='m6 6 4 4m0-4-4 4'/%3E%3C/g%3E%3C/svg%3E");
}
/* 留存侧栏的操作图标与行悬停状态。 */
.retention-analysis-form {
  --retention-row-hover:#f6f6f8;
  --retention-action-hover:#e9eaee;
  --retention-border:#e3e4e5;
  --retention-control:#f2f3f8;
  --retention-control-hover:#ebedf3;
  --retention-control-ink:#202241;
  --retention-open-ring:3px -3px #dae9fb,-3px 3px #dae9fb,-3px -3px #dae9fb,3px 3px #dae9fb;
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) :is(.retention-event-controls,.analysis-filter-row,[data-group-row]):is(:hover,:focus-within) {
  background:var(--retention-row-hover);
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) #bi-groups-list [data-common-group-index]::after {
  background-image:radial-gradient(circle,#202241 0.8px,transparent 1.2px);
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) :is(.retention-event-actions > button,[data-add-metric-parallel-filter],[data-add-parallel-filter],[data-remove-filter],[data-remove-group]) {
  position:relative; box-sizing:border-box; display:inline-grid; place-items:center; flex:none; width:26px;
  min-width:26px; height:26px; padding:0; border:0; border-radius:4px; background:transparent;
  color:#7e7f80; font-size:0; cursor:pointer; box-shadow:none;
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) :is(.retention-event-actions > button,[data-add-metric-parallel-filter],[data-add-parallel-filter],[data-remove-filter],[data-remove-group])::before {
  content:""; position:absolute; inset:0; margin:auto; width:16px; height:16px;
  background:currentColor; mask:var(--row-action-icon) center / contain no-repeat; pointer-events:none;
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) [data-edit-retention-event-name] {
  --row-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m2.5 13 .8-3 7.8-7.8 2.2 2.2-7.8 7.8-3 .8Zm7.4-9.4 2.2 2.2M2.5 13h10' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) :is([data-add-metric-parallel-filter],[data-add-parallel-filter]) {
  --row-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 2.5h11L8.5 8v3l-2.5 1V8ZM12 8.5v5m-2.5-2.5h5' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) :is(.retention-event-actions > button,[data-add-metric-parallel-filter],[data-add-parallel-filter]):is(:hover,:focus-visible) {
  background:var(--retention-button-hover,var(--retention-action-hover)); color:var(--retention-button-ink,#333); outline:0; box-shadow:none;
}
.retention-analysis-form :is([data-remove-filter],[data-remove-group]) {
  --inline-remove-hover:#f44f47; --inline-remove-hover-bg:#fff0ef;
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) :is(#bi-filters-list,.metric-filters-list) .analysis-filter-row {
  grid-template-columns:minmax(36px,max-content) minmax(46px,max-content) minmax(28px,54px) 26px 26px;
  align-items:center; min-height:36px;
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) .analysis-filter-row input[data-filter-value] { width:100%; min-width:0; }
#bi-chart-form:has(#bi-retention-settings:not([hidden])) :is(#bi-add-filter,#bi-add-group) {
  display:flex; flex:1; align-items:center; justify-content:space-between;
  width:auto; height:40px; padding:0 12px 0 0; border:0; border-radius:4px; background:transparent; color:#333; box-shadow:none;
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) .analysis-sidebar-title:has(> :is(#bi-add-filter,#bi-add-group)) > .analysis-section-heading {
  position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%);
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) :is(#bi-add-filter,#bi-add-group) .analysis-section-add-label {
  display:block; color:#333; font-size:16px; font-weight:500;
}
#bi-chart-form:has(#bi-retention-settings:not([hidden])) :is(#bi-add-filter,#bi-add-group) > [aria-hidden] {
  display:grid; place-items:center; width:24px; height:24px; font-size:22px; line-height:1; font-weight:400; color:#bdbebf;
}
#bi-chart-form.retention-analysis-form :is(#bi-add-filter,#bi-add-group):enabled:is(:hover,:focus-visible) {
  background:transparent; box-shadow:none;
}
.retention-analysis-form :is(#bi-add-filter,#bi-add-group):enabled:is(:hover,:focus-visible) > [aria-hidden] { color:#333; }
@media (hover:hover) {
  .retention-event-actions,
  #bi-chart-form:has(#bi-retention-settings:not([hidden])) .analysis-filter-row > :is([data-add-metric-parallel-filter],[data-add-parallel-filter],[data-remove-filter]) {
    opacity:0; pointer-events:none;
  }
  :is(.retention-event-item,#bi-retention-display-options):is(:hover,:focus-within) .retention-event-actions,
  #bi-chart-form:has(#bi-retention-settings:not([hidden])) .analysis-filter-row:is(:hover,:focus-within) > :is([data-add-metric-parallel-filter],[data-add-parallel-filter],[data-remove-filter]) {
    opacity:1; pointer-events:auto;
  }
}
@media (hover:none) {
  #bi-chart-form:has(#bi-retention-settings:not([hidden])) :is(.analysis-filter-row > :is([data-add-metric-parallel-filter],[data-add-parallel-filter],[data-remove-filter]),#bi-groups-list > [data-group-row] > [data-remove-group]) {
    opacity:1; pointer-events:auto;
  }
}
#bi-chart-form.event-analysis-form :is(#bi-filters-list,.metric-filters-list,#bi-groups-list) :is([data-remove-filter],[data-remove-group]) {
  box-sizing:border-box; flex:0 0 20px; width:20px;
}
#bi-chart-form.event-analysis-form #bi-groups-list > [data-group-row] > [data-remove-group] {
  flex-basis:26px; width:26px; height:26px; margin-inline-end:-8px;
}
@media (hover:none) {
  #bi-chart-form.event-analysis-form :is(#bi-metrics-list .metric-hover-actions,:is(#bi-filters-list,.metric-filters-list) [data-filter-row] > :is([data-add-parallel-filter],[data-add-metric-parallel-filter],[data-remove-filter]),#bi-groups-list > [data-group-row] > [data-remove-group]) {
    opacity:1; pointer-events:auto;
  }
}
.event-split-block:hover,.event-split-block:has([aria-expanded=true]){background:#f6f6f8}
.event-split-heading button,.event-split-fields [data-select-split-field]{background:#eff0f4;color:#30343b;border:1px solid transparent}
.event-split-heading button:hover,.event-split-fields [data-select-split-field]:hover{background:#fff;border-color:#d9dbe1}
.event-split-heading button[aria-expanded=true],.event-split-fields [data-select-split-field][aria-expanded=true]{background:#fff;border-color:#3373ce;box-shadow:0 0 0 2px #286cda18}
.event-split-add{border-radius:3px;padding:3px 6px;color:#286cda}
.event-split-add:hover{background:#edf2fc}
.event-split-add:active{background:#e2ebfb}
.event-split-add span{background:#eaf0fa}
.event-split-row-action[data-group-setting]{opacity:1;pointer-events:auto;background:#eff0f4;color:#555b65}
.event-split-row-action[data-group-setting]:hover{background:#fff;border-color:#d9dbe1}
.event-split-row-action[data-group-setting][aria-expanded=true]{background:#fff;border-color:#3373ce;color:#555b65;box-shadow:0 0 0 2px #286cda18}
.event-split-popup{border-color:#f1f1f3;border-radius:4px;box-shadow:0 8px 24px #24293620}
.event-split-order{width:80px;padding:4px}
.event-split-order>button{width:100%;border:0;background:white;text-align:left;padding:9px 8px;border-radius:3px;cursor:pointer;color:inherit;font:inherit}
.event-split-order>button:hover,.event-split-order>button[aria-current=true]{background:#eff0f4}
.event-split-events{width:200px;padding:4px 0}
.event-split-events>label{display:flex;align-items:center;gap:8px;padding:10px 12px;cursor:pointer}
.event-split-events>label:hover{background:#f6f6f8}
.event-split-events>label:has(input:disabled){color:#a0a3a9;cursor:default}
.event-split-events input{margin:0;accent-color:#2c72df}
.event-split-events>label span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.event-split-popup.event-split-fields{display:flex;flex-direction:column;width:420px;height:436px;padding:0;overflow:hidden}
.event-split-search{display:flex;align-items:center;gap:8px;padding:7px 12px;border-bottom:1px solid #e7e7eb}
.event-split-search input[type=search]{border:0;outline:0;box-shadow:none;background:transparent;font:inherit;padding:5px 0}
.event-split-field-tabs{display:flex;gap:14px;padding:0 12px;border-bottom:1px solid #e7e7eb}
.event-split-field-tabs button{border:0;border-bottom:3px solid transparent;border-bottom-left-radius:0;border-bottom-right-radius:0;background:white;padding:8px 0 6px;color:#6e7279;font:inherit;cursor:pointer}
.event-split-field-tabs button[aria-selected=true]{border-color:#2c72df;color:#222630;font-weight:600}
.event-split-fields [data-split-field-options]{min-height:0;overflow:auto;padding:6px 12px 10px}
.event-split-list-title{display:flex;align-items:center;gap:5px;padding:8px 6px;color:#62666c;font-size:12px;font-weight:600}
.event-split-list-title svg{width:14px;height:14px}
.event-split-hint{padding:10px 6px;color:#999da5;font-size:12px;border-bottom:1px solid #ededf0}
.event-split-option{display:flex;align-items:stretch;border-radius:3px}
.event-split-option:hover,.event-split-option:has([aria-current=true]){background:#f0f1f5}
.event-split-popup .event-split-option [data-choose-split-field]{min-width:0;flex:1;background:transparent;color:#30343b;padding:6px;font-size:13px}
.event-split-option [data-choose-split-field] span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.event-split-favorite{flex:none;width:29px;border:0;background:transparent;color:#6e7684;cursor:pointer;opacity:0}
.event-split-option:hover .event-split-favorite,.event-split-favorite:focus-visible,.event-split-favorite[aria-pressed=true]{opacity:1}
.event-split-favorite[aria-pressed=true]{color:#e0a323}
@media (hover:none){.event-split-favorite{opacity:1}}
.event-split-popup.event-split-settings{overflow:visible;box-shadow:none}
.event-split-settings{width:360px}
.event-split-settings::after{content:"";position:absolute;left:var(--split-arrow-left,25px);width:10px;height:10px;background:white;transform:translateX(-50%) rotate(45deg);pointer-events:none}
.event-split-settings[data-placement=above]::after{bottom:-5px;border-right:1px solid #f1f1f3;border-bottom:1px solid #f1f1f3}
.event-split-settings[data-placement=below]::after{top:-5px;border-left:1px solid #f1f1f3;border-top:1px solid #f1f1f3}
.event-group-settings-content{max-height:inherit;overflow:auto;border-radius:inherit}
.event-split-settings .event-group-tabs{padding:0 15px;gap:28px}
.event-split-settings .event-group-tabs button{padding:13px 0 14px}
.event-split-settings .event-group-tabs button:hover{color:#286cda;box-shadow:none!important}
.event-group-setting-body{padding:14px 15px}
.event-group-range-summary{font-size:13px;color:#30343b;margin-bottom:9px}
.event-group-boundaries{gap:10px}
.event-group-boundaries input{width:100%;height:32px;border-radius:3px;box-sizing:border-box;padding:5px 7px}
.event-group-boundaries button{margin-left:auto}
.event-split-settings footer{padding:8px 15px;gap:8px}
.event-split-settings footer button{height:32px;padding:0 16px;border-radius:4px;font-size:13px}
.event-split-settings footer button:hover{background:#f3f4f7}
.event-split-settings footer .primary{background:#2c72df}
.event-split-settings footer .primary:hover{background:#225fc6}

.event-split-preview{position:fixed;z-index:2601;width:280px;pointer-events:none;background:#fff;border:1px solid #f1f1f3;border-radius:4px;box-shadow:0 8px 24px #24293620}
.event-split-preview[hidden]{display:none}
.event-split-preview .metric-property-detail-description{min-height:112px}


.event-group-time-trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;min-width:108px;height:30px;padding:0 9px;border:1px solid #d9dbe1;border-radius:3px;background:#fff;color:#30343b;font:inherit;cursor:pointer}
.event-group-time-trigger::after{content:"";width:5px;height:5px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-2px) rotate(45deg)}
.event-group-time-trigger:hover,.event-group-time-trigger[aria-expanded=true]{border-color:#3373ce}
.analysis-select-menu.event-group-time-menu{z-index:2602;background:#fff}
.event-group-time-menu button:hover,.event-group-time-menu button.active{background:#edf3ff;color:#245cce}

.event-group-batch-panel{position:fixed;z-index:1;box-sizing:border-box;width:300px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow:auto;background:#fff;border:1px solid #eeeef1;border-radius:4px;box-shadow:0 8px 24px #24293620}
.event-group-batch-panel header{display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding:12px 14px;border-bottom:1px solid #ebeef3}
.event-group-batch-panel header label{display:inline-flex;align-items:center;gap:5px;cursor:pointer}
.event-group-batch-panel header input{margin:0;accent-color:#2c72df}
.event-group-batch-content{padding:12px 14px}
.event-group-batch-content textarea,.event-group-batch-steps input{box-sizing:border-box;width:100%;border:1px solid #d9dbe1;border-radius:3px;background:#fff;color:#30343b;padding:6px 8px;font:inherit}
.event-group-batch-content textarea{display:block;min-height:112px;max-height:40vh;resize:vertical}
.event-group-batch-steps:not([hidden]){display:grid;gap:10px}
.event-group-batch-steps label{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:8px}
.event-group-batch-panel footer button:disabled{background:#e9ecf2;color:#8c929d;cursor:default}

.event-split-time-settings{width:300px}
.event-split-time-settings .event-group-setting-body{padding:16px 15px 8px}
.event-time-group-heading{font-size:14px;font-weight:600;margin-bottom:14px}
.event-time-group-choices{display:grid;gap:12px}
.event-time-group-choices label,.event-time-group-summary{display:flex;align-items:center;gap:8px}
.event-time-group-choices label{cursor:pointer}
.event-time-group-choices input{width:16px;height:16px;margin:0;accent-color:#2477eb}
.event-time-group-summary{gap:26px}
.event-time-group-summary .event-group-time-trigger{height:28px;min-width:62px}
.event-time-group-summary .event-group-time-trigger:disabled{border-color:#d9dbe1;color:#6e7279;cursor:default}
.event-split-time-settings footer{border-top:0;padding:8px 15px 15px}
.event-split-time-settings footer button{height:24px;padding:0 8px}
.event-split-time-settings footer [data-group-settings-cancel]{background:#2c72df;color:#fff}
.event-split-time-settings footer [data-group-settings-cancel]:hover{background:#225fc6}

:is(#segments-table,#tags-table) [data-audience-column][hidden] { display:none; }
.audience-column-settings { float:right; display:grid; place-items:center; width:24px; height:24px; min-height:0; padding:4px; border:0; background:transparent; color:inherit; cursor:pointer; }
.audience-column-settings svg { width:16px; height:16px; }

/* 事件分析结果工具栏 */
.event-table-toolbar { display:grid;grid-template-columns:max-content max-content;justify-content:end;position:relative;column-gap:12px;margin:8px 0 16px; }
.event-table-toolbar > button { display:inline-flex;align-items:center;justify-content:center;gap:4px;height:32px;padding:0 16px;border:1px solid #dedede;border-radius:4px;background:#fff;color:#333;font-size:14px;font-weight:400;white-space:nowrap; }
.event-table-toolbar > [data-event-layout-open] { min-width:99px; }
.event-table-toolbar > button:is(:hover,[aria-expanded=true]) { border-color:#327bff;outline:none; }
.event-layout-sort-icon { width:14px;height:14px;flex:none; }
[data-direction="desc"] .event-layout-sort-icon,[data-event-layout-direction="desc"] .event-layout-sort-icon { transform:scaleY(-1); }
[data-event-layout-open][data-mode="event"] .event-layout-sort-icon,[data-event-layout-open][data-direction="default"] .event-layout-sort-icon { display:none; }
.event-layout-menu,.event-layout-submenu { box-sizing:border-box;position:absolute;z-index:8;width:100px;padding:4px;background:#fff;border:1px solid #eceef2;border-radius:4px;box-shadow:0 8px 20px #1820351c; }
.event-layout-menu { grid-column:1;justify-self:start;top:calc(100% + 8px); }
.event-layout-submenu { left:calc(100% - 1px); }
.event-layout-menu button { display:flex;align-items:center;justify-content:space-between;width:100%;height:32px;padding:0 8px;text-align:left;white-space:nowrap;background:#fff;border:0;border-radius:4px; }
.event-layout-menu button,.event-group-field-options button { color:#333;font-size:14px;font-weight:400; }
.event-layout-menu button:is(:hover,:focus-visible,[aria-expanded=true],[data-selected]) { background:#eff1f5; }
.event-layout-menu[hidden],.event-layout-submenu[hidden],.event-stage-method-menu[hidden] { display:none; }
.event-by-metric th { padding:8px 12px;white-space:nowrap; }
.event-table-page { display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:8px; }

.event-stage-settings { box-sizing:border-box;width:min(600px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:0;border:0;border-radius:8px;overflow:visible;background:#fff;color:#333;font-size:14px; }
.event-stage-settings:focus { outline:none; }
.event-stage-settings::backdrop { background:#0006; }
.event-stage-settings form { display:flex;flex-flow:column nowrap;align-items:stretch;gap:0;max-height:calc(100dvh - 24px);margin:0; }
.event-stage-body { overflow:auto;padding:16px 40px 32px; }
.event-stage-settings header,.event-stage-settings footer { display:flex;align-items:center;gap:12px; }
.event-stage-settings h3 { flex:1;margin:0;font-size:16px;font-weight:500;color:#222; }
.event-stage-settings p { margin:0 0 24px;color:#888;line-height:22px; }
.event-stage-settings table { width:100%;table-layout:fixed;border-collapse:collapse; }
.event-stage-settings th,.event-stage-settings td { padding:12px 16px;text-align:center;vertical-align:middle;background:#fff;border:0; }
.event-stage-settings th { border-bottom:1px solid #dedfe3;color:#222;font-weight:500; }
.event-stage-settings th:first-child { width:46%; }
.event-stage-settings th:nth-child(2) { width:29%; }
.event-stage-metric { display:flex;align-items:center;justify-content:center;gap:8px; }
.event-stage-metric > :first-child { display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:4px;background:#20213d;color:#fff; }
.event-stage-metric > :last-child { max-width:136px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.event-stage-settings button { font-size:14px;font-weight:400; }
.event-stage-settings [data-stage-cancel] { border:0;background:transparent;color:#333; }
.event-stage-settings header button { width:24px;height:24px;padding:0;font-size:20px;line-height:1; }
.event-stage-method { display:inline-flex;align-items:center;justify-content:space-between;gap:8px;max-width:100%;height:32px;padding:0 8px;border:1px solid #dedede;border-radius:4px;background:#fff;color:#333;white-space:nowrap; }
.event-stage-method span { overflow:hidden;text-overflow:ellipsis; }
.event-stage-method:is(:hover,[aria-expanded=true]) { border-color:#327bff;outline:none; }
.event-stage-method[aria-expanded=true] { box-shadow:0 0 0 3px #2878f52b; }
.event-stage-method i { width:5px;height:5px;flex:none;border-right:1px solid #777;border-bottom:1px solid #777;transform:rotate(45deg) translateY(-2px); }
.event-stage-method[aria-expanded=true] i { transform:rotate(225deg); }
.event-stage-method-menu { box-sizing:border-box;position:fixed;z-index:2;width:120px;padding:4px;overflow:auto;background:#fff;border-radius:4px;box-shadow:0 8px 22px #18203524; }
.event-stage-method-menu button { display:block;width:100%;height:42px;padding:0 8px;border:0;border-radius:4px;background:#fff;color:#333;text-align:left;white-space:nowrap; }
.event-stage-method-menu button:is(:hover,:focus-visible,[aria-checked=true]) { background:#f0f2f6;outline:none; }
.event-stage-switch { position:relative;display:block;width:40px;height:20px;margin-inline:auto; }
.event-stage-switch input { box-sizing:border-box;appearance:none;display:block;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:10px;background:#dadce5;cursor:pointer; }
.event-stage-switch span { position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;pointer-events:none; }
.event-stage-switch input:checked { background:#2477eb; }
.event-stage-switch input:checked + span { left:23px; }
.event-stage-help { box-sizing:border-box;position:fixed;z-index:3;width:min(240px,calc(100vw - 16px));padding:10px 12px;border-radius:4px;background:#222;color:#fff;font-size:14px;line-height:22px;pointer-events:none; }
.event-stage-help[hidden] { display:none; }
.event-stage-help::after { content:"";position:absolute;top:100%;left:var(--event-stage-help-arrow);transform:translateX(-50%);border:8px solid transparent;border-top-color:#222; }
.event-stage-help[data-below]::after { top:auto;bottom:100%;border-top-color:transparent;border-bottom-color:#222; }
.event-stage-help-calendar { display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:4px 0;padding:8px;background:#fff;text-align:center;font-size:12px; }
.event-stage-help-calendar span { border-radius:3px;background:#384bd4; }
.event-stage-help-calendar span:last-child { background:#a4adef;outline:2px dashed #ff8a32;outline-offset:2px; }
.event-stage-help-copy { color:#ddd; }
.event-stage-settings footer { flex:none;margin:0 8px;padding:11px 32px;border-top:1px solid #dedfe3; }
.event-stage-settings footer label { display:flex;align-items:center;gap:8px;margin-right:auto;font-size:14px;color:#333;white-space:nowrap; }
.event-stage-settings footer input { width:16px;height:16px;margin:0;padding:0;accent-color:#2477eb; }
.event-stage-settings footer button { min-width:60px;height:32px;padding:0 12px;border-radius:4px; }
.event-stage-settings footer .primary { border:0;background:#2477eb;color:#fff; }
.event-stage-settings footer .primary:hover { background:#1768db; }
@media (max-width:520px) {
  .event-stage-body { padding-left:16px;padding-right:16px; }
  .event-stage-settings footer { padding-left:8px;padding-right:8px; }
  .event-stage-settings th,.event-stage-settings td { padding-left:4px;padding-right:4px; }
  .event-stage-settings th:first-child { width:40%; }
  .event-stage-settings th:nth-child(2) { width:30%; }
}

/* 事件分析结果的表格展示切换 */
.event-table-toolbar { grid-template-columns:minmax(0,1fr) repeat(3,max-content); }
.event-table-toolbar > [data-event-table-export] { background:#f0f3f8; color:#293650; border-color:transparent; }
.event-layout-menu { grid-column:2; }
.event-display-controls { display:flex;align-self:center;justify-self:start; }
.event-display-controls button { height:32px;padding:0 7px;border:1px solid #dedfe3;border-radius:0;background:#fff;color:#777;font-size:14px;font-weight:400;white-space:nowrap; }
.event-display-controls button + button { margin-left:-1px; }
.event-display-controls button:first-child { border-radius:4px 0 0 4px; }
.event-display-controls button:last-child { border-radius:0 4px 4px 0; }
.event-display-controls button[aria-pressed="true"] { background:#e9ebf1;color:#343841;font-weight:600; }
.event-display-controls button:hover:not(:disabled) { background:#f0f1f5; }
.event-display-controls button:disabled { color:#b7bbc4;cursor:default; }
.event-layer-table th { white-space:nowrap; }
.event-layer-toggle { width:24px;height:24px;margin-right:6px;padding:0;border:0;background:transparent; }
.event-table-sort small { margin-left:4px;font-size:10px; }
@media (max-width:520px) {
  .event-table-toolbar { column-gap:6px; }
  .event-table-toolbar > button { min-width:0;padding-inline:6px; }
  .event-table-toolbar > [data-event-layout-open] { min-width:0; }
}
.event-table-left { display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;min-width:0; }
.event-group-search { display:flex;align-items:stretch;width:264px;max-width:100%;height:32px;border:1px solid #dedfe3;border-radius:4px;background:#fff;box-sizing:border-box; }
.event-group-field { position:relative;max-width:44%;border-right:1px solid #dedfe3; }
.event-group-field summary { display:flex;align-items:center;gap:8px;height:100%;padding:0 10px;list-style:none;color:#444;font-size:14px;cursor:pointer; }
.event-group-field summary::-webkit-details-marker { display:none; }
.event-group-field summary span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.event-group-field summary::after { content:"";flex:none;width:5px;height:5px;border:solid #777;border-width:0 1px 1px 0;transform:translateY(-2px) rotate(45deg); }
.event-group-field[open] summary::after { transform:translateY(1px) rotate(225deg); }
.event-group-field-options { position:absolute;z-index:9;top:calc(100% + 2px);left:0;min-width:100%;max-width:min(240px,75vw);max-height:248px;overflow:auto;padding:4px;background:#fff;border-radius:4px;box-shadow:0 4px 16px #161e3026; }
.event-group-field-options button { display:block;width:100%;height:40px;padding:0 8px;border:0;border-radius:4px;background:#fff;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.event-group-field-options button:is(:hover,:focus-visible,[aria-pressed=true]) { background:#eff1f5; }
.event-group-search label { position:relative;display:flex;align-items:center;gap:6px;flex:1;min-width:0;padding:0 8px;color:#aaa; }
.event-group-search svg { width:15px;height:15px;flex:none; }
.event-group-search input { flex:1;width:100%;min-width:0;height:100%;padding:0;border:0;background:transparent;font-size:14px; }
.event-group-search input::placeholder { color:#b4b4b4; }
.event-group-search input:focus { outline:none; }
.event-group-search label:hover::after { content:"";position:absolute;inset:-1px;border:1px solid #327bff;border-radius:4px;z-index:1;pointer-events:none; }
.event-group-field[open] summary { outline:1px solid #327bff;outline-offset:0;border-radius:3px; }
.search-match { background:#ffeb35;color:inherit; }
@media (max-width:650px) {
  .event-table-toolbar:has(.event-group-search) { grid-template-columns:minmax(0,1fr) repeat(3,max-content);row-gap:6px; }
  .event-table-toolbar:has(.event-group-search) .event-table-left { grid-column:1/-1; }
  .event-table-toolbar:has(.event-group-search) > [data-event-layout-open] { grid-column:2; }
}

#user-profile-table .user-inspection-identity-table { table-layout:fixed; }
#user-profile-table .user-inspection-identity-table :is(th,td):not(.empty) { width:50%; height:36px; padding:4px 9px; text-align:left !important; }
#user-profile-table .user-inspection-identity-table th { background:#f7f7f9; color:#222; font-weight:400; }
#user-profile-table .user-inspection-identity-table td { color:#707070; }
#user-inspection-profile { width:min(1600px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 32px); padding:0; border:0; border-radius:5px; color:#303033; background:#f0f0f2; }
#user-inspection-profile::backdrop { background:#17203355; }
#user-inspection-profile > header { display:flex; align-items:center; gap:12px; padding:12px 16px; background:#fff; }
#user-inspection-profile > [hidden] { display:none; }
#user-inspection-profile h2, #user-inspection-profile h3 { margin:0; font-size:16px; font-weight:500; }
#user-inspection-profile [data-inspection-profile-id] { min-width:0; overflow-wrap:anywhere; color:#707078; font-size:13px; }
#user-inspection-profile [data-inspection-back] { flex:none; margin-left:auto; border:0; background:transparent; cursor:pointer; font-size:20px; }
.user-inspection-profile-layout { display:grid; grid-template-columns:minmax(180px,21%) minmax(0,1fr); gap:16px; min-height:min(650px,70dvh); padding:6px; }
.user-inspection-profile-layout > :is(aside,section) { background:#fff; border-radius:4px; }
.user-inspection-profile-layout > section { padding:20px 24px; }
.user-inspection-profile-layout h3 { padding-bottom:14px; border-bottom:1px solid #dedee2; }
.user-inspection-profile-layout summary { padding:14px 16px; cursor:pointer; }
.user-inspection-profile-layout details + details { border-top:1px solid #dedee2; }
.user-inspection-profile-layout p, [data-inspection-profile-values] { padding:0 16px; color:#676872; font-size:13px; }
.user-inspection-profile-layout section p { padding:0; }
[data-inspection-profile-values] dl > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; padding:8px 0; border-bottom:1px solid #eee; }
[data-inspection-profile-values] dd { margin:0; color:#303033; overflow-wrap:anywhere; }
@media(max-width:600px) { .user-inspection-profile-layout { grid-template-columns:1fr; align-content:start; gap:8px; } }

/* 用户行为序列 */
.user-inspection-profile-layout { min-height:min(743px, calc(100dvh - 92px)); }
.user-inspection-profile-layout > aside { display:flex; flex-direction:column; min-width:0; }
.user-inspection-profile-layout > aside summary { list-style:none; }
.user-inspection-profile-layout > aside summary::after { content:'›'; float:right; }
.user-inspection-profile-layout > aside details[open] summary::after { transform:rotate(90deg); }
.user-inspection-profile-layout > section.activity-main { min-width:0; padding:16px 24px 24px; }
.activity-user-switch { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 20px; margin-top:auto; background:#f7f7fa; font-size:13px; }
.activity-user-switch button { width:26px; height:26px; padding:0; border-color:#dedee2; }
.activity-user-switch button:disabled { opacity:.45; }
.activity-toolbar, .activity-chart-head { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.activity-toolbar :is(button:not([data-activity-date]), select, summary) { box-sizing:border-box; height:32px; padding:0 9px; border:1px solid #dedee2; border-radius:4px; background:#fff; color:#303033; font-size:13px; cursor:pointer; }
.activity-toolbar summary { line-height:30px; list-style:none; white-space:nowrap; }
.activity-toolbar summary::after { content:'⌄'; margin-left:7px; }
.activity-event-trigger::before, [data-activity-locate] > summary::before { content:''; display:inline-block; width:12px; height:12px; margin-right:6px; vertical-align:-1px; background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2369717d' stroke-linejoin='round'%3E%3Crect x='1.5' y='2.5' width='13' height='11' rx='1'/%3E%3Cpath d='M4 5h8L9 8v3l-2-1V8z'/%3E%3C/svg%3E"); }
[data-activity-order]::before { content:''; display:inline-block; width:12px; height:12px; margin-right:6px; vertical-align:-1px; background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234b525b' stroke-linecap='round'%3E%3Cpath d='M4 3v10m-2-2 2 2 2-2m2-7h5m-5 4h3m-3 4h1'/%3E%3C/svg%3E"); }
[data-activity-properties]::after { content:'⌄'; margin-left:7px; }
.activity-chart-head { margin-top:16px; padding:10px 14px 12px; border-bottom:1px solid #dedee2; }
.activity-toolbar .activity-event-trigger,
.activity-toolbar [data-activity-locate] > summary { border-color:#e3e4e5;color:#333;font-size:14px; }
.activity-toolbar [data-activity-locate] > summary { min-width:120px; }
.activity-toolbar :is(.activity-event-trigger,[data-activity-locate] > summary):hover { border-color:#3583ef;box-shadow:none; }
.activity-toolbar details[open] > :is(.activity-event-trigger,summary) { border-color:#1e76f0; }
.activity-chart-head h3 { flex:1;padding:0;border:0;color:#212121; }
.activity-chart-head label, .activity-toolbar label { display:inline-flex; align-items:center; gap:7px; font-size:13px; color:#444; }
.activity-chart-head input, .activity-toolbar > label input { appearance:none; flex:none; width:32px; height:16px; padding:0; border:0; border-radius:12px; background:#d9dce5; cursor:pointer; }
.activity-chart-head input::before, .activity-toolbar > label input::before { content:''; display:block; width:12px; height:12px; margin:2px; border-radius:50%; background:#fff; }
.activity-chart-head input:checked, .activity-toolbar > label input:checked { background:#2e7de9; }
.activity-chart-head input:checked::before, .activity-toolbar > label input:checked::before { transform:translateX(16px); }
[data-activity-chart] { min-height:320px; height:clamp(320px, 48vh, 420px); overflow:auto; }
[data-activity-chart] svg { display:block; width:100%; height:100%; }
[data-activity-chart] text { fill:#737e99; font-size:11px; }
[data-activity-chart] line { stroke:#e2e8f4; stroke-dasharray:4 4; }
[data-activity-chart] rect:hover { opacity:.84; }
.activity-main .activity-chart-empty { display:grid; height:100%; margin:0; place-items:center; color:#8b909a; }
.activity-legend { display:flex; flex-wrap:wrap; gap:8px 16px; padding:0 10px 12px; color:#555; font-size:12px; }
.activity-legend i { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:4px; }
.activity-timeline-tools { border-top:1px solid #dedee2; padding:20px 0 12px; }
.activity-timeline-tools > label { margin-left:auto; }
.activity-picker { position:relative; }
.activity-picker > div { position:absolute; z-index:2; top:calc(100% + 5px); left:0; width:min(245px, 70vw); padding:8px; border:1px solid #dedee2; border-radius:4px; background:#fff; box-shadow:0 8px 20px #0002; }
.activity-picker label { display:flex; width:100%; min-height:30px; overflow-wrap:anywhere; }
.activity-picker input[type=checkbox] { height:auto; }
.activity-picker input[type=search] { width:100%; }
.activity-picker [data-activity-event-options] { max-height:220px; overflow:auto; }
.activity-picker footer { display:flex; justify-content:space-between; margin-top:5px; }
.activity-picker > .activity-event-picker {
  position:fixed; inset:auto; margin:0; box-sizing:border-box;
  width:min(430px, calc(100vw - 24px)); height:min(490px, calc(100dvh - 24px));
  padding:0; overflow:visible;
}
.activity-event-picker:popover-open { display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
.activity-event-search { display:flex; align-items:center; padding:8px 12px; }
.activity-event-search > input[type=search] { min-width:0; flex:1; height:30px; border:0; }
.activity-event-picker > [data-activity-event-options] { min-height:0; max-height:none; overflow:hidden; border-top:1px solid #e8ecea; }
.activity-event-picker .event-picker-list { height:100%; box-sizing:border-box; }
.activity-event-picker .event-picker-navigation button { height:34px; padding:0 8px; border:0; border-radius:0; font-size:12px; }
.activity-event-picker > footer { justify-content:flex-end; gap:10px; margin:0; padding:8px 12px; border-top:1px solid #e8ecea; }
.activity-event-picker [data-activity-apply]:enabled { border-color:#1e76f0; background:#1e76f0; color:#fff; }
.activity-event-option { display:flex; align-items:center; }
.activity-event-option > label { flex:1; min-width:0; align-items:center; gap:6px; padding:0 6px; font-size:12px; cursor:pointer; }
.activity-event-option > label span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.activity-event-option > label small { margin-left:auto; color:#747f7b; white-space:nowrap; }
.activity-event-option:hover { background:#f4f8ff; }
.activity-event-option .bi-field-picker-favorite { flex:none; width:28px; height:28px; padding:0; border:0; background:transparent; color:#687973; font-size:16px; }
.activity-event-option .bi-field-picker-favorite.active { color:#b47800; }
.activity-event-picker [data-activity-event-any][aria-pressed=true] { background:#f4f8ff; color:#2563eb; }
.activity-event-picker > .bi-event-detail { position:absolute; width:276px; pointer-events:none; overflow-wrap:anywhere; }
.activity-event-picker[data-preview-placement=right] > .bi-event-detail { left:calc(100% + 8px); }
.activity-event-picker[data-preview-placement=left] > .bi-event-detail { right:calc(100% + 8px); }
.activity-event-picker[data-preview-placement=inside] > .bi-event-detail { right:8px; top:auto!important; bottom:49px; width:min(250px, 75%); max-height:110px; }
.activity-main [data-activity-status] { margin:8px 0; padding:0; }
.activity-main [data-activity-status]:empty { display:none; }
#user-inspection-profile [data-inspection-loading]::before, [data-event-layer-loading]::before { content:""; display:inline-block; width:12px; height:12px; margin-right:6px; vertical-align:-2px; border:2px solid #dbe3ee; border-top-color:#2563eb; border-radius:50%; animation:data-spin .8s linear infinite; }
[data-activity-timeline] h4 { margin:20px 8px 9px; font-size:14px; font-weight:500; }
.activity-event { display:grid; grid-template-columns:96px minmax(0,1fr); gap:13px; padding-bottom:6px; }
.activity-event time { position:relative; align-self:stretch; padding:18px 12px 0 0; color:#858989; font-size:13px; font-weight:500; text-align:right; }
.activity-event time::before { position:absolute; right:0; top:0; bottom:-6px; border-right:1px solid #e0e1e5; content:''; }
.activity-event time::after { position:absolute; right:-6px; top:21px; width:14px; height:14px; content:''; background:#dedfe1; border-radius:50%; }
.activity-event > details { min-width:0; border:1px solid #dedee2; border-radius:4px; }
.activity-event summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-height:52px; box-sizing:border-box; padding:8px 9px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.activity-event summary::-webkit-details-marker { display:none; }
.activity-event summary::before { width:5px; height:5px; flex:none; border-top:1px solid currentColor; border-right:1px solid currentColor; transform:rotate(45deg); content:''; }
.activity-event [open] > summary::before { transform:rotate(135deg); }
.activity-event summary:hover, .activity-event details[open] > summary { background:#f5f5f7; }
.activity-event summary small { font-size:12px; font-weight:400; color:#777d85; overflow-wrap:anywhere; }
.activity-event dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 64px; padding:8px 0 0; margin:0; font-size:14px; }
.activity-event dl > div, [data-activity-tags] dl > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); gap:10px; padding:8px 0; border-bottom:1px solid #eee; }
.activity-event dl > div { min-height:40px; box-sizing:border-box; align-items:center; padding:8px 24px; border-color:#dedee2; }
.activity-event dt { color:#858989; overflow-wrap:anywhere; }
.activity-event dd { color:#303033; text-align:right; }
@media(min-width:601px) {
  .activity-event dl { background:linear-gradient(#dedee2,#dedee2) center bottom / 1px calc(100% - 8px) no-repeat; }
}
.activity-event dd, [data-activity-tags] dd { margin:0; overflow-wrap:anywhere; }
[data-activity-tags] { padding:0 16px; font-size:13px; }
[data-activity-tags] p { padding:0; }
[data-activity-more] { margin-top:10px; }
@media(max-width:600px) {
  .user-inspection-profile-layout > section.activity-main { padding:12px; }
  .activity-user-switch { padding:6px 14px; }
  .activity-timeline-tools > label { margin-left:0; }
  .activity-event { grid-template-columns:90px minmax(0,1fr); gap:9px; }
  .activity-event dl { grid-template-columns:minmax(0,1fr); }
  .activity-event dl > div { padding-inline:12px; }
}

@media(min-width:601px) {
  .user-inspection-profile-layout { height:min(743px, calc(100dvh - 100px)); min-height:0; }
  .user-inspection-profile-layout > :is(aside,section) { overflow:auto; }
  .activity-user-switch { position:sticky; bottom:0; }
}
.activity-event:has([data-activity-around]) { grid-template-columns:96px minmax(0,1fr) auto; align-items:start; }
[data-activity-around] { height:30px; border-color:#dedee2; font-size:13px; }
.activity-event-anchor > details { border-color:#91bafa; background:#f3f7ff; }
[data-activity-context] { margin:0 0 10px; font-size:13px; }
[data-activity-end] { text-align:center; }
@media(max-width:600px) {
  .activity-event:has([data-activity-around]) { grid-template-columns:90px minmax(0,1fr); }
  [data-activity-around] { grid-column:2; justify-self:start; }
}
.activity-picker[data-activity-locate] > div { box-sizing:border-box; height:260px; max-height:calc(100dvh - 16px); display:flex; flex-direction:column; overflow:hidden; }
[data-activity-locate] > div > input { flex:none; }
[data-activity-locate-options] { flex:1; min-height:0; overflow:auto; }
[data-activity-locate-options] button { display:block; width:100%; border:0; text-align:left; }
[data-activity-locate-options] button:is(:hover,:focus-visible) { background:#eff5ff; }
.activity-tag-search { padding:0 16px 8px; }
.activity-tag-search input { width:100%; height:30px; border-color:#dedee2; font-size:13px; }
[data-activity-tags] h4 { margin:10px 0 4px; color:#707078; font-size:12px; font-weight:500; }
[data-activity-tags] dl { margin:0 0 12px; }

/* 用户细查左栏的两个展开区 */
.user-inspection-profile-layout > aside .activity-profile-section > summary {
  display:flex; align-items:center; gap:8px; min-height:48px; padding:0 24px; border-radius:0;
}
.user-inspection-profile-layout > aside .activity-profile-section > summary:focus {
  outline:none; box-shadow:none;
}
.user-inspection-profile-layout > aside .activity-profile-section > summary:focus-visible {
  background:#f2f4f8;
}
.user-inspection-profile-layout > aside .activity-profile-section > summary::after { margin-left:auto; }
.activity-profile-section > summary svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.15; }
.activity-profile-section[open] > summary { margin-bottom:4px; }
[data-inspection-profile-values] { padding:0 24px 8px; }
[data-inspection-profile-values] dl { margin:12px 0 0; }
[data-inspection-profile-values] dl > div { min-height:38px; padding:8px 0; border-bottom:0; }
[data-inspection-profile-values] dt { color:#808084; overflow-wrap:anywhere; }
[data-inspection-profile-values] dd { text-align:right; }
.activity-profile-picker { min-height:32px; padding:0 8px; border:1px solid #dedee2; border-radius:4px; background:#fff; color:#333; }
.activity-profile-options { position:fixed; inset:auto; margin:0; height:min(484px, calc(100dvh - 24px)); padding:0; overflow:visible; border:0; border-radius:2px; background:#fff; color:#333; box-shadow:0 8px 24px rgba(25,31,45,.12); font-size:14px; }
.activity-profile-options:popover-open { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; }
.activity-profile-options svg { flex:none; width:12px; height:12px; }
.activity-profile-search { display:flex; align-items:center; height:45px; padding:0 12px; border-bottom:1px solid #dedee2; }
.activity-profile-search label { flex:1; min-width:0; display:flex; align-items:center; gap:8px; }
.activity-profile-search input[type=search] { min-width:0; width:100%; height:30px; padding:0; border:0; border-radius:2px; background:#fff; box-shadow:none!important; }
.activity-profile-search input::placeholder { color:#b9b9bc; }
.activity-profile-options nav { display:flex; align-items:stretch; gap:12px; min-height:36px; padding:0 12px; border-bottom:1px solid #dedee2; overflow-x:auto; }
.activity-profile-options nav button { flex:none; height:35px; margin:0; padding:0; border:0; border-bottom:4px solid transparent; border-radius:0; background:transparent; color:#7e7f80; font-size:12px; white-space:nowrap; box-shadow:none!important; }
.activity-profile-options nav button[aria-selected=true] { border-bottom-color:#1b75fa; color:#333; font-weight:600; }
.activity-profile-choices { overflow:auto; padding:0 12px 0 8px; }
.activity-profile-choices section + section { margin-top:5px; border-top:1px solid #dedee2; }
.activity-profile-choices h4 { margin:9px 0 6px; }
.activity-profile-choices [data-property-group] { display:flex; align-items:center; gap:6px; height:32px; padding:0 4px; border:0; background:transparent; color:#7e7f80; font-weight:500; box-shadow:none!important; }
.activity-profile-choices [data-property-group] i { color:#f2aa00; font-style:normal; }
.activity-profile-choices [data-property-group] span { display:grid; place-items:center; width:16px; height:16px; border:1px solid #dedee2; border-radius:2px; font-size:12px; }
.activity-profile-choices [data-property-group]:is([aria-pressed=true],[aria-pressed=mixed]) span { border-color:#1b73ed; background:#1b73ed; color:#fff; }
.activity-profile-choices [data-property-group][aria-pressed=true] span::before { content:'✓'; }
.activity-profile-choices [data-property-group][aria-pressed=mixed] span::before { content:'−'; }
.activity-profile-choices label { display:flex; align-items:center; gap:6px; min-height:30px; padding:2px 4px 2px 12px; }
.activity-profile-choices label span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.activity-profile-choices input { flex:none; width:16px; height:16px; margin:0; accent-color:#1b73ed; }
.activity-profile-choices input:disabled + span { color:#a1a1a4; }
.activity-profile-choices small { display:flex; align-items:center; gap:5px; margin-left:auto; min-width:52px; color:#7e7f80; font-size:12px; white-space:nowrap; }
.activity-profile-empty { padding:12px 12px 15px; color:#b9b9bc; }
.activity-profile-options footer { display:flex; justify-content:flex-end; align-items:center; gap:12px; height:49px; padding:0 12px; border-top:1px solid #dedee2; }
.activity-profile-options footer button { width:60px; height:32px; padding:0; border:0; border-radius:4px; color:#202241; }
.activity-profile-options [data-property-apply] { background:#1b73ed; color:#fff; }
.activity-profile-card { position:fixed; z-index:2; width:280px; height:226px; max-height:calc(100dvh - 24px); display:flex; flex-direction:column; overflow:hidden; border:0; border-radius:2px; background:#fff; box-shadow:0 8px 24px rgba(25,31,45,.12); }
.activity-profile-card.activity-profile-card-inset { position:absolute; inset:auto 8px 50px; width:auto; height:min(226px,65%); }
.activity-profile-card-head { display:flex; flex:none; align-items:flex-start; gap:8px; min-height:62px; padding:12px; border-radius:4px 4px 0 0; background:#f6f6f9; }
.activity-profile-card-head > svg { margin-top:5px; }
.activity-profile-card-head > div { min-width:0; flex:1; overflow-wrap:anywhere; }
.activity-profile-card-head strong,.activity-profile-card-head [data-property-name] { display:block; }
.activity-profile-card-head [data-property-name] { margin-top:2px; font-size:12px; }
.activity-profile-card-head small { flex:none; color:#7e7f80; font-size:12px; }
.activity-profile-card-head button { display:inline-grid; place-items:center; flex:none; width:24px; height:24px; padding:0; border:0; background:transparent; }
.activity-profile-card p { flex:1; min-height:0; margin:0; padding:12px; overflow:auto; overflow-wrap:anywhere; white-space:pre-wrap; }
.activity-profile-card-meta { display:flex; flex:none; align-items:center; gap:5px; min-height:34px; padding:0 12px; border-top:1px solid #dedee2; color:#7e7f80; font-size:12px; }
.activity-tag-search { display:flex; padding:6px 24px 0; }
.activity-tag-search input { min-width:0; padding:0 8px; border-radius:3px 0 0 3px; }
.activity-tag-kind > summary { display:flex; align-items:center; gap:6px; height:30px; padding:0 8px; white-space:nowrap; border:1px solid #dedee2; border-left:0; border-radius:0 3px 3px 0; background:#fff; font-size:13px; cursor:pointer; }
.activity-tag-kind { flex:0 0 106px; }
.activity-tag-kind > summary:focus { outline:none; box-shadow:none; }
.activity-tag-kind > summary:focus-visible { background:#f2f4f8; }
.activity-tag-kind > div { left:0; right:auto; width:100%; padding:4px; box-sizing:border-box; }
.activity-tag-kind button { display:block; width:100%; border:0; padding:5px 9px; background:#fff; color:#333; text-align:left; }
.activity-tag-kind button:is(:hover,:focus-visible,[aria-pressed=true]) { background:#eff5ff; color:#245be6; }
[data-activity-tags] { padding:0 24px 8px; }
[data-activity-tags] section { margin:16px 0 22px; }
[data-activity-tags] h4 { margin:0 0 10px; color:#333; font-size:14px; font-weight:500; }
[data-activity-tags] dl { display:grid; justify-items:start; gap:8px; margin:0; }
[data-activity-tags] dl > div { display:inline-flex; flex-wrap:wrap; gap:4px; max-width:100%; padding:1px 4px; border:0; border-radius:2px; background:#e9ebf0; font-size:12px; }
[data-activity-tags] dt { overflow-wrap:anywhere; }
[data-activity-tags] dt::after { content:'：'; }
[data-activity-tags] dd { color:#20253b; }
[data-activity-tags] section p { margin:0; color:#a2a2a6; }
.activity-profile-choice { position:relative; display:flex; align-items:center; border-radius:4px; }
.activity-profile-choice:is(:hover,:focus-within) { background:#f4f4f7; }
.activity-profile-choice label { flex:1; min-width:0; }
.activity-profile-choice button { flex:none; width:24px; height:30px; border:0; background:transparent; color:#333; padding:0; box-shadow:none!important; }
.activity-profile-choice [data-property-favorite] { opacity:0; }
.activity-profile-choice:hover [data-property-favorite], .activity-profile-choice [data-property-favorite]:is(:focus,[aria-pressed=true]) { opacity:1; }
.activity-profile-choice [data-property-favorite][aria-pressed=true] { color:#f2aa00; }
.activity-profile-choice [data-property-info] { position:absolute; right:24px; opacity:0; pointer-events:none; }
.activity-profile-choice [data-property-info]:focus-visible { opacity:1; pointer-events:auto; background:#f4f4f7; }
.activity-profile-compact .activity-profile-choice [data-property-info] { position:static; opacity:1; pointer-events:auto; }
@media (hover:none) {
  .activity-profile-choice [data-property-favorite], .activity-profile-choice [data-property-info] { position:static; opacity:1; pointer-events:auto; }
}

.virtual-property-dialog { width:100vw; max-width:none; max-height:100dvh; padding:0; border:0; margin:0; background:#f0f0f2; color:#28282b; }
.virtual-property-dialog::backdrop { background:#151b2760; }
.virtual-property-dialog form { display:flex; flex-flow:column nowrap; align-items:stretch; gap:0; height:100dvh; }
.virtual-property-dialog header { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:56px; padding:0 32px; background:#fff; }
.virtual-property-dialog header h2 { display:flex; align-items:center; gap:12px; margin:0; font-size:20px; }
.virtual-property-dialog header [data-close] { background:transparent; border:0; color:#292929; font-weight:400; }
.virtual-property-dialog header h2 button { padding:0; min-width:24px; font-size:20px; }
.virtual-property-dialog header button { min-width:60px; height:32px; margin-left:8px; }
.virtual-property-body { display:grid; grid-template-columns:400px minmax(0,1fr); flex:1; min-height:0; margin:24px; background:#fff; border-radius:4px; overflow:hidden; }
.virtual-property-body aside,.virtual-property-body main { padding:24px 32px; min-width:0; min-height:0; }
.virtual-property-body aside { display:flex; flex-direction:column; border-inline-end:1px solid #dedee2; }
.virtual-property-body main { margin:0; max-width:none; overflow:auto; }
.virtual-property-body aside nav { display:flex; gap:28px; flex-wrap:nowrap; border-bottom:1px solid #dedee2; }
.virtual-property-body nav button { padding:6px 0 10px; border:0; border-bottom:3px solid transparent; border-bottom-left-radius:0; border-bottom-right-radius:0; background:#fff; color:#777; font-size:14px; font-weight:400; white-space:nowrap; }
.virtual-property-body nav button[aria-pressed=true] { border-bottom-color:#246df5; color:#242424; font-weight:600; }
.virtual-property-body aside input { width:100%; margin:16px 0 8px; }
.virtual-property-search { position:relative; }
.virtual-property-search::before { content:"⌕"; position:absolute; left:10px; top:22px; color:#828791; pointer-events:none; }
.virtual-property-search input { padding-left:30px; }
.virtual-property-options {
  flex:1 1 0; min-height:0; margin-inline-end:-32px; padding-inline-end:24px;
  overflow:auto; overflow-x:hidden; scrollbar-gutter:stable;
}
.virtual-property-options::-webkit-scrollbar { width:8px; }
.virtual-property-options::-webkit-scrollbar-thumb {
  border:1px solid #fff; border-radius:8px; background:#e4e6ed;
}
.virtual-property-options h4 { color:#74747c; margin:16px 0 8px; font-weight:500; }
.virtual-property-dialog aside .virtual-property-options button { display:flex; width:100%; align-items:center; justify-content:space-between; gap:8px; min-height:40px; padding:9px 4px; border:0; background:#fff; color:#292929; font-size:14px; font-weight:400; text-align:left; }
.virtual-property-options button:is(:hover,:focus-visible) { background:#f4f4f6; }
.virtual-property-options button > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.virtual-property-options button > small { flex:none; max-width:40%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.virtual-property-options small,.virtual-property-body main p,.virtual-property-fields small { color:#777b82; }
.virtual-property-body h3 { margin:0 0 12px; font-size:20px; }
.virtual-property-body main p { font-size:12px; margin:0 0 10px; }
.virtual-property-body main a { color:#246df5; }
.virtual-property-editor { display:flex; align-items:stretch; border:1px solid #dedee2; background:#f6f6f8; }
.virtual-property-editor span { flex:0 0 72px; padding:2px 12px; text-align:right; background:linear-gradient(#e9ebf1 22px,#fff 22px); white-space:pre; overflow:hidden; font:13px/20px monospace; }
.virtual-property-editor textarea { flex:1; min-width:0; min-height:110px; border:0; padding:2px 12px; resize:vertical; font:13px/20px monospace; background:linear-gradient(#e9ebf1 22px,#f6f6f8 22px); }
.virtual-property-editor textarea:focus { outline:0; box-shadow:none; }
.virtual-property-type { display:grid; gap:8px; max-width:364px; margin-top:24px; }
.virtual-property-validation { display:flex; align-items:center; gap:12px; margin:24px 0 32px; }
.virtual-property-validation button { flex:none; width:60px; height:32px; }
.virtual-property-dialog :is(input:not([type=radio]),select,button) { min-height:32px; }
.virtual-property-dialog :is(input,select,textarea) { border-color:#dedee2; }
.virtual-property-dialog :is(input,select):not([multiple]) { height:32px; }
.virtual-property-dialog .analysis-save { font-weight:400; }
.virtual-property-body h3:has(+ .virtual-property-fields) { margin-bottom:24px; }
.virtual-property-fields { display:grid; gap:24px; max-width:476px; }
.virtual-property-fields > label,.virtual-property-event-mode > label {
  display:grid; grid-template-columns:60px minmax(0,1fr); gap:16px;
  align-items:start; color:#292929; line-height:32px; text-align:right;
}
.virtual-property-fields > label > *,.virtual-property-event-mode > label > * { min-width:0; text-align:start; }
.virtual-property-fields [data-count] { line-height:normal; }
.virtual-property-fields label[hidden] { display:none; }
.virtual-property-fields :is(input,textarea,select) { width:100%; }
.virtual-property-fields textarea { height:78px; }
.virtual-property-fields small { display:block; text-align:right; }
.virtual-property-prefix { display:flex; align-items:center; }
.virtual-property-prefix span { display:flex; align-items:center; height:32px; padding-inline:10px; border:1px solid #dedee2; border-right:0; white-space:nowrap; }
.virtual-property-prefix input { min-width:0; }
@media(max-width:850px) {
  .virtual-property-dialog header { padding:0 12px; }
  .virtual-property-dialog header h2 { font-size:16px; gap:2px; }
  .virtual-property-editor span { flex-basis:32px; padding-inline:5px; }
  .virtual-property-body { display:block; overflow:auto; margin:10px; }
  .virtual-property-body aside,.virtual-property-body main { padding:14px; overflow:visible; }
  .virtual-property-body aside { border-inline-end:0; border-bottom:1px solid #dedee2; }
  .virtual-property-body aside nav { gap:clamp(6px,4vw,16px); flex-wrap:wrap; }
  .virtual-property-options { flex:auto; max-height:150px; margin-inline-end:-14px; padding-inline-end:6px; }
}
.virtual-property-dialog [data-tag-version-panel] { margin:0 0 8px; font-size:13px; }
.virtual-property-dialog [data-tag-version-panel] label { display:flex; align-items:center; gap:8px; }
.virtual-property-dialog [data-tag-version-panel] input { margin:6px 0; }
.virtual-property-dialog [data-tag-version-panel] input[hidden] { display:none; }

.virtual-property-options button i { display:inline-block; width:20px; margin-inline-end:8px; font-style:normal; }
.virtual-property-confirmation { width:min(420px,calc(100vw - 32px)); padding:24px; border:0; border-radius:6px; color:#292929; }
.virtual-property-confirmation::backdrop { background:#151b2750; }
.virtual-property-confirmation p { margin:16px 0; }
.virtual-property-confirmation footer { display:flex; justify-content:flex-end; gap:8px; }
.virtual-property-confirmation [data-discard] { color:#fff; background:#246df5; border-color:#246df5; }

/* 底部为日期控件的 3px 悬停外圈留出空间。 */
.analysis-result-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px 18px 3px; }
.analysis-result-tools .analysis-viz-switch { align-self:center; margin-left:auto; }
.analysis-result-tools:has(#bi-retention-result-mode-trigger:not([hidden])) .analysis-viz-switch { margin-left:0; }
#bi-retention-result-mode-trigger { width:64px; min-width:64px; font-size:14px; }
.retention-export { width:60px; height:32px; flex:none; padding:0; border:1px solid var(--line); border-radius:4px; background:#f2f5fa; color:var(--ink); font-size:14px; font-weight:400; }
.retention-export:disabled { opacity:.55; cursor:default; }
.analysis-toolbar-actions .analysis-tool-icon { display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:4px; background:#fff; color:#202241; font-weight:400; box-shadow:none; }
.analysis-toolbar-actions .analysis-tool-icon svg { width:16px; height:16px; }
.analysis-toolbar-actions .analysis-tool-icon:disabled { color:#b9becf; cursor:not-allowed; }
.analysis-toolbar-actions .analysis-tool-icon:enabled:is(:hover,:focus-visible,[aria-expanded=true]) { background:#fff; color:#747c94; box-shadow:none; }
.analysis-toolbar-actions .analysis-tool-icon:enabled:active { background:#f2f3f8; color:#202241; box-shadow:none; }
.analysis-toolbar-actions > .analysis-save { height:32px; min-width:92px; border:0; border-radius:4px; font-weight:400; }
#bi-analysis-toolbar #bi-save-chart { background:#1e76f0; color:#fff; box-shadow:none; }
#bi-analysis-toolbar #bi-save-chart:enabled:is(:hover,:focus-visible) { background:#3583ef; box-shadow:none; }
#bi-analysis-toolbar #bi-save-chart:enabled:active { background:#185ec0; box-shadow:none; }
#bi-analysis-toolbar #bi-save-chart:disabled { background:#99b4f3; cursor:not-allowed; box-shadow:none; }
#bi-save-as-chart { border-color:#edf0f4; background:#fff; color:#192338; font-weight:400; }
#bi-save-as-chart:disabled { color:#a6b2c9; cursor:not-allowed; }
#bi-saved-panel { position:fixed; z-index:149; inset:var(--bi-saved-top,0px) 0 0 auto; width:min(400px,100%); display:flex; flex-direction:column; background:#f1f1f3; color:#242832; }
#bi-saved-panel::after { content:""; position:absolute; inset:0 auto 0 0; width:1px; background:#d2d8e2; pointer-events:none; }
#bi-saved-panel[hidden] { display:none; }
#bi-saved-panel > header,#bi-saved-panel > footer { display:flex; flex:none; align-items:center; min-height:56px; padding:0 32px; background:white; }
#bi-saved-panel > header { justify-content:space-between; }
#bi-saved-panel > header button { width:24px; height:32px; padding:0; border:0; background:transparent; font-size:20px; cursor:pointer; }
#bi-saved-panel > footer { border-top:1px solid #e4e6ea; }
#bi-saved-panel > footer button { padding:0; color:#2274ef; }
#bi-saved-panel > footer button[aria-busy=true] { display:inline-flex; align-items:center; gap:8px; cursor:progress; }
#bi-saved-panel > footer button[aria-busy=true]::after {
  content:''; width:16px; height:16px; border:2px solid #dce5e1;
  border-top-color:#2563eb; border-radius:50%; animation:data-spin .8s linear infinite;
}
#bi-saved-list > .bi-saved-loading { position:static; min-height:100%; background:transparent; }
@media (prefers-reduced-motion:reduce) {
  #bi-saved-panel > footer button[aria-busy=true]::after, .bi-saved-loading i { animation:none; }
}
.bi-saved-filters { display:flex; flex:none; align-items:center; justify-content:space-between; gap:12px; box-sizing:border-box; height:48px; padding:0 16px; border-top:1px solid #e3e4e5; background:#fff; color:#333; }
.bi-saved-filters label { display:flex; align-items:center; gap:8px; flex:0 1 216px; min-width:0; height:32px; padding:0 8px; box-sizing:border-box; color:#bdbebf; }
.bi-saved-filters svg { flex:none; width:14px; height:14px; }
.bi-saved-filters input { width:100%; min-width:0; height:30px; padding:0; border:0; background:transparent; color:#333; font-size:14px; font-weight:400; line-height:28px; }
.bi-saved-filters input::placeholder { color:#bdbebf; }
.bi-saved-filters input:focus, .bi-saved-filters button:focus, #bi-saved-panel > header button:focus { outline:none; box-shadow:none; }
#bi-saved-panel :is(#bi-saved-search,[data-bi-saved-report],.bi-saved-delete):is(:hover,:focus,:active) { box-shadow:none; }
.bi-saved-filters button { display:inline-flex; align-items:center; justify-content:space-between; gap:4px; flex:none; min-width:92px; height:32px; padding:0 9px; border:0; background:#fff; color:inherit; font-size:14px; font-weight:400; line-height:22px; cursor:pointer; }
.bi-saved-filters button::after { content:""; flex:none; width:5px; height:5px; margin:0 4px 3px; border:solid #7e7f80; border-width:0 1px 1px 0; transform:rotate(45deg); }
.bi-saved-filters button:disabled { color:#a6b2c9; cursor:not-allowed; }
.bi-saved-list { flex:1; min-height:0; overflow:auto; padding:16px; }
.bi-saved-row > [data-bi-saved-report] { display:flex; align-items:center; gap:8px; width:100%; height:36px; margin:0 0 8px; padding:0 14px; border:0; border-radius:3px; text-align:left; font-size:13px; font-weight:400; color:#323741; background:transparent; cursor:pointer; }
.bi-saved-row:hover [data-bi-saved-report], .bi-saved-row:focus-within [data-bi-saved-report], .bi-saved-row [aria-current=true] { color:#176ef0; }
.bi-saved-row:has([aria-current=true]) { background:#e5ecf8; }
.bi-saved-row { display:flex; align-items:center; min-width:0; margin-bottom:8px; border-radius:3px; background:white; }
.bi-saved-row [data-bi-saved-report] { flex:1; min-width:0; margin:0; }
.bi-saved-row svg { flex:none; }
.bi-saved-delete { display:grid; place-items:center; width:32px; height:32px; margin:0 10px 0 0; padding:0; border:0; background:transparent; color:#242832; cursor:pointer; opacity:0; }
.bi-saved-delete svg { width:16px; height:16px; }
.bi-saved-row:is(:hover,:focus-within) .bi-saved-delete { opacity:1; }
.bi-saved-delete:hover { color:#e54436; background:#fdf2f0; }
@media (hover:none) { .bi-saved-delete { opacity:1; } }
.bi-saved-row [data-bi-saved-report] span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bi-saved-status { margin:12px 0; text-align:center; color:#697586; font-size:13px; }
.bi-saved-status button { margin-left:8px; }
@media(max-width:800px) {
  .analysis-toolbar-actions { max-width:100%; flex-wrap:wrap; justify-content:flex-end; }
  .analysis-toolbar-actions > .analysis-save { width:auto; min-width:70px; }
  .analysis-result-tools { column-gap:6px; padding-inline:14px; }
  .analysis-result-tools .analysis-date-controls { flex-wrap:nowrap; column-gap:4px; }
  .analysis-result-tools .analysis-granularity-trigger { width:auto; min-width:56px; padding-left:7px; padding-right:20px; }
  .analysis-result-tools .date-range-trigger { width:auto; }
  .analysis-result-tools .analysis-viz-switch button { width:30px; }
}

.bi-open-report-tools { display:flex; flex:none; max-width:100%; align-items:center; gap:8px; padding-right:8px; border-right:1px solid var(--line); }
.bi-report-collaborators { display:flex; flex-wrap:wrap; gap:4px; min-width:0; max-width:124px; max-height:60px; overflow:auto; }
#bi-report-owner, .bi-report-collaborators button, .bi-open-report-owner > span { display:grid; place-items:center; flex:none; width:28px; height:28px; padding:0; border:0; border-radius:50%; background:#633712; color:white; font-size:12px; }
.bi-report-collaborators button, .bi-open-report-owner.is-collaborator > span { background:#495b79; }
#bi-report-owner { cursor:default; }
.bi-open-report-menu { position:fixed; z-index:151; width:max-content; min-width:116px; max-width:calc(100vw - 16px); max-height:50vh; overflow:auto; padding:4px; border-radius:4px; background:#fff; color:#30333b; box-shadow:0 4px 20px #19233826; }
.bi-open-report-menu button { display:block; width:100%; min-height:32px; padding:6px 8px; border:0; border-radius:3px; text-align:left; color:inherit; background:transparent; cursor:pointer; }
.bi-open-report-menu button:hover { color:#176ef0; background:#f3f6fa; }
.report-boards-menu { width:160px; padding:4px; font-size:14px; color:#333; }
.report-boards-menu button { font-size:14px; line-height:22px; padding:6px 8px; }
.report-boards-menu button:hover, .report-boards-menu [aria-expanded=true] { color:inherit; background:#f5f6f8; }
.report-boards-menu [data-bi-report-add] span, .report-attach-picker .report-destination-add span { margin-inline-end:4px; font-size:16px; }
.report-attach-picker { height:300px; width:min(300px,calc(100vw - 16px)); border:0; border-radius:3px; color:#333; }
.report-attach-picker .report-destination-control { flex:none; }
.report-attach-picker .report-destination-trigger { width:100%; box-sizing:border-box; border:1px solid #b7c8e0; border-radius:3px 3px 0 0; padding-inline:12px 30px; }
.report-attach-picker .report-destination-tree { padding:4px 0; min-height:0; }
.report-attach-space { padding:10px 12px; font-size:14px; line-height:20px; }
.report-attach-picker .save-tree-folder-row { margin-inline:12px; }
.report-attach-picker .save-tree-folder-row button { height:38px; font-size:14px; }
.report-attach-folder-icon { width:14px; height:14px; margin-inline:5px 10px; vertical-align:-2px; fill:none; stroke:currentColor; }
.report-attach-picker .save-tree-children { padding-inline:28px 12px; }
.report-attach-picker .report-destination-add { height:44px; color:#333; font-size:14px; background:#f1f2f7; border-color:#e1e2e7; }
.report-attach-picker .bi-save-folder-option:disabled { color:#7e7f80; background:transparent; opacity:1; cursor:not-allowed; }
.report-attach-picker .bi-save-folder-option:disabled i { color:inherit; }
.report-attach-picker[aria-busy=true] button:not(:disabled) { cursor:wait; }
.bi-open-report-applied { border-top:1px solid #eceef1; }
.bi-open-report-applied small { display:block; padding:8px 8px 4px; color:#808080; font-size:13px; }
.bi-open-report-owner { display:flex; align-items:center; gap:10px; min-width:min(248px,calc(100vw - 32px)); padding:16px 12px; }
.bi-open-report-owner strong { font-weight:400; overflow-wrap:anywhere; }
.bi-open-report-owner small { margin-left:auto; white-space:nowrap; }
.bi-open-report-note { margin:6px 8px; color:#697586; font-size:13px; }
.bi-open-report-menu button:disabled { color:#a6b2c9; background:transparent; cursor:not-allowed; }

.project-metric-row > span:not(.metric-drag-handle) { overflow-wrap:anywhere; }

/* 事件分析时间粒度：主菜单、分钟／更多级联与自定义周。 */
.analysis-select-menu.event-granularity-menu { width:126px; min-width:126px; max-height:none; overflow:visible; padding:4px; border:0; border-radius:3px; box-shadow:0 8px 24px rgba(0,0,0,.12); }
.event-granularity-menu button { height:42px; color:#333; font-size:14px; font-weight:400; }
.event-granularity-menu button:hover,.event-granularity-menu button.active { background:#e9eaee; color:#333; font-weight:400; }
.event-granularity-menu hr { margin:2px -4px; border:0; border-top:1px solid #eee; }
.granularity-submenu-trigger { justify-content:space-between; }
.granularity-submenu-trigger::after { content:'›'; color:#666; }
.granularity-week-row { display:flex; align-items:center; height:38px; border-radius:4px; }
.granularity-week-row:hover { background:#f6f6f9; }
.granularity-week-row:has(> button.active) { background:#ebedf3; }
.event-granularity-menu .granularity-week-row > button:first-child { flex:1; width:auto; height:100%; background:transparent; }
.event-granularity-menu .granularity-week-row > button:first-child:hover { box-shadow:none !important; }
.event-granularity-menu .granularity-week-settings {
  display:flex; justify-content:flex-end; align-items:center; flex:none;
  width:30px; height:36px; padding:0 8px 0 0; color:#7e7f80; background:transparent;
}
.event-granularity-menu .granularity-week-settings::after {
  content:''; width:14px; height:14px; background:currentColor;
  mask:var(--date-calendar-icon) center / contain no-repeat;
}
.event-granularity-menu .granularity-week-settings:is(:hover,:focus-visible,[aria-expanded="true"]) {
  color:#185ec0;
  background:transparent;
  box-shadow:none !important;
}
body:has(.granularity-week-settings[aria-describedby~="app-tooltip"]) .app-tooltip-side { width:max-content; }
body:has(.granularity-week-settings[aria-describedby~="app-tooltip"]) .app-tooltip-side::after { display:none; }
.granularity-submenu,.granularity-week-popover { position:fixed; box-sizing:border-box; background:#fff; box-shadow:0 8px 24px rgba(0,0,0,.12); border-radius:3px; }
.granularity-submenu { width:148px; padding:4px; }
.granularity-week-popover { width:352px; max-width:calc(100vw - 16px); padding:16px; font-size:14px; }
.granularity-week-popover>strong { display:block; font-size:16px; font-weight:600; }
.granularity-week-popover p { margin:18px 0; color:#888; font-size:13px; white-space:normal; }
.granularity-week-popover b { color:#333; font-weight:400; padding:0 5px; }
.granularity-week-days { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.event-granularity-menu .granularity-week-days button { height:34px; padding:0; border:1px solid #ddd; justify-content:center; font-size:12px; }
.granularity-week-days button[aria-pressed="true"] { background:#e9eaee; }
.granularity-week-popover footer { display:flex; justify-content:flex-end; gap:10px; margin:24px -16px -16px; padding:8px 16px; border-top:1px solid #eee; }
.event-granularity-menu .granularity-week-popover footer button { width:auto; height:32px; padding:0 16px; }
.event-granularity-menu [data-week-confirm] { background:#2878ff; color:#fff; }
.event-granularity-menu [data-week-confirm]:hover { background:#1768ed; color:#fff; }

.granularity-range-notice { position:fixed; z-index:10001; top:24px; left:50%; transform:translateX(-50%); max-width:calc(100vw - 32px); box-sizing:border-box; padding:10px 16px; border-radius:3px; background:#fff; color:#333; box-shadow:0 3px 12px rgba(0,0,0,.15); font-size:14px; pointer-events:none; }
.granularity-range-notice::before { content:'!'; display:inline-flex; align-items:center; justify-content:center; width:14px; height:14px; margin-right:8px; border:1px solid #e3a020; border-radius:50%; color:#e3a020; font-size:11px; }

:is(.retention-cycle-menu,.project-metric-period-menu) {
  display:block;
  width:116px;
  max-width:calc(100vw - 16px);
  padding:5px;
  overflow:visible;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,.12);
}
.retention-cycle-menu { font-size:14px; color:#333; }
:is(.retention-cycle-menu,.project-metric-period-menu) > :is([role=menu],[role=group]) {
  max-height:inherit; overflow-y:auto;
}
.retention-cycle-detail {
  position:fixed; box-sizing:border-box; width:148px; padding:5px; overflow:auto;
  background:#fff; border:1px solid var(--line); border-radius:6px; box-shadow:0 8px 24px rgba(15,23,42,.12);
}
:is(.retention-cycle-menu,.project-metric-period-menu) button {
  width:100%;
  min-height:32px;
  padding:4px 8px;
  border:0;
  border-radius:4px;
  background:#fff;
  color:var(--ink);
  text-align:left;
  cursor:pointer;
}
.retention-cycle-menu button { font-size:14px; font-weight:400; color:#333; }
.retention-cycle-menu :is([role=menuitem],[aria-pressed]) { min-height:36px; }
:is(.retention-cycle-menu,.project-metric-period-menu) button[aria-expanded="true"],
:is(.retention-cycle-menu,.project-metric-period-menu) button[aria-pressed="true"] {
  background:#eef4ff;
  color:#245cce;
}
:is(.retention-cycle-menu,.project-metric-period-menu) > :is([role=menu],[role=group]) > button::after {
  content:''; float:right; width:5px; height:5px; margin:6px 3px 0 0;
  border:solid currentColor; border-width:1px 1px 0 0; transform:rotate(45deg);
}
.retention-cycle-custom {
  position:relative; display:flex; align-items:center; height:36px; padding:0 8px;
}
.retention-cycle-custom input {
  position:relative; z-index:1; box-sizing:border-box; width:60px; min-width:0; height:24px;
  padding:2px 6px; border:1px solid var(--line); border-radius:4px; background:#fff;
}
:is(.retention-cycle-menu,.project-metric-period-menu) .retention-cycle-custom button {
  position:absolute; inset:0; width:100%; height:100%; padding:0 8px; text-align:right;
}
.retention-cycle-custom:is(:hover,:focus-within) button { background:#f0f1f6; }


/* 分析弹层以可视窗口限高，菜单内容超出时在菜单内滚动。 */
.event-layout-menu,.event-layout-submenu,.event-group-field-options,.ranking-control-menu,.dashboard-add-submenu {
  position:fixed; right:auto; box-sizing:border-box; max-height:calc(100dvh - 16px); overflow:auto;
}
.event-layout-menu,.event-layout-submenu,.event-group-field-options { z-index:116; }
.event-group-field-options { min-width:100px; width:max-content; }
.dashboard-add-submenu { z-index:121; }
.ranking-control-menu { z-index:116; }
.formula-filter-popover { box-sizing:border-box; width:520px; overflow:auto; }
.granularity-submenu,.granularity-week-popover,.analysis-select-menu.event-granularity-menu { max-height:calc(100dvh - 16px); overflow:auto; }
.event-picker-panel.picker-inline-detail .event-picker-layout { display:flex; flex-direction:column; }
.event-picker-panel.picker-inline-detail .event-picker-navigation { display:flex; flex:none; overflow-x:auto; padding:0; }
.event-picker-panel.picker-inline-detail .event-picker-navigation button { flex:none; }
.event-picker-panel.picker-inline-detail .event-picker-list { flex:1; }
.picker-inline-detail .bi-field-picker-entry > button:first-child { flex-direction:column; align-items:flex-start; justify-content:center; height:auto; min-height:36px; }
.picker-inline-detail .bi-field-picker-entry > button:first-child > span { display:block; max-width:100%; }
.picker-inline-detail .bi-field-picker-entry > button:first-child small { margin-left:0; }

/* 留存、漏斗和间隔共用结果区右侧的可视化侧栏。 */
.analysis-main:has(> .retention-viz-panel:not([hidden])) {
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  grid-template-rows:auto minmax(0,1fr);
  grid-template-areas:"tools settings" "result settings";
}
.analysis-main > .analysis-toolbar { grid-area:toolbar; }
#bi-result-tools { grid-area:tools; min-width:0; }
.analysis-main > :is(#analysis-loading,#bi-chart-preview,#analysis-empty) { grid-area:result; min-width:0; }
.analysis-main:has(.retention-viz-panel:not([hidden])) > :is(#analysis-loading,#bi-chart-preview,#analysis-empty) { min-height:0; }
.retention-viz-panel {
  grid-area:settings; min-width:0; min-height:0; overflow:auto;
  background:#fff; border-inline-start:1px solid var(--line);
}
.retention-viz-panel header,.retention-viz-dialog header { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.retention-viz-panel header { min-height:64px; box-sizing:border-box; padding:0 12px; }
.retention-viz-panel header strong { font-size:16px; font-weight:600; }
.retention-viz-panel details { padding:8px; }
.retention-viz-panel details + details { border-top:1px solid var(--line); }
.retention-viz-panel summary { display:flex; align-items:center; gap:8px; min-height:32px; padding:0 8px; list-style:none; font-size:14px; cursor:pointer; }
.retention-viz-panel summary::-webkit-details-marker { display:none; }
.retention-viz-panel summary::after { content:''; width:5px; height:5px; margin-inline: auto 3px; border:solid currentColor; border-width:0 1px 1px 0; transform:rotate(45deg); }
.retention-viz-panel details[open] > summary::after { transform:rotate(225deg); }
.retention-viz-panel svg,#bi-retention-viz svg { width:16px; height:16px; flex:none; }
.retention-viz-settings { margin-top:8px; padding:8px 16px; border-radius:4px; background:#f9f9fb; }
.retention-viz-setting { display:grid; grid-template-columns:112px minmax(0,1fr); align-items:center; gap:16px; min-height:48px; color:var(--ink); font-size:14px; }
.retention-viz-setting > :is(button,input),.retention-viz-periods button { justify-self:start; }
.retention-viz-setting .dashboard-select-trigger { width:62px; max-width:100%; height:32px; min-height:0; font-size:14px; }
.retention-viz-setting--mode { display:flex; flex-wrap:wrap; gap:4px 16px; }
.retention-viz-row-mode { display:inline-flex; align-items:center; gap:4px; }
.retention-viz-row-mode .dashboard-select-trigger { width:64px; height:24px; }
#bi-retention-row-mode-anchor { display:inline-flex; }
#bi-retention-row-mode-anchor > .dashboard-select-trigger:disabled { pointer-events:none; }
#bi-retention-additional-only-anchor { display:inline-flex; justify-self:start; }
#bi-retention-additional-only-anchor > input:disabled { pointer-events:none; }
.retention-viz-periods { margin:0 0 4px; padding:6px; border-radius:4px; background:#fff; }
.retention-key-tags,#bi-retention-key-input { box-sizing:border-box; width:100%; height:48px; min-height:48px; padding:6px 8px; border:1px solid var(--line); border-radius:4px; }
.retention-key-tags { display:flex; flex-wrap:wrap; align-content:flex-start; align-items:center; gap:5px; overflow:auto; cursor:text; }
.retention-key-tag { display:inline-flex; align-items:center; gap:3px; padding:0 4px; border-radius:3px; background:#eef1f6; color:var(--ink); font-size:12px; }
.retention-key-tags button { min-height:20px; height:auto; padding:0 3px; border:0; background:transparent; color:var(--muted); font-size:12px; font-weight:400; }
#bi-retention-incomplete-help { z-index:1100; }
#bi-retention-key-error { margin:4px 0 0; color:#c83a32; font-size:12px; }
#bi-retention-display-granularity-trigger { width:62px; min-width:0; padding:0 19px 0 8px; font-size:14px; }
#bi-retention-display-granularity-trigger:disabled { color:var(--muted); cursor:default; }
#bi-retention-viz,#bi-retention-viz-close,#bi-retention-stage {
  display:inline-flex; align-items:center; justify-content:center; gap:4px;
  height:32px; padding:0 7px; border:1px solid var(--line); border-radius:4px;
  background:#fff; color:var(--ink); cursor:pointer;
}
#bi-retention-viz[hidden] { display:none; }
#bi-retention-viz { width:34px; flex:none; margin-inline-start:8px; }
#bi-retention-viz-close { width:32px; flex:none; }
#bi-retention-viz-close { border-color:transparent; }
#bi-retention-viz[aria-expanded=true] { background:#ebedf3; border-color:#e3e4e5; color:#333; }
#bi-retention-viz[aria-expanded=false]:hover,#bi-retention-viz-close:hover,#bi-retention-stage:hover,.retention-viz-panel summary:hover { background:#edf3fb; }
#bi-retention-stage { width:64px; height:24px; border-color:transparent; font-size:14px; font-weight:400; }
@media(max-width:1023px) {
  .analysis-main:has(> .retention-viz-panel:not([hidden])) {
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto minmax(260px,auto);
    grid-template-areas:"tools" "settings" "result";
    overflow-y:auto;
  }
  .retention-viz-panel { border-inline-start:0; border-block:1px solid var(--line); max-height:42dvh; }
  #bi-retention-viz { margin-inline-start:0; }
}
.retention-viz-setting input[role=switch] { appearance:none; width:32px; height:16px; border:0; border-radius:10px; margin:0; padding:0; background:#d9dfe8; cursor:pointer; }
.retention-viz-setting input[role=switch]::before { content:''; display:block; width:12px; height:12px; margin:2px; border-radius:50%; background:#fff; }
.retention-viz-setting input[role=switch]:checked { background:#2563eb; }
.retention-viz-setting input[role=switch]:checked::before { transform:translateX(16px); }
.retention-viz-setting input[role=switch]:disabled { opacity:.55; cursor:default; }
.retention-viz-dialog button:not(.dashboard-select-trigger) { min-height:30px; height:auto; }
.retention-viz-dialog { width:min(520px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); box-sizing:border-box; padding:16px; border:1px solid var(--line); border-radius:6px; color:var(--ink); }
.retention-viz-dialog::backdrop { background:#0005; }
.retention-viz-dialog footer { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
#bi-retention-viz-dialog { width:min(640px,calc(100vw - 24px)); padding:0; }
.retention-stage-body { padding:18px clamp(16px,4vw,32px) 24px; }
.retention-stage-body h3 { margin:0; font-size:16px; font-weight:600; }
.retention-stage-body p { margin:6px 0 24px; color:var(--muted); font-size:14px; }
.retention-stage-body table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:14px; }
.retention-stage-body th,.retention-stage-body td { padding:12px 8px; text-align:left; background:#fff; border:0; border-bottom:1px solid var(--line); }
.retention-stage-body th:last-child { width:clamp(100px,24vw,145px); }
.retention-stage-body .event-stage-metric { justify-content:flex-start; }
.retention-stage-body .event-stage-metric > :last-child { min-width:0; max-width:none; }
.retention-stage-body .dashboard-select-trigger { min-height:32px; height:32px; width:max-content; max-width:100%; }
#bi-retention-viz-dialog footer { margin:0; padding:10px clamp(16px,4vw,32px); border-top:1px solid var(--line); }
#bi-retention-viz-dialog-close,#bi-retention-viz-cancel { background:transparent; color:var(--ink); border:0; font-weight:400; }
.retention-period-detail { display:inline-grid; place-items:center; width:20px; height:20px; min-height:0; padding:0; border:0; background:transparent; color:inherit; vertical-align:middle; }
.retention-period-detail > span { position:relative; width:12px; height:12px; box-sizing:border-box; border:1px solid currentColor; border-radius:2px; font-size:0; }
.retention-period-detail > span::before,
.retention-period-detail > span::after { content:""; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); }
.retention-period-detail > span::before { width:6px; border-top:1px solid currentColor; }
.retention-period-detail > span::after { height:6px; border-left:1px solid currentColor; }
.retention-period-detail:hover { background:#edf3fb; }
.retention-group-caption { display:flex; align-items:flex-start; gap:4px; min-width:140px; max-width:220px; text-align:left; white-space:normal; }
.retention-group-caption > span { min-width:0; align-self:center; overflow-wrap:anywhere; }
.retention-group-caption > button { flex:none; }
.retention-group-dialog { width:min(1180px,calc(100vw - 32px)); max-width:none; padding:0; overflow:hidden; }
.retention-group-dialog[open] { display:flex; flex-direction:column; }
.retention-group-dialog > header { display:flex; flex:none; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px; border-bottom:1px solid var(--line); }
.retention-group-dialog h3 { margin:0; font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.retention-group-dialog > header > button { flex:none; width:30px; padding:0; border:0; background:transparent; color:var(--blue,#2563eb); font-size:20px; font-weight:400; }
.retention-group-dialog > header > button:hover { background:#edf3fb; }
.retention-group-dialog .table-wrap { overflow:auto; min-height:0; max-height:65dvh; margin:16px; }
.retention-group-dialog :is(th,td) { min-width:94px; }
.retention-group-dialog :is(th,td):first-child { min-width:134px; }
td:has(> .retention-rate-fill) { padding:0; background:var(--retention-rate-color); }
td:has(> [data-retention-band="0"]) { --retention-rate-color:#edf4fd; }
td:has(> [data-retention-band="1"]) { --retention-rate-color:#dce9fc; }
td:has(> [data-retention-band="2"]) { --retention-rate-color:#cbdffb; }
td:has(> [data-retention-band="3"]) { --retention-rate-color:#bad4f9; }
td:has(> [data-retention-band="4"]) { --retention-rate-color:#a8caf8; }
td:has(> [data-retention-band="5"]) { --retention-rate-color:#97bff7; }
td:has(> [data-retention-band="6"]) { --retention-rate-color:#86b4f5; }
td:has(> [data-retention-band="7"]) { --retention-rate-color:#75aaf4; }
td:has(> [data-retention-band="8"]) { --retention-rate-color:#639ff3; }
td:has(> [data-retention-band="9"]) { --retention-rate-color:#5295f1; }
td:has(> [data-retention-band="10"]) { --retention-rate-color:#418af0; }
td:has(> [data-retention-band="11"]) { --retention-rate-color:#3080ef; }
.retention-rate-fill { padding:9px 13px; color:#212121; }
.retention-rate-fill.high { color:#fff; }
.retention-detail-values { display:grid; gap:2px; padding:8px 12px; text-align:center; }
.retention-detail-values > span:last-child { font-size:12px; }
td:has(> .retention-rate-fill) > .retention-display-result { padding:0 12px 6px; }
td:has(> .retention-rate-fill.high) > .retention-display-result,
td:has(> .retention-rate-fill.high) > .retention-display-result > span { color:#fff; }

/* 漏斗分析 */
.funnel-analysis-form .analysis-sidebar { background: #fff; }
.funnel-analysis-form .analysis-mode-heading-only { display: none; }
#bi-funnel-settings .retention-subject { padding: 8px 0 13px; position: relative; }
.funnel-add-step { margin-left: auto; }
.funnel-step { display: block; margin-bottom: 8px; padding: 2px 4px 4px 0; }
.funnel-step-head { display: flex; gap: 8px; align-items: center; min-height: 32px; position: relative; }
.funnel-step-head .analysis-event-trigger { width: auto; max-width: min(44%, 190px); background: #f4f4f6; }
.funnel-step-order { position:relative; flex:0 0 24px; width:24px; height:24px; }
.funnel-step-index,.funnel-step-grip { display:grid; place-items:center; position:absolute; inset:0; width:24px; height:24px; border:0; border-radius:4px; padding:0; }
.funnel-step-index { color:#fff; background:#202241; font-size:12px; line-height:24px; }
.funnel-step-grip { min-width:0; background:transparent; color:#202241; box-shadow:none; opacity:0; cursor:grab; }
.funnel-step-grip svg { width:14px; height:14px; pointer-events:none; }
.funnel-step-grip:active,.funnel-step-dragging .funnel-step-grip { cursor:grabbing; }
.funnel-step:is(:hover,:focus-within,.funnel-step-dragging) .funnel-step-index { opacity:0; }
.funnel-step:is(:hover,:focus-within,.funnel-step-dragging) .funnel-step-grip { opacity:1; }
.funnel-order-status { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#bi-funnel-steps:has(.funnel-step-dragging,.funnel-step-keyboard-drag) .funnel-step { transition:transform 160ms ease; }
.funnel-step-dragging { opacity:0; }
.funnel-step-keyboard-drag { position:relative; z-index:1; background:#fff; }
@media (prefers-reduced-motion:reduce) {
  #bi-funnel-steps:has(.funnel-step-dragging,.funnel-step-keyboard-drag) .funnel-step { transition:none; }
}
.funnel-step-head [data-funnel-rename] { flex:0 1 auto; field-sizing:content; min-width:0; width:auto; max-width: min(30%, 142px); height:26px; padding:0 8px; border:1px solid #cbd5e1; border-radius:4px; background:#fff; color:#333; font:400 14px/24px Arial,"PingFang SC",sans-serif; }
.funnel-step-head [data-funnel-rename]:placeholder-shown { width:80px; }
.funnel-step-head [data-funnel-rename]:hover { box-shadow:none; }
.funnel-step-actions { display: flex; margin-left: auto; gap: 1px; opacity: 0; pointer-events: none; }
.funnel-step:hover .funnel-step-actions, .funnel-step:focus-within .funnel-step-actions,
.funnel-step-actions:has([data-funnel-action="step-more"][aria-expanded="true"]) { opacity: 1; pointer-events: auto; }
.funnel-step-actions .icon-button { width: 24px; height: 24px; min-width: 24px; padding: 0; color: #737783; }
.funnel-step .metric-filters-list { margin-left: 30px; }
.funnel-step .metric-filters-list:not(:has([data-filter-row])) { display: none; }
#bi-funnel-association { margin: 7px 0 14px; display: grid; gap: 7px; color: #747881; }
#bi-funnel-association > div { display: flex; align-items: center; gap: 8px; min-height: 27px; }
#bi-funnel-association:has(> .funnel-association-label) { margin-top: 16px; gap: 10px; color: #888; }
.funnel-association-label { font-size: 12px; line-height: 18px; }
#bi-funnel-association > .funnel-association-row { gap: 10px; min-height: 26px; }
.funnel-association-row > [data-funnel-action="association"] {
  display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 160px;
  height: 26px; min-height: 26px; padding: 0 9px; border: 0; border-radius: 4px;
  background: #f0f1f5; color: #333; font: 400 14px/22px Arial, "PingFang SC", sans-serif;
}
.funnel-association-row > button:hover { background: #e9ebf2; }
.funnel-association-row > button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel-association-row svg { display: block; flex: none; width: 14px; height: 14px; }
.funnel-association-description { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 14px; line-height: 22px; }
.funnel-association-help { display:inline-flex; cursor:default; }
.funnel-window-row { display: flex; gap: 12px; align-items: center; padding-top: 12px; }
.funnel-toolbar:not([hidden]) { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.funnel-toolbar button[aria-pressed="true"], .funnel-mode button[aria-pressed="true"] { background: #e9edf8; color: #21253a; }
.funnel-popover { position: fixed; z-index: 1050; width: 160px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; background: #fff; padding: 6px; box-shadow: 0 6px 24px #20223724; border: 1px solid #e8e8eb; border-radius: 4px; font-size: 13px; }
.funnel-popover-wide { width: 280px; }
.funnel-popover button { width: 100%; min-height: 30px; background: transparent; border: 0; text-align: left; padding: 5px 8px; border-radius: 3px; }
.funnel-popover button:hover:not(:disabled) { background: #f0f1f5; }
.funnel-step-operation-popover { box-sizing:border-box; width:132px; padding:2px 0; border:0; border-radius:4px; box-shadow:0 8px 24px rgba(31,35,53,.12); }
.funnel-step-operation-popover button { display:flex; align-items:center; gap:8px; min-height:42px; padding:0 12px; color:#333; font:400 14px/22px Arial,"PingFang SC","Microsoft YaHei",sans-serif; white-space:nowrap; }
.funnel-step-operation-popover button:hover:not(:disabled) { background:#f4f5f8; box-shadow:none; }
.funnel-step-operation-popover button svg { flex:none; width:16px; height:16px; color:#7e7f80; }
.funnel-step-operation-popover button[data-mutate="delete"]:not(:disabled,[aria-disabled="true"]):is(:hover,:focus-visible) {
  color:var(--inline-remove-hover); background:var(--inline-remove-hover-bg);
}
.funnel-step-operation-popover button[data-mutate="delete"]:not(:disabled,[aria-disabled="true"]):is(:hover,:focus-visible) svg { color:inherit; }
.funnel-step-operation-popover button:disabled { opacity:.5; }
.funnel-popover label, .funnel-popover > small, .funnel-popover > strong { display: block; padding: 7px 8px; }
.funnel-popover [data-funnel-options] { max-height: 250px; overflow: auto; }
.funnel-popover [data-funnel-options] small { color: #858891; float: right; }
.funnel-popover input[type="search"] { width: 100%; }
.funnel-popover:is(.funnel-association-popover,.interval-result-picker) { box-sizing: border-box; display: flex; flex-direction: column; height: 300px; overflow: hidden; }
.funnel-popover:is(.funnel-association-popover,.interval-result-picker) > input[type="search"] { flex: none; }
.funnel-popover:is(.funnel-association-popover,.interval-result-picker) > [data-funnel-options] { flex: 1; min-height: 0; max-height: none; }
.funnel-popover.interval-result-picker { height:260px; }
.funnel-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 3px 4px; }
.funnel-menu-row > input[type="number"] { width: 77px; }
.funnel-menu-row > button { width: auto; white-space: nowrap; }
.funnel-visual-settings summary { padding: 9px 8px; cursor: pointer; font-weight: 500; }
[data-funnel-ends] { border-left: 1px solid #ebedf0; }
.funnel-results { padding: 0 12px 16px; }
.funnel-result-chart { display: block; width: 100%; height: clamp(255px, 51vh, 454px); }
.funnel-chart-grid line { stroke: #e1e5ee; stroke-dasharray: 4 4; }
.funnel-chart-grid text { fill: #676e86; font-size: 11px; }
.funnel-bar-value { font-size: 11px; fill: #fff; pointer-events: none; }
.funnel-result-controls { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #e4e5e9; }
.funnel-result-controls .funnel-mode { margin-right: auto; display: inline-flex; }
.funnel-mode button { color:#393939; background:#fff; border:1px solid #e3e4e5; border-radius:3px 0 0 3px; min-width:42px; height:30px; padding:0 6px; font-size:14px; font-weight:400; }
.funnel-mode button + button { margin-left:-1px; border-radius:0 3px 3px 0; }
.funnel-mode button[aria-pressed="true"] { background:#ebedf3; }
.funnel-mode button[aria-pressed="false"]:hover { border-color:#7e7f80; z-index:1; }
.funnel-result-caption { color:#212121; margin:0 20px; font-size:14px; line-height:24px; text-align:center; }
.funnel-result-table table { width: 100%; border-collapse: collapse; }
.funnel-result-table :is(th,td) { text-align: center; white-space: nowrap; min-width: 110px; }
.funnel-result-table td { color:#212121; }
.funnel-result-table td.funnel-result-baseline { background:#f9f9fb; }
.funnel-result-table td.funnel-result-heat { background:#f4f8fe; background:color-mix(in srgb,#3080ef var(--funnel-heat),#f4f8fe); }
.funnel-result-table td.funnel-result-heat-dark { color:#fff; }
.funnel-result-table .funnel-result-count { position:relative; display:inline-flex; align-items:center; height:22px; line-height:18px; vertical-align:top; }
.funnel-result-rate { line-height:18px; }
.funnel-result-count :is(.funnel-user-link,.funnel-user-group) { color:inherit; background:transparent; border:0; height:18px; min-height:0; padding:0; box-shadow:none; font:inherit; }
.funnel-result-count .funnel-user-link { text-decoration:underline; text-underline-offset:1px; }
.funnel-result-count .funnel-user-link:is(:hover,:focus-visible) { color:#8d0088; }
.funnel-result-count .funnel-user-group { display:grid; place-items:center; position:absolute; top:3px; left:calc(100% + 6px); width:16px; height:16px; opacity:0; pointer-events:none; }
.funnel-result-count .funnel-user-group:is(:hover,:focus-visible) { color:#8d0088; background:transparent; box-shadow:none; }
.funnel-user-group svg { width:16px; height:16px; }
.funnel-result-table td:hover .funnel-user-group,.funnel-result-count:focus-within .funnel-user-group { opacity:1; pointer-events:auto; }
@media (hover:none) { .funnel-result-count .funnel-user-group { opacity:1; pointer-events:auto; } }
.funnel-chart-card { position:fixed; z-index:30; max-width:calc(100vw - 16px); min-width:160px; padding:10px 12px; background:#fff; border-radius:4px; box-shadow:0 3px 14px #1e26351a; color:#333; font-size:12px; pointer-events:none; }
.funnel-chart-card strong { display:block; color:#777; font-weight:400; margin-bottom:6px; }
.funnel-chart-card div { display:grid; grid-template-columns:8px minmax(0,1fr) max-content; align-items:center; gap:8px; line-height:22px; }
.funnel-chart-card i { width:7px; height:7px; border-radius:50%; }
.funnel-chart-card span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.funnel-chart-card b { margin-left:12px; font-weight:500; }
.funnel-empty { display: grid; place-items: center; height: 220px; color: #767c88; }
.funnel-users-page .funnel-users-detached { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; border: 0; border-radius: 0; }
@media (hover: none) { .funnel-step-actions { opacity: 1; pointer-events: auto; } }
@media (max-width: 620px) { .funnel-results { padding-inline: 4px; } .funnel-result-controls { gap: 4px; } }
.funnel-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding-bottom: 8px; font-size: 12px; }
.funnel-legend span { display: inline-flex; align-items: center; gap: 5px; }
.funnel-legend i { width: 9px; height: 9px; border-radius: 2px; }

.funnel-page-title,.funnel-empty-image { display:none; }
.funnel-empty-image {
  aspect-ratio:400 / 256;
  background:center / contain no-repeat url("/static/funnel-empty.png");
}
.funnel-analysis-form .funnel-page-title { display:flex; align-items:center; gap:6px; margin:0; color:#222; font-size:20px; font-weight:600; }
.funnel-page-title svg { width:20px; height:20px; }
.funnel-title-help { display:inline-flex; cursor:default; }
.funnel-analysis-form #bi-analysis-toolbar { grid-column:1/-1; min-height:74px; margin-left:calc(-1 * var(--analysis-left-gutter, 0px)); padding:12px 24px; gap:8px; flex-wrap:wrap; justify-content:space-between; background:#f0f0f2; border:0; }
.funnel-analysis-form #bi-analysis-toolbar .analysis-toolbar-actions { flex-wrap:wrap; max-width:100%; margin-left:auto; }
.funnel-analysis-form #bi-analysis-toolbar .analysis-tool-icon { border-color:transparent; }
.funnel-analysis-form #bi-save-chart { background:#1e76f0; border-color:#1e76f0; font-weight:400; }
.funnel-analysis-form #bi-save-chart:disabled { background:#99b4f3; border-color:#99b4f3; }
/* 状态和尺寸以漏斗分析初始页为准。共享的筛选、日期和分组控件仅在此页覆盖样式。 */
.funnel-analysis-form #bi-analysis-settings-section { padding:12px 23px 0 24px; border-bottom:0; }
.funnel-analysis-form #bi-funnel-settings .retention-subject { min-height:48px; margin:0 -12px 12px; padding:0 12px; gap:6px; font-size:16px; font-weight:500; color:#333; }
.funnel-analysis-form .funnel-subject-icon { display:flex; width:16px; height:16px; margin-right:2px; }
.funnel-analysis-form .retention-subject .retention-setting-trigger { position:relative; z-index:1; min-width:64px; padding-left:8px; border-color:#e0e0e0; border-radius:4px; color:#333; font-size:14px; font-weight:500; }
.funnel-analysis-form #bi-funnel-settings .funnel-add-step,
#bi-chart-form.funnel-analysis-form .analysis-sidebar-title > .analysis-section-add {
  box-sizing:border-box; display:grid; place-items:center; width:24px; height:24px; min-width:24px; min-height:24px; padding:0; border:0; border-radius:4px; color:inherit; background:transparent; box-shadow:none;
}
.funnel-analysis-form [data-funnel-add-row] { position:relative; border-radius:4px; }
.funnel-analysis-form [data-funnel-add-row] > .analysis-section-add { position:static; }
.funnel-analysis-form [data-funnel-add-row] > .analysis-section-add:enabled::before { position:absolute; inset:0; border-radius:inherit; content:''; }
.funnel-analysis-form [data-funnel-add-row]:has(> .analysis-section-add:enabled):not(#bi-groups-section:has([data-group-row]) > .analysis-sidebar-title):is(:hover,:focus-within) { background:#f4f4f7; }
#bi-chart-form.funnel-analysis-form #bi-groups-section:has([data-group-row]) #bi-add-group { display:none; }
.funnel-analysis-form .funnel-step { padding:0; margin:0 0 8px; }
.funnel-analysis-form .funnel-step-head { min-height:34px; gap:14px; }
.funnel-analysis-form .funnel-step-head .analysis-event-trigger { display:inline-block; width:160px; height:26px; padding:0 8px; max-width:43%; border:1px solid transparent; background:#f2f3f8; color:#333; font-size:14px; text-align:left; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.funnel-analysis-form .funnel-step-head .analysis-event-trigger::before {
  display:inline-block; width:14px; height:14px; margin-right:5px; vertical-align:-2px; content:""; background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1 3a2 2 0 012-2h10a2 2 0 012 2v1h-1V3a1 1 0 00-1-1H3a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-2h1v2a2 2 0 01-2 2H3a2 2 0 01-2-2V3zm5 1.5l3.6 8 1.35-4L15 6.722 6 4.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.funnel-analysis-form .funnel-step-actions { gap:4px; }
.funnel-analysis-form .funnel-step-actions .icon-button { width:26px; height:26px; min-width:26px; display:grid; place-items:center; color:#7e7f80; background:transparent; box-shadow:none; border:0; }
.funnel-analysis-form .funnel-step-actions .icon-button:is(:hover,[aria-expanded="true"]) { background:#e9eaf0; }
.funnel-analysis-form .funnel-step-actions [data-funnel-action="step-more"] { color:#b7b8bb; border-radius:4px; }
.funnel-analysis-form .funnel-step-actions [data-funnel-action="step-more"]:is(:hover,[aria-expanded="true"]) { background:#ecedf2; }
.funnel-analysis-form .retention-option-toggle,.funnel-analysis-form .funnel-window-row { display:grid; grid-template-columns:max-content max-content; justify-content:start; gap:8px 4px; align-items:center; margin:16px 0 0; padding:0; color:#7e7f80; font-size:12px; font-weight:500; line-height:20px; }
.funnel-analysis-form .funnel-window-row { margin-top:17px; }
.funnel-analysis-form .funnel-window-row > span:first-child { grid-column:1/-1; }
.funnel-analysis-form .retention-option-toggle input { grid-column:1; }
.funnel-analysis-form input[role=switch] { appearance:none; display:inline-block; box-sizing:border-box; min-height:0; width:40px; height:20px; margin:0; padding:0; border:0; border-radius:10px; background:rgba(185,190,207,.5); cursor:pointer; }
.funnel-analysis-form input[role=switch]::before { display:block; width:14px; height:14px; margin:3px; border-radius:50%; background:white; content:''; }
.funnel-analysis-form input[role=switch]:checked { background:#1e76f0; }
.funnel-analysis-form input[role=switch]:checked::before { transform:translateX(20px); }
.funnel-analysis-form .funnel-window-row .analysis-field-trigger { min-width:40px; width:auto; height:26px; padding:0 7px; border-color:transparent; background:#f2f3f8; color:#333; font-size:14px; font-weight:400; }
.funnel-analysis-form .funnel-window-row .analysis-field-trigger[aria-expanded=true] { border-color:#1e76f0; background:#fff; box-shadow:0 0 0 3px #dae9fb; }
.funnel-window-help { display:grid; place-items:center; width:16px; height:28px; cursor:default; }
#bi-chart-form.funnel-analysis-form .analysis-sidebar-section:not(#bi-analysis-mode-section):not(#bi-analysis-settings-section):is(:has(#bi-filters-list),#bi-groups-section) {
  border-bottom:0; min-height:68px; padding:0 23px 0 24px;
}
.funnel-analysis-form #bi-analysis-settings-section + #bi-metrics-section[hidden] + .analysis-sidebar-section { margin-top:20px; }
.funnel-analysis-form .analysis-sidebar-title { min-height:48px; margin:0; color:#333; }
.funnel-analysis-form .analysis-sidebar-title[data-funnel-add-row] { min-height:40px; margin:4px -12px; padding:0 12px; }
.funnel-analysis-form .analysis-section-heading { display:inline-flex; align-items:center; gap:8px; color:inherit; font-size:16px; font-weight:500; line-height:18px; }
.funnel-section-icon,.funnel-section-plus,.funnel-empty-title { display:none; }
.funnel-analysis-form :is(.analysis-section-plus,.analysis-empty-default) { display:none; }
.funnel-analysis-form :is(.funnel-section-icon,.funnel-section-plus) { display:inline-flex; }
.funnel-analysis-form :is(.funnel-subject-icon,.funnel-section-icon,.funnel-section-plus,.funnel-step-actions,.funnel-add-step) svg { display:block; width:16px; height:16px; pointer-events:none; }
.funnel-analysis-form .analysis-sidebar-section:has(#bi-filters-list):not(:has([data-filter-row])) .analysis-sidebar-title,
.funnel-analysis-form #bi-groups-section:not(:has([data-group-row])) .analysis-sidebar-title { color:#bdbebf; }
/* 漏斗的全局条件和分组共用侧栏控件和属性选择面板。 */
#bi-chart-form.funnel-analysis-form #bi-filters-list { padding-left:0; }
#bi-chart-form.funnel-analysis-form #bi-filters-list::before { display:none; }
#bi-chart-form.funnel-analysis-form #bi-filters-list .global-filter-group { padding-left:32px; }
#bi-chart-form.funnel-analysis-form #bi-filters-list .global-filter-group::before {
  content:''; position:absolute; left:12px; top:6px; bottom:6px; border-left:1px solid #d2d2d4; pointer-events:none;
}
#bi-chart-form.funnel-analysis-form #bi-filters-list .global-filter-group > .global-filter-logic {
  left:0; width:24px; height:24px; border-color:#dcdde1; color:#666; font-size:12px;
}
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list [data-filter-row],#bi-groups-list > [data-group-row]) {
  position:relative; isolation:isolate; display:flex; flex-wrap:nowrap; align-items:center; gap:4px; min-height:38px; margin:0; padding:0;
}
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list [data-filter-row],#bi-groups-list > [data-group-row]):is(:hover,:has(:focus-visible))::after {
  content:''; position:absolute; z-index:-1; inset:0; inset-inline-end:-23px; background:#f9f9fb; pointer-events:none;
}
#bi-chart-form.funnel-analysis-form #bi-filters-list [data-filter-row]::after { inset-inline-start:-19px; }
#bi-chart-form.funnel-analysis-form #bi-filters-list > [data-filter-group] > [data-filter-children] > [data-filter-row]::after { inset-inline-start:-56px; }
#bi-chart-form.funnel-analysis-form #bi-groups-list > [data-group-row] { gap:10px; }
#bi-chart-form.funnel-analysis-form #bi-groups-list > [data-group-row]::after { inset-inline-start:-24px; }
#bi-chart-form.funnel-analysis-form #bi-groups-list [data-common-group-index] { background:#eeeff3; color:#333; font-weight:400; }
#bi-chart-form.funnel-analysis-form #bi-groups-list > [data-group-row]:is(:hover,:has(:focus-visible)) [data-common-group-index] { background:transparent; }
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list,#bi-groups-list) .analysis-field-trigger,
#bi-chart-form.funnel-analysis-form #bi-filters-list .analysis-filter-operator-trigger {
  box-sizing:border-box; height:26px; min-width:0; max-width:160px; padding:0 8px; border:1px solid transparent; border-radius:4px;
  background:#f2f3f8; color:#333; font-size:14px; font-weight:400; box-shadow:none;
}
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list,#bi-groups-list) .analysis-field-trigger {
  position:relative; display:block; padding-inline-start:27px; min-width:44px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
}
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list,#bi-groups-list) .analysis-field-trigger::before {
  content:''; position:absolute; inset-inline-start:8px; top:5px; width:14px; height:14px; background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-linejoin='round'%3E%3Cpath d='M2 3h8L7 6.5V10L5 9V6.5zM10 6h4m-4 3h4m-7 3h7'/%3E%3C/svg%3E") center/contain no-repeat;
}
#bi-chart-form.funnel-analysis-form #bi-filters-list .analysis-filter-operator { flex:0 1 auto; width:max-content; min-width:0; max-width:160px; margin-inline-start:4px; }
#bi-chart-form.funnel-analysis-form #bi-filters-list .analysis-filter-operator-trigger { display:block; width:100%; min-width:76px; }
@media (max-width:480px) {
  #bi-chart-form.funnel-analysis-form #bi-filters-list .analysis-filter-operator-trigger { min-width:0; }
}
#bi-chart-form.funnel-analysis-form #bi-filters-list [data-add-parallel-filter] { margin-inline-start:8px; }
#bi-chart-form.funnel-analysis-form #bi-filters-list [data-remove-filter] { margin-left:0; }
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list [data-filter-row],#bi-groups-list > [data-group-row]):is(:hover,:has(:focus-visible)) :is(.analysis-field-trigger,.analysis-filter-operator-trigger):not(:where(:hover,:focus-visible,[data-funnel-picker-open])) {
  border-color:#e3e4e5; background:#fff;
}
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list,#bi-groups-list) :is(.analysis-field-trigger,.analysis-filter-operator-trigger):is(:hover,:focus-visible,[data-funnel-picker-open]) {
  border-color:#1e76f0; background:#fff;
}
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list,#bi-groups-list) [data-funnel-picker-open] { box-shadow:0 0 0 3px #dae9fb; }
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list,#bi-groups-list) :is([data-add-parallel-filter],[data-remove-filter],[data-remove-group]) {
  position:relative; display:block; flex:0 0 26px; width:26px; min-width:26px; height:26px; padding:0;
  border:0; border-radius:4px; background:transparent; color:#7e7f80; box-shadow:none; font-size:0; opacity:0; pointer-events:none;
}
#bi-chart-form.funnel-analysis-form :is(#bi-filters-list [data-filter-row],#bi-groups-list > [data-group-row]):is(:hover,:has(:focus-visible)) > :is([data-add-parallel-filter],[data-remove-filter],[data-remove-group]) {
  opacity:1; pointer-events:auto;
}
#bi-chart-form.funnel-analysis-form #bi-filters-list [data-add-parallel-filter]:is(:hover,:focus-visible) { color:#333; background:#ebedf3; }
.funnel-analysis-form :is(#bi-filters-list,#bi-groups-list) :is([data-add-parallel-filter],[data-remove-filter],[data-remove-group])::before {
  content:''; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:14px; height:14px; background:currentColor; mask:var(--funnel-filter-action-icon) center/contain no-repeat; pointer-events:none;
}
.funnel-analysis-form [data-add-parallel-filter] {
  --funnel-filter-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black'%3E%3Cpath d='M2 2h10L8 7v4l-2 1V7zM9 13h6m-3-3v6' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.funnel-analysis-form :is([data-remove-filter],[data-remove-group]) {
  --funnel-filter-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m6 6 4 4m0-4-4 4'/%3E%3C/svg%3E");
}
@media (hover:none) {
  #bi-chart-form.funnel-analysis-form :is(#bi-filters-list,#bi-groups-list) :is([data-add-parallel-filter],[data-remove-filter],[data-remove-group]) { opacity:1; pointer-events:auto; }
}
.funnel-global-filter-editor {
  border:0; border-radius:4px; color:#333; box-shadow:0 8px 28px rgb(29 33 51 / 12%);
}
.funnel-global-filter-editor .global-filter-selector-search {
  position:relative; display:flex; align-items:center; height:40px; padding:0 12px; border-bottom:1px solid #e0e0e0;
}
.funnel-global-filter-editor .global-filter-selector-search::before {
  content:''; width:14px; height:14px; flex:none; background:#444;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black'%3E%3Ccircle cx='6.5' cy='6.5' r='4.5'/%3E%3Cpath d='m10 10 4 4'/%3E%3C/svg%3E") center/contain no-repeat;
}
.funnel-global-filter-editor .global-filter-selector-search input {
  border:0; padding:0 8px; background:transparent; box-shadow:none; outline:none; color:#333; font-size:14px;
}
.funnel-global-filter-editor .global-filter-selector-search input::placeholder { color:#b7b8bc; }
.funnel-global-filter-editor .global-filter-selector-tabs { min-height:37px; padding:0 12px; gap:12px; border-color:#e0e0e0; }
.funnel-global-filter-editor .global-filter-selector-tabs button { height:36px; padding:0; color:#808184; }
.funnel-global-filter-editor .global-filter-selector-tabs button.active { color:#333; }
.funnel-global-filter-editor .global-filter-selector-tabs button.active::after { inset-inline:0; height:4px; background:#1677ff; }
.funnel-global-filter-editor .global-filter-selector-options { padding:4px 12px 8px; }
.funnel-global-filter-editor .bi-field-picker-group > strong { padding:10px 4px 6px; color:#808184; font-size:12px; }
.funnel-global-filter-editor .global-filter-favorites { border-bottom:1px solid #e0e0e0; padding-bottom:8px; }
.funnel-global-filter-editor .bi-field-picker-favorite-empty { color:#b7b8bc; font-size:12px; }
.funnel-global-filter-editor .global-filter-entry { min-height:30px; border-radius:4px; }
.funnel-global-filter-editor .global-filter-entry:is(:hover,:focus-within,:has(.active)) { background:#f3f4f8; }
.funnel-global-filter-editor .global-filter-entry > button:first-child { height:30px; color:#333; font-size:14px; }
.funnel-global-filter-editor .global-filter-entry > button:first-child:disabled { color:#999; cursor:not-allowed; }
.funnel-global-filter-editor .global-filter-entry > button:first-child small { color:#888; font-size:12px; }
.funnel-global-filter-editor .global-filter-entry small i { font-style:normal; margin-right:4px; }
.funnel-global-filter-editor .global-filter-favorite:not(.active) { color:#333; opacity:0; }
.funnel-global-filter-editor .global-filter-entry:is(:hover,:focus-within) .global-filter-favorite { opacity:1; }
.funnel-global-filter-editor .global-filter-property-detail { border:0; min-height:225px; box-shadow:0 7px 24px rgb(29 33 51 / 12%); }
.funnel-global-filter-editor .metric-property-detail-head { background:#f4f4f8; padding:12px; }
.funnel-global-filter-editor .metric-property-detail-description { min-height:130px; }
.funnel-global-filter-editor .global-filter-editor-main { box-sizing:border-box; min-height:88px; padding:16px; }
.funnel-global-filter-editor .global-filter-editor-main > input[type=text] { width:80px; }
.funnel-global-filter-editor .global-filter-editor-main .metric-editor-button { border-color:#e0e0e0; }
.funnel-filter-text-values {
  position:relative; display:flex; flex-wrap:wrap; align-items:center; gap:4px; box-sizing:border-box;
  width:120px; min-height:32px; padding:3px 4px; border:1px solid #e0e0e0; border-radius:4px;
}
.funnel-filter-text-values input { flex:1 1 24px; width:24px; min-width:0; height:24px; padding:0 2px; border:0; font:inherit; outline:none; }
.funnel-filter-text-values [data-funnel-filter-add-value] {
  position:absolute; z-index:1; top:calc(100% + 4px); inset-inline:0; min-height:32px; padding:4px 8px;
  border:1px solid #e0e0e0; border-radius:4px; background:#fff; color:#333; text-align:left;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.funnel-filter-text-values [data-funnel-filter-add-value]:hover { background:#f2f3f8; }
.funnel-global-filter-editor .global-filter-editor-help { box-sizing:border-box; min-height:51px; padding:14px 16px; background:#f6f6f9; color:#777; font-size:14px; }
.funnel-global-filter-editor .global-filter-dropdown { border:0; box-shadow:0 8px 28px rgb(29 33 51 / 12%); }
.funnel-global-filter-editor .global-filter-dropdown [data-global-filter-options] { padding:4px; }
.funnel-global-filter-editor .global-filter-dropdown button { min-height:38px; padding:6px 8px; border-radius:4px; }
.funnel-global-filter-editor .global-filter-dropdown button + button { margin-top:4px; }
.funnel-analysis-form #bi-result-tools { position:relative; min-height:65px; padding:0 35px 1px 24px; background:#fff; }
.funnel-analysis-form :is(.retention-subject .retention-setting-trigger,.funnel-step-head .analysis-event-trigger):hover {
  border-color:#3583ef; background:#fff;
}
.funnel-analysis-form :is(.retention-subject .retention-setting-trigger,.funnel-step-head .analysis-event-trigger)[aria-expanded="true"] {
  border-color:#1e76f0; background:#fff; box-shadow:0 0 0 3px #dae9fb;
}
.funnel-analysis-form .funnel-toolbar { flex:none; gap:16px; }
.funnel-analysis-form .funnel-toolbar .analysis-viz-switch { border:1px solid #e0e0e0; border-radius:4px; }
.funnel-analysis-form .funnel-toolbar button { display:grid; place-items:center; box-sizing:border-box; width:32px; height:32px; min-width:0; padding:0; border:1px solid #e0e0e0; border-radius:4px; color:#7e7f80; background:#fff; box-shadow:none; }
.funnel-analysis-form .funnel-toolbar svg { width:14px; height:14px; pointer-events:none; }
.funnel-analysis-form .funnel-toolbar .analysis-viz-switch button { flex:none; width:31px; height:30px; border:0; }
.funnel-analysis-form .funnel-toolbar [data-funnel-action="bar"] { border-radius:3px 0 0 3px; }
.funnel-analysis-form .funnel-toolbar [data-funnel-action="line"] { border-radius:0 3px 3px 0; }
.funnel-analysis-form .funnel-toolbar button[aria-pressed="true"] { background:#ebedf3; color:#333; }
.funnel-analysis-form .funnel-toolbar [data-funnel-action="settings"] { width:34px; color:#333; }
.funnel-analysis-form .funnel-toolbar [data-funnel-action="settings"]:disabled { color:#bdbebf; border-color:#e3e4e5; cursor:not-allowed; }
.funnel-analysis-form .funnel-toolbar [data-funnel-action="settings"] svg { width:16px; height:16px; }
.funnel-analysis-form #analysis-empty { align-content:center; justify-items:center; gap:12px; padding:20px 11px 40px 0; color:#333; text-align:center; }
.funnel-analysis-form .funnel-empty-image { display:block; width:min(400px,100%); height:auto; margin:0 0 20px; }
.funnel-analysis-form #analysis-empty > strong { line-height:25px; }
.funnel-analysis-form .funnel-empty-title { display:inline; font-size:16px; font-weight:500; line-height:25px; }
.funnel-model-example, .interval-model-example { display:none; }
.funnel-analysis-form:not(.interval-analysis-form) .funnel-model-example,
.interval-analysis-form .interval-model-example { display:block; }
@media (max-width:800px) {
  .funnel-analysis-form #bi-result-tools { padding-inline:12px; }
  .funnel-analysis-form #analysis-empty { padding-inline:16px; }
  .funnel-analysis-form .funnel-step-head { gap:8px; }
  .funnel-analysis-form .funnel-step-actions { gap:1px; }
}
.funnel-popover:is(.funnel-window-popover,.funnel-ranges-popover) { padding:0; overflow:visible; border:0; font:400 14px/22px Roboto,Arial,"PingFang SC",sans-serif; color:#333; }
.funnel-window-popover { --funnel-window-shadow:0 4px 14px #0a103205,0 10px 20px #0a103208,0 14px 24px #0a10320d; width:137px; box-shadow:var(--funnel-window-shadow); }
.funnel-window-units,.funnel-window-values { display:grid; gap:4px; padding:6px 4px; }
.funnel-window-units { padding-block:4px 8px; }
.funnel-window-values { position:absolute; left:calc(100% + 4px); width:148px; background:#fff; border-radius:4px; box-shadow:var(--funnel-window-shadow); }
.funnel-window-values.funnel-submenu-left { left:auto; right:calc(100% + 4px); }
.funnel-window-units button span,.funnel-ranges-popover button span { float:right; color:#777; }
.funnel-popover:is(.funnel-window-popover,.funnel-ranges-popover) button { height:38px; min-height:38px; padding:0 8px; white-space:nowrap; color:inherit; border-radius:4px; font:inherit; box-shadow:none; }
.funnel-popover .funnel-window-values button { height:36px; min-height:36px; }
.funnel-popover:is(.funnel-window-popover,.funnel-ranges-popover) button:is([aria-expanded=true],[aria-pressed=true]) { background:#ebedf3; }
.funnel-window-custom { display:flex; align-items:center; justify-content:space-between; min-height:36px; padding:0 8px; border-radius:4px; cursor:pointer; }
.funnel-window-custom input { width:60px; min-width:0; height:24px; border:1px solid #dedfe4; border-radius:4px; padding:0 4px; }
.funnel-window-custom:hover { background:#f0f1f5; }
.funnel-visual-settings .funnel-menu-row { display:grid; grid-template-columns:74px minmax(0,1fr); column-gap:16px; min-height:48px; padding:8px 12px; background:#f7f7f9; color:#333; font:400 14px/22px Roboto,Arial,"PingFang SC",sans-serif; }
.funnel-visual-settings [data-funnel-settings-close] { display:grid; place-items:center; flex:none; width:32px; height:32px; min-height:0; padding:0; border:0; border-radius:4px; color:#333; background:transparent; box-shadow:none; }
.funnel-visual-settings [data-funnel-settings-close]:hover { background:#eff0f4; }
.funnel-visual-settings [data-funnel-settings-close] svg { width:16px; height:16px; }
.funnel-value-label { display:inline-flex; align-items:center; gap:4px; }
.funnel-setting-help { display:inline-flex; cursor:default; }
.funnel-visual-settings [data-funnel-step-menu] { display:inline-flex; align-items:center; justify-content:space-between; justify-self:start; gap:9px; height:32px; min-height:32px; min-width:84px; border:1px solid #e3e4e5; border-radius:4px; background:#fff; padding:0 11px; color:#333; font:inherit; box-shadow:none; }
.funnel-visual-settings [data-funnel-step-menu]:is(:hover,:focus-visible,[aria-expanded=true]) { border-color:#3583ef; box-shadow:none; }
.funnel-step-menu-arrow { width:6px; height:6px; border:solid #777; border-width:0 1px 1px 0; transform:translateY(-2px) rotate(45deg); }
.funnel-ranges-popover { --funnel-range-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d; width:111px; box-shadow:var(--funnel-range-shadow); }
.funnel-ranges-popover > div { height:min(256px,calc(100vh - 16px)); padding:4px 5px 4px 4px; overflow:auto; border-radius:4px; background:#fff; }
.funnel-ranges-popover button + button { margin-top:4px; }
.funnel-ranges-popover [data-funnel-ends] { position:absolute; top:0; left:100%; width:111px; border-radius:0 4px 4px 0; box-shadow:var(--funnel-range-shadow); }
.funnel-ranges-popover .funnel-submenu-left { left:auto; right:100%; border-radius:4px 0 0 4px; }
.funnel-arrow path { fill:#f1f2f6; stroke:#d5d9e3; }
.funnel-arrow text { fill:#626b80; font-size:11px; }
.funnel-trend-label { fill:#606b81; font-size:11px; }
.funnel-result-table :is(th,td) { height:36px; padding:6px 8px; border:1px solid #e3e4e5; font:400 14px/18px Roboto,Arial,"PingFang SC",sans-serif; }
.funnel-result-table thead th { background:#f9f9fb; color:#212121; font-weight:500; box-shadow:none; }
.funnel-result-table tbody :is(th,td) { height:53px; }
.funnel-result-table tr > :first-child { min-width:88px; width:88px; }
.funnel-result-table tbody th { background:#fff; }
.funnel-result-table tbody tr:hover th { background:#f6f6f9; }

/* 间隔分析的两端事件复用条件编辑器，图表和区间配置保持独立。 */
.interval-analysis-form [data-funnel-action="add"], .interval-analysis-form .funnel-window-help { display:none; }
.interval-analysis-form .funnel-window-row { grid-template-columns:minmax(0,max-content) max-content; }
.interval-analysis-form .funnel-window-row::before { grid-area:2 / 1; content:'起点事件到终点事件的间隔不超过'; color:#333; font-size:14px; font-weight:400; }
.interval-analysis-form .funnel-window-row .analysis-field-trigger { grid-area:2 / 2; }
.interval-event-title { margin:6px 0 2px; color:#7e7f80; font-size:12px; }
.interval-analysis-form .funnel-step-head { margin-inline:-12px; padding-inline:12px; }
.interval-analysis-form .funnel-step-head:is(:hover,:focus-within) { background:#f9f9fb; }
.interval-analysis-form .funnel-step-actions { align-items:center; justify-content:flex-end; }
.interval-association-line { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:6px 0; color:#666; font-size:13px; }
.interval-association-line input { width:68px; height:26px; }
#bi-interval-toolbar { margin-left:auto; gap:8px; padding-left:8px; flex-wrap:wrap; }
#bi-interval-toolbar svg { width:16px; height:16px; vertical-align:middle; }
.interval-chart-selects { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:12px; padding:10px 14px; }
.interval-chart-selects select,.interval-table-footer select { min-width:100px; min-height:30px; border:1px solid #d8dce3; border-radius:4px; background:#fff; color:inherit; }
.interval-chart-selects select { max-width:min(240px,60vw); }
.interval-results { min-width:0; padding:0 18px 16px; font-size:13px; }
.interval-plot { width:100%; overflow:auto; border-bottom:1px solid #e1e5eb; }
.interval-plot svg { display:block; width:100%; height:355px; }
.interval-plot text { fill:#5e6b80; font-size:12px; }
.interval-empty { min-height:200px; display:grid; place-items:center; color:#7e8797; }
.interval-result-actions,.interval-table-footer { display:flex; justify-content:flex-end; align-items:center; gap:8px; padding:14px 0; }
.interval-result-actions button,.interval-table-footer button { min-height:30px; padding:0 10px; border:1px solid #d8dce3; border-radius:4px; background:#fff; color:inherit; cursor:pointer; }
.interval-table-footer > span:first-child { margin-right:auto; color:#666; }
.interval-results .event-result-table :is(th,td),.interval-groups-popup :is(th,td) { text-align:center; white-space:nowrap; }
.interval-results th button { border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.interval-secondary { margin-top:3px; color:#697587; font-size:12px; }
.interval-group-expand { margin-right:6px; border:1px solid #8c96a5; border-radius:2px; padding:0 2px; background:#fff; color:#303742; cursor:pointer; line-height:1; }
.interval-buckets-popup,.interval-groups-popup { width:min(420px,calc(100vw - 16px)); padding:12px; max-height:calc(100dvh - 16px); overflow:auto; }
.interval-popup-tabs { display:flex; border-bottom:1px solid #e1e5eb; }
.interval-popup-tabs button[aria-selected=true] { color:#1677ff; box-shadow:inset 0 -2px #1677ff; }
.interval-bucket-body { padding:12px 0; }
.interval-unit-options,.interval-bucket-add { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.interval-unit-options input,.interval-column-options input { margin-right:4px; }
.interval-boundaries { display:grid; grid-template-columns:repeat(auto-fit,minmax(108px,1fr)); gap:4px; margin-block:8px; }
.interval-boundaries > div { display:flex; align-items:center; min-width:0; }
.interval-boundaries input,.interval-batch-popup input[type=number] { width:68px; min-width:0; height:28px; border:1px solid #d8dce3; border-radius:4px; }
.interval-buckets-popup footer { display:flex; justify-content:flex-end; gap:6px; border-top:1px solid #e1e5eb; padding-top:8px; }
.interval-batch-popup { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px; border:1px solid #e1e5eb; border-radius:4px; }
.interval-batch-popup textarea { flex:1 0 100%; min-height:70px; }
.interval-buckets-popup [role=alert] { margin:0; color:#bc3b2b; }
.interval-column-options { display:grid; gap:6px; padding:8px; }
.interval-visual-settings .retention-viz-setting { padding:10px; }
@media (max-width:480px) {
  .interval-analysis-form .funnel-window-row { row-gap:4px; }
  .interval-analysis-form .funnel-window-row::before { font-size:12px; }
  .interval-results { padding-inline:8px; }
  .interval-chart-selects { justify-content:flex-start; padding-inline:0; }
}

/* 已实测的浮层入场。保留现有展开状态、焦点与关闭时机。 */
@media (prefers-reduced-motion: no-preference) {
  #analysis-top-options:not([hidden]) { animation:analysis-top-expand 200ms cubic-bezier(.08,.82,.17,1); }
  [data-overlay-motion="reveal"] {
    --overlay-reveal-start: inset(-24px -24px 20% -24px);
    animation: overlay-reveal-in 200ms cubic-bezier(.08,.82,.17,1);
  }
  [data-overlay-motion="reveal"][data-overlay-above] { --overlay-reveal-start: inset(20% -24px -24px -24px); }
  :is(#project-picker > section, .event-picker-panel,
      #saved-reports-type-menu, #bi-report-dashboard-menu, #report-manager-create-menu,
      .segment-actions-menu, .dimension-row-more[open] > div,
      .funnel-window-popover, .funnel-ranges-popover, [data-overlay-motion="expand"]) {
    transform-origin: left top;
    animation: overlay-expand-in 200ms cubic-bezier(.08,.82,.17,1);
  }
  :is(#project-picker > section, .event-picker-panel,
      #saved-reports-type-menu, #bi-report-dashboard-menu, #report-manager-create-menu,
      .segment-actions-menu, .dimension-row-more[open] > div,
      .funnel-window-popover, .funnel-ranges-popover, [data-overlay-motion="expand"])[data-overlay-above] {
    transform-origin: left bottom;
  }
  /* 这些浮层内含 viewport 定位的二级面板。位移使用布局属性，避免改变二级面板的定位基准。 */
  :is(.dashboard-add-menu,
      .group-field-picker-panel[data-overlay-group],
      .bi-field-picker-panel[data-event-metric-motion]:has(.metric-editor-popover),
      [data-overlay-motion="anchor"]) {
    --overlay-enter-offset: -8px;
    animation: overlay-anchor-in 200ms cubic-bezier(.08,.82,.17,1);
  }
  :is(.dashboard-add-menu,
      .group-field-picker-panel, [data-overlay-motion="anchor"])[data-overlay-above] {
    --overlay-enter-offset: 8px;
  }
  .dashboard-add-menu-parent > .dashboard-add-submenu {
    animation: overlay-submenu-in 200ms cubic-bezier(.08,.82,.17,1);
  }
  .global-filter-editor[data-overlay-motion="anchor"] [data-funnel-filter-add-value]:not([hidden]) {
    transform-origin: left top;
    animation: overlay-expand-in 200ms cubic-bezier(.08,.82,.17,1);
  }
  :is(#bi-report-details-dialog, #dashboard-share-dialog, #saved-reports-dialog):not([hidden]) {
    animation: overlay-backdrop-in 200ms ease-out;
  }
  :is(#bi-report-details-dialog, #dashboard-share-dialog, #saved-reports-dialog):not([hidden]) > section,
  :is(#bi-report-board-create, .event-stage-settings, .dimension-list-create-dialog, dialog[data-overlay-motion="modal"])[open] {
    animation: overlay-zoom-in 300ms cubic-bezier(.08,.82,.17,1);
  }
  :is(#bi-report-board-create, .event-stage-settings, .dimension-list-create-dialog, dialog[data-overlay-motion="modal"])[open]::backdrop {
    animation: overlay-backdrop-in 200ms ease-out;
  }
  #bi-saved-panel:not([hidden]) {
    animation: overlay-drawer-in 300ms cubic-bezier(.08,.82,.17,1);
  }
}
@keyframes analysis-top-expand {
  from { clip-path:inset(-24px -24px 100%); opacity:0; }
  to { clip-path:inset(-24px -24px -24px); opacity:1; }
}
@keyframes overlay-reveal-in {
  from { opacity:0; clip-path:var(--overlay-reveal-start); }
  to { opacity:1; clip-path:inset(-24px); }
}
@keyframes overlay-expand-in {
  from { opacity:0; transform:scaleY(.8); }
  to { opacity:1; transform:scaleY(1); }
}
@keyframes overlay-anchor-in {
  from { opacity:0; margin-block-start:var(--overlay-enter-offset); }
  to { opacity:1; margin-block-start:0; }
}
@keyframes overlay-submenu-in {
  from { opacity:0; scale:.8; }
  to { opacity:1; scale:1; }
}
@keyframes overlay-zoom-in {
  from { opacity:0; scale:.7; }
  to { opacity:1; scale:1; }
}
@keyframes overlay-backdrop-in {
  from { background-color:transparent; }
}
@keyframes overlay-drawer-in {
  from { translate:100% 0; }
  to { translate:0 0; }
}

/* 事件分析使用与漏斗相同的页头和内容分栏。 */
.funnel-page-title :is(.event-page-icon,.retention-page-icon),.event-metrics-icon { display:none; }
.event-analysis-form .funnel-page-title,.retention-analysis-form .funnel-page-title { display:flex; align-items:center; gap:6px; margin:0; color:#212121; font-size:20px; font-weight:500; }
.event-analysis-form .funnel-page-title svg:not(.event-page-icon) { display:none; }
.event-analysis-form .funnel-page-title .event-page-icon { display:block; }
.retention-analysis-form .funnel-page-title { gap:0; line-height:32px; }
.retention-analysis-form .funnel-page-title > svg:not(.retention-page-icon) { display:none; }
.retention-analysis-form .funnel-page-title .retention-page-icon { display:block; margin-right:4px; }
.retention-analysis-form #bi-paired-page-title { padding-inline:8px; }
.retention-analysis-form .funnel-title-help .information-icon { width:16px; height:16px; }
.analysis-split-form .analysis-layout { background:#f0f0f2; }
.analysis-split-form .analysis-layout::before { content:none; }
:is(.event-analysis-form,.retention-analysis-form) #bi-analysis-toolbar { grid-column:1/-1; min-height:70px; margin-left:calc(-1 * var(--analysis-left-gutter, 0px)); padding:12px 24px; gap:8px; flex-wrap:wrap; justify-content:space-between; background:#f0f0f2; border:0; }
.retention-analysis-form #bi-analysis-toolbar { min-height:74px; padding-block:24px 18px; }
.event-analysis-form #bi-analysis-toolbar .analysis-toolbar-actions { flex-wrap:wrap; margin-left:auto; }
.event-analysis-form #bi-analysis-toolbar .analysis-tool-icon { border-color:transparent; }
.event-analysis-form #bi-save-chart:not(:disabled) { background:#1e76f0; border-color:#1e76f0; font-weight:400; }
:is(.event-analysis-form,.retention-analysis-form) #bi-analysis-mode-section { display:none; }
.analysis-split-form .analysis-main { background:#fff; border-radius:0 4px 0 0; }
.analysis-split-form .analysis-sidebar { border-radius:4px 0 0; border-right:0; border-left:1px solid #e3e4e5; }
#bi-chart-form.event-analysis-form .analysis-sidebar-section:not(#bi-analysis-mode-section):not(#bi-analysis-settings-section) { min-height:68px; padding:12px var(--event-section-inline-padding) 8px; border-bottom:0; }
#bi-chart-form.event-analysis-form .analysis-sidebar-title .analysis-section-heading { display:inline-flex; gap:8px; align-items:center; color:#333; font-weight:500; }
.event-analysis-form .funnel-section-icon,.event-analysis-form .event-metrics-icon { display:inline-flex; width:16px; height:16px; align-items:center; }
.event-analysis-form .funnel-section-icon svg { width:16px; height:16px; }
#bi-chart-form.event-analysis-form #bi-metrics-list > .named-metric-row > :is(.metric-display-name,.metric-display-name-input) { color:#333; font-size:14px; font-weight:500; }
#bi-chart-form.event-analysis-form #bi-metrics-list > .named-metric-row > :is(.metric-display-name:enabled:is(:hover,:focus-visible,:active),.metric-display-name-input) { color:#1e76f0; }
#bi-chart-form.event-analysis-form :is(.analysis-metric-row,.analysis-formula-row) .analysis-field-trigger,
#bi-chart-form.event-analysis-form :is(#bi-filters-list,#bi-groups-list) :is(.analysis-field-trigger,.analysis-filter-operator-trigger) {
  min-height:26px; height:26px; border-color:transparent; background:#f2f3f8; color:#333; font-size:14px; font-weight:400;
}
#bi-chart-form.event-analysis-form :is(#bi-metrics-list,#bi-filters-list,#bi-groups-list) .analysis-field-trigger[aria-expanded="true"] {
  border-color:#1e76f0; background:#fff; box-shadow:0 0 0 3px #dae9fb;
}
.event-sidebar-divider { position:relative; background:#fff; border-left:1px solid #e3e4e5; }
.event-sidebar-toggle { display:grid; place-items:center; box-sizing:border-box; width:28px; height:24px; padding:0; background:#fff; border:1px solid #e3e4e5; border-radius:12px 0 0 12px; border-right:0; color:#333; cursor:pointer; }
.event-sidebar-toggle svg { width:16px; height:16px; }
#bi-event-sidebar-open { transform:rotate(180deg); }
#bi-event-sidebar-open:hover:not(:focus-visible) { background:#fff; }
.event-sidebar-toggle:is(:hover,:focus-visible) { background:#f1f2f6; }
.analysis-split-form.event-sidebar-collapsed .analysis-sidebar { display:none; }
.analysis-split-form #bi-result-tools { position:relative; box-sizing:border-box; min-height:65px; align-content:center; }
:is(.event-analysis-form,.retention-analysis-form) #bi-result-tools { padding-block:8px; }
.analysis-split-form #bi-result-tools::after { content:''; position:absolute; inset-inline:0 11px; bottom:0; border-bottom:1px solid #e3e4e5; pointer-events:none; }
:is(.event-analysis-form,.retention-analysis-form) #analysis-empty { align-content:center; justify-items:center; gap:12px; padding:20px 12px 40px; color:#333; text-align:center; }
:is(.event-analysis-form,.retention-analysis-form) .funnel-empty-image { display:block; width:min(400px,100%); height:auto; margin-bottom:20px; }
:is(.event-analysis-form,.retention-analysis-form) .analysis-empty-default { display:none; }
:is(.event-analysis-form,.retention-analysis-form) .funnel-empty-title { display:inline; font-size:16px; font-weight:500; line-height:25px; }
.retention-model-example { display:none; }
.retention-analysis-form .retention-model-example { display:block; }
.analysis-model-example { color:#7e7f80; font-size:14px; }
.analysis-model-example a { color:#1e76f0; text-decoration:none; }
.analysis-model-example a:focus-visible:not(:hover) { text-decoration:underline; }
.event-analysis-form #bi-chart-preview [data-event-result-count] { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.event-analysis-form #bi-chart-preview .event-analysis-table th { color:#212121; background:#f9f9fb; }
@media (min-width:801px) {
  .analysis-workspace .analysis-split-form .analysis-layout {
    --analysis-left-gutter:15px;
    grid-template-columns:min(var(--event-sidebar-width,496px),52vw) 4px minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr); column-gap:0; padding-right:20px;
  }
  .analysis-workspace .analysis-split-form.event-sidebar-collapsed .analysis-layout {
    grid-template-columns:0 4px minmax(0,1fr);
  }
  .analysis-split-form .analysis-sidebar { grid-area:2 / 1; }
  .analysis-split-form .analysis-main { grid-area:2 / 3; }
  .event-sidebar-divider { grid-area:2 / 2; z-index:2; }
  .event-sidebar-divider > [role="separator"] { position:absolute; inset:0; cursor:col-resize; touch-action:none; }
  .event-sidebar-divider > [role="separator"]:focus-visible { outline:1px solid #1e76f0; outline-offset:-1px; }
  .event-sidebar-toggle { position:absolute; bottom:15px; }
  #bi-event-sidebar-toggle { right:100%; margin-right:1px; }
  #bi-event-sidebar-open { left:0; }
  .analysis-split-form #bi-analysis-toolbar { margin-right:-20px; }
}
@media (max-width:800px) {
  .event-sidebar-divider:not([hidden]) { display:flex; justify-content:flex-end; padding:4px 0; }
  .analysis-split-form .analysis-main { border-left:1px solid #e3e4e5; }
  .event-sidebar-divider > [role="separator"] { display:none; }
}
.event-analysis-form .analysis-main:has(.event-viz-panel:not([hidden])) { display:grid; grid-template-columns:minmax(0,1fr) min(320px,40%); grid-template-rows:auto minmax(0,1fr); grid-template-areas:"tools settings" "result settings"; }
.event-viz-panel { grid-area:settings; min-width:0; max-height:100%; overflow:auto; background:#fff; color:#333; border-inline-start:1px solid #e3e4e5; border-radius:0 4px 0 0; font-size:14px; }
.event-viz-panel header { display:flex; justify-content:space-between; align-items:center; min-height:64px; padding:0 12px; }
.event-viz-panel header strong { font-size:16px; font-weight:500; }
.event-viz-panel :is(header button,.event-viz-option > button) { display:grid; place-items:center; padding:0; border:0; border-radius:4px; background:transparent; color:#333; box-shadow:none; cursor:pointer; }
.event-viz-panel header button { width:32px; height:32px; }
.event-viz-panel header button:hover,.event-viz-panel .event-viz-option > button:hover { background:#ebedf3; }
.event-viz-panel svg { width:14px; height:14px; flex:none; }
.event-viz-panel > .event-viz-general { margin:8px 8px 0; padding-bottom:8px; }
.event-viz-chart-sections { padding:8px; border-top:1px solid #e3e4e5; }
.event-viz-chart-sections details + details { margin-top:8px; }
.event-viz-panel summary { min-height:32px; padding:0 16px 0 12px; display:flex; align-items:center; gap:4px; border-radius:4px; list-style:none; font-weight:400; cursor:pointer; }
.event-viz-panel summary::-webkit-details-marker { display:none; }
.event-viz-panel summary::after { content:""; width:5px; height:5px; margin-left:auto; border:solid currentColor; border-width:0 1px 1px 0; transform:rotate(-45deg); }
.event-viz-panel details[open] > summary::after { transform:translateY(1px) rotate(225deg); }
.event-viz-panel summary:not([aria-disabled="true"]):is(:hover,:focus-visible) { background:#f1f2f6; }
.event-viz-panel summary[aria-disabled="true"] { color:#bdbebf; cursor:not-allowed; }
.event-viz-settings { margin-top:8px; padding:8px 16px; border-radius:3px; background:#f7f7f9; }
.event-viz-setting { display:flex; align-items:center; gap:4px; min-height:48px; font-size:14px; }
.event-viz-setting .information-icon { width:12px; height:12px; color:#7e7f80; }
.event-viz-setting > .event-viz-switch { margin-left:12px; }
.event-viz-setting.event-viz-option { display:grid; grid-template-columns:100px minmax(0,1fr); }
.event-viz-setting.event-viz-option > .event-viz-switch { margin-left:0; }
.event-viz-panel .event-viz-option > button { width:24px; height:24px; background:transparent; }
.event-viz-switch { appearance:none; position:relative; flex:none; margin:0; width:32px; height:16px; border:0; border-radius:8px; background:#d5d7e1; cursor:pointer; }
.event-viz-switch::before { content:""; position:absolute; width:12px; height:12px; left:2px; top:2px; border-radius:50%; background:#fff; }
.event-viz-switch:checked { background:#1e76f0; }
.event-viz-switch:checked::before { left:18px; }
.event-viz-axis { position:relative; margin:0; padding:0 0 0 100px; min-width:0; border:0; }
.event-viz-axis legend { position:absolute; top:14px; left:0; padding:0; }
.event-viz-axis label { display:flex; align-items:center; gap:12px; min-height:48px; white-space:nowrap; }
.event-viz-panel :is(input[type="number"],select) { min-width:0; max-width:100%; height:32px; padding:0 8px; color:#333; border:1px solid #e3e4e5; border-radius:4px; background:#fff; box-shadow:none; font:inherit; }
.event-viz-axis input,.event-viz-popover input[type="number"] { width:96px; }
.event-viz-panel input::placeholder { color:#bdbebf; }
.event-viz-panel p { color:#b42318; margin:0 0 6px; }
/* 事件可视化子面板与选择器共用白底、独立页脚和蓝色焦点环。 */
.event-viz-popover,.event-viz-options,.event-guide-color {
  position:fixed; inset:auto; margin:0; color:#333; background:#fff;
  box-shadow:0 10px 32px #2022381c;
}
.event-viz-popover { width:min(480px,calc(100vw - 16px)); max-height:calc(100dvh - 16px); border:0; padding:0; overflow:visible; }
.event-viz-panel .event-viz-popover > header { min-height:64px; padding:0 32px; }
.event-viz-popover h3 { color:#212121; display:flex; gap:6px; align-items:center; margin:0; font-size:16px; font-weight:500; }
.event-viz-popover header button { width:28px; height:28px; font-size:20px; font-weight:400; }
.event-viz-popover footer { display:flex; justify-content:flex-end; gap:8px; padding:16px 24px 12px; border-top:1px solid #e0e0e0; }
.event-viz-popover footer button { height:32px; min-width:60px; border:0; background:transparent; padding:0 12px; border-radius:4px; color:#333; font-size:14px; font-weight:400; }
.event-viz-popover footer button:enabled:hover { background:#f0f1f6; }
.event-viz-popover footer button:last-child { background:#1e76f0; color:#fff; }
.event-viz-popover footer button:last-child:enabled:hover { background:#1266d7; }
.event-viz-popover footer button:disabled { background:#98b2f4; color:#fff; cursor:not-allowed; }
.event-viz-metric-head,.event-viz-metric-row { display:grid; grid-template-columns:minmax(0,192fr) minmax(78px,135fr) minmax(62px,89fr); align-items:center; }
.event-viz-metric-head { margin-inline:32px; border-bottom:1px solid #e0e0e0; min-height:46px; color:#212121; font-size:14px; line-height:22px; font-weight:500; }
.event-viz-metric-head > span,.event-viz-metric-row > * { margin-left:16px; }
#bi-event-viz-metrics-list { padding:8px 32px 28px; max-height:min(260px,40dvh); overflow:auto; }
.event-viz-metric-row { min-height:52px; }
.event-viz-metric-name { display:flex; align-items:center; gap:8px; min-width:0; }
.event-viz-metric-name > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.event-viz-metric-name b { flex:none; display:grid; place-items:center; width:20px; height:20px; background:#202240; border-radius:4px; color:white; font-size:12px; font-weight:400; }
.event-viz-metric-axis.event-viz-switch { width:40px; height:20px; margin-left:16px; border-radius:10px; }
.event-viz-metric-axis.event-viz-switch:not(:checked) { background:#b9becf80; }
.event-viz-metric-axis.event-viz-switch:not(:checked):hover { background:#b9becf; }
.event-viz-metric-axis.event-viz-switch:checked:hover { background:#1266d7; }
.event-viz-metric-axis.event-viz-switch::before { width:14px; height:14px; top:3px; left:3px; box-shadow:0 1px 3px #0002; }
.event-viz-metric-axis.event-viz-switch:checked::before { left:23px; }
.event-viz-select { display:inline-flex; min-width:0; width:max-content; max-width:100%; }
.event-viz-panel .event-viz-select-trigger { display:inline-flex; align-items:center; gap:8px; width:max-content; height:32px; padding:0 9px; background:#fff; border:1px solid #e0e0e0; border-radius:4px; color:#333; font:inherit; }
.event-viz-select-trigger::after { content:""; width:4px; height:4px; flex:none; border:solid #7e7f80; border-width:0 1px 1px 0; transform:translateY(-1px) rotate(45deg); }
.event-viz-select-trigger[aria-expanded="true"]::after { transform:translateY(1px) rotate(225deg); }
.event-viz-panel .event-viz-select-trigger:hover { border-color:#b9becf; }
.event-viz-panel .event-viz-select-trigger:is(:focus-visible,[aria-expanded="true"]) { border-color:#1b61c4; outline:0; box-shadow:0 0 0 3px #dae9fb; }
.event-viz-options { min-width:80px; padding:4px; border:0; border-radius:4px; }
.event-viz-options button { display:block; width:100%; height:38px; padding:0 8px; text-align:left; border:0; border-radius:4px; background:white; color:#333; font-size:14px; }
.event-viz-options button:is(:hover,:focus-visible,.selected) { background:#f2f3f8; }
.event-viz-options button:active { background:#e8eaf2; }
[data-line-style]::before { content:""; display:inline-block; width:29px; margin-right:4px; vertical-align:middle; border-top:1px solid; }
[data-line-style="dashed"]::before { border-top-style:dashed; }
.event-viz-guide-body { min-height:min(222px,40dvh); max-height:min(290px,48dvh); overflow:auto; padding:0 32px 12px; }
#bi-event-viz-guide-panel { width:min(466px,calc(100vw - 16px)); }
#bi-event-viz-guide-add { height:36px; padding:0 4px; border:0; background:transparent; color:#1e76f0; font-size:14px; }
.event-guide-row { padding:2px 3px 14px; }
.event-guide-fields,.event-guide-value { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.event-guide-value { margin-top:8px; }
.event-guide-fields > input { flex:1; width:160px; min-width:94px; }
.event-viz-panel .event-guide-row :is(input[type="number"],input[type="text"]) { height:32px; padding:0 8px; border:1px solid #e0e0e0; border-radius:4px; color:#333; font:inherit; }
.event-guide-value label { display:inline-flex; gap:8px; align-items:center; }
.event-guide-value input[type="number"] { width:124px; }
.event-guide-value input[type="checkbox"] { margin:0; accent-color:#1e76f0; }
.event-guide-color-trigger i,.event-guide-swatches button { display:inline-block; width:16px; height:16px; background:var(--guide-color); }
.event-guide-action { width:24px; height:24px; flex:none; padding:0; border:0; border-radius:4px; background:transparent; color:#333; font:16px/1 sans-serif; }
.event-guide-action:is(:hover,:focus-visible) { background:#f0f1f6; }
.event-guide-action[data-guide-delete]:is(:hover,:focus-visible) { color:#f43d32; background:#fff0ee; }
.event-guide-color { width:222px; padding:10px; border:1px solid #e0e0e0; border-radius:4px; box-shadow:0 5px 22px #25253530; }
.event-guide-saturation { height:150px; position:relative; touch-action:none; cursor:crosshair; background:linear-gradient(transparent,#000),linear-gradient(90deg,#fff,hsl(var(--guide-hue) 100% 50%)); }
.event-guide-saturation::after { content:""; position:absolute; width:7px; height:7px; border:1px solid white; border-radius:50%; transform:translate(-50%,-50%); left:var(--guide-saturation); top:var(--guide-brightness); box-shadow:0 0 2px #000; pointer-events:none; }
.event-guide-hue { appearance:none; display:block; width:100%; height:10px; margin:5px 0 8px; border:0; background:linear-gradient(90deg,red,yellow,lime,cyan,blue,magenta,red); }
.event-guide-hue::-webkit-slider-thumb { appearance:none; width:5px; height:14px; border:1px solid #777; background:white; }
.event-guide-color-values { display:grid; grid-template-columns:58px repeat(3,30px); justify-content:space-between; }
.event-guide-color-values label { display:grid; gap:4px; text-align:center; font-size:11px; }
.event-guide-color-values input { width:100%; height:25px; padding:0; text-align:center; border:1px solid #ddd; font-size:11px; color:#333; }
.event-guide-swatches { display:grid; grid-template-columns:repeat(8,16px); justify-content:space-between; gap:10px 0; margin-top:8px; padding-top:10px; border-top:1px solid #eee; }
.event-guide-swatches button { padding:0; border:1px solid #0002; border-radius:4px; }
.event-guide-swatches button:is(:hover,:focus-visible) { outline:1px solid #1e76f0; outline-offset:1px; }
body:has(.event-viz-metric-axis[aria-describedby~="app-tooltip"]) .app-tooltip { width:240px; text-align:left; font-weight:400; }
body:has(.event-viz-metric-axis[aria-describedby~="app-tooltip"]) .app-tooltip svg { width:100%; height:auto; background:white; }
@media(max-width:520px) {
  .event-viz-panel .event-viz-popover > header,.event-viz-guide-body { padding-inline:16px; }
  .event-viz-metric-head { margin-inline:12px; }
  #bi-event-viz-metrics-list { padding-inline:12px; }
  .event-viz-metric-head > span,.event-viz-metric-row > *, .event-viz-metric-axis.event-viz-switch { margin-left:6px; }
}
.event-viz-panel .event-viz-option button:disabled { opacity:.45; cursor:not-allowed; background:#fff; }
#bi-event-viz-secondary { padding-left:0; padding-top:32px; }
#bi-event-viz-secondary legend { top:10px; }
.event-analysis-pie-charts { display:grid; grid-template-columns:repeat(var(--pie-columns),minmax(0,1fr)); align-items:start; }
.event-analysis-pie-charts .pie-layout { padding-inline:12px; }
.event-trend { padding:14px 16px 20px; margin-bottom:18px; border-bottom:1px solid #e3e4e5; }
.event-trend .line-chart > svg { display:block; width:100%; max-width:none; max-height:none; height:auto; }
.event-trend .axis { stroke:none; }
.event-trend-grid { stroke:#e5e8f0; stroke-dasharray:4 4; }
.event-trend-plot .axis { stroke:none; }
.event-trend-plot .event-trend-grid { stroke:#ebedf3; }
.event-trend-plot .event-trend-path { width:auto; height:auto; }
.event-trend-plot .event-trend-path polyline { stroke-width:2; }
.event-trend-plot :is(.event-trend-point,.event-trend-hit) { stroke:none; }
.event-trend-plot > svg > text:not(.report-point-value) { fill:#8a91a5; font-size:12px; }
.event-distribution { margin:30px 24px 20px; border-bottom:1px solid #e3e4e5; padding-bottom:16px; }
.event-distribution-scroll { overflow-x:auto; }
.event-distribution-tools { position:relative; z-index:1; display:flex; justify-content:flex-end; gap:8px; }
.event-distribution-tools details { position:relative; font-size:13px; }
.event-distribution-tools summary { padding:6px 10px; border:1px solid #e3e4e5; border-radius:4px; cursor:pointer; }
.event-distribution-tools details > div { position:absolute; top:100%; right:0; width:max-content; max-width:min(300px,75vw); max-height:260px; overflow:auto; background:#fff; box-shadow:0 6px 20px #18263a26; padding:6px; }
.event-distribution-tools label { display:flex; gap:6px; align-items:center; padding:5px; overflow-wrap:anywhere; cursor:pointer; }
.event-distribution-frame { height:400px; position:relative; }
.event-distribution-plot { position:absolute; inset:20px 0 32px 40px; }
.event-distribution-grid { position:absolute; left:0; right:0; border-top:1px dashed #ebedf3; }
.event-distribution-grid span { position:absolute; right:calc(100% + 8px); top:0; transform:translateY(-50%); color:#8a91a5; font-size:12px; white-space:nowrap; }
.event-distribution-categories { position:absolute; inset:0; display:flex; }
.event-distribution-category { position:relative; flex:1; min-width:0; }
.event-distribution-columns { display:flex; justify-content:center; gap:min(10px,1vw); height:100%; padding-inline:10%; }
.event-distribution-columns > span { flex:0 1 50px; position:relative; min-width:0; }
.event-distribution-bar { position:absolute; inset-inline:0; min-height:1px; }
.event-distribution-bar:is(:hover,:focus-visible) { filter:brightness(1.08); }
.event-distribution-value { position:absolute; left:50%; bottom:100%; transform:translateX(-50%); color:#535c70; font-size:12px; font-style:normal; white-space:nowrap; }
.event-distribution-label { position:absolute; margin-top:8px; top:100%; left:4px; right:4px; text-align:center; color:#8a91a5; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.event-trend-guide-label { font-size:12px; }
.event-trend-range { position:relative; height:24px; margin:8px calc(2% + 12px) 0 calc(4.5% + 12px); border-radius:2px; box-shadow:inset 0 0 0 1px #dce4ed; touch-action:none; user-select:none; }
.event-trend-selection { position:absolute; inset:0 calc(100% - var(--range-end, 100%)) 0 var(--range-start, 0%); background:#e5edff; box-shadow:inset 0 0 0 1px #cbd8ee; cursor:move; }
.event-trend-handle { position:absolute; inset-block:0; width:12px; cursor:ew-resize; }
.event-trend-handle[data-event-trend-bound="start"] { right:calc(100% - var(--range-start, 0%)); }
.event-trend-handle[data-event-trend-bound="end"] { left:var(--range-end, 100%); }
.event-trend-handle::before { position:absolute; top:50%; width:4px; height:16px; border:1px solid #adb9cb; border-radius:1px; background:#fff; content:""; }
.event-trend-handle[data-event-trend-bound="start"]::before { right:0; transform:translate(50%, -50%); }
.event-trend-handle[data-event-trend-bound="end"]::before { left:0; transform:translate(-50%, -50%); }
.event-trend-handle:focus-visible { outline:none; }
.event-trend-handle:focus-visible::before { outline:2px solid #2563eb; outline-offset:1px; }
@media (max-width:640px) {
  .event-analysis-form .analysis-main:has(.event-viz-panel:not([hidden])) { grid-template-columns:minmax(0,1fr); grid-template-areas:"tools" "settings" "result"; grid-template-rows:auto auto minmax(0,1fr); }
  .event-viz-panel { border-inline-start:0; max-height:45dvh; }
  .event-analysis-pie-charts { grid-template-columns:minmax(0,1fr); }
  .event-trend { padding-inline:4px; }
}
.event-trend .line-chart > svg > svg { width:auto; height:auto; }
#bi-event-compare { position:relative; }
#bi-event-compare > summary { display:grid; place-items:center; width:34px; height:32px; border:1px solid #e3e4e5; border-radius:4px; color:#25262e; cursor:pointer; font-size:12px; }
#bi-event-compare:is([open],.is-applied) > summary { background:#e9edf5; }
.event-compare-editor { position:fixed; z-index:65; width:min(410px,calc(100vw - 16px)); max-height:calc(100vh - 16px); overflow:auto; background:#fff; box-shadow:0 8px 28px #17203326; border-radius:4px; }
.event-compare-row { display:grid; gap:8px; grid-template-columns:55px minmax(0,1fr) 26px; align-items:center; padding:10px 14px; color:#333; font-size:14px; }
.event-compare-editor button { cursor:pointer; }
.event-compare-editor button:not(.date-range-trigger) { border:0; }
.event-compare-editor button:not(.primary,.date-range-trigger) { background:transparent; }
.event-compare-editor footer { display:flex; gap:10px; border-top:1px solid #e3e4e5; padding:10px 14px; }
#bi-event-compare-add { margin-right:auto; color:#1e76f0; }
.event-compare-editor :is([data-remove-comparison],footer button) { height:32px; border-radius:4px; color:#333; font-size:14px; font-weight:400; }
.event-compare-editor [data-remove-comparison] { height:26px; padding:0; color:#7e7f80; }
.event-compare-editor footer .primary { background:#1e76f0; color:#fff; }
.event-analysis-date-range .date-range-presets [data-date-previous] { grid-column:1/-1; }
.event-comparison-result { margin-top:24px; }
.event-comparison-result th small { display:block; font-weight:400; }
.event-analysis-date-range .date-range-result { text-align:left; padding-inline:24px; }
.event-analysis-date-range .date-range-result-label { margin-inline-end:12px; color:#7e7f80; }
.date-range-popover.event-analysis-date-range .date-range-result { font-size:14px; font-weight:400; }
.date-range-popover.event-analysis-date-range .date-range-presets button { height:28px; color:#212121; font-size:12px; font-weight:400; }
.date-range-popover.event-analysis-date-range .date-range-presets button[aria-pressed=true] { background:#eaecf3; }
.event-analysis-date-range .date-range-modes { justify-content:flex-start; gap:0; font-size:14px; }
.event-analysis-date-range .date-range-modes label { position:relative; padding:5px 10px; border:1px solid #e3e4e5; cursor:pointer; background:#fff; }
.event-analysis-date-range .date-range-modes label + label { border-left:0; }
.event-analysis-date-range .date-range-modes label:has(:checked) { background:#e9edf5; }
.event-analysis-date-range .date-range-modes label:has(:focus-visible) { outline:2px solid #1e76f0; outline-offset:-2px; }
.event-analysis-date-range .date-range-modes label input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.date-range-popover.event-analysis-date-range footer :is([data-date-cancel],[data-date-apply]) { width:65px; height:32px; padding:0; color:#333; border:0; font-size:14px; font-weight:400; box-shadow:none; }
.date-range-popover.event-analysis-date-range footer [data-date-cancel]:enabled:hover { background:#f2f3f8; }
.date-range-popover.event-analysis-date-range footer [data-date-cancel]:enabled:active { background:#e9ebf2; }
.date-range-popover.event-analysis-date-range footer [data-date-apply] { color:#fff; background:#1e76f0; }
.date-range-popover.event-analysis-date-range footer [data-date-apply]:enabled:hover { background:#0d68df; }
.date-range-popover.event-analysis-date-range footer [data-date-apply]:enabled:active { background:#085bc7; }
.event-analysis-form #bi-analysis-viz-switch { border:0; border-radius:3px; }
#bi-chart-form.event-analysis-form #bi-analysis-viz-switch button { display:grid; place-items:center; width:31px; height:32px; color:#7e7f80; border:1px solid #e0e0e0; border-right:0; }
#bi-chart-form.event-analysis-form #bi-analysis-viz-switch button[hidden] { display:none; }
#bi-chart-form.event-analysis-form #bi-analysis-viz-switch button:nth-child(1 of :not([hidden])) { border-radius:3px 0 0 3px; }
#bi-chart-form.event-analysis-form #bi-analysis-viz-switch button:last-child { border-right:1px solid #e3e4e5; border-radius:0 3px 3px 0; }
#bi-chart-form.event-analysis-form #bi-analysis-viz-switch button[aria-disabled="true"] { color:#bdbebf; cursor:not-allowed; background:#fff; }
#bi-chart-form.event-analysis-form #bi-analysis-viz-switch button:enabled:not([aria-disabled="true"]):is(:hover,:focus-visible) { color:#333; box-shadow:none; }
#bi-chart-form.event-analysis-form #bi-analysis-viz-switch button:enabled:not(.active,[aria-disabled="true"]):is(:hover,:focus-visible) { background:#fff; }
#bi-chart-form.event-analysis-form #bi-analysis-viz-switch button.active:not([aria-disabled="true"]) { background:#ebedf3; color:#333; }

/* 事件分析的文字与按钮状态按实页测量配置。 */
.event-analysis-form .analysis-metric-relation { color:#7e7f80; font-size:14px; font-weight:400; }
#bi-chart-form.event-analysis-form :is(.analysis-sidebar-section:has(#bi-filters-list):not(:has([data-filter-row])),#bi-groups-section:not(:has([data-group-row],[data-split-field-row]))) .analysis-section-add .analysis-section-add-label { color:#bdbebf; }
.event-analysis-form .analysis-sidebar-footer label { color:#333; font-size:14px; font-weight:400; }
#bi-chart-form.event-analysis-form #bi-save-chart:disabled { border-color:#99b4f3; background:#99b4f3; color:#fff; font-weight:400; cursor:not-allowed; }
#bi-chart-form.event-analysis-form #bi-date-granularity-trigger { min-width:62px; padding-inline:8px 24px; border-color:#e3e4e5; border-radius:4px; color:#333; font-size:14px; font-weight:400; }
#bi-chart-form.event-analysis-form #bi-date-granularity-trigger::after { top:50%; right:11px; width:5px; height:5px; border:solid currentColor; border-width:0 1px 1px 0; transform:translateY(-70%) rotate(45deg); }
#bi-chart-form.event-analysis-form #bi-date-granularity-trigger[aria-expanded="true"]::after { transform:translateY(-30%) rotate(225deg); }
#bi-chart-form.event-analysis-form #bi-date-granularity-trigger:hover:not([aria-expanded="true"],:focus-visible) {
  border-color:#3583ef; background:#fff; box-shadow:none;
}
#bi-chart-form.event-analysis-form #bi-event-compare > summary:hover { color:#1e76f0; box-shadow:none; }
#bi-chart-form.event-analysis-form #bi-date-granularity-trigger:is([aria-expanded="true"],:focus-visible) {
  border-color:#185ec0; background:#fff;
  box-shadow:3px -3px #dae9fb,-3px 3px #dae9fb,-3px -3px #dae9fb,3px 3px #dae9fb;
}
#bi-chart-form.event-analysis-form :is([data-open-event-picker],[data-open-metric-picker],[data-open-metric-aggregation],[data-open-field-picker],[data-open-filter-operator],[data-open-metric-filter-field]):is([aria-expanded="true"],[data-funnel-picker-open],:focus-visible) {
  border-color:#1e76f0; background:#fff; box-shadow:0 0 0 3px #dae9fb;
}
#bi-chart-form.event-analysis-form :is(.metric-display-name,.metric-display-name-input) { cursor:text; }
#bi-chart-form.event-analysis-form .metric-display-name:focus-visible { outline:2px solid #1e76f0; outline-offset:1px; }
.event-analysis-form .metric-editor-popover { color:#333; font-size:14px; line-height:22px; }
.event-analysis-form .metric-editor-button { min-height:32px; border-color:#e0e0e0; color:#333; }
.event-analysis-form .metric-editor-button:hover { background:#f2f3f8; box-shadow:none; }
.event-analysis-form .metric-editor-button:is(:focus-visible,[aria-expanded="true"]) { border-color:#1e76f0; background:#fff; box-shadow:0 0 0 3px #dae9fb; }
.event-analysis-form .metric-editor-options :is(strong,.dashboard-select-category) { color:#7e7f80; font-size:12px; font-weight:500; }
.event-analysis-form .metric-editor-options .metric-editor-option { color:#333; font-size:14px; font-weight:400; cursor:default; }
.event-analysis-form .metric-editor-options .metric-editor-option:is(:hover,:focus-visible,.active,.is-highlighted) { background:#f2f3f8; box-shadow:none; }
.event-analysis-form :is(.event-picker-panel,.group-field-picker-panel) .bi-field-picker-content { color:#333; font-size:14px; font-weight:400; }
.event-analysis-form .bi-field-picker-tabs button { color:#7e7f80; font-size:12px; font-weight:400; }
.event-analysis-form .bi-field-picker-tabs button[aria-selected="true"] { color:#333; font-weight:500; }
.event-analysis-form #bi-chart-preview .event-analysis-table :is(td,th) { height:36px; font-size:14px; }
.event-analysis-form #bi-chart-preview .event-analysis-table th { font-weight:500; }
.event-analysis-form #bi-chart-preview .event-analysis-table td { padding-block:4px; color:#333; background:#fff; font-weight:400; cursor:default; }
.event-analysis-form #bi-chart-preview .event-table-sort { height:35px; font-weight:500; }
.event-analysis-form #bi-chart-preview .event-analysis-table[data-event-sticky-count]:not([data-event-sticky-count="1"]) .event-table-sort { height:49px; }
.event-analysis-form #bi-chart-preview .event-analysis-table tbody tr:hover td { background:#f6f6f8; }
.event-analysis-form #bi-chart-preview .event-table-sort:enabled:hover { background:#f0f1f5; box-shadow:none; }
.event-analysis-form #bi-chart-preview .event-display-controls button { color:#7e7f80; font-weight:400; }
.event-analysis-form #bi-chart-preview .event-display-controls button[aria-pressed="true"] { color:#333; }
.event-analysis-form #bi-chart-preview .event-table-toolbar > [data-event-table-export] { color:#202241; background:#f2f3f8; }
.event-analysis-date-range { color:#333; font-size:14px; }
.event-global-filter-editor { color:#333; }

/* 搜索框在字段分类上方，筛选和分组共用选项及悬停样式。 */
.event-analysis-form .group-field-picker-panel .bi-field-picker-head { display:none; }
.event-analysis-form .group-field-picker-panel .bi-field-picker-tools { order:-1; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-tools {
  display:flex; align-items:center; gap:8px; height:40px; box-sizing:border-box; padding:0 12px; border-bottom:1px solid #e0e0e0;
}
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-tools::before {
  content:''; width:14px; height:14px; flex:none; background:#444;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black'%3E%3Ccircle cx='6.5' cy='6.5' r='4.5'/%3E%3Cpath d='m10 10 4 4'/%3E%3C/svg%3E") center/contain no-repeat;
}
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-tools input {
  min-width:0; padding:0; border:0; outline:none; box-shadow:none; color:#333; background:transparent; font-size:14px; font-weight:400;
}
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-tools input::placeholder { color:#b7b8bc; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-tabs { align-items:center; gap:12px; min-height:36px; padding:0 12px; border-color:#e0e0e0; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-tabs button { height:22px; padding:0; color:#7e7f80; font-size:12px; font-weight:400; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-tabs button.active { color:#333; font-weight:400; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-tabs button.active::after { inset-inline:0; bottom:0; background:#1e76f0; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-entry { min-height:30px; border-radius:4px; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-entry > button:first-child:not(:disabled) { height:30px; color:#333; font-size:14px; font-weight:400; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-entry > button:first-child small { color:#888; font-size:12px; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-entry:is(:hover,:focus-within) { background:#f2f3f8; }
:is(.event-analysis-form .group-field-picker-panel,.event-global-filter-editor.global-filter-selector) .bi-field-picker-entry button:hover { box-shadow:none; }
.event-global-filter-editor .global-filter-entry > button:first-child { color:#333; font-size:14px; font-weight:400; }

/* 事件分析的标题状态由条件决定，悬停只改变所在行的底色。 */
#bi-chart-form.event-analysis-form :is(#bi-add-filter,#bi-add-group) { color:#333; }
#bi-chart-form.event-analysis-form :is(#bi-add-filter,#bi-add-group):enabled:is(:hover,:focus-visible) { background:#f3f4f8; color:#333; }
#bi-chart-form.event-analysis-form :is(#bi-add-filter,#bi-add-group) .analysis-section-add-label { display:flex; align-items:center; gap:8px; }
#bi-chart-form.event-analysis-form :is(#bi-add-filter,#bi-add-group) .analysis-section-add-label::before {
  content:''; width:16px; height:16px; background:currentColor; mask:var(--section-icon) center/contain no-repeat;
}
.event-analysis-form #bi-add-filter { --section-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 13V3l6 6h-4v4h-2zM9 3v18l-6-6h4V3h2zM21 17v-2h-7v2h7zM21 21v-2h-7v2h7z'/%3E%3C/svg%3E"); }
.event-analysis-form #bi-add-group { --section-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black'%3E%3Ccircle cx='4.5' cy='4.5' r='2.3'/%3E%3Ccircle cx='11.5' cy='4.5' r='2.3'/%3E%3Ccircle cx='4.5' cy='11.5' r='2.3'/%3E%3Ccircle cx='11.5' cy='11.5' r='2.3'/%3E%3C/svg%3E"); }
#bi-chart-form.event-analysis-form :is(#bi-filters-list,.metric-filters-list,#bi-groups-list) .analysis-field-trigger {
  position:relative; padding-inline-start:27px;
}
#bi-chart-form.event-analysis-form :is(#bi-filters-list,.metric-filters-list,#bi-groups-list) .analysis-field-trigger::before {
  content:''; position:absolute; inset-inline-start:8px; top:5px; width:14px; height:14px; background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-linejoin='round'%3E%3Cpath d='M2 3h8L7 6.5V10L5 9V6.5zM10 6h4m-4 3h4m-7 3h7'/%3E%3C/svg%3E") center/contain no-repeat;
}
#bi-chart-form.event-analysis-form :is(#bi-metrics-list > .named-metric-row,#bi-filters-list [data-filter-row],.metric-filters-list [data-filter-row],#bi-groups-list > [data-group-row]):is(:hover,:focus-within)
  :is(.analysis-field-trigger,.analysis-filter-operator-trigger):not(:is(:hover,[aria-expanded="true"],[data-funnel-picker-open],:focus-visible)) { background:#fff; border-color:#e3e4e5; }
#bi-chart-form.event-analysis-form :is(#bi-metrics-list,#bi-filters-list,#bi-groups-list)
  :is(.analysis-field-trigger,.analysis-filter-operator-trigger):hover {
  border-color:#3583ef; background:#fff; box-shadow:none;
}
#bi-chart-form.event-analysis-form :is(#bi-metrics-list,#bi-filters-list,#bi-groups-list)
  :is(.analysis-field-trigger,.analysis-filter-operator-trigger):is(:focus-visible,[aria-expanded="true"],[data-funnel-picker-open]) {
  border-color:#1e76f0; background:#fff; box-shadow:0 0 0 3px #dae9fb;
}
#bi-chart-form.event-analysis-form #bi-filters-list [data-filter-row] { column-gap:8px; grid-template-columns:minmax(36px,max-content) minmax(76px,max-content) 22px 22px; }
#bi-chart-form.event-analysis-form #bi-filters-list [data-filter-row] > :is([data-add-parallel-filter],[data-remove-filter]) { width:22px; min-width:22px; }
#bi-chart-form.event-analysis-form :is([data-add-parallel-filter],[data-add-metric-parallel-filter]) {
  --row-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black'%3E%3Cpath d='M2 2h10L8 7v4l-2 1V7zM9 13h6m-3-3v6' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#bi-chart-form.event-analysis-form .metric-hover-actions > [data-event-remove][hidden] { display:none; }
#bi-chart-form :is(#bi-filters-list,#bi-groups-section,#bi-metrics-list,#bi-retention-settings,.analysis-sidebar) button:is([data-remove-filter],[data-remove-group],[data-remove-split-field],[data-remove-metric],[data-remove-formula],[data-remove-formula-operand],[data-remove-retention-key]):not(:disabled,[aria-disabled="true"]):is(:hover,:focus-visible),
.event-compare-editor button[data-remove-comparison]:not(:disabled,[aria-disabled="true"]):is(:hover,:focus-visible),
.interval-buckets-popup button[data-interval-remove]:not(:disabled,[aria-disabled="true"]):is(:hover,:focus-visible),
.global-filter-numeric button[data-global-number-remove]:not(:disabled,[aria-disabled="true"]):is(:hover,:focus-visible) {
  color:var(--inline-remove-hover); background:var(--inline-remove-hover-bg); box-shadow:none;
}
#bi-chart-form.event-analysis-form #bi-event-viz {
  flex:0 0 34px; display:inline-grid; place-items:center; width:34px; min-width:34px; height:32px; min-height:32px;
  padding:0; border:1px solid #e3e4e5; border-radius:4px; background:#fff; color:#333; box-shadow:none;
}
#bi-chart-form.event-analysis-form #bi-event-viz[hidden] { display:none; }
#bi-chart-form.event-analysis-form #bi-event-viz:not([aria-disabled="true"]):is(:hover,:focus-visible) { background:#f6f6f9; }
#bi-chart-form.event-analysis-form #bi-event-viz[aria-expanded="true"]:not([aria-disabled="true"]) { background:#ebedf3; }
#bi-chart-form.event-analysis-form #bi-event-viz[aria-disabled="true"] { color:#bdbebf; cursor:default; }
#bi-chart-form.event-analysis-form #bi-event-viz svg { width:14px; height:14px; }
@media(min-width:801px) { #bi-chart-form.event-analysis-form #bi-event-viz { margin-left:8px; } }
#bi-chart-form.event-analysis-form #bi-analysis-toolbar .analysis-tool-icon { color:#202241; }
#bi-chart-form.event-analysis-form #bi-analysis-toolbar .analysis-tool-icon:disabled { color:#b9becf; }
#bi-chart-form.event-analysis-form #bi-analysis-toolbar .analysis-tool-icon:enabled:is(:hover,:focus-visible,[aria-expanded="true"]) { color:#747c94; background:#fff; box-shadow:none; }
#bi-chart-form.event-analysis-form #bi-analysis-toolbar .analysis-tool-icon:enabled:active { color:#202241; background:#ebedf3; }
#bi-chart-form.event-analysis-form #bi-add-metric:enabled:is(:hover,:focus-visible) { color:#333; background:#f4f4f7; }
#bi-chart-form.event-analysis-form #bi-add-metric .analysis-section-add-label { display:flex; align-items:center; gap:8px; }
#bi-chart-form.event-analysis-form #bi-add-formula { width:36px; height:40px; }
#bi-chart-form.event-analysis-form #bi-add-formula:enabled:is(:hover,:focus-visible) { color:#333; background:#b9becf33; }

#bi-chart-form.event-analysis-form .analysis-formula-row > :is(.metric-display-name,.metric-display-name-input) {
  display:inline-block; width:auto; max-width:max(72px,calc(100% - 220px)); vertical-align:middle;
}
.event-formula-precision { display:inline-block; position:relative; margin-left:8px; vertical-align:middle; }
.event-formula-precision > summary {
  display:flex; align-items:center; gap:7px; height:26px; padding:0 8px; border:1px solid transparent; border-radius:4px;
  background:#f2f3f8; color:#333; font-size:14px; list-style:none; cursor:pointer;
}
.event-formula-precision > summary::-webkit-details-marker { display:none; }
.event-formula-precision > summary::after { content:''; width:5px; height:5px; border:solid #777; border-width:0 1px 1px 0; transform:rotate(45deg) translateY(-2px); }
.event-formula-precision[open] > summary { border-color:#3583ef; background:#fff; }
.event-formula-precision-options {
  position:absolute; z-index:15; top:calc(100% + 4px); left:0; width:110px; padding:4px;
  border:1px solid #e3e4e5; border-radius:4px; background:#fff; box-shadow:0 8px 24px #2022411a;
}
.event-formula-precision-options button {
  display:block; width:100%; height:32px; padding:0 8px; border:0; border-radius:4px; background:#fff; color:#333; text-align:left; font-size:14px;
}
.event-formula-precision-options button:is(:hover,:focus-visible,[aria-pressed="true"]) { background:#ebedf3; box-shadow:none; }

#bi-chart-form.event-analysis-form #bi-chart-preview .event-display-controls button {
  width:42px; height:30px; min-height:30px; box-sizing:border-box; border-color:#e3e4e5;
}
#bi-chart-form.event-analysis-form #bi-chart-preview .event-display-controls button[aria-pressed="true"] { background:#ebedf3; }
#bi-chart-form.event-analysis-form #bi-chart-preview .event-display-controls button:enabled:not([aria-pressed="true"]):is(:hover,:focus-visible) {
  background:#fff; color:#333; box-shadow:none;
}
#bi-chart-form.event-analysis-form #bi-chart-preview [data-event-layout-open]:is(:hover,[aria-expanded="true"]) { border-color:#3583ef; box-shadow:none; }
#bi-chart-form.event-analysis-form #bi-chart-preview [data-event-stage-settings]:is(:hover,:focus-visible) { background:#f6f6f9; border-color:#e3e4e5; box-shadow:none; }
#bi-chart-form.event-analysis-form #bi-chart-preview [data-event-table-export] { width:60px;padding-inline:0;border:0; }
#bi-chart-form.event-analysis-form #bi-chart-preview [data-event-table-export]:is(:hover,:focus-visible) { background:#f6f6f9; border-color:transparent; box-shadow:none; }

#bi-chart-form.event-analysis-form #bi-chart-preview .event-table-toolbar:has([data-event-display="layer"][aria-pressed="true"]) {
  grid-template-columns:minmax(0,1fr) repeat(2,max-content);
}
.event-table-toolbar:has([data-event-display="layer"][aria-pressed="true"]) > [data-event-layout-open] { display:none; }
@media (max-width:650px) {
  .event-table-toolbar:has(.event-group-search):has([data-event-display="layer"][aria-pressed="true"]) > [data-event-stage-settings] {
    grid-column:2;
  }
}

/* 留存分析的触发器、操作按钮和开关。 */
#bi-chart-form.retention-analysis-form :is(.retention-setting-trigger,#bi-retention-period-trigger,#bi-retention-result-mode-trigger,#bi-retention-display-granularity-trigger,.retention-viz-panel .dashboard-select-trigger) {
  --retention-open-border:#185ec0;
  background:#fff; border-color:var(--retention-border); border-radius:4px; color:#333; box-shadow:none;
}
#bi-retention-settings .retention-subject .retention-setting-trigger { min-width:64px; font-size:14px; font-weight:500; }
#bi-retention-settings .retention-event-controls > .analysis-field-trigger { border-radius:4px; }
#bi-chart-form.retention-analysis-form #bi-retention-row-mode-anchor > .dashboard-select-trigger {
  background:#f9f9fb; border-color:var(--retention-control-hover);
}
#bi-chart-form.retention-analysis-form :is(#bi-retention-settings,#bi-filters-list,#bi-groups-list)
  :is(.analysis-field-trigger,.analysis-filter-operator-trigger) {
  --retention-open-border:#1e76f0;
  background:var(--retention-control); border-color:transparent; color:#333; box-shadow:none;
}
#bi-chart-form.retention-analysis-form :is(.retention-event-controls,[data-filter-row],[data-group-row]):is(:hover,:focus-within)
  :is(.analysis-field-trigger,.analysis-filter-operator-trigger):not(:is(:hover,[aria-expanded=true])) {
  background:#fff; border-color:var(--retention-border);
}
#bi-chart-form.retention-analysis-form :is(.retention-setting-trigger,#bi-retention-period-trigger,#bi-retention-result-mode-trigger,.retention-viz-panel .dashboard-select-trigger,#bi-retention-display-granularity-trigger,.analysis-field-trigger,.analysis-filter-operator-trigger):enabled:hover {
  background:#fff; border-color:#3583ef; box-shadow:none;
}
#bi-chart-form.retention-analysis-form #bi-retention-row-mode-anchor > .dashboard-select-trigger:enabled:hover {
  background:#fff; border-color:#3583ef;
}
#bi-chart-form.retention-analysis-form :is(.retention-setting-trigger,#bi-retention-period-trigger,#bi-retention-result-mode-trigger,.retention-viz-panel .dashboard-select-trigger,#bi-retention-display-granularity-trigger,.analysis-field-trigger,.analysis-filter-operator-trigger):enabled[aria-expanded=true] {
  background:#fff; border-color:var(--retention-open-border,#1e76f0); box-shadow:var(--retention-open-ring);
}
#bi-chart-form.retention-analysis-form #bi-retention-row-mode-anchor > .dashboard-select-trigger[aria-expanded=true] {
  background:#fff; border-color:#185ec0;
}

#bi-chart-form.retention-analysis-form :is(.analysis-toolbar-actions .analysis-tool-icon,#bi-save-as-chart,#bi-retention-stage) {
  background:#fff; border:0; color:var(--retention-control-ink); box-shadow:none;
}
#bi-chart-form.retention-analysis-form :is(.analysis-toolbar-actions .analysis-tool-icon,#bi-save-as-chart):enabled:is(:hover,:focus-visible,[aria-expanded=true]) {
  background:#fff; color:#747c94; box-shadow:none;
}
#bi-chart-form.retention-analysis-form :is(.analysis-toolbar-actions .analysis-tool-icon,#bi-save-as-chart):enabled:active {
  background:var(--retention-control-hover); color:var(--retention-control-ink);
}
#bi-chart-form.retention-analysis-form :is(.analysis-toolbar-actions .analysis-tool-icon,#bi-save-as-chart):disabled { color:#b9becf; }
#bi-chart-form.retention-analysis-form #bi-save-chart {
  border:0; background:#1e76f0; color:#fff; font-weight:400; box-shadow:none;
}
#bi-chart-form.retention-analysis-form #bi-save-chart:enabled:is(:hover,:focus-visible,:active) {
  background:#185ec0; box-shadow:none;
}
#bi-chart-form.retention-analysis-form #bi-save-chart:disabled { background:#99b4f3; }
#bi-chart-form.retention-analysis-form #bi-retention-export {
  border:0; background:var(--retention-control); color:var(--retention-control-ink); font-weight:400; box-shadow:none;
}
#bi-chart-form.retention-analysis-form :is(#bi-retention-export,#bi-retention-stage):enabled:is(:hover,:focus-visible,:active) {
  background:var(--retention-control-hover); box-shadow:none;
}
#bi-chart-form.retention-analysis-form #bi-retention-export:disabled { color:#b9becf; opacity:1; }
#bi-chart-form.retention-analysis-form :is(#bi-retention-viz,#bi-retention-viz-close) {
  background:#fff; color:#333; box-shadow:none;
}
#bi-chart-form.retention-analysis-form #bi-retention-viz { border-color:var(--retention-border); }
#bi-chart-form.retention-analysis-form :is(#bi-retention-viz,#bi-retention-viz-close):enabled:is(:hover,:focus-visible,[aria-expanded=true]),
#bi-chart-form.retention-analysis-form .retention-viz-panel summary:is(:hover,:focus-visible) {
  background:var(--retention-control-hover); box-shadow:none;
}
#bi-chart-form.retention-analysis-form :is(#bi-retention-viz,#bi-retention-display-granularity-trigger,.retention-viz-setting button):disabled {
  color:#bdbebf;
}
#bi-chart-form.retention-analysis-form .analysis-viz-switch { border-color:var(--retention-border); }
#bi-chart-form.retention-analysis-form .analysis-viz-switch button.active {
  width:30px; height:30px; background:var(--retention-control-hover); color:#333; box-shadow:none;
}
#bi-retention-chart-switch { margin-left:0; }
#bi-retention-chart-switch[hidden] { display:none; }
#bi-retention-chart-switch button {
  display:grid; place-items:center; width:30px; height:30px; padding:0; color:#333; background:#fff;
}
#bi-retention-chart-switch button[aria-pressed="true"],.retention-trend-measure button[aria-pressed="true"] { background:#ebedf3; }
#bi-retention-chart-switch button[aria-disabled="true"] { color:#bdbebf; cursor:not-allowed; }
#bi-retention-chart-switch svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.5; }
.retention-trend-measure { display:flex; gap:0; }
.retention-trend-measure-label { display:flex; align-items:center; gap:4px; white-space:nowrap; }
.retention-trend-measure-help { display:inline-flex; cursor:default; }
.retention-trend-measure-help .information-icon { width:12px; height:12px; }
.retention-trend-measure button { flex:0 0 42px; width:42px; min-width:0; height:32px; padding:0 6px; border:1px solid #e3e4e5; border-radius:0; background:#fff; font:inherit; }
.retention-trend-measure button[aria-pressed="true"]:disabled { background:#fff; }
.retention-trend-measure button:first-child { border-radius:4px 0 0 4px; }
.retention-trend-measure button:last-child { margin-left:-1px; border-radius:0 4px 4px 0; }
.retention-trend-result { display:flow-root; position:relative; }
.retention-trend-result .line-chart { min-width:0; min-height:0; padding:0; }
.retention-trend-result .line-chart > svg { height:clamp(290px,calc(100dvh - 320px),563px); }
.retention-trend-result :is(polyline,circle) { stroke-width:1.7; vector-effect:non-scaling-stroke; }
.retention-trend-result .axis { stroke:transparent; }
.retention-trend-result svg text { fill:#7e879d; font-size:12px; }
.retention-trend-result .event-trend-grid { stroke:#e3e7f0; stroke-dasharray:4 4; vector-effect:non-scaling-stroke; }
.retention-trend-result .chart-legend { color:#333; }
.retention-trend-result [data-retention-axis] { fill:transparent; stroke:none; }
.retention-trend-tooltip {
  position:fixed; z-index:1000; pointer-events:none; box-sizing:border-box;
  width:180px; max-height:min(350px,calc(100dvh - 16px)); overflow:hidden; padding:8px 16px;
  background:#fff; color:#333; border-radius:4px; box-shadow:0 4px 16px #0002;
  font-size:12px; line-height:17px;
}
.retention-trend-tooltip[hidden] { display:none; }
.retention-tooltip-title { color:#808080; margin-bottom:4px; }
.retention-tooltip-row { display:grid; align-items:center; grid-template-columns:6px minmax(0,1fr) max-content; gap:6px; }
.retention-tooltip-row + .retention-tooltip-row { margin-top:4px; }
.retention-tooltip-row i { width:6px; height:6px; border-radius:50%; }
.retention-tooltip-row span:first-of-type { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.retention-trend-dates { position:relative; width:max-content; margin:0 0 8px auto; font-size:14px; color:#333; }
.retention-trend-dates summary {
  box-sizing:border-box; height:32px; min-width:116px; list-style:none; display:flex; align-items:center;
  justify-content:space-between; padding:0 10px; border:1px solid #dedfe2; border-radius:4px; background:#fff; cursor:pointer;
}
.retention-trend-dates summary::-webkit-details-marker { display:none; }
.retention-trend-dates summary::after {
  content:''; width:5px; height:5px; border:solid #777; border-width:0 1px 1px 0;
  transform:translateY(-2px) rotate(45deg); margin:0 2px 0 10px;
}
.retention-trend-dates[open] summary { border-color:#1e76f0; box-shadow:0 0 0 3px #dae9fb; }
.retention-trend-dates[open] summary::after { transform:translateY(2px) rotate(225deg); }
.retention-trend-date-menu {
  position:absolute; z-index:3; inset-inline-end:0; top:calc(100% + 7px); width:196px;
  background:#fff; box-shadow:0 8px 22px #18264120; border-radius:4px;
}
.retention-trend-date-menu label { display:flex; align-items:center; gap:8px; min-height:42px; padding:0 12px; white-space:nowrap; }
.retention-trend-date-menu label[hidden], .retention-trend-date-empty[hidden] { display:none; }
.retention-trend-date-options label:hover { background:#f2f3f8; }
.retention-trend-date-menu .retention-trend-date-search { min-height:38px; border-bottom:1px solid #ececee; }
.retention-trend-date-search svg { flex:none; width:14px; height:14px; fill:none; stroke:#82868b; }
.retention-trend-date-menu .retention-trend-date-search input[type="search"] {
  box-sizing:border-box; width:100%; min-width:0; height:30px; border:0; border-radius:0;
  outline:0; box-shadow:none; padding:0; background:#fff; font:inherit;
}
.retention-trend-date-options { max-height:294px; overflow:auto; }
.retention-trend-date-empty { margin:0; padding:12px; color:#757575; }
.retention-trend-date-menu input[type="checkbox"] { width:14px; height:14px; margin:0; accent-color:#1e76f0; }
.retention-trend-date-default { border-top:1px solid #e3e4e5; background:#f7f7f9; border-radius:0 0 4px 4px; }
.retention-trend-date-default { display:flex; align-items:center; justify-content:space-between; padding-inline-end:8px; }
.retention-trend-date-default [data-retention-trend-gear] {
  display:grid; place-items:center; width:28px; height:28px; min-height:0; padding:0;
  border:0; border-radius:4px; color:#777; background:transparent;
}
.retention-trend-date-default [data-retention-trend-gear]:is(:hover,[aria-expanded="true"]) { color:#333; background:#e9ebf1; }
.retention-trend-date-default [data-retention-trend-gear] svg { width:14px; height:14px; }
.retention-trend-default-panel {
  position:absolute; top:0; right:calc(100% + 4px); box-sizing:border-box; width:280px;
  padding:16px; border-radius:4px; background:#fff; box-shadow:0 8px 22px #18264120; z-index:1;
}
.retention-trend-default-panel[hidden] { display:none; }
.retention-trend-default-panel h3 { margin:0 0 18px; font-size:16px; font-weight:500; }
.retention-trend-default-panel label { min-height:38px; padding:0 8px; border-radius:4px; cursor:pointer; }
.retention-trend-default-panel label:is(:hover,:has(:checked)), .retention-trend-custom-row:has(:checked) { background:#f4f5f8; }
.retention-trend-default-panel input[type="radio"] { width:16px; height:16px; margin:0; accent-color:#1e76f0; }
.retention-trend-preset-count { margin-inline-start:auto; padding-inline-end:24px; color:#777; }
.retention-trend-custom-row { display:flex; align-items:center; justify-content:space-between; border-radius:4px; }
.retention-trend-custom-row input[type="text"] {
  box-sizing:border-box; width:64px; height:24px; min-height:0; padding:0 8px; margin-inline-end:32px;
  border:1px solid #e0e0e0; border-radius:4px; text-align:right; font:inherit;
}
.retention-trend-default-panel ul { padding-inline-start:14px; margin:20px 0; color:#777; font-size:13px; line-height:22px; }
.retention-trend-default-panel strong { color:#333; }
.retention-trend-default-actions { display:flex; justify-content:flex-end; gap:12px; }
.retention-trend-default-actions button { min-width:60px; height:32px; min-height:0; border-radius:4px; }
.retention-trend-default-actions button:first-child { border-color:transparent; }
.retention-trend-default-actions .primary { background:#1e76f0; border-color:#1e76f0; color:#fff; }
.retention-trend-default-actions .primary:disabled { opacity:.5; }
@media (max-width:800px) {
  .retention-trend-default-panel { right:0; width:min(280px,calc(100vw - 32px)); }
}
@media(max-width:650px) {
  .retention-trend-result .line-chart { overflow-x:auto; }
  .retention-trend-result .line-chart > svg { min-width:620px; }
}
#bi-chart-form.retention-analysis-form #bi-chart-preview thead th {
  height:36px; padding-block:0; background:#f9f9fb; color:#212121; font-weight:500;
}
.retention-analysis-form :is(.retention-options,.retention-viz-setting) input[role=switch] {
  background:#b9becf80; box-shadow:none;
}
.retention-analysis-form :is(.retention-options,.retention-viz-setting) input[role=switch]:enabled:hover { background:#b9becf4d; }
.retention-analysis-form :is(.retention-options,.retention-viz-setting) input[role=switch]:checked { background:#1e76f0; }
.retention-analysis-form :is(.retention-options,.retention-viz-setting) input[role=switch]:checked:enabled:hover { background:#3583ef; }
.retention-analysis-form :is(.retention-options,.retention-viz-setting) input[role=switch]:disabled { background:#b9becf33; opacity:1; }

body:has(.retention-analysis-form #analysis-date-picker[aria-expanded=true]) .date-range-popover footer :is([data-date-cancel],[data-date-apply]) {
  width:65px; height:32px; padding:0; border:0; color:#333; font-size:14px; font-weight:400; box-shadow:none;
}
body:has(.retention-analysis-form #analysis-date-picker[aria-expanded=true]) .date-range-popover footer [data-date-cancel]:enabled:is(:hover,:active) {
  background:#b9becf80; box-shadow:none;
}
body:has(.retention-analysis-form #analysis-date-picker[aria-expanded=true]) .date-range-popover footer [data-date-apply] {
  background:#1e76f0; color:#fff;
}
body:has(.retention-analysis-form #analysis-date-picker[aria-expanded=true]) .date-range-popover footer [data-date-apply]:enabled:is(:hover,:active) {
  background:#185ec0; box-shadow:none;
}
body:has(.retention-analysis-form #analysis-date-picker[aria-expanded=true]) .date-range-popover footer [data-date-apply]:disabled { background:#99b4f3; }

.selected-event-property-detail {
  z-index:75; display:flex; flex-direction:column; width:280px; min-height:226px; overflow:auto;
  border:0; border-radius:4px; color:#333; font-size:14px;
  box-shadow:0 0 14px #0a103205,0 4px 20px #0a103208,0 8px 24px #0a10320d;
}
.selected-event-property-detail .metric-property-detail-head { background:#f6f6f9; min-height:62px; line-height:18px; }
.selected-event-property-detail .metric-property-detail-head > button { height:auto; min-height:0; vertical-align:top; }
.selected-event-property-detail .metric-property-detail-head > div { margin-top:2px; font-size:12px; }
.selected-event-property-detail .metric-property-detail-description { flex:1; min-height:130px; padding:12px 8px; }
.selected-event-property-detail .metric-property-detail-head > small,
.selected-event-property-detail footer { color:#7e7f80; font-size:12px; }
.selected-event-property-detail footer { min-height:34px; padding:6px 12px 0; }

.virtual-property-dialog header [data-close]:hover { background:#ededf2; }
.event-virtual-property-dialog header [data-copy] { background:#edeff5; color:#303540; border-color:transparent; }
.event-virtual-property-dialog .virtual-property-validation-completed { display:none; }
.event-virtual-property-dialog .virtual-property-fields input[readonly] { background:#f6f6f8; color:#3c3e45; }
.virtual-property-event-mode { position:relative; }
.virtual-property-event-picker { position:absolute; left:calc(100% + 24px); top:0; display:flex; align-items:center; gap:16px; white-space:nowrap; }
.virtual-property-event-picker[hidden],.virtual-property-event-menu[hidden],.virtual-property-event-menu nav[hidden] { display:none; }
.virtual-property-event-picker > button { display:inline-flex; align-items:center; gap:5px; background:#edeff5; border-color:transparent; color:#303540; }
.virtual-property-event-picker > button:hover { background:#e7e9f0; }
.virtual-property-event-picker > button[aria-expanded=true] { border-color:#246df5; box-shadow:0 0 0 2px #e2ebfd; }
.virtual-property-event-menu { display:flex; flex-direction:column; position:fixed; z-index:2; background:#fff; border:1px solid #ededf0; border-radius:4px; box-shadow:0 8px 24px #1b21301f; font-size:14px; }
.virtual-property-event-menu .virtual-property-event-search { padding:6px 12px; border-bottom:1px solid #ededf0; }
.virtual-property-event-menu input[type=search] { width:100%; }
.virtual-property-event-body { display:flex; flex:1; min-height:0; border-top:1px solid #ededf0; }
.virtual-property-event-menu nav { width:98px; flex:none; display:grid; align-content:start; gap:0; border:0; border-right:1px solid #ededf0; padding:10px 0; }
.virtual-property-event-menu nav button { text-align:left; color:#343434; border:0; border-right:2px solid transparent; padding:7px 10px; }
.virtual-property-event-menu nav button[aria-current=location] { border-color:#246df5; }
.virtual-property-event-menu [data-event-list] { position:relative; flex:1; min-width:0; overflow:auto; padding:6px 4px 6px 10px; }
.virtual-property-event-menu section + section { border-top:1px solid #ededf0; margin-top:8px; padding-top:8px; }
.virtual-property-event-menu section p { margin:7px 4px; font-size:14px; }
.virtual-property-event-menu .virtual-property-event-hint { color:#a0a1a7; }
.virtual-property-event-menu .virtual-property-event-option { display:flex; gap:8px; align-items:center; min-height:30px; padding:4px 8px; cursor:pointer; }
.virtual-property-event-row { display:flex; align-items:center; border-radius:3px; }
.virtual-property-event-row .virtual-property-event-option { flex:1; min-width:0; overflow:hidden; }
.virtual-property-event-row:hover,.virtual-property-event-row:focus-within { background:#f4f4f6; }
.virtual-property-event-row button { background:transparent; border:0; padding:0 6px; visibility:hidden; }
.virtual-property-event-row:is(:hover,:focus-within) button,.virtual-property-event-row button:focus-visible { visibility:visible; }
.virtual-property-dialog .virtual-property-event-menu input[type=checkbox] { min-height:unset; height:16px; width:16px; flex:none; margin:0; accent-color:#246df5; }
.virtual-property-event-menu footer { display:flex; justify-content:end; gap:12px; border-top:1px solid #ededf0; padding:8px 12px; }
.virtual-property-event-menu [data-event-cancel] { background:transparent; border-color:transparent; }
.virtual-property-event-menu [data-event-cancel]:hover { background:#edeff5; }
.virtual-property-used-fields { margin:24px 0 32px; }
.virtual-property-used-fields h4 { margin:0 0 12px; font-weight:500; }
.virtual-property-used-fields small { display:block; color:#777b82; margin-bottom:8px; }
.virtual-property-used-fields [data-debug-toggle] { color:#246df5; padding:0; border:0; background:transparent; font-weight:400; }
.virtual-property-used-fields [data-debug-toggle]:hover { text-decoration:underline; }
.virtual-property-used-fields [data-debug-fields] { width:min(364px,100%); }
.virtual-property-used-fields [data-debug-fields] label { display:grid; gap:10px; margin-bottom:16px; }
.virtual-property-used-fields [data-debug] { width:60px; margin-top:8px; }
.virtual-property-used-fields output { display:inline-block; vertical-align:middle; max-width:calc(100% - 104px); white-space:pre-wrap; overflow-wrap:anywhere; margin:8px 0 0 32px; }
.virtual-property-used-fields output:empty { display:none; }

.virtual-property-dialog :is([data-debug],.dashboard-select-trigger) { height:32px; }
.event-virtual-property-create header [data-close]:hover { background:#f0f2f6; }
.event-virtual-property-create .analysis-save:enabled:hover { background:#4072ed; border-color:#4072ed; }
.event-virtual-property-create .analysis-save:enabled:active { background:#1e4fcb; border-color:#1e4fcb; }
.event-virtual-property-create button:disabled { cursor:not-allowed; }
.event-virtual-property-create [data-tag-version-panel] summary { width:max-content; padding-block:6px; cursor:pointer; color:#4b586f; }
.event-virtual-property-create aside nav button[aria-pressed=false]:hover { color:#343946; }
.event-virtual-property-create .dashboard-select-trigger:is(:hover,[aria-expanded=true]) { border-color:#5f83d5; }
.event-virtual-property-create .dashboard-select-trigger[aria-invalid=true] { border-color:#c43b46; }
.event-virtual-property-create #virtual-property-type-error { margin:5px 0 0; color:#b9323d; }
.event-virtual-property-create #virtual-property-name-error:not([hidden]) { display:block; margin-top:4px; color:#b9323d; font-size:12px; }
.event-virtual-property-create input[name=name][aria-invalid=true] { border-color:#b9323d; }
.virtual-property-function-help {
  position:fixed; z-index:3; box-sizing:border-box; width:min(308px,calc(100vw - 16px)); padding:12px 14px;
  border:1px solid #dce2ee; border-radius:6px; background:#f8faff; color:#242b3b;
  box-shadow:0 6px 16px #17254220; font-size:13px; pointer-events:none;
}
.virtual-property-function-help div { margin:8px 0 4px; color:#565e70; }
.virtual-property-function-help code { white-space:pre-wrap; overflow-wrap:anywhere; }
.event-virtual-property-create [data-debug-panel] output:not(:empty) {
  display:block; max-width:min(364px,100%); margin-top:12px; padding:8px 12px;
  border-radius:4px; background:#f3f6fc;
}
@media(max-width:950px) {
  .virtual-property-event-picker { position:static; margin:8px 0 0 76px; }
}

.analysis-virtual-field-mark { color:#1e76f0; font-size:14px; font-weight:400; }

/* 排行榜的标题栏、分析条件与结果区。 */
#bi-ranking-more, .ranking-model-example, .ranking-page-icon { display:none; }
.ranking-analysis-form #bi-ranking-more { display:block; }
.ranking-analysis-form #bi-analysis-toolbar {
  grid-column:1/-1; min-height:72px; margin-left:calc(-1 * var(--analysis-left-gutter, 0px));
  padding:12px 24px; justify-content:space-between; border:0; background:#f0f0f2;
}
.ranking-analysis-form .funnel-page-title { display:flex; align-items:center; color:#222; gap:8px; font-size:20px; margin:0; }
.ranking-analysis-form .funnel-page-title > svg { display:none; }
.ranking-analysis-form .funnel-page-title .ranking-page-icon { display:block; width:19px; height:19px; }
.ranking-analysis-form #bi-saved { order:1; }
.ranking-analysis-form #bi-export { order:2; }
.ranking-analysis-form #bi-ranking-more { order:3; }
.ranking-analysis-form :is(#bi-save-chart,#bi-save-as-chart) { order:4; }
.ranking-analysis-form .analysis-toolbar-actions { gap:8px; margin-left:auto; }
.ranking-analysis-form .analysis-toolbar .analysis-tool-icon { border-color:transparent; }
.ranking-analysis-form .analysis-sidebar { background:#fff; }
#bi-chart-form.ranking-analysis-form .analysis-sidebar-section {
  padding:12px 24px; border-bottom:0;
}
.ranking-analysis-form #bi-analysis-settings-section { min-height:58px; padding-top:16px; }
.ranking-analysis-form .ranking-field-setting { color:#222; font-size:16px; font-weight:500; gap:8px; }
.ranking-analysis-form #bi-ranking-field-trigger { color:#333; font-size:14px; font-weight:400; max-width:200px; }
.ranking-analysis-form #bi-ranking-field-trigger:hover { border-color:#aeb5c2; }
.ranking-analysis-form #bi-ranking-field-trigger[aria-expanded="true"] { border-color:#2a73f1; box-shadow:0 0 0 3px #e2edff; }
.ranking-analysis-form #bi-metrics-title { color:#777; font-size:12px; font-weight:400; }
.ranking-analysis-form #bi-metrics-section .analysis-sidebar-title { min-height:20px; }
.ranking-analysis-form .ranking-metric-row { display:block; padding:4px 4px 6px; border-radius:4px; }
.ranking-analysis-form .ranking-metric-row:is(:hover,:focus-within) { background:#f7f7f9; }
.ranking-metric-head, .ranking-metric-expression { display:flex; align-items:center; gap:8px; min-width:0; }
.ranking-metric-head { min-height:28px; }
.ranking-metric-head .metric-display-name { width:auto; max-width:100%; text-align:left; font-weight:500; padding:0; color:#333; }
.ranking-metric-expression { margin-top:4px; }
.ranking-metric-expression > span { color:#888; font-size:14px; }
.ranking-metric-expression .analysis-field-trigger {
  height:26px; min-height:26px; width:auto; min-width:0; border:1px solid transparent; border-radius:4px;
  background:#f0f1f5; color:#333; padding:0 8px; font-size:14px; font-weight:400;
}
.ranking-metric-expression .analysis-event-trigger { width:160px; max-width:42%; text-align:left; }
.ranking-metric-expression .analysis-metric-trigger { width:104px; }
.ranking-metric-row[data-metric-has-property] .analysis-metric-aggregation-trigger { width:135px; max-width:52%; text-overflow:ellipsis; }
.ranking-metric-expression .analysis-field-trigger:is(:hover,:focus-visible) { border-color:#cbd0da; background:#fff; }
.ranking-metric-expression .analysis-field-trigger[aria-expanded="true"] { border-color:#397cf7; background:#fff; }
.ranking-metric-actions { display:flex; flex:none; align-items:center; margin-left:auto; gap:6px; opacity:0; pointer-events:none; }
.ranking-metric-row:is(:hover,:focus-within) .ranking-metric-actions { opacity:1; pointer-events:auto; }
.ranking-metric-actions button { display:grid; place-items:center; width:24px; height:24px; border:0; border-radius:4px; padding:0; color:#7e7f80; background:transparent; cursor:pointer; }
.ranking-metric-actions svg, .ranking-remove-metric svg { height:16px; width:16px; pointer-events:none; }
.ranking-metric-actions button:is(:hover,:focus-visible) { background:#ebedf3; color:#333; }
.ranking-analysis-form { --inline-remove-hover:#ff4d4f; --inline-remove-hover-bg:#fff1f0; }
.ranking-ties-row { margin:15px 0 16px; color:#888; font-size:14px; }
.ranking-ties-row > div:first-child { font-size:12px; margin-bottom:8px; color:#777; }
.ranking-option { position:relative; flex:none; display:inline-block; }
.ranking-option > summary {
  list-style:none; cursor:pointer; display:flex; align-items:center; min-height:24px; padding:0 8px;
  font-size:13px; color:#333; background:#f0f1f5; border:1px solid transparent; border-radius:4px;
}
.ranking-option > summary::-webkit-details-marker { display:none; }
.ranking-option > summary:is(:hover,:focus-visible), .ranking-option[open] > summary { background:#fff; border-color:#cbd0da; }
#bi-ranking-order > summary::before { content:'↓'; margin-right:5px; }
#bi-ranking-order[data-value=asc] > summary::before { content:'↑'; }
.ranking-option-menu { position:absolute; top:calc(100% + 4px); left:0; z-index:15; min-width:max-content; padding:4px; border-radius:4px; background:#fff; box-shadow:0 3px 15px #252a4b28; }
.ranking-option-menu button { display:block; width:100%; min-height:30px; padding:0 10px; border:0; background:#fff; color:#333; text-align:left; font-size:14px; }
.ranking-option-menu button:not(:disabled):is(:hover,:focus-visible,[aria-pressed=true]) { background:#edf0f7; }
.ranking-option-menu button:disabled { color:#aaa; }
#bi-ranking-more .ranking-option-menu { left:auto; right:0; }
#bi-ranking-more summary { width:32px; height:32px; justify-content:center; padding:0; background:#fff; font-size:11px; letter-spacing:1px; }
.ranking-display-heading button { width:100%; display:flex; justify-content:space-between; align-items:center; min-height:36px; padding:0 4px; background:transparent; color:#333; border:0; text-align:left; font-size:16px; }
.ranking-display-heading button:is(:hover,:focus-visible) { background:#f6f7f9; }
.ranking-display-heading button > span:first-child { display:inline-flex; align-items:center; gap:8px; }
.ranking-display-heading svg { width:16px; height:16px; }
.ranking-display-heading:has(+ #bi-ranking-display-metrics:empty) button,
.ranking-analysis-form .analysis-sidebar-section:has(#bi-filters-list):not(:has([data-filter-row])) :is(.analysis-section-heading,#bi-add-filter) { color:#b3b3b5; }
#bi-ranking-display-metrics { counter-reset:ranking-metric; }
#bi-ranking-display-metrics .ranking-metric-row { counter-increment:ranking-metric; margin-block:8px; }
.ranking-metric-index { display:grid; place-items:center; height:24px; width:24px; background:#23253e; color:#fff; border-radius:4px; font-size:12px; }
.ranking-metric-index::before { content:counter(ranking-metric); }
#bi-ranking-display-metrics .ranking-metric-expression { padding-left:32px; }
.ranking-analysis-form .analysis-sidebar-title .funnel-section-icon { display:inline-flex; width:16px; height:16px; margin-right:6px; }
.ranking-analysis-form .analysis-sidebar-title .funnel-section-icon svg { width:16px; height:16px; }
.ranking-analysis-form #bi-add-filter { background:transparent; border:0; color:#555; }
.ranking-analysis-form #bi-result-tools { padding:8px 24px; background:#fff; }
.ranking-analysis-form #analysis-empty { align-content:center; justify-items:center; gap:12px; padding:20px 12px 40px; color:#333; text-align:center; }
.ranking-analysis-form .funnel-empty-image { display:block; width:min(400px,100%); height:auto; margin-bottom:20px; }
.ranking-analysis-form .analysis-empty-default { display:none; }
.ranking-analysis-form .funnel-empty-title, .ranking-analysis-form .ranking-model-example { display:inline; }
.ranking-analysis-form #bi-event-compare-add { display:none; }
.ranking-analysis-form #bi-chart-preview:has(> .ranking-empty-result) { display:grid; align-content:center; }
.ranking-empty-result { text-align:center; padding:32px 12px; color:#666; }
.ranking-period-result h3 { padding:0 12px; font-size:14px; }
.ranking-condition-dialog { width:min(680px,92vw); max-height:80vh; border:1px solid #dce1e7; border-radius:8px; padding:18px; }
.ranking-condition-dialog pre { max-height:54vh; overflow:auto; white-space:pre-wrap; font-size:13px; }
.ranking-condition-dialog form { text-align:right; }
@media (min-width:1200px) {
  .analysis-workspace .ranking-analysis-form:not(.event-sidebar-collapsed) .analysis-layout { grid-template-columns:min(var(--event-sidebar-width,616px),52vw) 4px minmax(0,1fr); }
}
@media (max-width:800px) {
  .ranking-analysis-form #bi-analysis-toolbar { padding-inline:12px; }
  #bi-chart-form.ranking-analysis-form .analysis-sidebar-section { padding-inline:12px; }
  .ranking-metric-actions { opacity:1; pointer-events:auto; }
  .ranking-analysis-form #bi-result-tools { padding-inline:12px; }
}
.ranking-metric-row:is(:hover,:focus-within) .ranking-metric-index { background:transparent; color:#8090a5; cursor:grab; }
.ranking-metric-row:is(:hover,:focus-within) .ranking-metric-index::before { content:'⠿'; font-size:17px; }
.ranking-analysis-form [data-insert-project-metric] { display:none; }
.ranking-board-row:hover { background:#f7f9fc; }
.ranking-board-identity:focus-visible { outline:1px solid #397cf7; outline-offset:2px; }
.ranking-board-comparison { color:#49546b; font-variant-numeric:tabular-nums; }
.app-tooltip.app-tooltip-ranking { min-width:208px; color:#333; background:#fff; text-align:left; border:1px solid #e5e7ef; box-shadow:0 5px 18px #19234421; }
.app-tooltip.app-tooltip-ranking::after { display:none; }
.app-tooltip-ranking .app-tooltip-detail { white-space:pre-line; }
#bi-chart-form.ranking-analysis-form .analysis-sidebar-section:not(#bi-analysis-mode-section):not(#bi-analysis-settings-section) { padding-inline:24px; }
.ranking-metric-head :is(.metric-display-name,.metric-display-name-input) { flex:0 1 auto; max-width:min(320px,70%); }
.ranking-metric-head .metric-display-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ranking-metric-index { flex:0 0 24px; }
.ranking-metric-editor { position:relative; color:#333; line-height:22px; }
.ranking-metric-editor .metric-editor-dropdown { position:absolute; z-index:2; color:#333; }
.ranking-metric-editor .metric-editor-button { border-color:#e0e0e0; color:#333; }
.ranking-metric-editor .metric-editor-button:hover { background:#f2f3f8; box-shadow:none; }
.ranking-metric-editor .metric-editor-button[aria-expanded="true"] { border-color:#1e76f0; box-shadow:0 0 0 3px #dae9fb; }
.ranking-metric-expression :is(.analysis-event-trigger,.analysis-metric-trigger,.analysis-metric-aggregation-trigger) { flex:0 1 auto; }
.ranking-analysis-form #bi-result-tools .analysis-date-controls { gap:0; }
.ranking-analysis-form #bi-result-tools .analysis-date-controls > .date-range-trigger { border-radius:4px 0 0 4px; }
.ranking-analysis-form #bi-event-compare > summary { border-left:0; border-radius:0 4px 4px 0; }
.ranking-analysis-form .funnel-empty-title { font-size:16px; font-weight:500; line-height:25px; }
.ranking-analysis-form :is(#bi-filters-list,.ranking-metric-row) :is(.analysis-field-trigger,.analysis-filter-operator-trigger) {
  min-height:26px; height:26px; background:#f0f1f5; border-color:transparent;
}
.ranking-analysis-form :is(#bi-filters-list,.ranking-metric-row) :is(.analysis-field-trigger,.analysis-filter-operator-trigger):is(:hover,:focus-visible) {
  background:#fff; border-color:#cbd0da;
}
@media (max-width:800px) {
  #bi-chart-form.ranking-analysis-form .analysis-sidebar-section:not(#bi-analysis-mode-section):not(#bi-analysis-settings-section) { padding-inline:12px; }
}
#bi-ranking-comparison-chip {
  max-width:170px; padding:0 8px; height:32px; background:#f1f2f6; border:1px solid #e3e4e5; border-left:0;
  border-radius:0 4px 4px 0; color:#333; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ranking-analysis-form #bi-event-compare:has(+ #bi-ranking-comparison-chip:not([hidden])) > summary { border-radius:0; }
.ranking-board-head, .ranking-board-row { grid-template-columns:minmax(90px,.7fr) minmax(100px,.85fr) repeat(var(--ranking-metric-count),minmax(156px,1.5fr)); }
.ranking-board-head { color:#262626; font-size:14px; font-weight:500; }
.ranking-board-placement { display:flex; align-items:center; gap:7px; }
.ranking-board-movement { font-size:13px; font-variant-numeric:tabular-nums; }
.ranking-board-movement.up { color:#da5146; }
.ranking-board-movement.down { color:#098773; }
.ranking-board-metric { gap:4px; }
.ranking-board-bar { background:transparent; height:4px; border-radius:0; }
.ranking-board-bar-previous { opacity:.42; }
.ranking-board-row:focus-visible { outline:1px solid #397cf7; outline-offset:-1px; }
.ranking-board-rank-4 { background:transparent; }

#bi-chart-form #bi-result-tools [data-analysis-settings]:not([hidden]) {
  display:inline-grid; place-items:center; flex:0 0 34px; width:34px; min-width:34px;
  height:32px; min-height:32px; padding:0; border:1px solid #e3e4e5; border-radius:4px;
  background:#fff; color:#333; box-shadow:none;
}
#bi-chart-form #bi-result-tools [data-analysis-settings] svg { width:16px; height:16px; pointer-events:none; }
#bi-chart-form #bi-result-tools [data-analysis-settings]:not([aria-disabled=true]):is(:hover,:focus-visible) { background:#f6f6f9; }
#bi-chart-form #bi-result-tools [data-analysis-settings][aria-expanded=true]:not([aria-disabled=true]) { background:#ebedf3; }
#bi-chart-form #bi-result-tools [data-analysis-settings][aria-disabled=true] { color:#bdbebf; cursor:not-allowed; }
.ranking-result-actions { display:flex; justify-content:flex-end; align-items:center; gap:12px; min-height:54px; padding:8px 12px; }
.ranking-result-actions > label { display:flex; align-items:center; gap:8px; font-size:14px; }
.ranking-metrics-menu > summary { padding:0 10px; height:32px; border-color:#e3e4e5; background:#fff; }
.ranking-metrics-menu > summary::after { content:'⌄'; margin-left:7px; }
.ranking-metrics-menu .ranking-option-menu { left:auto; right:0; max-width:min(280px,90vw); min-width:168px; }
.ranking-metrics-menu .ranking-option-menu label { display:flex; gap:8px; align-items:flex-start; padding:7px 10px; color:#333; font-size:13px; overflow-wrap:anywhere; }
.ranking-metrics-menu .ranking-option-menu label:is(:hover,:focus-within) { background:#f0f1f6; }
