﻿/* ==================== 全局样式 ==================== */
:root {
    --sidebar-width: 200px;
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --primary-dark: #1e40af;

    /* 品牌标识统一规范：跨页面（落地页/登录页/侧边栏）“科纪通”品牌名与标记尺寸一致 */
    --brand-name: 18px;
    --brand-name-weight: 800;
    --brand-mark: 20px;
    --brand-sub: 12px;

/* ===== 科纪广场模式（交易平台皮肤，青绿主色，区别于公司蓝）===== */
body.broker-mode {
    --primary: #0d9488;
    --primary-light: #ccfbf1;
    --primary-dark: #0f766e;
}
body.broker-mode .sidebar { background: #0f172a; }
body.broker-mode .sidebar-header { border-color: rgba(255,255,255,.1); }
body.broker-mode .sidebar .nav-link { color: #cbd5e1; }
body.broker-mode .sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
body.broker-mode .sidebar .nav-link.active { background: rgba(13,148,136,.22); color: #5eead4; }
body.broker-mode .sidebar .logo i,
body.broker-mode .sidebar .logo #tenantBrandName { color: #5eead4; }
body.broker-mode .sidebar-footer { border-color: rgba(255,255,255,.1); color: #94a3b8; }

/* 顶栏模式切换开关 */
.mode-switch {
    display: flex; justify-content: flex-end; align-items: center; gap: 8px;
    margin-top: 12px; padding: 4px 6px;
    background: #f1f5f9; border-radius: 9px;
}
body.broker-mode .mode-switch { background: rgba(255,255,255,.08); }
.mode-btn {
    border: none; background: #fff; cursor: pointer;
    padding: 6px 12px; border-radius: 6px; font-size: 12px; color: #475569;
    transition: all .15s; box-shadow: 0 1px 3px rgba(0,0,0,.12);
    white-space: nowrap;
}
.mode-btn:hover { background: #e2e8f0; color: #1e293b; }
body.broker-mode .mode-btn { background: #0d9488; color: #fff; }
body.broker-mode .mode-btn:hover { background: #0f766e; color: #fff; }

/* 科纪广场 · 交易大厅卡片 */
.broker-hall-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px; background: linear-gradient(135deg, #0d9488, #0f766e);
    color: #fff;
}
.broker-hall-header .bh-title { font-size: 20px; font-weight: 700; }
.broker-hall-header .bh-sub { font-size: 13px; opacity: .85; margin-top: 4px; }
.broker-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; padding: 20px 24px;
}
.broker-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05); transition: transform .12s, box-shadow .12s;
    cursor: pointer;
}
.broker-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(13,148,136,.18); }
.broker-card-title { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 10px; }
.broker-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.broker-card-line { font-size: 13px; color: #475569; margin-top: 5px; }
.broker-card-line b { color: #0f172a; font-weight: 600; }
.broker-empty { text-align: center; color: #94a3b8; padding: 60px 20px; }

    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #0891b2;
    --info-light: #cffafe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    font-size: 14px;
    line-height: 1.6;
}

#app { display: flex; height: 100vh; }

/* ==================== 侧边栏 ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    pointer-events: auto;
}
/* 防御：确保侧边栏及导航项始终可点，不被任何隐性覆盖层吞掉点击 */
.sidebar * { pointer-events: auto; }

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 侧边栏导航徽章 */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: auto;
    line-height: 1;
}

/* 消息中心页面 */
.message-center-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border, #e2e8f0);
    margin-bottom: 16px;
}

.message-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}

.message-tab:hover {
    color: var(--primary, #4f46e5);
}

.message-tab.active {
    color: var(--primary, #4f46e5);
    border-bottom-color: var(--primary, #4f46e5);
}

.message-card {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, #f1f5f9);
    cursor: pointer;
    transition: background .15s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-card:hover { background: var(--hover-bg, #f8fafc); }
.message-card.unread { background: #eff6ff; border-left: 3px solid var(--primary, #4f46e5); }
.message-card.unread:hover { background: #dbeafe; }

.message-card-del {
    margin-left: 4px;
    flex: 0 0 auto;
    align-self: flex-start;
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-size: 1rem;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    opacity: .55;
    transition: opacity .15s, color .15s, background .15s;
}
.message-card:hover .message-card-del,
.message-card-del:focus { opacity: 1; }
.message-card-del:hover { color: #dc2626; background: #fee2e2; }

.message-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message-card-body { flex: 1; min-width: 0; }

.message-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-card-type {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary, #4f46e5);
    background: #eef2ff;
    padding: 1px 8px;
    border-radius: 10px;
}

.message-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
}

.message-card-time {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
}

.message-card-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.message-card-text {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
}

/* ==================== 个人工作台 ==================== */

.workspace-tabs {
    border-bottom: 2px solid var(--border, #e2e8f0);
    background: var(--card-header-bg, #f8fafc);
}

.workspace-tabs .nav-link {
    border: none;
    color: var(--text-muted, #64748b);
    padding: 12px 20px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    transition: all .15s;
}

.workspace-tabs .nav-link:hover {
    color: var(--text, #1e293b);
    border-bottom-color: var(--border, #cbd5e1);
}

.workspace-tabs .nav-link.active {
    color: var(--primary, #2563eb);
    border-bottom-color: var(--primary, #2563eb);
    font-weight: 600;
    background: transparent;
}

.memo-list {
    display: flex;
    flex-direction: column;
}

.memo-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
    transition: background .15s;
    cursor: pointer;
}

.memo-item:hover {
    background: var(--hover-bg, #f8fafc);
}

.memo-item.pinned {
    background: var(--warning-bg, #fffbeb);
    border-left: 3px solid #f59e0b;
}

.memo-item.done {
    opacity: 0.6;
}

.memo-item.overdue {
    background: #fff5f5;
    border-left: 3px solid #dc2626;
}

/* 待办事项分组 */
.memo-section {
    margin-bottom: 2px;
}
.memo-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1;
}
.memo-section-header.today { color: #2563eb; background: #eff6ff; border-left: 3px solid #2563eb; }
.memo-section-header.upcoming { color: #7c3aed; background: #f5f3ff; border-left: 3px solid #7c3aed; }
.memo-section-header.future { color: #0891b2; background: #ecfeff; border-left: 3px solid #0891b2; }
.memo-section-header.overdue { color: #dc2626; background: #fef2f2; border-left: 3px solid #dc2626; }
.memo-section-header.unscheduled { color: #6b7280; background: #f3f4f6; border-left: 3px solid #9ca3af; }
.memo-section-count {
    font-weight: 400;
    font-size: 12px;
    opacity: 0.7;
}

/* 人脉分组标签 */
.group-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.group-政府 { background: #eff6ff; color: #2563eb; }
.group-基金 { background: #fef3c7; color: #d97706; }
.group-项目方 { background: #ecfdf5; color: #059669; }
.group-朋友 { background: #fdf2f8; color: #db2777; }
.group-合作伙伴 { background: #f5f3ff; color: #7c3aed; }
.group-专家 { background: #f0fdf4; color: #16a34a; }
.group-投资人 { background: #fff7ed; color: #ea580c; }
.group-其他 { background: #f1f5f9; color: #64748b; }

.memo-item .memo-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity .15s;
}

.memo-item:hover .memo-actions {
    opacity: 1;
}

.repeat-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 500;
    font-size: 11px;
}

/* 居中提示弹窗 */
.center-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.center-alert-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
    padding: 24px;
    text-align: center;
    animation: centerAlertIn .2s ease-out;
}
.center-alert-box .icon {
    font-size: 36px;
    margin-bottom: 12px;
}
.center-alert-box .title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
}
.center-alert-box .message {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
    white-space: pre-wrap;
}
.center-alert-box .btn {
    min-width: 80px;
}
@keyframes centerAlertIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.habit-card {
    transition: transform .15s, box-shadow .15s;
    border-left: 4px solid transparent;
    cursor: pointer;
}
.habit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.habit-card.habit-done {
    border-left-color: #22c55e;
}
.habit-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.habit-check-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
    transition: border-color .15s, background .15s;
}
.habit-check-circle:hover { border-color: #2563eb; }
.habit-check-circle.is-done {
    background: #2563eb;
    border-color: #2563eb;
}
.habit-check-circle .bi { font-size: 14px; line-height: 1; }

.habit-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity .15s;
}
.habit-card:hover .habit-actions {
    opacity: 1;
}
.habit-icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.habit-icon-btn.active {
    background: var(--primary, #2563eb);
    color: #fff;
    border-color: var(--primary, #2563eb);
}
.habit-color-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
}
.habit-color-btn.active {
    border-color: #1e293b;
    transform: scale(1.1);
}
.habit-reminder-tag {
    font-size: 13px;
    padding: 6px 10px;
    font-weight: 500;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary-light, #eff6ff);
    color: var(--primary, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    transition: all .15s;
}

.contact-avatar:hover {
    background: var(--primary, #2563eb);
    color: #fff;
    transform: scale(1.05);
}

/* 人脉卡片 */
.contact-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all .15s;
}

.contact-card:hover {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 2px 8px rgba(37,99,235,.1);
}

.contact-card.contact-overdue {
    border-left-width: 3px;
    border-left-style: solid;
}
.contact-card.contact-warning {
    border-left-width: 3px;
    border-left-style: solid;
    border-left-color: #f59e0b;
}

/* 人脉卡片墙 */
.contact-card-wall {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all .15s;
    height: 100%;
}

.contact-card-wall:hover {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 4px 16px rgba(37,99,235,.12);
    transform: translateY(-2px);
}

.contact-card-wall.contact-overdue {
    border-color: #fca5a5;
    background: #fef2f2;
}
.contact-card-wall.contact-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

/* 人脉维护记录 */
.contact-records-section {
    margin-top: 12px;
}

.contact-records-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 10px 0 12px 0;
}

.record-item {
    border-bottom: 1px solid #f3f4f6;
}

.record-item:last-child {
    border-bottom: none;
}

.record-item:hover {
    background: #f9fafb;
    border-radius: 6px;
    padding-left: 6px;
    padding-right: 6px;
}

/* 日报周报 */
.report-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    transition: all .15s;
}

.report-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37,99,235,.08);
}

.report-date-badge {
    width: 56px;
    height: 50px;
    border-radius: 10px;
    background: var(--primary-light, #eff6ff);
    color: var(--primary, #2563eb);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1.1;
    overflow: hidden;
}

/* 汇报流时间线 */
.flow-timeline {
    position: relative;
    padding-left: 8px;
}
.flow-timeline-item {
    position: relative;
    padding-left: 28px;
    padding-bottom: 20px;
}
.flow-timeline-item:last-child {
    padding-bottom: 0;
}
.flow-timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}
.flow-timeline-item:last-child::before {
    display: none;
}
.flow-timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* @ 提及下拉 */
.mention-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    margin-bottom: 4px;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    z-index: 1000;
}

.mention-dropdown .mention-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .1s;
}

.mention-dropdown .mention-item:hover,
.mention-dropdown .mention-item.active {
    background: #eff6ff;
    color: #2563eb;
}

.mention-dropdown .mention-item i {
    font-size: 14px;
    opacity: .6;
}

.mention-dropdown .mention-group-label {
    padding: 4px 10px 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2px;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: none;
    cursor: pointer;
    padding: 0.25em;
    line-height: 1;
    opacity: 0.7;
}

.btn-close:hover { opacity: 1; }

.stat-card {
    transition: all .2s;
    border: 1px solid var(--border, #e2e8f0);
    height: 100%;            /* 同排卡片强制等高 */
}

.stat-card-clickable {
    position: relative;
}

.stat-card-clickable::after {
    content: '\F134';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 12px;
    color: var(--gray-400, #9ca3af);
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.stat-card-clickable:hover::after {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.modal-box-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
}

.modal-box-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-box-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border, #e2e8f0);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 仪表盘选择器 */
.dashboard-selector { position: relative; display: inline-block; flex-shrink: 0; }

.dashboard-selector .dropdown-toggle {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.dashboard-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 220px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 1050;
    overflow: hidden;
}

.dashboard-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    transition: background .15s;
}

.dashboard-menu-item:hover { background: var(--hover-bg, #f8fafc); }
.dashboard-menu-item.active { background: #eef2ff; color: var(--primary, #4f46e5); font-weight: 600; }

.dashboard-menu-count {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    background: #f1f5f9;
    padding: 1px 8px;
    border-radius: 10px;
}

.dashboard-menu-divider {
    height: 1px;
    background: var(--border, #e2e8f0);
    margin: 4px 0;
}

.dashboard-menu-new {
    color: var(--primary, #4f46e5);
    gap: 6px;
    justify-content: flex-start;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--brand-name);
    font-weight: var(--brand-name-weight);
    color: #fff;
}

.logo i { font-size: var(--brand-mark); color: var(--primary); }

.sidebar ul { list-style: none; padding: 12px 8px; flex: 0 0 auto; overflow-y: auto; overflow-x: hidden; }

.nav-item { margin-bottom: 2px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    font-size: 14px;
}

.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link i { font-size: 18px; width: 20px; text-align: center; }
.nav-group { margin: 2px 0; }
.nav-group-head {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; cursor: pointer;
    color: #94a3b8; font-size: 14px;
    transition: color .15s, background .15s;
}
.nav-group-head:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-group-head > i:first-child { font-size: 18px; width: 20px; text-align: center; }
.nav-group-chevron { margin-left: 6px; font-size: .7rem; transition: transform .15s; transform: rotate(-90deg); }
.nav-group.open .nav-group-chevron { transform: rotate(0deg); }
.nav-group-items { display: none; }
.nav-group.open > .nav-group-items { display: block; }
.nav-group-items .nav-item .nav-link { padding-left: 40px; font-size: .9rem; }

/* 侧边栏横向滚动条修复（2026-08-18，2026-08-29 宽度 240px→200px）：固定宽度下菜单不再出现左右滑块。
   .sidebar ul 已加 overflow-x:hidden 关掉横向滚动；此处让超长菜单文字省略号截断，
   悬停 title 看全名，而非撑破 200px 布局。图标/箭头 flex-shrink:0 保持不收缩。 */
.nav-link, .nav-group-head { min-width: 0; }
.nav-link > i, .nav-group-head > i:first-child, .nav-group-chevron { flex-shrink: 0; }
.nav-link > span, .nav-group-head > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sidebar-footer { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); }

.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.user-detail { flex: 1; min-width: 0; }
.user-name { color: #fff; font-size: 14px; font-weight: 600; }
.user-role { color: rgba(255,255,255,.5); font-size: 12px; }

/* ==================== 钉钉式账户面板（左下角） ==================== */
.kj-acct { position: relative; }
.kj-acct-trigger {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; width: 100%; padding: 8px 10px; border-radius: 12px;
    background: rgba(255,255,255,.06); color: #fff;
    transition: background .15s ease;
}
.kj-acct-trigger:hover { background: rgba(255,255,255,.10); }
.kj-acct-trigger-main {
    display: flex; align-items: center; gap: 10px;
    flex: 1; min-width: 0; padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: #fff; cursor: pointer;
    text-align: left; font: inherit;
}
.kj-acct-trigger-main:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.kj-acct-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.kj-acct-name {
    flex: 1; min-width: 0; text-align: left;
    font-size: 14px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kj-acct-trigger-actions { display: flex; align-items: center; gap: 4px; }
.kj-acct-action {
    width: 30px; height: 30px; border-radius: 50%; border: 0;
    background: transparent; color: rgba(255,255,255,.7);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 15px;
    transition: background .15s, color .15s;
}
.kj-acct-action:hover { background: rgba(255,255,255,.12); color: #fff; }
.kj-acct-action:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* 弹出菜单：白色气泡，向上展开，避免被侧边栏裁切 */
.kj-acct-menu {
    position: absolute; bottom: calc(100% + 8px); left: 0; right: 0;
    min-width: 240px; background: #fff; color: #1e293b;
    border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.28);
    padding: 8px; z-index: 1100; border: 1px solid rgba(15,23,42,.06);
}
.kj-acct-menu-head { padding: 6px 8px 8px; }
.kj-acct-menu-name {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 14px; font-weight: 600; color: #1e293b; cursor: pointer; border-radius: 8px;
    padding: 4px 6px;
}
.kj-acct-menu-name:hover { background: #f1f5f9; }
.kj-acct-menu-name .kj-acct-link { color: var(--primary); font-size: 12px; font-weight: 500; }
.kj-acct-section {
    font-size: 11px; color: #94a3b8; font-weight: 600; letter-spacing: .04em;
    padding: 8px 8px 4px; text-transform: none;
}
.kj-acct-tenant {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.kj-acct-tenant:hover { background: #f1f5f9; }
.kj-acct-tenant .kj-acct-tenant-name {
    flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kj-acct-tenant .kj-acct-tenant-il {
    font-size: 11px; color: #64748b; background: #f1f5f9; border-radius: 6px; padding: 1px 6px;
}
.kj-acct-tenant.active { background: rgba(37,99,235,.10); color: var(--primary); font-weight: 600; }
.kj-acct-tenant.active .kj-acct-tenant-il { background: rgba(37,99,235,.15); color: var(--primary); }
.kj-acct-tenant .kj-acct-check { color: var(--primary); font-size: 14px; }
.kj-acct-divider { height: 1px; background: #eef2f7; margin: 6px 4px; }
.kj-acct-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px;
    cursor: pointer; font-size: 14px; color: #334155;
}
.kj-acct-item:hover { background: #f1f5f9; }
.kj-acct-item i { font-size: 15px; width: 18px; text-align: center; color: #64748b; }

/* 账户菜单内补充的「身份与权益 + 积分」块（来自个人中心） */
.kj-acct-identity { padding: 8px; border-bottom: 1px solid #eef2f7; }
.kj-acct-identity-loading { font-size: 12px; color: #94a3b8; }
.kj-acct-identity-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #334155; }
.kj-acct-tier { display: flex; align-items: center; gap: 6px; font-weight: 600; color: #1e293b; }
.kj-acct-tier .bi-patch-check-fill { color: var(--primary); }
.kj-acct-credits { color: #64748b; font-size: 12px; }
.kj-acct-upgrade { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--primary); text-decoration: none; }
.kj-acct-upgrade:hover { text-decoration: underline; }

/* ==================== 个人中心页面 ==================== */
.kj-profile-avatar {
    width: 88px; height: 88px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 34px; flex-shrink: 0;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    box-shadow: 0 6px 16px rgba(37,99,235,.18);
}
.kj-profile-name { font-size: 18px; font-weight: 700; color: #1e293b; margin-top: 12px; }
.kj-profile-username { font-size: 13px; }
.kj-profile-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 4px; border-bottom: 1px solid #f1f5f9; font-size: 14px;
}
.kj-profile-row:last-child { border-bottom: 0; }
.kj-profile-row span { color: #64748b; }
.kj-profile-row b { color: #1e293b; font-weight: 600; }

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px 28px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 主内容区滚动条：加宽加深，让 BOSS 真能看见能拖。
   历史上 width:6px + #c1c9d2 太隐蔽，10 米外看不到，主区能滚但用户以为拖不动。 */
.main-content::-webkit-scrollbar { width: 10px; }
.main-content::-webkit-scrollbar-track { background: rgba(241, 245, 249, .6); border-radius: 5px; }
.main-content::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
.main-content::-webkit-scrollbar-thumb:hover { background: #64748b; background-clip: padding-box; border: 2px solid transparent; }

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.page-title { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.page-subtitle { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

/* ==================== 卡片 ==================== */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: none;
    margin-bottom: 20px;
}

.card-body { padding: 20px; }

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;            /* 同排卡片强制等高，不再随内容变高 */
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-info h3 { font-size: 28px; font-weight: 700; margin: 0; }
.stat-info p { font-size: 13px; color: var(--gray-500); margin: 0; }

.stat-card .card-body { display: flex; align-items: center; gap: 16px; width: 100%; flex: 1; }
.stat-card .card-body > div:last-child { min-width: 0; }   /* 让子元素能收缩，省略号才生效 */
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.stat-value small { white-space: nowrap; }
.stat-label { font-size: 13px; color: var(--gray-500); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== 驾驶舱 widget 网格 ==================== */
/* 目标：解决 col-md-5/7/6 混排导致一行放不下、列表无限撑高把同行拉爆的问题 */
#widgetGrid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
#widgetGrid > [class*="col-md-"] {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;           /* 让 col 成为 flex 容器，.card height:100% 生效 */
}
/* 奇数个 widget 时，最后一个独占整行，避免右半边空白 */
#widgetGrid > [class*="col-md-"]:last-child:nth-child(odd) {
    flex: 0 0 100%;
    max-width: 100%;
}
#widgetGrid .card {
    width: 100%;
    height: 100%;
    max-height: 420px;
    overflow: hidden;
    margin-bottom: 0;
}
#widgetGrid .card-body {
    max-height: 420px;
    overflow-y: auto;
}

/* ==================== 表格 ==================== */
.table-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }

.table-responsive { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    vertical-align: middle;
}

/* 项目列表：锁定行高与列宽，杜绝长内容（标签/联系人）把行/列挤变形、跳动 */
.proj-table { table-layout: fixed; }
.proj-table th, .proj-table td {
    height: 48px;
    padding: 8px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    box-sizing: border-box;
}
/* 多值列（行业标签 / 联系人）允许换行但限高，避免关键信息被单行裁切 */
.proj-table td.col-wrap {
    white-space: normal;
    line-height: 1.32;
}

/* 表格斑马纹 + 悬停高亮（设计皮肤 P0：提升行高与可读性） */
tbody tr:nth-child(even) td { background: var(--gray-50); }
tr:hover td { background: var(--primary-light); }

/* ==================== 标签 ==================== */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
}

.tag-primary { background: var(--primary-light); color: var(--primary-dark); }
.tag-success { background: var(--success-light); color: var(--success); }
.tag-warning { background: var(--warning-light); color: var(--warning); }
.tag-danger { background: var(--danger-light); color: var(--danger); }
.tag-info { background: var(--info-light); color: var(--info); }
.tag-gray { background: var(--gray-100); color: var(--gray-700); }
.tag-secondary { background: var(--gray-200); color: var(--gray-600); }
.tag-light { background: var(--gray-100); color: var(--gray-500); }

/* 项目管理工具栏：筛选框按字段名长度自动匹配宽度（JS 计算 inline width + flex-shrink:0） */
.kb-auto-w { flex-shrink: 0; }

/* 知识库标签 chip 输入 */
.kb-tag-box { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.kb-tag-chip { display: inline-flex; align-items: center; gap: 4px; cursor: default; }
.kb-tag-chip .bi-x { font-size: 10px; opacity: .7; }
.kb-tag-chip .bi-x:hover { opacity: 1; }

/* 知识库标签筛选条 */
.kb-tag-filter { cursor: pointer; user-select: none; transition: all .12s; }
.kb-tag-filter:hover { filter: brightness(.97); }
.kb-tag-filter.active { background: var(--primary); color: #fff; }
.kb-tags-wrap { padding: 12px 4px; }
.kb-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.kb-tag-count { opacity: .7; font-size: 11px; margin-left: 3px; }

/* 领域地图（MOC）：接 /api/kb/moc */
.kb-moc-bar { padding: 10px 14px; }
.kb-moc-head { font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text, #1e293b); }
.kb-moc-nodes { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-moc-node { cursor: pointer; background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 999px; padding: 4px 12px; font-size: 13px; transition: all .15s; }
.kb-moc-node:hover { border-color: var(--primary); color: var(--primary); }
.kb-moc-node b { color: var(--primary); margin-left: 4px; }
.kb-moc-node.active { background: var(--primary, #378ADD); border-color: var(--primary, #378ADD); color: #fff; }
.kb-moc-node.active b { color: #fff; }

/* 相关文档（接 /api/kb/docs/<id>/related） */
.kb-related-box { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--border, #e2e8f0); }
.kb-related-head { font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--text, #1e293b); }
.kb-related-item { cursor: pointer; padding: 7px 10px; border-radius: 8px; font-size: 13px; transition: background .15s; }
.kb-related-item:hover { background: var(--gray-50, #f8fafc); }
.kb-related-reason { color: var(--muted, #94a3b8); font-size: 11px; margin-left: 6px; }

/* 标签层级树（接 /api/kb/tags/tree） */
.kb-tag-tree-head { font-weight: 600; font-size: 13px; margin: 14px 0 6px; color: var(--text, #1e293b); }
.kb-tag-tree { font-size: 13px; }
.kb-tag-tree-ul { list-style: none; margin: 0; padding-left: 16px; }
.kb-tag-tree-ul .kb-tag-tree-ul { border-left: 1px solid var(--border, #e2e8f0); }
.kb-tag-tree-node { display: inline-block; padding: 3px 6px; cursor: default; }
.kb-tag-tree-node:hover { background: var(--gray-50, #f8fafc); border-radius: 6px; }

/* 项目管理：标签筛选折叠面板（点击"标签筛选"按钮才展开，平时不占空间） */
.proj-tag-filter-panel {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin-top: 8px; padding: 10px 12px;
    background: var(--bg-soft, #f6f8fa); border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
}
.proj-tag-filter-panel .text-muted-2 { align-self: center; }
#btnTagFilter.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 科纪广场成员卡片统计方块（统一设计 token，与主系统配色一致） */
.broker-stat {
    flex: 1;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}
.broker-stat .bs-num { font-weight: 700; font-size: 18px; line-height: 1.2; }
.broker-stat .bs-lbl { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.soft-primary { background: var(--primary-light); color: var(--primary); }
.soft-success { background: var(--success-light); color: var(--success); }
.soft-warning { background: var(--warning-light); color: var(--warning); }

/* ==================== 下拉勾选组件 ==================== */
.dropdown-check { position: relative; }
.dropdown-check-btn {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-900);
    min-height: 42px;
    transition: border-color 0.2s;
}
.dropdown-check-btn:hover { border-color: var(--primary); }
.dropdown-check-btn .dc-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}
.dropdown-check-btn .dc-text.placeholder { color: var(--gray-500); }
.dropdown-check-btn .dc-chip {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
    white-space: nowrap;
}
.dropdown-check-btn .bi-chevron-down {
    margin-left: 8px;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--gray-500);
    transition: transform 0.2s;
}
.dropdown-check.open .bi-chevron-down { transform: rotate(180deg); }
.dropdown-check-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1080;
    background: #ffffff;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 260px;
    overflow-y: auto;
    padding: 0.25rem 0;
}
.dropdown-check.open .dropdown-check-panel { display: block; }
.dc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s;
}
.dc-item:hover { background: var(--gray-100); }
.dc-item input[type="checkbox"] { margin: 0; cursor: pointer; }
.dc-group-label {
    padding: 0.5rem 0.75rem 0.2rem;
    font-size: 0.7rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dc-empty {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-500);
}
.dc-search {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border-bottom: 1px solid var(--gray-200);
    z-index: 1;
}
.dc-search i { color: var(--gray-500); font-size: 0.8125rem; }
.dc-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.875rem;
    background: transparent;
}
.dc-collab-list .dc-group-label {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
}

/* ==================== 按钮 ==================== */
.btn { font-size: 13px; padding: 8px 16px; border-radius: 8px; font-weight: 500; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-sm { font-size: 12px; padding: 4px 10px; }

/* 统一按钮系统：次要 / 幽灵 / 危险幽灵（设计皮肤 P0） */
.btn-secondary { background: #fff; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--gray-900); }
.btn-ghost { background: transparent; border: none; color: var(--primary); padding: 6px 10px; border-radius: 8px; }
.btn-ghost:hover { background: var(--primary-light); }
.btn-ghost-danger { background: transparent; border: none; color: var(--gray-500); padding: 6px 10px; border-radius: 8px; transition: all .15s; }
.btn-ghost-danger:hover { background: var(--danger-light); color: var(--danger); }

/* ==================== 匹配结果 ==================== */
.match-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    transition: box-shadow .2s;
}

.match-card:hover { box-shadow: var(--shadow-md); }

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.match-name { font-size: 15px; font-weight: 700; }
.match-name .policy-link { color: inherit; text-decoration: none; transition: color 0.15s; }
.match-name .policy-link:hover { color: var(--primary, #2563eb); text-decoration: underline; }

.elig-result-panel { margin-top: 0; }
.elig-result-panel .elig-row:last-child { border-bottom: none !important; }
.elig-summary.text-success { background: #ecfdf5 !important; }
.elig-summary.text-warning { background: #fffbeb !important; }
.elig-summary.text-danger { background: #fef2f2 !important; }

.match-score {
    font-size: 20px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 8px;
}

.match-score-wrap { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.score-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500, #6b7280);
    font-size: 16px;
    cursor: help;
    position: relative;
    transition: color 0.15s;
}
.score-info:hover, .score-info:focus { color: var(--primary, #2563eb); outline: none; }

.score-tip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 150%;
    right: -6px;
    width: 248px;
    background: #1f2937;
    color: #fff;
    font-size: 11px;
    line-height: 1.6;
    font-weight: 400;
    font-style: normal;
    text-align: left;
    padding: 9px 11px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    transition: opacity 0.15s ease;
    z-index: 60;
    pointer-events: none;
}
.score-tip b { color: #93c5fd; font-weight: 700; }
.score-tip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 12px;
    border: 6px solid transparent;
    border-bottom-color: #1f2937;
}
.score-info:hover .score-tip,
.score-info:focus .score-tip { visibility: visible; opacity: 1; }

.score-high { background: var(--success-light); color: var(--success); }
.score-mid { background: var(--warning-light); color: var(--warning); }
.score-low { background: var(--gray-100); color: var(--gray-500); }

.match-reasons { list-style: none; padding: 0; }
.match-reasons li {
    font-size: 12px;
    color: var(--gray-700);
    padding: 3px 0;
    padding-left: 18px;
    position: relative;
}
.match-reasons li::before {
    content: "\F26E";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    color: var(--success);
    font-size: 12px;
}

/* ==================== 跟踪时间线 ==================== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px; top: 4px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.timeline-content {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}

.timeline-date { font-size: 12px; color: var(--gray-500); }

/* ==================== 工作台编辑模式 ==================== */
.widget-editing {
    border: 2px dashed var(--primary) !important;
    position: relative;
}
.stat-card.widget-editing { border-radius: 10px; }

.widget-dragging {
    opacity: 0.4;
}

.widget-edit-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--gray-200);
}

.widget-drag-handle {
    color: var(--gray-400);
    font-size: 16px;
    cursor: grab;
}
.widget-drag-handle:active { cursor: grabbing; }

.widget-edit-label {
    flex-grow: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.widget-edit-actions {
    display: flex;
    gap: 4px;
}

.widget-edit-btn {
    padding: 2px 8px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/* 添加组件弹窗 */
.add-widget-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.add-widget-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.add-widget-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.add-widget-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.add-widget-info { flex-grow: 1; }
.add-widget-info > div { font-weight: 600; font-size: 15px; color: var(--gray-800); }
.add-widget-type {
    display: inline-block;
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ==================== 表单 ==================== */
.form-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.form-control, .form-select {
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}
.form-select {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==================== 搜索栏 ==================== */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-bar .form-control { max-width: 300px; }

/* ==================== 状态筛选下拉 ==================== */
.status-filter-dropdown { position: relative; }
.status-filter-dropdown .btn-outline-secondary {
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; height: 38px; padding: 0 14px;
    font-size: 0.8125rem; font-weight: 500;
}
.status-filter-dropdown .btn-outline-secondary:hover {
    background: var(--gray-50);
}
.status-filter-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    list-style: none;
    padding: 6px 0;
    margin: 0;
    max-height: 320px;
    overflow-y: auto;
}
.status-filter-menu.show { display: block; }
.status-filter-menu li a {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    font-size: 0.8125rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background 0.15s;
}
.status-filter-menu li a:hover {
    background: var(--gray-50);
    color: var(--primary);
}
.status-filter-menu li a .tag { font-size: 11px; }

/* 页头按钮统一样式 */
.page-header .btn-primary {
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; height: 38px; padding: 0 16px;
    font-size: 0.8125rem; font-weight: 500;
}
.page-header .active-tab-btn {
    background: #1e40af;
    border-color: #1e40af;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
    cursor: default;
    opacity: 1;
}

/* ==================== 模态框 ==================== */
.modal-lg { max-width: 800px; }
.modal-body { max-height: 70vh; overflow-y: auto; }
.modal-title { font-weight: 700; }
.modal { z-index: 9999; }
.modal-backdrop { z-index: 9998; }
.modal-dialog { z-index: 10000; }
.modal-content { border-radius: var(--radius); border: none; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--gray-100); padding: 16px 20px; }
.modal-footer { border-top: 1px solid var(--gray-100); padding: 12px 20px; }

/* 模态框基础显示/隐藏规则（独立于 bootstrap CDN）：内网无 CDN 时弹窗仍能正常弹出与关闭，
   与 bootstrap 原生 .modal 行为保持一致，避免双份样式冲突 */
.modal { display: none; position: fixed; top: 0; left: 0; z-index: 9999; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; outline: 0; }
.modal.show { display: block; }
.modal.fade:not(.show) { opacity: 0; }
.modal.fade.show { opacity: 1; }
.modal-dialog { position: relative; width: auto; margin: 1.75rem auto; max-width: 500px; pointer-events: none; }
.modal.show .modal-dialog { pointer-events: auto; }
.modal-dialog.modal-lg, .modal-lg .modal-dialog { max-width: 800px; }
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto; background-color: #fff; background-clip: padding-box; outline: 0; }
.modal-backdrop { position: fixed; top: 0; left: 0; z-index: 9998; width: 100%; height: 100%; background: rgba(15,23,42,.45); }
.modal-backdrop.show { opacity: 1; }

/* 自定义居中弹窗（用于定向推荐等轻量弹窗） */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .2s ease;
}
.modal-box {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
    animation: slideUp .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== 工具类 ==================== */
.text-muted-2 { color: var(--gray-500) !important; }
.cursor-pointer { cursor: pointer; }
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}
.empty-state i { font-size: 48px; margin-bottom: 12px; color: var(--gray-300); }
.empty-state p { font-size: 15px; }

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .5s ease;
}

.badge-round {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ==================== 组织架构 ==================== */
.org-node .card {
    transition: box-shadow .2s, border-color .2s;
}
.org-node .card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.org-member-tag {
    transition: background .2s;
}
.org-member-tag:hover {
    background: var(--gray-100) !important;
}
.org-unassigned-tag:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary) !important;
}
.org-children {
    position: relative;
    margin-left: 14px;
    padding-left: 26px;
    border-left: 2px solid var(--gray-200);
    transition: all .2s;
}
.org-children > .org-node {
    position: relative;
}
/* 树形结构图：子节点到主干的横向连接线 */
.org-children > .org-node::before {
    content: '';
    position: absolute;
    top: 19px;
    left: -26px;
    width: 26px;
    height: 2px;
    background: var(--gray-200);
}
/* 树形结构图：公司名根节点 */
.org-company-root {
    position: relative;
}
.org-root-card {
    border: 2px solid var(--primary) !important;
    background: var(--gray-50);
}
.org-root-card .card-body {
    background: transparent;
}
.org-root-card strong {
    color: var(--primary);
}
/* 节点标题可点击编辑 */
.org-node-head {
    border-radius: 6px;
    padding: 2px 4px;
    transition: background .15s;
}
.org-editable { cursor: pointer; }
.org-editable:hover {
    background: var(--gray-50);
}
.org-editable:hover strong {
    text-decoration: underline;
}
.org-toggle {
    transition: transform .2s;
}
#orgAssignDropdown {
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    border-radius: 8px;
}

/* ==================== 龙头企业卡片 ==================== */
.enterprise-card:hover {
    border-color: var(--primary, #2563eb) !important;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

/* ==================== 详情字段 ==================== */
.detail-field {
    margin-bottom: 12px;
}
.detail-label {
    display: block;
    font-size: 12px;
    color: var(--gray-400, #9ca3af);
    margin-bottom: 4px;
    font-weight: 600;
}
.detail-value {
    font-size: 14px;
    color: var(--gray-700, #374151);
}

/* 科纪广场城市详情：下级区县快捷入口 */
.gov-children-block { border-top: 1px dashed #e5e7eb; padding-top: 12px; margin-top: 12px; }
.gov-children-title { font-size: 13px; font-weight: 600; color: #6b7280; margin-bottom: 8px; }
.gov-children-list { display: flex; flex-wrap: wrap; gap: 8px; }
.gov-child-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px; border-radius: 999px;
    background: #f3f4f6; color: #0d9488;
    font-size: 13px; cursor: pointer; border: 1px solid transparent;
    transition: all .15s ease;
}
.gov-child-chip:hover { background: #ccfbf1; border-color: #99f6e4; }

/* ==================== 政府城市卡片 ==================== */
/* .gov-city-card 视觉统一规则已迁移至 theme.css（19.2 节，单一可信源），此处不再重复定义避免双源冲突 */

/* 政府资源视图切换（热门城市 / 按省份） */
.gov-view-tabs .btn-tab {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--gray-600, #6b7280);
    border-radius: 8px;
    padding: 6px 14px;
    font-weight: 500;
}
.gov-view-tabs .btn-tab:hover {
    background: #f8fafc;
}
.gov-view-tabs .btn-tab.active {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
}

/* 区县列表 */
.gov-district-list {
    border-top: 1px dashed #e5e7eb;
    padding-top: 8px;
}
.gov-district-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    margin: 2px 4px 2px 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}
.gov-district-item:hover {
    background: #e9ecef;
    border-color: #2563eb;
}
.gov-district-card:hover {
    border-color: #2563eb !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

/* 龙头企业行业分组 */
.ent-industry-group {
    border-radius: 8px;
    overflow: hidden;
}
.ent-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f0f4ff;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background .15s;
}
.ent-group-header:hover {
    background: #e0e7ff;
}
.ent-group-arrow {
    font-size: 12px;
    color: #6b7280;
    transition: transform .15s;
}
.ent-group-body {
    padding: 6px 0 0 0;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform .3s; }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 16px; }
}

/* ==================== 登录页 ==================== */
.login-page {
    /* 登录/注册覆盖层独立滚动：body 的 overflow:hidden 是给主工作台的，
       这里 fixed+inset 撑满视口并自行 overflow-y:auto，内容超一屏时可滚，
       修复注册卡（套餐卡+复选框+注册按钮）在小视口下被截断的问题。 */
    position: fixed;
    inset: 0;
    overflow-y: auto;
    display: flex;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #1e40af 100%);
    padding: 20px;
}
/* 居中交给 margin:auto 而非 align-items:center：
   子元素高于视口时前者可从顶部滚起，后者顶部会被裁掉滚不到。 */
.login-container { width: 100%; max-width: 420px; margin: auto; }
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}
.login-logo h2 {
    font-size: var(--brand-name);
    font-weight: var(--brand-name-weight);
    color: var(--gray-800);
    margin-bottom: 4px;
}
.login-logo p {
    font-size: var(--brand-sub);
    color: var(--gray-500);
    margin: 0;
}
.login-form .form-control {
    padding: 12px 14px;
    font-size: 15px;
}
.login-form .btn-primary {
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
}

/* SaaS 套餐选择 */
.plan-options {
    display: flex;
    gap: 8px;
}
.plan-option {
    flex: 1;
    cursor: pointer;
    position: relative;
}
.plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.plan-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    transition: all .2s;
    background: #f8fafc;
}
.plan-option input[type="radio"]:checked + .plan-card {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.plan-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}
.plan-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin: 4px 0;
}
.plan-desc {
    font-size: 11px;
    color: var(--gray-500);
}

/* ==================== AI 聊天组件 ==================== */
.chat-widget {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 1050;
    pointer-events: none;
}
/* 展开式浮钮菜单 */
.fab-menu {
    position: fixed;
    bottom: 92px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: auto;
    z-index: 1051;
}
.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 8px 14px 8px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
}
.fab-menu-item:hover {
    background: #f3f4f6;
}
/* 脚印轨迹：竖排菜单项按奇偶左右交错，似小狗行走落点（非半圆弧排布，适配 1~8 个动态项） */
.fab-menu-item:nth-child(even) {
    margin-right: 16px;
}
.fab-menu-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 17px;
    flex-shrink: 0;
}
/* 狗爪徽章：柯基橙渐变圆底 + 白色爪印 */
.fab-menu-item .paw-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6a13c, #e07b2a);
    box-shadow: 0 2px 6px rgba(224, 123, 42, 0.35);
    flex-shrink: 0;
}
.fab-menu-item .paw-svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}
.fab-menu-item .fab-menu-label {
    white-space: nowrap;
}
/* 自定义菜单项（齿轮）：中性灰虚线边，区别于狗爪动作项 */
.fab-menu-item.fab-menu-settings i {
    background: #f3f4f6;
    color: #6b7280;
    box-shadow: none;
    font-size: 16px;
}
.fab-menu-item.fab-menu-settings {
    border-style: dashed;
    border-color: #d1d5db;
}

/* 自定义快捷菜单设置面板 */
.fab-settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.fab-set-panel {
    background: #fff;
    border-radius: 16px;
    width: 360px;
    max-width: 92vw;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.fab-set-head {
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    border-bottom: 1px solid #eef0f3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fab-set-head span {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
}
.fab-set-body {
    padding: 8px 6px;
    overflow: auto;
}
.fab-set-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
}
.fab-set-row.on {
    background: #fff7ed;
}
.fab-set-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}
.fab-set-order {
    width: 20px;
    text-align: center;
    color: #f59e0b;
    font-weight: 700;
    font-size: 13px;
}
.fab-set-move button {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    width: 26px;
    height: 24px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}
.fab-set-move button:disabled {
    opacity: .35;
    cursor: not-allowed;
}
/* 拖拽排序视觉：手柄 + 放置高亮（已选项置顶连续，可拖拽重排） */
.fab-set-row.draggable { cursor: grab; }
.fab-set-row.draggable:active { cursor: grabbing; }
.fab-set-handle { color: #9ca3af; margin-right: 2px; cursor: grab; user-select: none; font-size: 15px; }
.fab-set-group-title { font-size: 12px; color: #6b7280; font-weight: 600; margin: 14px 2px 6px; }
.fab-set-empty { font-size: 12px; color: #9ca3af; padding: 2px 2px 10px; }
.fab-set-row.drag-over { outline: 2px dashed #f6a13c; outline-offset: 2px; background: #fff7ed; }
.fab-set-foot {
    display: flex;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid #eef0f3;
}
.fab-set-cancel, .fab-set-save {
    flex: 1;
    padding: 9px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.fab-set-cancel {
    background: #f3f4f6;
    color: #374151;
}
.fab-set-save {
    background: #f59e0b;
    color: #fff;
}
/* 柯基形象：菜单项用 3D 全身图（圆形铺满+蓝紫渐变外环），面板标题/头像用扁平 SVG */
.fab-menu-item .fab-corgi-3d {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    padding: 3px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    position: relative;
}
.fab-menu-item .fab-corgi-3d::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #f3eee5;
    background-image: url('/static/img/corgi-3d.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}
.chat-title img.corgi-flat {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px;
}
.chat-msg-avatar img.corgi-avatar-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: contain;
}
/* 菜单弹出动画 */
.fab-menu[style*="display: flex"] {
    animation: fabMenuIn 0.18s ease;
}
@keyframes fabMenuIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    pointer-events: auto;
    z-index: 1051;
    animation: fabFloaty 3.2s ease-in-out infinite;
    /* 去底柯基本体，无外环无裁圆，背景完全透明 */
    background: transparent;
    perspective: 600px;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}
.chat-fab-corgi {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
/* 跟随鼠标的高光层 */
.chat-fab-glare {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.15) 35%, transparent 70%);
    opacity: 0;
    transition: opacity 0.25s ease, background-position 0.08s linear;
    z-index: 3;
}
/* 菜单展开时柯基保持原样：原「蓝块+叉」关闭遮罩彻底隐形，仅占位避免 JS 报错 */
.chat-fab-overlay {
    display: none;
}
/* 菜单展开（#fabMenu 的 display 非 none）时，柯基本体亮起暖橙光晕作为激活提示。
   用兄弟选择器纯 CSS 判定，无需 JS 增删 class；drop-shadow 跟随柯基轮廓，不显方块 */
#fabMenu:not([style*="display: none"]):not([style*="display:none"]) ~ #chatFab .chat-fab-corgi {
    filter: drop-shadow(0 0 7px rgba(245, 158, 11, 0.95)) drop-shadow(0 0 2px rgba(245, 158, 11, 0.8));
}
@keyframes fabFloaty {
    0%, 100% { transform: translateY(0); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15)); }
    50% { transform: translateY(-5px); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.2)); }
}
.chat-fab:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
}
.chat-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}

/* ============ 柯基表情状态体系 ============ */
/* 动效关键帧：作用于柯基本体(.chat-fab-corgi / .corgi-flat)，
   不与 #chatFab 的 hover 倾斜/浮动(fabFloaty)冲突——浮动/倾斜在 #chatFab 上，
   表情动画在柯基本体 img 上，二者层级独立 */
@keyframes corgiBob   { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
@keyframes corgiBounce{ 0%,100%{transform:translateY(0)} 30%{transform:translateY(-11px)} 50%{transform:translateY(0)} 65%{transform:translateY(-5px)} }
@keyframes corgiShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-4px) rotate(-5deg)} 40%{transform:translateX(4px) rotate(5deg)} 60%{transform:translateX(-3px) rotate(-3deg)} 80%{transform:translateX(3px) rotate(3deg)} }
@keyframes corgiWave  { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-14deg)} 75%{transform:rotate(14deg)} }
/* corgiBlink 已废弃：整图 scaleY 压扁不是眨眼；聊天头像改用 SVG 内 .corgi-eyes 真眨眼，FAB 改用 corgiBob 浮动 */

/* FAB 柯基（3D 渲染图） */
.chat-fab[data-corgi-state="thinking"] .chat-fab-corgi { animation: corgiBob .9s ease-in-out infinite; }
.chat-fab[data-corgi-state="success"]  .chat-fab-corgi { animation: corgiBounce .6s ease; }
.chat-fab[data-corgi-state="error"]    .chat-fab-corgi { animation: corgiShake .5s ease; }
.chat-fab[data-corgi-state="welcome"]  .chat-fab-corgi { animation: corgiWave .6s ease; }
.chat-fab[data-corgi-state="idle"]     .chat-fab-corgi { animation: corgiBob 3.2s ease-in-out infinite; }

/* 聊天面板头像（扁平 SVG，聊天打开时 FAB 隐藏，状态落在这） */
.corgi-flat[data-corgi-state="thinking"] { animation: corgiBob .9s ease-in-out infinite; }
.corgi-flat[data-corgi-state="success"]  { animation: corgiBounce .6s ease; }
.corgi-flat[data-corgi-state="error"]    { animation: corgiShake .5s ease; }
.corgi-flat[data-corgi-state="welcome"]  { animation: corgiWave .6s ease; }
/* corgi-flat idle 不再整图眨；眨眼由 corgi-flat.svg 内 .corgi-eyes 层 opacity 脉冲实现
   （睁眼帧 corgi-3d.png ↔ 闭眼帧 corgi-blink.png 切换，非 scaleY 局部压扁——scaleY 压扁是早期被否的假眨眼） */

/* 心情气泡：思考(三点)/成功(✓)/错误(!)，浮在可见柯基正上方 */
.corgi-mood {
    position: fixed;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 26px;
    padding: 0 9px;
    border-radius: 14px;
    background: #fff;
    color: #1f2937;
    box-shadow: 0 3px 12px rgba(0,0,0,.2);
    font-size: 15px;
    font-weight: 800;
    pointer-events: none;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.corgi-mood::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
    border-bottom: 0;
}
.corgi-mood.thinking { color: #2563eb; }
.corgi-mood.thinking span {
    display: inline-block;
    width: 5px; height: 5px;
    margin: 0 1.5px;
    border-radius: 50%;
    background: #2563eb;
    animation: corgiDot 1s infinite ease-in-out;
}
.corgi-mood.thinking span:nth-child(2) { animation-delay: .15s; }
.corgi-mood.thinking span:nth-child(3) { animation-delay: .3s; }
.corgi-mood.success { background: #16a34a; color: #fff; }
.corgi-mood.success::after { border-top-color: #16a34a; }
.corgi-mood.error { background: #dc2626; color: #fff; }
.corgi-mood.error::after { border-top-color: #dc2626; }
@keyframes corgiDot { 0%,60%,100%{opacity:.3; transform:translateY(0)} 30%{opacity:1; transform:translateY(-3px)} }
.chat-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 420px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 48px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    z-index: 1052;
    animation: chatSlideUp 0.25s ease;
}
@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-header {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}
.chat-title i { font-size: 20px; }
.chat-header-actions { display: flex; gap: 4px; }
.chat-header-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}
.chat-header-btn:hover { background: rgba(255, 255, 255, 0.3); }
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-body::-webkit-scrollbar { width: 5px; }
.chat-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.chat-body::-webkit-scrollbar-track { background: transparent; }

/* 消息气泡 */
.chat-msg {
    display: flex;
    gap: 8px;
    max-width: 90%;
    animation: msgFadeIn 0.3s ease;
}
.chat-msg-content {
    min-width: 0;
    max-width: 100%;
    flex: 1;
}
@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg.user {
    flex-direction: row-reverse;
    align-self: flex-end;
}
.chat-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.chat-msg.assistant .chat-msg-avatar {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
}
.chat-msg.user .chat-msg-avatar {
    background: var(--gray-200);
    color: var(--gray-700);
}
.chat-msg.system .chat-msg-avatar {
    background: var(--success-light);
    color: var(--success);
}
.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.6;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
}
.chat-msg.assistant .chat-msg-bubble {
    background: #ffffff;
    color: var(--gray-900);
    border: 1px solid var(--gray-200);
    border-top-left-radius: 4px;
}
.chat-msg.user .chat-msg-bubble {
    background: var(--primary);
    color: #fff;
    border-top-right-radius: 4px;
}
.chat-msg.system .chat-msg-bubble {
    background: var(--success-light);
    color: var(--success);
    font-size: 12.5px;
    text-align: center;
    border-radius: 8px;
}

/* RAG 参考来源：强制换行/截断，防止长链接顶出对话框 */
.chat-sources {
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--gray-600);
    margin-top: 4px;
}
.chat-sources .badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* AI正在输入 */
.chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}
.chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gray-300);
    animation: typingBounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* 项目确认卡片 */
.chat-project-card {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 14px;
    margin-top: 8px;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    box-sizing: border-box;
}
.chat-project-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-word;
}
.chat-project-card-title i { color: var(--primary); }
.chat-project-card table {
    width: 100%;
    font-size: 12.5px;
    border-collapse: collapse;
    table-layout: fixed;
}
/* ==================== 定向推荐树形选择 ==================== */
.recommend-tree { max-height: 360px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: 8px; padding: 4px 0; }
.recommend-tree-item {
    display: flex; align-items: center; padding: 8px 12px; cursor: pointer;
    transition: background .15s; border-radius: 0;
    user-select: none; -webkit-user-select: none;
}
.recommend-tree-item:hover { background: var(--gray-50); }
.recommend-tree-item.selected { background: #e8f4fd; color: var(--primary); font-weight: 600; }
.recommend-tree-item .toggle-icon {
    width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
    margin-right: 6px; font-size: 12px; color: var(--gray-500); flex-shrink: 0;
    transition: transform .2s;
}
.recommend-tree-item .toggle-icon.expanded { transform: rotate(90deg); }
.recommend-tree-item .tree-label { flex: 1; font-size: 13px; }
.recommend-tree-item .tree-badge { font-size: 11px; color: var(--gray-400); margin-left: 6px; flex-shrink: 0; }
.recommend-tree-children { overflow: hidden; transition: max-height .25s ease; }
.recommend-tree-children.collapsed { max-height: 0 !important; }
.recommend-tree-child { padding-left: 36px; }
.recommend-tree-section-title {
    padding: 8px 12px 4px; font-size: 11px; font-weight: 700; color: var(--gray-400);
    text-transform: uppercase; letter-spacing: .5px;
}
.recommend-tree-empty { padding: 24px; text-align: center; color: var(--gray-400); font-size: 13px; }

.chat-project-card table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}
.chat-project-card table td:first-child {
    color: var(--gray-500);
    white-space: nowrap;
    width: 80px;
}
.chat-project-card table td:last-child {
    color: var(--gray-900);
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.chat-project-card-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chat-project-card-actions button {
    flex: 1;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.chat-project-card-actions .btn-confirm {
    background: var(--primary);
    color: #fff;
}
.chat-project-card-actions .btn-confirm:hover {
    background: var(--primary-dark);
}
.chat-project-card-actions .btn-confirm:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}
.chat-project-card-actions .btn-cancel {
    background: var(--gray-100);
    color: var(--gray-700);
}
.chat-project-card-actions .btn-cancel:hover {
    background: var(--gray-200);
}

/* 聊天输入区 */
.chat-footer {
    padding: 10px 14px;
    background: #ffffff;
    border-top: 1px solid var(--gray-200);
    flex-shrink: 0;
}
.chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}
/* 拖拽文件到对话框时的高亮反馈 */
.chat-input-area.chat-dragover {
    outline: 2px dashed var(--primary);
    outline-offset: -4px;
    background: var(--primary-light, #eff6ff);
    border-radius: 10px;
}
.chat-upload-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.chat-upload-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
/* 话筒录音中：红底白图标 + 呼吸动画，明确"正在录"的状态 */
.chat-mic-recording {
    border-color: #dc3545 !important;
    background: #dc3545 !important;
    color: #fff !important;
    animation: chatMicPulse 1.1s ease-in-out infinite;
}
@keyframes chatMicPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}
.chat-input {
    flex: 1;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13.5px;
    resize: none;
    max-height: 100px;
    min-height: 36px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    line-height: 1.5;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: background 0.2s;
}
.chat-send-btn:hover { background: var(--primary-dark); }
.chat-send-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}
.chat-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 反馈 / 报bug 表单 */
.chat-feedback {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f7f8fa;
    overflow-y: auto;
    padding: 16px;
    gap: 12px;
}
.chat-feedback-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}
.chat-feedback-head i { color: var(--primary); margin-right: 4px; }
.fb-type-row { display: flex; gap: 14px; font-size: 13px; color: var(--gray-600); }
.fb-type-row label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.fb-input, .fb-textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 13.5px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.fb-textarea { min-height: 110px; }
.fb-input:focus, .fb-textarea:focus { outline: none; border-color: var(--primary); }
.fb-page { font-size: 11px; color: var(--gray-400); word-break: break-all; }
.fb-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.fb-submit:hover { background: var(--primary-dark); }
.fb-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.fb-msg { font-size: 12.5px; min-height: 16px; }

/* 文件上传中 */
.chat-upload-loading {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--primary-light);
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

/* AI配置区域 */
.ai-config-section {
    max-width: 560px;
}
.ai-config-form {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
}
.ai-config-form .form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}
.ai-config-form .form-text {
    font-size: 12px;
    color: var(--gray-500);
}
.ai-config-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.ai-config-status.on {
    background: var(--success-light);
    color: var(--success);
}
.ai-config-status.off {
    background: var(--gray-100);
    color: var(--gray-500);
}

/* ==================== 联系人组件 ==================== */
.contact-row {
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px 0 4px 0;
    border: 1px solid #e5e7eb;
}
.contact-row:hover {
    border-color: var(--primary);
    background: #eff6ff;
}
.contact-badge {
    display: inline-block;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 2px 8px;
    margin: 0 4px 4px 0;
    font-size: 12px;
    white-space: nowrap;
}

/* ==================== 自动联想下拉 ==================== */
.autocomplete-wrapper {
    position: relative;
}
.autocomplete-wrapper .ac-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(37,99,235,.15);
}
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1060;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 260px;
    overflow-y: auto;
}
.autocomplete-dropdown.show {
    display: block;
}
.ac-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active {
    background: #eff6ff;
    color: #1d4ed8;
}
.ac-item .ac-icon {
    color: #9ca3af;
    font-size: 13px;
    flex-shrink: 0;
}
.ac-item .ac-icon.ai { color: #8b5cf6; }
.ac-item .ac-highlight {
    color: #2563eb;
    font-weight: 600;
}
.ac-loading {
    padding: 14px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}
.ac-empty {
    padding: 14px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}
.ac-group-label {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

/* ==================== 支付系统样式 ==================== */
.payment-method-btn {
    transition: all 0.2s ease;
    padding: 10px 16px;
    font-size: 14px;
}
.payment-method-btn:hover {
    border-color: #2563eb !important;
    color: #2563eb;
}
.payment-method-btn.active {
    background: #eff6ff !important;
}
.quick-amt {
    min-width: 56px;
    transition: all 0.15s ease;
}
.quick-amt.btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}


/* ==================== 智能匹配报告 ==================== */
.report-doc {
    font-size: 14px;
    color: #1f2937;
}
.report-meta {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 14px;
}
.report-section {
    margin-bottom: 8px;
}
.report-h {
    font-size: 16px;
    font-weight: 700;
    color: #1f4e79;
    border-left: 4px solid #2563eb;
    padding-left: 10px;
    margin: 20px 0 10px;
}
.kv-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.kv-item {
    flex: 1 1 45%;
    min-width: 220px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}
.kv-k {
    color: #6b7280;
    margin-right: 6px;
}
.kv-v {
    font-weight: 600;
    word-break: break-word;
}
.ai-summary-box {
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.8;
}
.suggestion-list {
    font-size: 14px;
    padding-left: 20px;
    margin: 0;
}
.suggestion-list li {
    margin-bottom: 6px;
    line-height: 1.7;
}
/* 报告弹窗内复用 match-card / match-score / scoreClass 已由全局样式覆盖，
   这里仅补充报告场景下的间距一致性 */
.report-doc .match-card {
    margin-top: 10px;
}

/* 科纪广场设置：分组白名单行 */
.plaza-group-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px;
    border-bottom: 1px solid #f1f5f9;
}
.plaza-group-row:last-child { border-bottom: none; }
.plaza-group-name { font-weight: 600; font-size: 14px; }
.plaza-group-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* ==================== 通讯录 ==================== */
.contact-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 230px;
    max-width: 320px;
}
.contact-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: var(--primary-light, #e0f2fe);
    color: var(--primary, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}
.contact-body { min-width: 0; flex: 1; }
.contact-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.contact-role {
    font-size: 10px;
    font-weight: 500;
    color: var(--primary, #2563eb);
    background: var(--primary-light, #e0f2fe);
    border-radius: 10px;
    padding: 1px 7px;
}
.contact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 12px;
    color: var(--gray-500, #64748b);
    margin-top: 2px;
}
.contact-meta a { color: var(--gray-600, #475569); text-decoration: none; }
.contact-meta a:hover { text-decoration: underline; }
.contact-actions { display: flex; align-items: center; gap: 6px; }

/* ==================== 通讯录 · 钉钉/企微式左右分栏 ==================== */
.contacts-layout {
    display: flex;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    min-height: 420px;
}
.contacts-sidebar {
    width: 264px;
    flex: 0 0 264px;
    border-right: 1px solid var(--gray-200, #e2e8f0);
    background: var(--gray-50, #f8fafc);
    padding: 10px 8px;
    overflow-y: auto;
    max-height: calc(100vh - 320px);
    display: flex;
    flex-direction: column;
}
.contacts-sidebar-footer { margin-top: auto; padding: 10px 6px 2px; }
.contacts-main { flex: 1; min-width: 0; padding: 14px 18px 18px; }
.contacts-main-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-100, #f1f5f9);
    margin-bottom: 4px;
}
.contacts-main-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contacts-main-sub { font-size: 12px; color: var(--gray-500, #64748b); margin-top: 3px; }

/* 左侧部门树 */
.org-tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--gray-700, #334155);
}
.org-tree-item:hover { background: var(--gray-100, #f1f5f9); }
.org-tree-item.active { background: var(--primary-light, #e0f2fe); color: var(--primary, #2563eb); font-weight: 600; }
.org-tree-item.active .org-tree-count { background: var(--primary, #2563eb); color: #fff; }
.org-tree-item.active .tree-node-icon { color: var(--primary, #2563eb); }
.org-tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-tree-count {
    flex: 0 0 auto;
    font-size: 11px;
    background: var(--gray-200, #e2e8f0);
    color: var(--gray-600, #475569);
    border-radius: 10px;
    padding: 0 7px;
    line-height: 17px;
    font-weight: 500;
}
.org-tree-more {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--gray-400, #94a3b8);
    padding: 0 2px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity .12s;
}
.org-tree-item:hover .org-tree-more { opacity: 1; }
.org-tree-more:hover { color: var(--primary, #2563eb); }
.org-tree-children { margin-left: 15px; }
.tree-node-icon { font-size: 13px; color: var(--gray-400, #94a3b8); flex: 0 0 auto; }
.tree-node-icon.is-root { color: var(--primary, #2563eb); }
.org-toggle { font-size: 11px; color: var(--gray-400, #94a3b8); flex: 0 0 12px; text-align: center; }
.tree-toggle-placeholder { flex: 0 0 12px; text-align: center; color: transparent; font-size: 11px; }

/* 右侧成员行（企微式紧凑单行） */
.member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--gray-100, #f1f5f9);
}
.member-row:last-child { border-bottom: none; }
.member-row:hover { background: var(--gray-50, #f8fafc); border-radius: 8px; }
.member-avatar { width: 36px; height: 36px; flex: 0 0 36px; font-size: 14px; }
.member-row-body { flex: 1; min-width: 0; }
.member-row-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member-row-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: 12px; color: var(--gray-500, #64748b); margin-top: 2px; }
.member-row-actions { display: flex; align-items: center; gap: 8px; font-size: 15px; opacity: 0; transition: opacity .12s; flex: 0 0 auto; }
.member-row:hover .member-row-actions { opacity: 1; }
.member-admin-badge {
    font-size: 10px;
    font-weight: 600;
    color: #b45309;
    background: #fef3c7;
    border-radius: 10px;
    padding: 1px 7px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* 部门负责人徽章（企微式：青绿系，与管理员琥珀徽章区分；title 提示负责的部门） */
.member-leader-badge {
    font-size: 10px;
    font-weight: 600;
    color: #0f6e56;
    background: #e1f5ee;
    border-radius: 10px;
    padding: 1px 7px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: middle;
}

/* 子部门快捷 chips */
.subdept-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0 6px; }
.subdept-chips-label { font-size: 12px; color: var(--gray-400, #94a3b8); }
.subdept-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray-700, #334155);
    background: var(--gray-100, #f1f5f9);
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 14px;
    padding: 3px 10px;
    text-decoration: none;
}
.subdept-chip:hover { border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); background: var(--primary-light, #e0f2fe); }
.chip-count { font-size: 10px; background: #fff; border-radius: 8px; padding: 0 5px; color: var(--gray-500, #64748b); }
.empty-hint { text-align: center; color: var(--gray-400, #94a3b8); font-size: 13px; padding: 36px 0; }

/* 响应式：窄屏上下堆叠，操作常显 */
@media (max-width: 768px) {
    .contacts-layout { flex-direction: column; }
    .contacts-sidebar { width: 100%; flex: none; max-height: 240px; border-right: none; border-bottom: 1px solid var(--gray-200, #e2e8f0); }
    .member-row-actions { opacity: 1; }
}

/* 招商看板 Pipeline */
.pipeline-board { overflow-x: auto; padding-bottom: 8px; }
.pipeline-cols { display: flex; gap: 16px; align-items: flex-start; min-width: min-content; }
.pipeline-col { flex: 1 1 0; min-width: 240px; background: #f8fafc; border-radius: 12px; padding: 10px; }
.pipeline-col-header { display: flex; align-items: center; gap: 8px; padding: 10px 8px; border-top: 3px solid #999; border-radius: 8px 8px 0 0; font-weight: 700; background: #fff; margin: -10px -10px 10px; }
.pipeline-col-dot { width: 10px; height: 10px; border-radius: 50%; }
.pipeline-col-name { font-size: 14px; }
.pipeline-col-count { margin-left: auto; background: #e5e7eb; color: #374151; border-radius: 20px; padding: 1px 10px; font-size: 12px; }
.pipeline-empty { color: #9ca3af; font-size: 13px; text-align: center; padding: 18px 0; }
.pipeline-card { background: #fff; border: 1px solid #eef2f7; border-radius: 10px; padding: 12px; margin-bottom: 10px; cursor: pointer; transition: box-shadow .15s; }
.pipeline-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.pipeline-card-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.pipeline-card-owner { color: #6b7280; font-size: 12px; margin-bottom: 6px; }
.pipeline-due { font-size: 12px; padding: 3px 8px; border-radius: 6px; display: inline-block; margin-bottom: 8px; }
.pipeline-due.ok { background: #ecfdf5; color: #059669; }
.pipeline-due.soon { background: #fffbeb; color: #d97706; }
.pipeline-due.overdue { background: #fef2f2; color: #dc2626; }
.pipeline-card-actions { text-align: right; }

/* 跟进提醒横幅 */
.followup-card { border-color: #fde68a; background: #fffdf5; }
.followup-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.followup-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; background: #fff; border: 1px solid #f1f5f9; cursor: pointer; }
.followup-item:hover { border-color: var(--primary, #2563eb); }
.followup-main { display: flex; flex-direction: column; }
.followup-action { font-size: 12px; color: #6b7280; }
.followup-date { font-size: 12px; white-space: nowrap; }
.followup-item.soon .followup-date { color: #d97706; }
.followup-item.overdue .followup-date { color: #dc2626; font-weight: 600; }
.followup-more { margin-top: 8px; padding: 6px 12px; font-size: 13px; color: var(--primary, #2563eb); cursor: pointer; text-align: center; border-radius: 8px; background: #f8fafc; }
.followup-more:hover { background: #eff6ff; }

/* 组件管理：分类分组标题行 */
.widget-cat-header > td {
    background: #f1f5f9;
    border-top: 2px solid #e2e8f0;
    padding: 8px 14px;
    font-weight: 600;
    color: #334155;
}
.widget-cat-title { display: inline-flex; align-items: center; }
.widget-cat-count {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 1px 9px;
}

/* ==================== 政策申报提醒横幅（M3 政策窗口对接） ==================== */
.policy-reminder-card { border-color: #bfdbfe; background: #f8fbff; }
.policy-reminder-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.policy-reminder-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; background: #fff; border: 1px solid #e2e8f0; }
.policy-reminder-item:hover { border-color: var(--primary, #2563eb); }
.pr-badge { flex: 0 0 auto; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; white-space: nowrap; color: #fff; }
.pr-main { display: flex; flex-direction: column; min-width: 0; }
.pr-title { font-size: 13px; font-weight: 600; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.policy-reminder-item.pr-overdue .pr-badge { background: #dc2626; }
.policy-reminder-item.pr-overdue { border-color: #fecaca; }
.policy-reminder-item.pr-d1 .pr-badge { background: #ea580c; }
.policy-reminder-item.pr-d1 { border-color: #fed7aa; }
.policy-reminder-item.pr-d3 .pr-badge { background: #d97706; }
.policy-reminder-item.pr-d3 { border-color: #fde68a; }
.policy-reminder-item.pr-d7 .pr-badge { background: #2563eb; }
.policy-reminder-item.pr-d7 { border-color: #bfdbfe; }

/* ==================== 知识库（语雀模式） ==================== */
.kb-layout { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; }
.kb-tree { width: 280px; flex: 0 0 280px; max-height: calc(100vh - 220px); overflow: auto;
    background: var(--gray-50, #f8fafc); border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: 8px; }
.kb-content { flex: 1 1 auto; min-width: 0; }

/* 历史版本面板（百科化） */
.kb-ver-list { max-height: 50vh; overflow: auto; }
.kb-ver-item { border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.kb-ver-item.current { border-color: var(--success, #16a34a); background: rgba(22,163,74,.04); }
.kb-ver-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kb-ver-note { font-size: 12px; color: var(--gray-600, #475569); margin: 4px 0; }
.kb-ver-actions { display: flex; gap: 8px; margin-top: 6px; }
.kb-ver-view, .kb-ver-diff { border-top: 1px dashed var(--border, #e2e8f0); padding-top: 10px; }
.kb-ver-diff .col-6 { padding: 0 8px; }
.kb-ver-diff .border-start { border-left: 1px solid var(--border, #e2e8f0); }

/* 视图切换：树形 / 卡片 */
.kb-view-switch { display: inline-flex; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; overflow: hidden; }
.kb-view-switch button { border: 0; background: #fff; color: var(--gray-600, #475569); font-size: 13px; padding: 5px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.kb-view-switch button + button { border-left: 1px solid var(--border, #e2e8f0); }
.kb-view-switch button:hover { background: var(--gray-50, #f8fafc); }
.kb-view-switch button.active { background: var(--primary, #2563eb); color: #fff; font-weight: 600; }

/* 卡片视图：一个产业链一张卡片 */
.kb-cards { margin-top: 12px; }
.kb-chain-card,
.kb-doc-card {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    transition: box-shadow .15s, transform .15s;
    overflow: hidden;
}
.kb-chain-card:hover,
.kb-doc-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); }
/* 卡片标题行：防止 CJK 长标题在 flex 容器内被压成竖排 */
.kb-chain-card .card-body,
.kb-doc-card .card-body { min-width: 0; }
.kb-chain-card .card-body > .d-flex,
.kb-doc-card .card-body > .d-flex { min-width: 0; width: 100%; }
.kb-chain-card .card-body h6,
.kb-doc-card .card-body h6 {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.35;
}
.kb-chain-card .card-body .badge,
.kb-doc-card .card-body .badge { flex: 0 0 auto; }
/* 底部操作按钮：窄卡片时自动换行并保持可读 */
.kb-chain-card .card-body > .d-flex.gap-2.mt-auto,
.kb-doc-card .card-body > .d-flex.gap-2.mt-auto { flex-wrap: wrap; }
.kb-chain-card .card-body > .d-flex.gap-2.mt-auto .btn,
.kb-doc-card .card-body > .d-flex.gap-2.mt-auto .btn {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
}
.kb-card-subs .kb-sub-chip { display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px; font-size: 12px;
    background: var(--gray-50, #f1f5f9); border: 1px solid var(--border, #e2e8f0); border-radius: 20px; cursor: pointer; color: var(--gray-700, #334155); }
.kb-card-subs .kb-sub-chip:hover { background: rgba(37,99,235,.1); border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); }
.kb-card-projs .kb-card-proj { font-size: 12px; padding: 3px 0; cursor: pointer; color: var(--gray-700, #334155); display: flex; align-items: center; gap: 4px; }
.kb-card-projs .kb-card-proj:hover { color: var(--primary, #2563eb); text-decoration: underline; }
/* 卡片视图内：单个产业链的子项以紧凑树形展示（复用主树形 .kb-tree-*，但更紧凑、隐藏新增按钮） */
.kb-card-tree { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border, #eef2f7); }
/* 〔第十轮 2026-08-30 12:0x〕BOSS 拍板：每行固定 3 张，三等分铺满主内容区。
   第九轮 auto-fit + minmax(280px, 1fr) 是"按宽度自动算列数"——主内容区够宽时
   塞下 4 列（BOSS 实测截图每行 4 张），列数不受控。
   正确解：写死 repeat(3, 1fr)——列数恒为 3，每张卡宽 = (W - 2*gap) / 3，
   三等分铺满（复刻当年 col-lg-4 的语义）；卡高固定 360px 同行同款。
   响应式：窄窗口回落 2 列 / 1 列（992px / 576px 断点，与 Bootstrap lg/sm 对齐）。 */
.kb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);             /* 每行固定 3 张，三等分 */
    gap: 16px;
    margin-top: 12px;
    width: 100%;
}
.kb-grid > .card {
    width: auto;                                         /* 不写死，跟 grid 1fr 走 */
    height: 360px;                                       /* 固定高——同行同款，观感齐 */
    min-width: 0;                                        /* 防 CJK 标题撑破 track */
    flex: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;                                    /* 内容一律关在卡内 */
    margin-bottom: 0;
}
.kb-grid > .card > .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.kb-tile-title {                                        /* 标题限 2 行截断 */
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    min-width: 0;
}
.kb-tile-tags { max-height: 48px; overflow: hidden; }   /* 标签区限高 */
.kb-grid .kb-card-tree { flex: 1 1 auto; min-height: 0; overflow-y: auto; }  /* 子项树内滚 */
.kb-grid .kb-card-projs { max-height: 54px; overflow: hidden; }               /* 项目链接区限高 */
.kb-grid .card-body > .d-flex.mt-auto { margin-top: auto; flex: 0 0 auto; flex-wrap: wrap; }  /* 按钮贴底 */
@media (max-width: 992px) {          /* 平板/窄窗：2 列 */
    .kb-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {          /* 手机：单列铺满 */
    .kb-grid { grid-template-columns: 1fr; }
    .kb-grid > .card { width: auto; }
}
/* 〔第八轮〕旧 row/col 修补规则已全部废弃删除——渲染层不再产出 .row / [class*="col-"]。 */
.kb-card-tree .kb-tree-node { line-height: 1.35; }
.kb-card-tree .kb-tree-row { padding: 3px 6px; font-size: 12px; gap: 5px; border-radius: 6px; }
.kb-card-tree .kb-tree-row .kb-tree-title { font-size: 12px; }
.kb-card-tree .kb-card-toggle { font-size: 10px; color: var(--gray-500, #6b7280); cursor: pointer; }
.kb-card-tree .kb-card-dot-space { display: inline-block; width: 12px; flex: 0 0 12px; }
.kb-card-tree .kb-tree-children { margin-left: 2px; }

/* 卡片视图 - 产业链聚焦（树形只显示该产业链，不切回全部产业链） */
.kb-scope-bar { display: flex; align-items: center; margin: 12px 0 4px; padding: 6px 10px; background: var(--gray-50, #f8fafc); border: 1px solid var(--border, #e2e8f0); border-radius: 8px; font-size: 13px; }
.kb-tree-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; position: relative; }
.kb-tree-row:hover { background: rgba(37,99,235,.08); }
.kb-tree-row.active { background: rgba(37,99,235,.14); font-weight: 600; }
.kb-tree-row .kb-tree-title { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 操作按键：平时完全隐藏且脱离文档流（不占 flex 空间，长标题也不会被挤成两行），悬停整行时才淡入浮于右侧 */
.kb-tree-row .kb-tree-actions {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 2;
}
.kb-tree-row:hover .kb-tree-actions { opacity: 1; pointer-events: auto; }
.kb-tree-row:hover .kb-tree-title { padding-right: 66px; }
.kb-toggle { font-size: 11px; color: var(--gray-500, #6b7280); cursor: pointer; }
.kb-doc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.kb-doc-title { font-size: 22px; margin: 4px 0; }
.kb-doc-meta { font-size: 12px; margin-bottom: 12px; }
.kb-doc-body { font-size: 14px; line-height: 1.7; }
.kb-doc-projects { margin-top: 20px; border-top: 1px dashed var(--border, #e2e8f0); padding-top: 12px; }
.kb-project-item { padding: 10px 12px; border-radius: 10px; background: var(--gray-50, #f8fafc);
    border: 1px solid var(--border, #e2e8f0); margin-bottom: 8px; cursor: pointer; transition: all .15s; }
.kb-project-item:hover { border-color: var(--primary, #2563eb); background: #fff; }
.kb-editor { min-height: 320px; resize: vertical; }
.kb-preview { min-height: 320px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 12px; background: #fff; overflow: auto; font-size: 13px; }
.kb-link-results { max-height: 280px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.kb-link-item { padding: 8px 10px; border-radius: 8px; background: var(--gray-50, #f8fafc); border: 1px solid var(--border, #e2e8f0); }
.kb-link-item:hover { border-color: var(--primary, #2563eb); }

/* 脑图视图 / 编辑器 */
.kb-mindmap { margin-top: 12px; background: var(--gray-50, #f8fafc); border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: 12px; min-height: calc(100vh - 260px); }
.kb-mindmap-canvas { overflow: auto; width: 100%; }
.kb-mindmap-svg { display: block; }
.kb-mindmap-svg .mm-node rect { transition: filter .15s, stroke .15s; }
.kb-mindmap-svg .mm-node:hover rect { filter: drop-shadow(0 2px 6px rgba(0,0,0,.18)); }
.kb-mindmap-svg .mm-node.mm-selected rect { stroke: #f59e0b; stroke-width: 2.5px; }
.kb-mindmap-view { background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: 10px; overflow: auto; }
.kb-mindmap-editor { position: relative; min-height: 380px; background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: 10px; overflow: auto; }
.mm-edit-input { border: 2px solid var(--primary, #2563eb); border-radius: 6px; text-align: center; font-size: 13px; padding: 2px 4px; outline: none; box-sizing: border-box; }
.kb-mm-toolbar { margin-top: 6px; }
.text-purple { color: #9333ea !important; }

/* 知识库附件卡片（微信小程序「用科纪通打开」摄取的文件） */
.kb-file-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; margin: 10px 0;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
}
.kb-file-card > .bi-file-earmark-text { font-size: 28px; color: #2563eb; flex: 0 0 auto; }
.kb-file-meta { flex: 1 1 auto; min-width: 0; }
.kb-file-name { font-weight: 600; color: #1e293b; word-break: break-all; }
.kb-file-card .text-muted-2 { font-size: 12px; margin-top: 2px; }
.kb-file-card .btn { flex: 0 0 auto; }

/* ==================== Markdown 渲染 ==================== */
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin: 14px 0 8px; line-height: 1.3; }
.markdown-body h1 { font-size: 22px; } .markdown-body h2 { font-size: 19px; } .markdown-body h3 { font-size: 16px; }
.markdown-body p { margin: 8px 0; }
.markdown-body ul { padding-left: 22px; margin: 8px 0; }
.markdown-body li { margin: 3px 0; }
.markdown-body blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--primary, #2563eb); background: var(--gray-50, #f8fafc); color: var(--gray-600, #475569); border-radius: 0 8px 8px 0; }
.markdown-body hr { border: none; border-top: 1px solid var(--border, #e2e8f0); margin: 14px 0; }
.markdown-body code.md-code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; font-family: monospace; }
.markdown-body pre.md-pre { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px; overflow: auto; font-size: 12px; }
.markdown-body pre.md-pre code { font-family: monospace; }
.markdown-body a { color: var(--primary, #2563eb); }

/* ==================== 公开项目页 ==================== */
.public-project-page { max-width: 820px; margin: 0 auto; }

/* ==================== M4 待办事项 + 任务派发 ==================== */
.memo-item.todo-task { cursor: default; }
.memo-item.todo-task:hover { background: var(--hover-bg, #f8fafc); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.status-dot.red { background: #dc2626; }
.status-dot.green { background: #16a34a; }
.status-dot.amber { background: #f59e0b; }
.status-dot.gray { background: #9ca3af; }
.dispatch-member { display: block; padding: 3px 6px; font-size: 13px; cursor: pointer; border-radius: 4px; }
.dispatch-member:hover { background: var(--hover-bg, #f1f5f9); }
.dispatch-org-name { font-weight: 600; font-size: 12px; color: var(--text-soft, #6b7280); padding: 5px 6px; }
.dispatch-org-name input.dispatch-org-cb { width: 15px; height: 15px; margin-right: 5px; accent-color: #2563eb; cursor: pointer; vertical-align: -2px; }
.managed-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--border-light, #f1f5f9); font-size: 13px; }
.managed-row .mw-name { width: 90px; flex: 0 0 90px; font-weight: 500; }
.managed-row .mw-title { flex: 1; color: var(--text, #111827); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.managed-row .mw-badge { width: 80px; flex: 0 0 80px; text-align: right; }
.managed-row .mw-proj { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--text-soft, #64748b); }
.managed-row .mw-badge .btn { white-space: nowrap; }
.proj-search-wrap { position: relative; }
.proj-search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 1080; max-height: 260px; overflow-y: auto; background: var(--bg, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12); margin-top: 2px; }
.proj-search-item { padding: 7px 10px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--border-light, #f1f5f9); }
.proj-search-item:last-child { border-bottom: none; }
.proj-search-item:hover { background: var(--hover-bg, #f1f5f9); }
.proj-search-empty { padding: 8px 10px; font-size: 13px; color: var(--text-soft, #94a3b8); }

/* ============ P0 全局筛选器 + 维度分析（驾驶舱增强） ============ */
.global-filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 10px 14px; }
.gf-title { font-weight: 600; color: var(--text, #111827); display: flex; align-items: center; gap: 6px; font-size: 14px; }
.gf-selects { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.gf-select { max-width: 160px; }
.da-crumb { font-size: 13px; color: var(--text-soft, #64748b); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.da-crumb-root, .da-crumb-link { cursor: pointer; color: var(--primary, #3b82f6); }
.da-crumb-cur { font-weight: 600; color: var(--text, #111827); }
.da-tabs { flex-wrap: wrap; }
.da-list { margin-top: 8px; }
.da-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.da-row:hover { background: var(--hover-bg, #f1f5f9); }
.da-label { width: 160px; flex: 0 0 160px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-bar { flex: 1; height: 10px; background: var(--border-light, #f1f5f9); border-radius: 6px; overflow: hidden; }
.da-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #60a5fa, #a78bfa); border-radius: 6px; }
.da-count { width: 48px; text-align: right; font-size: 13px; font-weight: 600; color: var(--text, #111827); }

/* ============ F-06 可见性：active filter chips ============ */
.gf-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border, #e5e7eb); }
.gf-chips-empty { border-top: none; padding-top: 0; margin-top: 4px; }
.gf-viewall { font-size: 12px; color: var(--text-soft, #9ca3af); background: var(--bg-soft, #f1f5f9); border-radius: 999px; padding: 3px 10px; }

/* ============ F-11 管理员预设视图横幅 ============ */
.preset-banner { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; border-radius: 999px; padding: 3px 10px; margin-top: 8px; }
.gf-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 999px; padding: 3px 6px 3px 10px; }
.gf-chip-x { border: none; background: transparent; color: #1d4ed8; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; border-radius: 50%; }
.gf-chip-x:hover { background: #dbeafe; }

/* ============ F-06 可见性：每卡口径标签 ============ */
.widget-caption { font-size: 12px; color: var(--text-soft, #9ca3af); margin-bottom: 8px; }
.widget-caption-exempt { color: #b45309; }

/* ============ F-08 空态/骤降对比行 ============ */
.da-compare { font-size: 12px; color: var(--text-soft, #64748b); background: var(--bg-soft, #f8fafc); border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 5px 10px; margin-bottom: 8px; }

/* ============ F-09 N/A 灰化角标 ============ */
.da-row-na { cursor: default; opacity: .55; }
.da-row-na:hover { background: transparent; }
.da-row-na .da-label, .da-row-na .da-count { color: var(--text-soft, #9ca3af); }
.na-badge { display: inline-block; font-size: 11px; font-weight: 600; color: #9ca3af; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 4px; padding: 0 5px; width: auto; }

/* ============ P0-2 组件切维度面板（驾驶舱增强） ============ */
.widget-dim-switch { position: relative; }
.wds-btn { white-space: nowrap; }
.wds-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  width: 210px; padding: 10px 12px;
  background: var(--bg, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.wds-pop-title { font-size: 12px; font-weight: 600; color: var(--text, #374151); margin-bottom: 6px; }
.wds-pop select { font-size: 13px; }
.wds-pop-hint { font-size: 11px; color: var(--text-soft, #9ca3af); margin-top: 6px; }

/* ============ P0 阶段进度 Stepper（项目详情页顶部） ============ */
.stepper { display: flex; align-items: flex-start; flex-wrap: wrap; }
.stepper-step { display: flex; flex-direction: column; align-items: center; min-width: 76px; flex: 1 1 0; }
.stepper-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; background: #fff;
  border: 2px solid var(--border, #e5e7eb); color: var(--text-soft, #9ca3af);
  z-index: 1; transition: all .2s;
}
.stepper-label { margin-top: 8px; font-size: 12px; color: var(--text-soft, #9ca3af); text-align: center; line-height: 1.3; }
.stepper-line { flex: 1 1 0; height: 2px; background: var(--border, #e5e7eb); margin-top: 14px; min-width: 18px; max-width: 80px; }
.step-done .stepper-dot { background: var(--primary, #2563eb); border-color: var(--primary, #2563eb); color: #fff; }
.step-done .stepper-label { color: var(--text, #374151); }
.step-current .stepper-dot {
  background: var(--primary-light, #eff6ff); border-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb); box-shadow: 0 0 0 4px rgba(37,99,235,.15);
  animation: stepPulse 1.8s ease-in-out infinite;
}
.step-current .stepper-label { color: var(--primary, #2563eb); font-weight: 700; }
.step-label-done { color: var(--text, #374151); }
@keyframes stepPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
  50% { box-shadow: 0 0 0 7px rgba(37,99,235,.07); }
}
@media (max-width: 768px) {
  .stepper-step { min-width: 58px; }
  .stepper-label { font-size: 11px; }
}

/* P1 脉络：竖向阶段分区时间轴 */
.stage-timeline-wrap { margin-top: 4px; }
.stage-block { border:1px solid var(--border,#e5e7eb); border-radius:12px; margin-bottom:14px; overflow:hidden; background:#fff; }
.stage-block-current { border-color:var(--primary,#2563eb); box-shadow:0 0 0 3px rgba(37,99,235,.08); }
.stage-block-head { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; background:var(--bg-sub,#f8fafc); border-bottom:1px solid var(--border,#e5e7eb); }
.stage-dot { width:10px; height:10px; border-radius:50%; display:inline-block; background:#cbd5e1; flex:0 0 auto; }
.stage-dot.done { background:var(--success,#16a34a); }
.stage-dot.current { background:var(--primary,#2563eb); box-shadow:0 0 0 4px rgba(37,99,235,.18); }
.stage-dot.future { background:#cbd5e1; }
.stage-timeline { padding:12px 14px 4px 14px; }

/* P2 阶段推进引导（还差哪步） */
.stage-hint { margin-top:12px; padding:10px 12px; border-radius:10px; background:var(--bg-sub,#f8fafc); border:1px solid var(--border,#e5e7eb); }
.stage-hint.risk { background:#fef2f2; border-color:#fecaca; }
.stage-hint.warn { background:#fffbeb; border-color:#fde68a; }
.stage-hint.ok { background:#f0fdf4; border-color:#bbf7d0; }
.stage-hint-next { margin-top:6px; font-size:12px; color:var(--text-muted,#64748b); line-height:1.55; }

/* P2 时间轴阶段区块折叠 */
.stage-block-head { cursor:pointer; user-select:none; }
.stage-block.collapsed .stage-timeline { display:none; }
.stage-toggle { color:#94a3b8; transition:transform .15s ease; font-size:14px; flex:0 0 auto; }
.stage-block.collapsed .stage-toggle { transform:rotate(-90deg); }

/* ==================== B-2 时间轴优化（长项目健壮性 + 视觉升级） ==================== */
/* 阶段内「展开全部 N 条」按钮 */
.stage-more-btn { display:block; width:100%; margin:6px 0 2px; padding:6px 0; border:none; background:transparent;
    color:var(--primary,#2563eb); font-size:12px; text-align:left; cursor:pointer; }
.stage-more-btn:hover { text-decoration:underline; }

/* 节点类型色标：左标记点按 kind / action 着色，便于一眼区分节点类型 */
.timeline-item--tracking::before { background:var(--warning,#f59e0b); box-shadow:0 0 0 2px #fde68a; }
.timeline-item--task::before { background:var(--info,#0ea5e9); box-shadow:0 0 0 2px #bae6fd; }
.timeline-item--metric::before { background:#0d9488; box-shadow:0 0 0 2px #99f6e4; }
.timeline-item--create_project::before { background:var(--primary,#2563eb); }
.timeline-item--change_owner::before { background:var(--warning,#f59e0b); box-shadow:0 0 0 2px #fde68a; }
.timeline-item--upload_bp::before { background:var(--info,#0ea5e9); box-shadow:0 0 0 2px #bae6fd; }
.timeline-item--advance_stage::before { background:var(--success,#16a34a); box-shadow:0 0 0 2px #bbf7d0; }

/* 当前阶段：竖向连接线渐变 + 头部强调 + 节点脉冲 */
.stage-block-current .timeline::before { background:linear-gradient(180deg, var(--primary,#2563eb) 0%, var(--gray-200,#e5e7eb) 100%); }
.stage-block-current .stage-block-head { background:linear-gradient(90deg, rgba(37,99,235,.07), var(--bg-sub,#f8fafc)); }
.stage-block-current .stage-dot.current { animation:pulseDot 1.8s ease-in-out infinite; }
@keyframes pulseDot { 0%,100%{ box-shadow:0 0 0 4px rgba(37,99,235,.18);} 50%{ box-shadow:0 0 0 7px rgba(37,99,235,.10);} }

/* 周期设置：固定类多选按钮（替代实心蓝块，改为浅底可点胶囊） */
.memo-multi-btn {
    border: 1px solid var(--gray-300);
    background: #fff;
    color: var(--gray-700);
    border-radius: 999px;
    padding: 3px 11px;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
    transition: all .12s ease;
    user-select: none;
    white-space: nowrap;
}
.memo-multi-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.memo-multi-btn.is-on {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
    font-weight: 600;
}
/* 周末（周六/周日）淡红标识，未选中时生效；选中仍用浅蓝 */
.memo-multi-btn.we {
    background: #fff1f0;
    border-color: #ffccc7;
    color: #cf1322;
}
.memo-multi-btn.we.is-on {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
    font-weight: 600;
}

/* 月固定：7列日历网格（周一开始，周末淡色标识） */
.memo-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    max-width: 294px;
}
.memo-month-grid .mh {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    padding: 2px 0;
    border-radius: 4px;
}
.memo-month-grid .mh.we {
    background: #fff1f0;
    color: #f56565;
}
.memo-month-grid .memo-multi-btn {
    border-radius: 6px;
    padding: 5px 0;
    text-align: center;
    width: 100%;
}
.memo-month-grid .memo-multi-btn.we {
    background: #fff1f0;
    border-color: #ffccc7;
    color: #cf1322;
}
.memo-month-grid .memo-multi-btn.we.is-on {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* ==================== 政策库（policy-library.js）==================== */
.policy-filter-bar { background: #f8fafc; border-color: #eef2f7; }
.policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.policy-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: box-shadow .15s, transform .15s;
    height: 100%;
}
.policy-card:hover {
    box-shadow: 0 6px 20px rgba(37,99,235,.12);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}
.policy-card-title {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
    color: #1f2937;
}
.policy-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.policy-card-amount { font-size: 14px; color: #374151; }
.policy-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* 机构库文档附件目录树 */
.kb-attachments-box { margin-top: 18px; }
.kb-att-panel { border-top: 1px solid var(--border, #e5e7eb); padding-top: 12px; }
.kb-att-toolbar { display: flex; gap: 8px; margin: 8px 0 10px; }
.kb-att-tree { font-size: 13px; }
.kb-att-row { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; }
.kb-att-row:hover { background: rgba(0,0,0,0.03); }
.kb-att-name { cursor: pointer; flex: 1 1 auto; }
.kb-att-name:hover { text-decoration: underline; }
.kb-att-meta { color: #9aa0a8; font-size: 11px; margin-right: 6px; }
.kb-att-actions { display: none; gap: 8px; font-size: 12px; }
.kb-att-row:hover .kb-att-actions { display: inline-flex; }
.kb-att-actions a { color: #6b7480; cursor: pointer; }
.kb-att-actions a:hover { color: #2563eb; }
.kb-att-children { margin-left: 4px; }
.kb-att-empty { color: #9aa0a8; font-size: 12px; padding: 2px 0; }
