:root {
    --primary-color: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #2563EB;
    --secondary-color: #06B6D4;
    --accent-color: #8B5CF6;
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-light: #9CA3AF;
    --text-muted: #D1D5DB;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-gray: #E5E7EB;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;
    --border-light: #F3F4F6;
    --success-color: #10B981;
    --success-light: #D1FAE5;
    --warning-color: #F59E0B;
    --warning-light: #FEF3C7;
    --error-color: #EF4444;
    --error-light: #FEE2E2;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.35s ease;
}

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

*:focus:not(input):not(textarea):not(select) {
    outline: none;
    caret-color: transparent;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none !important;
}

.login-container {
    --login-bg-image: url('../img/main_login.png');
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%), var(--login-bg-image);
    background-size: 110% 110%;
    background-position: 50% 0%;
    background-repeat: no-repeat;
}

/* 各智能体登录页专属背景图（主登录页及其他智能体默认使用 main_login.png） */
.login-container.login-page-resume {
    --login-bg-image: url('../img/resume_login.png');
}

.login-container.login-page-employee {
    --login-bg-image: url('../img/employee_login.png');
}

.login-container.login-page-interview {
    --login-bg-image: url('../img/interview_login.png');
}

.login-container.login-page-contract {
    --login-bg-image: url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=professional%20contract%20management%20dashboard%20blue%20gold%20corporate%20elegant%20business%20documents%20stamp%20seal%20signature&image_size=landscape_16_9');
}

.login-container.login-page-forecast {
    --login-bg-image: url('../img/forecast.png');
}

.login-box {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 24px;
}

/* 登录标题行：标题居中，右侧带工作流图标按钮 */
.login-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}
.login-title-wrap .login-title {
    margin-bottom: 0;
}
.workflow-icon-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--primary-color);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.workflow-icon-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all var(--transition-normal);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin-right: 8px;
    accent-color: var(--primary-color);
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--text-light);
    color: var(--text-primary);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: #DC2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.error-message {
    color: var(--error-color);
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
}

.login-info {
    margin-top: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
}

.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background: var(--bg-white);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: bold;
}

.user-info {
    color: var(--text-secondary);
    font-size: 13px;
}

.sidebar {
    width: 240px;
    background: var(--bg-white);
    height: 100vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-light);
}

/* For resume.html layout where sidebar needs to be fixed */
.main-container .sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    height: calc(100vh - 64px);
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.sidebar-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

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

.sidebar-username {
    font-size: 13px;
    opacity: 0.95;
    margin-top: 4px;
    font-weight: 500;
}

.sidebar-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.sidebar-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 8px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 140px;
    z-index: 1000;
}

.sidebar-dropdown-menu ul {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.dropdown-item {
    padding: 10px 20px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-light);
}

.nav-menu {
    list-style: none;
    padding: 8px 0;
}

.nav-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 2px 8px;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.05);
    color: var(--primary-color);
    border-left-color: rgba(59, 130, 246, 0.3);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.nav-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 24px;
}

