
        :root {
            /* === 主题色变量（JS动态修改）=== */
            --primary: #1e3c72;
            --primary-light: #2a52a0;
            --primary-dark: #0f2040;
            --accent: #3b82f6;
            --accent-light: #eff6ff;
            --sidebar-grad-1: #0f2040;
            --sidebar-grad-2: #1e3c72;
            --sidebar-grad-3: #1a4080;
            --logo-grad-1: #3b82f6;
            --logo-grad-2: #60a5fa;
            --nav-active-bg: rgba(59,130,246,.25);
            --nav-active-border: #3b82f6;
            --nav-sub-active-bg: rgba(59,130,246,.18);
            --nav-sub-active-color: #93c5fd;
            /* === 固定色 === */
            --success: #10b981;
            --success-light: #d1fae5;
            --warning: #f59e0b;
            --warning-light: #fef3c7;
            --danger: #ef4444;
            --danger-light: #fee2e2;
            --gray-50: #f8fafc;
            --gray-100: #f1f5f9;
            --gray-200: #e2e8f0;
            --gray-300: #cbd5e1;
            --gray-400: #94a3b8;
            --gray-500: #64748b;
            --gray-600: #475569;
            --gray-700: #334155;
            --gray-800: #1e293b;
            --gray-900: #0f172a;
            --sidebar-width: 220px;
            --topbar-height: 64px;
            --radius-sm: 8px;
            --radius: 12px;
            --radius-lg: 16px;
            --radius-xl: 24px;
            --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
            --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
            --shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
            --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
            /* === 缓动曲线 === */
            --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
            --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
            --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
            --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        /* ===== 全局自定义滚动条 ===== */
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.4); border-radius: 4px; transition: background 0.2s; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.6); }
        ::-webkit-scrollbar-corner { background: transparent; }
        * { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.4) transparent; }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 50%, #f1f5f9 100%);
            font-family: 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
            color: var(--gray-800); font-size: 14px;
            display: flex; height: 100vh; overflow: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
            font-feature-settings: 'kern' 1, 'liga' 1;
            -webkit-text-size-adjust: 100%;
        }
        /* 数字等宽对齐 */
        .stat-value, .db-kpi-value, .db-alert-value, .td-money, .amount-display, .receipt-amount, .db-kpi-value-sm {
            font-variant-numeric: tabular-nums;
            font-feature-settings: 'tnum' 1;
        }

        /* ===== 侧边栏 ===== */
        .sidebar {
            width: var(--sidebar-width);
            background: linear-gradient(170deg, var(--sidebar-grad-1) 0%, var(--sidebar-grad-2) 60%, var(--sidebar-grad-3) 100%);
            display: flex; flex-direction: column;
            padding: 0; position: relative; z-index: 10;
            box-shadow: 4px 0 24px rgba(0,0,0,.18);
            flex-shrink: 0;
        }
        /* 侧边栏顶部光泽装饰 */
        .sidebar::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0; height: 300px;
            background: radial-gradient(ellipse at top, rgba(59,130,246,0.15), transparent 70%);
            pointer-events: none;
        }
        .sidebar-logo {
            padding: 20px 20px 16px;
            border-bottom: 1px solid rgba(255,255,255,.08);
        }
        .logo-wrap { display: flex; align-items: center; gap: 10px; }
        .logo-icon {
            width: 40px; height: 40px; border-radius: 12px;
            background: linear-gradient(135deg, var(--logo-grad-1), var(--logo-grad-2));
            display: flex; align-items: center; justify-content: center;
            font-size: 18px; color: white;
            box-shadow: 0 4px 16px rgba(59,130,246,.4), inset 0 1px 0 rgba(255,255,255,0.3);
            position: relative;
        }
        .logo-icon::after {
            content: ''; position: absolute; inset: 0; border-radius: 12px;
            background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 50%);
            pointer-events: none;
        }
        .logo-text { color: white; font-weight: 700; font-size: 16px; line-height: 1.2; letter-spacing: 0.5px; }
        .logo-sub { color: rgba(255,255,255,.5); font-size: 11px; font-weight: 400; letter-spacing: 0.3px; }
        .sidebar-nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
        .nav-group { margin-bottom: 16px; }
        .nav-group-title { color: rgba(255,255,255,.35); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 0 8px; margin-bottom: 8px; }
        .nav-group.major { margin-bottom: 4px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }
        .nav-group.major .nav-group-title { color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: 2px; margin-bottom: 10px; }
        .nav-item {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 12px; border-radius: var(--radius-sm);
            color: rgba(255,255,255,.6); cursor: pointer;
            transition: all var(--transition-fast); margin-bottom: 2px; font-weight: 500;
            user-select: none; position: relative;
        }
        .nav-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); transform: translateX(2px); }
        .nav-item.active {
            background: linear-gradient(90deg, var(--nav-active-bg), rgba(59,130,246,.08)); color: white;
            box-shadow: inset 3px 0 0 var(--nav-active-border), 0 2px 8px rgba(59,130,246,.15);
        }
        .nav-item .nav-icon { width: 18px; text-align: center; font-size: 14px; }
        /* 二级子菜单 */
        .nav-item-parent { position: relative; }
        .nav-item-parent > .nav-item { padding-right: 28px; }
        .nav-item-parent > .nav-item .nav-arrow {
            position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
            font-size: 10px; color: rgba(255,255,255,.4); transition: transform var(--transition);
        }
        .nav-item-parent.open > .nav-item .nav-arrow { transform: translateY(-50%) rotate(90deg); }
        .nav-sub {
            overflow: hidden; max-height: 0;
            transition: max-height var(--transition);
        }
        .nav-item-parent.open .nav-sub { max-height: 300px; }
        .nav-sub-item {
            display: flex; align-items: center; gap: 8px;
            padding: 8px 12px 8px 34px;
            color: rgba(255,255,255,.5); cursor: pointer; border-radius: var(--radius-sm);
            font-size: 13px; font-weight: 400; transition: all var(--transition-fast); margin-bottom: 1px;
        }
        .nav-sub-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); transform: translateX(2px); }
        .nav-sub-item.active { background: var(--nav-sub-active-bg); color: var(--nav-sub-active-color); font-weight: 500; }
        .nav-sub-item .sub-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.6; flex-shrink: 0; }
        /* 客户类型横排标签 */
        .cust-type-tab {
            display: inline-flex; align-items: center; padding: 5px 14px;
            font-size: 13px; color: var(--gray-600); background: var(--gray-100);
            border: 1px solid var(--gray-200); border-radius: 20px;
            cursor: pointer; white-space: nowrap; transition: all var(--transition-fast); user-select: none;
            position: relative;
        }
        .cust-type-tab:hover { background: #e0e7ff; border-color: #c7d2fe; color: #4338ca; transform: translateY(-1px); }
        .cust-type-tab.active {
            background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 500;
            box-shadow: 0 1px 4px rgba(59,130,246,.3);
        }
        .cust-type-tab.active::before {
            content: '';
            display: inline-block;
            width: 6px; height: 6px;
            border-radius: 50%;
            background: #fff;
            margin-right: 6px;
            flex-shrink: 0;
        }
        .cust-type-tag {
            display: inline-flex; align-items: center; padding: 4px 12px;
            font-size: 12px; color: var(--gray-600); background: var(--gray-50);
            border: 1px solid var(--gray-300); border-radius: 16px;
            cursor: pointer; white-space: nowrap; transition: all var(--transition-fast); user-select: none;
        }
        .cust-type-tag:hover { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
        .cust-type-tag.active {
            background: #f59e0b; color: #fff; border-color: #f59e0b; font-weight: 500;
            box-shadow: 0 1px 4px rgba(245,158,11,.3);
        }
        .sidebar-footer { flex-shrink: 0; padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }
        .user-card { display: flex; align-items: center; gap: 10px; }
        .user-avatar {
            width: 36px; height: 36px; border-radius: 50%;
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            display: flex; align-items: center; justify-content: center;
            color: white; font-size: 14px; font-weight: 700; flex-shrink: 0;
            box-shadow: 0 2px 8px rgba(59,130,246,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
            object-fit: cover; overflow: hidden;
        }
        .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
        .user-name { color: rgba(255,255,255,.85); font-weight: 600; font-size: 13px; }
        .user-role { color: rgba(255,255,255,.4); font-size: 11px; }

        /* 表单多选下拉 */
        .form-ms-wrap { position: relative; width: 100%; }
        .form-ms-btn {
            width: 100%; padding: 8px 14px; border: 1.5px solid var(--gray-200);
            border-radius: 10px; font-size: 13px; color: var(--gray-700);
            background: linear-gradient(180deg, #ffffff, #fafbfc); text-align: left; cursor: pointer;
            display: flex; align-items: center; justify-content: space-between;
            min-height: 40px; box-sizing: border-box; transition: all var(--transition-fast);
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
        }
        .form-ms-btn:hover { border-color: var(--gray-300); background: white; }
        .form-ms-btn:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 4px rgba(59,130,246,.12); outline: none; }
        .form-ms-btn .placeholder { color: var(--gray-300); }
        .form-ms-btn .chevron { transition: transform var(--transition-fast); font-size: 10px; color: var(--gray-400); }
        .form-ms-btn .chevron.open { transform: rotate(180deg); }
        .form-ms-panel {
            display: none; position: absolute; z-index: 100;
            left: 0; right: 0; top: calc(100% + 4px);
            background: white; border: 1px solid rgba(226,232,240,0.8);
            border-radius: 12px;
            max-height: 200px; overflow-y: auto;
            box-shadow: 0 12px 32px rgba(0,0,0,.12);
        }
        .form-ms-panel.show { display: block; animation: dropdownIn 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
        .form-ms-panel label {
            display: flex; align-items: center; gap: 8px;
            padding: 7px 14px; font-size: 13px; cursor: pointer;
            white-space: nowrap; transition: background var(--transition-fast);
        }
        .form-ms-panel label:hover { background: linear-gradient(90deg, var(--accent-light), transparent); }
        .form-ms-panel input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

        /* ===== 主内容区 ===== */
        .main-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
        .topbar {
            height: var(--topbar-height); background: rgba(255,255,255,0.75);
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(226,232,240,0.6);
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 28px; flex-shrink: 0;
            box-shadow: 0 1px 12px rgba(0,0,0,0.04);
            position: relative; z-index: 50;
        }
        .topbar-left { display: flex; align-items: center; gap: 12px; }
        .page-title { font-size: 18px; font-weight: 700; color: var(--gray-800); letter-spacing: 0.3px; background: linear-gradient(135deg, var(--gray-800), var(--gray-600)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
        .breadcrumb { font-size: 12px; color: var(--gray-400); }
        .topbar-right { display: flex; align-items: center; gap: 12px; position: relative; }
        .topbar-action {
            width: 36px; height: 36px; border-radius: var(--radius-sm);
            background: var(--gray-100); display: flex; align-items: center;
            justify-content: center; cursor: pointer; color: var(--gray-500);
            transition: all var(--transition-fast); position: relative;
        }
        .topbar-action:hover { background: var(--gray-200); color: var(--gray-700); transform: scale(1.08); }
        .topbar-action:active { transform: scale(0.95); }
        /* 主题切换面板 */
        .theme-dot {
            width: 32px; height: 32px; border-radius: 50%;
            cursor: pointer; border: 2px solid transparent;
            transition: all var(--transition-fast); box-shadow: 0 1px 4px rgba(0,0,0,.15);
        }
        .theme-dot:hover { transform: scale(1.18); border-color: var(--gray-400); }
        .theme-dot:active { transform: scale(1.05); }
        .theme-dot.active { border-color: var(--gray-800); box-shadow: 0 0 0 2px var(--gray-800); }
        .badge-dot {
            position: absolute; top: 7px; right: 7px;
            width: 8px; height: 8px; background: var(--danger);
            border-radius: 50%; border: 2px solid white;
        }
        .datetime-chip {
            background: var(--gray-100); padding: 6px 14px;
            border-radius: 20px; font-size: 12px; font-weight: 500;
            color: var(--gray-600); letter-spacing: 0.5px;
            transition: background var(--transition-fast);
        }
        .datetime-chip:hover { background: var(--gray-200); }
        .content-area { flex: 1; overflow-y: auto; padding: 24px 28px; position: relative; }
        /* 内容区微妙的渐变背景 */
        .content-area::before {
            content: ''; position: fixed; top: 0; right: 0; width: 400px; height: 400px;
            background: radial-gradient(circle, rgba(59,130,246,0.04), transparent 70%);
            pointer-events: none; z-index: 0;
        }
        .content-area::after {
            content: ''; position: fixed; bottom: 0; left: 220px; width: 500px; height: 500px;
            background: radial-gradient(circle, rgba(139,92,246,0.03), transparent 70%);
            pointer-events: none; z-index: 0;
        }
        .content-area > * { position: relative; z-index: 1; }

        /* ===== 统计卡片 ===== */
        .stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
        .stat-card {
            background: linear-gradient(145deg, white, #fbfcfd); border-radius: var(--radius-lg);
            padding: 20px; border: 1px solid rgba(226,232,240,0.8);
            cursor: pointer; transition: all var(--transition);
            position: relative; overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        }
        .stat-card::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0;
            height: 3px; background: linear-gradient(90deg, var(--accent), #8b5cf6);
            transition: height var(--transition);
        }
        .stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.2); }
        .stat-card:hover::before { height: 5px; }
        .stat-card.green::before { background: var(--success); }
        .stat-card.orange::before { background: var(--warning); }
        .stat-card.red::before { background: var(--danger); }
        .stat-card.purple::before { background: #8b5cf6; }
        .stat-icon {
            width: 38px; height: 38px; border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            font-size: 15px; margin-bottom: 12px; position: relative;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
        }
        .stat-icon.blue { background: linear-gradient(135deg, #dbeafe, #eff6ff); color: var(--accent); }
        .stat-icon.green { background: linear-gradient(135deg, #d1fae5, #ecfdf5); color: var(--success); }
        .stat-icon.orange { background: linear-gradient(135deg, #fef3c7, #fffbeb); color: var(--warning); }
        .stat-icon.red { background: linear-gradient(135deg, #fee2e2, #fef2f2); color: var(--danger); }
        .stat-icon.purple { background: linear-gradient(135deg, #ede9fe, #f5f3ff); color: #8b5cf6; }
        .stat-label { font-size: 12px; color: var(--gray-500); font-weight: 500; margin-bottom: 6px; }
        .stat-value { font-size: 26px; font-weight: 800; color: var(--gray-900); line-height: 1; letter-spacing: -0.5px; }
        .stat-sub { font-size: 11px; color: var(--gray-400); margin-top: 4px; }

        /* ===== 新版仪表盘 ===== */
        /* 顶部提醒行 */
        .db-reminder-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
        .db-reminder-card {
            background:linear-gradient(145deg,#fff,#fbfcfd); border-radius:10px; border:1px solid rgba(226,232,240,0.8); overflow:hidden;
            display:flex; flex-direction:column; max-height:240px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.03);
        }
        .db-reminder-header {
            display:flex; align-items:center; gap:6px; padding:7px 10px;
            border-bottom:1px solid #f3f4f6; flex-shrink:0;
        }
        .db-reminder-title { font-size:12px; font-weight:700; color:#374151; display:flex; align-items:center; gap:4px; }
        .db-reminder-title i { font-size:12px; }
        .db-reminder-todo .db-reminder-title i { color:#f59e0b; }
        .db-reminder-followup .db-reminder-title i { color:#ef4444; }
        .db-reminder-count {
            background:#ef4444; color:#fff; font-size:10px; font-weight:700;
            min-width:16px; height:16px; border-radius:8px; text-align:center; line-height:16px; padding:0 4px;
        }
        .db-reminder-count.zero { background:#d1d5db; }
        .db-reminder-body { flex:1; overflow-y:auto; padding:2px 0; }
        .db-reminder-body::-webkit-scrollbar { width:4px; }
        .db-reminder-body::-webkit-scrollbar-thumb { background:#d1d5db; border-radius:2px; }
        .db-reminder-item {
            display:flex; align-items:flex-start; gap:6px; padding:5px 10px;
            cursor:pointer; transition:background var(--transition-fast),transform var(--transition-fast); border-bottom:1px solid #f9fafb;
        }
        .db-reminder-item:hover { background:#f9fafb; transform:translateX(2px); }
        .db-reminder-item:last-child { border-bottom:none; }
        .db-reminder-item-icon {
            width:22px; height:22px; border-radius:6px; display:flex; align-items:center; justify-content:center;
            font-size:10px; flex-shrink:0;
        }
        .db-reminder-item-icon.red { background:#fee2e2; color:#ef4444; }
        .db-reminder-item-icon.orange { background:#fef3c7; color:#f59e0b; }
        .db-reminder-item-icon.blue { background:#eff6ff; color:#3b82f6; }
        .db-reminder-item-icon.green { background:#d1fae5; color:#10b981; }
        .db-reminder-item-icon.purple { background:#f3e8ff; color:#8b5cf6; }
        .db-reminder-item-body { flex:1; min-width:0; }
        .db-reminder-item-title { font-size:11px; font-weight:600; color:#374151; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
        .db-reminder-item-desc { font-size:10px; color:#9ca3af; margin-top:1px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
        .db-reminder-item-meta { font-size:9px; margin-top:1px; display:flex; align-items:center; gap:4px; }
        .db-reminder-item-meta .tag { padding:1px 4px; border-radius:3px; font-weight:600; }
        .db-reminder-item-meta .tag.overdue { background:#fee2e2; color:#ef4444; }
        .db-reminder-item-meta .tag.soon { background:#fef3c7; color:#f59e0b; }
        .db-reminder-item-meta .tag.normal { background:#eff6ff; color:#3b82f6; }
        .db-reminder-empty { text-align:center; padding:18px 8px; color:#d1d5db; }
        .db-reminder-empty i { font-size:20px; display:block; margin-bottom:4px; }
        .db-reminder-empty p { font-size:11px; }
        /* ===== 仪表盘日历 ===== */
        .db-calendar-section {
            background:linear-gradient(145deg,#fff,#fbfcfd); border-radius:2px; border:1px solid rgba(226,232,240,0.8);
            padding:2px; margin-top:2px; box-shadow:0 0 1px rgba(0,0,0,0.03);
        }
        .db-cal-hd { display:flex; align-items:center; justify-content:space-between; margin-bottom:1px; }
        .db-cal-hd .cal-month { font-size:15px; font-weight:700; color:#374151; }
        .db-cal-hd .cal-nav { display:flex; gap:1px; }
        .db-cal-hd .cal-nav .cal-btn {
            width:5px; height:5px; border-radius:50%; border:1px solid #e5e7eb; background:#fff; color:#6b7280;
            cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:10px; transition:all var(--transition-fast);
        }
        .db-cal-hd .cal-nav .cal-btn:hover { background:#f3f4f6; border-color:#d1d5db; }
        .db-cal-hd .cal-nav .cal-btn-today {
            width:auto; border-radius:2px; padding:0 1px; font-size:10px; font-weight:600;
        }
        .db-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:0.5px; text-align:center; }
        .db-cal-dow { font-size:12px; color:#9ca3af; font-weight:600; padding:0; }
        .db-cal-dow.we { color:#ef4444; }
        .db-cal-cell {
            aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
            border-radius:1px; font-size:15px; color:#374151; cursor:pointer; position:relative; transition:all var(--transition-fast); gap:0px;
            font-weight:300;
        }
        .db-cal-cell:hover:not(.db-cal-other) { background:#f3f4f6; }
        .db-cal-cell:active { transform:scale(.93); }
        .db-cal-cell.db-cal-other { color:#d1d5db; }
        .db-cal-cell.db-cal-we { color:#ef4444; }
        .db-cal-cell.db-cal-today { background:#3b82f6; color:#fff; font-weight:700; box-shadow:0 1px 4px rgba(59,130,246,.25); }
        .db-cal-cell.db-cal-today.db-cal-other { background:rgba(59,130,246,.08); color:#3b82f6; font-weight:500; box-shadow:none; }
        .db-cal-dots { display:flex; gap:0; flex-wrap:wrap; justify-content:center; max-width:100%; }
        .db-cal-dot { width:5px; height:5px; border-radius:50%; flex-shrink:0; margin:1px; }
        .db-cal-dot.birth { background:#ec4899; box-shadow:0 0 3px rgba(236,72,153,.5); }
        .db-cal-dot.task { background:#3b82f6; box-shadow:0 0 3px rgba(59,130,246,.5); }
        .db-cal-dot.follow { background:#f59e0b; box-shadow:0 0 3px rgba(245,158,11,.5); }
        .db-cal-dot.remind { background:#8b5cf6; box-shadow:0 0 3px rgba(139,92,246,.5); }
        .db-cal-dot.holiday { background:#ef4444; }
        .db-cal-dot.tax { background:#f59e0b; }
        .db-cal-lunar { font-size:9px; color:#9ca3af; margin-top:1px; transform:scale(0.9); line-height:1; font-weight:400; }
        .db-cal-cell.db-cal-today .db-cal-lunar { color:rgba(255,255,255,0.9); }
        .db-cal-cell.db-cal-holiday .db-cal-day { color:#ef4444; font-weight:600; }
        .db-cal-cell.db-cal-holiday .db-cal-lunar { color:#ef4444; }
        .db-cal-cell.db-cal-today.db-cal-holiday .db-cal-day,
        .db-cal-cell.db-cal-today.db-cal-holiday .db-cal-lunar { color:#fff; }
        .db-cal-festival { font-size:8px; color:#ef4444; position:absolute; top:1px; right:1px; line-height:1; }
        /* Tax deadline highlight */
        .db-cal-cell.db-cal-tax-deadline {
            background: linear-gradient(135deg, rgba(249,115,22,.12) 0%, rgba(251,191,36,.06) 100%);
            box-shadow: inset 0 0 0 2px #f97316;
            border-radius: 8px;
        }
        .db-cal-cell.db-cal-tax-deadline .db-cal-day { color:#ea580c; font-weight:700; }
        .db-cal-cell.db-cal-tax-deadline .db-cal-lunar { color:#ea580c; }
        .db-cal-cell.db-cal-today.db-cal-tax-deadline { background:#3b82f6; box-shadow: 0 1px 4px rgba(59,130,246,.25), inset 0 0 0 2px #f97316; }
        .db-cal-cell.db-cal-today.db-cal-tax-deadline .db-cal-day { color:#fff; }
        .db-cal-cell.db-cal-today.db-cal-tax-deadline .db-cal-lunar { color:rgba(255,255,255,.9); }
        .db-cal-tax-badge { font-size:7px; background:#f97316; color:#fff; border-radius:2px; padding:0.5px 2px; position:absolute; bottom:2px; right:1px; line-height:1; font-weight:700; }
        .db-cal-tax-start { font-size:9px; color:#f97316; line-height:1; font-weight:600; }
        .db-cal-legend { display:flex; gap:2px; margin-top:1px; font-size:12px; color:#9ca3af; flex-wrap:wrap; justify-content:center; }
        .db-cal-legend span { display:flex; align-items:center; gap:1px; }
        .db-cal-legend .ld { border-radius:50%; }
        /* 日历作为仪表盘右侧看板组件时，撑满看板容器 */
        .dash-w-cal .dash-w-body { padding:4px; }
        .dash-w-cal .db-calendar-section { height:100%; margin:0; box-sizing:border-box; display:flex; flex-direction:column; }
        .dash-w-cal .db-cal-grid { flex:1; }
        /* Calendar day popup (right-side drawer) */
        .db-cal-pop-overlay { position:fixed; inset:0; background:rgba(0,0,0,.2); z-index:10000; animation:dbFadeIn .2s ease; }
        .db-cal-pop {
            position:fixed; right:0; top:0; bottom:0;
            background:#fff; border-radius:16px 0 0 16px; box-shadow:0 16px 48px rgba(0,0,0,.18);
            z-index:10001; width:400px; max-width:90vw; height:100vh; max-height:100vh; overflow-y:auto;
            animation:dbPopSlide .25s cubic-bezier(0.34,1.56,0.64,1);
        }
        @keyframes dbFadeIn { from{opacity:0} to{opacity:1} }
        @keyframes dbPopSlide { from{opacity:0;transform:translateX(100%)} to{opacity:1;transform:translateX(0)} }
        .db-cal-pop-hd { display:flex; justify-content:space-between; align-items:center; padding:14px 18px; border-bottom:1px solid #f3f4f6; position:sticky; top:0; background:#fff; border-radius:16px 0 0 0; z-index:1; }
        .db-cal-pop-title { font-size:15px; font-weight:700; color:#374151; }
        .db-cal-pop-close { width:30px; height:30px; border-radius:50%; background:#f3f4f6; border:none; cursor:pointer; color:#6b7280; font-size:15px; display:flex; align-items:center; justify-content:center; }
        .db-cal-pop-close:hover { background:#e5e7eb; }
        .db-cal-pop-body { padding:8px 18px 18px; }
        .db-cal-pop-item {
            display:flex; align-items:flex-start; gap:10px; padding:10px 14px; background:#f9fafb; border-radius:10px;
            margin-top:8px; transition:background var(--transition-fast); cursor:pointer;
        }
        .db-cal-pop-item:hover { background:#f3f4f6; }
        .db-cal-pop-icon { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
        .db-cal-pop-icon.birth { background:#fce7f3; color:#ec4899; }
        .db-cal-pop-icon.task { background:#dbeafe; color:#3b82f6; }
        .db-cal-pop-icon.follow { background:#fef3c7; color:#f59e0b; }
        .db-cal-pop-icon.remind { background:#f3e8ff; color:#8b5cf6; }

        /* 分类管理 - 右侧抽屉 */
        .mgr-drawer-overlay { position:fixed; inset:0; background:rgba(0,0,0,.2); z-index:10002; animation:dbFadeIn .2s ease; }
        .mgr-drawer { position:fixed; right:0; top:0; bottom:0; background:#fff; border-radius:16px 0 0 16px; box-shadow:0 16px 48px rgba(0,0,0,.18); z-index:10003; width:420px; max-width:92vw; height:100vh; max-height:100vh; overflow-y:auto; animation:dbPopSlide .25s cubic-bezier(0.34,1.56,0.64,1); }
        .mgr-drawer-hd { display:flex; justify-content:space-between; align-items:center; padding:16px 18px; border-bottom:1px solid #f3f4f6; position:sticky; top:0; background:#fff; border-radius:16px 0 0 0; z-index:1; }
        .mgr-drawer-title { font-size:15px; font-weight:700; color:#374151; }
        .mgr-drawer-close { width:30px; height:30px; border-radius:50%; background:#f3f4f6; border:none; cursor:pointer; color:#6b7280; font-size:18px; display:flex; align-items:center; justify-content:center; }
        .mgr-drawer-close:hover { background:#e5e7eb; }
        .mgr-drawer-body { padding:14px 18px 24px; }
        .db-cal-pop-icon.holiday { background:#fee2e2; color:#ef4444; }
        .db-cal-pop-icon.tax { background:#fef3c7; color:#f59e0b; }
        .db-cal-pop-dayinfo { display:flex; gap:10px; align-items:center; padding:10px 14px; background:#f9fafb; border-radius:10px; margin-top:8px; font-size:12px; color:#374151; }
        .db-cal-pop-dayinfo .badge { font-size:10px; padding:1px 6px; border-radius:10px; }
        .db-cal-pop-dayinfo .badge.holiday { background:#fee2e2; color:#ef4444; }
        .db-cal-pop-dayinfo .badge.workday { background:#dbeafe; color:#3b82f6; }
        .db-cal-pop-name { font-size:13px; font-weight:600; color:#374151; }
        .db-cal-pop-meta { font-size:11px; color:#9ca3af; margin-top:2px; }
        .db-cal-pop-empty { text-align:center; padding:24px; color:#d1d5db; font-size:13px; }
        /* 日历日期悬停预览 */
        .db-cal-tip {
            position:fixed; z-index:10002; display:none; min-width:200px; max-width:280px;
            background:#fff; border:1px solid #e5e7eb; border-radius:12px; box-shadow:0 12px 32px rgba(0,0,0,.16);
            padding:8px 10px; pointer-events:none; animation:dbFadeIn .12s ease;
        }
        .db-cal-tip-hd { font-size:12px; font-weight:700; color:#374151; padding:2px 4px 6px; border-bottom:1px solid #f3f4f6; margin-bottom:6px; }
        .db-cal-tip-item { display:flex; align-items:flex-start; gap:8px; padding:5px 4px; border-radius:8px; }
        .db-cal-tip-item:hover { background:#f9fafb; }
        .db-cal-tip-ico { font-size:13px; flex-shrink:0; line-height:1.4; }
        .db-cal-tip-name { font-size:12px; font-weight:600; color:#374151; }
        .db-cal-tip-meta { font-size:11px; color:#9ca3af; margin-top:1px; }
        .db-cal-tip-empty { font-size:12px; color:#9ca3af; padding:6px 4px; }
        /* 仪表盘 KPI / 预警：一行5个，拖拽自由排序，自适应大小 */
        .db-kpi-row, .db-alert-row { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:10px; margin-bottom:12px; align-items:stretch; }
        .db-kpi-row .db-kpi-item, .db-alert-row .db-alert-item { cursor:grab; }
        .db-kpi-row .db-kpi-item:active, .db-alert-row .db-alert-item:active { cursor:grabbing; }
        .db-kpi-row .db-kpi-item.dragging, .db-alert-row .db-alert-item.dragging { opacity:0.4; }
        .db-kpi-row .db-kpi-item.drag-over, .db-alert-row .db-alert-item.drag-over { outline:2px dashed #3b82f6; outline-offset:2px; border-radius:10px; }
        .db-kpi-row .db-kpi-card { width:100%; min-width:0; white-space:normal; }
        .db-kpi-row .db-kpi-card-combined { min-width:0; }
        /* 仪表盘自由布局看板 */
        .db-board { position:relative; width:100%; margin-bottom:12px; }
        .dash-w { position:absolute; box-sizing:border-box; }
        .dash-w-body { width:100%; height:100%; overflow:auto; }
        .dash-w .db-kpi-card, .dash-w .db-alert-card, .dash-w .db-reminder-card { width:100%; min-width:0; height:100%; white-space:normal; }
        .dash-w .db-chart-card { height:100%; display:flex; flex-direction:column; }
        .dash-w .db-chart-wrap { flex:1; min-height:0; }
        .dash-w-handle { display:none; position:absolute; top:0; left:0; right:0; height:16px; cursor:move; z-index:5; align-items:center; justify-content:center; background:rgba(59,130,246,0.10); border-radius:8px 8px 0 0; }
        .dash-w-handle::before { content:'⠿'; color:#3b82f6; font-size:11px; letter-spacing:1px; }
        .dash-w-resize { display:none; position:absolute; right:2px; bottom:2px; width:14px; height:14px; cursor:nwse-resize; z-index:6; background:linear-gradient(135deg, transparent 50%, #3b82f6 50%); border-radius:0 0 6px 0; }
        .db-board.editing .dash-w { outline:1px dashed #93c5fd; outline-offset:-1px; z-index:1; cursor:move; }
        .db-board.editing .dash-w:hover { outline-color:#3b82f6; }
        .db-board.editing .dash-w-handle, .db-board.editing .dash-w-resize { display:flex; }
        .db-board.editing .dash-w-body { pointer-events:none; }
        .db-kpi-card {
            background: linear-gradient(145deg, #ffffff, #f8fafc); border-radius: 10px; padding: 10px 10px 8px;
            border:1px solid rgba(226,232,240,0.8); position:relative; overflow:hidden; cursor:pointer;
            transition:all var(--transition);
            box-shadow: 0 1px 4px rgba(0,0,0,0.03);
            flex: 0 0 auto; min-width: 110px; white-space: nowrap;
        }
        .db-kpi-card::before {
            content: ''; position: absolute; top: -12px; right: -12px; width: 45px; height: 45px;
            border-radius: 50%; opacity: 0.06; pointer-events: none;
            background: radial-gradient(circle, currentColor, transparent 70%);
        }
        .db-kpi-card:hover { transform:translateY(-2px); box-shadow:0 6px 16px rgba(0,0,0,0.06); border-color: rgba(59,130,246,0.12); }
        .db-kpi-icon { width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:13px; margin-bottom:6px; position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,0.5); }
        .db-kpi-icon.blue  { background:linear-gradient(135deg,#dbeafe,#eff6ff); color:#3b82f6; }
        .db-kpi-icon.green { background:linear-gradient(135deg,#d1fae5,#ecfdf5); color:#10b981; }
        .db-kpi-icon.orange{ background:linear-gradient(135deg,#fef3c7,#fffbeb); color:#f59e0b; }
        .db-kpi-icon.red   { background:linear-gradient(135deg,#fee2e2,#fef2f2); color:#ef4444; }
        .db-kpi-icon.teal  { background:linear-gradient(135deg,#cffafe,#ecfeff); color:#0891b2; }
        .db-kpi-label { font-size:10px; color:#6b7280; font-weight:500; margin-bottom:2px; }
        .db-kpi-value { font-size:22px; font-weight:800; color:#111827; line-height:1.1; letter-spacing:-0.5px; }
        .db-kpi-value span { font-size:11px; font-weight:600; color:#6b7280; margin-left:2px; }
        .db-kpi-sub { font-size:10px; color:#9ca3af; margin-top:2px; }
        .db-kpi-sub.up   { color:#10b981; }
        .db-kpi-sub.down { color:#ef4444; }

        /* 合并KPI卡片 */
        .db-kpi-card-combined { display:flex; flex-direction:row; align-items:flex-start; gap:8px; flex: 1 1 0%; min-width: 260px; }
        .db-kpi-card-combined .db-kpi-icon { flex-shrink:0; margin-bottom:0; margin-top:2px; }
        .db-kpi-combined-body { flex:1; min-width:0; }
        .db-kpi-combined-row { display:flex; gap:12px; flex-wrap:wrap; }
        .db-kpi-combined-row > div { min-width:60px; }
        .db-kpi-label-sm { font-size:10px; color:#9ca3af; font-weight:500; margin-bottom:1px; }
        .db-kpi-value-sm { font-size:18px; font-weight:800; color:#111827; line-height:1.1; }
        .db-kpi-value-sm em { font-size:11px; font-weight:600; color:#6b7280; margin-left:2px; font-style:normal; }
        .db-kpi-value-sm.green-text { color:#10b981; }
        .db-kpi-value-sm.orange-text { color:#f59e0b; }

        /* 预警行 */
        .db-alert-row { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-bottom:12px; }
        .db-alert-card {
            border-radius:12px; padding:12px 10px; cursor:pointer; transition:all var(--transition);
            border-left:4px solid transparent; position: relative; overflow: hidden;
        }
        .db-alert-card::after {
            content: ''; position: absolute; bottom: -13px; right: -13px; width: 50px; height: 50px;
            border-radius: 50%; opacity: 0.08; pointer-events: none;
        }
        .db-alert-card:hover { transform:translateY(-2px); box-shadow:0 6px 16px rgba(0,0,0,0.06); }
        .db-alert-card.red    { background:linear-gradient(135deg,#fff1f2,#fff5f6); border-color:#ef4444; }
        .db-alert-card.red::after { background:#ef4444; }
        .db-alert-card.orange { background:linear-gradient(135deg,#fffbeb,#fffef5); border-color:#f59e0b; }
        .db-alert-card.orange::after { background:#f59e0b; }
        .db-alert-card.yellow { background:linear-gradient(135deg,#fefce8,#fefde8); border-color:#eab308; }
        .db-alert-card.yellow::after { background:#eab308; }
        .db-alert-card.blue   { background:linear-gradient(135deg,#eff6ff,#f5f9ff); border-color:#3b82f6; }
        .db-alert-card.blue::after { background:#3b82f6; }
        .db-alert-card.gray   { background:linear-gradient(135deg,#f9fafb,#fcfcfd); border-color:#9ca3af; }
        .db-alert-card.gray::after { background:#9ca3af; }
        .db-alert-title { font-size:11px; font-weight:600; color:#374151; display:flex; align-items:center; gap:4px; margin-bottom:4px; }
        .db-alert-value { font-size:22px; font-weight:800; color:#111827; line-height:1; }
        .db-alert-value span { font-size:11px; font-weight:500; }
        .db-alert-sub { font-size:10px; color:#6b7280; margin-top:2px; }

        /* 图表行 */
        .db-charts-row { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; }
        .db-chart-card {
            background:linear-gradient(145deg,#ffffff,#fbfcfd); border-radius:10px; padding:10px 10px 8px;
            border:1px solid rgba(226,232,240,0.8); box-shadow: 0 1px 4px rgba(0,0,0,0.03);
            transition: all var(--transition);
        }
        .db-chart-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.06); transform: translateY(-2px); }
        .db-chart-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
        .db-chart-title { font-size:12px; font-weight:700; color:#111827; display:flex; align-items:center; gap:4px; }
        .db-chart-action { font-size:10px; color:#3b82f6; cursor:pointer; }
        .db-chart-action:hover { text-decoration:underline; }
        .db-chart-wrap { position:relative; height:clamp(130px,18vw,240px); }

        /* ===== 提醒条 ===== */
        .alert-bar {
            background: linear-gradient(90deg, #fff7ed, #fffbeb);
            border: 1px solid #fde68a; border-left: 4px solid var(--warning);
            padding: 12px 20px; border-radius: var(--radius);
            display: flex; align-items: center; gap: 12px;
            margin-bottom: 20px; font-size: 13px; color: #92400e;
        }
        .alert-bar i { color: var(--warning); font-size: 16px; }

        /* ===== 面板 ===== */
        .panel { display: none; }
        .panel.active { display: block; }

        /* ===== 工具栏 ===== */
        .toolbar {
            background: rgba(255,255,255,0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(226,232,240,0.6); border-radius: var(--radius-lg); padding: 14px 20px;
            display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
            margin-bottom: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
        }
        .search-box {
            display: flex; align-items: center; gap: 8px;
            background: linear-gradient(180deg, #ffffff, #fafbfc); border: 1.5px solid var(--gray-200);
            border-radius: 10px; padding: 9px 16px;
            flex: 1; min-width: 200px; max-width: 300px;
            transition: all var(--transition-fast);
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
        }
        .search-box:hover { border-color: var(--gray-300); background: white; }
        .search-box:focus-within {
            border-color: var(--accent); background: white;
            box-shadow: 0 0 0 4px rgba(59,130,246,.12);
        }
        .search-box i { color: var(--gray-400); font-size: 13px; }
        .search-box input { border: none; background: none; outline: none; font-size: 13px; color: var(--gray-700); width: 100%; }
        .filter-select {
            border: 1.5px solid var(--gray-200); border-radius: 10px;
            padding: 9px 16px; font-size: 13px;
            background: linear-gradient(180deg, #ffffff, #fafbfc);
            outline: none; color: var(--gray-700); cursor: pointer;
            transition: all var(--transition-fast);
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
            appearance: none; -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
        }
        .filter-select:hover { border-color: var(--gray-300); background: white; }
        .filter-select:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
        /* 可搜索下拉框 */
        .searchable-select-wrap { position: relative; display: inline-block; }
        .searchable-select-input {
            border: 1.5px solid var(--gray-200); border-radius: 10px;
            padding: 9px 16px; font-size: 13px;
            background: linear-gradient(180deg, #ffffff, #fafbfc);
            outline: none; color: var(--gray-700); cursor: pointer;
            transition: all var(--transition-fast); width: 100%; box-sizing: border-box;
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
        }
        .searchable-select-input:hover { border-color: var(--gray-300); background: white; }
        .searchable-select-input:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
        .searchable-select-dropdown {
            display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
            background: white; border: 1px solid rgba(226,232,240,0.8);
            border-radius: 12px;
            max-height: 320px; overflow-y: auto; z-index: 1000;
            box-shadow: 0 12px 32px rgba(0,0,0,.12);
        }
        .searchable-select-dropdown.show { display: block; animation: dropdownIn 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
        /* 任务逾期整行标红 */
        .order-row-overdue td { background:#fff5f5 !important; color:var(--danger) !important; }
        .order-row-overdue td .td-link { color:var(--danger) !important; text-decoration:underline; }
        .order-row-overdue td .badge-blue,
        .order-row-overdue td .badge-green { background:#ef4444 !important; color:#fff !important; }
        .searchable-select-search {
            padding: 8px 12px; border-bottom: 1px solid var(--gray-100);
            position: sticky; top: 0; background: white;
        }
        .searchable-select-search input {
            width: 100%; padding: 6px 10px; border: 1.5px solid var(--gray-200);
            border-radius: 8px; font-size: 12px; outline: none;
            transition: all var(--transition-fast);
        }
        .searchable-select-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
        .searchable-select-option {
            padding: 8px 14px; font-size: 13px; cursor: pointer;
            transition: background var(--transition-fast);
        }
        .searchable-select-option:hover { background: linear-gradient(90deg, var(--accent-light), transparent); }
        .searchable-select-option.selected { background: linear-gradient(90deg, var(--accent-light), rgba(59,130,246,0.05)); color: var(--accent); font-weight: 600; }
        .searchable-select-option.empty { color: var(--gray-400); cursor: default; }
        .searchable-select-option.empty:hover { background: transparent; }
        .filter-date {
            padding: 8px 14px; border: 1.5px solid var(--gray-200); border-radius: 10px;
            font-size: 12px; color: var(--gray-700);
            background: linear-gradient(180deg, #ffffff, #fafbfc); height: 40px;
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
            transition: all var(--transition-fast);
        }
        .filter-date:hover { border-color: var(--gray-300); background: white; }
        .filter-date:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 4px rgba(59,130,246,.12); outline: none; }
        .toolbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

        /* ===== 按钮 ===== */
        .btn {
            padding: 9px 18px; border-radius: var(--radius);
            font-size: 13px; font-weight: 600; cursor: pointer;
            transition: all var(--transition-fast); border: none; display: inline-flex;
            align-items: center; gap: 6px; white-space: nowrap;
            position: relative; overflow: hidden;
        }
        /* 按钮光泽扫过 */
        .btn::after {
            content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s; pointer-events: none;
        }
        .btn:hover::after { left: 120%; }
        .btn:active { transform: scale(0.97); }
        .btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; box-shadow: 0 2px 8px rgba(30,60,114,.2); }
        .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30,60,114,.35); }
        .btn-accent { background: linear-gradient(135deg, var(--accent), #6366f1); color: white; box-shadow: 0 2px 8px rgba(59,130,246,.2); }
        .btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59,130,246,.35); }
        .btn-outline { background: rgba(255,255,255,0.8); border: 1px solid var(--gray-300); color: var(--gray-700); }
        .btn-outline:hover { background: white; border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,.1); }
        .btn-danger { background: linear-gradient(135deg, var(--danger), #f87171); color: white; box-shadow: 0 2px 8px rgba(239,68,68,.2); }
        .btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(239,68,68,.35); }
        .btn-success { background: linear-gradient(135deg, var(--success), #34d399); color: white; box-shadow: 0 2px 8px rgba(16,185,129,.2); }
        .btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,185,129,.35); }
        .btn-sm { padding: 5px 12px; font-size: 12px; border-radius: var(--radius-sm); }
        .btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }
        .btn-icon { padding: 8px; width: 34px; height: 34px; justify-content: center; }

        /* ===== 表格 ===== */
        .table-card {
            background: linear-gradient(145deg, white, #fbfcfd); border-radius: var(--radius-lg);
            border: 1px solid rgba(226,232,240,0.8); overflow: hidden;
            box-shadow: 0 2px 12px rgba(0,0,0,0.04);
        }
        .table-scroll { overflow-x: auto; }
        table { width: 100%; border-collapse: collapse; }
        thead tr { background: var(--gray-50); }
        th {
            padding: 13px 16px; text-align: left;
            font-size: 12px; font-weight: 700; color: var(--gray-500);
            text-transform: uppercase; letter-spacing: 0.6px;
            border-bottom: 1px solid var(--gray-200); white-space: nowrap;
        }
        td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
        tr:last-child td { border-bottom: none; }
        tbody tr { transition: background var(--transition-fast); }
        tbody tr:hover { background: var(--gray-50); }
        .td-link { color: var(--accent); font-weight: 600; cursor: pointer; }
        .td-link:hover { text-decoration: underline; color: var(--primary); }
        .td-money { font-weight: 700; font-family: 'SF Mono', 'Consolas', monospace; }
        .td-money.red { color: var(--danger); }
        .td-money.green { color: var(--success); }
        .td-actions { display: flex; gap: 6px; align-items: center; }

        /* ===== 状态徽章 ===== */
        .badge {
            display: inline-flex; align-items: center; gap: 5px;
            padding: 4px 12px; border-radius: 20px;
            font-size: 11px; font-weight: 600; white-space: nowrap;
        }
        .badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
        .badge-blue { background: linear-gradient(135deg, var(--accent-light), #dbeafe); color: var(--accent); }
        .badge-blue.clickable-badge { cursor: pointer; transition: all var(--transition-fast); }
        .badge-blue.clickable-badge:hover { background: linear-gradient(135deg, var(--accent), #2563eb); color: #fff; transform: scale(1.08); box-shadow: 0 2px 8px rgba(59,130,246,0.3); }
        .badge-green { background: linear-gradient(135deg, var(--success-light), #d1fae5); color: #065f46; }
        .badge-orange { background: linear-gradient(135deg, var(--warning-light), #fef3c7); color: #92400e; }
        .badge-red { background: linear-gradient(135deg, var(--danger-light), #fee2e2); color: #991b1b; }
        .badge-gray { background: linear-gradient(135deg, var(--gray-100), #f3f4f6); color: var(--gray-500); }
        .badge-purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #6b21a8; }
        .badge-teal { background: #ccfbf1; color: #0f766e; }
        .badge-amber { background: #fef3c7; color: #92400e; }

        /* ===== 分页 ===== */
        .table-footer {
            padding: 14px 16px; display: flex; align-items: center;
            justify-content: space-between; border-top: 1px solid var(--gray-200);
            background: var(--gray-50);
        }
        .page-info { font-size: 12px; color: var(--gray-400); }
        .pagination { display: flex; gap: 4px; }
        .page-btn {
            width: 32px; height: 32px; border-radius: var(--radius-sm);
            border: 1px solid var(--gray-200); background: white;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; font-size: 13px; color: var(--gray-600);
            transition: all var(--transition-fast);
        }
        .page-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
        .page-btn:active { transform: scale(0.92); }
        .page-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

        /* ===== 模态框 ===== */
        .modal-overlay {
            display: none; position: fixed; inset: 0;
            background: rgba(15,23,42,.45); z-index: 1000;
            align-items: center; justify-content: center;
            backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 24px;
            opacity: 0; transition: opacity var(--transition-fast);
        }
        .modal-overlay.open { display: flex; opacity: 1; }
        .modal-box {
            background: linear-gradient(145deg, white, #fbfcfd); border-radius: var(--radius-xl);
            box-shadow: 0 24px 64px rgba(0,0,0,0.2), 0 0 0 1px rgba(226,232,240,0.5); width: 100%; max-height: 90vh;
            overflow-y: auto; animation: modalIn 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        @keyframes modalIn { from { opacity:0; transform:scale(0.9) translateY(20px); } to { opacity:1; transform:scale(1) translateY(0); } }
        @keyframes dropdownIn { from { opacity:0; transform:translateY(-8px) scale(0.97); } to { opacity:1; transform:translateY(0) scale(1); } }
        .modal-header {
            padding: 24px 28px 16px; display: flex;
            align-items: center; justify-content: space-between;
            position: relative;
            background: linear-gradient(135deg, rgba(59,130,246,0.04) 0%, rgba(139,92,246,0.04) 100%);
            border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        }
        .modal-header::after {
            content: ''; position: absolute; bottom: 0; left: 28px; right: 28px;
            height: 2px; background: linear-gradient(90deg, transparent, var(--accent), var(--primary), transparent);
            opacity: 0.5; border-radius: 1px;
        }
        .modal-title { font-size: 18px; font-weight: 700; color: var(--gray-900); letter-spacing: 0.3px; }
        .modal-close {
            width: 36px; height: 36px; border-radius: 50%;
            background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
            border: 1px solid var(--gray-200); cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            color: var(--gray-500); font-size: 16px; transition: all var(--transition-fast);
            box-shadow: 0 2px 6px rgba(0,0,0,0.04);
        }
        .modal-close:hover { background: linear-gradient(135deg, var(--danger-light), #fee2e2); color: var(--danger); transform: rotate(90deg) scale(1.05); border-color: var(--danger); box-shadow: 0 4px 12px rgba(239,68,68,0.2); }
        .modal-body { padding: 24px 28px; }
        .modal-footer {
            padding: 16px 28px; border-top: 1px solid rgba(226,232,240,0.6);
            display: flex; justify-content: flex-end; gap: 10px;
            background: linear-gradient(180deg, rgba(249,250,251,0.8), rgba(243,244,246,0.9));
            backdrop-filter: blur(8px); border-radius: 0 0 var(--radius-xl) var(--radius-xl);
        }

        /* ===== 选项卡 ===== */
        .tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--gray-100); margin-bottom: 20px; flex-wrap: wrap; overflow-x: auto; }
        .tab-btn {
            padding: 10px 18px; border: none; background: none;
            font-size: 13px; font-weight: 600; cursor: pointer;
            color: var(--gray-500); border-bottom: 3px solid transparent;
            margin-bottom: -2px; border-radius: 8px 8px 0 0;
            transition: all var(--transition-fast);
        }
        .tab-btn:hover { color: var(--gray-700); background: rgba(59,130,246,0.05); }
        .tab-btn.active {
            color: var(--accent); border-bottom-color: var(--accent);
            background: linear-gradient(180deg, var(--accent-light), rgba(59,130,246,0.05));
            font-weight: 700;
        }
        .tab-pane { display: none; }
        .tab-pane.active { display: block; }

        /* ===== 表单 ===== */
        .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
        .form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
        .form-group { display: flex; flex-direction: column; gap: 7px; }
        .form-group.full { grid-column: 1 / -1; }
        .form-label {
            font-size: 12px; font-weight: 600; color: var(--gray-600);
            text-transform: uppercase; letter-spacing: 0.6px;
            display: inline-flex; align-items: center; gap: 4px;
        }
        .form-control {
            padding: 11px 16px; border: 1.5px solid var(--gray-200);
            border-radius: 10px; font-size: 13px; color: var(--gray-800);
            background: linear-gradient(180deg, #ffffff, #fafbfc); outline: none;
            width: 100%; transition: all var(--transition-fast);
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
        }
        .form-control:hover { border-color: var(--gray-300); background: white; }
        .form-control:focus {
            border-color: var(--accent); background: white;
            box-shadow: 0 0 0 4px rgba(59,130,246,.12), inset 0 1px 2px rgba(59,130,246,0.05);
        }
        .form-control::placeholder { color: var(--gray-300); }
        .form-control[readonly] { background: linear-gradient(180deg, var(--gray-50), #f3f4f6); color: var(--gray-500); border-style: dashed; }
        select.form-control { cursor: pointer; appearance: none; -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
        }
        textarea.form-control { resize: vertical; min-height: 80px; line-height: 1.6; }
        .form-hint { font-size: 11px; color: var(--gray-400); display: flex; align-items: center; gap: 3px; }
        .form-row-readonly { display: flex; gap: 16px; flex-wrap: wrap; }
        .form-row-readonly .form-group { flex: 1; min-width: 180px; }
        .form-hint-red { font-size: 11px; color: #ef4444; margin-top: 4px; font-weight: 500; }
        .form-sync-btn {
            cursor: pointer; color: var(--accent); font-size: 11px; font-weight: 600;
            text-decoration: none; margin-left: 8px; white-space: nowrap;
            transition: all var(--transition-fast);
        }
        .form-sync-btn:hover { text-decoration: underline; opacity: 0.8; }
        /* 多选标签 */
        .multi-tag-select {
            display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
            min-height: 40px; padding: 8px 12px; border: 1.5px solid var(--gray-200);
            border-radius: 10px; background: linear-gradient(180deg, #ffffff, #fafbfc);
            cursor: pointer; transition: all var(--transition-fast);
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
        }
        .multi-tag-select:hover { border-color: var(--gray-300); background: white; }
        .multi-tag-select:focus-within { border-color: var(--accent); background: white; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
        .multi-tag-chip {
            display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px;
            background: linear-gradient(135deg, var(--accent-light), #dbeafe); color: var(--accent);
            border-radius: 20px; font-size: 12px; font-weight: 600;
            box-shadow: 0 1px 3px rgba(59,130,246,0.15);
        }
        .multi-tag-chip .remove-tag { cursor: pointer; font-size: 14px; line-height: 1; opacity: 0.6; transition: opacity var(--transition-fast); }
        .multi-tag-chip .remove-tag:hover { opacity: 1; }
        .multi-tag-dropdown {
            display: none; position: absolute; z-index: 100;
            background: white; border: 1px solid rgba(226,232,240,0.8);
            border-radius: 12px; max-height: 220px; overflow-y: auto;
            box-shadow: 0 12px 32px rgba(0,0,0,0.12); min-width: 100%; left: 0; top: calc(100% + 6px);
        }
        .multi-tag-dropdown.show { display: block; animation: dropdownIn 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
        .multi-tag-dropdown .dropdown-search { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); position: sticky; top: 0; background: white; }
        .multi-tag-dropdown .dropdown-search input { width: 100%; padding: 6px 12px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: 12px; outline: none; transition: all var(--transition-fast); }
        .multi-tag-dropdown .dropdown-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
        .multi-tag-dropdown .dropdown-item { padding: 8px 14px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background var(--transition-fast); }
        .multi-tag-dropdown .dropdown-item:hover { background: linear-gradient(90deg, var(--accent-light), transparent); }
        .multi-tag-dropdown .dropdown-item.selected { background: linear-gradient(90deg, var(--accent-light), rgba(59,130,246,0.05)); color: var(--accent); font-weight: 600; }
        .multi-tag-dropdown .dropdown-item input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
        .multi-tag-wrap { position: relative; }
        /* 客户标签多选按钮组 */
        .checkbox-tag-group { display: flex; flex-wrap: wrap; gap: 8px; }
        .checkbox-tag-item { display: flex; align-items: center; gap: 6px; cursor: pointer; }
        .checkbox-tag-item input[type=checkbox] { display: none; }
        .checkbox-tag-item .checkbox-tag-label {
            padding: 7px 18px; border: 1.5px solid var(--gray-300); border-radius: 20px;
            font-size: 13px; color: var(--gray-600); background: white;
            transition: all var(--transition-fast); cursor: pointer; user-select: none;
            font-weight: 500;
        }
        .checkbox-tag-item input[type=checkbox]:checked + .checkbox-tag-label {
            background: linear-gradient(135deg, var(--accent), #2563eb); color: white;
            border-color: var(--accent); box-shadow: 0 2px 8px rgba(59,130,246,0.3);
        }
        .checkbox-tag-item .checkbox-tag-label:hover {
            border-color: var(--accent); transform: translateY(-1px);
            box-shadow: 0 2px 6px rgba(59,130,246,0.12);
        }
        /* 表单标签页 */
        .form-tabs-nav {
            display: flex; gap: 4px; border-bottom: 2px solid var(--gray-100);
            margin-bottom: 20px; padding: 4px;
            background: linear-gradient(180deg, var(--gray-50), transparent);
            border-radius: 12px 12px 0 0;
        }
        .form-tabs-nav .form-tab-btn {
            padding: 9px 20px; font-size: 13px; font-weight: 600;
            color: var(--gray-500); background: none; border: none;
            border-bottom: 3px solid transparent; margin-bottom: -2px;
            cursor: pointer; transition: all var(--transition-fast);
            border-radius: 8px 8px 0 0; position: relative;
        }
        .form-tabs-nav .form-tab-btn:hover { color: var(--gray-700); background: rgba(59,130,246,0.05); }
        .form-tabs-nav .form-tab-btn.active {
            color: var(--accent); border-bottom-color: var(--accent);
            background: linear-gradient(180deg, var(--accent-light), rgba(59,130,246,0.08));
            font-weight: 700;
        }
        .form-tab-pane { display: none; }
        .form-tab-pane.active { display: block; }
        /* 跟进记录列表 */
        .followup-list { max-height: 260px; overflow-y: auto; margin-top: 12px; }
        .followup-item {
            padding: 14px 16px; border: 1px solid var(--gray-200); border-radius: 12px;
            margin-bottom: 10px; font-size: 13px;
            background: linear-gradient(180deg, #ffffff, #fafbfc);
            transition: all var(--transition-fast);
            box-shadow: 0 1px 3px rgba(0,0,0,0.02);
        }
        .followup-item:hover {
            border-color: rgba(59,130,246,0.3); box-shadow: 0 4px 12px rgba(0,0,0,0.06);
            transform: translateY(-1px);
        }
        .followup-item .fu-meta {
            display: flex; justify-content: space-between; align-items: center;
            font-size: 11px; color: var(--gray-400); margin-bottom: 6px;
        }
        .followup-item .fu-content { color: var(--gray-700); line-height: 1.6; }
        .followup-item .fu-type {
            display: inline-block; padding: 2px 10px; border-radius: 12px;
            font-size: 11px; font-weight: 600;
        }
        .fu-type.call { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb; }
        .fu-type.visit { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
        .fu-type.meeting { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }
        .fu-type.other { background: linear-gradient(135deg, var(--gray-100), #e5e7eb); color: var(--gray-500); }
        /* 附件列表 */
        .attach-list { margin-top: 12px; }
        .attach-item {
            display: flex; align-items: center; gap: 10px; padding: 10px 14px;
            border: 1px solid var(--gray-200); border-radius: 10px;
            margin-bottom: 8px; font-size: 13px;
            background: linear-gradient(180deg, #ffffff, #fafbfc);
            transition: all var(--transition-fast);
        }
        .attach-item:hover { border-color: rgba(59,130,246,0.3); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
        .attach-item .attach-icon { font-size: 20px; color: var(--accent); }
        .attach-item .attach-name { flex: 1; color: var(--gray-700); }
        .attach-item .attach-size { font-size: 11px; color: var(--gray-400); }
        .attach-item .attach-del { cursor: pointer; color: var(--danger); font-size: 14px; transition: all var(--transition-fast); }
        .attach-item .attach-del:hover { opacity: 0.7; transform: scale(1.2); }
        /* 合同收款卡片 */
        .receipt-card {
            padding: 18px; border: 1px solid var(--gray-200); border-radius: 14px;
            margin-bottom: 12px;
            background: linear-gradient(180deg, #ffffff, #fafbfc);
            box-shadow: 0 1px 4px rgba(0,0,0,0.02);
            transition: all var(--transition-fast);
        }
        .receipt-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); border-color: rgba(59,130,246,0.2); }
        .receipt-card .receipt-header {
            display: flex; justify-content: space-between; align-items: center;
            margin-bottom: 10px;
        }
        .receipt-card .receipt-amount {
            font-size: 20px; font-weight: 700; color: var(--accent);
        }
        .receipt-status {
            display: inline-block; padding: 3px 12px; border-radius: 14px;
            font-size: 12px; font-weight: 600;
        }
        .receipt-status.paid { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }
        .receipt-status.unpaid { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
        .receipt-status.partial { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb; }

        /* ===== 客户详情 ===== */
        .detail-section { margin-bottom: 24px; }
        .detail-section-title {
            font-size: 12px; font-weight: 700; color: var(--gray-500);
            text-transform: uppercase; letter-spacing: 0.8px;
            margin-bottom: 14px; padding-bottom: 10px;
            border-bottom: 2px solid var(--gray-100);
            display: flex; align-items: center; gap: 6px;
        }
        .detail-section-title::before {
            content: ''; width: 3px; height: 14px; border-radius: 2px;
            background: linear-gradient(180deg, var(--accent), var(--primary));
        }
        .info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
        .info-item {
            padding: 10px 14px; border-radius: 10px;
            background: linear-gradient(180deg, #ffffff, #fafbfc);
            border: 1px solid var(--gray-100);
            transition: all var(--transition-fast);
        }
        .info-item:hover { border-color: rgba(59,130,246,0.2); box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
        .info-key { font-size: 11px; color: var(--gray-400); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
        .info-val { font-size: 13px; color: var(--gray-800); font-weight: 500; }

        /* ===== 联系人卡片 ===== */
        .contact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
        .contact-card {
            background: linear-gradient(180deg, #ffffff, #fafbfc); border: 1px solid var(--gray-200);
            border-radius: 14px; padding: 16px;
            transition: all var(--transition-fast);
            box-shadow: 0 1px 3px rgba(0,0,0,0.02);
        }
        .contact-card:hover { border-color: rgba(59,130,246,0.3); box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateY(-2px); }
        .contact-name { font-weight: 700; color: var(--gray-800); margin-bottom: 8px; font-size: 14px; }
        .contact-meta { font-size: 12px; color: var(--gray-500); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
        .contact-actions { margin-top: 12px; display: flex; gap: 6px; }

        /* ===== 账号密码面板 ===== */
        .account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        .account-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px; padding: 16px; transition: box-shadow .2s; }
        .account-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
        .account-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
        .account-card-icon { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #eef2ff, #e0e7ff); display: flex; align-items: center; justify-content: center; color: #6366f1; font-size: 14px; flex-shrink: 0; }
        .account-card-title { font-size: 14px; font-weight: 600; color: var(--gray-800); }
        .account-field { margin-bottom: 8px; }
        .account-field-label { font-size: 11px; color: var(--gray-400); margin-bottom: 3px; }
        .account-field-value { font-size: 13px; color: var(--gray-700); background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 6px; padding: 6px 10px; word-break: break-all; }
        .password-field { position: relative; }
        .password-field .toggle-pw {
            position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
            cursor: pointer; color: var(--gray-400); background: none; border: none; padding: 4px;
            transition: color var(--transition-fast); font-size: 14px;
        }
        .password-field .toggle-pw:hover { color: var(--accent); }
        .password-field input { padding-right: 40px; }

        /* ===== 系统配置 ===== */
        .config-card {
            background: linear-gradient(145deg, white, #fbfcfd); border: 1px solid rgba(226,232,240,0.8);
            border-radius: var(--radius-lg); padding: 0; margin-bottom: 12px;
            transition: box-shadow var(--transition), border-color var(--transition-fast);
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        }
        .config-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
        .config-title {
            font-weight: 700; color: var(--gray-800);
            display: flex; align-items: center; justify-content: space-between;
            padding: 15px 20px; cursor: pointer; user-select: none;
            border-bottom: 1px solid transparent; transition: all var(--transition-fast);
            border-radius: inherit;
        }
        .config-title:hover { background: linear-gradient(180deg, rgba(59,130,246,0.03), transparent); }
        .config-title .cfg-toggle-icon {
            transition: transform var(--transition); font-size: 12px;
            color: var(--gray-400); margin-right: 4px;
        }
        .config-card.expanded .config-title { border-bottom-color: var(--gray-200); }
        .config-card.expanded .cfg-toggle-icon { transform: rotate(90deg); }
        .config-card-body {
            padding: 0 20px; max-height: 0; overflow: hidden;
            transition: max-height var(--transition-slow), padding var(--transition-slow);
        }
        .config-card.expanded .config-card-body {
            padding: 16px 20px 20px; max-height: 2000px; overflow: visible;
        }
        .tag-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
        .config-tag {
            display: inline-flex; align-items: center; gap: 6px;
            background: linear-gradient(135deg, var(--accent-light), #dbeafe); color: var(--accent);
            padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
            box-shadow: 0 1px 3px rgba(59,130,246,0.12);
        }
        .config-tag .rm { cursor: pointer; opacity: 0.7; font-size: 11px; }
        .config-tag .rm:hover { opacity: 1; color: var(--danger); }

        /* ===== 侧边栏菜单配置 ===== */
        .nav-cfg-item {
            display:flex; align-items:center; gap:10px; padding:12px 14px;
            background:linear-gradient(180deg, #ffffff, #fafbfc); border:1px solid var(--gray-200);
            border-radius:12px; margin-bottom:8px; transition:all var(--transition-fast);
            box-shadow: 0 1px 3px rgba(0,0,0,0.02);
        }
        .nav-cfg-item:hover { border-color:var(--gray-300); background:#fff; }
        .nav-cfg-item.hidden-item { opacity:0.5; }
        .nav-cfg-drag { color:var(--gray-400); cursor:grab; font-size:14px; }
        .nav-cfg-icon {
            width:30px; height:30px; border-radius:7px; background:var(--accent-light);
            display:flex; align-items:center; justify-content:center; color:var(--accent); font-size:13px; flex-shrink:0;
        }
        .nav-cfg-label {
            flex:1; min-width:0;
        }
        .nav-cfg-label input {
            border:1px solid transparent; background:transparent; padding:5px 10px;
            border-radius:8px; font-size:13px; font-weight:600; color:var(--gray-800);
            width:100%; max-width:200px; transition:all var(--transition-fast);
        }
        .nav-cfg-label input:hover { border-color:var(--gray-200); background:#fff; }
        .nav-cfg-label input:focus { border-color:var(--accent); background:#fff; outline:none; }
        .nav-cfg-label .nav-cfg-key { font-size:11px; color:var(--gray-400); margin-top:2px; }
        .nav-cfg-actions { display:flex; align-items:center; gap:6px; flex-shrink:0; }
        .nav-cfg-btn {
            width:32px; height:32px; border-radius:8px; border:1px solid var(--gray-200);
            background:linear-gradient(180deg, #ffffff, #fafbfc); cursor:pointer; display:flex; align-items:center; justify-content:center;
            font-size:12px; color:var(--gray-600); transition:all var(--transition-fast);
            box-shadow: 0 1px 2px rgba(0,0,0,0.03);
        }
        .nav-cfg-btn:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-light); }
        .nav-cfg-btn:disabled { opacity:0.3; cursor:not-allowed; }
        .nav-cfg-btn.up:hover { color:#10b981; border-color:#10b981; }
        .nav-cfg-btn.down:hover { color:#f59e0b; border-color:#f59e0b; }
        .nav-cfg-toggle {
            position:relative; width:38px; height:22px; cursor:pointer; flex-shrink:0;
        }
        .nav-cfg-toggle input { opacity:0; width:0; height:0; }
        .nav-cfg-toggle .slider {
            position:absolute; top:0; left:0; right:0; bottom:0; border-radius:11px;
            background:#d1d5db; transition:background var(--transition-fast);
        }
        .nav-cfg-toggle .slider::before {
            content:''; position:absolute; width:18px; height:18px; left:2px; top:2px;
            background:#fff; border-radius:50%; transition:transform var(--transition-fast); box-shadow:0 1px 3px rgba(0,0,0,0.2);
        }
        .nav-cfg-toggle input:checked + .slider { background:var(--accent); }
        .nav-cfg-toggle input:checked + .slider::before { transform:translateX(16px); }

        /* ===== 分组标签 ===== */
        .service-group {
            background: var(--gray-50); border: 1px solid var(--gray-200);
            border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
        }
        .service-group-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
        .service-group-title { font-weight: 700; color: var(--gray-700); font-size: 13px; }

        /* ===== 任务进度 ===== */
        .progress-timeline { padding: 8px 0; }
        .progress-step {
            display: flex; gap: 14px; margin-bottom: 14px; align-items: flex-start;
        }
        .step-dot {
            width: 30px; height: 30px; border-radius: 50%;
            background: var(--accent-light); color: var(--accent);
            display: flex; align-items: center; justify-content: center;
            font-size: 11px; font-weight: 700; flex-shrink: 0;
        }
        .step-content { flex: 1; }
        .step-title { font-weight: 600; color: var(--gray-800); font-size: 13px; }
        .step-meta { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

        /* ===== 空状态 ===== */
        .empty-state {
            text-align: center; padding: 48px 24px;
            color: var(--gray-400);
        }
        .empty-state i { font-size: 36px; margin-bottom: 12px; display: block; opacity: 0.4; }
        .empty-state p { font-size: 14px; }

        /* ===== 响应式 ===== */
        @media (max-width: 768px) {
            .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
        }

        /* ===== 动效 ===== */
        .fade-in { animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
        .panel.active { animation: panelIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
        @keyframes panelIn { from { opacity: 0; transform: translateY(8px) scale(0.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

        /* ===== 服务金额大字 ===== */
        .amount-display {
            font-size: 28px; font-weight: 800; color: var(--primary);
            font-family: 'SF Mono', 'Consolas', monospace;
        }

        /* ===== 收款进度条 ===== */
        .payment-bar { height: 8px; background: var(--gray-100); border-radius: 4px; margin-top: 6px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.04); }
        .payment-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--success), #34d399); transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 0 8px rgba(16,185,129,0.3); }

        /* ===== checkbox ===== */
        .check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--gray-700); }
        .check-label input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }

        /* ===== 文件上传 ===== */
        .file-upload {
            border: 2px dashed var(--gray-300); border-radius: 14px;
            padding: 20px; text-align: center; cursor: pointer;
            transition: all var(--transition-fast); color: var(--gray-400); font-size: 13px;
            background: linear-gradient(180deg, #ffffff, #fafbfc);
        }
        .file-upload:hover {
            border-color: var(--accent); color: var(--accent);
            background: linear-gradient(180deg, var(--accent-light), rgba(59,130,246,0.05));
            transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59,130,246,0.1);
        }
        .file-upload i { display: block; font-size: 24px; margin-bottom: 8px; }

        /* ===== 服务详情只读值 ===== */
        .info-value { font-size: 14px; color: var(--gray-800); padding: 6px 0; min-height: 32px; line-height: 1.5; word-break: break-all; }

        /* ===== 凭证图片 ===== */
        .voucher-thumb { max-height: 32px; max-width: 60px; height: auto; width: auto; object-fit: contain; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid var(--gray-200); vertical-align: middle; }
        .upload-link { font-size: 11px; color: var(--accent); cursor: pointer; white-space: nowrap; display: inline-block; margin-left: 4px; vertical-align: middle; }
        .upload-link:hover { text-decoration: underline; }
        /* ===== 企业智库 ===== */
        .knowledge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
        .knowledge-card { background: linear-gradient(145deg, white, #fbfcfd); border: 1px solid rgba(226,232,240,0.8); border-radius: var(--radius-lg); padding: 20px; transition: all var(--transition); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
        .knowledge-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
        .knowledge-title { font-size: 16px; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
        .knowledge-content { font-size: 13px; color: var(--gray-600); margin-bottom: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
        .knowledge-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--gray-400); }
        .knowledge-category { background: var(--accent-light); color: var(--accent); padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }

        /* ===== 欢迎页 ===== */
        .login-overlay {
            position: fixed; inset: 0; z-index: 99999;
            background: linear-gradient(135deg, #0f2040 0%, #1e3c72 35%, #2a52a0 65%, #3b82f6 100%);
            display: flex; align-items: center; justify-content: center;
            overflow: hidden;
        }
        /* H5动态渐变blob装饰 */
        .login-overlay::before, .login-overlay::after {
            content: ''; position: absolute; border-radius: 50%;
            filter: blur(80px); opacity: 0.5; pointer-events: none;
            animation: blobFloat 12s ease-in-out infinite;
        }
        .login-overlay::before {
            width: 500px; height: 500px; top: -150px; left: -100px;
            background: radial-gradient(circle, rgba(59,130,246,0.6), transparent 70%);
        }
        .login-overlay::after {
            width: 600px; height: 600px; bottom: -200px; right: -150px;
            background: radial-gradient(circle, rgba(139,92,246,0.4), transparent 70%);
            animation-delay: -6s; animation-duration: 15s;
        }
        @keyframes blobFloat {
            0%, 100% { transform: translate(0,0) scale(1); }
            33% { transform: translate(60px,-40px) scale(1.1); }
            66% { transform: translate(-40px,30px) scale(0.95); }
        }
        /* 装饰粒子 */
        .login-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
        .login-particles span {
            position: absolute; width: 4px; height: 4px; border-radius: 50%;
            background: rgba(255,255,255,0.4); animation: particleRise 8s linear infinite;
        }
        @keyframes particleRise {
            0% { transform: translateY(100vh) scale(0); opacity: 0; }
            10% { opacity: 1; }
            90% { opacity: 1; }
            100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
        }
        .login-welcome-card {
            text-align: center; color: #fff; padding: 48px 40px;
            position: relative; z-index: 2;
            background: rgba(255,255,255,0.08); backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.15); border-radius: 32px;
            box-shadow: 0 24px 64px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
            animation: welcomeCardIn 0.8s var(--ease-out-back);
        }
        @keyframes welcomeCardIn {
            from { opacity: 0; transform: scale(0.9) translateY(30px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }
        .welcome-logo { margin-bottom: 24px; display: flex; justify-content: center; animation: logoBounce 0.8s ease 0.2s both; }
        @keyframes logoBounce {
            from { opacity: 0; transform: scale(0) rotate(-180deg); }
            to { opacity: 1; transform: scale(1) rotate(0); }
        }
        .welcome-title {
            font-size: 34px; font-weight: 800; margin: 0 0 8px; letter-spacing: 1px;
            background: linear-gradient(135deg, #fff 0%, #93c5fd 50%, #c4b5fd 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
            filter: drop-shadow(0 2px 12px rgba(59,130,246,0.4));
            animation: titleSlideIn 0.6s ease 0.4s both;
        }
        @keyframes titleSlideIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
        .welcome-subtitle {
            font-size: 15px; opacity: 0.8; margin: 0 0 44px; letter-spacing: 0.5px;
            animation: titleSlideIn 0.6s ease 0.6s both;
        }
        .welcome-enter-btn {
            background: linear-gradient(135deg, rgba(59,130,246,0.5), rgba(139,92,246,0.5)); color: #fff;
            border: 1px solid rgba(255,255,255,0.25);
            padding: 15px 52px; border-radius: 16px;
            font-size: 17px; font-weight: 600; cursor: pointer;
            backdrop-filter: blur(12px);
            transition: all var(--transition); display: inline-flex; align-items: center; gap: 10px;
            position: relative; overflow: hidden;
            box-shadow: 0 8px 32px rgba(59,130,246,0.3);
            animation: titleSlideIn 0.6s ease 0.8s both;
        }
        /* 按钮光泽扫过效果 */
        .welcome-enter-btn::after {
            content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            transition: left 0.6s;
        }
        .welcome-enter-btn:hover { 
            transform: translateY(-4px) scale(1.02); 
            box-shadow: 0 16px 40px rgba(59,130,246,0.45);
            background: linear-gradient(135deg, rgba(59,130,246,0.7), rgba(139,92,246,0.7));
        }
        .welcome-enter-btn:hover::after { left: 100%; }
        .welcome-enter-btn:active { transform: translateY(-2px) scale(1); }
        .welcome-footer { margin-top: 36px; font-size: 13px; opacity: 0.4; animation: titleSlideIn 0.6s ease 1s both; }
        /* 登录表单 */
        .login-form { display: flex; flex-direction: column; gap: 16px; width: 280px; margin: 0 auto; }
        .login-field { position: relative; }
        .login-field i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.5); font-size: 15px; pointer-events: none; transition: color 0.3s; }
        .login-input {
            width: 100%; padding: 14px 16px 14px 44px; border-radius: 14px;
            background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
            color: #fff; font-size: 15px; outline: none; transition: all 0.3s;
            backdrop-filter: blur(8px);
        }
        .login-input::placeholder { color: rgba(255,255,255,0.45); }
        .login-input:focus { border-color: rgba(59,130,246,0.8); background: rgba(255,255,255,0.15); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
        .login-input:focus + i, .login-field:focus-within i { color: #93c5fd; }
        .login-error { color: #fca5a5; font-size: 13px; min-height: 18px; text-align: center; animation: shake 0.4s; }
        @keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-6px);} 75%{transform:translateX(6px);} }
        .login-btn {
            width: 100%; padding: 14px; border-radius: 14px; border: none; cursor: pointer;
            background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff;
            font-size: 16px; font-weight: 600; transition: all 0.3s;
            box-shadow: 0 8px 24px rgba(59,130,246,0.35);
            display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        }
        .login-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(59,130,246,0.45); }
        .login-btn:active { transform: translateY(0); }
        .login-remember { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.6); font-size: 13px; cursor: pointer; user-select: none; }
        .login-remember input { width: 16px; height: 16px; accent-color: #3b82f6; cursor: pointer; }
        .login-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 4px 0; }

/* ===== H5移动端全面改造 ===== */
        @media (max-width: 768px) {

            /* ── 1. 布局重构：隐藏侧边栏和桌面顶栏 ── */
            .sidebar { display: none !important; }
            .topbar { display: none !important; }
            .sidebar-overlay { display: none !important; }

            /* 主内容区满屏，底部留出Tab导航高度 */
            .main-wrap {
                margin-left: 0 !important;
                width: 100% !important;
                min-width: 0 !important;
                padding-bottom: calc(56px + env(safe-area-inset-bottom)) !important;
            }
            .content-area {
                padding: 12px 12px 8px !important;
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch !important;
            }

            /* ── 2. 手机顶部栏 ── */
            .mobile-topbar {
                display: flex !important;
                position: sticky !important;
                top: 0 !important;
                z-index: 200 !important;
                background: #fff !important;
                border-bottom: 1px solid var(--gray-200) !important;
                padding: 10px 16px !important;
                align-items: center !important;
                gap: 12px !important;
                box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
            }
            .mobile-topbar .menu-btn { display: none !important; }
            .mobile-topbar .page-title {
                font-size: 17px !important;
                font-weight: 700 !important;
                color: var(--gray-900) !important;
                flex: 1 !important;
                white-space: nowrap !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
            }
            .mobile-topbar .topbar-action { font-size: 16px; }
            .mobile-topbar .avatar-sm {
                width: 32px; height: 32px; border-radius: 50%;
                background: var(--primary); color: #fff;
                display: flex; align-items: center; justify-content: center;
                font-size: 13px; font-weight: 700; flex-shrink: 0; cursor: pointer;
            }

            /* ── 3. 底部Tab导航栏 ── */
            .bottom-tab-bar {
                display: flex !important;
                position: fixed !important;
                bottom: 0 !important;
                left: 0 !important;
                right: 0 !important;
                height: calc(56px + env(safe-area-inset-bottom)) !important;
                background: #fff !important;
                border-top: 1px solid var(--gray-200) !important;
                box-shadow: 0 -2px 12px rgba(0,0,0,.08) !important;
                z-index: 300 !important;
                padding-bottom: env(safe-area-inset-bottom) !important;
            }
            .bottom-tab-item {
                flex: 1 !important;
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                justify-content: center !important;
                gap: 3px !important;
                cursor: pointer !important;
                -webkit-tap-highlight-color: transparent !important;
                color: var(--gray-400) !important;
                font-size: 10px !important;
                font-weight: 500 !important;
                transition: color 0.15s !important;
                padding: 6px 0 !important;
            }
            .bottom-tab-item i { font-size: 20px !important; }
            .bottom-tab-item.active { color: var(--accent) !important; }
            .bottom-tab-item:active { background: var(--gray-100) !important; }

            /* ── 4. "更多"滑出菜单面板 ── */
            .more-panel-overlay {
                display: none !important;
                position: fixed !important;
                inset: 0 !important;
                background: rgba(0,0,0,.45) !important;
                z-index: 400 !important;
            }
            .more-panel-overlay.open { display: block !important; }
            .more-panel {
                position: fixed !important;
                left: 0 !important; right: 0 !important; bottom: calc(56px + env(safe-area-inset-bottom)) !important;
                background: #fff !important;
                border-radius: 20px 20px 0 0 !important;
                padding: 16px 16px calc(8px + env(safe-area-inset-bottom)) !important;
                z-index: 401 !important;
                transform: translateY(100%) !important;
                transition: transform 0.3s cubic-bezier(.4,0,.2,1) !important;
                box-shadow: 0 -4px 24px rgba(0,0,0,.15) !important;
            }
            .more-panel.open { transform: translateY(0) !important; }
            .more-panel-title {
                font-size: 13px !important;
                font-weight: 600 !important;
                color: var(--gray-400) !important;
                text-align: center !important;
                margin-bottom: 16px !important;
            }
            .more-panel-grid {
                display: grid !important;
                grid-template-columns: repeat(4, 1fr) !important;
                gap: 12px !important;
            }
            .more-panel-item {
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                gap: 6px !important;
                cursor: pointer !important;
                -webkit-tap-highlight-color: transparent !important;
                padding: 10px 4px !important;
                border-radius: 12px !important;
                transition: background 0.15s !important;
            }
            .more-panel-item:active { background: var(--gray-100) !important; }
            .more-panel-item-icon {
                width: 48px !important; height: 48px !important;
                border-radius: 14px !important;
                display: flex !important; align-items: center !important; justify-content: center !important;
                font-size: 20px !important;
            }
            .more-panel-item-label {
                font-size: 12px !important;
                font-weight: 500 !important;
                color: var(--gray-700) !important;
                text-align: center !important;
            }

            /* ── 5. 弹窗从底部滑出 ── */
            .modal-overlay {
                padding: 0 !important;
                align-items: flex-end !important;
                background: rgba(0,0,0,.5) !important;
            }
            .modal-box {
                width: 100% !important;
                max-width: 100% !important;
                max-height: 92vh !important;
                height: auto !important;
                border-radius: 20px 20px 0 0 !important;
                margin: 0 !important;
                display: flex !important;
                flex-direction: column !important;
                transform: translateY(100%) !important;
                transition: transform 0.35s cubic-bezier(.4,0,.2,1) !important;
                padding-bottom: env(safe-area-inset-bottom) !important;
            }
            .modal-overlay.open .modal-box {
                transform: translateY(0) !important;
            }
            .modal-header {
                flex-shrink: 0 !important;
                padding: 16px 20px 12px !important;
                border-radius: 20px 20px 0 0 !important;
            }
            /* 顶部拖拽指示条 */
            .modal-header::before {
                content: '' !important;
                display: block !important;
                width: 36px !important; height: 4px !important;
                border-radius: 2px !important;
                background: var(--gray-300) !important;
                margin: 0 auto 12px !important;
            }
            .modal-body {
                flex: 1 !important;
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch !important;
                padding: 12px 16px !important;
            }
            .modal-footer {
                flex-shrink: 0 !important;
                padding: 10px 16px !important;
                display: flex !important;
                gap: 10px !important;
            }
            /* 弹窗内按钮满宽 */
            .modal-footer .btn {
                flex: 1 !important;
                justify-content: center !important;
                min-height: 44px !important;
                font-size: 15px !important;
            }

            /* ── 6. 表格 → 卡片列表 ── */
            .table-card .data-table thead { display: none !important; }
            .table-card .data-table tbody tr {
                display: block !important;
                background: #fff !important;
                border-radius: 12px !important;
                margin-bottom: 10px !important;
                padding: 12px !important;
                box-shadow: 0 1px 6px rgba(0,0,0,.07) !important;
                border: 1px solid var(--gray-200) !important;
            }
            .table-card .data-table tbody td {
                display: flex !important;
                align-items: flex-start !important;
                gap: 8px !important;
                padding: 4px 0 !important;
                border: none !important;
                font-size: 13px !important;
                white-space: normal !important;
            }
            .table-card .data-table tbody td::before {
                content: attr(data-label) !important;
                flex-shrink: 0 !important;
                font-size: 11px !important;
                font-weight: 600 !important;
                color: var(--gray-400) !important;
                min-width: 60px !important;
                padding-top: 1px !important;
            }
            /* 操作列靠右 */
            .table-card .data-table tbody td:last-child {
                justify-content: flex-end !important;
                padding-top: 8px !important;
                border-top: 1px solid var(--gray-100) !important;
                margin-top: 4px !important;
            }
            .table-card .data-table tbody td:last-child::before { display: none !important; }

            /* ── 7. 表单单列，按钮满宽 ── */
            .form-grid, .form-grid-3 {
                grid-template-columns: 1fr !important;
                gap: 12px !important;
            }
            .form-label { font-size: 13px !important; }
            .form-control, .form-select, .form-textarea {
                font-size: 16px !important;
                padding: 10px 12px !important;
                min-height: 44px !important;
            }
            textarea.form-textarea { min-height: 80px !important; }
            .btn-block { width: 100% !important; justify-content: center !important; }
            /* 表单操作按钮满宽 */
            .form-actions { display: flex !important; flex-direction: column !important; gap: 8px !important; }
            .form-actions .btn { width: 100% !important; min-height: 44px !important; justify-content: center !important; font-size: 15px !important; }

            /* ── 8. 统计卡片2列 ── */
            .stats-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
            .db-kpi-row { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
            .db-kpi-item { flex: 1 1 105px !important; }
            .db-kpi-card { min-width: 0 !important; }
            /* 移动端：自由看板退化为纵向堆叠，保证可用 */
            .db-board { position:static !important; height:auto !important; }
            .db-board .dash-w { position:static !important; width:100% !important; height:auto !important; margin-bottom:10px; }
            .db-board .dash-w-body { overflow:visible !important; }
            .db-board.editing .dash-w-body { pointer-events:auto !important; }
            .db-kpi-card-combined { flex: 1 1 100% !important; min-width: 100% !important; }
            .stat-card { min-width: 0 !important; }
            .db-alert-row {
                display: grid !important;
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 10px !important;
            }
            .db-charts-row, .db-reminder-row {
                display: grid !important;
                grid-template-columns: 1fr !important;
                gap: 10px !important;
                padding-bottom: 0 !important;
                overflow: visible !important;
                scroll-snap-type: none !important;
            }
            .db-chart-card { min-width: 0 !important; flex-shrink: 1 !important; scroll-snap-align: none !important; width: 100% !important; }
            .db-reminder-card { min-width: 0 !important; flex-shrink: 1 !important; max-height: 200px !important; width: 100% !important; }
            .db-chart-wrap { height: clamp(160px,42vw,280px) !important; }

            /* ── 9. hover → :active 触摸反馈 ── */
            .stat-card:hover, .db-kpi-card:hover, .db-alert-card:hover,
            .btn:hover, .knowledge-card:hover, .site-card:hover, .tool-card:hover {
                transform: none !important;
                box-shadow: none !important;
            }
            .stat-card:active { transform: scale(0.97) !important; }
            .btn:active { opacity: 0.75 !important; }
            .knowledge-card:active { background: var(--gray-50) !important; }

            /* ── 10. 按钮最小高度40px ── */
            .btn { min-height: 40px !important; font-size: 14px !important; -webkit-tap-highlight-color: transparent !important; }
            .btn-sm { min-height: 36px !important; font-size: 12px !important; }
            .btn-xs { min-height: 28px !important; font-size: 11px !important; }

            /* ── 11. 防iOS输入缩放：input最小16px ── */
            .search-box input, .form-control, input[type="text"], input[type="search"],
            input[type="password"], input[type="number"], input[type="date"],
            input[type="datetime-local"], input[type="email"], input[type="tel"],
            textarea, select { font-size: 16px !important; }

            /* ── 12. 工具栏适配 ── */
            .toolbar {
                flex-direction: column !important;
                gap: 8px !important;
                align-items: stretch !important;
                padding: 10px 0 !important;
            }
            .toolbar .search-box { max-width: 100% !important; flex: 1 1 100% !important; }
            .toolbar .filter-select, .toolbar select { width: 100% !important; min-height: 40px !important; }
            .toolbar-right { flex-wrap: wrap !important; margin-left: 0 !important; gap: 6px !important; }
            .toolbar-right .btn { flex: 1 !important; justify-content: center !important; }

            /* ── 13. 面板内边距 ── */
            .panel { padding: 0 !important; }
            .panel-title { font-size: 18px !important; }

            /* ── 14. Tabs横向滚动 ── */
            .tabs, .detail-tabs, #custViewTabs, #customerTypeTabs {
                overflow-x: auto !important;
                flex-wrap: nowrap !important;
                -webkit-overflow-scrolling: touch !important;
                scrollbar-width: none !important;
                padding-bottom: 0 !important;
            }
            .tabs::-webkit-scrollbar { display: none !important; }
            .tab-btn, .cust-type-tab { flex-shrink: 0 !important; min-height: 38px !important; }

            /* ── 15. 客户详情弹窗 ── */
            #customerModal .modal-body { padding: 10px !important; }
            #customerModal .modal-header { padding: 12px 16px !important; }
            .info-grid { grid-template-columns: 1fr !important; }
            .contact-cards { grid-template-columns: 1fr !important; }

            /* ── 16. 通知面板全宽 ── */
            #remindPanel {
                position: fixed !important;
                top: 0 !important; left: 0 !important; right: 0 !important;
                width: 100% !important;
                max-height: 70vh !important;
                border-radius: 0 0 20px 20px !important;
                z-index: 10000 !important;
            }
            #themePanel {
                position: fixed !important;
                bottom: calc(64px + env(safe-area-inset-bottom)) !important;
                right: 8px !important;
                top: auto !important;
                width: 220px !important;
            }

            /* ── 17. 全局搜索面板 ── */
            #globalSearchPanel, .global-search-panel {
                position: fixed !important;
                inset: 0 !important;
                width: 100% !important; height: 100vh !important;
                border-radius: 0 !important;
                z-index: 10001 !important;
            }

            /* ── 18. 预览弹窗 ── */
            #previewModal > div { max-width: 100vw !important; }
            #previewContent { max-width: 100vw !important; max-height: 80vh !important; }

            /* ── 19. 登录页 ── */
            .login-card {
                width: 92% !important; max-width: 380px !important;
                padding: 28px 20px !important; margin: 40px auto !important;
            }
            .login-btn, .login-field input { height: 48px !important; font-size: 16px !important; }

            /* ── 20. img防长按菜单 ── */
            img { -webkit-touch-callout: none !important; user-select: none !important; }
            a { -webkit-touch-callout: none !important; }
        }

        /* 桌面端：隐藏底部Tab、更多面板 */
        @media (min-width: 769px) {
            .mobile-topbar { display: none !important; }
            .sidebar-overlay { display: none !important; }
            .bottom-tab-bar { display: none !important; }
            .more-panel-overlay { display: none !important; }
            .more-panel { display: none !important; }
        }

        /* 超小屏幕（iPhone SE 等）*/
        @media (max-width: 374px) {
            .db-kpi-card, .stat-card { padding: 8px !important; }
            .db-kpi-card .db-kpi-value { font-size: 18px !important; }
            .more-panel-grid { grid-template-columns: repeat(3, 1fr) !important; }
        }

    
        /* 隐藏系统配置中的标签页和侧边栏菜单卡片 */
        div[data-cfg-key="tabConfig"], div[data-cfg-key="navMenu"] { display: none !important; }

        /* ===== 常用网站 ===== */
        .site-category { margin-bottom: 24px; }
        .site-category-title { font-size: 13px; font-weight: 600; color: #6b7280; padding: 6px 0 10px; display: flex; align-items: center; gap: 8px; }
        .site-category-title::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }
        .site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
        .site-card {
            background: linear-gradient(145deg, #fff, #fbfcfd); border: 1px solid rgba(226,232,240,0.8); border-radius: 12px; padding: 16px 18px;
            cursor: pointer; transition: all var(--transition); display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        }
        .site-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(59,130,246,.12); transform: translateY(-2px); }
        .site-card-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
        .site-card-icon.gov  { background: #eff6ff; color: #3b82f6; }
        .site-card-icon.tax  { background: #d1fae5; color: #10b981; }
        .site-card-icon.other{ background: #fef3c7; color: #f59e0b; }
        .site-card-icon.tool { background: #ede9fe; color: #7c3aed; }
        .site-card-body { flex: 1; min-width: 0; }
        .site-card-name { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 2px; }
        .site-card-desc { font-size: 12px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .site-card-arrow { color: #d1d5db; font-size: 14px; flex-shrink: 0; }

        /* ===== 常用工具 ===== */
        .tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
        .tool-card {
            background: linear-gradient(145deg, #fff, #fbfcfd); border: 1px solid rgba(226,232,240,0.8); border-radius: 14px; padding: 20px; cursor: pointer;
            transition: all var(--transition); text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        }
        .tool-card:hover { border-color: #7c3aed; box-shadow: 0 4px 18px rgba(124,58,237,.10); transform: translateY(-3px); }
        .tool-card-icon { width: 48px; height: 48px; border-radius: 12px; background: #ede9fe; color: #7c3aed; display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 10px; }
        .tool-card-name { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 4px; }
        .tool-card-desc { font-size: 12px; color: #9ca3af; }

        /* 编辑删除按钮 */
        .card-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity var(--transition-fast); }
        .site-card:hover .card-actions, .tool-card:hover .card-actions { opacity: 1; }
        .site-card, .tool-card { position: relative; }
        .card-action-btn {
            width: 26px; height: 26px; border-radius: 6px; border: none; cursor: pointer;
            display: flex; align-items: center; justify-content: center; font-size: 11px;
            transition: all 0.15s; background: #f3f4f6; color: #6b7280;
        }
        .card-action-btn:hover { background: #e5e7eb; }
        .card-action-btn.edit:hover { background: #dbeafe; color: #3b82f6; }
        .card-action-btn.del:hover { background: #fee2e2; color: #ef4444; }

        /* 添加按钮 */
        .add-link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border: 2px dashed #d1d5db; border-radius: 12px; background: transparent; color: #9ca3af; font-size: 13px; cursor: pointer; margin-bottom: 16px; transition: all var(--transition-fast); font-weight: 500; }
        .add-link-btn:hover { border-color: var(--accent); color: var(--accent); background: linear-gradient(180deg, var(--accent-light), rgba(59,130,246,0.05)); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(59,130,246,0.1); }
        .add-link-btn i { font-size: 12px; }

        /* 工具弹窗 */
        .tool-calc { max-width: 360px; }
        .tool-calc-display { background: #111827; color: #f0f0f0; padding: 18px 20px; border-radius: 10px; font-size: 28px; font-weight: 600; text-align: right; margin-bottom: 16px; min-height: 68px; word-break: break-all; line-height: 1.2; }
        .tool-calc-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
        .tool-calc-btns button { padding: 12px; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); background: linear-gradient(180deg, #f9fafb, #f3f4f6); color: #374151; }
        .tool-calc-btns button:hover { background: linear-gradient(180deg, #e5e7eb, #d1d5db); transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
        .tool-calc-btns button:active { transform: scale(0.95); }
        .tool-calc-btns button.op { background: linear-gradient(180deg, #f5f3ff, #ede9fe); color: #7c3aed; }
        .tool-calc-btns button.op:hover { background: linear-gradient(180deg, #ddd6fe, #c4b5fd); }
        .tool-calc-btns button.eq { background: #7c3aed; color: #fff; }
        .tool-calc-btns button.eq:hover { background: #6d28d9; }
        .tool-calc-btns button.ac { background: #fee2e2; color: #ef4444; }
        .tool-calc-btns button.ac:hover { background: #fecaca; }

        .tool-date-result { background: #f9fafb; border-radius: 10px; padding: 16px; margin-top: 12px; }
        .tool-date-result .result-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
        .tool-date-result .result-row:last-child { border-bottom: none; }
        .tool-date-result .result-label { color: #6b7280; }
        .tool-date-result .result-value { font-weight: 600; color: #111827; }

        /* 工具弹窗内复选框样式 */
        .checkbox-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; color: #374151; transition: background 0.15s; user-select: none; }
        .checkbox-row:hover { background: #f9fafb; }
        .checkbox-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: #7c3aed; cursor: pointer; flex-shrink: 0; }
        .checkbox-row input[type="checkbox"]:checked + span { color: #111827; font-weight: 500; }
        .deduct-count { padding: 2px 4px; border: 1px solid #d1d5db; border-radius: 4px; text-align: center; }

        /* 社保公积金计算器表格 */
        .ss-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
        .ss-table th { background: #f3f4f6; color: #6b7280; font-weight: 600; padding: 8px 10px; text-align: right; font-size: 11px; }
        .ss-table th:first-child { text-align: left; }
        .ss-table td { padding: 7px 10px; text-align: right; border-bottom: 1px solid #f3f4f6; color: #374151; }
        .ss-table td:first-child { text-align: left; font-weight: 500; color: #111827; }
        .ss-table tbody tr:hover { background: #f9fafb; }
        .ss-summary { background: #f9fafb; border-radius: 8px; padding: 12px 14px; margin-top: 8px; }

        /* 工资表管理 */
        .salary-wrap { max-height: 58vh; overflow: auto; }
        .salary-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 11px; }
        .salary-table th, .salary-table td { padding: 4px 6px; border: 1px solid #e5e7eb; text-align: center; white-space: nowrap; }
        .salary-table th { background: #f1f5f9; color: #475569; font-weight: 700; font-size: 10px; position: sticky; top: 0; z-index: 2; }
        .salary-table .th-group { background: #dbeafe; color: #1e40af; font-size: 11px; }
        .salary-table td:first-child, .salary-table th:first-child { position: sticky; left: 0; background: #f8fafc; z-index: 1; font-weight: 700; min-width: 60px; }
        .salary-table thead th:first-child { z-index: 3; background: #f1f5f9; }
        .salary-table .th-group:first-child { z-index: 3; }
        .salary-cell { width: 70px; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; text-align: center; background: linear-gradient(180deg, #ffffff, #fafbfc); transition: all var(--transition-fast); }
        .salary-cell:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,.15); background: white; }
        .salary-cell.readonly { background: #f8fafc; color: #374151; font-weight: 600; text-align: right; padding: 4px 8px; border: 1px solid #e5e7eb; border-radius: 0; width: auto; cursor: default; user-select: none; }
        .salary-cell.readonly.net-pay { font-size: 12px; color: #059669; font-weight: 700; }
        .salary-cell.readonly.tax { color: var(--danger); }
        .salary-cell.readonly.zero { color: #9ca3af; }
        .salary-month-tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 10px; }
        .salary-month-tab { padding: 6px 14px; border: 1px solid #e5e7eb; background: linear-gradient(180deg, #ffffff, #fafbfc); border-radius: 10px; font-size: 11px; cursor: pointer; color: #6b7280; transition: all var(--transition-fast); font-weight: 500; }
        .salary-month-tab:hover { background: linear-gradient(180deg, #f3f4f6, #e5e7eb); color: #374151; transform: translateY(-1px); }
        .salary-month-tab.active { background: linear-gradient(135deg, var(--accent), #2563eb); color: #fff; border-color: var(--accent); box-shadow: 0 2px 8px rgba(59,130,246,0.3); }
        .salary-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
        .salary-actions .btn { font-size: 11px; padding: 5px 12px; }
        .salary-summary-row { background: #f0f9ff !important; font-weight: 700; }
        .salary-summary-row td { border-top: 2px solid #93c5fd; color: #1e40af; }
        /* ===== Kanban Board ===== */
        .kanban-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; margin-top: 8px; min-height: 420px; }
        .kanban-board::-webkit-scrollbar { height: 6px; }
        .kanban-board::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
        .kanban-stage-col { flex: 0 0 260px; min-width: 240px; background: linear-gradient(180deg, #f8fafc, #f1f5f9); border-radius: 14px; border: 1px solid #e2e8f0; display: flex; flex-direction: column; max-height: calc(100vh - 280px); }
        .kanban-stage-header { padding: 14px 16px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
        .kanban-stage-title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
        .kanban-stage-title .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
        .kanban-stage-count { background: #e2e8f0; color: #475569; font-size: 11px; font-weight: 700; width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
        .kanban-stage-body { flex: 1; overflow-y: auto; padding: 8px; }
        .kanban-stage-body::-webkit-scrollbar { width: 4px; }
        .kanban-stage-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
        .kanban-card { background: linear-gradient(180deg, white, #fafbfc); border-radius: 14px; border: 1px solid #e2e8f0; padding: 14px; margin-bottom: 10px; cursor: pointer; transition: all var(--transition-fast); box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
        .kanban-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.08); border-color: #3b82f6; transform: translateY(-2px); }
        .kanban-card-title { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .kanban-card-code { font-size: 10px; color: #94a3b8; margin-bottom: 4px; }
        .kanban-card-body { font-size: 11px; color: #64748b; }
        .kanban-card-body .row { display: flex; justify-content: space-between; padding: 2px 0; }
        .kanban-card-body .label { color: #94a3b8; }
        .kanban-card-body .value { font-weight: 600; color: #334155; }
        .kanban-card-body .value.amount { color: #3b82f6; font-weight: 700; }
        .kanban-card-footer { margin-top: 6px; padding-top: 6px; border-top: 1px solid #f1f5f9; display: flex; align-items: center; justify-content: space-between; font-size: 10px; }
        .kanban-card-footer .badge-sm { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
        .kanban-card-footer .badge-sm.self { background: #eff6ff; color: #3b82f6; }
        .kanban-card-footer .badge-sm.channel { background: #fef3c7; color: #92400e; }
        .kanban-empty-stage { text-align: center; padding: 32px 8px; color: #d1d5db; }
        .kanban-empty-stage i { font-size: 22px; display: block; margin-bottom: 4px; }
        .kanban-empty-stage p { font-size: 11px; }

        /* ICP备案底部 */
        .icp-footer {
            position: fixed;
            bottom: 4px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 11px;
            color: rgba(100, 116, 139, 0.5);
            z-index: 9999;
            pointer-events: none;
            white-space: nowrap;
            letter-spacing: 0.5px;
        }

    /* 服务商分类：标签/多选芯片 */
    .cat-badge { display:inline-block; padding:2px 8px; border-radius:10px; background:#eef2ff; color:#3b82f6; font-size:12px; margin:1px 2px 1px 0; white-space:nowrap; }
    .cat-chips { display:flex; flex-wrap:wrap; gap:8px; }
    .cat-chip { display:inline-flex; align-items:center; gap:4px; padding:5px 12px; border-radius:16px; background:#f1f5f9; color:var(--gray-600,#475569); font-size:13px; cursor:pointer; border:1px solid #e2e8f0; user-select:none; transition:all .15s; }
    .cat-chip:hover { border-color:#93c5fd; }
    .cat-chip.on { background:#eef2ff; color:#3b82f6; border-color:#93c5fd; font-weight:600; }
    .cat-chip input { display:none; }

    
/* ============================================================
   ===== 顶部横向导航布局（桌面端覆盖，2026-07-29）=====
   原侧边栏 .sidebar 整体转为页面顶部的横向导航条。
   仅作用于桌面端（>768px）；移动端仍用底部 Tab + 抽屉，不受影响。
   ============================================================ */
@media (min-width: 769px) {
    /* 整体改为纵向排布：顶栏在上，主内容占满剩余空间 */
    body { flex-direction: column; }

    .sidebar {
        width: 100%;
        height: var(--topnav-height, 60px);
        flex-direction: row;
        align-items: center;
        box-shadow: 0 4px 24px rgba(0,0,0,.18);
        padding: 0 16px 0 0;
        z-index: 100; /* 高于 topbar(z:50)，确保用户下拉菜单不被遮挡 */
    }
    .sidebar::before {
        height: 100%;
        background: radial-gradient(ellipse at top left, rgba(59,130,246,0.15), transparent 60%);
    }

    /* Logo 区：横向内嵌，右侧加分隔线 */
    .sidebar-logo {
        padding: 0 18px;
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,.1);
        flex-shrink: 0;
        height: 100%;
        display: flex; align-items: center;
    }
    .logo-icon { width: 34px; height: 34px; font-size: 15px; border-radius: 10px; }
    .logo-text { font-size: 15px; }
    .logo-sub { font-size: 10px; }

    /* 导航区：横向排列，超出可横向滚动 */
    .sidebar-nav {
        padding: 0 8px;
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 2px;
        overflow-y: hidden;
        overflow-x: auto;
        height: 100%;
        scrollbar-width: none;           /* 隐藏横向滚动条（Firefox） */
    }
    .sidebar-nav::-webkit-scrollbar { display: none; } /* Chrome/Edge */

    /* 分组：横向展开，组标题隐藏，组间用竖线分隔 */
    .nav-group {
        margin-bottom: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 2px;
        flex-shrink: 0;
    }
    .nav-group + .nav-group {
        border-left: 1px solid rgba(255,255,255,.12);
        padding-left: 8px;
        margin-left: 6px;
    }
    .nav-group-title { display: none; }
    .nav-group.major { padding-top: 0; border-top: none; margin-bottom: 0; }

    /* 导航项：横向胶囊样式 */
    .nav-item {
        margin-bottom: 0;
        padding: 8px 13px;
        white-space: nowrap;
        flex-shrink: 0;
        gap: 7px;
        font-size: 13px;
    }
    .nav-item:hover { transform: translateY(-1px); }
    .nav-item.active {
        background: linear-gradient(180deg, var(--nav-active-bg), rgba(59,130,246,.08));
        box-shadow: inset 0 -3px 0 var(--nav-active-border), 0 2px 8px rgba(59,130,246,.15);
    }
    .nav-item .nav-icon { width: auto; }

    /* 用户信息：靠右显示 */
    .sidebar-footer {
        padding: 0 4px 0 14px;
        border-top: none;
        border-left: 1px solid rgba(255,255,255,.1);
        height: 100%;
        display: flex; align-items: center;
        margin-left: 8px;
    }
    .user-card { gap: 8px; }
    .user-avatar { width: 32px; height: 32px; font-size: 13px; }
    .user-name { font-size: 12px; line-height: 1.2; }
    .user-role { font-size: 10px; }
    .user-card > i[onclick] { margin-left: 10px !important; }
}

/* 中等宽度屏幕：进一步压缩，保证一屏放下更多菜单 */
@media (min-width: 769px) and (max-width: 1280px) {
    .sidebar-logo { padding: 0 12px; }
    .logo-sub { display: none; }
    .nav-item { padding: 8px 10px; font-size: 12.5px; }
    .user-name, .user-role { display: none; }
}

/* ===== 右上角用户下拉菜单（系统配置/操作日志/退出登录）===== */
.sidebar-footer { position: relative; }
.user-card { cursor: pointer; padding: 6px 8px; border-radius: 8px; transition: background .15s; }
.user-card:hover { background: rgba(255,255,255,.08); }
.user-menu-caret { font-size: 10px; color: rgba(255,255,255,.45); margin-left: 6px; transition: transform .2s; }
.sidebar-footer.menu-open .user-menu-caret { transform: rotate(180deg); }
.user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 8px;
    min-width: 170px;
    background: #fff;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15,23,42,.16), 0 2px 8px rgba(15,23,42,.08);
    padding: 6px;
    z-index: 1000;
}
.user-menu.open { display: block; animation: userMenuIn .15s ease; }
@keyframes userMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.user-menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 7px;
    font-size: 13px; color: var(--gray-700, #334155);
    cursor: pointer; white-space: nowrap;
    transition: background .12s, color .12s;
    user-select: none;
}
.user-menu-item i { width: 16px; text-align: center; font-size: 13px; color: var(--gray-500, #64748b); }
.user-menu-item:hover { background: var(--gray-100, #f1f5f9); color: var(--gray-900, #0f172a); }
.user-menu-item:hover i { color: var(--accent, #3b82f6); }
.user-menu-item.danger { color: #dc2626; }
.user-menu-item.danger i { color: #dc2626; }
.user-menu-item.danger:hover { background: #fef2f2; color: #b91c1c; }
.user-menu-divider { height: 1px; background: var(--gray-200, #e2e8f0); margin: 5px 6px; }

/* 移动端抽屉里（若显示侧栏时）向上弹出，避免超出屏幕 */
@media (max-width: 768px) {
    .user-menu { top: auto; bottom: calc(100% + 6px); }
}

/* ===== 精简用户名显示（仅文字+箭头，2026-07-29）===== */
@media (min-width: 769px) {
    .sidebar-footer .user-card {
        padding: 6px 12px;
        gap: 6px;
        border-radius: 8px;
    }
    .sidebar-footer .user-name {
        font-size: 13.5px;
        font-weight: 500;
        letter-spacing: 0.3px;
    }
    .sidebar-footer .user-menu-caret {
        font-size: 10px;
        color: rgba(255,255,255,.5);
    }
}

/* ===== 下拉选项管理器（⚙按钮 + 弹窗，2026-07-29）===== */
.dict-manage-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; margin-left: -4px; margin-right: 4px;
    border-radius: 6px; cursor: pointer; flex-shrink: 0;
    color: var(--gray-400); font-size: 12px;
    transition: all .15s; vertical-align: middle;
}
.dict-manage-btn:hover { background: var(--gray-100); color: var(--accent, #3b82f6); transform: rotate(30deg); }
.opt-mgr-overlay {
    position: fixed; inset: 0; z-index: 10500;
    background: rgba(15,23,42,.42);
    display: flex; align-items: center; justify-content: center;
    animation: optMgrFade .15s ease;
}
@keyframes optMgrFade { from { opacity: 0; } to { opacity: 1; } }
.opt-mgr-box {
    width: 400px; max-width: 92vw; max-height: 80vh;
    background: #fff; border-radius: 14px;
    box-shadow: 0 24px 64px rgba(15,23,42,.28);
    display: flex; flex-direction: column;
    animation: optMgrPop .18s ease;
}
@keyframes optMgrPop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.opt-mgr-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 18px; border-bottom: 1px solid var(--gray-200, #e2e8f0);
    font-size: 15px; font-weight: 600; color: var(--gray-800, #1e293b);
}
.opt-mgr-close { cursor: pointer; color: var(--gray-400); padding: 4px; transition: color .12s; }
.opt-mgr-close:hover { color: var(--gray-700); }
.opt-mgr-warn {
    margin: 10px 16px 0; padding: 8px 12px;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
    font-size: 12px; color: #92400e; line-height: 1.5;
}
.opt-mgr-warn i { margin-right: 4px; }
.opt-mgr-list { flex: 1; overflow-y: auto; padding: 10px 12px; min-height: 120px; }
.opt-mgr-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px;
    transition: background .12s;
}
.opt-mgr-item:hover { background: var(--gray-50, #f8fafc); }
.opt-mgr-idx {
    width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
    background: var(--gray-100, #f1f5f9); color: var(--gray-500);
    font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.opt-mgr-name { flex: 1; font-size: 13.5px; color: var(--gray-800); word-break: break-all; }
.opt-mgr-acts { display: flex; gap: 4px; flex-shrink: 0; }
.opt-mgr-acts i {
    width: 26px; height: 26px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 12px; color: var(--gray-400);
    transition: all .12s;
}
.opt-mgr-acts i:hover { background: var(--gray-100); color: var(--accent, #3b82f6); }
.opt-mgr-acts i.danger:hover { background: #fef2f2; color: #dc2626; }
.opt-mgr-acts i.disabled { opacity: .25; pointer-events: none; }
.opt-mgr-addrow {
    display: flex; gap: 8px; padding: 12px 16px;
    border-top: 1px solid var(--gray-200, #e2e8f0);
}
.opt-mgr-addrow input {
    flex: 1; padding: 8px 12px; font-size: 13px;
    border: 1px solid var(--gray-300, #cbd5e1); border-radius: 8px;
    outline: none; transition: border-color .12s;
}
.opt-mgr-addrow input:focus { border-color: var(--accent, #3b82f6); }
