/* ERP 全局换装 2026：飞书、Notion 那种浅色办公风（浅灰底、白卡片轻阴影、飞书蓝主色、彩色小图标块、图表） */

:root {
  --xh-primary: #3370FF;
  --xh-primary-hover: #4E83FD;
  --xh-primary-press: #245BDB;
  --xh-primary-soft: #F0F4FF;
  --xh-brand: #F5871F;
  --xh-ink: #1F2329;
  --xh-ink-2: #646A73;
  --xh-ink-3: #8F959E;
  --xh-line: #DEE0E3;
  --xh-line-soft: #EBEDF0;
  --xh-ground: #F5F6F7;
  --xh-surface: #FFFFFF;
  --xh-fill: #F2F3F5;
  --xh-hover: #EFF0F1;
  --xh-up: #2EA121;
  --xh-down: #F54A45;
  --xh-radius-card: 12px;
  --xh-shadow-card: 0 1px 2px rgba(31, 35, 41, 0.04), 0 2px 8px rgba(31, 35, 41, 0.05);
  --xh-shadow-hover: 0 6px 20px rgba(31, 35, 41, 0.10);
  --xh-shadow-pop: 0 8px 24px rgba(31, 35, 41, 0.12);
  --xh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;

  /* 旧变量接上新色 */
  --bg-base: var(--xh-ground);
  --bg-card: var(--xh-surface);
  --bg-header: var(--xh-surface);
  --text-primary: var(--xh-ink);
  --text-regular: var(--xh-ink-2);
  --text-secondary: var(--xh-ink-3);
  --border-light: var(--xh-line-soft);
  --border-base: var(--xh-line);
  --shadow-card: var(--xh-shadow-card);

  /* Element Plus */
  --el-font-family: var(--xh-font);
  --el-color-primary: #3370FF;
  --el-color-primary-light-3: #709BFF;
  --el-color-primary-light-5: #99B8FF;
  --el-color-primary-light-7: #C2D4FF;
  --el-color-primary-light-8: #D6E2FF;
  --el-color-primary-light-9: #EBF1FF;
  --el-color-primary-dark-2: #295ACC;
  --el-color-success: #2EA121;
  --el-color-success-light-3: #6DBD64;
  --el-color-success-light-5: #97D090;
  --el-color-success-light-7: #C0E3BC;
  --el-color-success-light-8: #D5ECD3;
  --el-color-success-light-9: #EAF6E9;
  --el-color-success-dark-2: #25811A;
  --el-color-warning: #ED6D0C;
  --el-color-warning-light-3: #F29955;
  --el-color-warning-light-5: #F6B686;
  --el-color-warning-light-7: #FAD3B6;
  --el-color-warning-light-8: #FBE2CE;
  --el-color-warning-light-9: #FDF0E7;
  --el-color-warning-dark-2: #BE570A;
  --el-color-danger: #F54A45;
  --el-color-danger-light-3: #F8807D;
  --el-color-danger-light-5: #FAA5A2;
  --el-color-danger-light-7: #FCC9C7;
  --el-color-danger-light-8: #FDDBDA;
  --el-color-danger-light-9: #FEEDEC;
  --el-color-danger-dark-2: #C43B37;
  --el-color-error: #F54A45;
  --el-color-info: #8F959E;
  --el-color-info-light-3: #B1B5BB;
  --el-color-info-light-5: #C7CACF;
  --el-color-info-light-7: #DDDFE2;
  --el-color-info-light-8: #E9EAEC;
  --el-color-info-light-9: #F4F4F5;
  --el-color-info-dark-2: #72777E;
  --el-text-color-primary: var(--xh-ink);
  --el-text-color-regular: var(--xh-ink);
  --el-text-color-secondary: var(--xh-ink-2);
  --el-text-color-placeholder: var(--xh-ink-3);
  --el-border-color: #D0D3D6;
  --el-border-color-light: var(--xh-line);
  --el-border-color-lighter: var(--xh-line-soft);
  --el-border-color-extra-light: #F2F3F5;
  --el-border-color-hover: #B8BBBF;
  --el-fill-color: var(--xh-fill);
  --el-fill-color-light: var(--xh-ground);
  --el-fill-color-lighter: #FAFAFB;
  --el-fill-color-blank: var(--xh-surface);
  --el-bg-color-page: var(--xh-ground);
  --el-border-radius-base: 6px;
  --el-border-radius-small: 4px;
  --el-border-radius-round: 20px;
  --el-font-size-base: 14px;
  --el-box-shadow-light: 0 4px 16px rgba(31, 35, 41, 0.08);
  --el-box-shadow: var(--xh-shadow-pop);
}

