/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --bg-input: #0f172a;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --border: #1e293b;
    --border-light: #334155;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;
    --topbar-height: 56px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* ===== 登录页面 ===== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e17 0%, #0f172a 50%, #1e1b4b 100%);
    z-index: -1;
}

.bg-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

.bg-particle:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bg-particle:nth-child(2) {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    animation-delay: -7s;
}

.bg-particle:nth-child(3) {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: rgba(26, 35, 50, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(59, 130, 246, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.logo-circle.small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin: 0;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-text {
    color: white;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1px;
}

.logo-circle.small .logo-text {
    font-size: 12px;
}

.app-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.app-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-icon {
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input[readonly] {
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}

.login-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

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

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.login-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== 主应用布局 ===== */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    min-height: var(--topbar-height);
}

.sidebar-title {
    flex: 1;
    overflow: hidden;
}

.sidebar-title h2 {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .user-name,
.sidebar.collapsed .logout-btn {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-menu {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
    text-decoration: none;
}

.menu-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.menu-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
}

.menu-item .menu-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.menu-item .menu-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.sidebar.collapsed .menu-name {
    display: none;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
}

.user-avatar {
    font-size: 20px;
}

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

.logout-btn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.topbar-left h1 {
    font-size: 18px;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.model-select {
    padding: 7px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    max-width: 200px;
}

.model-select:focus {
    border-color: var(--accent);
}

.status-indicator {
    font-size: 12px;
    color: var(--success);
}

/* 页面内容 */
.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
}

/* 聊天界面 */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: rgba(59, 130, 246, 0.2);
}

.message-content {
    flex: 1;
}

.message-sender {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.message.user .message-sender {
    text-align: right;
}

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

.message.user .message-text {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.message-text.loading {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* 聊天输入区 */
.chat-input-area {
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

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

#chatInput {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    max-height: 150px;
    transition: all 0.2s;
}

#chatInput:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.send-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

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

.input-hint {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* 占位页面 */
.placeholder-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.placeholder-page h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.placeholder-page p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
}

.model-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 500px;
}

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: left;
}

.model-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.model-card p {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: left;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        z-index: 100;
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .login-card {
        padding: 28px 20px;
    }
}

/* ===== 备忘页面 ===== */
.memo-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

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

.memo-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.memo-updated {
    font-size: 12px;
    color: var(--text-muted);
}

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

.memo-entry {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    transition: all 0.2s;
}

.memo-entry:hover {
    border-color: var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.memo-date {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.memo-entry-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.memo-entry-content {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.memo-loading,
.memo-empty,
.memo-error {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.memo-error {
    color: var(--error);
}

/* ===== 登录页面角色选择 ===== */
.role-selector {
    margin-bottom: 20px;
}

.role-label {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.role-buttons {
    display: flex;
    gap: 12px;
}

.role-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.role-btn:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.role-icon {
    font-size: 28px;
}

.role-name {
    font-size: 15px;
    font-weight: 600;
}

.role-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.password-section {
    margin-top: 10px;
}

.selected-role {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
}

.selected-role .role-icon {
    font-size: 20px;
}

.back-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.back-btn:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.role-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.footer-link {
    color: var(--accent);
    font-size: 12px;
    margin-top: 4px;
}

/* ===== 聊天历史 ===== */
.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    border-top: 1px solid var(--border);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.new-chat-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

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

.history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.history-item:hover {
    background: var(--bg-card);
}

.history-item.active {
    background: rgba(59, 130, 246, 0.15);
}

.history-title {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.history-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.exported-tag {
    background: var(--success);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
}

.history-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.history-item:hover .history-delete {
    opacity: 1;
}

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

.history-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== 用户信息 ===== */
.user-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-role {
    font-size: 11px;
    color: var(--accent);
}

/* ===== 临时密码管理 ===== */
.temp-password-container,
.training-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

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

.page-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.page-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.pwd-generate-result {
    margin-bottom: 24px;
}

.pwd-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 20px 24px;
}

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

.pwd-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 4px;
    font-family: monospace;
}

.copy-btn {
    margin-left: auto;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.copy-btn:hover {
    background: var(--bg-card);
}

.pwd-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    padding-left: 4px;
}

.pwd-list-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* ===== 数据表格 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.data-table th {
    background: var(--bg-secondary);
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: var(--bg-input);
}

.pwd-cell {
    font-family: monospace;
    font-weight: 600;
    letter-spacing: 2px;
}

.status-active {
    color: var(--success);
    font-weight: 500;
}

.status-used {
    color: var(--text-muted);
}

.status-revoked {
    color: var(--error);
}

.revoke-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

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

.pwd-empty,
.training-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ===== 训练数据 ===== */
.training-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

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

.training-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.training-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    transition: all 0.2s;
}

.training-item:hover {
    border-color: var(--border-light);
}

.training-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.training-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.view-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.view-btn:hover {
    background: var(--accent-hover);
}

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

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

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.modal-message {
    margin-bottom: 16px;
}

.modal-message.user {
    text-align: right;
}

.modal-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.modal-content {
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    display: inline-block;
    max-width: 85%;
    text-align: left;
}

.modal-message.user .modal-content {
    background: rgba(59, 130, 246, 0.15);
}

.modal-loading,
.modal-empty,
.modal-error {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.modal-error {
    color: var(--error);
}

/* ===== 响应式补充 ===== */
@media (max-width: 768px) {
    .role-buttons {
        flex-direction: column;
    }
    .pwd-card {
        flex-direction: column;
        text-align: center;
    }
    .training-stats {
        flex-direction: column;
    }
}

/* ===== 文件上传 ===== */
.upload-buttons {
    display: flex;
    gap: 4px;
    padding-right: 8px;
    border-right: 1px solid var(--border);
    margin-right: 8px;
}

.upload-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: all 0.15s;
    opacity: 0.7;
}

.upload-btn:hover {
    background: var(--bg-card);
    opacity: 1;
}

.upload-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.preview-items {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.preview-item {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    min-width: 80px;
    max-width: 120px;
    text-align: center;
}

.preview-image {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 4px;
}

.preview-file-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.preview-name {
    font-size: 11px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.preview-size {
    font-size: 10px;
    color: var(--text-muted);
}

.preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--error);
    color: white;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.clear-upload-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
    flex-shrink: 0;
}

.clear-upload-btn:hover {
    color: var(--error);
    border-color: var(--error);
}

/* 消息中的文件和图片 */
.message-files {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.message-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid var(--border);
}

.message-file {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
}

.message-file .file-size {
    color: var(--text-muted);
    font-size: 11px;
}


/* ===== 消息编辑和操作按钮 ===== */
.message-actions {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s;
    vertical-align: middle;
}

.message:hover .message-actions {
    opacity: 1;
}

.msg-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
}

.msg-action-btn:hover {
    opacity: 1;
    background: rgba(0,0,0,0.08);
}

.message-edit-area {
    margin-top: 8px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 8px;
}

.message-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.message-edit-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.edit-save-btn {
    padding: 6px 16px;
    background: #165DFF;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.edit-save-btn:hover {
    background: #0e4fd6;
}

.edit-cancel-btn {
    padding: 6px 16px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.edit-cancel-btn:hover {
    background: #e0e0e0;
}

/* ===== 知识库管理页面 ===== */
.kb-upload-area {
    border: 2px dashed #165DFF;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 20px;
}

.kb-upload-area:hover {
    background: #f0f7ff;
}

.kb-upload-area.dragover {
    background: #e6f0ff;
    border-color: #0e4fd6;
}

.kb-doc-list {
    width: 100%;
    border-collapse: collapse;
}

.kb-doc-list th, .kb-doc-list td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.kb-doc-list th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    color: #666;
}

.kb-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.kb-status.pending { background: #fff7e6; color: #fa8c16; }
.kb-status.processing { background: #e6f7ff; color: #1890ff; }
.kb-status.completed { background: #f6ffed; color: #52c41a; }
.kb-status.failed { background: #fff1f0; color: #f5222d; }

/* ===== 检索测试页面 ===== */
.search-result-item {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
}

.search-result-score {
    display: inline-block;
    padding: 2px 8px;
    background: #e6f7ff;
    color: #1890ff;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 8px;
}

.search-result-source {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* ===== 来源引用 ===== */
.source-citation {
    display: inline-block;
    padding: 1px 6px;
    background: #e6f7ff;
    color: #1890ff;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin: 0 2px;
}

.source-citation:hover {
    background: #bae7ff;
}

.source-detail {
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    border-left: 3px solid #165DFF;
}



/* ===== 知识库管理页面 ===== */
.kb-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}
.kb-container .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.kb-container .page-header h2 {
    font-size: 20px;
}
.kb-upload-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.kb-upload-progress {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}
.kb-search-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.kb-search-section h3 {
    margin-bottom: 12px;
    font-size: 16px;
}
.kb-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.kb-search-box input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}
.kb-search-box input:focus {
    outline: none;
    border-color: var(--accent);
}
.kb-search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kb-search-result-item {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}
.kb-search-result-item .result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.kb-search-result-item .result-filename {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}
.kb-search-result-item .result-similarity {
    font-size: 12px;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}
.kb-search-result-item .result-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kb-docs-section h3 {
    margin-bottom: 12px;
    font-size: 16px;
}
.kb-doc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kb-doc-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kb-doc-info {
    flex: 1;
}
.kb-doc-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}
.kb-doc-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
}
.kb-doc-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}
.kb-doc-status.ready {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}
.kb-doc-status.processing {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}
.kb-doc-status.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}
.kb-doc-delete {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 6px;
}
.kb-doc-delete:hover {
    background: rgba(239, 68, 68, 0.1);
}


/* ===== 前后台切换 ===== */
.mode-switch {
    display: flex;
    background: var(--bg-input);
    border-radius: 8px;
    padding: 3px;
    margin-right: 16px;
}
.mode-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.mode-btn.active {
    background: var(--accent);
    color: white;
}
.mode-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* ===== 后台管理页面 ===== */
.admin-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    height: 100%;
    overflow-y: auto;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.admin-header h2 {
    font-size: 22px;
}
.admin-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-left: 12px;
}

/* 工作列表 */
.work-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.work-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.work-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.work-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.work-item-name {
    font-size: 16px;
    font-weight: 600;
}
.work-item-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}
.work-item-status.ongoing {
    background: rgba(59,130,246,0.15);
    color: var(--accent);
}
.work-item-status.completed {
    background: rgba(16,185,129,0.15);
    color: var(--success);
}
.work-item-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}
.work-item-progress {
    margin-top: 10px;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}
.work-item-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}

/* 工作详情 */
.work-detail-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.work-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}
.work-detail-header h3 {
    flex: 1;
    font-size: 17px;
}
.work-detail-actions {
    display: flex;
    gap: 8px;
}
.back-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.back-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}
.work-detail-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.work-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}
.work-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.work-input-area {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}
.work-input-area textarea {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    font-family: inherit;
}
.work-input-area textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.work-info-panel {
    width: 280px;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-secondary);
}
.work-info-panel h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.work-info-item {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}
.work-info-item strong {
    color: var(--text-primary);
}

