: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.jpg');
    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.jpg） */
.login-container.login-page-resume {
    --login-bg-image: url('../img/resume_login.jpg');
}

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

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

.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.jpg');
}

.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: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
}
/* fixed header 补偿：所有 .main-container 都在 header 下方开始 */
/* 但 app.html 用的是 .app-body 包裹内容，已经有自己的 padding-top */
.main-container:not(:has(.app-body)) {
    padding-top: 64px;
    box-sizing: border-box;
}

.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-header.ph-smart .ph-btn-icon { display: none; }
.page-header.ph-smart .ph-btn-text { display: inline; }

.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-group:has(> .btn-icon-sm) {
    gap: 4px;
}

.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;
}

/* 统一的图标+文字操作按钮：PC 浏览器显示「图标+文字」，手机/平板（≤1024px）仅显示图标 */
.btn-ico-txt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    min-width: auto;
    padding: 5px 10px;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-ico-txt .btn-ico {
    font-size: 14px;
    line-height: 1;
}
@media (max-width: 1024px) {
    .btn-ico-txt .btn-txt {
        display: none;
    }
    .btn-ico-txt {
        padding: 5px 8px;
    }
}

.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;
}

/* 导出 Word 选项弹窗：占满窗口 99% */
.modal-content.export-word-modal {
    width: 99vw;
    height: 99vh;
    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;
}

/* PPT 页面全屏编辑器 */
.modal-content.deck-editor-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-content.deck-editor-modal #modal-body {
    flex: 1;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.deck-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}
.deck-editor-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.deck-editor-title-row h2 {
    margin: 0;
    font-size: 20px;
}
.deck-editor-body {
    flex: 1;
    display: flex;
    gap: 0;
    padding: 20px 24px;
    min-height: 0;
    overflow: hidden;
    position: relative;
}
.deck-editor-left {
    flex: 0 0 70%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 200px;
}
.deck-editor-splitter {
    flex: 0 0 8px;
    cursor: col-resize;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
}
.deck-editor-splitter:hover,
.deck-editor-splitter.dragging {
    background: #e5e7eb;
    border-radius: 4px;
}
.deck-editor-splitter::after {
    content: '';
    width: 3px;
    height: 40px;
    background: #d1d5db;
    border-radius: 2px;
}
.deck-editor-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    min-width: 240px;
    overflow: auto;
}
.deck-editor-pane-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}
.deck-editor-preview {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex: none;
}
.deck-editor-preview:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.deck-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

.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);
}

.toast.warning {
    background: #f59e0b;
}

@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);
}

/* ===== 用户权限管理：筛选栏图标化 + 高级筛选可收起（桌面） ===== */
.user-filter-bar.uf-bar-smart input.uf-search {
    flex: 1 1 220px;
    min-width: 200px;
}

/* 桌面端高级筛选透明参与同一行：搜索 + 角色 + 部门 + 状态 ... 操作按钮 */
.uf-bar-smart .uf-advanced {
    display: contents;
}

.uf-bar-smart .uf-actions .uf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
}

.uf-btn-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 漏斗「更多筛选」开关仅在窄屏显示 */
.uf-bar-smart .uf-actions .uf-btn-filter-toggle {
    display: none;
    position: relative;
}

.uf-toggle-dot {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    border: 1.5px solid #fff;
}

.uf-bar-smart .uf-btn-filter-toggle.is-active .uf-toggle-dot {
    display: block;
}

/* 空结果单元格 */
.users-empty-cell {
    text-align: center;
    color: var(--text-secondary);
    padding: 28px !important;
}

/* ===== 衡录系统筛选区：高级筛选项收起机制（桌面端透明参与同一行，漏斗隐藏） ===== */
.fs-smart .filter-adv {
    display: contents;
}

.fs-smart .fc-toggle {
    display: none;
    position: relative;
}

.fs-smart .filter-clear-btn .fc-ico {
    margin-right: 4px;
}

/* 周历/月历横向滑动容器（窄屏生效） */
.calendar-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 分页：上一页/下一页 图标+文字（窄屏仅图标），紧凑页码提示仅窄屏显示 */
.pg-simple .pg-step-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pg-step-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pg-simple .page-info-compact {
    display: none;
}

.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) {
    .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;
}

/* 发送按钮：桌面显示文字，移动端显示纸飞机图标（见文件末尾响应式区） */
.send-btn-icon {
    display: none;
}

/* 桌面端：功能按钮组透明参与 flex 布局，保持 附件→提示词→输入框→发送→Token 的顺序 */
.chat-tools {
    display: contents;
}

.chat-tools .tool-label {
    display: none;
}

#attach-btn {
    order: 1;
}

#prompt-manage-btn {
    order: 2;
}

.chat-input {
    order: 3;
}

.send-btn {
    order: 4;
}

#token-btn {
    order: 5;
}

/* 移动端「更多功能」按钮：桌面不显示 */
.chat-tools-toggle {
    display: none;
}

/* 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;
}

/* 智能体「简约标签模式」：图标+名称单行胶囊，自动换行，一屏可显示更多 */
.agents-view-toggle {
    flex-shrink: 0;
}

.agents-tags {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    align-content: flex-start;
}

.agent-tag {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    max-width: 100%;
    padding: 8px 15px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.agent-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.06);
}

.agent-tag-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.agent-tag-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 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.jpg');
}

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

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

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

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

/* 九诺汇呈演示文稿智能体系统登录页 */
.login-container.login-page-ppt {
    --login-bg-image: url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=professional%20business%20presentation%20slides%20on%20stage%20screen%2C%20consulting%20style%2C%20deep%20blue%20technology%20gradient%2C%20clean%20minimal%20corporate%2C%20soft%20glow%2C%20high%20end&image_size=landscape_16_9');
    background-size: cover;
    background-position: center;
}

/* 九诺甄文AIGC检测与优化智能体系统登录页 */
.login-container.login-page-aigc {
    --login-bg-image: url('../img/aigc_login.jpg');
    background-size: cover;
    background-position: center;
}

