/* ═══════════════════════════════════════════════════════════════════════════
   PC 同源设计系统 pc.css  (X-UP PC Design System)
   设计语言对齐移动端 mobile.css（品牌蓝 / 14px 圆角 / 轻阴影 / 留白舒适）
   实现方式：Bootstrap 5 追加式覆盖层（类似 app-v2.css 对 app.css 的做法）
   生效：在 layouts/app.blade.php 中置于 app-v2.css 之后引用
   原则：只改视觉，不改任何业务逻辑 / 路由 / JS 交互
   ═══════════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────────────
   1. 设计 Token（对齐 mobile.css，命名 PC 化以避免与 --wb-/--v2- 冲突）
   ─────────────────────────────────────────────────────────────────────────── */
:root {
    /* 品牌色（与移动端 --m-primary 一致） */
    --pc-primary: #2563EB;
    --pc-primary-hover: #1D4ED8;
    --pc-primary-light: #EFF6FF;
    --pc-primary-soft: rgba(37, 99, 235, 0.10);
    --pc-primary-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);

    /* 中性色 */
    --pc-bg: #F3F4F6;
    --pc-surface: #FFFFFF;
    --pc-surface-2: #F9FAFB;
    --pc-text: #1A1A2E;
    --pc-text-sub: #6B7280;
    --pc-text-muted: #9CA3AF;
    --pc-border: #EEF1F5;
    --pc-border-strong: #E5E7EB;

    /* 语义状态色（与移动端一致） */
    --pc-success: #10B981;
    --pc-success-soft: rgba(16, 185, 129, 0.10);
    --pc-warning: #F59E0B;
    --pc-warning-soft: rgba(245, 158, 11, 0.12);
    --pc-danger: #EF4444;
    --pc-danger-soft: rgba(239, 68, 68, 0.10);
    --pc-purple: #8B5CF6;
    --pc-purple-soft: rgba(139, 92, 246, 0.10);
    --pc-orange: #FB923C;
    --pc-orange-soft: rgba(251, 146, 60, 0.12);

    /* 圆角（企业风：克制方角） */
    --pc-radius: 8px;
    --pc-radius-sm: 6px;
    --pc-radius-lg: 10px;

    /* 阴影（企业风：轻细） */
    --pc-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --pc-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --pc-shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
    --pc-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);

    /* 间距阶梯 */
    --pc-gap: 12px;
    --pc-pad: 16px;
}

/* ───────────────────────────────────────────────────────────────────────────
   2. 全局基底（内容区背景 / 字体平滑）—— 仅视觉，不影响布局
   ─────────────────────────────────────────────────────────────────────────── */
body {
    background: var(--pc-bg);
    color: var(--pc-text);
    -webkit-font-smoothing: antialiased;
}

.main-area,
.content-wrap,
.page-content,
.wb-content {
    background: var(--pc-bg);
}

/* ───────────────────────────────────────────────────────────────────────────
   3. 卡片（覆盖 Bootstrap .card，981 处自动受益）
   ─────────────────────────────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    box-shadow: var(--pc-shadow-sm);
    background: var(--pc-surface);
    overflow: hidden;
}
.card-header {
    background: var(--pc-surface);
    border-bottom: 1px solid var(--pc-border);
    border-radius: var(--pc-radius) var(--pc-radius) 0 0 !important;
    font-weight: 600;
    color: var(--pc-text);
    padding: 14px 18px;
}
.card-body { padding: 18px; }
.card-footer {
    background: var(--pc-surface);
    border-top: 1px solid var(--pc-border);
    border-radius: 0 0 var(--pc-radius) var(--pc-radius) !important;
}
/* 卡片 hover 微抬升（尊重 reduced-motion） */
.card.pc-hover:hover,
a.card:hover {
    box-shadow: var(--pc-shadow-md);
    transition: box-shadow .2s ease;
}

/* ───────────────────────────────────────────────────────────────────────────
   4. 按钮（覆盖 Bootstrap .btn，791 处自动受益）
   ─────────────────────────────────────────────────────────────────────────── */
.btn {
    border-radius: var(--pc-radius-sm);
    font-weight: 500;
    transition: transform .12s ease, filter .2s ease, background .2s ease, box-shadow .2s ease;
    padding: 8px 16px;
}
.btn:active { transform: scale(0.97); filter: brightness(0.96); }
.btn-primary {
    background: var(--pc-primary);
    border-color: var(--pc-primary);
    color: #fff;
    box-shadow: none;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--pc-primary-hover);
    border-color: var(--pc-primary-hover);
    color: #fff;
}
.btn-success {
    background: #059669;
    border-color: #059669; color: #fff;
}
.btn-danger {
    background: #DC2626;
    border-color: #DC2626; color: #fff;
}
.btn-secondary, .btn-outline-secondary {
    background: #F3F4F6; border-color: #E5E7EB; color: var(--pc-text-sub);
}
.btn-outline-primary {
    border-color: var(--pc-primary); color: var(--pc-primary); background: transparent;
}
.btn-outline-primary:hover { background: var(--pc-primary-soft); color: var(--pc-primary); }
.btn-sm { border-radius: 6px; padding: 6px 12px; }

/* ───────────────────────────────────────────────────────────────────────────
   5. 表格（覆盖 Bootstrap .table，244 处自动受益）
   ─────────────────────────────────────────────────────────────────────────── */
.table {
    --bs-table-bg: var(--pc-surface);
    --bs-table-striped-bg: var(--pc-surface-2);
    color: var(--pc-text);
    border-color: var(--pc-border);
    font-size: 14px;
}
.table > :not(caption) > * > * { padding: 12px 14px; }
.table thead th {
    background: #F9FAFB;
    color: #374151;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #E5E7EB;
    white-space: nowrap;
}
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: #F8FAFF; }
.table-bordered { border-color: var(--pc-border); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: var(--pc-surface-2); }

/* ───────────────────────────────────────────────────────────────────────────
   6. 标签 / 徽章（覆盖 Bootstrap .badge，268 处自动受益）
   ─────────────────────────────────────────────────────────────────────────── */
