/* ==========================================================================
 * 鞋云智造 FootCloud · 设计系统 app.css（契约 7.6）
 * 深色侧边栏 + 浅色内容区 · 主色 #1f5eff · 圆角 10px · 13px 正文
 * 零外链：系统字体栈 / 内置 SVG 图标 / 手写 SVG 图表
 * ========================================================================== */

/* --------------------------------------------------------------------------
 * 0. 设计令牌
 * -------------------------------------------------------------------------- */
:root {
  --primary: #1f5eff;
  --primary-hover: #1749d6;
  --primary-active: #123fbd;
  --primary-soft: #eaf0ff;
  --primary-100: #dbe5ff;
  --primary-200: #b7caff;

  --sidebar: #0f1a2e;
  --sidebar-deep: #0b1424;
  --sidebar-hover: #16233c;
  --sidebar-active: #1a2b4c;
  --sidebar-text: #a7b4c8;
  --sidebar-muted: #6b7a94;
  --sidebar-line: rgba(255, 255, 255, 0.07);

  --bg: #f4f6fa;
  --card: #ffffff;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --border-light: #f0f2f5;

  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --text-4: #98a2b3;

  --green: #12b76a;
  --green-soft: #ecfdf3;
  --green-line: #a6f4c5;
  --orange: #f79009;
  --orange-soft: #fffaeb;
  --orange-line: #fedf89;
  --red: #f04438;
  --red-soft: #fef3f2;
  --red-line: #fecdca;
  --blue: #2e90fa;
  --blue-soft: #eff8ff;
  --blue-line: #b2ddff;
  --purple: #7a5af8;
  --purple-soft: #f4f3ff;
  --purple-line: #d9d6fe;
  --gray-soft: #f2f4f7;

  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-hover: 0 6px 18px rgba(16, 24, 40, 0.08);
  --shadow-pop: 0 12px 32px rgba(16, 24, 40, 0.18);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --sidebar-w: 232px;
  --topbar-h: 60px;
}