/* 能力模板库 */
.capability-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.capability-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}
.capability-card:hover {
    border-color: var(--accent);
}
.capability-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.capability-name {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}
.capability-domain {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(59,130,246,0.15);
    color: var(--accent);
    border-radius: 10px;
    margin-left: 8px;
}
.capability-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.capability-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-content h3 {
    font-size: 18px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}
.primary-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}
.primary-btn:hover {
    background: var(--accent-hover);
}
.secondary-btn {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.secondary-btn:hover {
    border-color: var(--border-light);
}


/* ===== 账户管理 ===== */
.account-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.account-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
}
.account-info {
    display: flex;
    align-items: center;
    gap: 14px;
}
.account-avatar {
    font-size: 28px;
}
.account-name {
    font-size: 15px;
    font-weight: 600;
}
.account-role {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.account-actions {
    display: flex;
    gap: 8px;
}
.temp-password-actions {
    margin-bottom: 8px;
}
.temp-password-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.temp-password-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
}
.temp-password-code {
    font-family: monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
}
.temp-password-meta {
    font-size: 12px;
    color: var(--text-secondary);
}


/* ========== 系统监控页面样式 ========== */
#monitorPage .page-header {
    margin-bottom: 20px;
}
#monitorPage .page-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
#gpuGrid > div {
    transition: transform 0.2s, box-shadow 0.2s;
}
#gpuGrid > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
#serviceList > div:last-child {
    border-bottom: none;
}
.monitor-refresh-btn {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}
.monitor-refresh-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
}
/* ============================================================
   知识库管理 - 完整CSS样式库（工程可用版）
   ============================================================ */

