/* =====================================================
   新版页面样式 - 优雅现代设计（统一输出样式）
   ===================================================== */

/* ==================== 统一输出文字样式 ==================== */

/* 所有输出容器统一文字样式 */
.output-container {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    min-height: 280px;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

/* 统一输出内所有文字样式 */
.output-container .bubble,
.output-container p,
.output-container li,
.output-container h1,
.output-container h2,
.output-container h3,
.output-container h4 {
    font-size: 14px !important;
    line-height: 1.7 !important;
    font-weight: 200 !important;
    color: var(--text) !important;
    max-width: 100% !important;
    overflow-x: auto !important;
}

.output-container h1 {
    font-size: 20px !important;
    font-weight: 300 !important;
    margin-top: 16px !important;
    margin-bottom: 10px !important;
}

.output-container h2 {
    font-size: 18px !important;
    font-weight: 300 !important;
    margin-top: 16px !important;
    margin-bottom: 8px !important;
    color: var(--accent) !important;
}

.output-container h3 {
    font-size: 16px !important;
    font-weight: 300 !important;
    margin-top: 14px !important;
    margin-bottom: 6px !important;
}

.output-container p {
    margin-bottom: 12px !important;
}

.output-container p:last-child {
    margin-bottom: 0 !important;
}

.output-container ul,
.output-container ol {
    padding-left: 20px !important;
    margin: 12px 0 !important;
}

.output-container li {
    margin-bottom: 6px !important;
    font-size: 14px !important;
}

.output-container strong {
    font-weight: 500 !important;
    color: var(--warning) !important;
}

.output-container code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px !important;
    padding: 2px 6px;
    background: var(--accent-light);
    border-radius: 4px;
    color: var(--accent);
}

.output-container pre {
    margin: 12px 0;
    padding: 16px;
    background: rgba(191, 90, 242, 0.05);
    border: 0.5px solid rgba(191, 90, 242, 0.15);
    border-radius: 12px;
    overflow-x: auto;
}

.output-container pre code {
    padding: 0;
    background: none;
}

/* 小红书输出样式 - 稍大字体以突出种草效果 */
.xhs-output p,
.xhs-output li,
.xhs-output {
    font-size: 15px !important;
    line-height: 1.85 !important;
}

.xhs-output strong {
    color: #FF6B6B !important;
}

/* 情报输出样式 - 稍大字体以突出分析效果 */
.intelligence-output .bubble,
.intelligence-output p,
.intelligence-output li {
    font-size: 15px !important;
    line-height: 1.85 !important;
}

/* ==================== 海报模块样式 ==================== */
.poster-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 海报尺寸选择器 */
#posterRatio {
    padding: 8px 32px 8px 12px;
    border: 0.5px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 300;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

#posterRatio:focus {
    border-color: rgba(0, 122, 255, 0.5);
    background-color: rgba(0, 122, 255, 0.05);
}

#posterRatio option {
    background: #1a1a1a;
    color: var(--text);
}

.poster-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
}

.poster-loading .loading-text {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
}

.poster-loading .loading-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.poster-loading .loading-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 200;
    color: var(--text-tertiary);
}

.poster-loading .loading-step.active {
    color: var(--accent);
}

.poster-loading .loading-step.completed {
    color: var(--success);
}

.poster-loading .step-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-loading .step-icon.pending {
    border: 1.5px solid var(--border);
}

.poster-loading .step-icon.active {
    border: 1.5px solid var(--accent);
    animation: pulse 1.5s infinite;
}

.poster-loading .step-icon.completed {
    background: var(--success);
    border: none;
}

.poster-loading .step-icon.completed::after {
    content: '✓';
    color: white;
    font-size: 10px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 海报图片展示 */
.poster-preview {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
}

.poster-preview img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 海报按钮操作区 */
.poster-actions,
.image-actions,
.prompt-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.poster-actions .btn,
.image-actions .btn,
.prompt-actions .btn {
    min-width: 120px;
}

.poster-actions .btn-primary,
.image-actions .btn-primary {
    background: transparent;
    border: 0.5px solid var(--accent);
    color: var(--accent);
    font-weight: 300;
}

.poster-actions .btn-primary:hover,
.image-actions .btn-primary:hover {
    background: rgba(0, 122, 255, 0.1);
    border-color: var(--accent);
}

.poster-actions .btn-secondary,
.image-actions .btn-secondary {
    background: transparent;
    border: 0.5px solid var(--border);
}

.poster-actions .btn-secondary:hover,
.image-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ==================== 通用页面结构 ==================== */

.intelligence-page,
.wechat-page,
.xhs-page,
.shortvideo-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 页面 Hero 区域 */
.page-hero {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.06) 0%, rgba(191, 90, 242, 0.04) 100%);
    border: 0.5px solid rgba(0, 122, 255, 0.1);
    border-radius: 20px;
}