/* --------------------------------------------------------------------------
 * 1. 基础重置
 * -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
img, svg { max-width: 100%; }
::selection { background: var(--primary-100); }

/* 滚动条：细、灰色 */
* { scrollbar-width: thin; scrollbar-color: #c9cfd8 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #c9cfd8; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #aab3c0; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* 图标 */
.icon { display: inline-block; vertical-align: -3px; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
 * 2. 工具类
 * -------------------------------------------------------------------------- */
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.text-danger { color: var(--red) !important; }
.text-green { color: var(--green) !important; }
.text-orange { color: var(--orange) !important; }
.text-primary { color: var(--primary) !important; }
.hidden { display: none !important; }
.flex { display: flex; align-items: center; }
.flex-1 { flex: 1; min-width: 0; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.link-text { color: var(--primary); cursor: pointer; font-weight: 500; }
.link-text:hover { text-decoration: underline; }
.link-btn {
  border: none; background: none; padding: 0; margin: 0; cursor: pointer;
  color: var(--primary); font-size: 12.5px; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.row-ops { display: flex; gap: 10px; align-items: center; white-space: nowrap; }

/* --------------------------------------------------------------------------
 * 3. 按钮 / 徽标 / 状态
 * -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border-strong);
  background: #fff; color: var(--text-2);
  font-size: 13px; font-weight: 500; font-family: inherit;
  cursor: pointer; white-space: nowrap; position: relative;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.btn:hover { background: #f9fafb; border-color: #b8c0cc; color: var(--text); }
.btn:active { background: #f2f4f7; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.22); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(31, 94, 255, 0.28); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-primary:active { background: var(--primary-active); border-color: var(--primary-active); }

.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #d92d20; border-color: #d92d20; color: #fff; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-3); }
.btn-ghost:hover { background: #f2f4f7; border-color: transparent; color: var(--text); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; gap: 4px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14px; border-radius: 9px; }

.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%;
  animation: fc-spin 0.7s linear infinite;
}
.btn-default.loading::after, .btn-ghost.loading::after { border-color: rgba(16, 24, 40, 0.2); border-top-color: var(--text-2); }

.icon-btn {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--text-3); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { background: var(--gray-soft); color: var(--text); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.22); }

/* 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; line-height: 1; white-space: nowrap;
  background: var(--gray-soft); color: var(--text-2);
}
.badge-gray { background: var(--gray-soft); color: #475467; }
.badge-blue { background: var(--blue-soft); color: #175cd3; }
.badge-green { background: var(--green-soft); color: #027a48; }
.badge-orange { background: var(--orange-soft); color: #b54708; }
.badge-red { background: var(--red-soft); color: #b42318; }
.badge-purple { background: var(--purple-soft); color: #5925dc; }
.badge-status { padding-left: 7px; }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.85; }

/* --------------------------------------------------------------------------
 * 4. 应用外壳：侧边栏 / 顶栏 / 内容区
 * -------------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #101d34 0%, var(--sidebar) 42%, var(--sidebar-deep) 100%);
  color: var(--sidebar-text);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar-brand {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
  border-bottom: 1px solid var(--sidebar-line);
}
.brand-mark {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #2f6bff 0%, #1f5eff 55%, #1749d6 100%);
  box-shadow: 0 4px 12px rgba(31, 94, 255, 0.4);
}
.brand-text { min-width: 0; }
.brand-name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.5px; line-height: 1.2; }
.brand-sub { font-size: 9.5px; color: var(--sidebar-muted); letter-spacing: 1.1px; text-transform: uppercase; margin-top: 2px; white-space: nowrap; }

.nav-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 10px 18px; }
.nav-group { margin-bottom: 12px; }
.nav-group-title {
  font-size: 10px; color: var(--sidebar-muted); letter-spacing: 1.4px;
  padding: 6px 10px 5px; font-weight: 600;
}
.nav-item {
  position: relative; display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 10px; margin-bottom: 1px; border-radius: 8px;
  color: var(--sidebar-text); font-size: 13px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--primary);
  box-shadow: 0 0 10px rgba(31, 94, 255, 0.7);
}
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; opacity: 0.85; }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { opacity: 1; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-emoji { font-size: 14px; line-height: 1; filter: grayscale(1) brightness(1.65); opacity: 0.92; }
.nav-item.is-broken { opacity: 0.72; }
.nav-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); flex: 0 0 6px; }
.nav-hint { font-size: 11px; color: var(--sidebar-muted); padding: 10px 10px 0; line-height: 1.6; }

/* 菜单搜索框（22 个页面在短屏下必须滚动时的即时过滤入口） */
.nav-search {
  flex: 0 0 auto; display: flex; align-items: center; gap: 7px;
  margin: 10px 10px 0; padding: 0 9px; height: 32px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--sidebar-muted);
}
.nav-search:focus-within { border-color: rgba(47, 107, 255, 0.65); background: rgba(47, 107, 255, 0.12); }
.nav-search svg { flex: 0 0 14px; opacity: 0.75; }
.nav-search-input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  color: var(--sidebar-text); font-size: 12px; font-family: inherit;
}
.nav-search-input::placeholder { color: var(--sidebar-muted); }
.nav-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* 短屏（如 1366×768）压缩导航密度，让更多分组一屏可见 */
@media (max-height: 840px) and (min-width: 1024px) {
  .nav-search { margin: 6px 10px 0; height: 28px; }
  .nav-scroll { padding: 8px 10px 12px; }
  .nav-group { margin-bottom: 6px; }
  .nav-group-title { padding: 4px 10px 3px; font-size: 9.5px; letter-spacing: 1.1px; }
  .nav-item { height: 29px; font-size: 12.5px; gap: 8px; margin-bottom: 0; }
  .nav-item.active::before { top: 6px; bottom: 6px; }
  .nav-icon { width: 16px; height: 16px; flex-basis: 16px; }
  .brand-sub { font-size: 9px; }
}

.sidebar-user {
  flex: 0 0 auto; border-top: 1px solid var(--sidebar-line);
  padding: 12px 12px 14px;
}
.user-row { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2e90fa, #7a5af8);
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  text-transform: uppercase;
}
.avatar-sm { width: 28px; height: 28px; flex-basis: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; flex-basis: 48px; font-size: 17px; }
.user-meta { flex: 1; min-width: 0; }
.u-name { color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-role { color: var(--sidebar-muted); font-size: 11px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-logout { color: var(--sidebar-muted); width: 30px; height: 30px; flex-basis: 30px; }
.user-logout:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-version { margin-top: 10px; font-size: 10px; color: #4b5a73; letter-spacing: 0.3px; }

.main {
  flex: 1; min-width: 0; min-height: 100vh;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
}

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.menu-btn { display: none; }
.crumb { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; flex: 1; }
.crumb-group { color: var(--text-3); white-space: nowrap; }
.crumb-sep { color: var(--border-strong); }
.crumb-current { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb-tag { margin-left: 4px; height: 18px; font-size: 10.5px; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.global-search { position: relative; width: 250px; }
.global-search .gs-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-4); pointer-events: none; }
.gs-input {
  width: 100%; height: 34px; padding: 0 52px 0 32px;
  border: 1px solid var(--border); border-radius: 8px;
  background: #f8fafc; color: var(--text); font-size: 12.5px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.gs-input::placeholder { color: var(--text-4); }
.gs-input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.12); }
.gs-kbd {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--text-4); background: #fff;
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 4px; pointer-events: none;
}

.tenant-switch {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 8px 0 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  color: var(--text-3); cursor: pointer;
}
.tenant-switch:hover { border-color: var(--border-strong); }
.tenant-select {
  border: none; background: transparent; outline: none;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; max-width: 120px;
}
.demo-badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--orange-soft); color: #b54708;
  border: 1px solid var(--orange-line); font-size: 11px; font-weight: 600;
  white-space: nowrap;
}

.topbar-pop { position: relative; }
.bell { position: relative; }
.bell-dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--red); border: 2px solid #fff;
}
.user-chip {
  display: flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 6px 0 4px; border-radius: 999px; cursor: pointer;
  transition: background 0.15s ease;
}
.user-chip:hover { background: var(--gray-soft); }
.user-chip-name { font-size: 12.5px; font-weight: 500; color: var(--text-2); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-arrow { color: var(--text-4); }
.user-menu-wrap .dropdown { min-width: 240px; }

/* 顶栏下拉 */
.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 90;
  min-width: 220px; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-pop);
  animation: fc-fade-down 0.16s ease;
}
.dropdown-title { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 6px 10px; }
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
}
.dropdown-item:hover { background: var(--gray-soft); color: var(--text); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-soft); }
.dropdown-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.dropdown-foot {
  border-top: 1px solid var(--border); margin-top: 4px; padding: 8px 10px 4px;
  text-align: center; font-size: 12px; color: var(--primary); cursor: pointer;
}
.dropdown-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.dropdown-user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.dropdown-user-role { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

.notice-drop { width: 320px; padding: 6px; }
.notice-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.notice-item:hover { background: #f8fafc; }
.notice-ico { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.notice-ico.tone-orange { background: var(--orange-soft); color: #b54708; }
.notice-ico.tone-green { background: var(--green-soft); color: #027a48; }
.notice-ico.tone-red { background: var(--red-soft); color: #b42318; }
.notice-main { min-width: 0; }
.notice-title { font-size: 12.5px; color: var(--text); font-weight: 500; }
.notice-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-time { font-size: 10.5px; color: var(--text-4); margin-top: 3px; }

/* 内容区 */
.content {
  flex: 1; width: 100%; max-width: 1560px; margin: 0 auto;
  padding: 20px 22px 40px;
  animation: fc-page-in 0.22s ease;
}
.sidebar-mask { display: none; }

/* --------------------------------------------------------------------------
 * 5. 页头 / 面板 / 标签页 / 指标卡 / 分栏 / 区块
 * -------------------------------------------------------------------------- */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.ph-left { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.ph-back { margin-top: 2px; }
.ph-titles { min-width: 0; }
.page-title { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; line-height: 1.3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-sub { font-size: 12.5px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.panel {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.panel + .panel, .panel-block + .panel { margin-top: 16px; }
.panel-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 15px 18px 0;
}
.panel-titles { flex: 1; min-width: 0; }
.panel-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; }
.panel-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.panel-toolbar { padding: 12px 18px 0; }
.panel-head + .panel-toolbar { padding-top: 12px; }
.panel-body { padding: 16px 18px 18px; }
.panel-head + .panel-body { padding-top: 14px; }
.panel-body.panel-body-flush { padding: 12px 0 0; }
.panel .table-block { margin: 0 -18px; }
.panel .table-block .table-wrap { border-top: 1px solid var(--border-light); }
.panel-body.panel-body-flush .table-block { margin: 0; }
.panel .table-block .table-wrap { border-top: none; }
.panel-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }
.panel-legend .legend-dot { margin-right: 2px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 9px 1px 11px; border: none; background: none;
  font-size: 13px; color: var(--text-3); cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); font-weight: 600; }
.tab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--primary); border-radius: 2px 2px 0 0;
}

/* 指标卡 */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.stat-card {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 14px 15px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  min-width: 0;
}
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.stat-ico {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.tone-green .stat-ico, .stat-card.tone-green .stat-ico { background: var(--green-soft); color: var(--green); }
.stat-card.tone-orange .stat-ico { background: var(--orange-soft); color: #b54708; }
.stat-card.tone-red .stat-ico { background: var(--red-soft); color: #b42318; }
.stat-card.tone-purple .stat-ico { background: var(--purple-soft); color: #5925dc; }
.stat-card.tone-gray .stat-ico { background: var(--gray-soft); color: var(--text-3); }
.stat-main { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value {
  font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.3;
  margin-top: 3px; letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stat-unit { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; letter-spacing: 0; }
.stat-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; margin-top: 3px; font-weight: 500; }
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--red); }
.stat-hint { font-size: 10.5px; color: var(--text-4); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 分栏 */
.split { display: grid; gap: 16px; align-items: start; }
.split > div { min-width: 0; }
.split-left, .split-right { min-width: 0; }

/* 键值网格（ui.kv） */
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; }
.kv-item { min-width: 0; }
.kv-label { font-size: 11.5px; color: var(--text-4); line-height: 1.4; }
.kv-value { font-size: 13px; color: var(--text); margin-top: 3px; line-height: 1.5; word-break: break-all; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } }

/* 区块标题 */
.section { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; }
.section:first-child { margin-top: 0; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text); flex: 0 0 auto; }
.section-line { flex: 1; height: 1px; background: var(--border); }
.section-actions { flex: 0 0 auto; }

/* --------------------------------------------------------------------------
 * 6. 表格 / 列表
 * -------------------------------------------------------------------------- */
.table-block { min-width: 0; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 13px; color: var(--text-2);
}
.data-table th {
  background: #f8fafc; color: var(--text-3); font-weight: 600; font-size: 12px;
  text-align: left; padding: 10px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--border); position: relative;
}
.data-table th.cell-num { text-align: right; }
.data-table th.th-sort { cursor: pointer; user-select: none; }
.data-table th.th-sort:hover { color: var(--text); background: #f2f4f7; }
.sort-ind { display: inline-flex; vertical-align: middle; margin-left: 3px; color: var(--text-4); }
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-light);
  vertical-align: middle; color: var(--text-2);
}
.data-table td.cell-num {
  text-align: right; font-family: var(--mono); font-size: 12.5px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f5f8ff; }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr.selected td { background: #f0f5ff; }
.data-table tbody tr.selected:hover td { background: #e8f0ff; }
.data-table.dense th { padding: 7px 12px; }
.data-table.dense td { padding: 7px 12px; }
.col-check { width: 38px; text-align: center !important; padding-left: 14px !important; padding-right: 0 !important; }
.col-check .checkbox { margin: 0; }
.empty-row td { padding: 0 !important; }
.empty-row:hover td { background: transparent !important; }
.table-footer-wrap { padding: 10px 18px; border-top: 1px solid var(--border); }

.checkbox {
  width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer;
  vertical-align: middle;
}

/* 列表工具条 */
.list-table .panel-head { padding-bottom: 2px; }
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px 12px; flex-wrap: wrap;
  padding: 12px 18px 12px;
  border-bottom: 1px solid var(--border-light);
}
.lt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.lt-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.filter-field { display: inline-flex; align-items: center; gap: 6px; }
.filter-label { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.filter-select, .filter-input {
  height: 32px; padding: 0 9px; border: 1px solid var(--border-strong);
  border-radius: 7px; background: #fff; color: var(--text-2); font-size: 12.5px;
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-input { width: 150px; }
.filter-select { cursor: pointer; max-width: 150px; }
.filter-select:focus, .filter-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.1); }
.search-box { position: relative; width: 240px; }
.search-box .search-ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-4); pointer-events: none; }
.search-box input {
  width: 100%; height: 32px; padding: 0 10px 0 30px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  font-size: 12.5px; color: var(--text); background: #fff; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.1); }
.search-box input::placeholder { color: var(--text-4); }
.lt-selected {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary);
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.lt-progress { height: 2px; background: transparent; overflow: hidden; opacity: 0; transition: opacity 0.15s ease; }
.lt-progress.show { opacity: 1; background: var(--primary-100); position: relative; }
.lt-progress.show::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  background: var(--primary); animation: fc-indeterminate 1.1s ease-in-out infinite;
}
.list-table.is-loading .lt-table { opacity: 0.55; pointer-events: none; }
.lt-body { position: relative; min-height: 120px; }
.pager.is-disabled { pointer-events: none; opacity: 0.6; }
.lt-error {
  display: flex; align-items: center; gap: 12px;
  padding: 26px 20px; color: var(--text-2);
}
.lt-error-ico { color: var(--red); flex: 0 0 auto; }
.lt-error-main { flex: 1; min-width: 0; }
.lt-error-title { font-size: 13px; font-weight: 600; color: var(--text); }
.lt-error-msg { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* 分页器 */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px 14px; flex-wrap: wrap;
  padding: 11px 18px; border-top: 1px solid var(--border);
  background: #fff; font-size: 12px; color: var(--text-3);
}
.pager-info { display: flex; align-items: center; gap: 4px; }
.pager-total { color: var(--text); font-weight: 600; }
.pager-selected { color: var(--primary); }
.pager-ctrl { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.size-select {
  height: 28px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text-2); font-size: 12px; padding: 0 4px; cursor: pointer;
}
.page-btn {
  min-width: 28px; height: 28px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text-2); font-size: 12px; cursor: pointer;
  transition: all 0.15s ease;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager-ellipsis { color: var(--text-4); padding: 0 2px; }

/* --------------------------------------------------------------------------
 * 7. 表单
 * -------------------------------------------------------------------------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.span-2 { grid-column: 1 / -1; }
.field-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 2px; }
.req { color: var(--red); font-weight: 700; }
.field-control { min-width: 0; }
.field-hint { font-size: 11px; color: var(--text-4); line-height: 1.5; }
.field-error { display: none; font-size: 11.5px; color: var(--red); line-height: 1.5; }
.field.has-error .field-error { display: block; }
.field.has-error .input,
.field.has-error .select,
.field.has-error textarea,
.field.has-error .ss-input,
.field.has-error .matrix { border-color: var(--red); background: #fffbfa; }
.field.has-error .field-label { color: var(--red); }

.input, .select, textarea.input {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: #fff; color: var(--text); font-size: 13px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea.input { height: auto; min-height: 76px; padding: 8px 10px; line-height: 1.6; resize: vertical; }
.input:hover, .select:hover { border-color: #b8c0cc; }
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.12);
}
.input::placeholder { color: var(--text-4); }
.input[readonly], .input[disabled], .select[disabled] { background: #f8fafc; color: var(--text-3); cursor: not-allowed; }
.input[type="date"] { padding-right: 6px; }
.input[type="number"] { font-variant-numeric: tabular-nums; }

.select-wrap { position: relative; }
.select-wrap .select { appearance: none; padding-right: 30px; cursor: pointer; }
.select-arrow { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--text-4); pointer-events: none; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; min-height: 34px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  position: relative; width: 38px; height: 21px; flex: 0 0 38px;
  background: #d0d5dd; border-radius: 999px; transition: background 0.18s ease;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.2);
  transition: transform 0.18s ease;
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(17px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.2); }
.switch input:disabled + .switch-track { opacity: 0.55; }
.switch-text { font-size: 12.5px; color: var(--text-2); }

/* 远程搜索下拉 */
.search-select { position: relative; }
.ss-input { padding-right: 28px; }
.ss-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  max-height: 230px; overflow-y: auto; padding: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-pop);
  animation: fc-fade-down 0.14s ease;
}
.ss-option {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 9px; border-radius: 6px; font-size: 13px; color: var(--text-2); cursor: pointer;
}
.ss-option:hover, .ss-option.active { background: var(--primary-soft); color: var(--primary); }
.ss-sub { font-size: 11px; color: var(--text-4); }
.ss-empty { padding: 12px 8px; text-align: center; font-size: 12px; color: var(--text-4); }