.badge {
    font-weight: 600;
    border-radius: 4px;
    padding: 4px 9px;
    font-size: 12px;
}
.badge.bg-primary { background: rgba(37, 99, 235, 0.10) !important; color: #2563EB !important; }
.badge.bg-success { background: rgba(16, 185, 129, 0.10) !important; color: #059669 !important; }
.badge.bg-warning { background: rgba(245, 158, 11, 0.12) !important; color: #B45309 !important; }
.badge.bg-danger  { background: rgba(239, 68, 68, 0.10) !important; color: #DC2626 !important; }
.badge.bg-info    { background: rgba(8, 145, 178, 0.10) !important; color: #0891B2 !important; }
.badge.bg-secondary { background: #F3F4F6 !important; color: #4B5563 !important; }

/* ───────────────────────────────────────────────────────────────────────────
   7. 表单控件（覆盖 Bootstrap .form-control / .form-select）
   ─────────────────────────────────────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: var(--pc-radius-sm);
    border-color: #D1D5DB;
    padding: 9px 14px;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--pc-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}
.form-label, label { font-weight: 600; color: #374151; }

/* ───────────────────────────────────────────────────────────────────────────
   8. 弹窗（覆盖 Bootstrap .modal-content，332 处自动受益）
   ─────────────────────────────────────────────────────────────────────────── */
.modal-content {
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: var(--pc-radius-lg);
    box-shadow: var(--pc-shadow-lg);
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid var(--pc-border);
    padding: 16px 20px;
}
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--pc-border); padding: 14px 20px; }

/* ───────────────────────────────────────────────────────────────────────────
   9. 下拉菜单 / 分页 / tabs
   ─────────────────────────────────────────────────────────────────────────── */
.dropdown-menu {
    border: 1px solid var(--pc-border-strong);
    border-radius: var(--pc-radius-sm);
    box-shadow: var(--pc-shadow-md);
    padding: 6px;
}
.dropdown-item { border-radius: 6px; padding: 8px 12px; }
.dropdown-item:hover, .dropdown-item:focus { background: #F3F6FC; color: var(--pc-primary); }

.pagination .page-link {
    border-radius: 6px; margin: 0 2px; border-color: var(--pc-border);
    color: var(--pc-text-sub);
}
.pagination .page-item.active .page-link {
    background: var(--pc-primary); border-color: var(--pc-primary); color: #fff;
}

.nav-tabs .nav-link {
    border: none; border-bottom: 2px solid transparent;
    color: var(--pc-text-sub); font-weight: 500; padding: 10px 16px;
}
.nav-tabs .nav-link.active {
    color: var(--pc-primary); border-bottom-color: var(--pc-primary);
    background: transparent;
}
.nav-tabs { border-bottom: 1px solid var(--pc-border); }

/* ───────────────────────────────────────────────────────────────────────────
   10. PC 专属组件类（业务页面可选引用，非强制）
   ─────────────────────────────────────────────────────────────────────────── */
/* 统计卡栅格 */
.pc-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--pc-gap); margin-bottom: 20px; }
.pc-stat {
    background: var(--pc-surface); border-radius: var(--pc-radius); padding: 16px 18px;
    box-shadow: var(--pc-shadow-sm); position: relative; overflow: hidden;
}
.pc-stat::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--pc-primary), var(--pc-primary-hover)); }
.pc-stat .pc-stat-value { font-size: 26px; font-weight: 700; color: var(--pc-text); line-height: 1.2; }
.pc-stat .pc-stat-label { font-size: 13px; color: var(--pc-text-sub); margin-top: 4px; }

/* 区块标题 */
.pc-section-title {
    font-size: 16px; font-weight: 700; margin-bottom: 14px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--pc-text);
}
.pc-section-title .pc-more { font-size: 13px; color: var(--pc-primary); text-decoration: none; font-weight: 400; }

/* 筛选栏 */
.pc-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.pc-filter-btn {
    padding: 7px 16px; border-radius: 20px; border: 1px solid var(--pc-border-strong);
    font-size: 13px; white-space: nowrap; cursor: pointer; text-decoration: none;
    background: var(--pc-surface); color: var(--pc-text-sub); transition: all .2s ease;
    display: inline-flex; align-items: center; gap: 4px;
}
.pc-filter-btn:hover { border-color: var(--pc-primary); color: var(--pc-primary); }
.pc-filter-btn.active {
    background: var(--pc-primary); color: #fff; border-color: var(--pc-primary);
    box-shadow: var(--pc-primary-shadow);
}

/* 空状态 */
.pc-empty { text-align: center; padding: 48px 20px; color: var(--pc-text-muted); }
.pc-empty .pc-empty-icon { font-size: 52px; margin-bottom: 10px; color: var(--pc-text-muted); }
.pc-empty .pc-empty-text { font-size: 14px; }

/* 提示条 */
.pc-tip { display: flex; align-items: center; gap: 8px; background: var(--pc-primary-light);
    color: var(--pc-primary); padding: 10px 14px; border-radius: var(--pc-radius-sm); font-size: 13px; margin-bottom: 14px; }
.pc-tip i { font-size: 14px; flex-shrink: 0; }

/* 页面主标题区（对齐移动端 .m-page-title 的清爽感） */
.pc-page-head { margin-bottom: 18px; }
.pc-page-head h1, .pc-page-head h2, .pc-page-head .page-title { font-size: 20px; font-weight: 700; color: var(--pc-text); margin: 0; }

/* ───────────────────────────────────────────────────────────────────────────
   11. 暗色模式（修复：用高优先级 + !important 覆盖内联白底 / Bootstrap 硬编码类）
   根因：业务页 880 处内联 style + 221 处 bg-white 优先级高于 CSS 变量，
        导致暗色只作用于侧栏。此处强制覆盖。
   ─────────────────────────────────────────────────────────────────────────── */
body[data-theme="dark"] {
    --pc-bg: #0F172A;
    --pc-surface: #1E293B;
    --pc-surface-2: #243044;
    --pc-text: #E2E8F0;
    --pc-text-sub: #94A3B8;
    --pc-text-muted: #64748B;
    --pc-border: #334155;
    --pc-border-strong: #3E4C63;
    --pc-primary-light: #1E3A5F;
    --pc-primary-soft: rgba(37, 99, 235, 0.18);
    --pc-shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
    --pc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --pc-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
    --pc-success-soft: rgba(16, 185, 129, 0.16);
    --pc-warning-soft: rgba(245, 158, 11, 0.18);
    --pc-danger-soft: rgba(239, 68, 68, 0.16);
    --pc-purple-soft: rgba(139, 92, 246, 0.16);
    --pc-orange-soft: rgba(251, 146, 60, 0.18);
}