.page-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 122, 255, 0.1);
    border: 0.5px solid rgba(0, 122, 255, 0.2);
    color: #007AFF;
    flex-shrink: 0;
}

.page-hero-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}

.page-hero-icon.xhs-icon { color: #FF6B6B; background: rgba(255, 107, 107, 0.1); border-color: rgba(255, 107, 107, 0.2); }
.page-hero-icon.wechat-icon { color: #30D158; background: rgba(48, 209, 88, 0.1); border-color: rgba(48, 209, 88, 0.2); }
.page-hero-icon.video-icon { color: #FF9F0A; background: rgba(255, 159, 10, 0.1); border-color: rgba(255, 159, 10, 0.2); }

.page-hero-content h2 {
    font-size: 26px;
    font-weight: 200;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.page-hero-content p {
    font-size: 14px;
    font-weight: 200;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 玻璃卡片 */
.glass-card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: 20px;
    padding: 28px;
}

/* 输入网格 */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-secondary);
}

.input-label .optional {
    color: var(--text-tertiary);
    font-size: 11px;
}

/* 带按钮的输入框 */
.input-with-btn {
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-with-btn input {
    flex: 1;
}

/* ==================== 通用输入框样式 ==================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 200;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 44px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: rgba(0, 122, 255, 0.5);
    background: rgba(0, 122, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

/* 输入框网格中的独立输入 */
.input-grid input[type="text"] {
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    height: 44px;
}

.input-with-btn input {
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    height: 44px;
}

/* 搜索框内输入 */
.search-input-wrapper input {
    padding-left: 48px;
}

/* ==================== 按钮样式 ==================== */

.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 0.5px solid var(--accent);
    border-radius: 12px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.primary-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.primary-btn:hover {
    background: rgba(0, 122, 255, 0.1);
    border-color: var(--accent);
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn.large {
    padding: 14px 32px;
    font-size: 15px;
}

.primary-btn.accent {
    background: transparent;
    border: 0.5px solid #FF9F0A;
    color: #FF9F0A;
}

.primary-btn.accent:hover {
    background: rgba(255, 159, 10, 0.1);
    border-color: #FF9F0A;
}

/* 操作行 */
.action-row {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    stroke-width: 1.5;
}

.search-input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 0.5px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 200;
    outline: none;
    transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
    border-color: rgba(0, 122, 255, 0.4);
    background: rgba(0, 122, 255, 0.05);
}

.search-input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

/* 快捷课题 */
.quick-topics {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topic-label,
.template-label {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-tertiary);
}

.topic-chip,
.template-chip {
    padding: 8px 16px;
    border: 0.5px solid rgba(0, 122, 255, 0.2);
    border-radius: 20px;
    background: rgba(0, 122, 255, 0.05);
    color: var(--accent);
    font-size: 12px;
    font-weight: 200;
    cursor: pointer;
    transition: all 0.25s ease;
}

.topic-chip:hover,
.template-chip:hover {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
}

.quick-templates {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 0.5px solid var(--border);
    margin-top: 16px;
}

/* 提示行 */
.tips-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    background: rgba(255, 159, 10, 0.05);
    border: 0.5px solid rgba(255, 159, 10, 0.15);
    border-radius: 12px;
}

.tip-icon {
    font-size: 14px;
}

.tip-text {
    font-size: 12px;
    font-weight: 200;
    color: rgba(255, 159, 10, 0.9);
}

/* 输出占位符 */
.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    text-align: center;
}

.placeholder-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 122, 255, 0.05);
    border: 0.5px solid rgba(0, 122, 255, 0.1);
    color: var(--accent);
    margin-bottom: 16px;
}

.placeholder-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 1;
}

.output-placeholder p {
    font-size: 13px;
    font-weight: 200;
    color: var(--text-tertiary);
}

/* ==================== 通用按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 0.5px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
}

.btn:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: transparent;
    border: 0.5px solid var(--accent);
    color: var(--accent);
}

.btn-primary:hover {
    background: rgba(0, 122, 255, 0.1);
    border-color: var(--accent);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.btn-large {
    padding: 14px 32px;
    font-size: 15px;
}

/* 风格选择器 */
.style-select {
    width: 100%;
    padding: 12px 16px;
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 200;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    height: 44px;
    box-sizing: border-box;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.style-select:focus {
    border-color: rgba(0, 122, 255, 0.5);
    background-color: rgba(0, 122, 255, 0.05);
}

.style-select option {
    background: #1a1a1a;
    color: var(--text);
}

/* ==================== 设置页面 ==================== */

.settings-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 200;
    color: var(--text);
}

