/* 大合物业管理系统 · corporate-trust 流派（蓝白商务配色）
   设计令牌：商务蓝主色 + 白 + 淡蓝；次要区域保留暖书页色
   硬指标：正文≥16px、按钮≥44px、行高≥1.5、对比度≥4.5:1 */

/* 主题：默认商务蓝（保留）+ 4套 Cloudreve 官方主题色 */
:root, [data-theme="blue"] {
  --scale: 1;
  --paper: #eef3f8;
  --surface: #ffffff;
  --surface-2: #e6eef6;
  --paper-warm: #f3f6fa;   /* Fluent 冷灰白，替代原来的暖米色 */
  --ink: #12283f;
  --ink-soft: #3b5470;
  --ink-mute: #6b8399;
  --accent: #1769aa;
  --accent-deep: #0e4c7d;
  --accent-soft: #dcebf7;
  --gold: #a8722f;
  --danger: #a83a2f;
  --line: rgba(18, 40, 63, 0.13);
  --line-strong: rgba(18, 40, 63, 0.26);
  /* 微软 Fluent 通透蓝：亮蓝起手 + 大面积冷调，避免深蓝压迫感 */
  --hero-grad: #1d1d1f;
}
[data-theme="indigo"] { /* Cloudreve 默认靛蓝 #3f51b5 */
  --paper: #eef0f8; --surface: #ffffff; --surface-2: #e6e9f7; --paper-warm: #f4f5fa;
  --ink: #1a1f3c; --ink-soft: #454a70; --ink-mute: #73789c;
  --accent: #3f51b5; --accent-deep: #2c3a91; --accent-soft: #e0e5f7;
  --gold: #a8722f; --line: rgba(26,31,60,0.13); --line-strong: rgba(26,31,60,0.26);
  --hero-grad: #1d1d1f;
}
[data-theme="cloudblue"] { /* Cloudreve #1976d2 */
  --paper: #eaf3fb; --surface: #ffffff; --surface-2: #dfedfa; --paper-warm: #f2f7fc;
  --ink: #0f2b45; --ink-soft: #355876; --ink-mute: #6489a6;
  --accent: #1976d2; --accent-deep: #1565c0; --accent-soft: #d6eafb;
  --gold: #a8722f; --line: rgba(15,43,69,0.13); --line-strong: rgba(15,43,69,0.26);
  --hero-grad: #1d1d1f;
}
[data-theme="teal"] { /* Cloudreve #009688 */
  --paper: #e9f4f2; --surface: #ffffff; --surface-2: #dcefeb; --paper-warm: #f1f7f6;
  --ink: #10332f; --ink-soft: #35615a; --ink-mute: #628b83;
  --accent: #00897b; --accent-deep: #00695c; --accent-soft: #d3eeea;
  --gold: #a8722f; --line: rgba(16,51,47,0.13); --line-strong: rgba(16,51,47,0.26);
  --hero-grad: #1d1d1f;
}
[data-theme="bluegrey"] { /* Cloudreve #607D8B */
  --paper: #eef2f4; --surface: #ffffff; --surface-2: #e2e9ed; --paper-warm: #f4f7f8;
  --ink: #233039; --ink-soft: #4a5c67; --ink-mute: #748792;
  --accent: #546e7a; --accent-deep: #37474f; --accent-soft: #dde6ea;
  --gold: #a8722f; --line: rgba(35,48,57,0.13); --line-strong: rgba(35,48,57,0.26);
  --hero-grad: #1d1d1f;
}

/* 苹果 / Fluent 设计令牌：100-150ms 按压、200-300ms 状态、300-400ms 布局 */
:root {
  --radius: 6px;
  --radius-lg: 20px;      /* 卡片：Apple 大圆角 */
  --radius-md: 12px;      /* 输入框 / 按钮 */
  --shadow: 0 8px 28px rgba(14, 76, 125, 0.10);
  --shadow-glass: 0 1px 2px rgba(14,76,125,.05), 0 12px 40px rgba(14,76,125,.10), 0 32px 80px rgba(14,76,125,.06);
  /* 系统字体栈：Apple 用 SF Pro，Windows 用 Segoe UI，中文回落苹方 / 微软雅黑 */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "SimSun", Georgia, serif;  /* 保留：暖书页基因，正文区仍可用 */
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  /* 玻璃材质：主题感知，五套主题切换时自动跟随；前行为旧浏览器回退 */
  --glass: rgba(255,255,255,.86);
  --glass: color-mix(in srgb, var(--surface) 86%, transparent);
  --glass-line: rgba(23,105,170,.14);
  --glass-line: color-mix(in srgb, var(--accent) 14%, transparent);
  /* Apple 缓动：标准 / 减速入场 / 弹簧 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-apple: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.28, 0.64, 1);
  --t-press: 120ms;
  --t-state: 220ms;
  --t-layout: 320ms;
}

[v-cloak] { display: none; }

html { font-size: calc(16px * var(--scale)); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
body.contrast-high {
  --paper: #ffffff; --surface: #ffffff; --surface-2: #ffffff;
  --paper-warm: #ffffff;
  --ink: #000000; --ink-soft: #0a0a0a; --ink-mute: #1a1a1a;
  --accent: #004b8d; --accent-deep: #00305e; --accent-soft: #d4e8fa;
  --line: rgba(0,0,0,0.4); --line-strong: #000000;
}
body.dyslexic { --sans: "Comic Sans MS", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0.02em; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============ 登录 · Apple / Fluent 契约式设计 ============ */
/* 深色 Hero 主基调 #1d1d1f；超大几何形状 soft-light 叠加，禁止纯色平铺 / 多色渐变 */
.login-shell {
  position: relative; min-height: 100dvh;
  /* 微软蓝主基调 + 鼠标坐标变量（默认无鼠标时格子隐藏） */
  background: #0f5fbf; color: #f5f5f7;
  --grid-x: -1000px; --grid-y: -1000px;
  overflow: hidden; isolation: isolate;
}
/* 装饰形状故意越界，裁剪掉可避免它们把滚动容器的 scrollHeight 撑大 */
.login-ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient-shape { position: absolute; border-radius: 50%; mix-blend-mode: soft-light; }
/* 细线格子：径向遮罩只在鼠标附近约 260px 圆形区域显现，鼠标之外完全隐藏 */
.login-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.34) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle 260px at var(--grid-x) var(--grid-y), #000 0%, rgba(0,0,0,.55) 55%, transparent 100%);
          mask-image: radial-gradient(circle 260px at var(--grid-x) var(--grid-y), #000 0%, rgba(0,0,0,.55) 55%, transparent 100%);
}
.ambient-shape.a { width: 56vw; height: 56vw; left: -14vw; top: -24vw; background: rgba(255,255,255,.16); }
.ambient-shape.b { width: 44vw; height: 44vw; right: -10vw; bottom: -18vw; background: rgba(255,255,255,.11); }
.ambient-shape.c { width: 26vw; height: 26vw; right: 18vw; top: 12vh; background: rgba(255,255,255,.07); }