/* 行内"输入框+操作按钮"组合：修正全局 .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;
}

/* 配额管理：所有模型列（剩余Token / 剩余百分比） */
.mc-models {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 210px;
}
.mc-model-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
}
.mc-model-item.is-off { opacity: 0.5; }
.mc-model-name {
    flex: 1;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mc-model-remain {
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mc-model-pct {
    width: 44px;
    text-align: right;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mc-pct-low { color: var(--error-color); font-weight: 600; }

/* 日志表头排序 */
.tu-table th.tu-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.tu-table th.tu-sortable:hover { color: var(--primary-color); }
.tu-sort-arrow {
    margin-left: 4px;
    font-size: 10px;
    color: var(--text-light);
}
.tu-sort-arrow.active { color: var(--primary-color); font-weight: 700; }

/* ===================== 优化建议弹窗 ===================== */
.sg-form {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 18px;
}
.sg-form-handle {
    background: #FFF9EC;
    border-color: #F5D78E;
}
.sg-form h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.sg-form-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.sg-form-row > label {
    flex: 0 0 84px;
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 7px;
}
.sg-form-row input[type="text"],
.sg-form-row select,
.sg-form-row textarea {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-primary);
}
.sg-form-row textarea {
    resize: vertical;
    line-height: 1.5;
}
/* Storyline 选用资料列表 */
.story-mat-list {
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 12px;
    background: var(--bg-white);
}
.story-mat-item {
    padding: 9px 0;
    border-bottom: 1px dashed var(--border-color);
}
.story-mat-item:last-child {
    border-bottom: none;
}
.story-mat-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
}
.story-mat-row > input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}
.story-mat-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.story-mat-modes {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
/* 覆盖 .form-group label 的 display:block / margin-bottom */
.story-mat-list .story-mat-mode-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 3px 9px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-white);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all .15s;
}
.story-mat-list .story-mat-mode-label:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.story-mat-list .story-mat-mode-label.is-active {
    border-color: var(--primary-color);
    background: #eef2ff;
    color: var(--primary-color);
    font-weight: 500;
}
.story-mat-list .story-mat-mode-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}
.story-mat-summary {
    margin: 4px 0 0 23px;
    font-size: 12px;
    line-height: 1.5;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.story-mat-item.is-unchecked .story-mat-modes {
    opacity: .55;
}
.story-mat-empty {
    padding: 10px 0;
    font-size: 13px;
    color: #9ca3af;
}
.sg-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    padding-left: 94px;
}
.sg-mine {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}
.sg-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--bg-card);
    transition: box-shadow var(--transition-fast);
}
.sg-item:hover {
    box-shadow: var(--shadow-sm);
}
.sg-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.sg-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    word-break: break-word;
}
.sg-item-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 8px;
}
.sg-item-handle {
    font-size: 12.5px;
    color: var(--text-secondary);
    background: var(--bg-light);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 8px 10px;
    margin-bottom: 8px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.sg-item-handle b {
    color: var(--text-primary);
}
.sg-item-handledby {
    color: var(--text-light);
}
.sg-item-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.sg-item-meta {
    font-size: 12px;
    color: var(--text-light);
}
.sg-item-feature {
    color: var(--text-secondary);
    font-weight: 600;
}
.sg-mine-tag {
    color: var(--primary-color);
    font-weight: 600;
}
.sg-item-actions {
    flex-shrink: 0;
}
.sg-noaction {
    font-size: 12px;
    color: var(--text-muted);
}

/* 表单头部：标题 + 右上角折叠图标 */
.sg-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.sg-form-head h4 {
    margin: 0;
}
.sg-collapse-btn {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.sg-collapse-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--bg-light);
}
.sg-form-body.collapsed {
    display: none;
}

/* 优先级标签（实心胶囊，与类型/状态徒章区分） */
.sg-pri {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 1px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    color: #fff;
}
.sg-pri-urgent {
    background: var(--error-color);
}
.sg-pri-high {
    background: var(--warning-color);
}
.sg-pri-medium {
    background: var(--secondary-color);
}
.sg-pri-low {
    background: var(--text-light);
}

/* ========== 汇总纪要特有样式 ========== */
.summary-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.summary-page-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}
.summary-page-header .summary-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.summary-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s;
}
.summary-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.summary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.summary-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}
.summary-card-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.summary-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.summary-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.summary-card-stats {
    margin-top: 10px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-secondary);
}
.summary-card-stats .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.summary-card-stats .stat-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

.summary-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
}
.summary-status-draft {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
}
.summary-status-locked {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}
.summary-status-completed {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

/* 汇总条目列表 */
.summary-entry-list {
    margin-top: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}
/* 汇总详情：卡片标题行 / 操作行（桌面横排，手机端换行堆叠） */
.summary-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.summary-entry-actions-row,
.summary-result-actions,
.summary-skill-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
/* 生成访谈纪要弹窗：Skill 查看/新增/编辑/复制 按钮行 */
.skill-act-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}
.summary-create-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.summary-entry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    flex-wrap: wrap;
}
.summary-entry-item:last-child {
    border-bottom: none;
}
.summary-entry-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.summary-entry-type {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    white-space: nowrap;
}
.summary-entry-type.upload {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}
.summary-entry-title {
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}
.summary-entry-interviewee,
.summary-entry-date {
    font-size: 12px;
    color: var(--text-secondary);
}
.summary-entry-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.summary-entry-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