.nav-section-title {
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.new-chat-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.new-chat-btn:hover {
    background: var(--secondary-color);
}

.conversation-section {
    padding: 0;
    margin: 0;
    list-style: none;
}

.conversation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.conversation-item {
    padding: 10px 24px 10px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: background 0.2s;
    position: relative;
    border-left: 3px solid transparent;
}

.conversation-item:hover {
    background: var(--bg-light);
}

.conversation-item.empty {
    color: var(--text-light);
    font-style: italic;
    cursor: default;
}

.conversation-item.empty:hover {
    background: transparent;
}

.conversation-item.active {
    background: var(--bg-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

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

.conversation-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-actions {
    opacity: 0;
    transition: opacity 0.2s;
    position: relative;
}

.conversation-action-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
}

.conversation-action-btn:hover {
    background: var(--bg-light);
    color: var(--text-secondary);
}

.conversation-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    list-style: none;
    padding: 4px 0;
    margin: 4px 0 0 0;
    min-width: 120px;
    z-index: 1000;
    display: none;
}

.conversation-menu.show {
    display: block;
}

.conversation-menu li {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.conversation-menu li:hover {
    background: var(--bg-light);
}

.conversation-menu li.divider {
    height: 1px;
    background: var(--border-color);
    padding: 0;
    margin: 4px 0;
}

.content {
    padding: 24px;
    min-height: 100vh;
    height: 100vh;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

/* For resume.html layout where sidebar is fixed */
.main-container .content {
    margin-left: 240px;
}

.page-header {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.page-header .btn-primary {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.page-title {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-description {
    color: var(--text-secondary);
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 12px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #888;
    cursor: help;
    flex-shrink: 0;
    position: relative;
    vertical-align: middle;
    line-height: 1;
}

.info-icon:hover {
    background: var(--primary-color);
    color: #fff;
}

.card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    transition: box-shadow var(--transition-normal), transform var(--transition-fast);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 18px;
    color: var(--text-primary);
}

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

/* 固定列宽表格：长文本列省略显示，悬停通过 title 查看全文 */
.cell-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: background var(--transition-fast);
}

th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr {
    transition: background var(--transition-fast);
}

tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: var(--success-light);
    color: var(--success-color);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning-color);
}

.badge-danger {
    background: var(--error-light);
    color: var(--error-color);
}

.badge-secondary {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-secondary);
}

.badge-info {
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
}

/* 日程周历/月历视图 */
.calendar-grid {
    display: grid;
    gap: 6px;
}
.calendar-grid-week {
    grid-template-columns: repeat(7, 1fr);
}
.calendar-grid-month {
    grid-template-columns: repeat(7, 1fr);
}
.calendar-cell {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    min-height: 120px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.calendar-cell-head-only {
    min-height: auto;
    background: transparent;
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    padding: 4px;
}
.calendar-cell-head {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.calendar-cell-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}
.calendar-cell-month {
    min-height: 110px;
}
.calendar-cell-out {
    background: #fafafa;
    color: #bbb;
}
.calendar-cell-today {
    border-color: #2563eb;
    background: #eff6ff;
}
.calendar-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    transition: box-shadow var(--transition-fast);
}
.calendar-card:hover {
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-sm-equal-width {
    padding: 6px 12px;
    font-size: 12px;
    width: 72px;
    flex-shrink: 0;
}

/* 表格操作列图标按钮：尺寸贴合图标，最小化操作列宽度 */
.btn-icon-sm {
    padding: 2px 4px;
    font-size: 14px;
    line-height: 1.2;
    width: auto;
    min-width: auto;
    flex-shrink: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

.stat-value {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.stat-label-action {
    cursor: pointer;
    margin-left: 6px;
    font-size: 13px;
    opacity: 0.65;
    transition: opacity 0.2s;
    display: inline-block;
}

.stat-label-action:hover {
    opacity: 1;
    transform: scale(1.15);
}

.stat-change {
    font-size: 12px;
    margin-top: 8px;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--error-color);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-fast);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-xl);
    width: 90vw;
    height: 90vh;
    max-width: none;
    max-height: none;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp var(--transition-normal);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content.kanban-modal {
    width: 90vw;
    height: 90vh;
    max-width: none;
    max-height: none;
}

.modal-content.smartqa-modal {
    width: 90vw !important;
    height: 90vh !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.modal-content.requirement-modal {
    width: 90vw !important;
    height: 90vh !important;
    max-width: none !important;
    max-height: none !important;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* 工作流弹窗：99%×99% 近全屏嵌入 iframe，去除内边距，关闭按钮悬浮于右上角 */
.modal-content.workflow-modal {
    padding: 0;
    overflow: hidden;
    width: 99vw;
    height: 99vh;
    border-radius: 10px;
}
.modal-content.workflow-modal #modal-body {
    height: 100%;
}
.modal-content.workflow-modal iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.modal-content.workflow-modal .modal-close {
    z-index: 10;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn-primary,
.form-actions .btn-secondary,
.form-actions .btn-success,
.form-actions .btn-danger {
    width: 120px;
    flex-shrink: 0;
}

.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--error-color);
}

.toast.info {
    background: var(--primary-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-light);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    padding: 8px 16px;
    color: var(--text-secondary);
}

.pagination .page-num-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
}

.pagination .page-num-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.score-bar {
    height: 8px;
    background: var(--bg-gray);
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.score-fill.high {
    background: var(--success-color);
}

.score-fill.medium {
    background: var(--warning-color);
}

.score-fill.low {
    background: var(--error-color);
}

.score-value {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.upload-icon {
    font-size: 28px;
    margin-bottom: 6px;
    color: var(--primary-color);
}

.file-list {
    margin-top: 24px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-item-name {
    font-weight: 500;
}

.file-item-size {
    color: var(--text-secondary);
    font-size: 12px;
}

.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar input,
.filter-bar select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 200px;
}

/* 用户权限管理：筛选栏（搜索 + 角色/部门/状态下拉 + 操作按钮） */
.user-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.user-filter-bar input[type="text"],
.user-filter-bar input[type="search"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-width: 220px;
    font-size: 14px;
}
.user-filter-bar select {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-width: 130px;
    font-size: 14px;
    background: var(--bg-white);
}
.user-filter-bar .uf-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.user-filter-bar .uf-btn {
    width: auto;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 14px;
}
.user-filter-bar .uf-btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.user-filter-bar .uf-btn-primary:hover { opacity: 0.92; }
.user-filter-bar .uf-btn-ghost {
    background: var(--bg-white);
    color: var(--text-primary);
}
.user-filter-bar .uf-btn-ghost:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-section {
    background: var(--bg-white);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    min-width: 140px;
}

.card-desc {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    line-height: 1.5;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    user-select: none;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 20px;
    background: var(--bg-gray);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 12px;
}

.filter-control {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    background: var(--bg-white);
    transition: all 0.2s;
    min-width: 150px;
}

.filter-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.filter-control::placeholder {
    color: var(--text-light);
}

.filter-search {
    min-width: 220px;
}

.filter-clear-btn {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-clear-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chart-container {
    height: 300px;
    margin-top: 20px;
}

.rejection-modal {
    max-width: 500px;
}

.rejection-modal textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    resize: vertical;
    margin-top: 12px;
}

.candidate-detail {
    padding: 20px 0;
}

.candidate-section {
    margin-bottom: 24px;
}

.candidate-section h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.score-item {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius-md);
}

.score-item-label {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}

.score-item-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.score-item-reason {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 12px;
    margin: 4px;
    color: var(--text-secondary);
}

.tag.required {
    background: #FFF2F0;
    color: var(--error-color);
}

.tag.preferred {
    background: #FFFBE6;
    color: var(--warning-color);
}

.progress-bar {
    height: 24px;
    background: var(--bg-gray);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.progress-bar.small {
    height: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 9999px;
    transition: width var(--transition-slow);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 1;
}

.ai-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.ai-loading-content {
    background: white;
    padding: 48px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.ai-loading-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.ai-loading-text {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.ai-loading-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-gray);
    border-radius: 4px;
    overflow: hidden;
}

.ai-loading-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    animation: aiProgressLoop 10s linear infinite;
}

@keyframes aiProgressLoop {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

#resumes-table th:nth-child(1),
#resumes-table td:nth-child(1) {
    width: 25%;
}

#resumes-table th:nth-child(2),
#resumes-table td:nth-child(2) {
    width: 15%;
}

#resumes-table th:nth-child(3),
#resumes-table td:nth-child(3) {
    width: 10%;
}

#resumes-table th:nth-child(4),
#resumes-table td:nth-child(4) {
    width: 8%;
}

#resumes-table th:nth-child(5),
#resumes-table td:nth-child(5) {
    width: 12%;
}

#resumes-table th:nth-child(6),
#resumes-table td:nth-child(6) {
    width: 8%;
}

#resumes-table th:nth-child(7),
#resumes-table td:nth-child(7) {
    width: 10%;
}

#resumes-table th:nth-child(8),
#resumes-table td:nth-child(8) {
    width: 20%;
}

#jobs-table th:nth-child(1),
#jobs-table td:nth-child(1) {
    width: 10%;
}

#jobs-table th:nth-child(2),
#jobs-table td:nth-child(2) {
    width: 15%;
}

#jobs-table th:nth-child(3),
#jobs-table td:nth-child(3) {
    width: 35%;
}

#jobs-table th:nth-child(4),
#jobs-table td:nth-child(4) {
    width: 10%;
}