body.dark-mode {
  --xh-primary-soft: #1B2A4A;
  --xh-ink: #E6E8EB;
  --xh-ink-2: #A6ABB2;
  --xh-ink-3: #7C8189;
  --xh-line: #373C43;
  --xh-line-soft: #2D3137;
  --xh-ground: #17191C;
  --xh-surface: #202328;
  --xh-fill: #2A2E33;
  --xh-hover: #2A2E33;
  --xh-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========== 基础 ========== */
html, body, #app {
  font-family: var(--xh-font);
  font-size: 14px;
  line-height: 1.57;
  background: var(--xh-ground);
  color: var(--xh-ink);
  -webkit-font-smoothing: antialiased;
}
body { caret-color: var(--xh-primary); }
::selection { background: rgba(51, 112, 255, 0.18); }
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not(input):not(textarea):focus-visible {
  outline: 2px solid rgba(51, 112, 255, 0.5);
  outline-offset: 2px;
}
html { scrollbar-color: #C9CDD4 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #C9CDD4; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #A9AEB8; }
::-webkit-scrollbar-track { background: transparent; }
.el-table, .kpi-value, .wb-stat-value, .dash-rate-value, .el-statistic, .el-pagination { font-variant-numeric: tabular-nums; }

/* ========== 顶栏 ========== */
.app-header {
  height: 56px !important;
  background: var(--xh-surface);
  border-bottom: 1px solid var(--xh-line);
  box-shadow: none;
}
.header-inner { height: 56px; max-width: 1440px; padding: 0 24px; gap: 24px; }
.brand img { height: 26px !important; }
.brand-text { background: none; -webkit-text-fill-color: currentColor; color: var(--xh-ink); }
.nav { gap: 4px; align-items: center; }
.nav > * { flex-shrink: 0; }
.nav .el-dropdown { display: inline-flex; align-items: center; }
.nav .nav-link,
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  color: var(--xh-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  outline: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link .el-icon { font-size: 12px; color: var(--xh-ink-3); }
.nav-link:hover,
.nav-link.router-link-exact-active { color: var(--xh-primary); background: var(--xh-fill); border: none; }
.nav-link:hover .el-icon { color: var(--xh-primary); }
.header-inner > .el-badge,
.header-inner .el-badge.el-tooltip__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--xh-ink-2);
  transition: background-color 0.15s ease;
}
.header-inner > .el-badge:hover,
.header-inner .el-badge.el-tooltip__trigger:hover { background: var(--xh-fill); color: var(--xh-ink); }
.header-inner .el-badge .el-icon { font-size: 18px !important; }
.app-header .el-badge__content { border: 2px solid var(--xh-surface); }
.user-chip { padding: 4px 8px 4px 4px; border-radius: 6px; color: var(--xh-ink-2); }
.user-chip:hover { background: var(--xh-fill); }
.avatar { background: var(--xh-primary) !important; font-weight: 600; }
.nickname { font-size: 14px; color: var(--xh-ink); }