/* 固定顶栏：blur(20px) saturate(180%) + 半透明，56px，避免强调色（仅 Logo 着色） */
.login-topbar {
  position: sticky; top: 0; z-index: 20; height: 56px;
  background: rgba(9, 74, 158, .55);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.login-topbar-inner {
  max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 5vw;
  display: flex; align-items: center; justify-content: space-between;
}
.login-logo { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; color: #f5f5f7; letter-spacing: .01em; }
.login-logo-img { display: block; height: 30px; width: auto; }
.login-topbar-meta { font-size: 12px; font-weight: 400; color: rgba(255,255,255,.68); }

/* 舞台：非对称，左文案 / 右浅色卡片；最大宽 1280px，两侧 ≥5vw，区块间距 96px */
.login-stage {
  max-width: 1280px; margin: 0 auto;
  /* border-box：min-height 已包含上下 padding，否则整页会比屏幕高出 176px */
  box-sizing: border-box;
  padding: 96px 5vw 80px; min-height: calc(100dvh - 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center; gap: 96px;
}
.login-hero { max-width: 640px; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.72); margin: 0 0 24px;
}
.hero-title {
  font-family: var(--display); font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -.03em;
  color: #f5f5f7; margin: 0 0 32px;
}
.hero-sub {
  font-size: 18px; font-weight: 400; line-height: 1.6;
  color: #86868b; max-width: 42ch; margin: 0;
}

/* 浅色内容卡片：实色 #f5f5f7（禁止纯白大面积底色），12px 圆角，单层柔和阴影 */
.login-card {
  width: 100%;
  background: #f5f5f7; color: #1d1d1f;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px; padding: 48px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.login-heading { font-family: var(--display); font-weight: 700; letter-spacing: -.03em;
  margin: 0 0 8px; font-size: 32px; line-height: 1.1; color: #1d1d1f; }
.login-hint { color: #6e6e73; margin: 0 0 32px; font-size: 16px; line-height: 1.5; }
.field { margin-bottom: 24px; }
.field label { display: block; font-weight: 500; margin-bottom: 8px;
  font-size: 14px; color: #6e6e73; }
/* 修复输入框溢出：无 box-sizing 时 width:100% 会叠加 padding，密码框右侧多 48px 溢出更多 */
.login-card .field input { box-sizing: border-box; }
.field input {
  width: 100%; min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(0,0,0,.14); border-radius: 12px;
  background: #ffffff; color: #1d1d1f;
  font-size: 16px; line-height: 1.5;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.field input::placeholder { color: #86868b; opacity: 1; }
.field input:hover { border-color: rgba(0,0,0,.28); }
.field input:focus {
  outline: none; border-color: #0067c0;
  box-shadow: 0 0 0 3px rgba(0,103,192,.18);
}
/* 密码显隐（第二个关键图标，强调色不着色） */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  min-width: 40px; min-height: 40px; border: none; border-radius: 8px;
  background: transparent; color: #86868b; display: grid; place-items: center;
  transition: color 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
.pw-toggle:hover { color: #1d1d1f; opacity: .8; }
/* 错误提示与登录按钮 */
.form-error { color: #d70015; background: transparent; padding: 0;
  font-size: 14px; line-height: 1.5; margin: -8px 0 24px; }
.form-error span { font-weight: 700; margin-right: 8px; }
.btn-block { font-size: 16px; }
.login-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin 680ms linear infinite; }
.field-hint { display: block; font-size: 14px; color: #86868b; margin-top: 8px; }
.login-note { margin-top: 32px; padding-top: 24px; font-size: 12px; color: #86868b;
  border-top: 1px solid rgba(0,0,0,.08); text-align: center; line-height: 1.5; }

/* ---------- 按钮：Apple 渐变 + 主题色柔和投影 ---------- */
.btn-primary, .btn-ghost, .topbar-btn, .icon-btn {
  min-height: 44px; border-radius: var(--radius-md); font-weight: 600; padding: 0.6rem 1.25rem;
  transition: transform var(--t-press) var(--ease-apple),
              background-color var(--t-state) var(--ease-apple),
              border-color var(--t-state) var(--ease-apple),
              box-shadow var(--t-state) var(--ease-apple),
              color var(--t-state) var(--ease-apple),
              filter var(--t-state) var(--ease-apple);
}
.btn-primary {
  background: var(--accent);
  color: #fff; border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(14,76,125,.20);  /* 旧浏览器回退 */
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 26%, transparent),
              inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-primary:hover { filter: brightness(1.06);
  box-shadow: 0 8px 24px rgba(14,76,125,.28);  /* 旧浏览器回退 */
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 36%, transparent); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; }

/* ---------- 主框架 ---------- */
.shell { min-height: 100vh; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--accent); color: #fff; padding: 0.75rem 1rem; z-index: 100; }
.topbar {
  height: 68px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2.5rem); position: sticky; top: 0; z-index: 20;
}
.topbar-brand { display: flex; align-items: center; gap: 0.75rem; }
.topbar-mark { width: 2rem; height: 2rem; display: grid; place-items: center; background: var(--accent); color: #fff; border-radius: var(--radius); font-family: var(--serif); }
.topbar-name { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.01em; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.topbar-btn { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.topbar-btn:hover { background: var(--surface-2); }
.user-chip { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.75rem; border-left: 1px solid var(--line); }
.user-avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; }
.user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-meta strong { font-size: 0.95rem; }
.user-meta small { color: var(--ink-mute); font-size: 0.8rem; }

.body-grid { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 68px); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 1.75rem 1rem; display: flex; flex-direction: column; }
.nav-caption { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 1rem 0.75rem; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-item {
  width: 100%; min-height: 46px; display: flex; align-items: center; gap: 0.85rem;
  background: transparent; border: none; border-radius: var(--radius);
  padding: 0.6rem 0.75rem; text-align: left; color: var(--ink-soft); margin-bottom: 0.25rem;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; }
.nav-num { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-mute); }
.nav-item.active .nav-num { color: var(--accent); }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 1rem 0.75rem 0; color: var(--ink-mute); font-size: 0.85rem; }
.sidebar-foot p { margin: 0 0 0.25rem; }
.sidebar-foot strong { color: var(--ink); }

.content { padding: clamp(1.5rem, 3vw, 2.75rem); max-width: 1500px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.page-kicker { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--accent); margin: 0 0 0.35rem; }
.page-title { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 0; line-height: 1.1; }
.page-filters { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.inline-label { font-size: 0.9rem; color: var(--ink-soft); font-weight: 600; }
.page-filters select, .target-banner input {
  min-height: 44px; padding: 0.5rem 0.75rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); color: var(--ink);
}

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--line-strong); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.kpi-card.accent { border-top-color: var(--accent); }
.kpi-label { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 0.6rem; }
.kpi-value { font-family: var(--mono); font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin: 0 0 0.35rem; letter-spacing: -0.02em; }
.kpi-card.accent .kpi-value { color: var(--accent); }
.kpi-foot { font-size: 0.8rem; color: var(--ink-mute); margin: 0; }

/* ---------- 面板与图表 ---------- */
.chart-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.25rem; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 1.1rem; margin: 0; font-weight: 700; }
.panel-title .mono { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); margin-right: 0.5rem; }
.panel-tag { font-size: 0.8rem; color: var(--ink-mute); border: 1px solid var(--line); padding: 0.2rem 0.6rem; border-radius: 999px; }
.chart-box { height: 340px; padding: 0.75rem; }
.chart-wide { height: 300px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 0.85rem; color: var(--ink-soft); font-weight: 700; background: var(--surface-2); }
tbody tr:hover { background: var(--surface-2); }
tbody tr.hit { background: var(--accent-soft); }
td.strong { font-weight: 600; }
td.num { font-family: var(--mono); text-align: right; }
td.muted { color: var(--ink-mute); }
.mono { font-family: var(--mono); }
.empty { text-align: center; color: var(--ink-mute); padding: 2.5rem 1rem; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; padding: 1rem 1.4rem; border-top: 1px solid var(--line); }

/* ---------- 徽标 / 排名 ---------- */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--line-strong); }
.badge.ok { color: var(--accent-deep); background: var(--accent-soft); border-color: transparent; }
.badge.no { color: var(--danger); background: #f8e8e5; border-color: transparent; }
.rank { display: inline-grid; place-items: center; width: 2rem; height: 2rem; font-family: var(--mono); font-weight: 700; border: 1px solid var(--line-strong); border-radius: 50%; }
.rank-1 { background: var(--gold); color: #fff; border-color: var(--gold); }
.rank-2, .rank-3 { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
.est { font-size: 0.7rem; color: var(--ink-mute); margin-left: 0.2rem; }
.target-banner { display: flex; align-items: center; gap: 1rem; background: var(--accent-deep); color: #fff; padding: 1rem 1.4rem; border-radius: var(--radius); margin-bottom: 1.25rem; flex-wrap: wrap; }
.target-banner .inline-label { color: #cfe4f5; }
.target-banner strong { font-family: var(--mono); font-size: 1.2rem; }
.target-banner input { width: 90px; }
.target-banner .unit { font-family: var(--mono); margin-left: -0.4rem; }
.btn-sm { min-height: 36px; padding: 0.3rem 0.8rem; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.btn-sm.ghost { background: transparent; border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-sm:hover { opacity: 0.9; }
.target-note { margin-left: auto; font-size: 0.9rem; opacity: 0.85; }

/* ---------- 适老化面板 ---------- */
.a11y-backdrop { position: fixed; inset: 0; background: rgba(24,34,31,0.45); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.a11y-panel { background: var(--surface); border-radius: var(--radius); width: min(100%, 460px); padding: 1.5rem; box-shadow: var(--shadow); }
.a11y-panel .panel-head { padding: 0 0 1rem; }
.a11y-hint { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 1rem; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.a11y-seg { display: flex; gap: 0.35rem; }
.a11y-seg button { min-height: 44px; min-width: 60px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); color: var(--ink); }
.a11y-seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.switch { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); padding: 0 0.8rem; color: var(--ink); }
.switch-knob { width: 2.4rem; height: 1.3rem; border-radius: 999px; background: var(--line-strong); position: relative; transition: background 200ms var(--ease); }
.switch-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.3rem - 6px); height: calc(1.3rem - 6px); border-radius: 50%; background: #fff; transition: transform 200ms var(--ease); }
.switch.on { background: var(--accent-soft); border-color: var(--accent); }
.switch.on .switch-knob { background: var(--accent); }
.switch.on .switch-knob::after { transform: translateX(1.1rem); }
.switch-text { font-size: 0.9rem; min-width: 3.5rem; text-align: left; }
.icon-btn { min-width: 44px; padding: 0; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-size: 1.4rem; line-height: 1; }

/* ---------- 弹窗表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.required-note { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 1rem; }
.el-form-item__label { font-weight: 600; font-size: 0.95rem !important; }
.el-button { min-height: 44px; }

/* ---------- 数据导入中心 ---------- */
.info-strip { background: var(--accent-soft); border-left: 3px solid var(--accent); color: var(--accent-deep); padding: 0.9rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.5rem; line-height: 1.6; }
.import-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }
.import-card { margin-bottom: 0; }
.import-card-body { padding: 1.3rem 1.4rem; }
.import-desc { color: var(--ink-soft); margin: 0 0 0.75rem; line-height: 1.6; }
.import-cols { font-size: 0.85rem; color: var(--ink-mute); word-break: break-all; margin: 0 0 1.25rem; }
.import-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.file-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.import-result { margin-top: 1.1rem; border-top: 1px solid var(--line); padding-top: 0.9rem; }
.import-summary { margin: 0 0 0.5rem; font-family: var(--mono); }
.ok-text { color: var(--accent); }
.error-list { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.85rem; color: var(--danger); line-height: 1.7; }
.switch.on .switch-knob { background: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  /* 移动端：上下堆叠，区块间距 64px（8pt 网格） */
  .login-stage { grid-template-columns: 1fr; gap: 64px; padding: 64px 5vw; }
  .login-hero { max-width: none; }
  .login-card { padding: 32px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .body-grid { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--line); }
  .nav-list { display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .nav-item { width: auto; }
}
@media (max-width: 640px) {
  .kpi-grid, .form-grid { grid-template-columns: 1fr; }
  .topbar-name { display: none; }
  .target-note { margin-left: 0; width: 100%; }
}

/* ---------- 账号权限 / 版本 / 通用视图 ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.plan-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 1.25rem; }
.plan-mini { padding: 1.4rem; margin-bottom: 0; }
.plan-mini.featured { border-top: 3px solid var(--accent); }
.plan-price { font-family: var(--mono); font-size: 1.7rem; color: var(--accent); margin: 0.6rem 0; }
.plan-price small { font-size: 0.8rem; color: var(--ink-mute); font-family: var(--sans); margin-left: 0.3rem; }
.plan-mini .muted { color: var(--ink-mute); font-size: 0.9rem; line-height: 1.6; }
@media (max-width: 900px) { .two-col, .plan-mini-grid { grid-template-columns: 1fr; } }

/* ---------- 系统信息卡片 ---------- */
.sys-info-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 1.3rem 1.4rem; }
.sys-info-body div { display: flex; flex-direction: column; gap: 0.25rem; }
.sys-info-body span { font-size: 0.85rem; color: var(--ink-mute); }
.sys-info-body strong { font-size: 1rem; }
@media (max-width: 900px) { .sys-info-body { grid-template-columns: 1fr; } }

/* ============ 间距收紧（用户反馈：块上下间距过大） ============ */
.page-head { margin-bottom: 1rem; }
.panel { margin-bottom: 0.85rem; }
.panel-head { padding: 0.7rem 1.1rem; }
.kpi-grid { gap: 0.75rem; margin-bottom: 0.85rem; }
.kpi-card { padding: 0.9rem 1.1rem; }
.chart-grid { gap: 0.85rem; margin-bottom: 0.85rem; }
.chart-box { height: 290px; }
.chart-wide { height: 260px; }
th, td { padding: 0.55rem 0.8rem; }
.table-wrap { max-height: none; }
.field { margin-bottom: 1rem; }
.form-grid { gap: 0 0.75rem; }
.info-strip { padding: 0.6rem 1rem; margin-bottom: 0.85rem; }
.target-banner { padding: 0.7rem 1.1rem; margin-bottom: 0.85rem; }
.a11y-row { padding: 0.65rem 0; }
.sidebar { padding: 0.85rem 0.6rem; }
.nav-item { min-height: 40px; padding: 0.45rem 0.65rem; margin-bottom: 0.12rem; }
.content { padding: 1.25rem; }
.two-col, .import-grid { gap: 0.85rem; }
.sys-info-body { padding: 0.9rem 1.1rem; gap: 0.6rem; }

/* ============ 苹果风格微动画 ============ */
/* 按钮：hover 100ms 上浮+阴影，active 120ms 轻微缩放 */
.btn-primary, .btn-ghost, .topbar-btn, .icon-btn, .btn-sm, .file-btn,
.nav-item, .nav-group-head, .entry-card, .sidebar-toggle, .theme-dot {
  transition: transform var(--t-press) var(--ease-apple),
              background-color var(--t-state) var(--ease-apple),
              border-color var(--t-state) var(--ease-apple),
              box-shadow var(--t-state) var(--ease-apple),
              color var(--t-state) var(--ease-apple);
}
.btn-primary:hover, .btn-ghost:hover, .topbar-btn:hover, .btn-sm:hover {
  transform: translateY(-1px);
}
/* 主按钮阴影由上面的主题色光晕接管，这里只处理次要按钮 */
.btn-ghost:hover, .topbar-btn:hover, .btn-sm:hover {
  box-shadow: 0 4px 14px rgba(14, 76, 125, 0.16);
}
.btn-primary:active, .btn-ghost:active, .topbar-btn:active, .btn-sm:active,
.nav-item:active, .entry-card:active {
  transform: scale(0.97);
  transition-duration: var(--t-press);
}
.nav-item:hover { transform: translateX(2px); }
.nav-item.active { transform: none; }
.icon-btn:hover { transform: rotate(90deg); }

/* 手风琴展开：高度+透明度，320ms 减速曲线 */
.nav-group-head { display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 42px; background: transparent; border: none;
  padding: 0.4rem 0.65rem; color: var(--ink-soft); font-weight: 700; font-size: 0.9rem;
  border-radius: var(--radius); }
.nav-group-head:hover { background: var(--surface-2); color: var(--ink); }
.chevron { font-size: 0.65rem; color: var(--ink-mute);
  transition: transform var(--t-layout) var(--ease-apple); display: inline-block; }
.nav-group-head[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.nav-group + .nav-group { margin-top: 0.35rem; border-top: 1px solid var(--line); padding-top: 0.35rem; }

/* 页面切换入场：8px 上移 + 淡入，300ms */
.content > section { animation: viewIn var(--t-layout) var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* 卡片入场轻微错峰 */
.kpi-card, .panel, .entry-card { animation: cardIn var(--t-layout) var(--ease-out) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(6px) scale(0.995); } to { opacity: 1; transform: none; } }
.kpi-grid .kpi-card:nth-child(2) { animation-delay: 40ms; }
.kpi-grid .kpi-card:nth-child(3) { animation-delay: 80ms; }
.kpi-grid .kpi-card:nth-child(4) { animation-delay: 120ms; }

/* 第二层「进入小区」入场；登录页各元素已在上方定义错峰弹性入场 */
.entry-main { animation: cardIn 380ms var(--ease-out) both; }
/* 复选框/选中态 */
.entry-check { transition: transform var(--t-press) var(--ease-spring), background var(--t-state) var(--ease-apple); }
.entry-card.selected .entry-check { transform: scale(1.12); }
/* 主题圆点选中 */
.theme-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--line-strong); }
.theme-dot:hover { transform: scale(1.12); }
.theme-dot.on { transform: scale(1.16); box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgba(0,0,0,.15); }
.theme-picker { display: flex; gap: 0.6rem; }
.theme-name { font-size: 0.85rem; color: var(--ink-mute); margin: 0.3rem 0 0.8rem; }

/* 侧栏折叠 */
.sidebar { transition: width var(--t-layout) var(--ease-apple), padding var(--t-layout) var(--ease-apple); }
.sidebar.collapsed { width: 52px; padding: 0.85rem 0.3rem; }
.sidebar-toggle { width: 100%; min-height: 36px; background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-soft);
  font-size: 1.1rem; margin-bottom: 0.6rem; }
.sidebar-toggle:hover { background: var(--surface-2); }
.body-grid { transition: grid-template-columns var(--t-layout) var(--ease-apple); }
.sidebar.collapsed ~ .content { padding-left: 1rem; }

/* ============ 第二层：进入小区 ============ */
.entry-shell { min-height: 100vh; background: var(--paper); }
.entry-head { height: 64px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1rem,3vw,2.5rem); }
.entry-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.entry-head-actions { display: flex; align-items: center; gap: 0.8rem; }
.entry-user { color: var(--ink-soft); font-size: 0.9rem; }
.entry-main { max-width: 1180px; margin: 0 auto; padding: clamp(2rem,5vw,3.5rem) 1.5rem; }
.entry-title { font-family: var(--serif); font-size: clamp(2rem,4vw,2.8rem); margin: 0.3rem 0 0.5rem; }
.entry-sub { color: var(--ink-soft); margin: 0 0 1.5rem; }
.entry-toolbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 1.25rem; }
.entry-search { min-height: 40px; padding: 0.4rem 0.7rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); min-width: 200px; }
.entry-count { margin-left: auto; font-size: 0.9rem; color: var(--ink-mute); }
.btn-sm { min-height: 36px; padding: 0.35rem 0.85rem; font-size: 0.85rem; }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 0.75rem; }
.entry-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem;
  text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--ink); min-height: 92px; }