#jobs-table th:nth-child(5),
#jobs-table td:nth-child(5) {
    width: 10%;
}

#jobs-table th:nth-child(6),
#jobs-table td:nth-child(6) {
    width: 20%;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }

    .content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .score-grid {
        grid-template-columns: 1fr;
    }
}

/* Chat Layout */
.chat-layout {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 180px);
    gap: 24px;
}

.chat-main-full {
    flex: 1;
    width: 100%;
    min-width: 800px;
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-height: calc(100vh - 180px);
    max-width: none;
}

.chat-sidebar {
    width: 280px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
}

.conversation-list {
    flex: 1;
    min-height: 400px;
    overflow-y: auto;
    padding: 12px;
}

.conversation-item {
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: var(--bg-light);
}

.conversation-item.active {
    background: var(--bg-light);
    border-left: 3px solid var(--primary-color);
}

.conversation-item.pinned .conversation-title {
    font-weight: 600;
}

.conversation-title {
    font-weight: 500;
    font-size: 14px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.conversation-delete-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.conversation-delete-btn:hover {
    background: var(--error-color);
    color: white;
}

.empty-conversation-list {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.chat-main {
    flex: 1;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-size: 18px;
    font-weight: 600;
}

.model-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    min-height: 300px;
    width: 100% !important;
    max-width: 100% !important;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

.message {
    display: flex;
    gap: 16px;
    max-width: 85%;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-text {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-light);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message.user .message-text {
    background: var(--primary-color);
    color: white;
}

.message-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.attach-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.attach-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.token-btn {
    width: 56px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}

.token-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.token-btn.warning {
    border-color: var(--warning-color);
    color: var(--warning-color);
    background: var(--warning-light);
}

.token-btn.warning:hover {
    border-color: #D97706;
    color: #D97706;
}

.token-percent {
    display: inline-block;
}

.token-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    white-space: pre-wrap;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
}

.token-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-primary);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.send-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.send-btn:hover {
    background: var(--secondary-color);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 8px 12px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Agents Grid */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
    flex: 1;
}

.agent-card {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.agent-card:hover:not(.disabled) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.agent-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 智能体卡片右上角工作流图标按钮：复用 .workflow-icon-btn 基础样式 + 绝对定位到卡片右上角 */
.agent-workflow-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    font-size: 17px;
    z-index: 2;
}

.agent-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.agent-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.agent-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* Page Content Fill */
.page-content-fill {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* App Body */
.app-body {
    display: flex;
    min-height: calc(100vh - 64px);
    width: 100%;
}

/* Ensure sidebar has fixed width in app-body (index.html) */
.app-body > .sidebar {
    flex-shrink: 0;
    position: relative;
    top: 0;
    height: 100vh;
    overflow-y: hidden;
}

/* Ensure content fills remaining space in app-body (index.html) */
.app-body > .content {
    flex: 1;
    margin-left: 0 !important;
}

/* Kanban Board Styles */
.kanban-board-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 400px;
}

.kanban-column-wrapper {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
    background: #F5F7FA;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-column-header-blocked {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.kanban-column-header-done {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.kanban-column-icon {
    font-size: 18px;
}

.kanban-column-title {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.kanban-column-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.kanban-column-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    min-height: 200px;
}

.kanban-column-empty {
    text-align: center;
    padding: 32px 16px;
    color: #999;
    font-size: 14px;
}

.kanban-task-card {
    background: white;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: grab;
    transition: all 0.2s;
    position: relative;
}

.kanban-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.kanban-task-card:active {
    cursor: grabbing;
}

.kanban-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.kanban-task-title {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.kanban-task-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.kanban-task-type {
    font-size: 11px;
    padding: 2px 8px;
    background: #E8ECF1;
    color: #666;
    border-radius: 4px;
    flex-shrink: 0;
}

.kanban-task-hours {
    font-size: 11px;
    font-weight: 600;
    color: #667eea;
    background: #E8F0FE;
    padding: 2px 6px;
    border-radius: 4px;
}

.kanban-task-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kanban-task-footer {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #888;
}

.kanban-task-assignee {
    display: flex;
    align-items: center;
}

.kanban-task-due {
    display: flex;
    align-items: center;
}

.kanban-task-hours {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 11px;
    font-weight: 600;
    color: #667eea;
    background: #E8F0FE;
    padding: 2px 6px;
    border-radius: 4px;
}

.kanban-stat-badge {
    font-size: 12px;
    padding: 6px 12px;
    background: #E8ECF1;
    border-radius: 20px;
    color: #666;
}

.kanban-stat-todo {
    background: #FFF2F0;
    color: #F5222D;
}

.kanban-stat-progress {
    background: #FFFBE6;
    color: #FAAD14;
}

.kanban-stat-done {
    background: #F6FFED;
    color: #52C41A;
}

.kanban-stat-blocked {
    background: #FFF0F6;
    color: #EB2F96;
}

.kanban-stat-verify {
    background: #E6F7FF;
    color: #1890FF;
}

.kanban-column-header-verify {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== Prompt Management Styles ===== */
.prompt-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.prompt-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

/* Prompt tags above input */
.prompt-tags-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    overflow: hidden;
    position: relative;
}

.prompt-tags-bar.expanded {
    flex-wrap: wrap;
    overflow: visible;
}

.prompt-tags-container {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    overflow: hidden;
    flex: 1;
}

.prompt-tags-bar.expanded .prompt-tags-container {
    flex-wrap: wrap;
    overflow: visible;
}

.prompt-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid #d0d5dd;
    background: #f0f4ff;
    color: #333;
    flex-shrink: 0;
}

.prompt-tag:hover {
    background: #d0e0ff;
    border-color: var(--primary-color);
}

.prompt-tag.group-tag {
    background: #fff3e0;
    border-color: #ffb74d;
}

.prompt-tag.group-tag:hover {
    background: #ffe0b2;
}

.prompt-tag .tag-count {
    margin-left: 4px;
    font-size: 10px;
    color: #888;
}

.prompt-expand-btn {
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.prompt-expand-btn:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Prompt management modal */
.prompt-modal-content {
    width: 90vw !important;
    height: 90vh !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.prompt-modal-content #modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.prompt-modal-content .modal-close {
    display: none;
}

.prompt-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.prompt-modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.prompt-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.prompt-header-btn {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prompt-header-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.prompt-header-btn:active {
    transform: translateY(0);
}

.prompt-header-btn-primary {
    background: var(--primary-color);
    color: white;
}

.prompt-header-btn-primary:hover {
    background: var(--primary-dark);
}

.prompt-header-btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.prompt-header-btn-secondary:hover {
    background: #0891b2;
}

.org-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.org-action-icon:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

.org-action-delete:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.prompt-header-btn-close {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
}

.prompt-header-btn-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.prompt-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    min-height: 0;
}

/* 紧凑模式：每个卡片单行显示，内容省略号 */
.prompt-list.compact .prompt-item {
    align-items: center;
    padding: 8px 16px;
}

.prompt-list.compact .prompt-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.prompt-list.compact .prompt-item-title {
    margin-bottom: 0;
    flex-shrink: 0;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prompt-list.compact .prompt-item-text {
    -webkit-line-clamp: 1;
    flex: 1;
}

.prompt-list.compact .prompt-item-meta {
    display: none;
}

/* 提示词组选择器 */
.prompt-selector {
    display: flex;
    gap: 12px;
}

.prompt-selector-panel {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.prompt-selector-panel-header {
    padding: 8px 12px;
    background: var(--bg-light);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.prompt-selector-list {
    flex: 1;
    overflow-y: auto;
    max-height: 240px;
    min-height: 120px;
}

.prompt-selector-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    transition: background 0.15s;
}

.prompt-selector-item:hover {
    background: var(--bg-light);
}

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

.prompt-selector-item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prompt-selector-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.prompt-selector-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}

.prompt-selector-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.prompt-selector-btn.remove:hover {
    background: var(--error-color);
    border-color: var(--error-color);
}

.prompt-selector-empty {
    padding: 24px 12px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

.prompt-modal-section {
    margin-bottom: 24px;
}

.prompt-modal-section h3 {
    font-size: 15px;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.prompt-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prompt-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    transition: all 0.2s;
}

.prompt-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.prompt-item-content {
    flex: 1;
    min-width: 0;
}

.prompt-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prompt-item-type {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e3f2fd;
    color: #1565c0;
}

.prompt-item-type.group {
    background: #fff3e0;
    color: #e65100;
}

.prompt-item-text {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.prompt-item-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.prompt-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.prompt-item-actions button {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.prompt-item-actions button:hover {
    background: var(--bg-light);
}

.prompt-item-actions .btn-delete:hover {
    background: #fee;
    border-color: #f5c6cb;
    color: #dc3545;
}

.prompt-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    backdrop-filter: blur(2px);
}

.prompt-form-dialog {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.prompt-form-dialog h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
}

.prompt-form-dialog .form-group {
    margin-bottom: 16px;
}

.prompt-form-dialog label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
}

.prompt-form-dialog input[type="text"],
.prompt-form-dialog textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
}

.prompt-form-dialog textarea {
    min-height: 100px;
    resize: vertical;
}

.prompt-form-dialog input:focus,
.prompt-form-dialog textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.prompt-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: #fafafa;
}

.prompt-checkbox-list label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    padding: 4px 0;
    cursor: pointer;
}

.prompt-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.prompt-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}