/* 纪要 Markdown 预览面板 */
.summary-markdown-panel {
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.summary-markdown-panel summary {
    padding: 10px 16px;
    font-weight: 500;
    cursor: pointer;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.summary-markdown-panel summary::-webkit-details-marker {
    display: none;
}
.summary-markdown-panel summary::before {
    content: '▸';
    transition: transform 0.15s;
    display: inline-block;
}
.summary-markdown-panel[open] summary::before {
    transform: rotate(90deg);
}
.summary-markdown-body {
    padding: 16px;
    font-family: 'Consolas', 'Monaco', 'Menlo', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    font-size: 13px;
    max-height: 360px;
    overflow-y: auto;
    background: var(--bg-white);
    color: var(--text-primary);
}

/* 锁定/解锁按钮区域 */
.summary-lock-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin: 12px 0;
    flex-wrap: wrap;
    gap: 8px;
}
.summary-lock-bar.locked {
    background: rgba(245, 158, 11, 0.08);
}
.summary-lock-info {
    font-size: 13px;
    color: var(--text-secondary);
}
.summary-lock-info strong {
    color: var(--text-primary);
}

/* Skill 选择区 */
.summary-skill-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 12px 0;
    background: var(--bg-white);
}
.summary-skill-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.summary-skill-section-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.summary-skill-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.summary-skill-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-white);
}
.summary-skill-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 结果表格 */
.summary-result-section {
    margin-top: 20px;
}
.summary-result-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.summary-result-toolbar h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.summary-result-toolbar .toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.summary-result-filter {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    min-width: 180px;
}
.summary-result-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.summary-result-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.summary-result-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}
.summary-result-table th,
.summary-result-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.summary-result-table th {
    background: var(--bg-light);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
    color: var(--text-primary);
}
.summary-result-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}
.summary-result-table .row-index {
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}
.summary-result-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== 推理深挖：工具栏 + 单元格图标 + 详情弹窗 ===== */
.reasoning-toolbar {
    margin-bottom: 8px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.06), rgba(168, 85, 247, 0.04));
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: var(--radius-md);
}
.reasoning-toolbar .filter-row {
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
}
.reasoning-filter-row {
    flex-wrap: nowrap !important;
    white-space: nowrap;
}
.reasoning-filter-row .filter-group {
    flex-shrink: 0;
}
.reasoning-filter-row .filter-control {
    white-space: nowrap;
}
.reasoning-skill-group {
    flex-direction: row !important;
    align-items: center;
    gap: 4px;
    min-width: auto !important;
}
.reasoning-toolbar-title {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    margin-right: 4px;
}
.reasoning-selected-count {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.filter-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}
.reasoning-row-checkbox {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* 行选择列：锁定图标在上、勾选框在下 */
.summary-result-table td.summary-row-select {
    text-align: center;
    width: 48px;
    min-width: 48px;
    padding: 6px 4px;
}
.summary-row-select {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.row-id-label {
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: default;
    user-select: none;
}
.row-lock-toggle {
    font-size: 14px;
    line-height: 1;
    opacity: 0.5;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.row-lock-toggle:hover {
    opacity: 1;
    transform: scale(1.15);
}
.row-lock-toggle.is-locked {
    opacity: 0.95;
}

/* 锁定行：整行置灰，单元格不可编辑 */
.summary-result-table tbody tr.row-locked td {
    background: rgba(120, 120, 130, 0.08);
    color: var(--text-secondary);
}
.summary-result-table tbody tr.row-locked:hover td {
    background: rgba(120, 120, 130, 0.12);
}

/* 推理深挖生成期间：整表置灰且禁止编辑类交互（行勾选框仍可用） */
.summary-result-table.is-reasoning-busy tbody {
    opacity: 0.55;
}
.summary-result-table.is-reasoning-busy td.cell-editable,
.summary-result-table.is-reasoning-busy .row-lock-toggle,
.summary-result-table.is-reasoning-busy .reasoning-icon {
    pointer-events: none;
    cursor: default;
}
.summary-result-table.is-reasoning-busy td.cell-editable:hover {
    background: transparent;
    box-shadow: none;
}

/* 可编辑单元格 */
.summary-result-table td.cell-editable {
    cursor: text;
    transition: background 0.12s ease, box-shadow 0.12s ease;
}
.summary-result-table td.cell-editable:hover {
    background: rgba(59, 130, 246, 0.08);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}
.summary-result-table td.cell-editing {
    padding: 4px 6px;
    background: #fff;
    box-shadow: inset 0 0 0 2px #6366f1;
}
.summary-cell-editor {
    width: 100%;
    min-width: 180px;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    background: #fff;
    resize: vertical;
    outline: none;
}
.reasoning-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.reasoning-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}
.reasoning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-secondary);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
    position: relative;
}
.reasoning-tip {
    position: fixed;
    z-index: 10000;
    padding: 8px 12px;
    background: rgba(30, 30, 40, 0.95);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    min-width: 240px;
    max-width: 720px;
    border-radius: 6px;
    pointer-events: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.reasoning-icon:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
}
.reasoning-icon-selected {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.35);
}
.reasoning-detail-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--bg-card);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.reasoning-detail-selected {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.04);
}
.reasoning-detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.reasoning-detail-icon {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.reasoning-detail-rootcause,
.reasoning-detail-suggestions {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.reasoning-detail-suggestions ul {
    margin: 4px 0 0;
    padding-left: 20px;
}
.reasoning-detail-suggestions li {
    margin-bottom: 2px;
}
.reasoning-detail-cells {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}
.reasoning-detail-cell {
    display: flex;
    gap: 6px;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 4px;
}
.reasoning-detail-cell-label {
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 70px;
}
.reasoning-detail-cell-value {
    color: var(--text-primary);
    word-break: break-word;
    white-space: pre-wrap;
}

/* 汇总模态框 */
.summary-modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px;
}
.summary-modal-section {
    margin-bottom: 20px;
}
.summary-modal-section h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.summary-modal-section .section-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 笔记选择下拉 */
.summary-note-options {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-top: 8px;
}
.summary-note-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
    flex-wrap: wrap;
}
.summary-note-option:last-child {
    border-bottom: none;
}
.summary-note-option input[type="checkbox"] {
    margin-right: 8px;
}
.summary-note-option-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.summary-note-option-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