/* 工作区大菜单 */
.workspace-menu-popper.el-popover.el-popper { border-radius: 12px; padding: 16px 18px; border-color: var(--xh-line-soft); box-shadow: var(--xh-shadow-pop); }
.workspace-menu-toggle { border-color: var(--xh-fill); border-radius: 6px; background: var(--xh-fill); }
.workspace-menu-toggle button { border-radius: 4px; }
.workspace-menu-toggle button.active { background: var(--xh-surface); color: var(--xh-ink); box-shadow: 0 1px 3px rgba(31, 35, 41, 0.12); }
.workspace-menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.workspace-menu-col { padding: 10px 8px 6px; border-radius: 10px; background: var(--xh-ground); }
.workspace-menu-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 0 4px; color: var(--xh-ink); font-size: 13px; font-weight: 600; border-bottom: none; }
.workspace-menu-title .wb-icon-tile { width: 24px; height: 24px; flex-basis: 24px; font-size: 13px; border-radius: 6px; }
.workspace-menu-item { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 8px; border-radius: 6px; color: var(--xh-ink); font-size: 13px; line-height: 20px; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.workspace-menu-item-icon { flex: 0 0 auto; color: var(--xh-ink-3); font-size: 15px; transition: color .15s ease; }
.workspace-menu-item:hover, .workspace-menu-item:focus-visible { color: var(--xh-primary); background: var(--xh-surface); box-shadow: 0 1px 3px rgba(31, 35, 41, 0.10); outline: none; }
.workspace-menu-item:hover .workspace-menu-item-icon, .workspace-menu-item:focus-visible .workspace-menu-item-icon { color: var(--xh-primary); }
body.dark-mode .workspace-menu-col { background: var(--xh-fill); }
.el-dropdown-menu__item .el-icon { color: var(--xh-ink-3); }
.el-dropdown-menu__item:not(.is-disabled):hover .el-icon, .el-dropdown-menu__item:not(.is-disabled):focus .el-icon { color: var(--xh-primary); }
@media (max-width: 768px) {
  .workspace-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* ========== 标签栏 ========== */
.tab-bar { background: var(--xh-ground); border-bottom: none; padding: 10px 24px 0; min-height: 40px; }
.tab-list { gap: 4px; }
.tab-item {
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 6px;
  color: var(--xh-ink-2);
  gap: 6px;
}
.tab-item:hover { background: var(--xh-hover); color: var(--xh-ink); }
.tab-item.active {
  background: var(--xh-surface);
  color: var(--xh-primary);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.08), 0 0 0 1px var(--xh-line-soft);
}
.tab-close { width: 16px; height: 16px; font-size: 12px; opacity: 0.6; }
.tab-close:hover { opacity: 1; background: var(--xh-hover); }
.tab-action-icon:hover { color: var(--xh-primary); background: var(--xh-primary-soft); }

/* ========== 主区与页面卡片 ========== */
.app-main { max-width: min(1440px, calc(100vw - 24px)); padding: 12px 24px 28px !important; }
.app-footer { color: var(--xh-ink-3); font-size: 12px; }
.page-card {
  border-radius: var(--xh-radius-card);
  border: 1px solid var(--xh-line-soft);
  box-shadow: var(--xh-shadow-card);
  padding: 20px 24px;
}
.page-card > h2:first-child,
.page-card h2 { color: var(--xh-ink); font-size: 20px; font-weight: 600; line-height: 1.4; }
.page-card .el-table__body tr.el-table__row:hover > td.el-table__cell { background-color: var(--xh-ground); }

/* ========== 组件 ========== */
.el-button { font-weight: 500; }
.el-button--default:not(.is-link):not(.is-text) {
  --el-button-text-color: var(--xh-ink);
  --el-button-border-color: #D0D3D6;
  --el-button-hover-text-color: var(--xh-ink);
  --el-button-hover-bg-color: var(--xh-fill);
  --el-button-hover-border-color: #D0D3D6;
  --el-button-active-bg-color: #E4E6E9;
  --el-button-active-border-color: #C4C7CB;
}
.el-button--primary {
  --el-button-hover-bg-color: var(--xh-primary-hover);
  --el-button-hover-border-color: var(--xh-primary-hover);
  --el-button-active-bg-color: var(--xh-primary-press);
  --el-button-active-border-color: var(--xh-primary-press);
}
.el-input__wrapper.is-focus, .el-select__wrapper.is-focused, .el-textarea__inner:focus {
  box-shadow: 0 0 0 1px var(--xh-primary) inset, 0 0 0 3px rgba(51, 112, 255, 0.14);
}
.el-select-dropdown__item.is-selected, .el-select-dropdown__item.selected { color: var(--xh-primary); font-weight: 500; }
.el-popper.is-light { border-color: var(--xh-line-soft); box-shadow: var(--xh-shadow-pop); }
.el-popover.el-popper { border-radius: 10px; }
.el-dropdown-menu { padding: 4px; }
.el-dropdown-menu__item { border-radius: 4px; font-size: 14px; }
.el-dropdown-menu__item:not(.is-disabled):hover,
.el-dropdown-menu__item:not(.is-disabled):focus { background: var(--xh-fill); color: var(--xh-ink); }
.el-select-dropdown { border-radius: 8px; }

.el-table {
  --el-table-header-bg-color: var(--xh-ground);
  --el-table-header-text-color: var(--xh-ink-2);
  --el-table-text-color: var(--xh-ink);
  --el-table-border-color: var(--xh-line-soft);
  --el-table-row-hover-bg-color: var(--xh-ground);
  --el-table-current-row-bg-color: var(--xh-primary-soft);
}
.el-table th.el-table__cell { font-weight: 500; }
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell { background: #FAFAFB; }

.el-dialog { border-radius: 12px; box-shadow: var(--xh-shadow-pop); }
.el-dialog__title { font-size: 16px; font-weight: 600; color: var(--xh-ink); }
.el-message-box { border-radius: 12px; }
.el-card { --el-card-border-radius: var(--xh-radius-card); --el-card-border-color: var(--xh-line-soft); }
.el-card.is-always-shadow, .el-card.is-hover-shadow:hover { box-shadow: var(--xh-shadow-card); }
.el-message { border-radius: 8px; box-shadow: var(--el-box-shadow-light); }
.el-notification { border-radius: 12px; }
.el-alert { border-radius: 8px; }
.el-tag { border-radius: 4px; }
.el-tabs__item { font-weight: 500; }
.el-tabs__item:hover { color: var(--xh-primary); }

/* 分段按钮：灰底白块 */
.el-radio-group:has(> .el-radio-button) { background: var(--xh-fill); border-radius: 6px; padding: 2px; }
.el-radio-group:has(> .el-radio-button) .el-radio-button__inner {
  background: transparent;
  border: none;
  border-radius: 4px !important;
  box-shadow: none !important;
  color: var(--xh-ink-2);
  font-weight: 500;
}
.el-radio-group:has(> .el-radio-button) .el-radio-button:hover .el-radio-button__inner { color: var(--xh-ink); }
.el-radio-group:has(> .el-radio-button) .el-radio-button__original-radio:checked + .el-radio-button__inner,
.el-radio-group:has(> .el-radio-button) .el-radio-button.is-active .el-radio-button__inner {
  background: var(--xh-surface);
  color: var(--xh-primary);
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.14) !important;
}

/* ========== 登录页 ========== */
.auth-page { background: var(--xh-ground); }
.auth-card { border-radius: 12px; border: 1px solid var(--xh-line-soft); box-shadow: var(--xh-shadow-pop); padding: 40px; }
.auth-card h1 { background: none; -webkit-text-fill-color: currentColor; color: var(--xh-ink); font-weight: 600; }
.auth-card .subtitle { color: var(--xh-ink-2); }
.auth-switch a { color: var(--xh-primary); }

/* ========== 彩色小图标块 ========== */
.wb-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
  font-size: 17px;
}
.tone-blue { background: #E1EAFF; color: #3370FF; }
.tone-orange { background: #FEEAD2; color: #ED6D0C; }
.tone-green { background: #D9F5D6; color: #2EA121; }
.tone-red { background: #FDE2E2; color: #F54A45; }
.tone-purple { background: #EFE6FE; color: #7F3BF5; }
.tone-teal { background: #D5F6F2; color: #04A38D; }
body.dark-mode .tone-blue { background: rgba(51, 112, 255, 0.18); }
body.dark-mode .tone-orange { background: rgba(237, 109, 12, 0.18); }
body.dark-mode .tone-green { background: rgba(46, 161, 33, 0.18); }
body.dark-mode .tone-red { background: rgba(245, 74, 69, 0.18); }
body.dark-mode .tone-purple { background: rgba(127, 59, 245, 0.2); }
body.dark-mode .tone-teal { background: rgba(4, 163, 141, 0.18); }

/* ========== 首页 ========== */
.wb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 16px;
  padding: 24px 28px;
  border-radius: var(--xh-radius-card);
  border: 1px solid var(--xh-line-soft);
  box-shadow: var(--xh-shadow-card);
  background: linear-gradient(100deg, #E8F0FF 0%, #F3F7FF 42%, #FFFFFF 78%);
}
body.dark-mode .wb-hero { background: var(--xh-surface); }
.wb-hero-main { min-width: 0; }
.wb-hero-hello { font-size: 24px; font-weight: 600; color: var(--xh-ink); line-height: 1.35; }
.wb-hero-date { margin-top: 4px; font-size: 13px; color: var(--xh-ink-2); }
.wb-hero-quote {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 16px;
  padding: 6px 8px 6px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--xh-line-soft);
  max-width: 100%;
}
.wb-hero-quote-text { font-size: 14px; color: var(--xh-ink); }
.wb-hero-quote-tools { display: inline-flex; align-items: center; gap: 2px; }
.wb-hero-quote-tools .el-button { margin: 0; }
.wb-hero-quote-tools .el-button.is-locked { color: var(--xh-primary); background: var(--xh-primary-soft); }

.wb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.wb-stat {
  position: relative;
  padding: 16px 18px 8px;
  border-radius: var(--xh-radius-card);
  background: var(--xh-surface);
  border: 1px solid var(--xh-line-soft);
  box-shadow: var(--xh-shadow-card);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  min-width: 0;
}
.wb-stat:hover { box-shadow: var(--xh-shadow-hover); }
.wb-stat.is-static { cursor: default; }
.wb-stat.is-static:hover { box-shadow: var(--xh-shadow-card); }
.wb-stat-top { display: flex; align-items: center; gap: 10px; }
.wb-stat-label { font-size: 14px; color: var(--xh-ink-2); }
.wb-stat-value { margin-top: 10px; font-size: 28px; font-weight: 600; line-height: 1.2; color: var(--xh-ink); letter-spacing: -0.01em; }
.wb-stat-value small { margin-left: 4px; font-size: 13px; font-weight: 500; color: var(--xh-ink-2); letter-spacing: 0; }
.wb-stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 12px; }
.wb-stat-spark { height: 40px; margin: 6px -6px 0; }
.is-up { color: var(--xh-up); font-weight: 500; }
.is-down { color: var(--xh-down); font-weight: 500; }
.wb-muted { color: var(--xh-ink-3); font-size: 12px; }

.wb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.wb-span-2 { grid-column: span 2; }
.wb-card {
  padding: 16px 20px;
  border-radius: var(--xh-radius-card);
  background: var(--xh-surface);
  border: 1px solid var(--xh-line-soft);
  box-shadow: var(--xh-shadow-card);
  min-width: 0;
}
.wb-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 8px; min-height: 28px; }
.wb-card-head .el-radio-group { flex-wrap: nowrap; flex-shrink: 0; }
.wb-card-title { font-size: 15px; font-weight: 600; color: var(--xh-ink); }
.wb-card-foot { margin-top: 2px; text-align: center; font-size: 12px; color: var(--xh-ink-2); font-variant-numeric: tabular-nums; }
.wb-chart { width: 100%; }
.wb-chart-lg { height: 300px; }
.wb-chart-gauge { height: 262px; }

/* 待办数字卡：左边彩色图标块，右边数字 */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  min-height: 0;
  margin-bottom: 16px;
}
.dashboard-cards .kpi-card {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 4px 14px;
  min-height: 0;
  padding: 16px 18px;
  border: 1px solid var(--xh-line-soft);
  border-radius: var(--xh-radius-card);
  background: var(--xh-surface);
  box-shadow: var(--xh-shadow-card);
  transition: box-shadow 0.2s ease;
}
.dashboard-cards .kpi-card:hover { transform: none; box-shadow: var(--xh-shadow-hover); }
.dashboard-cards .kpi-card .kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  background: #E1EAFF;
  color: #3370FF;
}
.dashboard-cards .kpi-card .kpi-icon .el-icon { font-size: 20px !important; }
.dashboard-cards .kpi-orange .kpi-icon { background: #FEEAD2; color: #ED6D0C; }
.dashboard-cards .kpi-green .kpi-icon { background: #D9F5D6; color: #2EA121; }
.dashboard-cards .kpi-red .kpi-icon { background: #FDE2E2; color: #F54A45; }
.dashboard-cards .kpi-card .kpi-body { display: flex; flex-direction: column-reverse; flex: 1; min-width: 0; }
.dashboard-cards .kpi-card .kpi-label { margin: 0; font-size: 13px; color: var(--xh-ink-2); }
.dashboard-cards .kpi-card .kpi-value { font-size: 24px; font-weight: 600; line-height: 1.3; color: var(--xh-ink); }
.dashboard-cards .kpi-card .kpi-sub { flex-basis: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--xh-line-soft); font-size: 12px; color: var(--xh-ink-3); }
.dashboard-cards .kpi-skeleton-card { flex-direction: column; align-items: flex-start; min-height: 96px; }
/* 数字卡第一张：快速采集 */
.dashboard-cards .quick-collect-card { cursor: default; }
.dashboard-cards .quick-collect-card .el-checkbox { height: 20px; margin-right: 0; }
.dashboard-cards .quick-collect-row { display: flex; flex-basis: 100%; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--xh-line-soft); }
.dashboard-cards .quick-collect-row .el-input { flex: 1; min-width: 0; }
/* 首页最下面的「数据概览」（店铺数据） */
.dash-overview-title.wb-card-title { margin: 24px 0 12px; line-height: 1.4; }
.dashboard-cards .kpi-skeleton-card .skeleton-line { width: 100%; }

.dashboard-birthday-card,
.dashboard-shortcuts {
  margin-top: 0;
  padding: 16px 20px;
  border: 1px solid var(--xh-line-soft);
  border-radius: var(--xh-radius-card);
  background: var(--xh-surface);
  box-shadow: var(--xh-shadow-card);
}
.dashboard-birthday-card { margin-bottom: 16px; }
.dashboard-birthday-title { color: var(--xh-ink); font-size: 15px; font-weight: 600; }
.dashboard-birthday-subtitle { color: var(--xh-ink-3); }
.dashboard-birthday-person { border: 1px solid var(--xh-line-soft); border-radius: 10px; background: var(--xh-ground); }
.dashboard-birthday-person.is-today { border-color: #FAD3B6; background: #FDF0E7; }
.dashboard-birthday-person-name { color: var(--xh-ink); font-weight: 600; }
.dashboard-birthday-person-work, .dashboard-birthday-celebration { color: var(--xh-ink-3); }
.dashboard-birthday-date { color: var(--xh-ink-2); }
.dashboard-birthday-countdown { color: var(--xh-primary); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.dashboard-birthday-countdown.is-today { color: #ED6D0C; }
.dashboard-birthday-state { color: var(--xh-ink-3); }
.dashboard-birthday-missing { background: var(--xh-ground); color: var(--xh-ink-2); border-radius: 8px; }

.dash-section-title { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--xh-ink); }
.dash-card-title { font-size: 14px; font-weight: 600; color: var(--xh-ink); }
.dash-note-warn { font-size: 12px; color: var(--el-color-warning-dark-2); }
.dashboard-highlight-card { backdrop-filter: none; }
.dashboard-cleaning-card,
.dashboard-lottery-card,
.dashboard-lottery-result-card,
.dashboard-poll-card {
  background: var(--xh-surface) !important;
  border: 1px solid var(--xh-line-soft) !important;
  border-radius: var(--xh-radius-card) !important;
  box-shadow: var(--xh-shadow-card) !important;
}
.dashboard-highlight-note { color: var(--xh-ink-2); }
.dashboard-vote-option { background: var(--xh-surface); border-color: var(--xh-line-soft); border-radius: 8px; }
.dashboard-vote-option:hover { transform: none; border-color: var(--xh-line); box-shadow: none; }
.dashboard-vote-option.is-selected { border-color: var(--xh-primary); background: var(--xh-primary-soft); box-shadow: none; }
.dashboard-vote-option .dashboard-vote-result-head > span { color: var(--xh-primary); }
.dashboard-vote-result-item { border-radius: 8px; background: var(--xh-ground); border-color: var(--xh-line-soft); }
.dashboard-vote-result-head { color: var(--xh-ink); }
.dashboard-vote-bar { height: 8px; background: var(--xh-fill); }
.dashboard-vote-bar-fill { background: var(--xh-primary); }
.dashboard-vote-bar-fill.is-winner { background: var(--xh-brand); }

/* 公告 | 打扫轮值、投票 两栏 */
.wb-lower { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: stretch; }
.wb-lower-ann { grid-column: 1; grid-row: 1; min-width: 0; }
.wb-lower-side { grid-column: 2; grid-row: 1; min-width: 0; }
.wb-lower-ann > .dashboard-shortcuts { height: 100%; box-sizing: border-box; }
.wb-lower-side > .dashboard-highlight-card:first-child { margin-top: 0 !important; }
.wb-lower-side .dashboard-highlight-card > div,
.wb-lower-side .dashboard-highlight-header { flex-wrap: wrap; gap: 10px; }

.dash-rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.dash-rate {
  padding: 16px 18px 10px;
  border-radius: var(--xh-radius-card);
  background: var(--xh-surface);
  border: 1px solid var(--xh-line-soft);
  box-shadow: var(--xh-shadow-card);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.dash-rate:hover { box-shadow: var(--xh-shadow-hover); }
.dash-rate-pair { color: var(--xh-ink-2); font-size: 13px; }
.dash-rate-value { margin-top: 6px; color: var(--xh-ink); font-size: 24px; font-weight: 600; line-height: 1.25; }
.dash-rate-change { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; }
.dash-rate-change .is-up, .dash-rate-change .is-down { display: inline-flex; align-items: center; gap: 2px; }
.dash-rate-muted { color: var(--xh-ink-3); }
.dash-rate-chart { height: 48px; margin: 8px -6px 0; }

.dash-award {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  padding: 12px 14px;
  background: var(--xh-ground);
  border: 1px solid var(--xh-line-soft);
  border-radius: 10px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.dash-award-history { min-width: 200px; max-width: 300px; }
.dash-award:hover { box-shadow: var(--xh-shadow-card); background: var(--xh-surface); }
.dash-award-prize { margin-top: 4px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-award-prize.is-high { color: #ED6D0C; }
.dash-award-prize.is-mid { color: #3370FF; }
.dash-award-prize.is-base { color: #2EA121; }

.header-inner .account-perspective-select { width: 180px; }

/* 手机上顶栏分两行：第一行标志、消息、账号，第二行菜单（横着能滑） */
@media (max-width: 768px) {
  .app-header { height: auto !important; }
  .app-header .header-inner { height: auto; flex-wrap: wrap; column-gap: 8px; row-gap: 0; padding: 8px 12px 0; }
  .header-inner > .brand { margin-right: auto; }
  .header-inner > .nav { order: 10; flex: 1 0 100%; height: 40px; margin: 0 -4px; }
  .header-inner .account-perspective-select { width: 128px; }
}

/* 手机上的「建议电脑使用」提示框 */
@media (max-width: 767px) {
  .mobile-warning-modal { border-radius: 12px; box-shadow: var(--xh-shadow-pop); }
  .mobile-warning-title { color: var(--xh-ink); }
  .mobile-warning-body { color: var(--xh-ink-2); font-size: 14px; }
  .mobile-warning-primary { background: var(--xh-primary); }
  .mobile-warning-primary:active { background: var(--xh-primary-press); }
  .mobile-warning-secondary { border-color: #D0D3D6; color: var(--xh-ink); }
  .mobile-warning-secondary:active, .mobile-warning-copy:active { background: var(--xh-fill); }
  .mobile-warning-url-box { border-color: #C2D4FF; background: var(--xh-primary-soft); }
  .mobile-warning-url-label { color: var(--xh-primary-press); }
  .mobile-warning-copy { border-color: #C2D4FF; color: var(--xh-primary); }
}

@media (max-width: 1200px) {
  .wb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-grid { grid-template-columns: 1fr; }
  .wb-span-2 { grid-column: auto; }
}
@media (max-width: 860px) {
  .wb-lower { grid-template-columns: 1fr; }
  .wb-lower-ann, .wb-lower-side { grid-column: auto; grid-row: auto; }
  .wb-hero { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .header-inner { padding: 0 12px; gap: 12px; }
  .tab-bar { padding: 8px 12px 0; }
  .app-main { padding: 10px 10px 24px !important; }
  .page-card { padding: 16px; }
}
@media (max-width: 560px) {
  .wb-stats { gap: 10px; }
  .wb-stat { padding: 12px 12px 6px; }
  .wb-stat-top { gap: 8px; }
  .wb-stat-label { font-size: 13px; }
  .wb-stat-value { font-size: 21px; }
  .wb-stat-foot { flex-direction: column; align-items: flex-start; gap: 0; }
  .wb-hero-hello { font-size: 20px; }
  .wb-chart-lg { height: 260px; }
  .dashboard-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dashboard-cards .quick-collect-card { grid-column: 1 / -1; }
  .dashboard-cards .kpi-card { padding: 12px; gap: 4px 10px; }
  .dashboard-cards .kpi-card .kpi-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .dashboard-cards .kpi-card .kpi-value { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .wb-stat, .kpi-card, .dash-rate, .dash-award, .nav-link { transition: none !important; }
}

/* ========== 通用图表卡片（智能利润报表起用，全站页面共用） ========== */
.pf-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; }
.pf-kpis.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-kpis.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-kpi { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 16px 18px 10px; border-radius: var(--xh-radius-card); background: var(--xh-surface); border: 1px solid var(--xh-line-soft); box-shadow: var(--xh-shadow-card); cursor: pointer; outline: none; transition: box-shadow .2s ease; }
.pf-kpi:hover { box-shadow: var(--xh-shadow-hover); }
.pf-kpi:focus-visible { box-shadow: 0 0 0 2px rgba(51, 112, 255, .35), var(--xh-shadow-card); }
.pf-kpi.is-disabled, .pf-kpi.is-static { cursor: default; }
.pf-kpi.is-disabled:hover, .pf-kpi.is-static:hover { box-shadow: var(--xh-shadow-card); }
.pf-kpi-top { display: flex; align-items: center; gap: 10px; }
.pf-kpi-label { font-size: 14px; color: var(--xh-ink-2); }
.pf-kpi-value { margin-top: 10px; font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--xh-ink); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.pf-kpi-value small { margin-left: 4px; font-size: 13px; font-weight: 500; color: var(--xh-ink-2); letter-spacing: 0; }
.pf-kpi-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; margin-top: 6px; font-size: 12px; color: var(--xh-ink-3); }
.pf-kpi-sub span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-kpi-sub span + span { flex: 0 0 auto; white-space: nowrap; }
.pf-kpi-chart { height: 46px; margin: 8px -6px 0; }
.pf-kpi-segments { margin-top: 14px; }
.pf-seg-bar { display: flex; gap: 2px; height: 10px; overflow: hidden; border-radius: 5px; background: var(--xh-fill); }
.pf-seg-bar i { display: block; height: 100%; }
.pf-seg-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 11px; color: var(--xh-ink-2); }
.pf-seg-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; }
.pf-delta-neutral { color: var(--xh-ink-2); font-weight: 500; }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.pf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-span-2 { grid-column: span 2; }
.pf-span-3 { grid-column: 1 / -1; }
.pf-card { display: flex; flex-direction: column; min-width: 0; padding: 16px 20px; }
.pf-card .wb-card-head { margin-bottom: 10px; }
.pf-head-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pf-head-title .wb-icon-tile { width: 28px; height: 28px; flex-basis: 28px; font-size: 15px; border-radius: 7px; }
.pf-head-num { font-size: 16px; font-weight: 600; color: var(--xh-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--xh-line-soft); font-size: 12px; color: var(--xh-ink-2); }
.pf-card-foot strong { margin-left: 4px; color: var(--xh-ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.pf-link { margin-left: auto; padding: 0; border: 0; background: transparent; color: var(--xh-primary); font: inherit; font-size: 12px; cursor: pointer; }
.pf-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pf-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pf-chip.is-profit { background: #D9F5D6; color: #237B19; }
.pf-chip.is-loss { background: #FDE2E2; color: #D83931; }
.pf-chip.is-neutral { background: var(--xh-fill); color: var(--xh-ink-2); }
.pf-chart-donut { height: 196px; }
.pf-chart-md { height: 280px; }
.pf-chart-sm { height: 220px; }
.pf-donut-wrap { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); align-items: center; gap: 12px; }
.pf-legend { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pf-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 44px; align-items: center; gap: 8px; min-height: 26px; padding: 2px 6px; border-radius: 6px; font-size: 12px; color: var(--xh-ink-2); cursor: pointer; outline: none; }
.pf-legend li:hover, .pf-legend li:focus-visible { background: var(--xh-ground); color: var(--xh-ink); }
.pf-legend i { width: 10px; height: 10px; border-radius: 3px; }
.pf-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-legend strong { color: var(--xh-ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-legend em { color: var(--xh-ink-3); font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.pf-mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.pf-mini-stat { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 16px 18px; border-radius: var(--xh-radius-card); background: var(--xh-surface); border: 1px solid var(--xh-line-soft); box-shadow: var(--xh-shadow-card); }
.pf-mini-stat > div { min-width: 0; }
.pf-mini-stat > div > span, .pf-mini-stat small { display: block; font-size: 12px; color: var(--xh-ink-3); }
.pf-mini-stat strong { display: block; margin: 4px 0 2px; font-size: 20px; font-weight: 600; color: var(--xh-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-visual { display: grid; place-items: center; min-height: 160px; color: var(--xh-ink-3); font-size: 12px; }
@media (max-width: 1280px) {
  .pf-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-grid, .pf-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-span-2 { grid-column: 1 / -1; }
  .pf-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pf-kpis, .pf-kpis.is-4, .pf-kpis.is-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pf-kpi { padding: 14px 14px 8px; }
  .pf-kpi-value { font-size: 20px; }
  .pf-kpi-sub { flex-wrap: wrap; gap: 2px 8px; }
  .pf-grid, .pf-grid-2, .pf-grid-3 { grid-template-columns: 1fr; gap: 12px; }
  .pf-span-2, .pf-span-3 { grid-column: auto; }
  .pf-card { padding: 14px; }
  .pf-donut-wrap { grid-template-columns: 1fr; }
  .pf-mini-stats { gap: 10px; }
  .pf-mini-stat { padding: 14px; }
  .pf-mini-stat strong { font-size: 17px; }
}
@media (max-width: 480px) {
  .pf-kpi { padding: 12px 12px 6px; }
  .pf-kpi-value { font-size: 18px; margin-top: 8px; }
  .pf-kpi-chart { height: 38px; }
  .pf-mini-stats { grid-template-columns: 1fr; }
}