.prompt-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.prompt-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.prompt-tab {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    background: none;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.prompt-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

/* ===== Note Agent Styles ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-white);
}

/* Markdown Preview Styles */
.note-content-preview {
    margin-top: 12px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    line-height: 1.8;
    white-space: pre-wrap;
}

.note-content-preview h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 4px;
}

.note-content-preview h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin: 12px 0 6px;
    color: var(--text-primary);
}

.note-content-preview p {
    margin: 8px 0;
}

.note-content-preview ul,
.note-content-preview ol {
    margin: 8px 0;
    padding-left: 24px;
}

.note-content-preview li {
    margin: 4px 0;
}

.note-content-preview strong {
    font-weight: 600;
    color: var(--text-primary);
}

.note-content-preview em {
    font-style: italic;
}

.note-content-preview code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

.note-content-preview pre {
    background: rgba(0, 0, 0, 0.08);
    padding: 12px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 8px 0;
}

.note-content-preview pre code {
    background: none;
    padding: 0;
    font-size: 0.85em;
    line-height: 1.5;
}

.note-content-preview a {
    color: var(--primary-color);
    text-decoration: none;
}

.note-content-preview a:hover {
    text-decoration: underline;
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.note-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 130, 246, 0.3);
}

.note-card.selected {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.03);
}

.note-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.note-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.note-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.lang-indicator {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #e3f2fd;
    color: #1565c0;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-indicator:hover {
    background: #bbdefb;
}

.note-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.note-summary {
    font-size: 13px;
    color: var(--text-secondary);
    background: #f5f7fa;
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.note-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    padding: 4px 10px;
    background: #e8f0fe;
    color: #3b82f6;
    border-radius: 12px;
    font-size: 12px;
}

.note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

.note-todos {
    display: flex;
    align-items: center;
    gap: 4px;
}

.note-actions {
    display: flex;
    gap: 6px;
}

/* Knowledge Grid */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.knowledge-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.knowledge-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 130, 246, 0.3);
}

.knowledge-card.selected {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.03);
}