/* 页面头部 */
.page-header {
    margin-bottom: 20px;
}
.page-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #1a1a2e;
}
.page-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* 统计卡片 */
.kb-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.kb-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.kb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.kb-stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}
.kb-stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}
.kb-stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
}
.kb-stat-icon {
    font-size: 36px;
}
.kb-stat-info {
    flex: 1;
}
.kb-stat-value {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;
}
.kb-stat-label {
    font-size: 13px;
    opacity: 0.9;
}

/* 操作栏 */
.kb-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.kb-toolbar-left, .kb-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.kb-filter {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}
.kb-search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    width: 200px;
}
.btn-icon {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 16px;
}
.btn-icon:hover {
    background: #f5f5f5;
}

/* 上传进度 */
.kb-upload-progress {
    background: #f0f7ff;
    border: 1px solid #b3d9ff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.kb-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
}
.kb-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.kb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.kb-progress-status {
    font-size: 13px;
    color: #555;
}

/* 文档列表 */
.kb-doc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}
.kb-doc-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.kb-doc-card:hover {
    border-color: #4facfe;
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.15);
    transform: translateY(-2px);
}
.kb-doc-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.kb-doc-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.kb-doc-title {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
    color: #1a1a2e;
    word-break: break-all;
    line-height: 1.4;
}
.kb-doc-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.kb-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.kb-badge-original {
    background: #e3f2fd;
    color: #1976d2;
}
.kb-badge-evolved {
    background: #f3e5f5;
    color: #7b1fa2;
}
.kb-badge-status {
    background: #f5f5f5;
    color: #666;
}
.kb-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 14px;
    font-size: 12px;
    color: #888;
}
.kb-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.kb-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}
.btn-danger {
    background: #f56c6c;
    color: white;
    border: none;
}
.btn-danger:hover {
    background: #e74c3c;
}