/* JSON 编辑器 */
.json-editor .json-textarea {
  font-family: var(--mono); font-size: 12px; line-height: 1.65;
  min-height: 130px; background: #fcfcfd;
}

/* 码×量矩阵 */
.matrix { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: #fff; }
.matrix-scroll { overflow-x: auto; }
.matrix-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.matrix-table th, .matrix-table td {
  border-bottom: 1px solid var(--border-light); border-right: 1px solid var(--border-light);
  padding: 8px 6px; text-align: center; white-space: nowrap; min-width: 62px;
}
.matrix-table th { background: #f8fafc; color: var(--text-2); font-weight: 600; font-size: 12px; }
.matrix-table td:last-child, .matrix-table th:last-child { border-right: none; }
.matrix-table tr:last-child td { border-bottom: none; }
.matrix-table .mx-corner {
  text-align: left; padding-left: 12px; min-width: 88px;
  color: var(--text-3); font-weight: 500; background: #fcfcfd;
}
.matrix-table .mx-ratio { color: var(--text-3); font-family: var(--mono); font-size: 12px; background: #fcfcfd; }
.matrix-table .mx-ratio-row td { background: #fcfcfd; }
.mx-input {
  width: 62px; height: 30px; text-align: center; font-family: var(--mono);
  border: 1px solid var(--border-strong); border-radius: 5px; font-size: 12.5px;
  color: var(--text); background: #fff; outline: none;
}
.mx-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.1); }
.matrix-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; background: #fcfcfd; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.matrix-sum { font-size: 12.5px; color: var(--text-3); }
.matrix-sum b, .matrix-total { color: var(--primary); font-size: 15px; font-weight: 700; margin: 0 2px; font-variant-numeric: tabular-nums; }
.matrix-ops { display: flex; gap: 6px; }
.openform-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; width: 100%; }

/* --------------------------------------------------------------------------
 * 8. 浮层：模态框 / 抽屉 / toast / 确认框
 * -------------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 24px; overflow-y: auto;
  background: rgba(16, 24, 40, 0.46);
  animation: fc-fade-in 0.16s ease;
  backdrop-filter: blur(1.5px);
}
.overlay.closing { animation: fc-fade-out 0.18s ease forwards; }
.modal {
  width: 520px; max-width: 100%; max-height: 88vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 12px;
  box-shadow: 0 24px 64px rgba(16, 24, 40, 0.28);
  animation: fc-modal-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.modal-title { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4; }
.modal-close { color: var(--text-4); width: 30px; height: 30px; flex-basis: 30px; }
.modal-body { padding: 18px; overflow-y: auto; flex: 1 1 auto; }
.modal-foot {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  padding: 13px 18px; border-top: 1px solid var(--border);
  background: #fcfcfd; flex: 0 0 auto;
}
.confirm-modal { width: 420px; }
.confirm-text { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.confirm-overlay { align-items: center; padding: 16px; }

/* 抽屉 */
.drawer-overlay { padding: 0; align-items: stretch; justify-content: flex-end; background: rgba(16, 24, 40, 0.42); }
.drawer {
  width: 560px; max-width: 100vw; height: 100%;
  display: flex; flex-direction: column;
  background: #fff; box-shadow: -16px 0 48px rgba(16, 24, 40, 0.18);
  animation: fc-drawer-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer-overlay.closing .drawer { animation: fc-drawer-out 0.18s ease forwards; }
.drawer-head {
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
}
.drawer-title { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 18px; }
.drawer-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 13px 18px; border-top: 1px solid var(--border);
  background: #fcfcfd; flex: 0 0 auto;
}
.drawer-foot-actions { display: flex; gap: 8px; margin-left: auto; }

/* Toast */
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; max-width: min(400px, 92vw); }
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 14px; background: #fff;
  border: 1px solid var(--border); border-left: 3px solid var(--blue);
  border-radius: 9px; box-shadow: var(--shadow-pop);
  font-size: 13px; color: var(--text);
  animation: fc-toast-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast-ico { flex: 0 0 auto; margin-top: 1px; color: var(--blue); }