.entry-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.entry-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.entry-check { width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 4px;
  display: grid; place-items: center; font-size: 0.85rem; color: #fff; flex: 0 0 auto; }
.entry-card.selected .entry-check { background: var(--accent); border-color: var(--accent); }
.entry-card-name { font-weight: 700; font-size: 1.02rem; }
.entry-card-region { font-size: 0.82rem; color: var(--ink-mute); }

/* 无障碍：尊重系统减弱动效偏好 */
/* ============ 导入/导出：贴标题小按钮 + 弹窗 ============ */
.title-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.title-row .page-title { margin: 0; }
.io-btn {
  display: inline-flex; align-items: center;
  min-height: 26px; padding: 0.15rem 0.5rem;
  font-size: 0.75rem; line-height: 1.2; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent); border-radius: 4px;
  white-space: nowrap; letter-spacing: 0;
  transition: transform var(--t-press) var(--ease-apple),
              background-color var(--t-state) var(--ease-apple),
              box-shadow var(--t-state) var(--ease-apple);
}
.io-btn:hover { transform: translateY(-1px); background: var(--surface);
  box-shadow: 0 2px 8px rgba(14,76,125,.14); }
.io-btn:active { transform: scale(0.95); }
.io-scope { background: var(--accent-soft); color: var(--accent-deep);
  padding: 0.5rem 0.8rem; border-radius: var(--radius); font-size: 0.88rem; margin: 0 0 1rem; }