/* 空状态 */
.kb-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.kb-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}
.kb-empty-text {
    font-size: 18px;
    margin-bottom: 8px;
    color: #666;
}
.kb-empty-hint {
    font-size: 14px;
}

/* 错误状态 */
.kb-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}
.kb-error-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.kb-error-text {
    color: #f56c6c;
    margin-bottom: 16px;
}

/* 弹窗通用 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.kb-upload-modal { width: 600px; }
.kb-search-modal { width: 700px; }
.kb-detail-modal { width: 700px; }
.kb-evolve-modal { width: 500px; }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}
.modal-header h3 {
    margin: 0;
    font-size: 18px;
}
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}
.modal-body {
    padding: 24px;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
}

/* 上传区域 */
.kb-upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 16px;
    transition: all 0.2s;
    cursor: pointer;
}
.kb-upload-area:hover, .kb-upload-area.dragover {
    border-color: #4facfe;
    background: #f0f7ff;
}
.kb-upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.kb-upload-text {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}
.kb-upload-formats {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
}
.kb-selected-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f0f7ff;
    border-radius: 8px;
    margin-bottom: 16px;
}
.kb-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.kb-file-icon { font-size: 20px; }
.kb-file-name { font-weight: 500; }
.kb-file-size { color: #888; font-size: 13px; }
.kb-upload-tips {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
}
.kb-upload-tips p { margin: 0 0 8px 0; font-weight: 500; }
.kb-upload-tips ul { margin: 0; padding-left: 20px; }
.kb-upload-tips li { margin-bottom: 4px; color: #666; }

/* 检索测试 */
.kb-search-input-area {
    margin-bottom: 20px;
}
.kb-search-query-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.kb-search-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kb-topk-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-left: 8px;
}
.kb-search-results {
    max-height: 400px;
    overflow-y: auto;
}
.kb-search-empty {
    text-align: center;
    padding: 40px;
    color: #999;
}
.kb-search-loading {
    text-align: center;
    padding: 40px;
    color: #4facfe;
}
.kb-search-summary {
    margin-bottom: 12px;
    font-weight: 500;
    color: #333;
}
.kb-search-result-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border-left: 3px solid #4facfe;
}
.kb-search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}
.kb-search-rank {
    font-weight: bold;
    color: #4facfe;
}
.kb-search-doc {
    flex: 1;
    margin: 0 12px;
    color: #333;
    font-weight: 500;
}
.kb-search-score {
    color: #52c41a;
    font-weight: 500;
}
.kb-search-result-content {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}
.kb-search-error {
    text-align: center;
    padding: 40px;
    color: #f56c6c;
}