.toast-msg { flex: 1; line-height: 1.55; word-break: break-word; }
.toast-success { border-left-color: var(--green); }
.toast-success .toast-ico { color: var(--green); }
.toast-error { border-left-color: var(--red); }
.toast-error .toast-ico { color: var(--red); }
.toast-warn { border-left-color: var(--orange); }
.toast-warn .toast-ico { color: var(--orange); }
.toast-info { border-left-color: var(--blue); }
.toast.leaving { animation: fc-toast-out 0.22s ease forwards; }

/* 轻提示 */
.has-tip { position: relative; }

/* --------------------------------------------------------------------------
 * 9. 空状态 / 骨架屏 / 状态页 / 首屏启动
 * -------------------------------------------------------------------------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 34px 16px; text-align: center; }
.empty-art { color: #cbd5e1; display: grid; place-items: center; }
.empty-title { font-size: 13px; color: var(--text-3); font-weight: 500; }
.empty-hint { font-size: 11.5px; color: var(--text-4); max-width: 320px; line-height: 1.6; }

.loading-skeleton { padding: 4px 0; }
.skeleton-row { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border-light); }
.skeleton-row:last-child { border-bottom: none; }
.sk-block {
  height: 12px; border-radius: 4px;
  background: linear-gradient(90deg, #f2f4f7 25%, #e9ecf1 37%, #f2f4f7 63%);
  background-size: 400% 100%;
  animation: fc-shimmer 1.4s ease infinite;
}

.state-page {
  min-height: 56vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px 20px;
}
.state-icon {
  width: 84px; height: 84px; border-radius: 22px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--gray-soft); color: var(--text-3);
}
.state-icon.tone-orange { background: var(--orange-soft); color: #b54708; }
.state-icon.tone-blue { background: var(--primary-soft); color: var(--primary); }
.state-icon.tone-red { background: var(--red-soft); color: #b42318; }
.state-icon.tone-gray { background: var(--gray-soft); color: var(--text-3); }
.state-code { font-size: 12px; letter-spacing: 2px; color: var(--text-4); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.state-title { font-size: 20px; font-weight: 700; color: var(--text); }
.state-desc { font-size: 13px; color: var(--text-3); margin-top: 8px; max-width: 560px; line-height: 1.7; word-break: break-word; }
.state-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }

/* 首屏启动 */
.boot-screen {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; background: linear-gradient(180deg, #f7f9fc, var(--bg));
  color: var(--text-3); font-size: 13px;
}
.boot-logo { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: 1px; }
.boot-logo span { color: var(--primary); font-size: 12px; letter-spacing: 3px; margin-left: 6px; vertical-align: 3px; }
.boot-bar { width: 180px; height: 3px; border-radius: 3px; background: var(--primary-100); overflow: hidden; position: relative; }
.boot-bar i { position: absolute; inset: 0; width: 40%; border-radius: 3px; background: var(--primary); animation: fc-indeterminate 1.2s ease-in-out infinite; }
.boot-text { color: var(--text-4); font-size: 12px; }

/* --------------------------------------------------------------------------
 * 10. 图表 / 进度 / 看板 / 时间线 / 大屏瓦片
 * -------------------------------------------------------------------------- */
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; color: var(--text-3); }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.chart-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border);
  font-size: 11.5px; color: var(--text-3);
}
.chart-foot-sep { color: var(--border-strong); }
.chart .chart-bar, .chart .chart-line path { will-change: transform; }
.chart-area, .chart-plan { pointer-events: none; }
.chart-bar:hover { opacity: 0.86; }

