        /* ═══════════════════ 设计变量 — 现代紫青系（视觉升级 v2） ═══════════════════ */
        :root {
            /* 主品牌色（#1e88e5 礼宝蓝 → #6366f1 靛紫，更现代） */
            --primary: #6366f1;
            --primary-hover: #4f46e5;
            --primary-active: #4338ca;
            --primary-light: #818cf8;
            --primary-50: #eef2ff;
            --primary-100: #e0e7ff;
            --primary-200: #c7d2fe;   /* 保留：旧代码引用 */

            /* 语义色（更高饱和度，更柔和） */
            --success: #10b981;
            --success-bg: #ecfdf5;
            --success-border: #d1fae5;
            --warning: #f59e0b;
            --warning-bg: #fffbeb;
            --warning-border: #fef3c7;
            --danger: #ef4444;
            --danger-bg: #fef2f2;
            --danger-border: #fee2e2;
            --info: #6b7280;
            --info-bg: #f9fafb;
            --info-border: #f3f4f6;

            /* 评分等级色（保持业务区分，独立色系不引用 --primary） */
            --grade-s: #ef4444;
            --grade-a: #f59e0b;
            --grade-b: #6366f1;
            --grade-c: #6b7280;
            --grade-d: #9ca3af;

            /* 文字层级（4 级，对比度更清晰） */
            --text-primary: #111827;      /* 标题/关键数字 */
            --text-regular: #374151;      /* 正文 */
            --text-secondary: #6b7280;    /* 辅助说明 */
            --text-placeholder: #9ca3af;  /* 占位/禁用 */

            /* 背景层级（3 层，层次感更强） */
            --bg-page: #f9fafb;           /* 页面底色（更浅，减少灰度压迫） */
            --bg-card: #ffffff;
            --bg-sidebar: #1e293b;        /* 侧边栏（更深，对比更强） */
            --bg-sidebar-hover: #334155;
            --bg-topbar: #ffffff;

            /* 边框（2 级） */
            --border: #e5e7eb;
            --border-light: #f3f4f6;
            --border-base: #d1d5db;       /* 保留：旧代码引用 */

            /* 阴影（3 级，双层叠加更细腻） */
            --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
            --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
            --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
            --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);

            /* 圆角（放大，更柔和） */
            --radius-sm: 6px;
            --radius: 8px;
            --radius-lg: 12px;            /* 卡片用，原 8px → 12px */
            --radius-xl: 16px;            /* 大容器/Modal */
            --radius-full: 999px;         /* 胶囊/徽章/头像 */

            /* 间距（4 的倍数体系，呼吸感更好） */
            --spacing-xs: 4px;
            --spacing-sm: 8px;
            --spacing-md: 16px;
            --spacing-lg: 24px;
            --spacing-xl: 32px;

            /* 字体 */
            --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                           'PingFang SC', 'Microsoft YaHei', sans-serif;
            --font-mono: 'SF Mono', 'Roboto Mono', Consolas, monospace;

            /* 过渡（统一时长，更顺滑） */
            --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);

            --sidebar-width: 220px;
            --topbar-height: 56px;
        }

        /* ═══════════════════ Reset ═══════════════════ */
        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', sans-serif;
            background: var(--bg-page);
            color: var(--text-regular);
            font-size: 14px;
            line-height: 1.6;
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
        }
        a { text-decoration: none; color: var(--primary); }
        a:hover { color: var(--primary-hover); }
        ul, ol { list-style: none; }
        button { cursor: pointer; font-family: inherit; }
        input, select, textarea { font-family: inherit; font-size: inherit; }

        /* ═══════════════════ Top Bar ═══════════════════ */
        .topbar {
            position: fixed;
            top: 0; left: 0; right: 0;
            height: var(--topbar-height);
            background: var(--bg-topbar);
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            padding: 0 20px;
            z-index: 1000;
            box-shadow: var(--shadow-sm);
        }
        .topbar-logo {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 17px;
            font-weight: 700;
            color: var(--primary);
            padding-right: 20px;
            margin-right: 20px;
            border-right: 1px solid var(--border);
            white-space: nowrap;
        }
        .topbar-logo-icon {
            font-size: 19px;
        }
        .topbar-nav {
            display: flex;
            align-items: center;
            gap: 6px;
            flex: 1;
            overflow-x: auto;
        }
        .topbar-nav::-webkit-scrollbar { display: none; }
        .topbar-nav-item {
            padding: 6px 14px;
            border-radius: var(--radius);
            font-size: 13px;
            color: var(--text-regular);
            font-weight: 500;
            cursor: pointer;
            transition: all var(--transition);
            white-space: nowrap;
            text-decoration: none;
        }
        .topbar-nav-item:hover { color: var(--primary); background: var(--primary-50); }
        .topbar-nav-item.active { color: var(--primary); background: var(--primary-50); font-weight: 600; }
        .topbar-nav-sep { color: var(--text-placeholder); font-size: 12px; user-select: none; }
        .topbar-right {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .topbar-icon-btn {
            width: 36px; height: 36px;
            border: none;
            background: transparent;
            color: var(--text-regular);
            border-radius: var(--radius);
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition);
            position: relative;
        }
        .topbar-icon-btn:hover { background: var(--bg-page); color: var(--primary); }
        .topbar-icon-badge {
            position: absolute;
            top: 4px; right: 4px;
            min-width: 16px; height: 16px;
            background: var(--danger);
            color: #fff;
            border-radius: 8px;
            padding: 0 4px;
            font-size: 10px;
            font-weight: 700;
            display: none;
            align-items: center;
            justify-content: center;
        }
        .topbar-icon-badge.show { display: inline-flex; }
        .topbar-account {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 5px 12px 5px 5px;
            background: var(--bg-page);
            border: 1px solid transparent;
            border-radius: 100px;
            cursor: pointer;
            transition: all var(--transition);
            margin-left: 4px;
        }
        .topbar-account:hover { border-color: var(--primary-200); background: var(--primary-50); }
        .topbar-account-avatar {
            width: 28px; height: 28px;
            border-radius: 50%;
            background: var(--primary);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
        }
        .topbar-account-name { font-size: 13px; color: var(--text-primary); font-weight: 500; }
        .topbar-account-arrow { font-size: 10px; color: var(--text-secondary); }

        /* Account dropdown */
        .account-dropdown {
            position: absolute;
            top: calc(var(--topbar-height) - 4px);
            right: 20px;
            min-width: 200px;
            background: var(--bg-card);
            border-radius: var(--radius);
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border);
            padding: 6px 0;
            z-index: 1100;
            display: none;
        }
        .account-dropdown.show { display: block; }
        .account-dropdown-header {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-light);
        }
        .account-dropdown-header .name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
        .account-dropdown-header .role { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
        .account-dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 16px;
            color: var(--text-regular);
            font-size: 13px;
            cursor: pointer;
            transition: background var(--transition);
        }
        .account-dropdown-item:hover { background: var(--primary-50); color: var(--primary); }
        .account-dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

        /* Notification dropdown */
        .notif-dropdown {
            position: absolute;
            top: calc(var(--topbar-height) - 4px);
            right: 70px;
            width: 320px;
            max-height: 400px;
            background: var(--bg-card);
            border-radius: var(--radius);
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border);
            z-index: 1100;
            display: none;
            flex-direction: column;
        }
        .notif-dropdown.show { display: flex; }
        .notif-dropdown-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-light);
        }
        .notif-dropdown-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
        .notif-dropdown-clear { font-size: 12px; color: var(--primary); cursor: pointer; }
        .notif-dropdown-body {
            overflow-y: auto;
            max-height: 320px;
        }
        .notif-item {
            display: flex;
            gap: 10px;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-light);
            cursor: pointer;
            transition: background var(--transition);
        }
        .notif-item:hover { background: var(--bg-page); }
        .notif-item.unread { background: var(--primary-50); }
        .notif-icon {
            width: 32px; height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 14px;
        }
        .notif-icon.info { background: var(--primary-50); color: var(--primary); }
        .notif-icon.success { background: var(--success-bg); color: var(--success); }
        .notif-icon.warning { background: var(--warning-bg); color: var(--warning); }
        .notif-text { flex: 1; }
        .notif-text-title { font-size: 13px; color: var(--text-primary); font-weight: 500; line-height: 1.4; }
        .notif-text-time { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
        .notif-empty { padding: 40px 16px; text-align: center; color: var(--text-secondary); font-size: 13px; }

        /* ═══════════════════ Sidebar ═══════════════════ */
        .sidebar {
            position: fixed;
            top: var(--topbar-height);
            left: 0; bottom: 0;
            width: var(--sidebar-width);
            background: var(--bg-card);
            z-index: 999;
            overflow-y: auto;
            overflow-x: hidden;
            transition: transform var(--transition);
            border-right: 1px solid var(--border);
        }
        .sidebar::-webkit-scrollbar { width: 4px; }
        .sidebar::-webkit-scrollbar-thumb { background: var(--border-base); border-radius: 2px; }
        .sidebar-menu { padding: 4px 0; }

        /* Group header */
        .sidebar-group-title {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 18px;
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition);
            user-select: none;
        }
        .sidebar-group-title:hover { background: var(--bg-page); }
        .sidebar-group-title .group-arrow {
            margin-left: auto;
            font-size: 10px;
            transition: transform 0.25s ease;
            color: var(--text-secondary);
        }
        .sidebar-group-title.active {
            color: #fff;
            background: var(--primary);
        }
        .sidebar-group-title.active .group-arrow { color: rgba(255,255,255,0.7); }

        /* Submenu */
        .sidebar-submenu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }
        .sidebar-group.expanded .sidebar-group-title .group-arrow { transform: rotate(180deg); }
        .sidebar-group.expanded .sidebar-submenu { max-height: 400px; }

        /* Sub-items (indented) */
        .sidebar-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 18px 11px 48px;
            color: var(--text-regular);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .sidebar-item:hover { color: var(--primary); background: var(--primary-50); }
        .sidebar-item.active {
            color: var(--primary);
            background: var(--primary-50);
            font-weight: 600;
            position: relative;
        }
        .sidebar-item.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 4px;
            bottom: 4px;
            width: 3px;
            background: var(--primary);
            border-radius: 0 2px 2px 0;
        }

        /* Standalone top-level item */
        .sidebar-top-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 13px 18px;
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition);
        }
        .sidebar-top-item:hover { background: var(--bg-page); }
        .sidebar-top-item.active {
            color: #fff;
            background: var(--primary);
        }

        .sidebar-item-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
        .sidebar-item-icon svg { width: 16px; height: 16px; flex-shrink: 0; }
        .sidebar-divider { height: 1px; background: var(--border); margin: 4px 16px; }

        /* ═══════════════════ Main Content ═══════════════════ */
        .main-content {
            margin-left: var(--sidebar-width);
            margin-top: var(--topbar-height);
            padding: 16px 24px 24px;
            min-height: calc(100vh - var(--topbar-height));
        }
        .main-content-inner { max-width: 1400px; margin: 0 auto; }

        /* ═══════════════════ Card / Section ═══════════════════ */
        .card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            padding: 18px 20px;
            margin-bottom: 14px;
            box-shadow: var(--shadow-sm);
        }
        .card-title {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 14px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .card-title::before {
            content: '';
            width: 4px; height: 16px;
            background: var(--primary);
            border-radius: 2px;
        }
        .card-title-extra { margin-left: auto; font-size: 13px; font-weight: 500; }

        /* ═══════════════════ Filter Bar (多字段表单) ═══════════════════ */
        .filter-bar {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 14px 16px;
            align-items: end;
        }
        .filter-item {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .filter-label {
            font-size: 13px;
            color: var(--text-regular);
            font-weight: 600;
        }
        /* 营销短信：版本长度档位行（横向排版） */
        .variant-row {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            padding: 6px 0;
            width: max-content;
        }
        .variant-row .filter-label {
            margin-bottom: 0;
            min-width: 50px;
            flex-shrink: 0;
        }
        .variant-row select.variant-length-select {
            min-width: 100px;
        }
        .variant-row input.variant-copies-input {
            width: 64px;
            text-align: center;
        }
        .variant-row .variant-times,
        .variant-row .variant-unit {
            color: var(--text-secondary);
            font-size: 13px;
        }
        /* 营销短信：版本行容器（占满整行，内部纵向堆叠） */
        #variantLengthModes {
            grid-column: 1 / -1;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
            padding: 4px 0;
        }
        .filter-actions {
            grid-column: 1 / -1;
            display: flex;
            align-items: center;
            gap: 10px;
            padding-top: 6px;
        }

        /* ═══════════════════ Buttons ═══════════════════ */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            height: 36px;
            padding: 0 18px;
            border: 1px solid var(--border-base);
            border-radius: var(--radius);
            font-size: 14px;
            font-weight: 500;
            background: var(--bg-card);
            color: var(--text-regular);
            cursor: pointer;
            transition: all var(--transition);
            white-space: nowrap;
        }
        .btn:hover { color: var(--primary); border-color: var(--primary-200); background: var(--primary-50); }
        .btn-primary {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }
        .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
        .btn-primary:active { transform: translateY(0); }
        .btn-primary:disabled { background: var(--primary-light); border-color: var(--primary-light); cursor: not-allowed; opacity: 0.6; transform: none; box-shadow: none; }
        .btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
        .btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
        .btn-success { background: var(--success); border-color: var(--success); color: #fff; }
        .btn-success:hover { background: #059669; border-color: #059669; color: #fff; }
        .btn-warn { background: var(--warning); border-color: var(--warning); color: #fff; }
        .btn-warn:hover { background: #d97706; border-color: #d97706; color: #fff; }
        .btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
        .btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }
        .btn-info { background: var(--info); border-color: var(--info); color: #fff; }
        .btn-info:hover { background: #4b5563; border-color: #4b5563; color: #fff; }
        .btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
        .btn-xs { height: 26px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-sm); }
        .btn-text {
            background: transparent;
            border: none;
            color: var(--primary);
            padding: 4px 8px;
        }
        .btn-text:hover { color: var(--primary-hover); background: var(--primary-50); }

        /* ═══════════════════ Form ═══════════════════ */
        .form-input, .form-select, .form-textarea {
            height: 36px;
            padding: 0 12px;
            border: 1px solid var(--border-base);
            border-radius: var(--radius);
            font-size: 14px;
            color: var(--text-primary);
            background: var(--bg-card);
            outline: none;
            transition: border-color var(--transition);
            width: 100%;
        }
        .form-input:focus, .form-select:focus, .form-textarea:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-50);  /* 聚焦光环，与新主色对齐 */
        }
        .form-input::placeholder { color: var(--text-placeholder); }
        .form-textarea { height: auto; padding: 8px 12px; resize: vertical; min-height: 60px; }
        .form-select { appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 10px center;
        }

        /* ═══════════════════ Tags / Badges（胶囊化） ═══════════════════ */
        .tag {
            display: inline-flex;
            align-items: center;
            padding: 2px 10px;
            border-radius: var(--radius-full);  /* 方角 → 胶囊 */
            font-size: 12px;
            font-weight: 500;                   /* 600 → 500，更柔和 */
            line-height: 1.7;
            white-space: nowrap;
            border: 1px solid transparent;
        }
        .tag-primary { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); }
        .tag-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
        .tag-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
        .tag-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
        .tag-info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
        .tag-xbb { background: var(--primary-50); color: var(--primary-active); }
        .tag-bdzb { background: var(--warning-bg); color: var(--warning); }
        .tag-qcc { background: var(--success-bg); color: var(--success); }
        .grade-s { background: var(--danger-bg); color: var(--grade-s); border: 1px solid var(--danger-border); }
        .grade-a { background: var(--warning-bg); color: var(--grade-a); border: 1px solid var(--warning-border); }
        .grade-b { background: var(--primary-50); color: var(--grade-b); border: 1px solid var(--primary-100); }
        .grade-c { background: var(--info-bg); color: var(--grade-c); border: 1px solid var(--info-border); }
        .grade-d { background: var(--info-bg); color: var(--grade-d); border: 1px solid var(--info-border); }

        /* ═══════════════════ Data Table ═══════════════════ */
        .table-wrap { overflow-x: auto; }
        .data-table {
            width: 100%;
            border-collapse: separate;     /* collapse → separate，支持圆角 */
            border-spacing: 0;
            font-size: 14px;
        }
        .data-table thead th {
            background: var(--bg-page);
            color: var(--text-secondary);
            font-weight: 500;              /* 600 → 500，更柔和 */
            font-size: 12px;               /* 13px → 12px */
            padding: var(--spacing-md);    /* 8px → 16px */
            text-align: left;
            border-bottom: 1px solid var(--border);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            text-transform: uppercase;     /* 大写表头 */
            letter-spacing: 0.5px;         /* 字间距 */
        }
        .data-table tbody td {
            padding: var(--spacing-md);    /* 8px → 16px */
            border-bottom: 1px solid var(--border-light);
            color: var(--text-regular);
            vertical-align: middle;
        }
        .data-table tbody tr:last-child td { border-bottom: none; }
        .data-table tbody tr { transition: background var(--transition-fast); }
        @media (hover: hover) {
            .data-table tbody tr:hover { background: var(--primary-50); }
        }
        .data-table .col-check { width: 36px; }
        .data-table .col-index { width: 50px; text-align: center; color: var(--text-secondary); font-weight: 600; }
        .data-table .col-title { min-width: 220px; font-weight: 600; color: var(--text-primary); }
        .data-table .col-amount { font-weight: 700; color: var(--primary); white-space: nowrap; }
        .data-table .col-time { white-space: nowrap; color: var(--text-secondary); }
        .data-table .col-source { width: 90px; text-align: center; }
        .data-table .col-action { width: 100px; text-align: center; white-space: nowrap; vertical-align: middle; }
        .data-table .col-action .btn { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
        .data-table .col-score { width: 70px; text-align: right; }
        .data-table input[type=checkbox] { cursor: pointer; }
        .data-table .ellipsis-1 {
            max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;
        }
        .table-expand-row td { padding: 0 var(--spacing-md) var(--spacing-md) 50px; background: var(--bg-page); }
        .table-expand-content {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 14px 18px;
            font-size: 13px;
            line-height: 1.8;
            max-height: 200px;
            overflow-y: auto;
            white-space: pre-wrap;
        }

        /* ═══════════════════ Sort Bar ═══════════════════ */
        .sort-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 4px 0 14px;
            flex-wrap: wrap;
        }
        .sort-bar-label { font-size: 13px; color: var(--text-secondary); font-weight: 600; }

        /* ═══════════════════ Pagination ═══════════════════ */
        .pagination-wrap {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            padding: 14px 0 0;
            border-top: 1px solid var(--border);
            margin-top: 14px;
        }
        .pagination-info { font-size: 13px; color: var(--text-secondary); }
        .pagination-info b { color: var(--text-primary); }
        .pagination-btn-group { display: flex; align-items: center; gap: 4px; }
        .page-btn {
            min-width: 32px; height: 32px;
            border: 1px solid var(--border-base);
            border-radius: var(--radius-sm);
            background: var(--bg-card);
            color: var(--text-regular);
            font-size: 13px;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0 8px;
            transition: all var(--transition);
        }
        .page-btn:hover:not(:disabled):not(.active) { color: var(--primary); border-color: var(--primary-200); }
        .page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; cursor: default; }
        .page-btn:disabled { color: var(--text-placeholder); cursor: not-allowed; }
        .page-ellipsis { color: var(--text-placeholder); padding: 0 4px; }
        .page-size-select { height: 32px; padding: 0 8px; border: 1px solid var(--border-base); border-radius: var(--radius-sm); font-size: 13px; outline: none; cursor: pointer; }

        /* ═══════════════════ Dashboard / Stats Cards ═══════════════════ */
        .stat-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: var(--spacing-md);       /* 14px → 16px */
            margin-bottom: var(--spacing-md);
        }
        .stat-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);    /* 8px → 12px */
            padding: var(--spacing-lg);         /* 20px → 24px，呼吸感 */
            box-shadow: var(--shadow);          /* 单层 sm → 双层 */
            display: flex;
            align-items: center;
            gap: var(--spacing-md);
            transition: transform var(--transition), box-shadow var(--transition);
            position: relative;
            overflow: hidden;
        }
        /* 悬停微动效（仅桌面端） */
        @media (hover: hover) {
            .stat-card:hover {
                transform: translateY(-2px);
                box-shadow: var(--shadow-lg);
            }
        }
        /* 顶部品牌色条（视觉焦点） */
        .stat-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 3px;
            background: var(--primary);
            opacity: 0.9;
        }
        .stat-icon {
            width: 48px; height: 48px;          /* 56px → 48px，更紧凑 */
            border-radius: var(--radius-lg);    /* 圆 → 圆角矩形，更现代 */
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }
        .stat-icon svg { width: 22px; height: 22px; }
        .stat-icon.blue { background: var(--primary-50); color: var(--primary); }
        .stat-icon.green { background: var(--success-bg); color: var(--success); }
        .stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
        .stat-icon.red { background: var(--danger-bg); color: var(--danger); }
        .stat-body { flex: 1; min-width: 0; }
        .stat-label { font-size: 13px; color: var(--text-secondary); margin-bottom: var(--spacing-sm); font-weight: 500; }
        .stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1.1; letter-spacing: -0.5px; }
        .stat-extra { font-size: 12px; color: var(--text-secondary); margin-top: var(--spacing-sm); }

        /* ═══════════════════ Account Management ═══════════════════ */

        /* ═══════════════════ Empty / Skeleton / Loading（视觉升级） ═══════════════════ */
        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: var(--spacing-xl) var(--spacing-lg);
            color: var(--text-secondary);
            text-align: center;
        }
        .empty-icon {
            font-size: 56px; opacity: 0.4; margin-bottom: var(--spacing-md);
            display: inline-flex; align-items: center; justify-content: center;
        }
        .empty-icon svg { opacity: 1; color: inherit; }
        .empty-title { font-size: 15px; color: var(--text-secondary); font-weight: 600; margin-bottom: var(--spacing-sm); }
        .empty-desc { font-size: 13px; color: var(--text-placeholder); }

        /* 标题栏内 SVG 图标垂直对齐 + 间距 */
        .title-icon {
            display: inline-block;
            vertical-align: -3px;
            margin-right: 5px;
            flex-shrink: 0;
            /* 给所有标题图标染上品牌主色，配合容器染色后更显精致 */
            color: var(--primary);
            opacity: 0.95;
            stroke-width: 2.2;
        }
        /* 标题中含图标的标题项，让图标置于一个柔和徽章背景中（更高级） */
        .card-title:has(.title-icon) > span:first-child,
        .modal-title:has(.title-icon) > span:first-child {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .card-title:has(.title-icon) .title-icon,
        .modal-title:has(.title-icon) .title-icon {
            background: linear-gradient(135deg, var(--primary-50), #ffffff 90%);
            padding: 3px 5px;
            border-radius: 7px;
            box-shadow: inset 0 0 0 1px rgba(99,102,241,0.08);
        }

        /* 按钮内 SVG 图标统一对齐（防 emoji 替换后跳动） */
        .btn svg, .btn-sm svg, .btn-xs svg, .tab-btn svg {
            display: inline-block;
            vertical-align: -2px;
        }

        /* data-icon 属性生成的 SVG 图标间距 */
        .data-icon-svg {
            display: inline-block;
            vertical-align: -2px;
            margin-right: 4px;
            flex-shrink: 0;
        }
        .card-title .data-icon-svg,
        .modal-title .data-icon-svg {
            vertical-align: -3px;
            margin-right: 4px;
        }
        .modal-close .data-icon-svg {
            vertical-align: -3px;
            margin-right: 0;
        }

        /* 可折叠箭头：纯 CSS 三角形，不依赖任何文本字符 */
        .collapse-arrow {
            display: inline-block;
            width: 14px; height: 14px;
            margin-right: 6px;
            vertical-align: -2px;
            transition: transform 0.2s ease;
            flex-shrink: 0;
            position: relative;
        }
        .collapse-arrow::before {
            content: '';
            position: absolute;
            left: 3px; top: 4px;
            width: 0; height: 0;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 7px solid currentColor;
        }
        .collapse-arrow.collapsed {
            transform: rotate(-90deg);
        }

        /* stat-icon 内 SVG 保证尺寸继承 */
        .stat-icon svg { display: block; }

        /* 骨架屏：统一 shimmer 动画 + 变体 */
        .skeleton {
            background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
            background-size: 400% 100%;
            animation: shimmer 1.4s ease infinite;
            border-radius: var(--radius);
        }
        .skeleton-row {
            display: flex; gap: 18px; padding: 14px 0;
            border-bottom: 1px solid var(--border-light);
        }
        .skeleton-line {
            height: 14px; border-radius: var(--radius-sm);
            background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
            background-size: 400% 100%;
            animation: shimmer 1.4s ease infinite;
        }
        .skeleton-card { height: 120px; border-radius: var(--radius-lg); }
        .skeleton-title { height: 20px; width: 50%; margin-bottom: var(--spacing-sm); }
        .skeleton-text { height: 14px; margin-bottom: var(--spacing-sm); }
        .skeleton-text:last-child { width: 60%; }
        @keyframes shimmer {
            0% { background-position: 100% 50%; }
            100% { background-position: 0 50%; }
        }
        .loading-center { text-align: center; padding: 40px; color: var(--text-secondary); }
        .info-bar { background: var(--primary-50); border-radius: var(--radius); padding: var(--spacing-md); margin-bottom: var(--spacing-md); font-size: 13px; color: var(--primary-active); line-height: 1.8; }

        /* ═══════════════════ 页面切换动效（替代 display 突变） ═══════════════════ */
        .page-panel { animation: fadeInUp 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }
        /* 尊重用户动效偏好：减少动效时禁用动画 */
        @media (prefers-reduced-motion: reduce) {
            .page-panel { animation: none; }
            .stat-card:hover { transform: none; }
            .skeleton, .skeleton-line { animation: none; }
        }

        /* ═══════════════════ Toast（配色与新主色对齐） ═══════════════════ */
        .toast {
            position: fixed; top: 20px; left: 50%;
            transform: translateX(-50%);
            padding: 12px 24px;
            border-radius: var(--radius);
            font-size: 14px; font-weight: 500;
            z-index: 10001; box-shadow: var(--shadow-lg);
            animation: toastIn 0.35s ease-out forwards;
            display: flex; align-items: center; gap: 8px;
            max-width: 85vw;
        }
        .toast.removing { animation: toastOut 0.3s ease forwards; }
        .toast.error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
        .toast.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
        .toast.success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
        .toast.info { background: var(--primary-50); color: var(--primary); border: 1px solid var(--primary-100); }
        .toast-icon { font-size: 16px; }
        @keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
        @keyframes toastOut { from { opacity: 1; transform: translateX(-50%) translateY(0); } to { opacity: 0; transform: translateX(-50%) translateY(-16px); } }

        /* ═══════════════════ Modal ═══════════════════ */
        .modal-mask {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.45);
            z-index: 2000;
            display: none;
            align-items: flex-start;
            justify-content: center;
            padding: 40px 32px 32px;     /* 加大上下左右外边距，避免贴边 */
        }
        .modal-mask.show { display: flex; }
        .modal {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-lg);
            width: 100%;
            max-width: 1180px;                /* 中标信息等宽表格需要更宽 */
            max-height: calc(100vh - 80px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: modalIn 0.25s ease;
        }
        @keyframes modalIn { from { opacity: 0; transform: translateY(-20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
        .modal-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 18px 24px;
            border-bottom: 1px solid var(--border);
        }
        .modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
        .modal-close {
            width: 32px; height: 32px;
            border-radius: 50%;
            border: none;
            background: var(--bg-page);
            color: var(--text-secondary);
            font-size: 16px;
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
        }
        .modal-close:hover { background: var(--border-light); color: var(--text-primary); }
        .modal-body { overflow-y: auto; padding: 20px 24px; flex: 1; }
        .modal-body::-webkit-scrollbar { width: 6px; }
        .modal-body::-webkit-scrollbar-thumb { background: var(--border-base); border-radius: 3px; }

        /* ═══════ 中标信息专用表格样式 ═══════ */
        .bid-result-panel { padding: 4px 0; }
        .bid-result-title {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 18px;        /* 加大与下方表格的距离 */
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border-light);
            flex-wrap: wrap;            /* 在窄屏下允许换行 */
        }
        .bid-result-title .company {
            font-size: 17px;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: 0.2px;
        }
        .bid-result-title .count-chip {
            display: inline-flex;
            align-items: center;
            padding: 2px 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 500;
            background: var(--primary-50);
            color: var(--primary);
            border: 1px solid var(--primary-100);
        }
        /* 排序按钮组（位于标题右侧，鼠标可点击切换） */
        .bid-result-title .sort-group {
            margin-left: auto;            /* 推到最右 */
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .bid-result-title .sort-group .sort-label {
            font-size: 12px;
            color: var(--text-secondary);
            margin-right: 2px;
        }
        .bid-result-title .sort-btn {
            display: inline-flex;
            align-items: center;
            padding: 4px 12px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 500;
            background: var(--bg-page);
            color: var(--text-secondary);
            border: 1px solid var(--border-light);
            cursor: pointer;
            transition: all 0.15s ease;
            line-height: 1.4;
        }
        .bid-result-title .sort-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-50);
        }
        .bid-result-title .sort-btn.active {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
        }
        .bid-result-title .sort-btn .arrow {
            font-weight: 700;
            margin-left: 2px;
        }
        .bid-result-table-wrap {
            max-height: 62vh;
            overflow: auto;
            border: 1px solid var(--border-base);    /* 增强外边框，与内部行分隔线区分 */
            border-radius: var(--radius);
            background: var(--bg-card);
        }
        .bid-result-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
        .bid-result-table-wrap::-webkit-scrollbar-thumb { background: var(--border-base); border-radius: 4px; }
        .bid-result-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            font-size: 13px;
            table-layout: fixed;   /* 关键：统一列宽，让标题/正文能换行而不是挤压出水平滚动条 */
        }
        .bid-result-table thead th {
            position: sticky;
            top: 0;
            z-index: 1;
            background: #fafbfc;
            color: var(--text-secondary);
            font-weight: 600;
            font-size: 12px;
            padding: 14px 16px;         /* 加大表头单元格内边距 */
            text-align: left;
            border-bottom: 2px solid var(--border-base);  /* 表头下方用更明显的分隔线 */
            white-space: nowrap;
            letter-spacing: 0.3px;
        }
        .bid-result-table tbody td {
            padding: 16px 18px;         /* 进一步加大单元格内边距 */
            border-bottom: 1px solid #e5e7eb;          /* 行间分隔线：与卡片边框同色，清晰可见 */
            border-right: 1px solid #e5e7eb;           /* 列分隔线：明显可见，多行内容也能分清列 */
            color: var(--text-regular);
            vertical-align: top;   /* 标题/正文多行时顶部对齐，避免与单行列垂直居中错位 */
            line-height: 1.7;      /* 提升行高，让文字更通透 */
        }
        .bid-result-table tbody td:last-child { border-right: none; }   /* 最后一列不需要右边线 */
        .bid-result-table tbody tr:last-child td { border-bottom: none; }  /* 最后一行去掉底边线 */
        .bid-result-table tbody tr:hover > td { background: #f0f4ff; }   /* hover 时整行高亮（淡蓝色） */
        .bid-result-table tbody tr:nth-child(even) > td { background: #fafbfc; }   /* 斑马纹：奇数行/偶数行交替，让眼睛能跟踪行 */
        .bid-result-table .col-title  { width: 24%; font-weight: 600; color: var(--text-primary); }
        .bid-result-table .col-time   { width: 12%; word-break: break-all; font-variant-numeric: tabular-nums; color: var(--text-secondary); font-size: 12.5px; }
        .bid-result-table .col-region { width: 11%; word-break: break-word; }
        .bid-result-table .col-amount { width: 9%;  font-weight: 700; color: var(--primary); white-space: nowrap; }
        .bid-result-table .col-tender { width: 13%; }
        .bid-result-table .col-bidder { width: 13%; }
        .bid-result-table .col-agent  { width: 10%; }
        .bid-result-table .col-content{ width: 10%; color: var(--text-secondary); }
        .bid-result-table .col-link   { width: 6%;  text-align: center; }
        .bid-result-table .cell-multi {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            overflow: hidden;
            word-break: break-word;
            line-height: 1.7;       /* 与 td 行高保持一致 */
            max-height: 5.1em;
        }
        .bid-result-table .cell-title {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            overflow: hidden;
            word-break: break-word;
            line-height: 1.7;
            max-height: 5.1em;
        }
        .bid-result-table .cell-content {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            overflow: hidden;
            word-break: break-word;
            line-height: 1.7;
            max-height: 5.1em;
            color: var(--text-secondary);
            font-size: 12.5px;
        }
        .bid-result-table a.view-link {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
        }
        .bid-result-table a.view-link:hover { text-decoration: underline; }

        /* ═══════════════════ Status / Login dot ═══════════════════ */
        .login-dot {
            display: inline-block;
            width: 8px; height: 8px;
            border-radius: 50%;
            margin-right: 4px;
            vertical-align: middle;
        }
        .login-dot.online { background: var(--success); box-shadow: 0 0 4px rgba(103,194,58,0.5); }
        .login-dot.offline { background: var(--danger); }
        .login-dot.checking { background: var(--warning); animation: dotPulse 1.2s ease-in-out infinite; }
        @keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

        /* ═══════════════════ Responsive ═══════════════════ */
        .mobile-menu-btn {
            display: none;
            width: 36px; height: 36px;
            border: none; background: transparent;
            color: var(--text-primary);
            font-size: 20px;
            cursor: pointer;
            align-items: center; justify-content: center;
            border-radius: var(--radius);
        }
        .mobile-menu-btn:hover { background: var(--bg-page); }
        .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 998; }
        @media (max-width: 900px) {
            .sidebar { transform: translateX(-100%); }
            .sidebar.mobile-open { transform: translateX(0); }
            .sidebar.mobile-open ~ .sidebar-overlay { display: block; }
            .sidebar-overlay.show { display: block; }
            .main-content { margin-left: 0; }
            .mobile-menu-btn { display: flex; }
            .topbar-logo { padding-right: 12px; margin-right: 12px; }
            .topbar-nav { display: none; }
            .topbar-account-name { display: none; }
            .filter-bar { grid-template-columns: 1fr; }
            .data-table { font-size: 12px; }
            .data-table .col-title { min-width: 160px; }
            .pagination-wrap { flex-direction: column; align-items: flex-start; }
            .stat-grid { grid-template-columns: 1fr 1fr; }
        }

        /* ══════ Scoring Config ══════ */
        .config-section { margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
        .config-section-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 10px 16px; background: var(--bg-page); border-bottom: 1px solid var(--border);
            font-weight: 600; font-size: 14px; color: var(--text-primary);
        }
        .config-section-body { padding: 12px 16px; }
        .config-row {
            display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
            padding: 8px 0; border-bottom: 1px solid var(--border-light);
        }
        .config-row:last-child { border-bottom: none; }
        .config-label { min-width: 100px; font-size: 13px; color: var(--text-regular); }
        .config-label small { display: block; color: var(--text-secondary); font-weight: 400; font-size: 11px; margin-top: 2px; }
        .config-input {
            width: 80px; padding: 4px 8px; border: 1px solid var(--border-base); border-radius: var(--radius-sm);
            font-size: 13px; text-align: center; color: var(--text-primary);
        }
        .config-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-50); }
        .config-input-sm { width: 60px; }
        .config-range {
            flex: 1; min-width: 120px; max-width: 260px; height: 6px;
            -webkit-appearance: none; appearance: none; background: var(--border);
            border-radius: 3px; outline: none; cursor: pointer;
        }
        .config-range::-webkit-slider-thumb {
            -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
            background: var(--primary); cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
        }
        .config-weight-val {
            display: inline-block; width: 36px; text-align: center; font-weight: 700;
            font-size: 14px; color: var(--primary);
        }
        .config-switch {
            position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0;
        }
        .config-switch input { display: none; }
        .config-switch .slider {
            position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
            background: var(--text-placeholder); border-radius: 22px; transition: var(--transition);
        }
        .config-switch .slider::before {
            content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px;
            background: #fff; border-radius: 50%; transition: var(--transition);
        }
        .config-switch input:checked + .slider { background: var(--primary); }
        .config-switch input:checked + .slider::before { transform: translateX(18px); }
        .config-tier-row {
            display: flex; align-items: center; gap: 6px; padding: 4px 0; flex-wrap: wrap;
        }
        .config-tier-row span { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
        .config-tier-row .config-input { width: 55px; }
        .config-grade-row {
            display: flex; align-items: center; gap: 8px; padding: 4px 0;
        }
        .config-grade-row .grade-tag {
            display: inline-flex; align-items: center; justify-content: center;
            width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 13px; color: #fff;
        }
        .config-grade-row .config-input { width: 60px; }
        .config-summary {
            display: flex; align-items: center; gap: 8px; padding: 8px 16px;
            background: var(--primary-50); border-radius: var(--radius-sm); margin-bottom: 12px;
            font-size: 13px;
        }
        .config-summary.warn { background: var(--warning-bg); color: var(--warning); }
        .config-summary.ok { background: var(--success-bg); color: var(--success); }

        /* ══════ 数据洞察面板 ══════ */
        .insight-panel {
            background: linear-gradient(135deg, var(--primary-50) 0%, var(--bg-page) 100%);
            border: 1px solid var(--primary-100);
            border-radius: var(--radius);
            padding: 10px 14px;
            margin-bottom: 10px;
            font-size: 12px;
            line-height: 1.6;
            cursor: default;
            opacity: 0.92;
            transition: opacity 0.2s, box-shadow 0.2s;
        }
        .insight-panel:hover { opacity: 1; box-shadow: 0 2px 8px rgba(30,136,229,0.08); }
        .insight-panel.expandable { cursor: pointer; }
        .insight-panel .insight-header {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 6px;
        }
        .insight-panel .insight-title {
            font-weight: 600; color: var(--primary); font-size: 12px;
        }
        .insight-panel .insight-toggle {
            font-size: 11px; color: var(--text-secondary);
            transition: transform 0.2s;
        }
        .insight-panel.expanded .insight-toggle { transform: rotate(180deg); }
        .insight-panel .insight-stats {
            display: flex; flex-wrap: wrap; gap: 8px 16px;
            color: var(--text-secondary);
        }
        .insight-panel .insight-stat { white-space: nowrap; }
        .insight-panel .insight-stat b { color: var(--text-primary); font-weight: 600; }
        .insight-panel .insight-detail {
            display: none;
            margin-top: 8px; padding-top: 8px;
            border-top: 1px dashed var(--border);
        }
        .insight-panel.expanded .insight-detail { display: block; }
        .insight-bar-row {
            display: flex; align-items: center; gap: 6px;
            margin-bottom: 3px;
        }
        .insight-bar-label {
            width: 80px; font-size: 11px; color: var(--text-secondary);
            text-align: right; flex-shrink: 0;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .insight-bar-track {
            flex: 1; height: 12px; background: var(--border-light);
            border-radius: 6px; overflow: hidden;
        }
        .insight-bar-fill {
            height: 100%; border-radius: 6px;
            background: var(--primary-200);
            transition: width 0.4s ease;
            min-width: 2px;
        }
        .insight-bar-count {
            width: 36px; font-size: 11px; color: var(--text-secondary);
            text-align: left; flex-shrink: 0;
        }

        /* ══════ 权重可视化 ══════ */
        .weight-visual {
            display: flex; align-items: center; gap: 6px;
            margin-bottom: 8px;
        }
        .weight-visual-bar {
            height: 10px; border-radius: 5px;
            background: var(--primary);
            opacity: 0.7; min-width: 2px;
            transition: width 0.3s ease;
        }
        .weight-visual-label {
            font-size: 11px; color: var(--text-secondary);
            width: 28px; text-align: right; flex-shrink: 0;
        }
        .btn-auto-balance {
            display: inline-flex; align-items: center; gap: 4px;
            height: 28px; padding: 0 10px;
            border: 1px solid var(--success); border-radius: var(--radius-sm);
            background: var(--success-bg); color: var(--success);
            font-size: 12px; font-weight: 500; cursor: pointer;
            transition: all var(--transition);
        }
        .btn-auto-balance:hover {
            background: var(--success); color: #fff;
        }

        /* ══════ 分段校验 ══════ */
        .seg-warning {
            display: inline-flex; align-items: center; gap: 3px;
            padding: 2px 6px; border-radius: 3px;
            font-size: 11px; font-weight: 500;
            background: var(--warning-bg); color: var(--warning);
        }
        .seg-gap-highlight {
            background: #fff3e0 !important; /* required for override */
            border-left: 3px solid var(--warning) !important; /* required for override */
        }
        .segments-table td.has-warning {
            background: #fff8e1;
        }
        .segments-table td input.seg-invalid {
            border-color: var(--danger);
            background: #fff5f5;
        }

        /* ══════ 智能分段弹窗 ══════ */
        .smart-seg-dialog {
            padding: 16px;
        }
        .smart-seg-dialog h4 {
            font-size: 14px; font-weight: 600; color: var(--text-primary);
            margin-bottom: 12px;
        }
        .smart-seg-option {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 12px; border: 1px solid var(--border);
            border-radius: var(--radius); margin-bottom: 8px;
            cursor: pointer; transition: all var(--transition);
        }
        .smart-seg-option:hover {
            border-color: var(--primary); background: var(--primary-50);
        }
        .smart-seg-option .option-icon {
            font-size: 20px; flex-shrink: 0;
        }
        .smart-seg-option .option-info {
            flex: 1;
        }
        .smart-seg-option .option-title {
            font-size: 13px; font-weight: 600; color: var(--text-primary);
        }
        .smart-seg-option .option-desc {
            font-size: 11px; color: var(--text-secondary); margin-top: 2px;
        }

        /* ══════ 配置向导 ══════ */
        .wizard-overlay {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.5); z-index: 2100;
            display: flex; align-items: center; justify-content: center;
        }
        .wizard-dialog {
            background: var(--bg-card); border-radius: var(--radius-lg);
            box-shadow: var(--shadow-lg); width: 90%; max-width: 700px;
            max-height: 85vh; display: flex; flex-direction: column;
            animation: modalIn 0.25s ease;
        }
        .wizard-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 16px 20px; border-bottom: 1px solid var(--border);
        }
        .wizard-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
        .wizard-steps {
            display: flex; padding: 12px 20px; gap: 0;
            border-bottom: 1px solid var(--border-light);
        }
        .wizard-step {
            flex: 1; text-align: center; position: relative;
            padding: 8px 4px; font-size: 12px; color: var(--text-secondary);
            cursor: pointer; transition: all var(--transition);
        }
        .wizard-step .step-num {
            display: inline-flex; align-items: center; justify-content: center;
            width: 26px; height: 26px; border-radius: 50%;
            background: var(--border); color: var(--text-secondary);
            font-size: 12px; font-weight: 700; margin-bottom: 4px;
        }
        .wizard-step.active .step-num {
            background: var(--primary); color: #fff;
        }
        .wizard-step.active { color: var(--primary); font-weight: 600; }
        .wizard-step.done .step-num {
            background: var(--success); color: #fff;
        }
        .wizard-step.done { color: var(--success); }
        .wizard-step::after {
            content: ''; position: absolute; top: 21px; left: 60%;
            width: 80%; height: 2px; background: var(--border);
            z-index: -1;
        }
        .wizard-step:last-child::after { display: none; }
        .wizard-step.done::after { background: var(--success); }
        .wizard-body {
            flex: 1; overflow-y: auto; padding: 20px;
        }
        .wizard-footer {
            display: flex; align-items: center; justify-content: flex-end;
            gap: 10px; padding: 14px 20px;
            border-top: 1px solid var(--border);
        }
        .wizard-footer .btn { min-width: 80px; }

        /* ══════ 评分配置工具栏 ══════ */
        .config-toolbar {
            display: flex; align-items: center; gap: 8px;
            padding: 8px 16px; margin-bottom: 12px;
            background: var(--bg-card); border-radius: var(--radius);
            border: 1px solid var(--border); flex-wrap: wrap;
        }
        .config-toolbar .toolbar-sep {
            width: 1px; height: 20px; background: var(--border-base);
        }

        /* ══════ 字段说明 Tooltip ══════ */
        .field-tooltip {
            display: inline-flex; align-items: center; justify-content: center;
            width: 16px; height: 16px; border-radius: 50%;
            background: var(--border-base); color: var(--text-secondary);
            font-size: 10px; font-weight: 700; cursor: help;
            vertical-align: middle; margin-left: 4px;
            position: relative;
        }
        .field-tooltip:hover {
            background: var(--primary); color: #fff;
        }
        .field-tooltip::after {
            content: attr(data-tip);
            position: absolute; bottom: calc(100% + 6px); left: 50%;
            transform: translateX(-50%);
            background: var(--text-primary); color: #fff;
            padding: 4px 10px; border-radius: var(--radius-sm);
            font-size: 11px; font-weight: 400;
            white-space: nowrap; pointer-events: none;
            opacity: 0; transition: opacity 0.2s;
            z-index: 100;
        }
        .field-tooltip:hover::after { opacity: 1; }

        /* ══════ Preview 面板 ══════ */
        .preview-panel {
            background: var(--bg-card); border: 1px solid var(--primary-200);
            border-radius: var(--radius); padding: 12px 16px;
            margin-top: 14px;
        }
        .preview-panel .preview-title {
            font-size: 13px; font-weight: 600; color: var(--primary);
            margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
        }
        .preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
        .preview-table th {
            padding: 6px 8px; text-align: left; font-size: 11px;
            color: var(--text-secondary); border-bottom: 1px solid var(--border);
            font-weight: 600;
        }
        .preview-table td {
            padding: 6px 8px; border-bottom: 1px solid var(--border-light);
        }
        .preview-table .score-up { color: var(--success); font-weight: 600; }
        .preview-table .score-down { color: var(--danger); font-weight: 600; }

        /* ══════ 变更摘要 ══════ */
        .change-summary {
            background: var(--success-bg); border: 1px solid var(--success-border);
            border-radius: var(--radius); padding: 10px 14px;
            margin-top: 10px; font-size: 13px; color: var(--success);
        }
        .change-summary .change-item {
            display: flex; align-items: flex-start; gap: 6px;
            margin-bottom: 4px;
        }
        .change-summary .change-item:last-child { margin-bottom: 0; }

        /* ══════ Segments Table ══════ */
        .segments-table { margin-top: 4px; }
        .segments-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
        .segments-table th {
            padding: 6px 8px; text-align: left; font-size: 12px;
            color: var(--text-secondary); font-weight: 600;
            border-bottom: 2px solid var(--border);
        }
        .segments-table td {
            padding: 6px 8px; border-bottom: 1px solid var(--border-light);
            vertical-align: middle;
        }
        .segments-table input[type="number"], .segments-table input[type="text"], .segments-table select {
            padding: 4px 6px; border: 1px solid var(--border-base); border-radius: 3px;
            font-size: 12px; width: 100%; box-sizing: border-box;
        }
        .segments-table input:focus, .segments-table select:focus {
            outline: none; border-color: var(--primary);
        }
        .seg-input { width: 100%; }
        .seg-label { flex: 1; min-width: 100px; }
        .seg-select { width: 100%; text-align: center; }

        /* ══════ Template Cards ══════ */
        .template-list { display: block; }
        .template-card {
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 16px;
            transition: box-shadow var(--transition);
        }
        .template-card:hover { box-shadow: var(--shadow-md); }
        .template-card.default { border-color: var(--primary); background: var(--primary-50); }
        .template-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
        .template-header h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); }
        .template-desc { font-size: 12px; color: var(--text-secondary); margin: 6px 0 10px; line-height: 1.5; }
        .template-meta { display: flex; gap: 16px; font-size: 11px; color: var(--text-placeholder); margin-bottom: 12px; }
        .template-actions { display: flex; gap: 6px; flex-wrap: wrap; }
        .tag-default { background: var(--primary); color: #fff; }

        /* ══════ Rule Detail Display ══════ */
        .rule-detail { margin-top: 16px; }
        .rule-detail h4 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; }
        .rule-dim {
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 12px; margin-bottom: 10px;
        }
        .rule-dim-header {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border-light);
        }
        .rule-dim-name { font-weight: 600; color: var(--text-primary); }
        .rule-dim-weight { font-size: 12px; color: var(--text-secondary); }
        .rule-dim-result {
            display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px;
            margin-bottom: 10px;
        }
        .rule-dim-result span { color: var(--text-regular); }
        .rule-dim-result b { color: var(--primary); }
        .rule-segments { background: var(--bg-page); border-radius: 4px; padding: 10px; }
        .rule-segments-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
        .rule-segments table { width: 100%; border-collapse: collapse; font-size: 12px; }
        .rule-segments th { padding: 4px 8px; text-align: left; color: var(--text-secondary); font-weight: 600; border-bottom: 1px solid var(--border); }
        .rule-segments td { padding: 4px 8px; border-bottom: 1px solid var(--border-light); }
        .rule-segments tr.matched { background: var(--success-bg); }

        /* ═══════════════════ Cookie 管理页 ═══════════════════ */
        #page-cookie .stat-card { cursor: default; }
        .cookie-status-card {
            border: 2px solid var(--border-base);
            border-radius: var(--radius);
            padding: 18px;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .cookie-status-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
        .cookie-status-card.active { border-color: var(--success); }
        .cookie-status-card.warning { border-color: var(--warning); }
        .cookie-status-card.expired { border-color: var(--danger); }
        .cookie-status-card.missing { border-color: var(--border-base); }
        .cookie-actions { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
        .cookie-meta-item { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }

        /* ══════ Cookie Alert Banner ══════ */
        .cookie-alert-banner {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            border-radius: var(--radius);
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 12px;
            position: relative;
            animation: cookieBannerSlideIn 0.35s ease-out;
        }
        .cookie-alert-banner.warning {
            background: var(--warning-bg);
            color: var(--warning);
            border: 1px solid var(--warning-border);
        }
        .cookie-alert-banner.danger {
            background: var(--danger-bg);
            color: var(--danger);
            border: 1px solid var(--danger-border);
        }
        .cookie-alert-banner.dismissing {
            animation: cookieBannerSlideOut 0.3s ease forwards;
        }
        @keyframes cookieBannerSlideIn {
            from { opacity: 0; transform: translateY(-10px); max-height: 0; }
            to { opacity: 1; transform: translateY(0); max-height: 80px; }
        }
        @keyframes cookieBannerSlideOut {
            from { opacity: 1; transform: translateY(0); max-height: 80px; }
            to { opacity: 0; transform: translateY(-10px); max-height: 0; padding: 0; margin-bottom: 0; }
        }
        .cookie-alert-icon { font-size: 18px; flex-shrink: 0; }
        .cookie-alert-text { flex: 1; line-height: 1.6; }
        .cookie-alert-text a {
            color: inherit;
            font-weight: 600;
            text-decoration: underline;
            cursor: pointer;
        }
        .cookie-alert-close {
            background: none;
            border: none;
            font-size: 16px;
            cursor: pointer;
            color: inherit;
            opacity: 0.6;
            padding: 2px 6px;
            border-radius: var(--radius-sm);
            flex-shrink: 0;
            transition: opacity 0.2s;
        }
        .cookie-alert-close:hover { opacity: 1; }

        /* ═══════════════════ Form Section (区块卡片) ═══════════════════ */
        .form-section {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            margin-bottom: 12px;
            overflow: hidden;
            box-shadow: var(--shadow-sm);
            transition: box-shadow var(--transition);
        }
        .form-section:hover { box-shadow: var(--shadow); }
        .form-section-header {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 18px;
            border-bottom: 1px solid var(--border);
            background: var(--bg-page);
        }
        .section-num {
            width: 28px; height: 28px;
            border-radius: 50%;
            background: var(--primary);
            color: #fff;
            font-size: 13px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .section-num-weak {
            background: var(--primary-100);
            color: var(--primary);
        }
        .section-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
            flex: 1;
        }
        .section-subtitle {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 400;
            margin-left: 4px;
        }
        .section-extra {
            margin-left: auto;
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 400;
        }
        .form-section-body {
            padding: 14px 18px;
        }

        /* ══════ Collapsible Section (可折叠区块) ══════ */
        .collapse-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 18px;
            cursor: pointer;
            user-select: none;
            transition: background var(--transition);
            border-bottom: 1px solid transparent;
        }
        .collapse-header:hover { background: var(--bg-page); }
        .collapse-arrow {
            font-size: 11px;
            color: var(--text-secondary);
            transition: transform 0.25s ease;
            flex-shrink: 0;
            width: 16px; text-align: center;
        }
        .form-section-collapsible.expanded .collapse-arrow {
            transform: rotate(90deg);
        }
        .collapse-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }
        .collapse-hint {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 400;
            margin-left: 6px;
        }
        .collapse-badge {
            margin-left: auto;
            font-size: 12px;
            color: var(--primary);
            font-weight: 500;
        }
        .collapse-body {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s ease, padding 0.35s ease;
            padding: 0 18px;
        }
        .form-section-collapsible.expanded .collapse-body {
            max-height: 800px;
            padding: 14px 18px;
        }
        .form-section-collapsible.expanded .collapse-header {
            border-bottom: 1px solid var(--border);
        }

        /* ══════ Form Grid (多列栅格) ══════ */
        .form-grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px 16px;
        }
        .form-grid-3 {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 12px 16px;
        }
        .form-grid-row {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
            margin-bottom: 10px;
        }
        .form-grid-row + .form-grid-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-light); }

        /* ══════ Form Row - Flex (动态列表) ══════ */
        .form-row-flex {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 6px;
            flex-wrap: wrap;
        }
        .form-row-flex .form-input { flex: 1; min-width: 120px; }
        .form-row-flex .btn-remove {
            width: 28px; height: 28px;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-size: 14px;
            cursor: pointer;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all var(--transition);
        }
        .form-row-flex .btn-remove:hover {
            background: var(--danger-bg);
            color: var(--danger);
        }

        /* ══════ Action Bar (底部操作栏) ══════ */
        .action-bar {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px 18px;
            background: linear-gradient(to bottom, var(--bg-page), var(--bg-card));
            border-top: 1px solid var(--border);
            margin: 0 -1px -1px;
            border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        }
        .action-bar .btn-primary {
            height: 40px;
            padding: 0 28px;
            font-size: 15px;
            font-weight: 600;
            box-shadow: 0 2px 8px rgba(30,136,229,0.3);
            border-radius: var(--radius);
        }
        .action-bar .btn-primary:hover {
            box-shadow: 0 4px 14px rgba(30,136,229,0.4);
            transform: translateY(-1px);
        }
        .action-status {
            margin-left: auto;
            font-size: 13px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        /* ══════ Tab Bar (统一标签栏) ══════ */
        .tab-bar {
            display: flex;
            border-bottom: 1px solid var(--border);
            margin-bottom: 14px;
            gap: 18px;
        }
        .tab-btn {
            padding: 9px 4px;
            border: none;
            background: transparent;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
            border-bottom: 2px solid transparent;
            margin-bottom: -1px;
            transition: color 0.15s ease, border-color 0.15s ease;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            line-height: 1.2;
            outline: none;
            appearance: none;
            -webkit-appearance: none;
        }
        .tab-btn:hover:not(.active) { color: var(--primary); }
        .tab-btn.active {
            color: var(--primary);
            font-weight: 600;
            border-bottom-color: var(--primary);
        }

        /* ══════ AI Mode Description (Callout) ══════ */
        .mode-desc {
            font-size: 12px;
            line-height: 1.6;
            color: var(--text-secondary);
            padding: 10px 12px;
            margin: 4px 0 14px 0;
            background-color: rgba(13, 110, 253, 0.05);
            border-left: 3px solid var(--primary);
            border-radius: 4px;
        }
        .mode-desc b {
            color: var(--primary);
            font-weight: 600;
        }

        /* ══════ Inline Label Row ══════ */
        .label-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
            flex-wrap: wrap;
            gap: 8px;
        }
        .label-row .filter-label { margin-bottom: 0; }
        .label-row .btn-group { display: flex; gap: 6px; }
        /* ══════ Text Link Buttons ══════ */
        .btn-link {
            background: transparent;
            border: none;
            color: var(--primary);
            cursor: pointer;
            font-size: 12px;
            padding: 2px 6px;
            border-radius: 4px;
            transition: background 0.15s;
        }
        .btn-link:hover { background: rgba(64, 158, 255, 0.1); }
        .btn-link-danger { color: var(--danger); }
        .btn-link-danger:hover { background: rgba(245, 74, 69, 0.1); }
        .list-count {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 400;
            margin-left: 4px;
        }

        /* ══════ Qualification / Case Cards ══════ */
        .qual-card, .case-card {
            background: var(--bg-page);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 10px 12px;
            margin-bottom: 8px;
            position: relative;
            transition: box-shadow var(--transition);
            animation: cardSlideIn 0.2s ease-out;
        }
        .qual-card:hover, .case-card:hover { box-shadow: var(--shadow-sm); }
        @keyframes cardSlideIn {
            from { opacity: 0; transform: translateY(-6px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .qual-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        .qual-card-num {
            font-size: 11px;
            font-weight: 700;
            color: var(--primary);
            background: var(--primary-50);
            padding: 2px 10px;
            border-radius: 100px;
            letter-spacing: 0.5px;
        }
        .qual-card-remove {
            width: 24px; height: 24px;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-size: 14px;
            cursor: pointer;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition);
            line-height: 1;
            flex-shrink: 0;
        }
        .qual-card-remove:hover {
            background: var(--danger);
            color: #fff;
        }

        /* Case card fields */
        .case-card-fields {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .case-field {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .case-field-label {
            width: 40px;
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 600;
            flex-shrink: 0;
        }

        /* Dashed add button */
        .btn-add-dashed {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            width: 100%;
            padding: 8px 0;
            border: 2px dashed var(--border-base);
            border-radius: var(--radius);
            background: transparent;
            color: var(--text-secondary);
            font-size: 13px;
            cursor: pointer;
            transition: all var(--transition);
            margin-top: 6px;
        }
        .btn-add-dashed:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-50);
        }

        /* ══════ Profile Row (我方公司档案 + 按钮组) ══════ */
        .profile-row {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-end;
            gap: 12px 16px;
            padding: 10px 12px;
            margin-bottom: 12px;
            background: linear-gradient(135deg, var(--primary-50, #eef2ff) 0%, #ffffff 100%);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg, 10px);
        }
        .profile-row-select {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1 1 220px;
            min-width: 220px;
        }
        .profile-row-actions {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px;
            flex: 0 1 auto;
        }
        .profile-row-divider {
            display: inline-block;
            width: 1px;
            height: 18px;
            background: var(--border-base);
            margin: 0 4px;
            flex-shrink: 0;
        }
        /* 行动按钮（保存/从历史/导入等）更紧凑 */
        .profile-row-actions .btn {
            font-size: 12px;
            padding: 6px 10px;
            border-radius: var(--radius-md, 6px);
        }

        /* ══════ Add Row (添加资质 / 批量粘贴 横排) ══════ */
        .add-row {
            display: flex;
            align-items: stretch;
            gap: 8px;
            margin-top: 8px;
        }
        .add-row .btn-add-dashed {
            margin-top: 0;
            flex: 1 1 auto;
        }
        .add-row .btn {
            flex: 0 0 auto;
            white-space: nowrap;
        }

        /* ══════ Chip List (资质 / 案例 标签容器) ══════ */
        .chip-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding: 8px;
            min-height: 44px;
            background: var(--bg-page);
            border: 1px dashed var(--border-base);
            border-radius: var(--radius);
        }
        .chip-empty-hint {
            width: 100%;
            text-align: center;
            color: var(--text-placeholder);
            font-size: 12px;
            padding: 10px 0;
            margin: 0;
        }


        /* ══════ Section Subcard (嵌套子卡片) ══════ */
        .subcard {
            background: var(--bg-page);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            padding: 14px 16px;
            margin-bottom: 12px;
        }
        .subcard-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        /* ══════ Subcard with left accent border ══════ */
        .subcard-accent {
            border-left: 3px solid var(--primary);
            background: var(--primary-50);
        }

        /* ══════ Filter bar: 知识库(240px) + AI人设(1fr) ══════ */
        .filter-bar-smspersona {
            grid-template-columns: 1fr 1fr;
        }

        /* ══════ Responsive: 营销短信表单 ══════ */
        @media (max-width: 900px) {
            .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
            .action-bar { flex-wrap: wrap; }
            .action-bar .action-status { margin-left: 0; width: 100%; }
            .form-section-header { flex-wrap: wrap; }
            .filter-bar-smspersona { grid-template-columns: 1fr; }
        }

        /* ══════ 数据维护页面样式 ══════ */
        .maint-status-item { display: flex; flex-direction: column; gap: 4px; }
        .maint-status-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
        .maint-status-value { font-size: 13px; color: var(--text-primary); font-weight: 500; }
        .maint-status-divider { width: 1px; height: 32px; background: var(--border-base); }
        .maint-status-badge {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600;
        }
        .maint-status-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
        .maint-status-idle { background: var(--success-bg); color: var(--success); }
        .maint-status-idle::before { background: var(--success); }
        .maint-status-running { background: var(--primary-50); color: var(--primary); }
        .maint-status-running::before { background: var(--primary); animation: maint-pulse 1.5s ease-in-out infinite; }
        .maint-status-error { background: var(--danger-bg); color: var(--danger); }
        .maint-status-error::before { background: var(--danger); }
        @keyframes maint-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        .maint-history-table { font-size: 13px; }
        .maint-history-table th { font-size: 12px; white-space: nowrap; }
        .maint-history-table td { padding: 8px 10px; }

        /* ══════ 日志统计卡片 ══════ */
        .log-stat-card { background: var(--bg-card); border: 1px solid var(--border-base); border-radius: var(--radius); padding: 10px 14px; flex: 1; min-width: 100px; }
        .log-stat-num { font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1.2; }
        .log-stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; }

        /* ══════ 评分系统 - 规则卡片 ══════ */
        .rule-card { border: 1px solid var(--border-base); border-radius: 10px; overflow: hidden; margin-bottom: 16px; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
        .rule-card:hover { box-shadow: var(--shadow); }
        .rule-card-header { padding: 12px 16px; background: var(--bg-secondary); display: flex; justify-content: space-between; align-items: center; }
        .rule-card-meta { padding: 6px 12px; font-size: 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); }
        .rule-card-body { padding: 12px; }
        .rule-card-segments-table { width: 100%; font-size: 12px; border-collapse: collapse; margin-bottom: 8px; }
        .rule-card-segments-table th { background: var(--bg-page); padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border-base); }
        .rule-card-segments-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-light); }
        .rule-card-segments-table tr.matched { background: var(--success-bg); }
        .rule-card-empty { padding: 6px 12px; font-size: 12px; color: var(--text-secondary); border-top: 1px solid var(--border-light); }
        .rule-card-templates { padding: 6px 12px; font-size: 12px; color: var(--text-secondary); border-top: 1px solid var(--border-light); }
        .rule-card-footer { padding: 8px 12px; border-top: 1px solid var(--border-base); display: flex; gap: 6px; }
        .rule-card-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 12px; }
        .rule-card-tag { background: var(--primary-50); color: var(--primary-active); padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; }
        .rule-card-template-link { background: var(--warning-bg); color: var(--warning); padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; cursor: pointer; }
        .rule-card-template-link:hover { background: #FFE0B2; }

        /* ══════ 评分系统 - 迷你规则卡片 ══════ */
        .mini-rule-card { border: 1px solid var(--border-base); border-radius: 6px; padding: 10px; margin-bottom: 8px; background: #fff; }
        .mini-rule-card:hover { border-color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
        .mini-rule-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
        .mini-rule-card-segments { font-size: 11px; color: var(--text-secondary); max-height: 40px; overflow: hidden; margin-bottom: 4px; }
        .mini-rule-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 11px; color: var(--text-secondary); }
        .weight-slider { width: 100px; margin: 0 8px; }
        .weight-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); cursor: pointer; }
        .weight-slider::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--border-base); }

        /* ══════ 评分系统 - 均衡面板 ══════ */
        .balance-panel { border: 1px solid var(--border-base); border-radius: 8px; overflow: hidden; background: #fff; }
        .balance-panel-header { padding: 10px 12px; background: var(--bg-secondary); font-weight: 600; font-size: 13px; color: var(--text-primary); }
        .balance-panel-body { padding: 12px; }
        .balance-status { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
        .balance-status.ok { color: #2ECC71; }
        .balance-status.warn { color: #F39C12; }
        .balance-status.error { color: #E74C3C; }
        .balance-bar { height: 8px; border-radius: 4px; background: #eee; margin: 8px 0; overflow: hidden; }
        .balance-bar-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
        .balance-bar-fill.ok { background: #2ECC71; }
        .balance-bar-fill.warn { background: #F39C12; }
        .balance-bar-fill.error { background: #E74C3C; }

        /* ══════ 预设模板卡片 ══════ */
        .preset-templates-section { margin-bottom: 20px; }
        .preset-card { border: 1px solid var(--border-base); border-radius: 8px; padding: 16px; cursor: pointer; transition: all 0.2s; }
        .preset-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(30, 136, 229, 0.15); transform: translateY(-1px); }
        .preset-card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
        .preset-card-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.6; }

        /* ══════ 帮助提示浮层 ══════ */
        .help-tooltip {
            display: inline-block; width: 16px; height: 16px; border-radius: 50%;
            background: var(--border-base); color: var(--text-secondary);
            text-align: center; line-height: 16px; font-size: 11px; cursor: help; position: relative;
            vertical-align: middle; margin-left: 4px;
        }
        .help-tooltip:hover::after {
            content: attr(data-tip);
            position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
            background: #333; color: #fff; padding: 6px 12px; border-radius: 6px;
            font-size: 12px; white-space: nowrap; z-index: 1000; pointer-events: none;
        }

        /* ══════ 向导高级选项面板 ══════ */
        .wizard-advanced-toggle {
            display: flex; align-items: center; gap: 6px; cursor: pointer;
            padding: 6px 0; user-select: none;
        }
        .wizard-advanced-toggle:hover { color: var(--primary); }
        .wizard-advanced-panel {
            border: 1px solid var(--border-base); border-radius: 6px;
            padding: 10px; background: #fafafa; margin-top: 4px;
        }

        /* ══════ 客户画像 ══════ */
        .profile-header { background: #fff; border: 1px solid var(--border-base); border-radius: 8px; padding: 20px 24px; margin-bottom: 16px; }
        .profile-summary { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
        .profile-grade { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 700; flex-shrink: 0; }
        .profile-grade-info { display: flex; flex-direction: column; }
        .profile-total-score { font-size: 28px; font-weight: 700; color: var(--text-primary); }
        .profile-grade-label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
        .profile-size-tag { margin-left: auto; padding: 4px 16px; border-radius: 16px; background: var(--primary-50); color: var(--primary); font-size: 14px; font-weight: 600; }
        .profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
        .profile-tag { padding: 3px 12px; border-radius: 14px; font-size: 12px; background: #E3F2FD; color: #1565C0; }
        .profile-tag-cap { background: #E8F5E9; color: #2E7D32; }

        .profile-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
        .profile-stat-card { background: #fff; border: 1px solid var(--border-base); border-radius: 8px; padding: 14px 16px; text-align: center; }
        .profile-stat-num { font-size: 22px; font-weight: 700; color: var(--text-primary); }
        .profile-stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

        .profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
        @media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } .profile-stats-row { grid-template-columns: repeat(2, 1fr); } }

        .profile-dimensions { padding: 8px 0; }
        .profile-dim-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
        .profile-dim-name { width: 90px; font-size: 13px; color: var(--text-regular); flex-shrink: 0; }
        .profile-dim-bar-bg { flex: 1; height: 14px; background: #f0f0f0; border-radius: 7px; overflow: hidden; }
        .profile-dim-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 7px; transition: width 0.5s; }
        .profile-dim-score { width: 36px; text-align: right; font-size: 13px; font-weight: 600; color: var(--text-primary); flex-shrink: 0; }

        /* ── 画像页标签切换 ── */
        .profile-page-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-base); margin-bottom: 16px; }
        .profile-page-tab { padding: 8px 20px; cursor: pointer; font-size: 14px; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
        .profile-page-tab:hover { color: var(--primary); }
        .profile-page-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

        /* ── 备注与跟进 ── */
        .notes-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
        .notes-tab { padding: 4px 16px; cursor: pointer; font-size: 13px; border-radius: 4px; background: #f0f0f0; color: var(--text-secondary); transition: all 0.2s; }
        .notes-tab:hover { background: #e0e0e0; }
        .notes-tab.active { background: var(--primary); color: #fff; }
        .notes-list { display: flex; flex-direction: column; gap: 10px; }
        .note-item { background: #fafafa; border: 1px solid var(--border-base); border-radius: 6px; padding: 12px 14px; }
        .note-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
        .note-badge { padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
        .note-badge-follow { background: #E6F7FF; color: #1890FF; }
        .note-meta { font-size: 12px; color: var(--text-secondary); padding: 2px 6px; background: #f0f0f0; border-radius: 4px; }
        .note-time { font-size: 11px; color: var(--text-secondary); margin-left: auto; }
        .note-delete { cursor: pointer; color: #ccc; font-size: 14px; margin-left: 4px; transition: color 0.2s; }
        .note-delete:hover { color: #ff4d4f; }
        .note-content { font-size: 13px; color: var(--text-primary); line-height: 1.6; white-space: pre-wrap; }
        .note-footer { font-size: 11px; color: var(--text-secondary); margin-top: 4px; text-align: right; }

        /* ── 同行对比 ── */
        .peer-rank-banner { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: linear-gradient(135deg, #E6F7FF, #BAE7FF); border-radius: 8px; margin-bottom: 16px; }
        .peer-rank-label { font-size: 16px; font-weight: 600; color: var(--text-primary); }
        .peer-rank-num { font-size: 14px; color: var(--primary); }
        .peer-rank-score { margin-left: auto; font-size: 14px; color: var(--text-regular); }
        .peer-highlight { background: #E6F7FF !important; }
        .target-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; color: #fff; background: var(--primary); vertical-align: middle; }

        /* ── 数据质量 ── */

        /* ── 竞品分析 ── */
        .opportunity-card { background: #fff; border: 1px solid var(--border-base); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; transition: box-shadow 0.2s; }
        .opportunity-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
        .opportunity-type { padding: 2px 8px; border-radius: 10px; font-size: 11px; color: #fff; font-weight: 600; white-space: nowrap; }
        .gap-tag { padding: 4px 12px; border-radius: 14px; font-size: 13px; background: #FFF7E6; color: #D46B08; border: 1px solid #FFD591; }

        /* ── 客户画像公司列表 ── */
        .company-link { color: var(--primary); text-decoration: none; font-weight: 500; }
        .company-link:hover { text-decoration: underline; }
        .company-link::after, .company-link::before { display: none !important; content: none !important; }
        .data-table td a::after, .data-table td a::before { display: none !important; content: none !important; }
        .company-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
        .company-pagination .btn { min-width: 30px; }

        /* ══════ 评分监控面板 ══════ */
        .monitor-card {
            background: #fff;
            border: 1px solid var(--border-base);
            border-radius: 8px;
            padding: 14px 16px;
            transition: box-shadow 0.2s;
        }
        .monitor-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
        .monitor-card-label {
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 4px;
        }
        .monitor-card-value {
            font-size: 20px;
            font-weight: 700;
            color: var(--text-primary);
        }