/* 文档详情 */
.kb-detail-section {
    margin-bottom: 24px;
}
.kb-detail-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #1a1a2e;
    padding-bottom: 8px;
    border-bottom: 2px solid #4facfe;
}
.kb-detail-table {
    width: 100%;
    border-collapse: collapse;
}
.kb-detail-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.kb-detail-label {
    width: 100px;
    color: #888;
    font-weight: 500;
}
.kb-md5, .kb-path {
    font-family: monospace;
    font-size: 12px;
    color: #666;
    word-break: break-all;
}
.kb-content-preview {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* 知识自进化 */
.kb-evolve-info {
    text-align: center;
    margin-bottom: 24px;
}
.kb-evolve-doc {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a2e;
}
.kb-evolve-desc {
    font-size: 14px;
    color: #888;
}
.kb-evolve-steps {
    margin-bottom: 24px;
}
.kb-evolve-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f9f9f9;
    transition: all 0.3s;
}
.kb-evolve-step.active {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
}
.kb-evolve-step.completed {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}
.kb-step-icon {
    font-size: 18px;
}
.kb-step-text {
    font-size: 14px;
    color: #333;
}
.kb-evolve-result {
    text-align: center;
}
.kb-evolve-success {
    font-size: 18px;
    font-weight: bold;
    color: #52c41a;
    margin-bottom: 16px;
}
.kb-evolve-new-doc {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
    font-size: 14px;
    line-height: 2;
}
.kb-evolve-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 响应式 */
@media (max-width: 768px) {
    .kb-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .kb-doc-list {
        grid-template-columns: 1fr;
    }
    .kb-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .kb-search-input {
        width: 100%;
    }
}

/* ============================================================
   知识库CSS样式库结束
   ============================================================ */


/* ============================================================
   聊天对话来源引用样式
   ============================================================ */
.kb-sources {
    margin-top: 12px;
    border-top: 1px solid #e8e8e8;
    padding-top: 10px;
}
.kb-sources-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 0;
    font-size: 13px;
    color: #666;
    user-select: none;
}
.kb-sources-header:hover {
    color: #4facfe;
}
.kb-sources-icon { font-size: 16px; }
.kb-sources-title { font-weight: 500; flex: 1; }
.kb-sources-toggle {
    transition: transform 0.2s;
    font-size: 10px;
}
.kb-sources.expanded .kb-sources-toggle {
    transform: rotate(180deg);
}
.kb-sources-list {
    display: none;
    margin-top: 8px;
}
.kb-sources.expanded .kb-sources-list {
    display: block;
}
.kb-source-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-left: 3px solid #4facfe;
}
.kb-source-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}
.kb-source-num {
    font-weight: bold;
    color: #4facfe;
}
.kb-source-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}
.kb-source-score {
    color: #52c41a;
    font-size: 11px;
}
.kb-source-content {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    max-height: 80px;
    overflow-y: auto;
}
/* ============================================================ */

/* ===== 修复知识库弹窗全屏遮罩居中 ===== */
#kbSearchModal, #kbUploadModal, #kbDocDetailModal, #kbEvolveModal {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    align-items: center !important;
    justify-content: center !important;
}
#kbSearchModal .modal-content,
#kbUploadModal .modal-content,
#kbDocDetailModal .modal-content,
#kbEvolveModal .modal-content {
    margin: 0 !important;
    position: relative !important;
}

/* ===== 知识库页面强制显示样式（2026-09-04添加） ===== */
#knowledgePage .kb-stats {
    display: flex !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
}

#knowledgePage .kb-stat-card {
    flex: 1 !important;
    min-width: 150px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 20px !important;
    border-radius: 12px !important;
    text-align: center !important;
}

#knowledgePage .kb-toolbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    padding: 16px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

#knowledgePage .kb-toolbar-left {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

#knowledgePage .btn-primary {
    background: #165DFF !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

#knowledgePage .btn-primary:hover {
    background: #0e4bdb !important;
}

#knowledgePage .btn-secondary {
    background: #f0f0f0 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
}

#knowledgePage .kb-doc-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 16px !important;
}

#knowledgePage .kb-empty {
    text-align: center !important;
    padding: 60px 20px !important;
    color: #999 !important;
}
/* ===== 知识库页面强制显示样式结束 ===== */

/* ===== 修复弹窗布局：header/footer固定，body滚动 ===== */
.modal-content {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
.modal-content .modal-header {
    flex-shrink: 0 !important;
}
.modal-content .modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}
.modal-content .modal-footer {
    flex-shrink: 0 !important;
}