.settings-title svg {
    color: var(--accent);
}

.settings-card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: 20px;
    padding: 24px;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.provider-name {
    font-size: 14px;
    font-weight: 300;
    color: var(--text);
    margin-right: 12px;
}

.provider-status {
    font-size: 11px;
    font-weight: 300;
    padding: 3px 10px;
    border-radius: 8px;
}

.provider-status.active {
    background: rgba(48, 209, 88, 0.1);
    color: var(--success);
    border: 0.5px solid rgba(48, 209, 88, 0.2);
}

.provider-status.inactive {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-tertiary);
    border: 0.5px solid var(--border);
}

.setting-select {
    width: 100%;
    padding: 12px 16px;
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 200;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(0,122,255,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.setting-select:focus {
    border-color: rgba(0, 122, 255, 0.4);
}

.setting-select option {
    background: #1a1a1a;
    color: var(--text);
}

.api-key-input input {
    width: 100%;
    padding: 12px 16px;
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 200;
    outline: none;
    transition: all 0.3s ease;
}

.api-key-input input:focus {
    border-color: rgba(0, 122, 255, 0.4);
    background: rgba(0, 122, 255, 0.05);
}

.api-key-input input::placeholder {
    color: var(--text-tertiary);
}

.setting-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* Token 统计 */
.token-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.token-stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(0, 122, 255, 0.03);
    border: 0.5px solid rgba(0, 122, 255, 0.1);
    border-radius: 16px;
}

.token-stat-value {
    font-size: 28px;
    font-weight: 200;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.token-stat-label {
    font-size: 11px;
    font-weight: 200;
    color: var(--text-tertiary);
    margin-top: 6px;
}

.token-by-provider h4 {
    font-size: 12px;
    font-weight: 200;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.provider-token-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: 10px;
    margin-bottom: 8px;
}

.provider-token-name {
    font-size: 13px;
    font-weight: 300;
    color: var(--text);
    flex: 1;
}

.provider-token-value {
    font-size: 13px;
    font-weight: 200;
    color: var(--accent);
}

.provider-token-requests {
    font-size: 11px;
    font-weight: 200;
    color: var(--text-tertiary);
}

.no-data {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 200;
    padding: 20px;
}

/* ==================== 历史记录面板样式 ==================== */
.history-panel {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-top: 8px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 0.5px solid var(--border);
}

.history-title {
    font-size: 13px;
    font-weight: 300;
    color: var(--text);
}

.history-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-count {
    font-size: 11px;
    font-weight: 200;
    color: var(--text-tertiary);
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.history-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 200;
    cursor: pointer;
    transition: all 0.25s ease;
}

.history-btn:hover {
    border-color: rgba(0, 122, 255, 0.3);
    color: var(--accent);
    background: rgba(0, 122, 255, 0.05);
}

.history-btn svg {
    stroke-width: 2;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 0.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.history-item:hover {
    background: rgba(0, 122, 255, 0.05);
    border-color: rgba(0, 122, 255, 0.2);
}

.history-item-title {
    font-size: 13px;
    font-weight: 300;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.history-item-time {
    font-size: 11px;
    font-weight: 200;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.history-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 200;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .input-with-btn {
        flex-direction: column;
    }
    
    .input-with-btn input,
    .input-with-btn .primary-btn {
        width: 100%;
    }
    
    .page-hero {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .token-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .history-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .history-list {
        max-height: 200px;
    }
}

/* ==================== AI 员工聊天页面样式 ==================== */

/* 聊天页面容器 */
.agent-chat-page {
    display: flex;
    width: 100%;
    height: 100%;
    background: var(--bg);
}

/* 左侧员工列表 */
.agent-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 0.5px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 0.5px solid var(--border);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 4px;
}

.sidebar-subtitle {
    font-size: 12px;
    font-weight: 200;
    color: var(--text-tertiary);
}

/* 工作群入口区域 */
.team-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.team-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.team-section-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.team-section-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-section-icon {
    font-size: 16px;
}

.team-section-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.team-section-badge {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 8px;
}

.team-section-arrow {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s;
}

.team-list {
    display: none;
    padding: 0 8px 8px;
}

.team-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.15);
    margin-bottom: 6px;
}

.team-list-item:hover {
    background: rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.3);
    transform: translateX(4px);
}

.team-list-icon {
    font-size: 18px;
}

.team-list-info {
    flex: 1;
}

.team-list-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
}