.progress { height: 7px; border-radius: 999px; background: #eef1f5; overflow: hidden; flex: 1; min-width: 40px; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.progress-fill.tone-green { background: var(--green); }
.progress-fill.tone-orange { background: var(--orange); }
.progress-fill.tone-red { background: var(--red); }
.progress-fill.tone-blue { background: var(--primary); }
.progress-cell { display: flex; align-items: center; gap: 8px; }
.progress-text { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.kanban-col { flex: 0 0 226px; min-height: 130px; background: #f8fafc; border: 1px solid var(--border); border-radius: 9px; padding: 10px; }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; padding: 1px 3px 9px; }
.kanban-col-title { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.kanban-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); display: inline-block; }
.kanban-dot.tone-green { background: var(--green); }
.kanban-dot.tone-orange { background: var(--orange); }
.kanban-dot.tone-red { background: var(--red); }
.kanban-dot.tone-gray { background: var(--text-4); }
.kanban-dot.tone-purple { background: var(--purple); }
.kanban-count { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: #e9edf3; color: var(--text-3); font-size: 10.5px; display: inline-flex; align-items: center; }
.kanban-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 10px; margin-bottom: 8px; box-shadow: var(--shadow-card);
  font-size: 12.5px; color: var(--text-2); line-height: 1.55;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.kanban-card:last-child { margin-bottom: 0; }
.kanban-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.kanban-card-title { font-size: 12.5px; color: var(--text); font-weight: 500; }
.kanban-card-meta { font-size: 11px; color: var(--text-4); margin-top: 4px; }
.kanban-body { display: flex; flex-direction: column; }
.kanban-empty { text-align: center; color: var(--text-4); font-size: 12px; padding: 18px 0; }

.timeline { position: relative; padding-left: 16px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 5px; bottom: 4px; width: 1px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -16px; top: 4px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary); box-sizing: border-box;
}
.tl-dot.tone-green { border-color: var(--green); }
.tl-dot.tone-orange { border-color: var(--orange); }
.tl-dot.tone-red { border-color: var(--red); }
.tl-dot.tone-gray { border-color: var(--text-4); }
.tl-time { font-size: 11px; color: var(--text-4); }
.tl-title { font-size: 12.5px; color: var(--text); font-weight: 500; margin-top: 1px; }
.tl-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.55; }

.board-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); min-width: 0;
}
.bt-ico { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.board-tile.tone-green .bt-ico { background: var(--green-soft); color: var(--green); }
.board-tile.tone-orange .bt-ico { background: var(--orange-soft); color: #b54708; }
.board-tile.tone-red .bt-ico { background: var(--red-soft); color: #b42318; }
.board-tile.tone-purple .bt-ico { background: var(--purple-soft); color: #5925dc; }
.bt-main { min-width: 0; }
.bt-label { font-size: 11.5px; color: var(--text-3); }
.bt-value { font-size: 23px; font-weight: 700; color: var(--text); line-height: 1.3; font-variant-numeric: tabular-nums; letter-spacing: -0.4px; }
.bt-sub { font-size: 11px; color: var(--text-4); margin-top: 1px; }

/* --------------------------------------------------------------------------
 * 11. 登录页
 * -------------------------------------------------------------------------- */
.login-page-host { position: fixed; inset: 0; overflow-y: auto; background: #fff; }
.login-page { display: grid; grid-template-columns: 1.12fr 1fr; min-height: 100%; background: #fff; }

.login-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 34px 54px 26px;
  color: #fff;
  background:
    radial-gradient(900px 520px at 12% 4%, #1d3f8c 0%, rgba(29, 63, 140, 0) 62%),
    radial-gradient(700px 500px at 92% 88%, rgba(31, 94, 255, 0.28) 0%, rgba(31, 94, 255, 0) 60%),
    linear-gradient(160deg, #12203a 0%, #0f1a2e 46%, #0a1220 100%);
}
.login-brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 40% 45%, #000 20%, transparent 78%);
}
.login-brand::after {
  content: ""; position: absolute; width: 460px; height: 460px; right: -180px; bottom: -200px;
  border-radius: 50%; border: 1px solid rgba(94, 138, 255, 0.22);
  box-shadow: 0 0 0 60px rgba(94, 138, 255, 0.05), 0 0 0 130px rgba(94, 138, 255, 0.03);
  pointer-events: none;
}
.login-brand-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.lb-logo {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #2f6bff, #1f5eff 55%, #1749d6);
  box-shadow: 0 8px 22px rgba(31, 94, 255, 0.45);
}
.lb-names { line-height: 1.2; }
.lb-name { font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.lb-en { font-size: 9px; letter-spacing: 3px; color: #7f93b4; margin-top: 3px; }
.lb-tag {
  margin-left: auto; font-size: 10.5px; letter-spacing: 1.5px; color: #9db3d6;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 4px 10px;
}
.login-hero { position: relative; z-index: 2; margin-top: 5vh; }
.login-slogan {
  font-size: clamp(30px, 3.2vw, 44px); font-weight: 800; line-height: 1.24;
  letter-spacing: 1px; color: #fff;
  background: linear-gradient(100deg, #ffffff 10%, #c9dcff 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.login-sub { font-size: 13px; color: #9fb0cc; line-height: 1.9; margin-top: 16px; max-width: 470px; }
.login-illus { position: relative; margin: 10px 0 4px; max-width: 560px; }
.shoe-svg { width: 100%; height: auto; filter: drop-shadow(0 18px 40px rgba(31, 94, 255, 0.25)); }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 8px;
  padding: 8px 11px; border-radius: 9px;
  background: rgba(20, 34, 58, 0.82); border: 1px solid rgba(122, 160, 255, 0.26);
  box-shadow: 0 10px 26px rgba(4, 10, 22, 0.45);
  backdrop-filter: blur(6px);
  animation: fc-float 6s ease-in-out infinite;
}
.chip-1 { top: 12%; right: 4%; }
.chip-2 { top: 46%; left: 0; animation-delay: -2s; }
.chip-3 { bottom: 8%; right: 12%; animation-delay: -4s; }
.fc-ico { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; display: grid; place-items: center; background: rgba(31, 94, 255, 0.24); color: #9dbcff; }
.fc-label { font-size: 11px; color: #d7e2f7; font-weight: 600; line-height: 1.3; }
.fc-sub { font-size: 10px; color: #7f93b4; margin-top: 1px; }
.login-points { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 13px; margin-top: 12px; padding-bottom: 14px; }
.login-point { display: flex; gap: 11px; align-items: flex-start; }
.lp-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  display: grid; place-items: center; color: #8fb0ff;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
}
.lp-title { font-size: 13px; font-weight: 600; color: #e8eefb; }
.lp-desc { font-size: 11.5px; color: #8fa1bd; margin-top: 2px; line-height: 1.6; max-width: 440px; }
.login-brand-foot {
  position: relative; z-index: 2; margin-top: auto; padding-top: 16px;
  font-size: 10.5px; color: #5d6d86; display: flex; gap: 7px; flex-wrap: wrap;
}
.lb-foot-sep { color: #33425b; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 44px 40px; background: #fff; }
.login-card { width: 372px; max-width: 100%; }
.login-mobile-brand { display: none; align-items: center; gap: 9px; margin-bottom: 22px; }
.login-title { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.login-subtitle { font-size: 13px; color: var(--text-3); margin: 7px 0 22px; }
.login-notice {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; margin-bottom: 16px;
  background: var(--blue-soft); border: 1px solid var(--blue-line); border-radius: 8px;
  color: #175cd3; font-size: 12px; line-height: 1.6;
}
.login-notice .icon { margin-top: 1px; flex: 0 0 auto; }
.login-error {
  display: none; align-items: flex-start; gap: 8px;
  padding: 10px 12px; margin-bottom: 16px;
  background: var(--red-soft); border: 1px solid var(--red-line); border-radius: 8px;
  color: #b42318; font-size: 12.5px; line-height: 1.6;
}
.login-error.show { display: flex; }
.login-error .icon { margin-top: 1px; flex: 0 0 auto; }
.login-form .lf { margin-bottom: 15px; }
.lf-label { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 500; margin-bottom: 6px; }
.login-input-wrap { position: relative; }
.login-input-wrap .li-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-4); pointer-events: none; }
.login-input {
  width: 100%; height: 42px; padding: 0 40px 0 34px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 13.5px; color: var(--text); background: #fff; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-input::placeholder { color: var(--text-4); font-size: 13px; }
.login-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.13); }
.login-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center;
  border: none; background: transparent; color: var(--text-4); cursor: pointer; border-radius: 6px;
}
.login-eye:hover { color: var(--text-2); background: var(--gray-soft); }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 18px; font-size: 12.5px; }
.remember { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); cursor: pointer; user-select: none; }
.remember .checkbox { width: 14px; height: 14px; }
.forget-link { color: var(--text-3); }
.forget-link:hover { color: var(--primary); }
.login-btn { width: 100%; height: 44px; font-size: 14px; letter-spacing: 2px; }
.login-btn.loading { letter-spacing: 2px; }
.demo-box { margin-top: 22px; padding-top: 17px; border-top: 1px dashed var(--border); }
.demo-box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.demo-box-title { font-size: 11.5px; color: var(--text-3); }
.demo-fill-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border); background: #fff; color: var(--primary);
  border-radius: 6px; padding: 4px 8px; font-size: 11px; cursor: pointer;
  transition: all 0.15s ease; white-space: nowrap;
}
.demo-fill-btn:hover { border-color: var(--primary-200); background: var(--primary-soft); }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.demo-account {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "role desc" "cred cred";
  gap: 2px 6px; align-items: center; text-align: left;
  padding: 8px 9px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; cursor: pointer; transition: all 0.15s ease;
}
.demo-account:hover { border-color: var(--primary-200); background: #f7faff; }
.demo-account b { grid-area: role; font-size: 12px; font-weight: 600; color: var(--text); }
.demo-desc { grid-area: desc; font-size: 10px; color: var(--text-4); }
.demo-cred { grid-area: cred; font-size: 10.5px; color: var(--text-3); font-family: var(--mono); }
.demo-account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.login-copyright { margin-top: 18px; font-size: 10.5px; color: var(--text-4); text-align: center; line-height: 1.7; }

/* --------------------------------------------------------------------------
 * 12. 工作台
 * -------------------------------------------------------------------------- */
.home-page .page-header { margin-bottom: 16px; }
.demo-tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--orange-soft); border: 1px solid var(--orange-line);
  color: #b54708; font-size: 11px; font-weight: 600; letter-spacing: 0;
}
.row-2 { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.row-2 > .panel, .row-2b > .panel { margin-top: 0; }
.row-2b { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.home-body > .panel { margin-top: 0; }
.home-body .table-block { margin: 0; }
.home-body .table-block .table-wrap { border-top: 1px solid var(--border-light); }
.home-body .panel-body.panel-body-flush { padding: 12px 0 0; }
.home-body .panel-body.panel-body-flush .table-block { margin: 0; }
.due-tag {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px;
  background: var(--red-soft); color: #b42318; font-size: 10px; line-height: 17px; vertical-align: 1px;
}
.stage-summary {
  display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 11px;
  border-top: 1px dashed var(--border); font-size: 12px; color: var(--text-3);
}
.stage-summary b { font-size: 13px; }
.stage-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.stage-row { display: flex; align-items: center; gap: 10px; }
.stage-name { width: 40px; flex: 0 0 40px; font-size: 11.5px; color: var(--text-3); }
.stage-rate { width: 40px; flex: 0 0 40px; text-align: right; font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.alert-list { display: flex; flex-direction: column; }
.alert-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 2px; border-bottom: 1px solid var(--border-light);
  cursor: pointer; transition: background 0.15s ease;
}
.alert-row:first-child { padding-top: 2px; }
.alert-row:last-child { border-bottom: none; padding-bottom: 2px; }
.alert-row:hover { background: #fafcff; }
.alert-bar { width: 3px; height: 34px; border-radius: 2px; background: var(--orange); flex: 0 0 3px; }
.alert-bar.tone-red { background: var(--red); }
.alert-bar.tone-orange { background: var(--orange); }
.alert-main { flex: 1; min-width: 0; }
.alert-title { font-size: 12.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-impact { color: var(--orange); }
.alert-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.alert-link { display: inline-flex; align-items: center; gap: 1px; font-size: 11.5px; color: var(--primary); }

.todo-count-total { font-size: 11.5px; color: var(--text-3); }
.todo-count-total b { color: var(--text); }
.todo-list { display: flex; flex-direction: column; }
.todo-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed var(--border-light);
  cursor: pointer; border-radius: 6px; transition: background 0.15s ease;
}
.todo-row:first-child { padding-top: 2px; }
.todo-row:last-child { border-bottom: none; padding-bottom: 2px; }
.todo-row:hover { background: #fafcff; }
.todo-ico { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 7px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.todo-ico.tone-orange { background: var(--orange-soft); color: #b54708; }
.todo-ico.tone-green { background: var(--green-soft); color: #027a48; }
.todo-ico.tone-purple { background: var(--purple-soft); color: #5925dc; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 12.5px; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-meta { font-size: 11px; color: var(--text-4); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-count { font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.todo-arrow { color: var(--text-4); flex: 0 0 auto; }
.page-foot-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin-top: 16px; padding: 10px 12px;
  font-size: 11px; color: var(--text-4); line-height: 1.6;
  background: #fbfcfe; border: 1px dashed var(--border); border-radius: 8px;
}
.page-foot-note .icon { margin-top: 2px; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
 * 13. 示例页辅助
 * -------------------------------------------------------------------------- */
.preview-body { min-height: 240px; }
.preview-title { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.preview-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 12px; color: var(--text-3); }
.preview-row .progress { max-width: 240px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stock-num { font-weight: 600; }
.stock-num.tone-red { color: var(--red); }
.stock-num.tone-orange { color: var(--orange); }
.stock-num.tone-green { color: var(--text-2); }
.detail-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.detail-avatar { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.detail-name { font-size: 15px; font-weight: 600; color: var(--text); }
.detail-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.detail-head > .badge { margin-left: auto; }
.detail-progress { display: flex; align-items: center; gap: 10px; font-size: 11.5px; }
.detail-progress .progress { max-width: 220px; }

/* 账户信息抽屉 */
.account-head { display: flex; align-items: center; gap: 13px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.account-name { font-size: 16px; font-weight: 600; color: var(--text); }
.account-role { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.account-perms { margin-top: 20px; }
.account-perms-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 9px; }
.perm-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* --------------------------------------------------------------------------
 * 14. 动画
 * -------------------------------------------------------------------------- */
@keyframes fc-spin { to { transform: rotate(360deg); } }
@keyframes fc-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fc-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes fc-fade-down { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fc-modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fc-drawer-in { from { transform: translateX(100%); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes fc-drawer-out { from { transform: none; opacity: 1; } to { transform: translateX(30px); opacity: 0; } }
@keyframes fc-toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fc-toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(6px); } }
@keyframes fc-page-in { from { opacity: 0.4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes fc-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes fc-indeterminate {
  0% { left: -40%; }
  100% { left: 100%; }
}
@keyframes fc-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* --------------------------------------------------------------------------
 * 15. 响应式（契约 7.6：≤768px 侧边栏折叠为抽屉 / 表格横向滚动）
 * -------------------------------------------------------------------------- */
@media (max-width: 1400px) {
  .global-search { width: 210px; }
  .stat-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

@media (max-width: 1180px) {
  .row-2, .row-2b { grid-template-columns: 1fr; }
  .global-search { width: 180px; }
  .tenant-switch { display: none; }
  .split { grid-template-columns: 1fr !important; }
}

@media (max-width: 980px) {
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .global-search { display: none; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { padding: 32px 20px; }
  .login-mobile-brand { display: flex; }
  .login-mobile-brand .lb-name { color: var(--text); font-size: 15px; }
  .login-mobile-brand .lb-logo { width: 34px; height: 34px; flex-basis: 34px; }
}

@media (max-width: 768px) {
  :root { --topbar-h: 56px; }

  .sidebar { transform: translateX(-100%); z-index: 70; box-shadow: 24px 0 60px rgba(4, 10, 22, 0.45); }
  body.nav-open .sidebar { transform: none; }
  .sidebar-mask {
    display: none; position: fixed; inset: 0; z-index: 65;
    background: rgba(16, 24, 40, 0.42);
  }
  body.nav-open .sidebar-mask { display: block; animation: fc-fade-in 0.15s ease; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 12px; gap: 8px; }
  .crumb { font-size: 12.5px; }
  .user-chip-name, .user-chip-arrow { display: none; }
  .demo-badge { display: none; }

  .content { padding: 14px 12px 32px; }
  .page-header { margin-bottom: 14px; }
  .page-title { font-size: 18px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }

  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 11px 12px; gap: 9px; }
  .stat-ico { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; }
  .stat-value { font-size: 18px; }
  .panel-head { padding: 13px 14px 0; }
  .panel-body { padding: 14px 14px 16px; }
  .panel-body.panel-body-flush { padding: 10px 0 0; }
  .panel .table-block { margin: 0 -14px; }
  .list-toolbar { padding: 10px 14px; }
  .lt-filters { gap: 6px; }
  .filter-field { flex: 1 1 auto; }
  .filter-input, .filter-select { width: 100%; max-width: none; flex: 1; }
  .search-box { width: 100%; order: 5; }
  .lt-actions { width: 100%; justify-content: flex-end; }
  .pager { padding: 10px 14px; }
  .pager-ctrl { width: 100%; justify-content: flex-end; }

  .form { grid-template-columns: 1fr !important; gap: 13px; }
  .field.span-2 { grid-column: auto; }
  .modal { max-height: 94vh; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100% !important; border-radius: 14px 14px 0 0; animation: fc-sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .confirm-overlay { align-items: center; padding: 16px; }
  .confirm-modal { border-radius: 12px; }
  .drawer { width: 100% !important; }
  .drawer-body, .modal-body { padding: 14px; }
  .modal-foot, .drawer-foot { padding: 11px 14px; }
  .modal-foot .btn, .drawer-foot .btn { flex: 1; }
  .toast-root { right: 12px; left: 12px; bottom: 12px; max-width: none; }
  .chart-legend { justify-content: flex-start; }
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .kanban-col { flex-basis: 82%; }
  .empty { padding: 26px 12px; }
  .state-page { min-height: 46vh; padding: 26px 14px; }
  .state-actions .btn { flex: 1; }
  .detail-head { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 17px; }
  .tile-grid { grid-template-columns: 1fr; }
  .demo-accounts { grid-template-columns: 1fr; }
  .login-panel { padding: 24px 16px; }
  .login-title { font-size: 21px; }
  .chart-foot { font-size: 11px; }
  .page-actions .btn { font-size: 12.5px; }
  .crumb-group, .crumb-sep { display: none; }
  .demo-tag { display: none; }
  .pager-info { font-size: 11.5px; }
  .page-btn { min-width: 26px; height: 26px; }
  .matrix-foot { flex-direction: column; align-items: flex-start; }
}

@keyframes fc-sheet-in { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* 减少动效（工位端老设备 / 用户偏好） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
 * 16. 打印
 * -------------------------------------------------------------------------- */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .sidebar-mask, .page-actions, .list-toolbar, .pager,
  .toast-root, .overlay, .no-print { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; max-width: none; }
  .panel { border: none; box-shadow: none; }
  .data-table th { background: #f2f4f7 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge { border: 1px solid #d0d5dd; }
}
