:root {
  --bg: #f5f6f7;
  --panel: #ffffff;
  --text: #1f2329;
  --muted: #8a9098;
  --line: #e9edef;
  --brand: #0eb8a5;
  --brand-dark: #079c8d;
  --brand-soft: #eaf7f5;
  --yellow: #ffc62a;
  --blue: #5a8dee;
  --violet: #8a77d5;
  --orange: #f29f5c;
  --danger: #d94b4b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-width: 1180px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 1180px;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea { font: inherit; }
button { color: inherit; }
button:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: 2px solid rgba(14,184,165,.34); outline-offset: 1px; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.page-canvas { position: relative; min-width: 1180px; min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 192px;
  overflow-y: auto;
  background: #fafbfb;
  border-right: 1px solid #f0f2f3;
}

.brand { display: flex; align-items: center; height: 58px; padding: 0 18px; }
.brand-title { margin-left: 10px; font-size: 15px; font-weight: 650; letter-spacing: .1px; }
.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-content: space-evenly;
  width: 22px;
  height: 21px;
  padding: 5px 4px 0;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 6px 6px 10px 10px;
  background: var(--brand);
}
.brand-mark::before { content: ""; position: absolute; top: 3px; left: 2px; width: 18px; height: 6px; border-radius: 6px 6px 2px 2px; background: #fff; }
.brand-mark::after { content: ""; position: absolute; top: 0; left: 4px; width: 14px; height: 5px; border-radius: 4px; background: var(--brand); }
.brand-mark i { z-index: 1; width: 2px; height: 5px; border-radius: 0 0 2px 2px; background: #fff; }

.side-nav { padding: 0 10px 18px 0; }
.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 34px;
  padding: 0 15px 0 20px;
  border: 0;
  border-radius: 0 4px 4px 0;
  background: transparent;
  color: #333940;
  text-align: left;
  cursor: pointer;
}
.nav-row:hover { background: #f1f5f5; }
.nav-row.active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-row svg { width: 14px; height: 14px; margin-right: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-row span { font-size: 12px; }
.nav-row b { position: absolute; right: 16px; color: #adb2b8; font-size: 13px; font-weight: 400; transition: transform .18s ease; }
.nav-group.open > .nav-row b { transform: rotate(180deg); }
.subnav { display: grid; max-height: 0; overflow: hidden; transition: max-height .2s ease; }
.nav-group.open .subnav { max-height: 78px; }
.subnav button { height: 30px; padding: 0 12px 0 46px; border: 0; background: transparent; color: #7f858c; text-align: left; cursor: pointer; }
.subnav button:hover,
.subnav button.active { color: var(--brand-dark); }

.account-wrap { position: fixed; z-index: 30; top: 17px; right: 20px; }
.account-button { display: flex; align-items: center; gap: 5px; padding: 2px 0; border: 0; background: transparent; font-size: 11px; cursor: pointer; }
.account-button b { color: #adb2b8; font-weight: 400; transition: transform .18s ease; }
.account-wrap.open .account-button b { transform: rotate(180deg); }
.avatar { position: relative; width: 15px; height: 15px; overflow: hidden; border-radius: 50%; background: #dff5f2; }
.avatar img, .avatar-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.avatar img { z-index: 1; object-fit: cover; }
.avatar-fallback { display: block; background: radial-gradient(circle at 55% 35%, #696969 0 16%, #202020 18% 100%); }
.account-menu { position: absolute; top: 28px; right: 0; display: none; width: 112px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 8px 24px rgba(31,35,41,.09); }
.account-wrap.open .account-menu { display: grid; }
.account-menu button, .account-menu a { display: flex; align-items: center; height: 30px; padding: 0 7px; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.account-menu button:hover, .account-menu a:hover { background: var(--brand-soft); }

.dashboard { position: relative; min-height: 100vh; margin-left: 192px; padding: 58px 0 80px 39px; }
.content-column { width: 817px; }
.dashboard-card { position: relative; width: 817px; margin-bottom: 16px; padding: 20px 21px; scroll-margin-top: 18px; border-radius: 10px; background: var(--panel); }
.overview-card { height: 387px; }
.distribution-card { min-height: 350px; }
.conversion-card { height: 390px; }
.persona-card { min-height: 430px; margin-bottom: 0; }

.card-heading { position: relative; display: flex; min-height: 52px; }
.card-heading h1,
.card-heading h2 { margin: 0; font-size: 14px; line-height: 19px; font-weight: 650; }
.card-heading p { margin: 4px 0 0; color: #969ca3; font-size: 9px; line-height: 13px; }
.help-button { position: absolute; top: 3px; right: 0; display: grid; place-items: center; width: 13px; height: 13px; padding: 0; border: 1px solid #e2e6e9; border-radius: 50%; background: transparent; color: #b5bac0; font-size: 8px; cursor: help; }

.date-control { position: absolute; z-index: 5; top: -2px; right: 20px; }
.date-tabs { display: flex; align-items: center; height: 29px; overflow: hidden; border: 1px solid #e7ebed; border-radius: 4px; background: #fff; white-space: nowrap; }
.date-tabs button { height: 100%; padding: 0 11px; border: 0; background: transparent; color: #858b92; font-size: 10px; cursor: pointer; }
.date-tabs button:hover { color: var(--brand-dark); background: #f7fbfa; }
.date-tabs button.active { color: #30363c; font-weight: 600; }
.date-display { min-width: 118px; padding: 0 4px; color: #8c9299; font-size: 9px; text-align: center; }

.date-popover { position: absolute; top: 36px; right: 0; width: 286px; padding: 16px; border: 1px solid #e5e9eb; border-radius: 8px; background: #fff; box-shadow: 0 12px 32px rgba(31,35,41,.12); }
.date-popover > strong { display: block; margin-bottom: 12px; font-size: 13px; }
.date-popover label { display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 8px; margin-top: 9px; color: #5d646b; }
.date-popover input { height: 31px; padding: 0 8px; border: 1px solid #dfe4e7; border-radius: 4px; color: #363c42; }
.date-error { min-height: 17px; margin: 7px 0 0; color: var(--danger); font-size: 10px; }
.popover-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }
.popover-actions button,
.modal-actions button { height: 30px; padding: 0 15px; border: 1px solid #dce1e4; border-radius: 5px; background: #fff; cursor: pointer; }
.popover-actions .primary,
.modal-actions .primary { border-color: var(--brand); color: #fff; background: var(--brand); }

.metric-grid { display: grid; gap: 6px; }
.overview-metrics { grid-template-columns: repeat(5, 1fr); }
.dynamic-metrics { grid-template-columns: repeat(4, 1fr); }
.dynamic-metrics.three { grid-template-columns: repeat(3, 1fr); }
.metric { min-width: 0; height: 93px; padding: 12px 11px; border: 1px solid #e3e7e9; border-radius: 4px; background: #fff; }
.metric.selected { border-color: #bfe8e3; background: #eef9f7; }
.metric > span { display: block; overflow: hidden; margin-bottom: 4px; color: #343a40; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.metric strong { display: block; margin-bottom: 5px; font-size: 18px; line-height: 20px; font-weight: 600; }
.metric small { display: block; color: #92989f; font-size: 8px; line-height: 13px; }
.metric small b { color: #5a6067; font-weight: 400; }
.metric small .up { color: #df6d62; }
.metric small .down { color: #36a88d; }

.chart-wrap { position: relative; height: 205px; margin-top: 7px; }
.trend-chart { display: block; width: 100%; height: 188px; overflow: visible; }
.chart-grid { stroke: #edf0f2; stroke-width: 1; }
.chart-axis { fill: #92989f; font-size: 8px; }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: rgba(14,184,165,.06); }
.chart-point { fill: #fff; stroke: var(--brand); stroke-width: 1.6; }
.chart-legend { position: absolute; bottom: 0; left: 50%; display: flex; align-items: center; gap: 6px; transform: translateX(-50%); color: #525960; font-size: 9px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

.distribution-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; height: 257px; }
.soft-panel { position: relative; overflow: hidden; padding: 17px; border-radius: 5px; background: linear-gradient(180deg, #effaf9 0, #fff 72px); }
.soft-panel h3,
.profile-panel h3 { margin: 0; font-size: 12px; line-height: 16px; font-weight: 500; }
.soft-panel h3 span { color: #8d939a; }
.donut-layout { display: flex; align-items: center; justify-content: center; gap: 34px; height: 215px; }
.donut { position: relative; width: 138px; height: 138px; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--brand) 0 60%, var(--yellow) 60% 100%); }
.donut::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #fff; }
.donut > div { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut span { color: #7f858d; font-size: 9px; }
.donut strong { margin-top: 5px; font-size: 17px; font-weight: 500; }
.donut-legend { display: grid; gap: 13px; min-width: 90px; }
.donut-legend div,
.profile-legend div { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 7px; color: #626970; font-size: 10px; }
.donut-legend i,
.profile-legend i { width: 8px; height: 8px; border-radius: 2px; }
.scene-list { display: grid; gap: 11px; margin-top: 19px; }
.scene-row { display: grid; grid-template-columns: 78px 1fr 34px; align-items: center; gap: 9px; color: #60676e; font-size: 10px; }
.bar-track { height: 7px; overflow: hidden; border-radius: 4px; background: #edf2f2; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.scene-row b { font-weight: 500; text-align: right; }

.persona-heading { min-height: 49px; }
.persona-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.profile-panel { min-height: 165px; padding: 16px; border: 1px solid #edf0f2; border-radius: 6px; background: linear-gradient(180deg, #f4fbfa 0, #fff 60px); }
.gender-donut { position: relative; width: 104px; height: 104px; margin: 15px 0 0 25px; border-radius: 50%; background: conic-gradient(var(--brand) 0 50%, var(--yellow) 50% 100%); }
.gender-donut::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: #fff; }
.gender-donut > div { position: absolute; z-index: 1; inset: 0; display: grid; place-content: center; text-align: center; }
.gender-donut strong { font-size: 16px; font-weight: 500; }
.gender-donut span { margin-top: 2px; color: #8a9098; font-size: 8px; }
.profile-legend { position: absolute; top: 62px; right: 34px; display: grid; gap: 12px; width: 110px; }
.profile-panel { position: relative; }
.profile-bars { display: grid; gap: 9px; margin-top: 17px; }
.profile-bar { display: grid; grid-template-columns: 70px 1fr 38px; align-items: center; gap: 9px; color: #626970; font-size: 10px; }
.profile-bar b { font-weight: 500; text-align: right; }

.section-menu { position: fixed; z-index: 10; top: 125px; left: 1075px; width: 90px; padding: 9px 0; border-radius: 9px; background: #fff; }
.section-menu button { position: relative; display: block; width: 100%; height: 32px; padding: 0 0 0 18px; border: 0; background: transparent; color: #858b92; font-size: 10px; text-align: left; cursor: pointer; }
.section-menu button:hover { color: var(--brand-dark); }
.section-menu button.active { color: #30363c; font-weight: 600; }
.section-menu button.active::before { content: ""; position: absolute; top: 9px; left: 0; width: 2px; height: 14px; background: #24292f; }

.feedback-rail { position: fixed; z-index: 35; right: 24px; bottom: 20px; display: grid; width: 28px; overflow: hidden; border-radius: 5px; background: var(--brand); }
.feedback-rail button { display: flex; flex-direction: column; align-items: center; gap: 2px; height: 31px; padding: 4px 0 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.28); color: #fff; background: transparent; font-size: 7px; cursor: pointer; }
.feedback-rail button:last-child { border-bottom: 0; }
.feedback-rail svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.overlay-backdrop { position: fixed; z-index: 50; inset: 0; visibility: hidden; opacity: 0; background: rgba(20,28,32,.28); transition: opacity .18s ease, visibility .18s ease; }
.overlay-backdrop.open { visibility: visible; opacity: 1; }
.caliber-drawer { position: fixed; z-index: 60; top: 0; right: 0; width: 410px; height: 100vh; padding: 24px; overflow-y: auto; transform: translateX(100%); background: #fff; box-shadow: -12px 0 30px rgba(31,35,41,.12); transition: transform .22s ease; }
.caliber-drawer.open { transform: translateX(0); }
.overlay-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.overlay-heading h2 { margin: 0; font-size: 18px; }
.overlay-heading p { margin: 6px 0 0; color: #8a9098; }
.overlay-heading > button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.overlay-heading > button:hover { background: #f1f3f4; }
.overlay-heading svg { width: 17px; height: 17px; fill: none; stroke: #4e555c; stroke-width: 1.7; }
.drawer-tabs { display: flex; gap: 24px; margin-top: 26px; border-bottom: 1px solid var(--line); }
.drawer-tabs button { position: relative; height: 38px; border: 0; background: transparent; color: #777e85; cursor: pointer; }
.drawer-tabs button.active { color: var(--brand-dark); font-weight: 600; }
.drawer-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--brand); }
.caliber-content { display: none; }
.caliber-content.active { display: block; }
.caliber-content dl { margin: 8px 0 0; }
.caliber-content dt { margin-top: 20px; font-weight: 600; }
.caliber-content dd { margin: 7px 0 0; color: #6e757c; line-height: 1.75; }

.feedback-modal { position: fixed; z-index: 60; top: 50%; left: 50%; visibility: hidden; width: 470px; padding: 24px; opacity: 0; transform: translate(-50%,-46%) scale(.98); border-radius: 10px; background: #fff; box-shadow: 0 16px 44px rgba(31,35,41,.18); transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.feedback-modal.open { visibility: visible; opacity: 1; transform: translate(-50%,-50%) scale(1); }
.feedback-field { position: relative; display: grid; gap: 9px; margin-top: 22px; font-weight: 600; }
.feedback-field textarea { width: 100%; height: 130px; padding: 11px 12px 28px; resize: none; border: 1px solid #dfe4e7; border-radius: 6px; color: #333940; font-weight: 400; line-height: 1.6; }
.feedback-field > span { position: absolute; right: 10px; bottom: 8px; color: #a0a5ab; font-size: 10px; font-weight: 400; }
.feedback-field > span b { font-weight: 400; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }

.toast { position: fixed; z-index: 80; bottom: 36px; left: 50%; visibility: hidden; padding: 10px 18px; opacity: 0; transform: translate(-50%,10px); border-radius: 6px; color: #fff; background: rgba(31,35,41,.9); transition: .18s ease; }
.toast.show { visibility: visible; opacity: 1; transform: translate(-50%,0); }

@media (min-width: 1440px) {
  .dashboard { padding-left: calc((100vw - 1202px) / 2); }
  .section-menu { left: calc((100vw - 1202px) / 2 + 844px + 192px); }
}

@media (max-width: 1180px) {
  html,
  body { min-width: 1180px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition-duration: .01ms !important; }
}

/* Saved WeChat Compass page dimensions. */
html,
body,
.page-canvas { min-width: 1720px; }

body { background: #f7f7f7; }

.sidebar {
  width: 272px;
  scrollbar-width: none;
  background: #f7f7f7;
  border-right: 0;
}
.sidebar::-webkit-scrollbar { display: none; }

.brand { height: 88px; padding: 0 24px; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px 11px 18px 18px; }
.brand-mark::before { top: 6px; left: 4px; width: 32px; height: 11px; }
.brand-mark::after { left: 7px; width: 26px; height: 9px; }
.brand-mark i { width: 4px; height: 10px; }
.brand-title { margin-left: 12px; font-size: 20px; font-weight: 500; }

.side-nav { padding: 0 16px 18px; }
.nav-row {
  height: 50px;
  padding: 14px;
  border-radius: 8px;
}
.nav-row svg { width: 22px; height: 22px; margin-right: 12px; }
.nav-row span { font-size: 16px; line-height: 24px; }
.nav-row b { right: 16px; font-size: 16px; }
.subnav button { height: 50px; padding-left: 48px; font-size: 16px; }

.account-wrap { top: 34px; right: 24px; }
.account-button { gap: 8px; font-size: 14px; line-height: 20px; }
.avatar { width: 20px; height: 20px; }

.dashboard {
  margin-left: 272px;
  padding: 88px 0 80px 32px;
}
.content-column,
.dashboard-card { width: 1224px; }
.page-title {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 500;
  line-height: 34px;
}
.dashboard-card {
  height: auto;
  min-height: 0;
  margin-bottom: 24px;
  padding: 32px;
  border-radius: 16px;
}
.distribution-card { margin-bottom: 16px; }
.persona-card { margin-bottom: 0; }

.card-heading { min-height: 84px; }
.card-heading h1,
.card-heading h2 {
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}
.card-heading p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  color: #00000080;
}
.help-button { top: 8px; width: 20px; height: 20px; font-size: 12px; }

.date-control { top: 0; right: 32px; }
.date-tabs { height: 40px; border-color: #0000001a; border-radius: 8px; }
.date-tabs button {
  position: relative;
  padding: 0 16px;
  color: #0000008c;
  font-size: 14px;
  line-height: 20px;
}
.date-tabs button.active { color: #000000e6; font-weight: 500; }
.date-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 178px;
  padding: 0 8px;
  color: #0000008c;
  font-size: 14px;
}
.date-tabs > * + *::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 16px;
  transform: translateY(-50%);
  background: #0000001a;
}

.metric-grid { gap: 8px; }
.metric {
  height: auto;
  min-height: 138px;
  padding: 16px;
  border-color: #0000001a;
  border-radius: 8px;
}
.metric.selected { border-color: #0ab8a633; background: #0ab8a60d; }
.metric > span {
  margin: 0;
  color: #000000e6;
  font-size: 14px;
  line-height: 20px;
}
.metric strong {
  margin: 4px 0 8px;
  color: #000000e6;
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
}
.metric small {
  color: #0000008c;
  font-size: 14px;
  line-height: 20px;
}
.metric small + small { margin-top: 2px; }
.metric small b { color: #000000e6; }

.chart-wrap { height: 300px; margin-top: 0; }
.trend-chart { height: 282px; }
.chart-axis { font-size: 12px; }
.chart-legend { font-size: 14px; }
.chart-legend i { width: 10px; height: 10px; }

.distribution-grid { gap: 16px; height: 380px; }
.soft-panel {
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(180deg, #effaf9 0, #fff 110px);
}
.soft-panel h3,
.profile-panel h3 { font-size: 17px; font-weight: 500; line-height: 24px; }
.donut-layout {
  flex-direction: column;
  justify-content: flex-start;
  gap: 24px;
  height: auto;
  margin-top: 24px;
}
.donut { width: 240px; height: 240px; }
.donut::after { inset: 32px; }
.donut span { font-size: 14px; line-height: 20px; }
.donut strong { margin-top: 4px; font-size: 24px; line-height: 32px; }
.donut-legend { display: flex; gap: 24px; min-width: 0; }
.donut-legend div,
.profile-legend div { grid-template-columns: 12px 1fr auto; gap: 8px; font-size: 14px; line-height: 20px; }
.donut-legend i,
.profile-legend i { width: 12px; height: 12px; border-radius: 50%; }
.scene-list { gap: 0; margin-top: 14px; }
.scene-row {
  grid-template-columns: 118px 1fr 100px;
  gap: 8px;
  min-height: 58px;
  font-size: 14px;
  line-height: 20px;
}
.bar-track { height: 4px; border-radius: 2px; }

.persona-heading { min-height: 81px; }
.persona-grid { gap: 16px; }
.profile-panel { min-height: 248px; padding: 24px; border-radius: 12px; }
.gender-donut { width: 156px; height: 156px; margin: 22px 0 0 38px; }
.gender-donut::after { inset: 21px; }
.gender-donut strong { font-size: 24px; }
.gender-donut span { font-size: 12px; }
.profile-legend { top: 93px; right: 51px; width: 165px; }
.profile-bars { gap: 14px; margin-top: 25px; }
.profile-bar { grid-template-columns: 105px 1fr 57px; gap: 14px; font-size: 14px; }

.section-menu {
  top: 188px;
  left: 1552px;
  width: 132px;
  padding: 8px 0;
  border-radius: 16px;
}
.section-menu button {
  height: 48px;
  padding-left: 24px;
  color: #0000008c;
  font-size: 14px;
  line-height: 24px;
}
.section-menu button.active { color: #000000e6; font-weight: 500; }
.section-menu button.active::before { top: 16px; height: 16px; }

.feedback-rail { right: 24px; bottom: 24px; width: 40px; border-radius: 8px; }
.feedback-rail button { height: 46px; gap: 3px; padding-top: 6px; font-size: 11px; }
.feedback-rail svg { width: 18px; height: 18px; }

@media (min-width: 1440px) {
  .dashboard { padding-left: 32px; }
  .section-menu { left: 1552px; }
}

@media (max-width: 1720px) {
  html,
  body { min-width: 1720px; }
}