.team-list-members {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.agent-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 4px;
}

.agent-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.agent-item.active {
    background: rgba(0, 122, 255, 0.1);
    border: 0.5px solid rgba(0, 122, 255, 0.2);
}

.agent-item-avatar {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
}

.agent-item-avatar img {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    object-fit: cover !important;
    display: block !important;
}

.agent-item-info {
    flex: 1;
    min-width: 0;
}

.agent-item-name {
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-item-desc {
    font-size: 11px;
    font-weight: 200;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-item-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--success);
}

/* 右侧聊天工作区 */
.chat-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 0.5px solid var(--border);
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chat-back-btn {
    width: 36px;
    height: 36px;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.chat-back-btn:hover {
    border-color: rgba(0, 122, 255, 0.3);
    color: var(--accent);
    background: rgba(0, 122, 255, 0.05);
}

.chat-agent-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
}

.chat-agent-icon img {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: cover !important;
    display: block !important;
}

.chat-agent-details {
    display: flex;
    flex-direction: column;
}

.chat-agent-details h3 {
    font-size: 15px;
    font-weight: 400;
    color: var(--text);
    margin: 0 0 2px 0;
}

.chat-agent-details p {
    font-size: 12px;
    font-weight: 200;
    color: var(--text-tertiary);
    margin: 0;
}

.mode-toggle {
    display: flex;
    gap: 8px;
}

.mode-btn {
    padding: 8px 14px;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 200;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mode-btn:hover {
    border-color: rgba(0, 122, 255, 0.3);
    color: var(--accent);
    background: rgba(0, 122, 255, 0.05);
}

.mode-btn.active {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
    color: var(--accent);
}

/* 聊天消息容器 */
.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 0.5px solid var(--border);
    overflow: hidden;
}

.chat-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-message.user .chat-message-avatar {
    background: rgba(255, 159, 10, 0.1);
    border-color: rgba(255, 159, 10, 0.2);
    color: var(--warning);
}

.chat-message.assistant .chat-message-avatar {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.2);
    color: var(--accent);
}

.chat-message-content {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 200;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-message.user .chat-message-content {
    background: rgba(255, 159, 10, 0.1);
    border: 0.5px solid rgba(255, 159, 10, 0.2);
    border-bottom-right-radius: 4px;
    color: var(--text);
}

.chat-message.assistant .chat-message-content {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-bottom-left-radius: 4px;
    color: var(--text);
}

.chat-message.error .chat-message-content {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
}

/* 聊天输入区域 */
.chat-input-area {
    padding: 20px 24px;
    border-top: 0.5px solid var(--border);
    background: var(--bg-secondary);
}

.input-wrapper-new {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.input-wrapper-new textarea {
    flex: 1;
    padding: 12px 16px;
    border: 0.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 200;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.25s ease;
    min-height: 44px;
    max-height: 120px;
    overflow-y: auto;
}

.input-wrapper-new textarea:focus {
    border-color: rgba(0, 122, 255, 0.4);
    background: rgba(0, 122, 255, 0.05);
}

.input-wrapper-new textarea::placeholder {
    color: var(--text-tertiary);
}

.send-btn-new {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.send-btn-new:hover {
    background: #0A84FF;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.send-btn-new:active {
    transform: scale(0.95);
}

.send-btn-new svg {
    width: 20px;
    height: 20px;
}

/* 欢迎消息样式 */
.welcome-message {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-secondary);
}

.welcome-message h3 {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 12px;
    color: var(--text);
}

.welcome-message p {
    font-size: 14px;
    font-weight: 200;
    line-height: 1.6;
}

/* 加载动画 */
.loading-dots::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .agent-chat-page {
        flex-direction: column;
    }
    
    .agent-sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
        border-right: none;
        border-bottom: 0.5px solid var(--border);
    }
    
    .chat-header {
        padding: 12px 16px;
    }
    
    .chat-agent-details h3 {
        font-size: 14px;
    }
    
    .chat-agent-details p {
        font-size: 11px;
    }
    
    .mode-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .chat-messages-container {
        padding: 16px;
    }
    
    .chat-message-content {
        max-width: 85%;
        font-size: 13px;
    }
    
    .chat-input-area {
        padding: 16px;
    }
}


/* ========== ��ҵ��Ӫ֪ʶ������ģʽ��ʽ ========== */

.generate-form-container {
    width: 100%;
    height: 100%;
    padding: 16px;
    background: var(--bg);
    overflow-y: auto;
}

.generate-form-container .form-group {
    margin-bottom: 16px;
}