/* 上传区 */
.summary-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    margin-top: 8px;
    transition: border-color 0.15s, background 0.15s;
}
.summary-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.04);
}
.summary-upload-area input[type="file"] {
    display: none;
}
.summary-upload-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 按钮辅助色 */
.summary-btn {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
    white-space: nowrap;
}
.summary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.summary-btn-primary {
    background: var(--primary-color);
    color: #fff;
}
.summary-btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}
.summary-btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.summary-btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
}
.summary-btn-danger {
    background: #ef4444;
    color: #fff;
}
.summary-btn-danger:hover:not(:disabled) {
    background: #dc2626;
}
.summary-btn-warning {
    background: #f59e0b;
    color: #fff;
}
.summary-btn-warning:hover:not(:disabled) {
    background: #d97706;
}
.summary-btn-success {
    background: #22c55e;
    color: #fff;
}
.summary-btn-success:hover:not(:disabled) {
    background: #16a34a;
}
.summary-btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* AI 生成标识 */
.summary-ai-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
}
.summary-ai-badge.ai {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}
.summary-ai-badge.fallback {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
}

/* 空状态 */
.summary-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}
.summary-empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}
.summary-empty-state p {
    margin: 0 0 16px 0;
    font-size: 14px;
}

/* ========== Skill 查看弹窗 & 内置保护标识 ========== */
.info-message {
    color: var(--primary-dark);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    text-align: left;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.skill-view-body {
    margin-top: 12px;
}
.skill-view-field {
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    min-height: 20px;
    word-break: break-word;
}
.skill-view-detail {
    margin: 0;
    padding: 12px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 420px;
    overflow-y: auto;
    color: var(--text-primary);
}
.skill-builtin-protect {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: #d97706;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 10px;
    padding: 2px 8px;
    white-space: nowrap;
}

/* ========== 汇总生成设置（单/多 LLM 模式） ========== */
.gen-mode-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}
.gen-mode-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}
.gen-mode-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 6px;
}
.gen-panel {
    margin-bottom: 8px;
}
.gen-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 8px 0 6px;
}
.gen-model-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.gen-model-row .gen-label {
    margin: 0;
}
.gen-model-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.gen-model-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #fff;
    font-size: 13px;
}
.gen-model-chip.is-primary {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}
.gen-chip-star {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.gen-chip-remove {
    cursor: pointer;
    color: #ef4444;
    font-size: 12px;
    padding: 0 2px;
}
.gen-chip-quota {
    font-size: 11px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
}
.gen-chip-quota-zero {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}
.gen-quota-warn {
    margin: 10px 0 4px;
    padding: 8px 12px;
    font-size: 13px;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    line-height: 1.6;
}
.gen-add-row,
.gen-merge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.gen-merge-row .gen-label {
    margin: 0;
    white-space: nowrap;
}
.gen-status-list {
    margin: 12px 0 4px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-light);
}
.gen-status-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.gen-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
}
.gen-status-item.gen-status-merge {
    border-top: 1px dashed var(--border-color);
    margin-top: 6px;
    padding-top: 8px;
}
/* 生成失败原因条（持久展示于状态区，现存表格不受影响） */
.gen-status-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.08);
    font-size: 12.5px;
    line-height: 1.5;
    color: #dc2626;
}
.gen-status-error-icon {
    flex-shrink: 0;
    line-height: 1.5;
}
.gen-status-error-text {
    word-break: break-all;
}
.gen-status-name {
    color: var(--text-primary);
}
.gen-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.gen-badge-running {
    background: rgba(59, 130, 246, 0.14);
    color: #2563eb;
}
.gen-badge-done {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}
.gen-badge-error {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
}
.gen-badge-warn {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

/* ========== 模型配置中心（模型管理 / 智能体分配） ========== */
.lc-agent-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    background: var(--bg-white);
    overflow: hidden;
}
.lc-agent-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}
.lc-agent-body {
    padding: 12px 14px;
}
.lc-agent-group {
    margin-bottom: 8px;
}
.lc-agent-group:last-child {
    margin-bottom: 0;
}
.lc-group-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.lc-model-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.lc-model-opt {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
}
.lc-model-opt:hover {
    background: rgba(59, 130, 246, 0.06);
}
.lc-model-opt.lc-disabled {
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}
.lc-model-opt input[type="radio"] {
    accent-color: #f59e0b;
}

/* ============================================================
   移动端响应式适配（全站统一断点：平板/小屏笔记本 ≤1024px、手机 ≤767px；768px 竖屏平板归平板档）
   桌面端(>1024px)保持原有视觉与交互不变；规则按断点从大到小排列
   ============================================================ */

/* 抽屉式导航相关元素：桌面端默认隐藏 */
.sidebar-overlay {
    display: none;
}

.mobile-topbar {
    display: none;
}

/* 抽屉打开时锁定底层滚动 */
body.sidebar-drawer-open {
    overflow: hidden;
}