/* ===== 知识库按钮美化样式（2026-09-04添加） ===== */

/* 主按钮 - 上传文档 */
#knowledgePage .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

#knowledgePage .btn-primary::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent) !important;
    transition: left 0.5s !important;
}

#knowledgePage .btn-primary:hover::before {
    left: 100% !important;
}

#knowledgePage .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

#knowledgePage .btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4) !important;
}

/* 次要按钮 - 检索测试 */
#knowledgePage .btn-secondary {
    background: white !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
    padding: 10px 24px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#knowledgePage .btn-secondary:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

#knowledgePage .btn-secondary:active {
    transform: translateY(0) !important;
}

/* 图标按钮 - 刷新 */
#knowledgePage .btn-icon {
    background: white !important;
    color: #666 !important;
    border: 1px solid #e0e0e0 !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
}

#knowledgePage .btn-icon:hover {
    background: #f5f5f5 !important;
    color: #667eea !important;
    border-color: #667eea !important;
    transform: rotate(90deg) !important;
}

/* 筛选下拉框 */
#knowledgePage .kb-filter {
    padding: 10px 16px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    background: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
}

#knowledgePage .kb-filter:hover {
    border-color: #667eea !important;
}

#knowledgePage .kb-filter:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* 搜索框 */
#knowledgePage .kb-search-input {
    padding: 10px 16px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    width: 220px !important;
    transition: all 0.3s ease !important;
}

#knowledgePage .kb-search-input:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* 操作栏美化 */
#knowledgePage .kb-toolbar {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%) !important;
    border: 1px solid #e0e7ff !important;
    border-radius: 16px !important;
    padding: 20px !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.05) !important;
}

/* 统计卡片美化 */
#knowledgePage .kb-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 24px !important;
    border-radius: 16px !important;
    text-align: center !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

#knowledgePage .kb-stat-card::after {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    right: -50% !important;
    width: 100% !important;
    height: 100% !important;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%) !important;
}

#knowledgePage .kb-stat-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4) !important;
}

#knowledgePage .kb-stat-icon {
    font-size: 32px !important;
    margin-bottom: 8px !important;
}

#knowledgePage .kb-stat-value {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
}

#knowledgePage .kb-stat-label {
    font-size: 13px !important;
    opacity: 0.9 !important;
}

/* 上传弹窗按钮美化 */
#kbUploadModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 32px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
}

#kbUploadModal .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
}

#kbUploadModal .btn-primary:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* 上传区域美化 */
.kb-upload-area {
    border: 2px dashed #c7d2fe !important;
    border-radius: 16px !important;
    padding: 40px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    background: #f8f9ff !important;
}

.kb-upload-area:hover,
.kb-upload-area.dragover {
    border-color: #667eea !important;
    background: #eef2ff !important;
    transform: scale(1.02) !important;
}

.kb-upload-icon {
    font-size: 48px !important;
    margin-bottom: 16px !important;
}

.kb-upload-text {
    font-size: 16px !important;
    color: #333 !important;
    margin-bottom: 8px !important;
    font-weight: 500 !important;
}

.kb-upload-formats {
    font-size: 13px !important;
    color: #999 !important;
    margin-bottom: 20px !important;
}

/* ===== 知识库按钮美化样式结束 ===== */


/* ===== AI模型服务控制样式 ===== */
.service-control-section {
    animation: fadeIn 0.3s ease;
}

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

.service-control-section button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.service-control-section button:active {
    transform: translateY(0);
}
/* ===== 服务控制样式结束 ===== */


/* ===== 系统设置页面样式修复 ===== */
#settingsPage {
    padding: 20px !important;
    overflow-y: auto !important;
}

#settingsPage .settings-tab {
    transition: all 0.2s ease;
}

#settingsPage .settings-tab:hover {
    color: #38bdf8 !important;
}

#settingsPage input[type="text"],
#settingsPage input[type="number"],
#settingsPage select {
    transition: border-color 0.2s ease;
}

#settingsPage input[type="text"]:focus,
#settingsPage input[type="number"]:focus,
#settingsPage select:focus {
    border-color: #38bdf8 !important;
    outline: none;
}

#settingsPage input[type="checkbox"] {
    cursor: pointer;
}

#settingsPage button {
    transition: all 0.2s ease;
}

#settingsPage button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

#settingsPage button:active {
    transform: translateY(0);
}
/* ===== 系统设置样式修复结束 ===== */