.knowledge-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.doc-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.doc-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.doc-info {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.doc-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.doc-summary {
    font-size: 13px;
    color: var(--text-secondary);
    background: #f5f7fa;
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.doc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

.doc-actions {
    display: flex;
    gap: 6px;
}

/* Meeting List */
.meeting-list {
    margin-top: 20px;
}

.meeting-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

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

.meeting-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.meeting-header h3 {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.meeting-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.meeting-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.meeting-participants {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.meeting-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.meeting-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

.meeting-todos {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meeting-actions {
    display: flex;
    gap: 6px;
}

/* Meeting View Tabs */
.meeting-view-tabs {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.view-tab {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.view-tab:hover {
    background: var(--bg-light);
}

.view-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Calendar Views */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.calendar-month {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.calendar-day:hover {
    background: var(--bg-light);
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.has-meeting {
    background: rgba(59, 130, 246, 0.1);
}

.calendar-day.has-meeting:hover {
    background: rgba(59, 130, 246, 0.2);
}

.day-number {
    font-size: 14px;
    color: var(--text-primary);
}

.meeting-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
}

/* Week View */
.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.calendar-day-column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-light);
}

.calendar-day-column:last-child {
    border-right: none;
}

.day-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.day-content {
    flex: 1;
    padding: 8px;
    min-height: 200px;
}

.mini-meeting {
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    padding: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-meeting:hover {
    background: rgba(59, 130, 246, 0.2);
}

.mini-meeting strong {
    font-size: 12px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.mini-meeting span {
    font-size: 11px;
    color: var(--text-light);
}

/* Day View */
.day-meetings {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.day-meeting-item {
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.day-meeting-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.day-meeting-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.day-meeting-item span {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.day-meeting-item p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Year View */
.calendar-year {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.year-month {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.year-month:hover {
    background: rgba(59, 130, 246, 0.1);
}

.year-month.has-meeting {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.month-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.meeting-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* AI Actions */
.ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.ai-actions .btn-primary,
.ai-actions .btn-success {
    flex: 1;
    min-width: 140px;
}

/* Todo Items */
.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.todo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.todo-item span {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.todo-item span.completed {
    text-decoration: line-through;
    color: var(--text-light);
}

.todo-assignee,
.todo-due {
    font-size: 12px;
    color: var(--text-light);
    padding: 2px 8px;
    background: #f5f7fa;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Note Full Content */
.note-full-content pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    background: #f5f7fa;
    padding: 16px;
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
}

.meeting-full-content pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    background: #f5f7fa;
    padding: 16px;
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
}

.doc-full-content pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    background: #f5f7fa;
    padding: 16px;
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
}

/* Action Buttons */
.note-actions,
.knowledge-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

/* Small Button */
.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* Lang Toggle */
.lang-toggle {
    display: inline-block;
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.lang-toggle:hover {
    background: #bbdefb;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* Skill 详细内容 - 可折叠小标题区域 */
.skill-detail-section {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.skill-detail-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.skill-detail-hint {
    margin: 0 0 16px;
    font-size: 12px;
    color: var(--text-light);
}

/* 默认小标题 - 可折叠面板 */
.skill-detail-subsection {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}

.skill-detail-subsection summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition-normal);
    user-select: none;
}

.skill-detail-subsection summary:hover {
    background: #e2e8f0;
}

.skill-detail-subsection summary::-webkit-details-marker {
    display: none;
}

.skill-detail-subsection summary::after {
    content: '▸';
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform var(--transition-normal);
}

.skill-detail-subsection[open] summary::after {
    transform: rotate(90deg);
}

.skill-detail-subsection .subsection-body {
    padding: 16px;
}

/* Skill 列表卡片优化 */
.skill-list-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.skill-stat-card {
    flex: 1;
    min-width: 120px;
    padding: 14px 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-stat-icon {
    font-size: 24px;
}

.skill-stat-info .skill-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.skill-stat-info .skill-stat-label {
    font-size: 12px;
    color: var(--text-light);
}

.skill-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.skill-name-text {
    font-weight: 600;
    color: var(--text-primary);
}

.skill-desc-text {
    font-size: 12px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}

.skill-badges {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.skill-status-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.skill-fav-star {
    color: #f59e0b;
    cursor: pointer;
}

.skill-usage-cell {
    font-size: 13px;
    color: var(--text-secondary);
}

.skill-usage-cell .skill-version {
    color: var(--text-light);
    margin-left: 4px;
}

/* ============ 衡筹预算编制智能体 专用样式 ============ */

/* 登录页专属背景 */
.login-container.login-page-budget {
    --login-bg-image: url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=corporate%20budget%20planning%20financial%20dashboard%20charts%20green%20teal%20professional%20spreadsheet%20analysis%20growth%20bar%20graph&image_size=landscape_16_9');
}

/* 统计卡片内部结构（图标+信息），仅作用于带图标结构的卡片，避免污染全局统计卡 */
.stat-card:has(.stat-icon) {
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}
.stat-info {
    flex: 1;
    min-width: 0;
}
.stat-info .stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}
.stat-info .stat-sub {
    font-size: 12px;
    color: var(--text-light);
}

/* 仪表盘网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

/* 进度条列表 */
.progress-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.progress-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}
.progress-label .muted {
    color: var(--text-light);
}
.progress-bar {
    height: 8px;
    background: #eef2f7;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.4s ease;
}
.muted {
    color: var(--text-light);
    font-size: 13px;
}

/* 多智能体协作流程图 */
.agent-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}
.agent-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 96px;
    padding: 14px 10px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.agent-node .agent-icon {
    font-size: 26px;
}
.agent-node div:nth-child(2) {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.agent-node .muted {
    font-size: 11px;
}
.agent-arrow {
    font-size: 20px;
    color: var(--primary-color);
    font-weight: 700;
}

/* 智能体角色卡片网格 */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.agent-card-detail {
    padding: 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.agent-icon-big {
    font-size: 32px;
    margin-bottom: 8px;
}
.agent-card-detail h4 {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--text-primary);
}

/* AI 能力边界层级 */
.tier-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tier-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}
.tier-badge {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    flex-shrink: 0;
}
.tier-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.feature-list {
    margin: 8px 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.9;
}
.feature-list li {
    margin-bottom: 4px;
}

/* 利润表瀑布图 */
.waterfall {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
}
.waterfall-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.waterfall-item.negative {
    border-left-color: #e74c3c;
    color: #c0392b;
}
.waterfall-item.subtotal {
    background: rgba(39, 174, 96, 0.1);
    border-left-color: #27ae60;
    font-weight: 600;
}
.waterfall-item b {
    font-weight: 700;
}

/* 智能对话（衡筹版） */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    min-height: 420px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.chat-container .chat-messages {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}
.chat-container .chat-message {
    display: flex;
}
.chat-container .chat-message.user {
    justify-content: flex-end;
}
.chat-container .chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    line-height: 1.6;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.chat-container .chat-bubble.assistant {
    background: var(--bg-light);
    color: var(--text-primary);
    border-top-left-radius: 4px;
}
.chat-container .chat-bubble.user {
    background: var(--primary-color);
    color: #fff;
    border-top-right-radius: 4px;
}
.chat-container .chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-white);
}
.chat-container .chat-input {
    flex: 1;
    min-height: 72px;
    max-height: 180px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.55;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}
.chat-container .chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.08);
}
.chat-container .chat-input::placeholder {
    color: #aaa;
    font-size: 13px;
}
.chat-container .chat-send-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.chat-container .chat-send-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}
.chat-container .chat-send-btn:active {
    transform: translateY(0);
}
.chat-container .chat-send-btn .send-icon {
    font-size: 18px;
    line-height: 1;
}
.chat-container .chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 16px;
    border-top: none;
}
.chat-container .chat-suggestions .btn-secondary {
    font-size: 12px;
}

/* 报告内容 */
.report-content {
    background: #f8fafc;
    padding: 18px;
    border-radius: var(--radius-md);
    line-height: 1.8;
    font-size: 14px;
    color: var(--text-secondary);
    max-height: 420px;
    overflow-y: auto;
}

/* 表单行布局 */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.form-row .form-group {
    flex: 1;
    min-width: 180px;
}
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

/* 过滤栏（与全局规范一致，补全 budget 页面使用） */
.filter-section {
    background: var(--bg-white);
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.filter-label {
    font-size: 12px;
    color: var(--text-secondary);
}
.filter-control {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    min-width: 150px;
    outline: none;
    background: var(--bg-white);
}
.filter-control:focus {
    border-color: var(--primary-color);
}
.filter-search {
    min-width: 200px;
}
.filter-clear-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}

/* ============ 汇顾客户数据平台智能体 专用样式 ============ */

/* 登录页专属背景 */
.login-container.login-page-cdp {
    --login-bg-image: url('../img/cdp_login.png');
}

.login-container.login-page-ma {
    --login-bg-image: url('../img/ma_login.png');
}

/* 九诺衡澜现金流预测智能体系统登录页 */
.login-container.login-page-cash {
    --login-bg-image: url('../img/cash_login.png');
}

/* 九诺睿记知识管理智能体系统登录页 */
.login-container.login-page-km {
    --login-bg-image: url('../img/knowledge_login.png');
}

/* 个人笔记智能体登录页 */
.login-container.login-page-note {
    --login-bg-image: url('../img/note_login.png');
}

/* 行内"输入框+操作按钮"组合：修正全局 .btn-primary{width:100%} 在 flex 行内撑满的问题（如 AI快捷提问、客户360搜索） */
.cdp-inline-input {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cdp-inline-input > input[type="text"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-white, #fff);
}
.cdp-inline-input > button {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* 侧边栏分组标题 */
.nav-group-title {
    list-style: none;
    padding: 12px 20px 4px;
    font-size: 12px;
    color: var(--text-light, #8a93a6);
    letter-spacing: 1px;
    user-select: none;
}

/* AI 快捷提问对话气泡 */
.cdp-chat-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
}
.cdp-chat-msg {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 10px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
}
.cdp-chat-msg.user {
    align-self: flex-end;
    background: var(--primary-color, #3b6ef5);
    color: #fff;
}
.cdp-chat-msg.ai {
    align-self: flex-start;
    background: var(--bg-light, #f2f5fa);
    color: var(--text-dark, #2a3347);
}

/* 看板 KPI 卡片行 */
.cdp-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.cdp-kpi-card {
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 8px;
    padding: 16px;
    cursor: default;
}
.cdp-kpi-card .kpi-label {
    font-size: 13px;
    color: var(--text-light, #8a93a6);
    margin-bottom: 6px;
}
.cdp-kpi-card .kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark, #2a3347);
}
.cdp-kpi-card .kpi-change {
    font-size: 12px;
    margin-top: 4px;
    color: #23a06e;
}

/* MA KPI 横向标签条：单行紧凑排列，可容纳 8 个标签 */
.ma-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}
.ma-kpi-tag {
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    min-width: 0;
}
.ma-kpi-tag .ma-kpi-label {
    font-size: 11px;
    color: var(--text-light, #8a93a6);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ma-kpi-tag .ma-kpi-value {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark, #2a3347);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ma-kpi-tag .ma-kpi-sub {
    font-size: 10px;
    color: var(--text-light, #8a93a6);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ 九诺衡澜现金流预测智能体（cash）样式 ============ */
.cash-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}
.cash-kpi-tag {
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #e0e5f0);
    border-top: 3px solid #0277bd;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    min-width: 0;
}
.cash-kpi-tag .cash-kpi-label {
    font-size: 11px;
    color: var(--text-light, #8a93a6);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cash-kpi-tag .cash-kpi-value {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark, #2a3347);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cash-kpi-tag .cash-kpi-sub {
    font-size: 10px;
    color: var(--text-light, #8a93a6);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cash-bubble {
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.7;
    max-width: 85%;
}
.cash-bubble-role {
    font-size: 12px;
    color: var(--text-light, #8a93a6);
    margin-bottom: 4px;
}
.cash-bubble-user {
    background: #e1f5fe;
    border: 1px solid #b3e5fc;
    margin-left: auto;
}
.cash-bubble-assistant {
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #e0e5f0);
    border-left: 3px solid #0277bd;
}

/* cash 模块筛选栏（参照 ma-filter-bar，水蓝主题） */
.cash-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.cash-filter-bar .cash-filter-label {
    font-size: 13px;
    color: #5a6478;
    font-weight: 600;
    white-space: nowrap;
}
.cash-filter-bar select.input {
    width: 140px;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 6px;
}
.cash-filter-bar select.input:focus {
    outline: none;
    border-color: #0277bd;
    box-shadow: 0 0 0 3px rgba(2, 119, 189, 0.15);
}
.cash-filter-search {
    position: relative;
    flex: 1 1 200px;
    min-width: 180px;
}
.cash-filter-search::before {
    content: '🔎';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.65;
}
.cash-filter-search input[type="text"] {
    width: 100%;
    padding: 8px 12px 8px 32px;
    font-size: 13px;
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 6px;
    background: #fafbfd;
}
.cash-filter-search input[type="text"]:focus {
    outline: none;
    border-color: #0277bd;
    box-shadow: 0 0 0 3px rgba(2, 119, 189, 0.15);
    background: #fff;
}
.cash-filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.cash-filter-actions .btn-primary,
.cash-filter-actions .btn-secondary {
    width: auto;
    min-width: 64px;
}

/* cash 模块列表操作按钮（轻量胶囊式） */
.cash-act-group {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}
.cash-act {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.6;
    border-radius: 999px;
    border: 1px solid #cfd8e3;
    background: #fff;
    color: #46536b;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.cash-act:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(15, 40, 80, 0.12);
}
.cash-act-primary {
    color: #0277bd;
    border-color: #b3e0f7;
    background: #eaf6fd;
}
.cash-act-primary:hover {
    background: #0277bd;
    border-color: #0277bd;
    color: #fff;
}
.cash-act-danger {
    color: #c62828;
    border-color: #f3c1c1;
    background: #fdf1f1;
}
.cash-act-danger:hover {
    background: #c62828;
    border-color: #c62828;
    color: #fff;
}
.cash-act-success {
    color: #2e7d32;
    border-color: #bfe3c1;
    background: #f0f9f0;
}
.cash-act-success:hover {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

/* cash 趋势图容器与悬浮提示 */
.cash-chart-wrap {
    position: relative;
}
.cash-chart-tip {
    position: absolute;
    z-index: 20;
    min-width: 190px;
    max-width: 280px;
    background: rgba(21, 34, 56, 0.94);
    color: #eef3f9;
    font-size: 12px;
    line-height: 1.7;
    padding: 9px 12px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}
.cash-chart-tip-title {
    font-weight: 700;
    font-size: 13px;
    color: #7fd0ff;
    margin-bottom: 4px;
}
.cash-chart-tip-meta {
    margin-top: 4px;
    color: #9fb0c8;
    font-size: 11px;
}

/* cash 智能解释页面 */
.cash-explain-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fff;
}
.cash-explain-card:hover {
    border-color: #7fc4ea;
    box-shadow: 0 4px 12px rgba(2, 119, 189, 0.1);
}
.cash-explain-card.active {
    border-color: #0277bd;
    background: #f0f8ff;
    box-shadow: 0 0 0 2px rgba(2, 119, 189, 0.18);
}
.cash-explain-card .ec-icon {
    font-size: 24px;
    line-height: 1.2;
}
.cash-explain-card .ec-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}
.cash-explain-card .ec-desc {
    font-size: 12px;
    color: #8a93a6;
    line-height: 1.6;
}
.cash-explain-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}
.cash-explain-item {
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.cash-explain-item:hover {
    border-color: #7fc4ea;
    box-shadow: 0 3px 10px rgba(2, 119, 189, 0.08);
}

/* 历史解释卡片：每行 5 个（窄屏自动换行） */
.cash-explain-grid5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
@media (max-width: 1400px) {
    .cash-explain-grid5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 900px) {
    .cash-explain-grid5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.cash-explain-item.flash {
    background: #d9effd;
    border-color: #0277bd;
    box-shadow: 0 0 0 3px rgba(2, 119, 189, 0.25);
}

/* 解释标签选择胶囊（含重命名/删除工具） */
.cash-explain-mode-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #cfd8e3;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.cash-explain-mode-chip:hover {
    border-color: #7fc4ea;
    box-shadow: 0 2px 8px rgba(2, 119, 189, 0.12);
}
.cash-explain-mode-chip.active {
    background: #0277bd;
    border-color: #0277bd;
    color: #fff;
}
.cash-explain-mode-chip .chip-tool {
    opacity: 0.55;
    font-size: 12px;
    cursor: pointer;
    padding: 0 2px;
}
.cash-explain-mode-chip .chip-tool:hover {
    opacity: 1;
    transform: scale(1.15);
}
.cash-explain-mode-chip.active .chip-tool {
    opacity: 0.85;
}

/* ============ MA 对话输入条（AI助手/旅程建流/报告解读通用） ============ */
.ma-composer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 16px;
    background: var(--bg-white, #fff);
    border: 1.5px solid var(--border-color, #e0e5f0);
    border-radius: 24px;
    box-shadow: 0 1px 4px rgba(42, 51, 71, 0.06);
    transition: border-color .15s, box-shadow .15s;
}
.ma-composer:focus-within {
    border-color: #7b1fa2;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.12);
}
.ma-composer > input[type="text"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    padding: 9px 0;
    font-size: 14px;
    color: var(--text-dark, #2a3347);
}
.ma-composer > input[type="text"]::placeholder {
    color: #b0b7c3;
}
.ma-composer-btn {
    flex: 0 0 auto;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #7b1fa2 0%, #c2185b 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s, transform .1s;
}
.ma-composer-btn:hover {
    opacity: .9;
}
.ma-composer-btn:active {
    transform: scale(.97);
}

/* MA AI预算优化建议卡片 */
.ma-budget-tip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #fdf6ff;
    border: 1px solid #ecd6f5;
    border-left: 4px solid #7b1fa2;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
}
.ma-budget-tip .ma-budget-tip-text {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-dark, #2a3347);
}
.ma-budget-tip-btn {
    flex: 0 0 auto;
    width: auto;
    padding: 6px 18px;
    border: none;
    border-radius: 16px;
    background: #7b1fa2;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
}
.ma-budget-tip-btn:hover {
    opacity: .88;
}

/* ============ MA 胶囊标签页签（待办审批/模板市场/ROI看板） ============ */
.ma-tab-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: #f0f2f7;
    border-radius: 10px;
    margin-bottom: 16px;
}
.ma-tab-item {
    border: none;
    background: transparent;
    padding: 7px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #5a6478;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s, box-shadow .15s;
}
.ma-tab-item:hover {
    color: #7b1fa2;
}
.ma-tab-item.active {
    background: var(--bg-white, #fff);
    color: #7b1fa2;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(42, 51, 71, 0.14);
}
.ma-tab-count {
    display: inline-block;
    min-width: 18px;
    margin-left: 5px;
    padding: 1px 6px;
    border-radius: 9px;
    background: rgba(123, 31, 162, 0.1);
    color: #7b1fa2;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

/* MA 活动管理筛选栏 */
.ma-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ma-filter-bar .ma-filter-label {
    font-size: 13px;
    color: #5a6478;
    font-weight: 600;
    white-space: nowrap;
}
.ma-filter-bar select.input {
    width: 140px;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 6px;
}
.ma-filter-search {
    position: relative;
    flex: 1 1 200px;
    min-width: 180px;
}
.ma-filter-search > input[type="text"] {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-white, #fff);
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.ma-filter-search > input[type="text"]:focus {
    outline: none;
    border-color: #7b1fa2;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}
.ma-filter-search::before {
    content: '🔍';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: .6;
    pointer-events: none;
}
.ma-filter-btn {
    width: auto;
    padding: 8px 22px;
    border: none;
    border-radius: 6px;
    background: #7b1fa2;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
}
.ma-filter-btn:hover {
    opacity: .88;
}
.ma-filter-reset {
    width: auto;
    padding: 8px 16px;
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 6px;
    background: var(--bg-white, #fff);
    color: #5a6478;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, color .15s;
}
.ma-filter-reset:hover {
    border-color: #7b1fa2;
    color: #7b1fa2;
}

/* 简易条形图（纯CSS） */
.cdp-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cdp-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.cdp-bar-row .bar-label {
    width: 130px;
    text-align: right;
    color: var(--text-light, #8a93a6);
    flex-shrink: 0;
}
.cdp-bar-row .bar-track {
    flex: 1;
    background: var(--bg-light, #f2f5fa);
    border-radius: 4px;
    height: 18px;
    overflow: hidden;
}
.cdp-bar-row .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b6ef5, #23a6a0);
    border-radius: 4px;
}
.cdp-bar-row .bar-value {
    width: 70px;
    font-weight: 600;
}

/* 行内新建/筛选工具条：压缩 form-group 间距，首选项可伸缩，按钮不被全局 width:100% 拉伸 */
.cdp-create-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.cdp-create-bar .form-group {
    margin-bottom: 0;
}
.cdp-create-bar .form-group label {
    margin-bottom: 4px;
    font-size: 12px;
}
.cdp-create-bar .form-group input,
.cdp-create-bar .form-group select {
    width: auto;
    min-width: 110px;
    padding: 8px 10px;
    font-size: 13px;
}
.cdp-create-bar .form-group.grow {
    flex: 1 1 220px;
}
.cdp-create-bar .form-group.grow select {
    width: 100%;
}
.cdp-create-bar > button {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 18px;
}

/* 360视图头部 */
.cdp-customer-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #e0e5f0);
    border-radius: 8px;
    margin-bottom: 14px;
}
.cdp-customer-header .avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b6ef5, #23a6a0);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

/* 标签页（Tab） */
.cdp-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color, #e0e5f0);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.cdp-tab {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light, #8a93a6);
    border-bottom: 2px solid transparent;
}
.cdp-tab.active {
    color: var(--primary-color, #3b6ef5);
    border-bottom-color: var(--primary-color, #3b6ef5);
    font-weight: 600;
}

/* 评分进度条 */
.cdp-score-bar {
    display: inline-block;
    width: 80px;
    height: 8px;
    background: var(--bg-light, #f2f5fa);
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 6px;
}
.cdp-score-bar > span {
    display: block;
    height: 100%;
    border-radius: 4px;
}

/* ===================== LLM Token 用量 / 模型配置 弹窗 ===================== */
.modal-subtitle {
    color: var(--text-light);
    font-size: 13px;
    margin: 4px 0 18px;
    line-height: 1.6;
}

/* 全局按钮（.user-filter-bar 内仍沿用其局部样式） */
.uf-btn {
    width: auto;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 14px;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}
.uf-btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.uf-btn-primary:hover { opacity: 0.92; }
.uf-btn-ghost {
    background: var(--bg-white);
    color: var(--text-primary);
}
.uf-btn-ghost:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.btn-group .uf-btn,
td .uf-btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* 汇总卡片网格 */
.tu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.tu-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tu-card-total {
    background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(139,92,246,0.06));
    border-color: rgba(59,130,246,0.3);
}
.tu-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.tu-card-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}
.tu-tag {
    flex-shrink: 0;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(139,92,246,0.12);
    color: var(--accent-color);
    text-transform: uppercase;
}
.tu-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
}
.tu-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tu-metric span {
    font-size: 11px;
    color: var(--text-light);
}
.tu-metric b {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}
.tu-quota {
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
}
.tu-quota-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}
.tu-quota-line b { font-size: 15px; }
.tu-bar {
    height: 6px;
    background: var(--bg-gray);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0 6px;
}
.tu-bar > i {
    display: block;
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
}
.tu-quota-sub {
    font-size: 11px;
    color: var(--text-light);
}
.tu-ok { color: var(--success-color); }
.tu-danger { color: var(--error-color); }

/* 申请区 */
.tu-apply {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 20px;
}
.tu-apply h4 { font-size: 14px; margin-bottom: 10px; color: var(--text-primary); }
.tu-apply-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.tu-apply-form select,
.tu-apply-form input {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-white);
}
.tu-apply-form select { min-width: 220px; }
.tu-apply-form input[type="number"] { width: 160px; }
.tu-apply-form input[type="text"] { flex: 1; min-width: 180px; }
.tu-sec-title { font-size: 15px; margin: 4px 0 12px; color: var(--text-primary); }
.tu-req-title { font-size: 12px; color: var(--text-light); margin: 12px 0 6px; }
.tu-req-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    border-top: 1px dashed var(--border-color);
}
.tu-req-model { color: var(--text-secondary); word-break: break-all; }
.tu-req-amt { font-weight: 600; color: var(--primary-color); }
.tu-req-time { margin-left: auto; color: var(--text-light); font-size: 12px; white-space: nowrap; }

/* 明细/日志表格 */
.tu-table th,
.tu-table td { padding: 10px 10px; font-size: 13px; }
.tu-table th { text-transform: none; letter-spacing: 0; }
.tu-nowrap { white-space: nowrap; }
.tu-reqid { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-secondary); }
.tu-msg { max-width: 360px; color: var(--text-secondary); }
.tu-sub { font-size: 11px; color: var(--text-light); text-transform: uppercase; }

/* 模型配置：页签 */
.mc-tabs {
    display: flex;
    gap: 6px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 4px;
    margin-bottom: 18px;
    width: fit-content;
}
.mc-tab {
    padding: 8px 20px;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.mc-tab:hover { color: var(--primary-color); }
.mc-tab.active {
    background: var(--bg-white);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.mc-sub-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.mc-sub-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.mc-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}
.mc-num {
    width: 140px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
}