/* ------------------------------------------------------------
   断点一：平板及以下（≤1024px）——侧边栏改为 off-canvas 抽屉
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
    .main-container {
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* 固定视口高度：顶栏常驻，内容区内部滚动，避免整页把输入框顶出屏幕 */
    .app-body {
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
    }

    /* 移动端顶栏（含安全区留白） */
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
        height: calc(52px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 12px 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        color: #fff;
        position: sticky;
        top: 0;
        z-index: 900;
        box-shadow: var(--shadow-sm);
    }

    .sidebar-toggle-btn {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        border: none;
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-toggle-btn:active {
        background: rgba(255, 255, 255, 0.32);
    }

    .mobile-topbar-title {
        font-size: 16px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        text-align: center;
    }

    .topbar-back-btn {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .topbar-back-btn:active {
        background: rgba(255, 255, 255, 0.32);
    }

    /* 抽屉式侧边栏 */
    .app-body > .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        padding-left: env(safe-area-inset-left, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        z-index: 1100;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: none;
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        will-change: transform;
    }

    .app-body > .sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .app-body > .sidebar .sidebar-header {
        position: sticky;
        top: 0;
        z-index: 2;
        padding-top: calc(20px + env(safe-area-inset-top, 0px));
    }

    /* 抽屉遮罩 */
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 1050;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-normal);
    }

    .sidebar-overlay.visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* 主内容区占满顶栏以下的剩余高度，页面内容在本容器内滚动 */
    .app-body > .content {
        flex: 1 1 auto;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* 对话页：外层不滚，由消息区内部滚动，保证输入框常驻底部 */
    .app-body > .content.chat-page {
        overflow: hidden;
    }

    /* 对话页：去掉 800px 最小宽度，flex 撑满剩余高度 */
    .chat-main-full {
        min-width: 0;
        min-height: 0;
        flex: 1 1 auto;
    }

    .chat-header {
        flex-shrink: 0;
        padding: 14px 16px;
        gap: 8px;
    }

    .chat-title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .model-select {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 56%;
        padding: 8px 10px;
        font-size: 13px;
    }

    .chat-messages {
        min-height: 0;
        padding: 16px;
        gap: 16px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .message {
        max-width: 88%;
        gap: 10px;
    }

    .message-avatar {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }

    /* 输入区：常驻底部并预留手势条安全区 */
    .chat-input-area {
        flex-shrink: 0;
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .chat-input-wrapper {
        position: relative;
        gap: 8px;
    }

    .chat-input {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 40px;
        padding: 10px 14px;
    }

    /* 发送按钮：圆形图标按钮 */
    .send-btn {
        order: 0;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        line-height: 1;
        border-radius: 50%;
    }

    .send-btn-text {
        display: none;
    }

    .send-btn-icon {
        display: block;
        width: 19px;
        height: 19px;
        /* 纸飞机图形重心偏右上，向左下微调 1px 达到视觉居中 */
        transform: translate(-1px, 1px);
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* 更多功能开关（+ 按钮） */
    .chat-tools-toggle {
        order: 0;
        position: relative;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 1px solid var(--border-color);
        border-radius: 50%;
        background: var(--bg-white);
        cursor: pointer;
        transition: border-color 0.15s, background 0.15s;
    }

    .chat-tools-toggle::before,
    .chat-tools-toggle::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 16px;
        height: 2px;
        background: var(--text-secondary);
        border-radius: 1px;
        transform: translate(-50%, -50%);
        transition: transform 0.2s, background 0.2s;
    }

    .chat-tools-toggle::after {
        width: 2px;
        height: 16px;
    }

    .chat-tools-toggle.open {
        border-color: var(--primary-color);
        background: rgba(59, 130, 246, 0.08);
    }

    .chat-tools-toggle.open::before,
    .chat-tools-toggle.open::after {
        background: var(--primary-color);
        transform: translate(-50%, -50%) rotate(45deg);
    }

    /* 功能弹出菜单：附件 / 常用提示词 / 压缩对话 */
    .chat-tools {
        position: absolute;
        right: 0;
        bottom: calc(100% + 8px);
        z-index: 60;
        display: none;
        flex-direction: column;
        gap: 2px;
        min-width: 184px;
        padding: 8px;
        background: var(--bg-white);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
    }

    .chat-tools.open {
        display: flex;
    }

    .chat-tools .attach-btn,
    .chat-tools .prompt-btn,
    .chat-tools .token-btn {
        order: 0;
        width: 100%;
        height: auto;
        min-height: 44px;
        padding: 8px 12px;
        border: none;
        border-radius: var(--radius-md);
        background: transparent;
        box-shadow: none;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        font-weight: 400;
        color: var(--text-primary);
        cursor: pointer;
    }

    .chat-tools .attach-btn:hover,
    .chat-tools .prompt-btn:hover,
    .chat-tools .token-btn:hover {
        background: var(--bg-light);
        border: none;
    }

    .chat-tools .tool-icon {
        flex-shrink: 0;
        width: 22px;
        text-align: center;
        font-size: 18px;
    }

    .chat-tools .tool-label {
        display: inline;
        white-space: nowrap;
    }

    /* token 项：文字在左、百分比贴右 */
    .chat-tools #token-btn .tool-label {
        order: -1;
        margin-right: auto;
    }

    .chat-tools #token-btn .token-percent {
        font-size: 13px;
        color: var(--text-secondary);
    }

    .chat-tools #token-btn.warning .token-percent {
        color: var(--warning-color);
    }

    /* 智能体卡片两列排列 */
    .agents-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin-top: 16px;
    }

    .agent-card {
        padding: 20px;
    }

    /* 页头操作区换行，避免挤压 */
    .page-header {
        flex-wrap: wrap;
        padding: 16px;
        margin-bottom: 16px;
        gap: 12px;
    }

    /* 登录页背景改为 cover，竖屏不被 110% 缩放裁切 */
    .login-container {
        min-height: 100vh;
        min-height: 100dvh;
        background-size: cover;
        background-position: center center;
    }

    /* 宽表格横向惯性滚动 */
    .table-container {
        -webkit-overflow-scrolling: touch;
    }

    /* ---- 用户权限管理：卡片内边距收紧 ---- */
    .users-card {
        padding: 16px;
    }

    /* ---- 用户管理筛选栏：搜索常驻一行，高级筛选收起，按钮图标化 ---- */
    .uf-bar-smart {
        gap: 8px;
        padding: 12px;
        margin-bottom: 14px;
    }

    .user-filter-bar.uf-bar-smart input.uf-search {
        flex: 1 1 150px;
        min-width: 0;
        height: 40px;
        font-size: 16px;
    }

    .uf-bar-smart .uf-actions {
        flex: 0 0 auto;
        margin-left: 0;
        gap: 8px;
    }

    /* 高级筛选默认隐藏，展开时独占下一行 */
    .uf-bar-smart .uf-advanced {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 8px;
        padding-top: 2px;
    }

    .uf-bar-smart .uf-advanced.open {
        display: flex;
    }

    .uf-bar-smart .uf-advanced select {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding: 8px 12px;
        font-size: 16px;
    }

    /* 查询/重置/漏斗：40px 方形图标按钮 */
    .uf-bar-smart .uf-actions .uf-btn {
        width: 40px;
        height: 40px;
        padding: 0;
    }

    .uf-bar-smart .uf-actions .uf-btn .uf-btn-text {
        display: none;
    }

    .uf-bar-smart .uf-actions .uf-btn .uf-btn-icon {
        width: 18px;
        height: 18px;
    }

    .uf-bar-smart .uf-actions .uf-btn-filter-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-white);
        color: var(--text-secondary);
    }

    .uf-bar-smart .uf-actions .uf-btn-filter-toggle.is-active {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: rgba(59, 130, 246, 0.08);
    }

    .uf-bar-smart .uf-actions .uf-btn-filter-toggle .uf-toggle-dot {
        top: 7px;
        right: 7px;
    }

    /* 分页：窄屏收紧间距 */
    .pg-simple {
        gap: 6px;
        margin-top: 18px;
    }

    /* =========================================================
       九诺衡录访谈纪要智能体系统：顶栏隐藏 + 抽屉式侧边栏
       ========================================================= */
    .interview-app .header {
        display: none;
    }

    .interview-app .main-container .sidebar {
        top: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        will-change: transform;
        z-index: 1100;
        box-shadow: none;
        padding-left: env(safe-area-inset-left, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .interview-app .main-container .sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .interview-app .main-container .content {
        margin-left: 0;
        padding: 16px;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
    }

    /* =========================================================
       衡录系统筛选区：搜索常驻、高级筛选收起、按钮图标化
       ========================================================= */
    .filter-section.fs-smart {
        padding: 12px;
    }

    .filter-section.fs-smart .filter-row {
        gap: 8px;
    }

    .filter-section.fs-smart .fs-search {
        flex: 1 1 150px;
        min-width: 0;
    }

    .filter-section.fs-smart .fs-search .filter-control {
        width: 100%;
        min-width: 0;
        height: 40px;
    }

    .filter-section.fs-smart .filter-adv {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 8px;
        padding-top: 2px;
    }

    .filter-section.fs-smart .filter-adv.open {
        display: flex;
    }

    .filter-section.fs-smart .filter-adv .filter-group {
        min-width: 0;
    }

    .filter-section.fs-smart .filter-adv .filter-control {
        width: 100%;
        min-width: 0;
        height: 40px;
    }

    .filter-section.fs-smart .filter-adv .filter-group > label {
        display: block;
        margin-bottom: 4px;
    }

    .filter-section.fs-smart .filter-clear-btn {
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .filter-section.fs-smart .filter-clear-btn .fc-txt {
        display: none;
    }

    .filter-section.fs-smart .filter-clear-btn .fc-ico {
        font-size: 16px;
        line-height: 1;
        margin-right: 0;
    }

    .filter-section.fs-smart .fc-toggle {
        display: inline-flex;
        background: var(--bg-white);
        color: var(--text-secondary);
    }

    .filter-section.fs-smart.fs-active .fc-toggle,
    .filter-section.fs-smart .fc-toggle.is-active {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: rgba(59, 130, 246, 0.08);
    }

    .filter-section.fs-smart .fc-toggle .uf-toggle-dot {
        display: block;
        top: 7px;
        right: 7px;
    }

    /* =========================================================
       弹窗内通用筛选栏（Token用量 / 配额 / 优化建议）：补充控件
       ========================================================= */
    .uf-bar-smart .uf-advanced input[type="text"] {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding: 8px 12px;
        font-size: 16px;
    }

    .uf-bar-smart .uf-advanced .sg-mine {
        padding: 6px 2px;
    }

    /* 模型配置：页签/工具行窄屏可用 */
    .mc-sub-head {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    /* 周历/月历：保持单元格可读宽度，整体横向滑动 */
    .interview-app .calendar-scroll .calendar-grid-week {
        grid-template-columns: repeat(7, minmax(96px, 1fr));
        min-width: 720px;
    }

    .interview-app .calendar-scroll .calendar-grid-month {
        grid-template-columns: repeat(7, minmax(90px, 1fr));
        min-width: 680px;
    }
}

/* ------------------------------------------------------------
   断点二：手机（≤767px；768px 竖屏平板归平板档）——单列布局、弹窗全屏、触控尺寸优化
   ------------------------------------------------------------ */
@media (max-width: 767px) {

    /* 标题按钮图标化：手机端隐藏文字、按钮变方图标 */
    .page-header.ph-smart .btn-primary,
    .page-header.ph-smart .btn-secondary {
        min-width: 40px;
        width: 40px;
        height: 40px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        gap: 0;
    }
    .page-header.ph-smart .ph-btn-icon {
        display: inline-flex;
        font-size: 18px;
    }
    .page-header.ph-smart .ph-btn-text {
        display: none;
    }

    .app-body > .content {
        padding: 12px;
    }

    .chat-main-full {
        min-height: 0;
        border-radius: var(--radius-md);
    }

    .chat-messages {
        padding: 12px;
        gap: 14px;
    }

    .message {
        max-width: 92%;
    }

    .message-avatar {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    /* 智能体卡片单列排列 */
    .agents-grid {
        grid-template-columns: 1fr;
    }

    /* 简约标签：手机上更紧凑，一屏容纳更多 */
    .agents-tags {
        gap: 8px;
        margin-top: 14px;
    }

    .agent-tag {
        padding: 7px 12px;
        font-size: 13px;
    }

    /* ---- 通用表格转卡片列表（用户管理 / 弹窗明细 / 衡录系统） ---- */
    .users-card {
        padding: 12px;
    }

    .table-container.cards-table {
        overflow-x: visible;
    }

    .cards-table table,
    .cards-table tbody {
        display: block;
    }

    .cards-table thead {
        display: none;
    }

    .cards-table tbody tr {
        display: block;
        background: var(--bg-white);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 10px;
        padding: 2px 14px;
        box-shadow: var(--shadow-sm);
    }

    .cards-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .cards-table tbody td {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
        word-break: break-word;
    }

    .cards-table tbody td:last-child {
        border-bottom: none;
        padding-bottom: 12px;
    }

    .cards-table tbody td:first-child {
        padding-top: 12px;
    }

    .cards-table td[data-label] {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .cards-table td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 72px;
        color: var(--text-secondary);
        font-size: 12px;
        line-height: 1.7;
    }

    .cards-table td[data-label]:first-child {
        font-weight: 600;
    }

    /* 无标签列（如空状态行/纯内容行） */
    .cards-table tbody td:not([data-label]) {
        color: var(--text-secondary);
    }

    /* 徽章保持自然宽度不拉伸 */
    .cards-table td[data-label] .badge {
        flex: 0 0 auto;
    }

    /* 操作列按钮组自动换行 */
    .cards-table td[data-label="操作"] .btn-group {
        flex: 1 1 auto;
        flex-wrap: wrap;
    }

    /* 输入控件在卡片行内自然宽度 */
    .cards-table td[data-label] .mc-num {
        flex: 1 1 auto;
        min-width: 0;
    }

    .cards-table .users-empty-cell {
        display: block;
    }

    /* ---- 分页栏简化：仅 上一页 ‹ 第x/y页 › 下一页 ---- */
    .pg-simple {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
    }

    .pg-simple .page-num-btn,
    .pg-simple .page-info,
    .pg-simple .pg-step-text {
        display: none;
    }

    .pg-simple .page-info-compact {
        display: inline-block;
        flex: 1 1 auto;
        text-align: center;
        font-size: 13px;
        color: var(--text-secondary);
        white-space: nowrap;
    }

    .pg-simple .pg-step-btn {
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
    }

    .pg-simple .pg-step-icon {
        width: 18px;
        height: 18px;
    }

    /* 登录卡片收窄内边距 */
    .login-box {
        padding: 28px 22px;
        margin: 16px;
    }

    .login-title {
        font-size: 20px;
        margin-bottom: 22px;
    }

    /* 弹窗全屏化（smartqa/workflow 本身为零内边距容器，只改尺寸） */
    .modal-content,
    .modal-content.kanban-modal,
    .modal-content.requirement-modal {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0;
        padding: 20px 16px;
        padding-top: calc(20px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    .modal-content.smartqa-modal,
    .modal-content.workflow-modal {
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0;
    }

    .modal-close {
        top: calc(12px + env(safe-area-inset-top, 0px));
        right: 12px;
    }

    /* 表单操作按钮全宽并排/换行 */
    .form-actions {
        flex-wrap: wrap;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .form-actions .btn-success,
    .form-actions .btn-danger {
        width: 100%;
    }

    /* Toast 移到底部居中，避免与顶栏/刘海重叠 */
    .toast {
        top: auto;
        right: 16px;
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        left: 16px;
        text-align: center;
        animation: fadeIn 0.25s ease;
    }

    /* 输入框 16px 字号，防止 iOS Safari 聚焦时自动放大页面 */
    .form-group input,
    .form-group textarea,
    .form-group select,
    .chat-input,
    .model-select,
    .filter-control,
    .filter-bar input,
    .filter-bar select {
        font-size: 16px;
    }

    /* =========================================================
       九诺衡录系统：手机端收紧
       ========================================================= */
    .interview-app .main-container .content {
        padding: 12px;
    }

    /* 统计卡片 2 列（仪表盘 6 卡 / Skill 5 卡） */
    .interview-app .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 14px;
    }

    .interview-app .stat-card {
        padding: 14px;
    }

    .interview-app .stat-value {
        font-size: 22px;
    }

    .skill-list-stats {
        gap: 8px;
    }

    .skill-stat-card {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        padding: 10px 12px;
        gap: 8px;
    }

    /* 周/月历导航条允许换行 */
    .cal-nav {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    /* 周历：手机端改为纵向日卡堆叠，取消横向滚动 */
    .interview-app .calendar-scroll {
        overflow-x: visible;
    }
    .interview-app .calendar-scroll .calendar-grid-week {
        display: flex;
        flex-direction: column;
        min-width: 0;
        gap: 8px;
    }
    .interview-app .calendar-scroll .calendar-grid-week .calendar-cell {
        min-height: auto;
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 10px;
    }
    .interview-app .calendar-scroll .calendar-grid-week .calendar-cell-head {
        flex-shrink: 0;
        min-width: 64px;
        margin-bottom: 0;
        font-size: 13px;
    }
    .interview-app .calendar-scroll .calendar-grid-week .calendar-cell-body {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .interview-app .calendar-scroll .calendar-grid-week .calendar-card {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* 月历：手机端紧凑方格，只显示日期 + 数量徽标，隐藏内嵌卡片 */
    .interview-app .calendar-scroll .calendar-grid-month {
        grid-template-columns: repeat(7, 1fr);
        min-width: 0;
        gap: 2px;
    }
    .interview-app .calendar-scroll .calendar-grid-month .calendar-cell {
        min-height: 48px;
        padding: 3px 2px;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .interview-app .calendar-scroll .calendar-grid-month .calendar-cell-head {
        font-size: 11px;
        margin-bottom: 0;
    }
    .interview-app .calendar-scroll .calendar-grid-month .calendar-cell-head-only {
        font-size: 10px;
        padding: 2px;
    }
    .interview-app .calendar-scroll .calendar-grid-month .calendar-cell-body {
        display: none;
    }
    .interview-app .calendar-scroll .calendar-grid-month .calendar-cell-out .calendar-cell-head {
        color: #ccc;
    }

    /* =========================================================
       纪要分析 · 汇总详情：工具栏换行 / 下拉满宽 / 状态不挤压
       ========================================================= */
    /* 卡片标题独占一行，操作区换到下一行 */
    .interview-app .summary-card-head > h3 {
        flex: 1 1 100%;
    }
    .interview-app .summary-entry-actions-row,
    .interview-app .summary-result-actions {
        flex: 1 1 100%;
        row-gap: 8px;
    }
    .interview-app .summary-entry-actions-row .btn-secondary:not(.btn-icon-sm) {
        flex: 1 1 auto;
    }
    .interview-app .summary-result-actions .btn-primary {
        margin-left: auto;
    }

    /* Skill 选择行：下拉独占一行满宽，图标按钮留在下一行 */
    .interview-app .summary-skill-row .filter-control {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0 !important;
    }

    /* 单/多 LLM 模式：两个选项纵向堆叠，描述换行对齐 */
    .interview-app .gen-mode-row {
        gap: 10px;
        padding: 10px;
    }
    .interview-app .gen-mode-opt {
        flex: 1 1 100%;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .interview-app .gen-mode-desc {
        flex: 1 1 100%;
        margin: 2px 0 0 24px;
    }

    /* 模型下拉 / 添加行 / 合并 Skill 行：控件满宽堆叠 */
    .interview-app .gen-model-row,
    .interview-app .gen-add-row,
    .interview-app .gen-merge-row {
        align-items: stretch;
    }
    .interview-app .gen-model-row .filter-control,
    .interview-app .gen-add-row .filter-control,
    .interview-app .gen-merge-row .filter-control {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0 !important;
    }
    .interview-app .gen-merge-row .gen-label {
        flex: 1 1 100%;
    }
    .interview-app .gen-add-row .btn-secondary {
        flex: 1 1 100%;
    }

    /* 生成结果状态项允许换行，徽标靠右不挤压名称 */
    .interview-app .gen-status-item {
        flex-wrap: wrap;
        row-gap: 2px;
    }
    .interview-app .gen-badge {
        margin-left: auto;
    }

    /* 新建汇总表单按钮均分一行 */
    .interview-app .summary-create-actions {
        flex-wrap: wrap;
    }
    .interview-app .summary-create-actions .btn-primary,
    .interview-app .summary-create-actions .btn-secondary {
        flex: 1 1 auto;
    }

    /* =========================================================
       Token 用量弹窗：申请表单纵向全宽、申请记录换行
       ========================================================= */
    .tu-apply-form select,
    .tu-apply-form input {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0 !important;
        height: 40px;
    }

    .tu-apply-form .uf-btn,
    .tu-apply-form button {
        width: 100%;
        height: 40px;
    }

    .tu-req-item {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .tu-req-time {
        margin-left: 0;
        flex-basis: 100%;
    }

    /* 模型配置页签：三等分铺满 */
    .mc-tabs {
        width: 100%;
    }

    .mc-tab {
        flex: 1 1 0;
        padding: 8px 10px;
        text-align: center;
        white-space: nowrap;
    }

    /* 优化建议：表单与卡片在窄屏堆叠 */
    .sg-form-row {
        flex-direction: column;
        gap: 5px;
    }

    .sg-form-row > label {
        flex: none;
        padding-top: 0;
    }

    .sg-form-actions {
        padding-left: 0;
    }

    .sg-form-actions .uf-btn {
        flex: 1 1 auto;
    }

    .sg-item-head {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .sg-item-title {
        flex: 1 1 100%;
        order: -1;
    }
}

/* 录音上传中：循环推进的进度条（不确定进度，提示用户不要刷新/关闭页面） */
.upload-progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: #E5E7EB;
    border-radius: 999px;
    overflow: hidden;
}

.upload-progress-bar > span {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary-color) 100%);
    animation: uploadProgressSlide 1.1s ease-in-out infinite;
}

@keyframes uploadProgressSlide {
    0% { left: -35%; }
    100% { left: 100%; }
}

.upload-progress-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--primary-dark);
}

/* =========================================================
   智能体操作手册公用弹窗（AgentManual）
   各智能体系统引入 js/agent-manual.js 即可复用
   ========================================================= */
body.agent-manual-open {
    overflow: hidden;
}

.agent-manual-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-fast);
}

.agent-manual-overlay.hidden {
    display: none;
}

.agent-manual-dialog {
    width: min(920px, 94vw);
    max-height: min(88vh, 960px);
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp var(--transition-normal);
}

.agent-manual-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.04));
}

.agent-manual-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.agent-manual-badge {
    font-size: 20px;
    line-height: 1;
}

.agent-manual-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-manual-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.agent-manual-close:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.agent-manual-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 26px 26px;
    -webkit-overflow-scrolling: touch;
}

.agent-manual-footer {
    padding: 10px 22px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}

.agent-manual-loading,
.agent-manual-error {
    padding: 32px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

.agent-manual-error {
    color: #dc2626;
    line-height: 1.9;
}

/* Markdown 渲染样式 */
.manual-markdown {
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-primary);
    word-break: break-word;
}

.manual-markdown h1 {
    font-size: 22px;
    margin: 4px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.manual-markdown h2 {
    font-size: 18px;
    margin: 26px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.manual-markdown h3 {
    font-size: 16px;
    margin: 20px 0 8px;
}

.manual-markdown h4,
.manual-markdown h5,
.manual-markdown h6 {
    font-size: 14.5px;
    margin: 16px 0 6px;
}

.manual-markdown p {
    margin: 8px 0;
}

.manual-markdown ul,
.manual-markdown ol {
    margin: 6px 0 10px;
    padding-left: 24px;
}

.manual-markdown li {
    margin: 4px 0;
}

.manual-markdown hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 18px 0;
}

.manual-markdown blockquote {
    margin: 12px 0;
    padding: 10px 14px;
    border-left: 3px solid var(--primary-color);
    background: rgba(59, 130, 246, 0.07);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
}

.manual-markdown blockquote p {
    margin: 4px 0;
}

.manual-markdown a {
    color: var(--primary-dark);
    text-decoration: none;
    border-bottom: 1px dashed rgba(37, 99, 235, 0.5);
}

.manual-markdown a:hover {
    border-bottom-style: solid;
}

.manual-markdown code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #f1f5f9;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12.5px;
    color: #0f172a;
}

.manual-markdown pre {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
    overflow-x: auto;
}

.manual-markdown pre code {
    padding: 0;
    background: transparent;
    font-size: 12.5px;
    line-height: 1.7;
}

.manual-markdown .manual-table {
    width: 100%;
    margin: 12px 0;
    border-collapse: collapse;
    font-size: 13px;
}

.manual-markdown .manual-table th,
.manual-markdown .manual-table td {
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.manual-markdown .manual-table th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.manual-markdown img {
    max-width: 100%;
    border-radius: 6px;
}

@media (max-width: 640px) {
    .agent-manual-overlay {
        padding: 10px;
    }

    .agent-manual-dialog {
        width: 100%;
        max-height: 92vh;
    }

    .agent-manual-body {
        padding: 14px 16px 20px;
    }

    .manual-markdown .manual-table {
        display: block;
        overflow-x: auto;
    }
}