.generate-form-container .form-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.generate-form-container .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: border-color 0.3s ease;
}

.generate-form-container .form-textarea:focus {
    outline: none;
    border-color: #FF9500;
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
}

.generate-form-container .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.generate-form-container .form-select:focus {
    outline: none;
    border-color: #FF9500;
}

.generate-form-container .btn-generate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #FF9500 0%, #FF6B35 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.generate-form-container .btn-generate:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #FF9500 100%);
    box-shadow: 0 6px 16px rgba(255, 149, 0, 0.4);
    transform: translateY(-2px);
}

.generate-form-container .btn-generate:active {
    transform: translateY(0);
}

.generate-form-container .btn-generate svg {
    width: 18px;
    height: 18px;
}

/* 生成输出容器 */
.generate-output-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: none;
}

.generate-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.generate-output-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.generate-output-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.generate-output-close:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6464;
}

.generate-output-content {
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 16px;
}

.generate-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.6);
    padding: 20px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #58a6ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.generate-json {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.generate-json-item {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.generate-json-key {
    font-weight: 600;
    color: #58a6ff;
    min-width: 100px;
}

.generate-json-value {
    color: rgba(255, 255, 255, 0.9);
    word-break: break-all;
}

.generate-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.generate-text strong {
    color: #fff;
    font-size: 16px;
    display: block;
    margin: 16px 0 8px;
}

.generate-code {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #a5d6ff;
    margin: 12px 0;
}

.generate-error {
    color: #ff6464;
    padding: 20px;
    text-align: center;
}

.generate-output-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.generate-output-actions .btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.generate-output-actions .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 文件上传区域 */
.generate-form-container .upload-area {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.generate-form-container .upload-area:hover {
    border-color: #FF9500;
    background: rgba(255, 255, 255, 0.08);
}

.generate-form-container .file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.generate-form-container .upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.generate-form-container .upload-icon {
    font-size: 28px;
}

.generate-form-container .upload-text {
    font-size: 14px;
    color: #666;
}

.generate-form-container .upload-hint {
    font-size: 12px;
    color: #999;
}

.generate-form-container .file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #e8f5e9;
    border-radius: 8px;
    margin-top: 8px;
}

.generate-form-container .file-name {
    font-size: 14px;
    color: #2e7d32;
    word-break: break-all;
    flex: 1;
}

.generate-form-container .btn-remove-file {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 8px;
}

.generate-form-container .btn-remove-file:hover {
    background: #d32f2f;
}

/* ========== 星启航电商员工生成表单样式 ========== */

.generate-form {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.generate-form .form-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.generate-form .form-header h2 {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.generate-form .form-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    line-height: 1.5;
}

.generate-form .form-body {
    padding: 0 8px;
}

.generate-form .form-group {
    margin-bottom: 18px;
}

.generate-form .form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.generate-form .form-group .required {
    color: #ff6b6b;
}

.generate-form .form-control {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    transition: all 0.25s ease;
    font-family: inherit;
}

.generate-form .form-control:focus {
    outline: none;
    border-color: rgba(88, 166, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.generate-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.generate-form select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.generate-form select.form-control option {
    background: #1a1a2e;
    color: #fff;
}

.generate-form textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.generate-form .form-row {
    display: flex;
    gap: 14px;
}

.generate-form .form-row .form-group.half {
    flex: 1;
}

.generate-form .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.generate-form .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s;
}

.generate-form .checkbox-label:hover {
    background: rgba(255, 255, 255, 0.08);
}

.generate-form .checkbox-label input {
    display: none;
}

.generate-form .checkbox-label input:checked + span {
    color: #58a6ff;
}

.generate-form .checkbox-label input:checked ~ * {
    color: #58a6ff;
}

.generate-form .checkbox-label:has(input:checked) {
    background: rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.3);
}

.generate-form .checkbox-label span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.generate-form .switch-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.generate-form .switch-group span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.generate-form .switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.generate-form .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.generate-form .switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    transition: 0.3s;
}

.generate-form .switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.generate-form .switch input:checked + .slider {
    background: rgba(88, 166, 255, 0.4);
}

.generate-form .switch input:checked + .slider:before {
    transform: translateX(20px);
}

.generate-form .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.generate-form .btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.generate-form .btn-primary {
    background: linear-gradient(135deg, #58a6ff, #a371f7);
    color: #fff;
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.3);
}

.generate-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.4);
}

.generate-form .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.generate-form .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.generate-form .btn-upload {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.generate-form .btn-upload:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.generate-form .file-upload {
    display: flex;
    align-items: center;
}