/* 暗色：强制覆盖内联白底与 Bootstrap 硬编码类（核心修复） */
body[data-theme="dark"] body,
body[data-theme="dark"] .main-area,
body[data-theme="dark"] .content-wrap,
body[data-theme="dark"] .page-content {
    background: var(--pc-bg) !important;
    color: var(--pc-text) !important;
}
body[data-theme="dark"] .card,
body[data-theme="dark"] .modal-content,
body[data-theme="dark"] .dropdown-menu,
body[data-theme="dark"] .pc-stat,
body[data-theme="dark"] .pc-section,
body[data-theme="dark"] .modal-body,
body[data-theme="dark"] .modal-header,
body[data-theme="dark"] .modal-footer {
    background: var(--pc-surface) !important;
    color: var(--pc-text) !important;
    border-color: var(--pc-border) !important;
}
/* 覆盖 Bootstrap 硬编码白底类 */
body[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-light,
body[data-theme="dark"] .bg-body { background: var(--pc-surface) !important; }
body[data-theme="dark"] .text-dark { color: var(--pc-text) !important; }
body[data-theme="dark"] .text-body { color: var(--pc-text) !important; }
/* 覆盖内联 style="background:#fff/#ffffff" 等（最高优先级） */
body[data-theme="dark"] [style*="background:#fff"],
body[data-theme="dark"] [style*="background:#ffffff"],
body[data-theme="dark"] [style*="background: #fff"],
body[data-theme="dark"] [style*="background: #ffffff"],
body[data-theme="dark"] [style*="background-color:#fff"],
body[data-theme="dark"] [style*="background-color:#ffffff"] {
    background: var(--pc-surface) !important;
}
body[data-theme="dark"] [style*="color:#333"],
body[data-theme="dark"] [style*="color:#000"],
body[data-theme="dark"] [style*="color: #333"],
body[data-theme="dark"] [style*="color: #000"] {
    color: var(--pc-text) !important;
}
/* 覆盖内联深色字的其他写法（#333333 / #1a1a1a 等） */
body[data-theme="dark"] [style*="color:#333333"],
body[data-theme="dark"] [style*="color:#1a1a1a"],
body[data-theme="dark"] [style*="color:#1A1A1A"],
body[data-theme="dark"] [style*="color:#222"],
body[data-theme="dark"] [style*="color:#111"] {
    color: var(--pc-text) !important;
}
/* 表格暗色 */
body[data-theme="dark"] .table {
    --bs-table-bg: var(--pc-surface);
    --bs-table-striped-bg: var(--pc-surface-2);
    color: var(--pc-text) !important;
    border-color: var(--pc-border) !important;
}
body[data-theme="dark"] .table thead th { background: var(--pc-surface-2) !important; color: var(--pc-text-sub) !important; }
body[data-theme="dark"] .table tbody tr:hover { background: var(--pc-primary-soft) !important; }
/* 表单暗色 */
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select {
    background: var(--pc-surface-2) !important;
    color: var(--pc-text) !important;
    border-color: var(--pc-border-strong) !important;
}
body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus { border-color: var(--pc-primary) !important; }

/* 尊重用户的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ───────────────────────────────────────────────────────────────────────────
   12. 侧栏视觉（深色企业风：深蓝黑渐变 + 白字菜单 + 蓝底白字激活态）
   策略：纯 CSS 覆盖，不动 HTML 结构与 JS 逻辑
   用 !important 覆盖 app-v2.css 的侧栏 !important 规则（pc.css 后加载胜出）
   ─────────────────────────────────────────────────────────────────────────── */
/* 侧栏外壳：深蓝黑渐变 */
body:not([data-theme="dark"]) .sidebar-shell {
    background: linear-gradient(180deg, #1B2A4A 0%, #101C35 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
}
body:not([data-theme="dark"]) body.sidebar-collapsed .sidebar-shell {
    background: linear-gradient(180deg, #1B2A4A 0%, #101C35 100%) !important;
}
/* 品牌区：白字系统名 */
body:not([data-theme="dark"]) .app-shell .sidebar-brand {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    color: #F8FAFC !important;
    padding: 10px 4px 16px !important;
    gap: 4px;
    align-items: center;
    flex-direction: column !important;
    min-height: auto !important;
}
body:not([data-theme="dark"]) .app-shell .sidebar-brand-text { color: #F8FAFC !important; font-size: 1.15rem !important; font-weight: 700; }
body:not([data-theme="dark"]) .app-shell .sidebar-brand:hover { color: #fff !important; }
body:not([data-theme="dark"]) .app-shell .sidebar-brand-img {
    filter: none !important;
    width: 64% !important; max-width: 130px !important; height: auto !important;
    border-radius: 0 !important;
    object-fit: contain;
}

/* 分组标题（顶级菜单）：白字 + hover 半透明白 */
body:not([data-theme="dark"]) .nav-group-header {
    color: #C7D2E0 !important;
    font-weight: 600 !important;
    margin: 1px 8px !important;
    border-radius: 6px !important;
}
body:not([data-theme="dark"]) .nav-group-header:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
}
body:not([data-theme="dark"]) .nav-group.open > .nav-group-header {
    color: #fff !important;
}
body:not([data-theme="dark"]) .nav-group-header.active-link {
    background: var(--pc-primary) !important;
    color: #fff !important;
    box-shadow: none !important;
}
body:not([data-theme="dark"]) .nav-group-header.active-link::before { display: none !important; }
body:not([data-theme="dark"]) .nav-group-arrow { color: rgba(199, 210, 224, 0.7) !important; font-size: .7rem !important; transition: transform .2s ease; }
body:not([data-theme="dark"]) .nav-group.open > .nav-group-header .nav-group-arrow { transform: rotate(180deg); }

/* 菜单项：白字 + 蓝底白字激活（企业风整块高亮） */
body:not([data-theme="dark"]) .sidebar-menu a {
    color: #AAB8CC !important;
    font-weight: 500 !important;
    margin: 1px 8px !important;
    padding: 9px 12px !important;
    border-radius: 6px !important;
}
body:not([data-theme="dark"]) .sidebar-menu a i {
    color: inherit !important;
    opacity: .85;
    margin-right: 8px;
    transition: color .2s ease;
}
body:not([data-theme="dark"]) .sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
    transform: none !important;
}
body:not([data-theme="dark"]) .sidebar-menu a:hover i { color: inherit !important; }
body:not([data-theme="dark"]) .sidebar-menu a.active {
    background: var(--pc-primary) !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: inset 3px 0 0 #fff !important;
}
body:not([data-theme="dark"]) .sidebar-menu a.active::before { display: none !important; }
body:not([data-theme="dark"]) .sidebar-menu a.active i { color: #fff !important; }
/* 子菜单项文字（.menu-label）：深色下用亮灰 */
body:not([data-theme="dark"]) .menu-label {
    color: inherit !important;
    font-weight: 500 !important;
}

/* 侧栏搜索框（若存在） */
body:not([data-theme="dark"]) .sidebar-search input,
body:not([data-theme="dark"]) .sidebar-menu-scroll input {
    background: rgba(255, 255, 255, 0.06) !important; border-color: rgba(255, 255, 255, 0.1) !important; color: #E2E8F0 !important;
}

/* 展开/收起侧栏按钮：深色细按钮 */
body:not([data-theme="dark"]) .sidebar-toggle-bottom {
    margin: 8px 12px 12px !important;
    padding: 8px 10px !important;
    border-top: none !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #AAB8CC !important;
    border-radius: 6px !important;
    font-size: .8rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body:not([data-theme="dark"]) .sidebar-toggle-bottom::before { display: none !important; }
body:not([data-theme="dark"]) .sidebar-toggle-bottom:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
}
body:not([data-theme="dark"]) body.sidebar-collapsed .sidebar-toggle-bottom {
    margin: 8px auto 12px !important;
    padding: 8px !important;
    width: 44px !important;
}

/* ── 顶栏（topbar）：白底 + 细边框 + 轻阴影 ── */
body:not([data-theme="dark"]) .topbar {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #E5E7EB !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
}
body:not([data-theme="dark"]) .topbar-title { color: #374151 !important; }
body:not([data-theme="dark"]) .breadcrumb-nav .current,
body:not([data-theme="dark"]) .breadcrumb-nav a { color: var(--pc-text) !important; }
body:not([data-theme="dark"]) .breadcrumb-nav .separator { color: var(--pc-text-muted) !important; }

/* ── 暗色模式下的侧栏协调（保持深色底，激活态蓝底白字） ── */
body[data-theme="dark"] .sidebar-shell {
    background: #0B1220 !important;
    border-right-color: var(--pc-border) !important;
}
body[data-theme="dark"] .sidebar-menu a.active i,
body[data-theme="dark"] .nav-group.open > .nav-group-header i { color: #60A5FA !important; }

/* 暗色下品牌区（大 logo + 浅色标题） */
body[data-theme="dark"] .app-shell .sidebar-brand {
    background: transparent !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    color: #E2E8F0 !important;
    padding: 10px 4px 16px !important;
    gap: 4px;
    align-items: center;
    flex-direction: column !important;
    min-height: auto !important;
}
body[data-theme="dark"] .app-shell .sidebar-brand-text { color: #E2E8F0 !important; font-size: 1.15rem !important; font-weight: 700; }
body[data-theme="dark"] .app-shell .sidebar-brand-img {
    filter: none !important;
    width: 64% !important; max-width: 130px !important; height: auto !important;
    border-radius: 0 !important;
    object-fit: contain;
}
/* 暗色下侧栏菜单文字 */
body[data-theme="dark"] .sidebar-menu a { color: #CBD5E1 !important; font-weight: 500 !important; }
body[data-theme="dark"] .sidebar-menu a i { color: #94A3B8 !important; }
body[data-theme="dark"] .sidebar-menu a:hover { background: rgba(37,99,235,0.18) !important; color: #60A5FA !important; }
body[data-theme="dark"] .sidebar-menu a:hover i { color: #60A5FA !important; }
body[data-theme="dark"] .sidebar-menu a.active { background: #2563EB !important; color: #fff !important; font-weight: 600 !important; }
body[data-theme="dark"] .sidebar-menu a.active i { color: #fff !important; }
body[data-theme="dark"] .menu-label { color: #E2E8F0 !important; font-weight: 500 !important; }
body[data-theme="dark"] .nav-group-header { color: #94A3B8 !important; font-weight: 600 !important; }
body[data-theme="dark"] .nav-group-header:hover { background: rgba(37,99,235,0.18) !important; color: #60A5FA !important; }
body[data-theme="dark"] .nav-group.open > .nav-group-header { color: #60A5FA !important; }
body[data-theme="dark"] .nav-group-header.active-link { background: #2563EB !important; color: #fff !important; }
body[data-theme="dark"] .nav-group-header.active-link::before { display: none !important; }
body[data-theme="dark"] .sidebar-menu a.active::before { display: none !important; }
/* 暗色下收起按钮 */
body[data-theme="dark"] .sidebar-toggle-bottom {
    margin: 8px 12px 12px !important; padding: 8px 10px !important;
    border-top: none !important; background: rgba(255,255,255,0.06) !important;
    color: #CBD5E1 !important; border-radius: 6px !important;
    font-size: .8rem !important; border: 1px solid rgba(255,255,255,0.1) !important;
}
body[data-theme="dark"] .sidebar-toggle-bottom::before { display: none !important; }
body[data-theme="dark"] .sidebar-toggle-bottom:hover { background: rgba(37,99,235,0.25) !important; color: #93C5FD !important; }
body[data-theme="dark"] body.sidebar-collapsed .sidebar-toggle-bottom { margin: 8px auto 12px !important; padding: 8px !important; width: 44px !important; }

/* ───────────────────────────────────────────────────────────────────────────
   13. 响应式（阶段4）：≤992px 侧栏抽屉化 + 表格横向滚动 + 统计卡栅格断点
   不破坏桌面布局，仅小屏兜底
   ─────────────────────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
    /* 侧栏改为覆盖式抽屉，内容区占满 */
    .app-shell .sidebar-shell {
        position: fixed !important; top: 0; bottom: 0; left: 0; z-index: 1045;
        transform: translateX(-100%); transition: transform .25s ease;
        box-shadow: var(--pc-shadow-lg) !important;
    }
    body:not(.sidebar-collapsed) .app-shell .sidebar-shell { transform: translateX(0); }
    .app-shell .topbar,
    .app-shell .shell-body { left: 0 !important; margin-left: 0 !important; }
    /* 表格横向滚动兜底层 */
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    /* 统计卡栅格窄屏单列 */
    .pc-stat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    /* 卡片内边距收紧 */
    .card-body { padding: 14px; }
    .card-header { padding: 12px 14px; }
}

/* 客户验收状态：浅橙底 + 深橙字徽章，区别于待主管审核(黄)/待质检(蓝)/返工(红) */
.badge.bg-customer {
    background-color: rgba(251, 146, 60, 0.12) !important;
    color: #C2410C !important;
    font-weight: 600;
}
.badge.bg-customer::before {
    content: "\f017"; /* fa-clock */
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands";
    font-weight: 900;
    margin-right: 4px;
    font-size: .8em;
    vertical-align: -1px;
}

/* 待质检状态：浅蓝底 + 深蓝字徽章（带放大镜图标），与客户验收橙徽章呼应 */
.badge.bg-qc {
    background-color: rgba(37, 99, 235, 0.10) !important;
    color: #2563eb !important;
    font-weight: 600;
}
.badge.bg-qc::before {
    content: "\f240"; /* fa-magnifying-glass (放大镜) */
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands";
    font-weight: 900;
    margin-right: 4px;
    font-size: .8em;
    vertical-align: -1px;
}

/* 质检验收队列：客户验收中——橙色系提示（保持不动） */
.alert-customer-soft {
    background-color: #fff7ed !important;
    border: 1px solid #fdba74 !important;
    color: #c2410c !important;
    font-weight: 600;
}
.qc-action-customer {
    border: 1px solid #fdba74 !important;
    border-radius: 8px;
    padding: 8px;
    background: #fffdf9;
}

/* 质检验收队列：待质检——蓝色系提示（与待质检徽章一致） */
.alert-qc-soft {
    background-color: #eff6ff !important;
    border: 1px solid #93c5fd !important;
    color: #1d4ed8 !important;
    font-weight: 600;
}
.qc-action-qc {
    border: 1px solid #93c5fd !important;
    border-radius: 8px;
    padding: 8px;
    background: #f8fbff;
}

/* 统一状态徽章：浅底深字方角（企业风），带图标前缀（全站一致） */
.badge.bg-secondary { background-color: #F3F4F6 !important; color: #4B5563 !important; font-weight: 600; }
.badge.bg-secondary::before { content: "\f01c"; } /* fa-inbox */
.badge.bg-info { background-color: rgba(8, 145, 178, 0.10) !important; color: #0891B2 !important; font-weight: 600; }
.badge.bg-info::before { content: "\f05a"; } /* fa-circle-info */
.badge.bg-primary { background-color: rgba(37, 99, 235, 0.10) !important; color: #2563eb !important; font-weight: 600; }
.badge.bg-primary::before { content: "\f240"; } /* fa-magnifying-glass */
.badge.bg-warning { background-color: rgba(245, 158, 11, 0.12) !important; color: #B45309 !important; font-weight: 600; }
.badge.bg-warning::before { content: "\f071"; } /* fa-exclamation-triangle */
.badge.bg-warning.text-dark { background-color: rgba(245, 158, 11, 0.12) !important; color: #B45309 !important; }
.badge.bg-customer { background-color: rgba(251, 146, 60, 0.12) !important; color: #C2410C !important; font-weight: 600; }
.badge.bg-customer::before { content: "\f017"; } /* fa-clock */
.badge.bg-success { background-color: rgba(16, 185, 129, 0.10) !important; color: #059669 !important; font-weight: 600; }
.badge.bg-success::before { content: "\f00c"; } /* fa-check */
.badge.bg-danger { background-color: rgba(239, 68, 68, 0.10) !important; color: #DC2626 !important; font-weight: 600; }
.badge.bg-danger::before { content: "\f2ea"; } /* fa-rotate-left (返工) */
.badge.bg-dark { background-color: #F3F4F6 !important; color: #374151 !important; font-weight: 600; }
.badge.bg-dark::before { content: "\f061"; } /* fa-arrow-right */
/* 统一图标前缀样式（仅对覆盖的 badge 生效） */
.badge.bg-secondary::before,
.badge.bg-info::before,
.badge.bg-primary::before,
.badge.bg-warning::before,
.badge.bg-customer::before,
.badge.bg-success::before,
.badge.bg-danger::before,
.badge.bg-dark::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands";
    font-weight: 900;
    margin-right: 4px;
    font-size: .8em;
    vertical-align: -1px;
}

/* ============================================================
   首页仪表盘 商业化（企业风 KPI + 图表）
   仅覆盖 dashboard 页面作用域，不动视图/JS 逻辑
   ============================================================ */
.dashboard .metric-card,
.metric-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
    min-height: 128px;
    overflow: hidden;
}
.dashboard .metric-card::before,
.metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    opacity: 1;
}
.dashboard .metric-card:hover,
.metric-card:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.10) !important;
    border-color: #bfdbfe !important;
    transform: translateY(-1px) !important;
}
.dashboard .metric-card .metric-label,
.metric-card .metric-label {
    color: #6b7280 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-bottom: 10px !important;
    gap: 8px;
}
.dashboard .metric-card .metric-label i,
.metric-card .metric-label i {
    width: 28px;
    height: 28px;
    font-size: 13px !important;
    line-height: 28px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb !important;
    flex-shrink: 0;
}
.dashboard .metric-card .stat-number,
.metric-card .stat-number {
    font-size: 34px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    margin-bottom: 10px !important;
    letter-spacing: -0.02em !important;
    font-variant-numeric: tabular-nums;
    color: #111827 !important;
}
.dashboard .metric-card .metric-trend,
.metric-card .metric-trend {
    font-size: 12px !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

/* 图表卡片：左竖条 accent + 企业风表头 */
.chart-card {
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
}
.chart-card .card-header {
    position: relative;
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 14px 18px !important;
    background: #ffffff !important;
}
.chart-card .card-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 2px;
    background: #2563eb;
}
.chart-card .card-header strong {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
}
.chart-card .card-header span {
    color: #9ca3af !important;
}

/* 迷你面板：白卡化 + 数字品牌蓝 */
.mini-panel {
    border-radius: 8px !important;
    background: #ffffff !important;
    padding: 18px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
}
.mini-panel h6 {
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}
.mini-panel li {
    padding: 8px 6px;
    border-bottom: 1px dashed #f3f4f6;
    border-radius: 4px;
    transition: background 0.15s;
}
.mini-panel li:hover {
    background: #f8fafc;
}
.mini-panel li strong {
    color: #2563eb !important;
    font-size: 15px;
    font-weight: 600 !important;
    background: rgba(37, 99, 235, 0.08);
    padding: 1px 10px;
    border-radius: 10px;
}

/* 最近工作记录：统一卡片风 */
.recent-card {
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
}
.recent-card .card-header {
    border-bottom: 1px solid #f3f4f6 !important;
    background: #ffffff !important;
    padding: 14px 18px !important;
}
.recent-card .card-header strong {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

/* 待办卡：头部加品牌蓝 accent 统一 */
.todo-card-header {
    padding: 14px 20px !important;
}
.todo-card-header h6 {
    font-size: 14px !important;
    color: #111827 !important;
}
.todo-item:hover {
    background: #f8fafc !important;
}

/* 暗色模式适配（保持深色侧栏企业风） */
body[data-theme="dark"] .metric-card,
body[data-theme="dark"] .chart-card,
body[data-theme="dark"] .mini-panel,
body[data-theme="dark"] .recent-card {
    background: #1f2437 !important;
    border-color: #2d3350 !important;
}
body[data-theme="dark"] .metric-card::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
body[data-theme="dark"] .metric-card .metric-label i {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd !important;
}
body[data-theme="dark"] .metric-card .stat-number {
    color: #f3f4f6 !important;
}
body[data-theme="dark"] .metric-card .metric-trend {
    background: #2d3350 !important;
    color: #94a3b8 !important;
}
body[data-theme="dark"] .chart-card .card-header,
body[data-theme="dark"] .recent-card .card-header {
    background: #1f2437 !important;
    border-bottom-color: #2d3350 !important;
}
body[data-theme="dark"] .chart-card .card-header strong,
body[data-theme="dark"] .recent-card .card-header strong,
body[data-theme="dark"] .mini-panel h6 {
    color: #e5e7eb !important;
}
body[data-theme="dark"] .mini-panel li strong {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd !important;
}
body[data-theme="dark"] .mini-panel li:hover,
body[data-theme="dark"] .todo-item:hover {
    background: #252b41 !important;
}

/* ============================================================
   批次1 精修：卡片阴影统一 + 渐变卡企业化（app-v2/app.css 残留）
   ============================================================ */
/* .card 阴影：压过 app-v2.css 的 !important（普通卡 hover 不加重阴影） */
.card {
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05) !important;
}
.card:hover {
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05) !important;
    transform: none !important;
}
/* 仅显式声明 pc-hover 的卡保留微抬升 */
.card.pc-hover:hover,
a.card:hover {
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08) !important;
    transform: translateY(-1px) !important;
}

/* stat-card-blue 渐变 → 企业风浅蓝底 + 深蓝字 */
.stat-card-blue {
    background: linear-gradient(180deg, #EFF6FF, #E0EDFF) !important;
    border: 1px solid #BFDBFE !important;
    color: #1E40AF !important;
}
.stat-card-blue:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
    border-color: #93C5FD !important;
}
.stat-card-blue .stat-label {
    color: #1D4ED8 !important;
}
.stat-card-blue .stat-value {
    color: #1E40AF !important;
}
.stat-card-blue .stat-extra {
    color: #3B82F6 !important;
}

/* ai-recommend-inner 双色渐变 → 单色浅蓝企业风 */
.ai-recommend-inner {
    background: linear-gradient(180deg, #EFF6FF, #F8FBFF) !important;
    border: 1px solid #BFDBFE !important;
    border-radius: 8px !important;
}
body[data-theme="dark"] .ai-recommend-inner {
    background: linear-gradient(180deg, #1E2A4A, #1F2437) !important;
    border-color: #2D3350 !important;
}
body[data-theme="dark"] .stat-card-blue {
    background: linear-gradient(180deg, #1E2A4A, #18233F) !important;
    border-color: #2D3350 !important;
    color: #93C5FD !important;
}
body[data-theme="dark"] .stat-card-blue .stat-label {
    color: #93C5FD !important;
}
body[data-theme="dark"] .stat-card-blue .stat-value {
    color: #BFDBFE !important;
}
body[data-theme="dark"] .stat-card-blue .stat-extra {
    color: #93C5FD !important;
}

/* ============================================================
   批次4 精修：AI分析卡统一企业风 + 财务/资产徽章方角化
   ============================================================ */
/* ai-analysis-inner（statistics/finance/assets/hr 报表共用，两套变体统一） */
.ai-analysis-inner {
    background: linear-gradient(180deg, #EFF6FF, #F8FBFF) !important;
    border: 1px solid #BFDBFE !important;
    border-radius: 8px !important;
}
.ai-analysis-header {
    background: rgba(255, 255, 255, 0.6) !important;
    border-bottom: 1px solid #BFDBFE !important;
}
.ai-analysis-badge {
    background: rgba(37, 99, 235, 0.10) !important;
    color: #1D4ED8 !important;
    border-radius: 4px !important;
}
.ai-analysis-close {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #2563EB !important;
}
.ai-analysis-close:hover {
    background: rgba(37, 99, 235, 0.16) !important;
    color: #1D4ED8 !important;
}
.ai-analysis-highlights li::before {
    color: #2563EB !important;
}
body[data-theme="dark"] .ai-analysis-inner {
    background: linear-gradient(180deg, #1E2A4A, #1F2437) !important;
    border-color: #2D3350 !important;
}
body[data-theme="dark"] .ai-analysis-header {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom-color: #2D3350 !important;
}
body[data-theme="dark"] .ai-analysis-badge {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93C5FD !important;
}
body[data-theme="dark"] .ai-analysis-close {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93C5FD !important;
}

/* badge-pill-custom（财务/资产状态徽章）：胶囊 → 方角企业风 */
.badge-pill-custom {
    border-radius: 4px !important;
    padding: 3px 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

/* 项目看板 stat-card 阴影统一轻量 */
.stat-card {
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   14. 风格A · 现代SaaS风（2026-08-31 全站商业化改造第二轮）
   对标飞书/Notion：白侧栏 + 大圆角(14/18px) + 柔和阴影 + 彩色图标底块
   策略：本段置于文件末尾，后加载胜出；token 更新自动带动全部 var() 引用处
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 14.1 Token 更新：品牌蓝 #4F6BFF + 大圆角 + 柔和阴影 ── */
:root {
    --pc-primary: #4F6BFF;
    --pc-primary-hover: #3B55E6;
    --pc-primary-light: #EEF1FF;
    --pc-primary-soft: rgba(79, 107, 255, 0.10);
    --pc-primary-shadow: 0 6px 16px rgba(79, 107, 255, 0.28);

    --pc-bg: #F6F7FB;
    --pc-text: #171B2E;
    --pc-text-sub: #5A6079;
    --pc-text-muted: #9AA0B4;
    --pc-border: #E9EBF2;
    --pc-border-strong: #DFE3EC;

    /* 风格A圆角：卡片14 / 弹窗18 / 按钮与输入10 */
    --pc-radius: 14px;
    --pc-radius-sm: 10px;
    --pc-radius-lg: 18px;

    /* 风格A阴影：双层柔阴影 */
    --pc-shadow-xs: 0 1px 2px rgba(23, 27, 46, 0.04);
    --pc-shadow-sm: 0 1px 2px rgba(23, 27, 46, 0.04), 0 6px 24px rgba(23, 27, 46, 0.05);
    --pc-shadow-md: 0 2px 4px rgba(23, 27, 46, 0.05), 0 10px 32px rgba(23, 27, 46, 0.08);
    --pc-shadow-lg: 0 12px 40px rgba(23, 27, 46, 0.16);

    /* 同步覆盖 app-v2.css 的 --wb-* 品牌变量（pc.css 后加载，:root 层胜出） */
    --wb-primary: #4F6BFF;
    --wb-primary-hover: #3B55E6;
    --wb-primary-light: #EEF1FF;
    --wb-accent: #4F6BFF;
    --wb-sidebar-active: rgba(79, 107, 255, 0.10);
}
body[data-theme="dark"] {
    --wb-primary: #6B84FF;
    --wb-primary-hover: #5A74F0;
    --wb-primary-light: #24305C;
    --wb-accent: #6B84FF;
    --wb-sidebar-active: rgba(107, 132, 255, 0.16);
}

/* ── 14.2 卡片 / 弹窗：大圆角 + 柔阴影 + hover 微抬升 ── */
.card {
    border-radius: var(--pc-radius) !important;
    border: 1px solid var(--pc-border) !important;
    box-shadow: var(--pc-shadow-sm) !important;
}
.card:hover {
    box-shadow: var(--pc-shadow-sm) !important;
    transform: none !important;
}
.card.pc-hover:hover,
a.card:hover {
    box-shadow: var(--pc-shadow-md) !important;
    transform: translateY(-2px) !important;
}
.card-header { border-radius: var(--pc-radius) var(--pc-radius) 0 0 !important; }
.modal-content { border-radius: var(--pc-radius-lg) !important; }
.dropdown-menu { border-radius: var(--pc-radius) !important; box-shadow: var(--pc-shadow-md) !important; border-color: var(--pc-border) !important; }

/* ── 14.3 按钮：渐变主按钮 + 柔和投影 ── */
.btn { border-radius: var(--pc-radius-sm); font-weight: 600; }
.btn-primary {
    background: linear-gradient(135deg, #4F6BFF, #3B55E6) !important;
    border-color: transparent !important;
    box-shadow: 0 6px 16px rgba(79, 107, 255, 0.28) !important;
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #3B55E6, #2F47D4) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 22px rgba(79, 107, 255, 0.36) !important;
}
.btn-outline-primary { border-color: #4F6BFF; color: #3B55E6; }
.btn-outline-primary:hover { background: var(--pc-primary-soft); color: #3B55E6; border-color: #4F6BFF; }

/* ── 14.4 表格：更柔和的表头与 hover ── */
.table thead th { background: #FAFBFE; color: #5A6079; border-bottom: 1px solid var(--pc-border); }
.table tbody tr:hover { background: #FAFBFE; }
.table > :not(caption) > * > * { border-color: #F2F4F8; }

/* ── 14.5 徽章：胶囊化（SaaS 感） + 品牌蓝更新 ── */
.badge {
    border-radius: 99px !important;
    padding: 4px 11px !important;
    font-weight: 600 !important;
}
.badge.bg-primary { background-color: rgba(79, 107, 255, 0.10) !important; color: #3B55E6 !important; }
.badge.bg-qc { background-color: rgba(79, 107, 255, 0.10) !important; color: #3B55E6 !important; }
.badge.bg-success { background-color: rgba(34, 176, 125, 0.10) !important; color: #16A06A !important; }
.badge.bg-warning { background-color: rgba(245, 158, 11, 0.12) !important; color: #C77F00 !important; }
.badge.bg-danger  { background-color: rgba(239, 84, 102, 0.10) !important; color: #DC3A50 !important; }
.badge.bg-customer { background-color: rgba(251, 146, 60, 0.12) !important; color: #C2410C !important; }
.badge.bg-secondary { background-color: #F1F2F6 !important; color: #5A6079 !important; }
.badge.bg-info { background-color: rgba(8, 145, 178, 0.10) !important; color: #0891B2 !important; }
.badge.bg-dark { background-color: #F1F2F6 !important; color: #4B5563 !important; }

/* ── 14.6 表单控件：圆角 + 柔和聚焦环 ── */
.form-control, .form-select {
    border-radius: var(--pc-radius-sm);
    border-color: #E2E5EC;
}
.form-control:focus, .form-select:focus {
    border-color: #4F6BFF;
    box-shadow: 0 0 0 4px rgba(79, 107, 255, 0.12);
}

/* ── 14.7 分页 / tabs / 筛选 chip ── */
.pagination .page-link { border-radius: var(--pc-radius-sm); border-color: var(--pc-border); }
.pagination .page-item.active .page-link { background: #4F6BFF; border-color: #4F6BFF; }
.pc-filter-btn { border-radius: 99px; }
.pc-filter-btn.active {
    background: #EEF1FF; color: #3B55E6; border-color: rgba(79, 107, 255, 0.45);
    box-shadow: none;
}
.pc-stat { border-radius: var(--pc-radius); box-shadow: var(--pc-shadow-sm); }
.pc-stat::after { background: linear-gradient(90deg, #4F6BFF, #7A8FFF); }

/* ── 14.8 侧栏：深蓝渐变 → 白色侧栏（风格A核心变化） ── */
body:not([data-theme="dark"]) .sidebar-shell {
    background: #FFFFFF !important;
    border-right: 1px solid var(--pc-border) !important;
    box-shadow: none !important;
}
body:not([data-theme="dark"]) body.sidebar-collapsed .sidebar-shell { background: #FFFFFF !important; }
/* 品牌区：白底深字 */
body:not([data-theme="dark"]) .app-shell .sidebar-brand {
    background: transparent !important;
    border-bottom: 1px solid var(--pc-border) !important;
    color: #171B2E !important;
}
body:not([data-theme="dark"]) .app-shell .sidebar-brand-text { color: #171B2E !important; }
body:not([data-theme="dark"]) .app-shell .sidebar-brand:hover { color: #000 !important; }
body:not([data-theme="dark"]) .app-shell .sidebar-brand-img { filter: none !important; }
/* 分组标题：浅灰字 */
body:not([data-theme="dark"]) .nav-group-header {
    color: #7A8199 !important;
    font-weight: 600 !important;
    margin: 1px 10px !important;
    border-radius: 10px !important;
}
body:not([data-theme="dark"]) .nav-group-header:hover {
    background: #F6F7FB !important;
    color: #171B2E !important;
}
body:not([data-theme="dark"]) .nav-group.open > .nav-group-header { color: #171B2E !important; }
body:not([data-theme="dark"]) .nav-group-header.active-link {
    background: #EEF1FF !important;
    color: #3B55E6 !important;
    box-shadow: none !important;
}
/* 顶级菜单激活时图标同样套蓝色渐变底块（与子菜单激活一致） */
body:not([data-theme="dark"]) .nav-group-header.active-link .nav-group-icon,
body:not([data-theme="dark"]) .nav-group.open > .nav-group-header .nav-group-icon {
    color: #4F6BFF !important;
}
body:not([data-theme="dark"]) .nav-group-header.active-link .nav-group-icon {
    color: #FFFFFF !important;
    background: linear-gradient(135deg, #4F6BFF, #3B55E6) !important;
    border-radius: 7px !important;
    box-shadow: 0 3px 8px rgba(79, 107, 255, 0.35);
}
body:not([data-theme="dark"]) .nav-group-arrow { color: #B4BACB !important; }
/* 菜单项：灰字 + 柔和激活态（soft 底 + 图标蓝色块） */
body:not([data-theme="dark"]) .sidebar-menu a {
    color: #5A6079 !important;
    font-weight: 500 !important;
    margin: 1px 10px !important;
    padding: 9px 12px !important;
    border-radius: 10px !important;
}
body:not([data-theme="dark"]) .sidebar-menu a i {
    color: #7A8199 !important;
    opacity: 1 !important;
    margin-right: 8px;
    width: 20px;
    text-align: center;
    transition: color .15s ease, background .15s ease;
}
body:not([data-theme="dark"]) .sidebar-menu a:hover {
    background: #F6F7FB !important;
    color: #171B2E !important;
    transform: none !important;
}
body:not([data-theme="dark"]) .sidebar-menu a:hover i { color: #4F6BFF !important; }
body:not([data-theme="dark"]) .sidebar-menu a.active {
    background: #EEF1FF !important;
    color: #3B55E6 !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}
body:not([data-theme="dark"]) .sidebar-menu a.active i {
    color: #FFFFFF !important;
    background: linear-gradient(135deg, #4F6BFF, #3B55E6) !important;
    border-radius: 7px !important;
    box-shadow: 0 3px 8px rgba(79, 107, 255, 0.35);
}
body:not([data-theme="dark"]) .menu-label { color: inherit !important; font-weight: 500 !important; }
body:not([data-theme="dark"]) .sidebar-search input,
body:not([data-theme="dark"]) .sidebar-menu-scroll input {
    background: #F6F7FB !important; border-color: var(--pc-border) !important; color: #171B2E !important;
}
/* 收起按钮：浅灰按钮 */
body:not([data-theme="dark"]) .sidebar-toggle-bottom {
    background: #F3F4F8 !important;
    color: #5A6079 !important;
    border: 1px solid var(--pc-border) !important;
    border-radius: 10px !important;
}
body:not([data-theme="dark"]) .sidebar-toggle-bottom:hover { background: #EEF1FF !important; color: #3B55E6 !important; }
/* 侧栏收起态下的激活图标块居中 */
body.sidebar-collapsed .sidebar-menu a.active i { margin-right: 0 !important; }

/* ── 14.9 顶栏：白底毛玻璃 + 更细的边框 ── */
body:not([data-theme="dark"]) .topbar {
    background: rgba(246, 247, 251, 0.88) !important;
    border-bottom: 1px solid var(--pc-border) !important;
    box-shadow: none !important;
}

/* ── 14.10 仪表盘：KPI 卡彩色图标底块 + 大圆角 ── */
.metric-card {
    border-radius: 18px !important;
    border: 1px solid var(--pc-border) !important;
    box-shadow: var(--pc-shadow-sm) !important;
}
.metric-card::before { content: none !important; }   /* 风格A去掉顶部渐变条 */
.metric-card:hover {
    box-shadow: var(--pc-shadow-md) !important;
    border-color: #D9DEFF !important;
    transform: translateY(-2px) !important;
}
.metric-card .metric-label i {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    background: rgba(79, 107, 255, 0.10) !important;
    color: #4F6BFF !important;
}
/* 4 张 KPI 彩色轮换（蓝/绿/橙/紫）——若卡片为兄弟节点则生效，否则统一品牌蓝 */
.metric-card:nth-of-type(4n+2) .metric-label i { background: rgba(34, 176, 125, 0.10) !important; color: #16A06A !important; }
.metric-card:nth-of-type(4n+3) .metric-label i { background: rgba(245, 158, 11, 0.12) !important; color: #D98A00 !important; }
.metric-card:nth-of-type(4n+4) .metric-label i { background: rgba(139, 92, 246, 0.10) !important; color: #8B5CF6 !important; }
.metric-card .stat-number { font-size: 32px !important; font-weight: 800 !important; color: #171B2E !important; }
.metric-card .metric-trend { border-radius: 99px !important; background: #F1F2F6 !important; color: #5A6079 !important; }

/* 图表卡 / 迷你面板 / 待办 / 最近记录：大圆角统一 */
.chart-card, .recent-card, .mini-panel {
    border-radius: 18px !important;
    border: 1px solid var(--pc-border) !important;
    box-shadow: var(--pc-shadow-sm) !important;
}
.chart-card .card-header::before { background: #4F6BFF; }
.chart-card .card-header strong, .recent-card .card-header strong { font-size: 15px !important; }
.mini-panel li strong { color: #3B55E6 !important; background: rgba(79, 107, 255, 0.10); }

/* ── 14.11 暗色模式下的 --wb-* 兼容（dark 主题沿用深蓝侧栏，仅品牌蓝微调） ── */
body[data-theme="dark"] .card {
    border-color: var(--pc-border) !important;
    box-shadow: var(--pc-shadow-sm) !important;
}
body[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #5A74F5, #4460E8) !important;
}
body[data-theme="dark"] .badge { border-radius: 99px !important; }

/* ── 14.12 滚动条细化（Webkit，SaaS 感细节） ── */
.main-area ::-webkit-scrollbar,
.shell-body ::-webkit-scrollbar,
.sidebar-menu-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.main-area ::-webkit-scrollbar-thumb,
.shell-body ::-webkit-scrollbar-thumb,
.sidebar-menu-scroll::-webkit-scrollbar-thumb {
    background: #D9DDE8; border-radius: 8px;
}
.main-area ::-webkit-scrollbar-thumb:hover,
.shell-body ::-webkit-scrollbar-thumb:hover { background: #C4C9D8; }

/* ═══════════════════════════════════════════════════════════════════════════
   15. 风格A 精修二轮（2026-08-31）：dispatch 筛选卡 + 仪表盘 KPI 彩色轮换 + 暗色校色
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 15.1 任务分配页筛选栏：软底圆角筛选卡（blade 已加 .dispatch-filter） ── */
.dispatch-filter {
    background: #F7F8FC;
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    padding: 12px 14px !important;
    margin: 0 0 14px !important;
}
.dispatch-filter .form-label { font-size: 12px; margin-bottom: 4px; color: var(--pc-text-sub); }
.dispatch-filter .form-select,
.dispatch-filter .form-control { border-radius: 9px; }
.dispatch-filter .btn { border-radius: 9px; }
body[data-theme="dark"] .dispatch-filter { background: #1B2236; border-color: #2D3350; }

/* ── 15.2 仪表盘 KPI 彩色轮换（修正：卡片被 .col 包裹，nth-of-type 必须挂在 col 上） ── */
.row[data-section="stats"] .col:nth-child(4n+2) .metric-card .metric-label i {
    background: rgba(34, 176, 125, 0.10) !important; color: #16A06A !important;
}
.row[data-section="stats"] .col:nth-child(4n+3) .metric-card .metric-label i {
    background: rgba(245, 158, 11, 0.12) !important; color: #D98A00 !important;
}
.row[data-section="stats"] .col:nth-child(4n+4) .metric-card .metric-label i {
    background: rgba(139, 92, 246, 0.10) !important; color: #8B5CF6 !important;
}

/* ── 15.3 仪表盘头部：问候加大 + 快捷按钮胶囊化 ── */
.dashboard-greeting { font-size: 25px !important; letter-spacing: -.02em; }
.quick-action-btn {
    border-radius: 99px !important;
    padding: 7px 16px !important;
    font-weight: 600 !important;
    border-color: var(--pc-border) !important;
}
.quick-action-btn:hover {
    background: #EEF1FF !important;
    border-color: rgba(79, 107, 255, 0.45) !important;
    color: #3B55E6 !important;
    transform: translateY(-1px);
}
body[data-theme="dark"] .quick-action-btn { background: #1B2236 !important; color: #A5ADC2 !important; }
body[data-theme="dark"] .quick-action-btn:hover { background: #24305C !important; color: #93A5FF !important; }

/* ── 15.4 暗色模式校色（风格A品牌蓝体系） ── */
/* 徽章：暗色下提高底色浓度与文字亮度 */
body[data-theme="dark"] .badge.bg-primary,
body[data-theme="dark"] .badge.bg-qc { background-color: rgba(107, 132, 255, 0.16) !important; color: #93A5FF !important; }
body[data-theme="dark"] .badge.bg-success { background-color: rgba(34, 176, 125, 0.16) !important; color: #4ADE9C !important; }
body[data-theme="dark"] .badge.bg-warning { background-color: rgba(245, 158, 11, 0.18) !important; color: #FBBF24 !important; }
body[data-theme="dark"] .badge.bg-danger { background-color: rgba(239, 84, 102, 0.16) !important; color: #F87A8C !important; }
body[data-theme="dark"] .badge.bg-customer { background-color: rgba(251, 146, 60, 0.16) !important; color: #FDBA74 !important; }
body[data-theme="dark"] .badge.bg-secondary,
body[data-theme="dark"] .badge.bg-dark { background-color: #2A3049 !important; color: #A5ADC2 !important; }
body[data-theme="dark"] .badge.bg-info { background-color: rgba(8, 145, 178, 0.18) !important; color: #5ED4E8 !important; }
/* 侧栏激活：暗色下用品牌蓝渐变 */
body[data-theme="dark"] .sidebar-menu a.active {
    background: linear-gradient(135deg, #4F6BFF, #3B55E6) !important;
    box-shadow: 0 4px 12px rgba(79, 107, 255, 0.35) !important;
}
body[data-theme="dark"] .nav-group-header.active-link { background: rgba(107, 132, 255, 0.18) !important; }
/* 表单聚焦环 / 分页激活：暗色品牌蓝 */
body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus {
    border-color: #6B84FF !important;
    box-shadow: 0 0 0 4px rgba(107, 132, 255, 0.15) !important;
}
body[data-theme="dark"] .pagination .page-item.active .page-link {
    background: #4F6BFF; border-color: #4F6BFF;
}
/* 筛选 chip 激活态：暗色 */
body[data-theme="dark"] .pc-filter-btn.active {
    background: rgba(107, 132, 255, 0.16); color: #93A5FF; border-color: rgba(107, 132, 255, 0.45);
}
/* 暗色滚动条 */
body[data-theme="dark"] .main-area ::-webkit-scrollbar-thumb,
body[data-theme="dark"] .shell-body ::-webkit-scrollbar-thumb,
body[data-theme="dark"] .sidebar-menu-scroll::-webkit-scrollbar-thumb { background: #3A4159; }
body[data-theme="dark"] .main-area ::-webkit-scrollbar-thumb:hover,
body[data-theme="dark"] .shell-body ::-webkit-scrollbar-thumb:hover { background: #4A5270; }
/* 暗色下表格 hover 与表头 */
body[data-theme="dark"] .table tbody tr:hover { background: #232B45 !important; }
body[data-theme="dark"] .table thead th { background: #1B2236 !important; color: #A5ADC2 !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   16. 去 AI 味收敛（2026-08-31 三轮）：纯色按钮 / 单色图标 / 圆角收紧 / 密度收紧
   原则：品牌色只用在关键动作；装饰性渐变/投影/多色轮换全部撤掉；像工具不像演示稿
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 16.1 Token 收敛：圆角 14/18→10/12，阴影单层细 ── */
:root {
    --pc-radius: 10px;
    --pc-radius-sm: 8px;
    --pc-radius-lg: 12px;
    --pc-shadow-sm: 0 1px 2px rgba(23, 27, 46, 0.05);
    --pc-shadow-md: 0 4px 16px rgba(23, 27, 46, 0.08);
    --pc-primary-shadow: 0 2px 8px rgba(79, 107, 255, 0.18);
}

/* ── 16.2 按钮：渐变/投影 → 纯色 ── */
.btn-primary {
    background: #4F6BFF !important;
    border-color: #4F6BFF !important;
    box-shadow: none !important;
}
.btn-primary:hover, .btn-primary:focus {
    background: #3B55E6 !important;
    border-color: #3B55E6 !important;
    box-shadow: none !important;
}
body[data-theme="dark"] .btn-primary { background: #4F6BFF !important; }

/* ── 16.3 徽章：胶囊 → 6px 圆角（信息标签不是糖果） ── */
.badge { border-radius: 6px !important; padding: 3px 9px !important; font-size: 12px !important; }
body[data-theme="dark"] .badge { border-radius: 6px !important; }

/* ── 16.4 侧栏：激活图标渐变底块+投影 → 纯色小图标（颜色标识足够） ── */
body:not([data-theme="dark"]) .sidebar-menu a.active i {
    color: #3B55E6 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
body:not([data-theme="dark"]) .nav-group-header.active-link .nav-group-icon {
    color: #3B55E6 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
body[data-theme="dark"] .sidebar-menu a.active {
    background: #4F6BFF !important;
    box-shadow: none !important;
}

/* ── 16.5 仪表盘 KPI：四色轮换 → 统一品牌蓝；圆角/抬升收敛；数字等宽 ── */
.row[data-section="stats"] .col:nth-child(4n+2) .metric-card .metric-label i,
.row[data-section="stats"] .col:nth-child(4n+3) .metric-card .metric-label i,
.row[data-section="stats"] .col:nth-child(4n+4) .metric-card .metric-label i {
    background: rgba(79, 107, 255, 0.08) !important;
    color: #4F6BFF !important;
}
.metric-card {
    border-radius: 12px !important;
    min-height: 112px !important;
}
.metric-card:hover {
    transform: none !important;
    box-shadow: var(--pc-shadow-md) !important;
}
.metric-card .metric-label i {
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    border-radius: 8px !important;
}
.metric-card .stat-number {
    font-size: 28px !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums !important;
}
.chart-card, .recent-card, .mini-panel { border-radius: 12px !important; }

/* ── 16.6 快捷按钮/筛选 chip：胶囊 → 8px；去 hover 浮起 ── */
.quick-action-btn {
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-weight: 500 !important;
}
.quick-action-btn:hover { transform: none !important; }
.pc-filter-btn { border-radius: 8px !important; }
.pc-filter-btn.active { box-shadow: none !important; }

/* ── 16.7 卡片交互：hover 微抬升 → 只加阴影不动位置 ── */
.card.pc-hover:hover,
a.card:hover {
    box-shadow: var(--pc-shadow-md) !important;
    transform: none !important;
}

/* ── 16.8 表格密度：行高收紧，数字列对齐 ── */
.table > :not(caption) > * > * { padding: 10px 14px; }
.table { font-variant-numeric: tabular-nums; }

/* ── 16.9 弹窗/下拉圆角同步收敛 ── */
.modal-content { border-radius: 12px !important; }
.dropdown-menu { border-radius: 10px !important; }
