:root {
  --blue: #4868ad; --blue-deep: #35518d; --blue-wash: #edf2fc; --ink: #263348;
  --muted: #637287; --paper: #fff; --surface: #f6f8fb; --line: #e9edf3; --amber: #ad7831; --red: #b44d59;
  font-family: "Avenir Next", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
button, a { transition: background .15s, color .15s; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #9bb0dc; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; font-weight: 650; letter-spacing: -.8px; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
p { line-height: 1.75; }
small { font-size: 12px; }
code { font-family: "SFMono-Regular", "Menlo", monospace; font-size: 11px; }
.boot { padding: 100px; color: var(--muted); }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 15px 15px 15px 5px; color: white; background: var(--blue); font-size: 19px; font-weight: 600; }
.brand b { display: block; font-size: 15px; letter-spacing: .2px; }
.brand small { display: block; color: var(--muted); margin-top: 4px; font-size: 10px; letter-spacing: 2px; }
.eyebrow { display: block; color: #93a1b8; font-size: 10px; letter-spacing: 2.1px; font-weight: 600; margin-bottom: 12px; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 56% 44%; background: var(--paper); }
.login-story { position: relative; padding: 52px 70px; overflow: hidden; background: radial-gradient(ellipse at 45% 50%, #e5ecfa 0, transparent 62%), linear-gradient(130deg, #f7f9fe, #eef2fa); }
.login-headline { position: relative; margin: 110px auto 0; max-width: 440px; z-index: 1; }
.login-headline h1 { font-size: clamp(34px, 4vw, 56px); line-height: 1.5; font-weight: 500; letter-spacing: -1.5px; }
.login-headline p { color: var(--muted); margin-top: 25px; font-size: 15px; }
.login-footer { position: absolute; bottom: 45px; font-size: 11px; letter-spacing: 1px; color: #91a0b6; }
.orbit { width: 260px; height: 160px; position: relative; margin: 55px 0 40px; transform: rotate(-12deg); }
.orbit i { position: absolute; border: 1px solid #c6d2e7; border-radius: 50%; width: 250px; height: 115px; transform: rotate(20deg); }
.orbit i:nth-child(2) { transform: rotate(65deg); }
.orbit i:nth-child(3) { transform: rotate(115deg); }
.orbit span { width: 14px; height: 14px; border-radius: 50%; background: #6784bd; position: absolute; top: 35px; right: 28px; box-shadow: 0 0 0 9px #e2e9f8; }
.login-form-wrap { display: grid; place-items: center; padding: 40px; }
#login-form { width: min(100%, 330px); }
#login-form h2 { font-size: 27px; }
#login-form > p { color: var(--muted); margin-top: 10px; margin-bottom: 30px; }
.field { display: flex; flex-direction: column; gap: 10px; font-size: 12px; font-weight: 600; margin-bottom: 20px; }
input:not([type=checkbox]), select, textarea { border: 1px solid #dfe5ee; border-radius: 9px; padding: 11px 12px; color: var(--ink); background: white; min-width: 0; max-width: 100%; }
input::placeholder { color: #a4aebb; }
.field small { font-weight: 400; color: var(--muted); }
.primary, .subtle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 9px; padding: 10px 16px; border: 1px solid transparent; font-size: 12px; font-weight: 600; white-space: nowrap; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--blue-deep); }
.subtle { background: white; color: #6f7d95; border-color: var(--line); }
.subtle:hover { background: var(--blue-wash); }
.large { width: 100%; padding: 14px; font-size: 14px; }
.text-button { color: var(--blue); background: none; border: 0; padding: 3px 0; font: inherit; }
.text-button:hover { color: var(--blue-deep); text-decoration: underline; }
.form-error { color: var(--red) !important; font-size: 12px; min-height: 20px; margin: 0 0 16px !important; }
.setup-help { color: var(--muted); font-size: 11px; margin-top: 25px; }
.setup-help summary { cursor: pointer; }
.setup-help p { margin: 12px 0; }
.setup-help code { display: block; overflow-wrap: anywhere; }
.workspace { display: flex; min-height: 100vh; }
.sidebar { width: 218px; padding: 32px 20px; border-right: 1px solid var(--line); background: #fcfdff; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 10; }
.sidebar .brand { padding: 0 7px; }
.nav-label { color: #a0aabc; font-size: 10px; letter-spacing: 1.5px; margin: 46px 12px 15px; }
.app-switcher { display: flex; flex-direction: column; text-align: left; background: #f2f5fb; border: 1px solid #e8edf6; border-radius: 10px; margin: 27px 4px 0; padding: 13px; gap: 7px; color: var(--blue); }
.app-switcher small { font-size: 9px; color: #99a7bd; }
.app-switcher strong { font-weight: 500; font-size: 12px; }
.app-switcher > span { font-size: 10px; color: #91a2bf; }
.app-switcher + .nav-label { margin-top: 26px; }
.app-chooser { min-height: 100vh; padding: 40px 7vw; background: radial-gradient(ellipse at 90% 0%, #e8eefb, transparent 50%), #f8fafe; }
.app-chooser > header { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.app-chooser > section { max-width: 1100px; margin: 100px auto 50px; }
.app-chooser h1 { font-size: 36px; font-weight: 500; }
.app-chooser section > p { color: #97a4ba; margin: 17px 0 35px; font-size: 13px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 25px; }
.app-card { background: white; border: 1px solid #e5eaf3; text-align: left; border-radius: 18px; padding: 28px; min-height: 250px; color: var(--ink); }
.app-card:hover { border-color: #afc1e4; background: #fcfdff; }
.app-card-icon { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 15px; background: #eaf0fc; color: var(--blue); font-size: 22px; margin-bottom: 25px; }
.app-card > small { font-size: 10px; color: #9aabc7; }
.app-card h2 { font-size: 18px; font-weight: 500; margin-top: 8px; }
.app-card p { color: #9da8bb; font-size: 11px; margin-top: 12px; }
.app-card-link { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--blue); margin-top: 30px; }
.app-card-link b { font-weight: 400; }
.app-access { border: 1px solid var(--line); border-radius: 10px; margin: 18px 0; padding: 15px; }
.app-access legend { color: var(--muted); font-size: 10px; padding: 0 5px; }
.app-access label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #7e8ba2; padding: 7px 0; }
nav { display: flex; flex-direction: column; gap: 5px; }
nav a { display: flex; align-items: center; gap: 13px; color: #768299; text-decoration: none; padding: 12px 14px; border-radius: 10px; font-size: 13px; }
nav a:hover { background: #f0f3f9; }
nav a.active { background: #eaf0fc; color: var(--blue); font-weight: 600; }
nav a:last-child { margin-top: 20px; }
.sidebar-footer { margin-top: auto; padding: 25px 9px 0; font-size: 11px; color: #7f8da4; }
.sidebar-footer small { display: block; margin-top: 8px; font-size: 10px; color: #a4adbc; }
.status-dot { display: inline-block; background: #8da3cc; height: 5px; width: 5px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.main { flex: 1; min-width: 0; margin-left: 218px; }
.topbar { height: 72px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #ffffffb0; }
.breadcrumb { color: #9ba5b5; font-size: 11px; }
.breadcrumb > span { margin: 0 12px; color: #c4cbd6; }
.breadcrumb b { color: #6e7d93; font-weight: 400; }
.account { display: flex; gap: 12px; align-items: center; font-size: 12px; }
.role { color: #94a1b7; font-size: 10px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; }
.account .text-button { color: #8b98ad; margin-left: 8px; }
.page { max-width: 1550px; margin: auto; padding: 39px 40px 20px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.page-heading p { color: var(--muted); margin-top: 10px; font-size: 12px; }
.heading-actions { display: flex; gap: 8px; }
.heading-actions svg { width: 15px; height: 15px; }
.global-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 18px 20px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.global-filters[hidden] { display: none; }
.global-filters label { display: flex; flex-direction: column; gap: 7px; font-size: 10px; color: #8c98ac; }
.global-filters input, .global-filters select { padding: 8px 10px; font-size: 11px; height: 35px; }
.global-filters .primary { margin-left: auto; height: 35px; }
.date-divider { color: #a3aebb; font-size: 10px; margin-bottom: 11px; }
.scope-note { font-size: 10px; color: #99a4b6; padding: 12px 3px 22px; }
#content { animation: enter .35s ease; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 26px; gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.metrics.three { grid-template-columns: repeat(3, 1fr); }
.metric { background: white; padding: 25px 28px; min-width: 0; display: flex; flex-direction: column; }
.metric.featured { background: linear-gradient(125deg, #edf2fc, #f7f9ff); }
.metric > span { color: #8491a6; font-size: 11px; }
.metric strong { font-size: 40px; letter-spacing: -1.2px; font-weight: 500; line-height: 1.7; }
.metric.featured strong { color: var(--blue); }
.metric small { color: #9aa5b6; font-size: 10px; line-height: 1.6; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: white; margin-bottom: 22px; overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 24px 26px 15px; }
.panel-heading p { font-size: 10px; color: #95a1b5; margin-top: 6px; }
.legend { color: #8a98ae; font-size: 10px; }
.legend i { display: inline-block; height: 5px; width: 5px; background: var(--blue); border-radius: 50%; margin-right: 5px; }
.chart { padding: 8px 22px 6px; }
.chart svg { width: 100%; display: block; }
.chart text { fill: #a0abbd; font-size: 10px; font-family: inherit; }
.cloud-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 35px; padding: 0 6px 27px; color: #97a2b4; font-size: 11px; }
.cloud-strip > span { margin-right: auto; }
.cloud-strip b { color: #5d6c85; font-weight: 600; font-size: 16px; }
.cloud-strip small { font-weight: 400; font-size: 10px; margin-left: 5px; color: #97a2b4; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.table-wrap { overflow: auto; padding: 3px 16px 14px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; white-space: nowrap; }
th { color: #a1aabc; font-weight: 400; font-size: 10px; text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
td { padding: 16px 10px; border-bottom: 1px solid #f3f5f8; color: #65728a; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }
td small { display: block; color: #a6b0c0; font-size: 10px; margin-top: 4px; }
.badge { display: inline-block; font-size: 10px; color: #7f93b8; padding: 4px 7px; border-radius: 5px; background: #f0f4fa; }
.badge.warning { color: var(--amber); background: #fbf5eb; }
.muted { color: #a0aabc; font-size: 11px; }
.props { max-width: 300px; display: block; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; color: #96a0b1; }
.observations { display: grid; grid-template-columns: repeat(3, 1fr); padding: 12px 27px 28px; }
.observations div { display: flex; flex-direction: column; gap: 10px; }
.observations strong { font-size: 28px; font-weight: 500; color: #6e7e99; }
.observations span { color: #7a87a0; font-size: 11px; }
.observations small { color: #a4adbd; font-size: 10px; }
.footnote { color: #a3adbf; font-size: 10px; line-height: 1.9; margin: 8px 4px 24px; }
.empty { padding: 38px 20px 45px; text-align: center; min-height: 200px; }
.empty-glyph { display: grid; place-items: center; width: 48px; height: 48px; background: #f4f6fb; border-radius: 18px; margin: auto auto 15px; color: #a1b2d3; }
.empty h3 { color: #8794aa; font-weight: 500; font-size: 13px; }
.empty p { color: #aab3c2; font-size: 11px; margin: 10px auto 0; max-width: 370px; }
.local-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 23px; }
.local-filters label { display: flex; flex-direction: column; gap: 8px; font-size: 10px; color: #8d9aaf; }
.local-filters select, .local-filters input { font-size: 11px; padding: 10px; height: 36px; }
.local-filters input { min-width: 220px; }
.local-filters .muted { margin-bottom: 10px; }
.funnel-step { display: flex; align-items: center; gap: 20px; padding: 22px 28px; border-bottom: 1px solid #f1f4f8; }
.funnel-step:last-child { border-bottom: 0; margin-bottom: 10px; }
.step-index { font-size: 13px; color: #a1b0c9; }
.step-label { width: 160px; flex-shrink: 0; }
.step-label h3 { color: #667797; font-size: 13px; }
.step-label span { display: block; margin-top: 7px; color: #a2adbd; font-size: 10px; }
.funnel-bar { flex: 1; background: #f6f8fc; height: 40px; border-radius: 6px; overflow: hidden; }
.funnel-bar i { display: block; height: 100%; background: linear-gradient(90deg, #dce5f6, #91a8d3); border-radius: 6px; }
.step-value { display: flex; flex-direction: column; width: 65px; text-align: right; gap: 4px; }
.step-value b { font-size: 21px; font-weight: 500; color: var(--blue); }
.step-value small { color: #9daac0; font-size: 10px; }
.insight-note { border-left: 2px solid #b7c8e8; padding: 4px 22px; margin: 4px 0 25px; }
.insight-note h3 { color: #6e82a4; font-size: 13px; font-weight: 500; }
.insight-note p { color: #98a4b8; font-size: 11px; margin-top: 9px; }
.retention-cell { display: block; padding: 10px; background: rgba(72, 104, 173, calc(var(--level) * .23)); border-radius: 5px; min-width: 80px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 11px; color: #a0aabd; margin: -8px 4px 25px; }
.pager > div { display: flex; gap: 8px; }
.pager button { font-size: 11px; padding: 7px 13px; }
.settings-form { padding: 15px 26px 25px; }
.settings-form .field { margin-top: 20px; }
.settings-form > button { margin: 6px 7px 0 0; }
.switch-row { display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 12px 0 20px; border-bottom: 1px solid var(--line); }
.switch-row b { font-size: 12px; color: #738099; font-weight: 500; }
.switch-row small { display: block; margin-top: 7px; color: #a2adbf; font-size: 10px; }
input[type=checkbox] { appearance: none; width: 34px; height: 20px; border-radius: 20px; background: #dce2ec; position: relative; flex-shrink: 0; cursor: pointer; }
input[type=checkbox]::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; background: white; border-radius: 50%; transition: transform .15s; }
input[type=checkbox]:checked { background: var(--blue); }
input[type=checkbox]:checked::after { transform: translateX(14px); }
input:disabled, textarea:disabled, select:disabled { opacity: .6; }
.danger { color: var(--red); }
.primary.danger { background: var(--red); color: white; }
.loading { padding: 80px 30px; text-align: center; color: #9ba8bd; font-size: 12px; }
.loading span { display: block; border: 2px solid #e1e8f6; border-top-color: #8ba3d0; width: 23px; height: 23px; border-radius: 50%; margin: 0 auto 15px; animation: spin 1s linear infinite; }
.error-state { text-align: center; padding: 65px 20px; color: #8c97ac; }
.error-state h2 { font-weight: 500; }
.error-state p { font-size: 12px; margin: 15px 0 25px; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding: 20px 2px 8px; font-size: 9px; color: #acb5c3; }
.journey-filter { overflow-wrap: anywhere; font-size: 11px; padding: 0 0 18px; color: #8c9cb6; }
#toast { position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 15px); background: #34445d; color: white; padding: 12px 24px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: 90vw; font-size: 12px; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(90vw, 650px); max-height: 85vh; color: var(--ink); background: white; }
dialog::backdrop { background: #26334855; backdrop-filter: blur(3px); }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 27px; border-bottom: 1px solid var(--line); }
.detail-heading p { font-size: 11px; color: #9aa5b8; margin-bottom: 7px; }
.icon-button { border: 0; background: #f4f6fa; color: #8d9ab0; border-radius: 50%; width: 32px; height: 32px; font-size: 21px; }
.detail-body { padding: 24px 27px; }
.detail-summary { color: #99a4b7; font-size: 11px; }
.detail-summary .badge { margin-right: 8px; }
.detail-summary p { margin-top: 8px; }
.detail-body .settings-form { padding: 0; }
.detail-body h3 { margin: 26px 0 12px; }
.detail-body .table-wrap { padding: 0; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
/* Quiet hierarchy must remain readable, particularly for Chinese labels and data tables. */
.app-chooser section > p, .app-card p, .metric > span, .metric small, .panel-heading p,
.global-filters label, .local-filters label, .scope-note, .footnote, .switch-row small,
.observations small, .insight-note p, .step-label span, .step-value small, .muted,
.detail-summary, td small, th, .props, .pager { color: var(--muted); font-size: 12px; }
table, .app-card-link, .switch-row b { font-size: 13px; }
.app-chooser > section, .login-form-wrap form { animation: enter .45s ease both; }
.app-card { animation: enter .45s ease both; }
.app-card:nth-child(2) { animation-delay: .07s; }
.app-card:nth-child(3) { animation-delay: .14s; }
@keyframes enter { from { opacity: .5; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1550px) { .page { padding-top: 50px; } .metric { padding: 30px 35px; } }
@media (max-width: 1150px) { .sidebar { width: 190px; padding: 28px 14px; } .main { margin-left: 190px; } .page { padding: 28px 26px; } .topbar { padding: 0 26px; } .metric { padding: 22px 18px; } .metric strong { font-size: 32px; } .two-column { grid-template-columns: 1fr; gap: 0; } .global-filters { gap: 9px; } .login-story { padding: 45px; } }
@media (max-width: 760px) {
  .app-chooser { padding: 25px 22px; } .app-chooser > header { align-items: flex-start; } .app-chooser .brand b { font-size: 12px; } .app-chooser .account { flex-wrap: wrap; justify-content: flex-end; max-width: 130px; } .app-chooser > section { margin-top: 70px; } .app-chooser h1 { font-size: 27px; } .app-grid { grid-template-columns: 1fr; }
  .app-switcher { margin: 15px 0 0; display: block; } .app-switcher > small, .app-switcher > span { display: inline; margin-right: 15px; } .app-switcher > strong { margin-right: 15px; }
  .workspace { display: block; } .sidebar { position: relative; width: 100%; padding: 20px 20px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand-mark { width: 32px; height: 32px; border-radius: 11px 11px 11px 4px; font-size: 16px; }
  .sidebar .brand small, .nav-label, .sidebar-footer { display: none; }
  nav { flex-direction: row; overflow-x: auto; margin-top: 17px; gap: 6px; }
  nav a { flex-shrink: 0; padding: 9px 11px; font-size: 11px; gap: 6px; }
  nav svg { width: 15px; height: 15px; } nav a:last-child { margin-top: 0; }
  .main { margin-left: 0; } .topbar { height: 52px; padding: 0 20px; } .account { font-size: 10px; gap: 6px; }
  .page { padding: 28px 18px 18px; } .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 21px; }
  h1 { font-size: 26px; } .heading-actions { align-self: flex-end; } .heading-actions .subtle { font-size: 10px; padding: 8px 10px; }
  .global-filters { padding: 16px 12px; gap: 10px; } .global-filters label { flex: 1 1 110px; } .global-filters label input, .global-filters label select { width: 100%; }
  .date-divider { display: none; } .global-filters .primary { flex: 1 1 110px; }
  .metrics, .metrics.three { grid-template-columns: repeat(2, 1fr); } .metrics.three .metric:last-child { grid-column: 1 / -1; }
  .metric { padding: 19px; } .metric strong { font-size: 32px; } .panel-heading { padding: 22px 19px 15px; }
  .panel-heading p { max-width: 240px; } .legend { display: none; } .table-wrap { padding: 0 9px 10px; }
  .cloud-strip { gap: 18px; } .cloud-strip > span { flex-basis: 100%; }
  .observations { grid-template-columns: 1fr; gap: 26px; padding: 10px 22px 28px; } .observations div { gap: 6px; }
  .observations strong { font-size: 27px; } .funnel-step { flex-wrap: wrap; padding: 18px; gap: 10px; } .step-label { flex: 1; width: auto; } .funnel-bar { order: 4; flex-basis: 100%; height: 25px; }
  .local-filters { gap: 10px; } .local-filters label { flex: 1 1 160px; } .local-filters input { min-width: 0; } .local-filters .muted { flex-basis: 100%; margin-top: 3px; }
  .page-footer { line-height: 1.8; } .page-footer > span { display: none; }
  .login-layout { grid-template-columns: 1fr; } .login-story { padding: 28px; min-height: 275px; }
  .login-headline { margin-top: 35px; } .login-headline h1 { font-size: 31px; line-height: 1.35; }
  .login-headline > p, .orbit, .login-footer { display: none; } .login-form-wrap { padding: 32px 28px 50px; }
  .detail-heading, .detail-body { padding: 20px; } .settings-form { padding: 10px 20px 23px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