.io-entity { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.io-entity label { font-weight: 600; font-size: 0.9rem; }
.io-entity select { min-height: 36px; padding: 0.3rem 0.6rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.io-section { border-top: 1px solid var(--line); padding-top: 0.9rem; margin-top: 0.9rem; }
.io-section h3 { font-size: 0.95rem; margin: 0 0 0.7rem; }
.io-section h3 small { font-weight: 400; color: var(--ink-mute); font-size: 0.78rem; margin-left: 0.4rem; }
.io-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.io-hint { font-size: 0.8rem; color: var(--ink-mute); margin: 0.6rem 0 0; }

/* 顶栏三按钮缩小、边框更细 */
.topbar-btn {
  min-height: 28px; padding: 0.25rem 0.6rem;
  font-size: 0.8rem; line-height: 1.2;
  border: 1px solid var(--line); border-width: 1px;
  border-radius: 4px; background: var(--surface); color: var(--ink-soft);
  transition: transform var(--t-press) var(--ease-apple),
              background-color var(--t-state) var(--ease-apple),
              box-shadow var(--t-state) var(--ease-apple);
}
.topbar-btn:hover { background: var(--surface-2); transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(14,76,125,.12); }
.topbar-btn:active { transform: scale(0.95); }
.topbar-actions { gap: 0.45rem; }

/* ============ 独立滚动区域 + 表头吸顶（覆盖前面的默认布局） ============ */
/* 工作台固定为一屏高度：侧栏与主内容各自独立滚动，页面不再出现整页滚动条 */
.shell { height: 100vh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar { flex: 0 0 auto; }
.body-grid {
  flex: 1 1 auto; min-height: 0;
  grid-template-columns: 232px minmax(0, 1fr);
}
/* 收起侧栏时主区域铺满剩余宽度 */
.body-grid.sb-collapsed { grid-template-columns: 52px minmax(0, 1fr); }
.sidebar {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none; -ms-overflow-style: none;   /* 隐性滚动条 */
}
.sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
.content {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  max-width: none;   /* 让内容铺满，不留在左侧 */
}
/* 第二层「进入小区」自身可滚动。
   登录页固定为一屏高度、作为唯一滚动容器：html/body 不会再出现第二条滚动条，
   矮屏时内容仍在登录页内部滚动，不会把登录按钮裁掉。 */
.entry-shell { height: 100vh; overflow-y: auto; }
.login-shell {
  height: 100dvh; min-height: 100dvh;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
}

/* 表格：内部滚动 + 表头吸顶 */
.table-wrap { overflow: auto; max-height: 62vh; }
.table-wrap table { border-collapse: separate; border-spacing: 0; }
.table-wrap thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--surface-2);
  box-shadow: inset 0 -1px 0 var(--line-strong);
}
/* 序号列：窄且居中 */
th.col-no, td.col-no {
  width: 54px; min-width: 54px; max-width: 54px;
  text-align: center !important; padding-left: 0.3rem; padding-right: 0.3rem;
}

/* 窄屏：上下堆叠，侧栏限高独立滚动，主区占剩余 */
@media (max-width: 1024px) {
  .body-grid, .body-grid.sb-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .sidebar { max-height: 30vh; }
  .table-wrap { max-height: 55vh; }
}

/* 日志与操作记录 */
.log-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; margin-bottom: 0.85rem; }
.log-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.log-card span { font-size: 0.8rem; color: var(--ink-mute); }
.log-card strong { font-family: var(--mono); font-size: 1.3rem; }
.daily-wrap { max-height: 42vh; }
.daily-filter { display: flex; align-items: center; gap: 0.5rem; }
.daily-filter select { min-height: 34px; padding: 0.3rem 0.6rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
@media (max-width: 900px) { .log-cards { grid-template-columns: repeat(2, 1fr); } }

/* 第二层：地区下拉选择框 */
.entry-select {
  min-height: 40px; padding: 0.45rem 0.8rem; min-width: 190px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font-size: 0.92rem;
  transition: border-color var(--t-state) var(--ease-apple),
              box-shadow var(--t-state) var(--ease-apple);
}
.entry-select:hover { border-color: var(--accent); }
.entry-select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* ============ 登录动效：一次编排式 staggered reveal ============ */
/* 元素依次淡入 + 上移 10px，间隔 70ms，时长 360ms，ease-out */
@keyframes authReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.login-ambient .ambient-shape { animation: authReveal 400ms cubic-bezier(0,0,.2,1) both; }
.login-ambient .ambient-shape.b { animation-delay: 70ms; }
.login-ambient .ambient-shape.c { animation-delay: 140ms; }
.login-topbar { animation: authReveal 320ms cubic-bezier(0,0,.2,1) both; }
.hero-eyebrow    { animation: authReveal 360ms cubic-bezier(0,0,.2,1) 80ms both; }
.hero-title      { animation: authReveal 360ms cubic-bezier(0,0,.2,1) 150ms both; }
.hero-sub        { animation: authReveal 360ms cubic-bezier(0,0,.2,1) 220ms both; }
.login-card      { animation: authReveal 400ms cubic-bezier(0,0,.2,1) 290ms both; }

/* 登录 CTA：胶囊 999px、单一强调色、无渐变 / 无重阴影 / 无缩放旋转弹跳 */
.login-submit.btn-primary {
  min-height: 48px; border-radius: 999px;
  background: #0067c0; color: #ffffff;
  border: none; box-shadow: none;
  font-weight: 500; letter-spacing: 0;
  transition: opacity 200ms cubic-bezier(0,0,.2,1), background-color 200ms cubic-bezier(0,0,.2,1);
}
.login-submit.btn-primary:hover { opacity: .88; background: #005aad; box-shadow: none; transform: none; filter: none; }
.login-submit.btn-primary:active { opacity: .78; transform: none; }
.login-submit.btn-primary:disabled { opacity: .5; }

/* 加载转圈（功能指示，非装饰动画） */
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 工作台表格：总宽度 = 当前屏幕可用宽度 ============ */
/* 三条硬约束：
   1) width:100% + min-width:0 + max-width:100% —— 表格精确铺满主内容区，
      既不按内容收紧（挤在左侧），也不设 1080px 之类下限（撑爆、右侧表头出界）。
      注意 min-width:100% 同样不能用：它会强制铺满后把多余宽度摊派给各列。
   2) table-layout:fixed —— 列宽只由表格总宽均分决定，长内容不会把列撑宽；
      col-no 序号列仍固定 54px，其余列平分剩余宽度。
   3) 列头允许折行、数据格单行省略 —— 列再窄，每个列头文字也完整可见。 */
.table-wrap table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}
.table-wrap th, .table-wrap td {
  padding: 0.45rem 0.6rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 列头折行，保证「物业费收取(元)」「建筑面积(㎡)」这类长表头整字可见 */
.table-wrap th {
  font-size: 0.8rem;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.table-wrap td { white-space: nowrap; }
/* 等宽列里被截断的内容，鼠标悬停显示完整值（由 app.js 统一挂 title） */
.table-wrap td[title] { cursor: help; }
.table-wrap tbody tr { height: 30px; }
.table-wrap .rank { width: 1.6rem; height: 1.6rem; }
.table-wrap .badge { padding: 0.1rem 0.4rem; }
.table-wrap .empty { padding: 1.2rem 1rem; }
.pager { padding: 0.45rem 0.8rem; }
.panel-head { padding: 0.55rem 0.9rem; }
.page-head { margin-bottom: 0.75rem; }
.panel { margin-bottom: 0.75rem; }

/* ============ 表单错误态：错误红框，输入后恢复 ============ */
.field .field-error-tip, .input-error-tip {
  color: #d70015; font-size: 0.82rem; line-height: 1.4;
  margin-top: 4px; display: block;
}
/* 输入框/下拉错误态：红框 + 淡红底 */
input.field-error, select.field-error, .field-error input, .el-input.field-error .el-input__wrapper {
  border-color: #d70015 !important;
  box-shadow: 0 0 0 2px rgba(215,0,21,.12) !important;
  background: #fff6f6 !important;
}
/* 登录卡内的错误态（覆盖登录页专用输入框样式） */
.login-card input.field-error {
  border-color: #d70015 !important;
  box-shadow: 0 0 0 3px rgba(215,0,21,.18) !important;
  background: #fff6f6 !important;
}
/* 字段输入后抖动提示一下恢复正常（轻量，160ms） */
@keyframes fieldOk {
  from { border-color: #d70015; }
  to   { border-color: var(--line-strong, rgba(0,0,0,.26)); }
}

/* Element Plus 表单项错误态：红框 + 提示 */
.el-form-item.is-error .el-input__wrapper,
.el-form-item.is-error .el-select__wrapper {
  box-shadow: 0 0 0 1px #d70015 inset !important;
  background: #fff6f6 !important;
}
.el-form-item .field-error-tip {
  color: #d70015; font-size: 12px; line-height: 1.3;
  margin-top: 2px; display: block;
}

/* ============ 排行榜展示设置（总经理） ============ */
.lb-config-body { padding: 0.9rem 1.1rem; }
.lb-config-row { margin-bottom: 0.9rem; }
.lb-config-row .inline-label { margin-right: 0.6rem; font-weight: 600; }
.lb-config-row > .muted { font-size: 0.85rem; margin-left: 0.5rem; }
.lb-config-communities > .muted { margin: 0.3rem 0 0.6rem; font-size: 0.85rem; }
.lb-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; max-height: 180px; overflow-y: auto; }
.lb-check-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; white-space: nowrap; cursor: pointer; padding: 2px 0; }
.lb-check-item input { accent-color: #0067c0; }
.lb-config-actions { display: flex; gap: 10px; margin-top: 1rem; }

/* 排行榜：未开放提示 / 总经理视图的已隐藏标注 */
.lb-closed { padding: 2.5rem 1.5rem; text-align: center; }
.lb-closed p { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.5rem; color: var(--ink); }
.lb-closed span { font-size: 0.9rem; color: var(--ink-mute); }
.lb-hidden-tag { margin-left: 8px; font-size: 0.72rem; vertical-align: middle; }
.panel-head .muted { font-size: 0.82rem; }

/* ============ 表格 Excel 式选区高亮 ============
   点列头 = 整列；点轴头(每行首列) = 整行；点普通子格 = 行、列十字高亮。
   行、列取同一强调色的两个不同混合比，色差很小但可辨；交叉格再深一档并带活动边框。
   每条 background 先写静态淡蓝，支持 color-mix() 的浏览器再按当前主题重新着色。 */
.table-wrap table th,
.table-wrap table td { cursor: cell; }
.table-wrap table thead th,
.table-wrap table tbody td:first-child { cursor: pointer; }
.table-wrap table td[title] { cursor: cell; }
.table-wrap .empty { cursor: default; }

/* 纵向：列 */
.table-wrap table .xl-col {
  background: #e7f0f9;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
}
/* 横向：行，与列色只有轻微明度差 */
.table-wrap table .xl-row {
  background: #eef4fa;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
/* 交叉格：行列叠加 */
.table-wrap table .xl-both {
  background: #d7e7f7;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  box-shadow: inset 0 0 0 1.5px var(--accent);
  font-weight: 600;
  position: relative;
  z-index: 1;
}
/* 选中的列头 / 行头：比数据区更实一点，对应 Excel 的列标与行号 */
.table-wrap table .xl-head,
.table-wrap table .xl-anchor {
  background: #cfe1f3;
  background: color-mix(in srgb, var(--accent) 25%, var(--surface));
  color: var(--accent-deep);
  font-weight: 700;
}
/* 有选区时关掉行悬停底色，避免两种高亮色被 hover 冲淡 */
.table-wrap table.xl-active tbody tr:hover { background: transparent; }

/* ============ 分项目收支：地区筛选 / 全屏子窗口 / 滚轮滚动 / 拖动行距 ============ */
.project-head { cursor: pointer; }
.project-head:hover { background: var(--surface-2); }
.project-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.project-head-left { display: flex; align-items: center; gap: 0.6rem; }
.project-head-tools { display: flex; align-items: center; gap: 0.6rem; cursor: default; }
.project-filter {
  min-height: 26px; padding: 2px 8px; font-size: 0.75rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.project-filter:hover { border-color: var(--accent); }
.project-filter:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.project-expand-hint { font-size: 0.75rem; color: var(--ink-mute); white-space: nowrap; cursor: pointer; }
.project-expand-hint:hover { color: var(--accent); }

/* 滚轮只滚动这个容器；ECharts 画布高度由 JS 按「项目数 × 行高」设置 */
.project-scroll {
  height: 340px; overflow-y: auto; overflow-x: hidden;
  padding: 0.5rem 0.75rem;
  cursor: ns-resize; user-select: none;
  overscroll-behavior: contain;
}
.project-scroll.is-dragging { cursor: grabbing; }
.project-canvas { width: 100%; }

/* 页内全屏子窗口（挂在 #app 直接子级，避免祖先 transform 影响 fixed 定位） */
.project-overlay {
  position: fixed; inset: 0; z-index: 3000; background: var(--surface);
  /* 从小窗位置 FLIP 展开到全屏（起点 transform 由 openProjectFull 计算） */
  will-change: transform, opacity;
  transition: transform 480ms cubic-bezier(.2,.8,.2,1), opacity 320ms ease-out;
}
.project-overlay-card { position: absolute; inset: 0; display: flex; flex-direction: column; }
.project-overlay-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 1.2rem; border-bottom: 1px solid var(--line);
}
.project-overlay-title { margin: 0; font-size: 1.1rem; font-weight: 700; }
.project-overlay-tools { display: flex; align-items: center; gap: 0.7rem; }
.project-overlay-count { font-size: 0.78rem; color: var(--ink-mute); white-space: nowrap; }
.project-overlay-hint {
  flex: 0 0 auto; margin: 0; padding: 0.4rem 1.2rem;
  font-size: 0.76rem; color: var(--ink-mute); border-bottom: 1px solid var(--line);
}
.project-scroll-full { flex: 1 1 auto; min-height: 0; height: auto; max-height: none; }
