*{margin:0;padding:0;box-sizing:border-box}
html{height:100%}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;background:#f5f5f5;color:#333;line-height:1.6;padding:env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) 0 env(safe-area-inset-left, 0)}
#fixedHeader{display:none;position:fixed;top:0;left:50%;transform:translateX(-50%);width:100%;max-width:800px;background:#f5f5f5;z-index:100;box-shadow:0 2px 8px rgba(0,0,0,.1);padding:0}
.header{background:linear-gradient(135deg,#2196F3 0%,#1976D2 100%);color:#fff;padding:10px 16px;text-align:center;position:relative}
.app-title{font-size:18px;font-weight:700}
.header-actions{position:absolute;top:50%;transform:translateY(-50%);display:flex;gap:12px;align-items:center}
.header-actions.left{left:16px}.header-actions.right{right:16px}
.header-btn{background:none;border:none;color:#fff;font-size:20px;cursor:pointer;display:flex;align-items:center;gap:4px;padding:4px;border-radius:4px;transition:background .2s}
.header-btn:hover{background:rgba(255,255,255,.2)}
.search-area{display:flex;align-items:center;padding:8px 16px;gap:8px;background:#fff}
.search-box{flex:1;padding:8px 12px;border:2px solid #e0e0e0;border-radius:8px;font-size:14px}
.search-box:focus{outline:none;border-color:#2196F3}
.category-select{padding:8px;border:2px solid #e0e0e0;border-radius:8px;background:#fff;font-size:14px;color:#333}
.container{max-width:800px;margin:0 auto;padding:110px 16px 16px;background:#fff;min-height:100vh}
html.html-agent-active{overflow:hidden}
body:not(.agent-active){overflow:auto}
body:not(.agent-active) .container{overflow:visible}
@media(max-width:768px){.container{padding:110px 12px 16px}.search-area{padding:8px 12px}}
.function-list{display:none}.function-list.active{display:block}
.function-item{background:#f8f9fa;border-radius:8px;padding:16px;margin-bottom:12px;border-left:3px solid #4CAF50;cursor:pointer;transition:all .2s;position:relative}
.function-item:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.1)}
.function-name{font-size:18px;font-weight:600;color:#2196F3;margin-bottom:6px}
.function-syntax{background:#e8f5e9;padding:8px 12px;border-radius:6px;font-family:'Courier New',monospace;font-size:14px;color:#2E7D32;margin-bottom:8px;border-left:3px solid #4CAF50;overflow-wrap:break-word;word-break:break-word;white-space:normal}
.function-desc{font-size:14px;color:#666}
.item-actions{position:absolute;top:8px;right:12px;display:flex;gap:8px}
.item-actions button{background:none;border:none;font-size:18px;cursor:pointer;color:#666;transition:color .2s;padding:2px}
.item-actions button:hover{color:#2196F3}
.item-actions .favorited{color:#FF9800}
.item-actions .noted{color:#4CAF50}
.modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);z-index:1000;align-items:center;justify-content:center}
.modal.active{display:flex}
.modal-content{background:#fff;width:90%;max-width:500px;border-radius:12px;padding:24px;max-height:80vh;overflow-y:auto}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.modal-title{font-size:20px;font-weight:600;color:#2196F3}
.close-btn{background:none;border:none;font-size:24px;color:#666;cursor:pointer}
.detail-item{margin-bottom:16px}.detail-label{font-weight:600;color:#555;margin-bottom:4px}
.detail-value{padding:8px 12px;background:#f5f5f5;border-radius:6px}
#noteModal .note-textarea{width:100%;min-height:120px;padding:10px;border:2px solid #e0e0e0;border-radius:8px;resize:vertical;font-size:14px}
#noteModal .note-textarea:focus{outline:none;border-color:#2196F3}
.note-actions{display:flex;gap:10px;margin-top:15px;justify-content:flex-end}
.login-content{background:#fff;padding:24px 36px 20px;border-radius:12px;width:90%;max-width:420px;box-shadow:0 10px 30px rgba(0,0,0,.3);text-align:center}
.login-title{color:#1a8cff;font-size:24px;font-weight:700;margin-bottom:10px;text-align:center}
.login-brand-desc{font-size:14px;color:#666666;text-align:center;margin-bottom:8px}
.login-brand-target{font-size:12px;color:#999999;text-align:center}
.login-divider{width:100%;height:0;border-top:1px solid #f0f0f0;margin:16px 0}
.login-label{display:block;font-size:14px;font-weight:500;color:#333333;margin-bottom:8px;text-align:left}
#loginForm .login-label{margin-top:24px}
#loginForm .login-label:first-of-type{margin-top:0}
.login-input{width:100%;height:46px;padding:0 12px;border:1px solid #dcdfe6;border-radius:8px;font-size:14px;color:#333}
.login-input::placeholder{color:#c0c4cc}
.login-input:focus{outline:none;border-color:#1a8cff}
.link-btn{background:none;border:none;color:#1a8cff;cursor:pointer;font-size:13px;text-decoration:none;padding:0}
.link-btn:hover{text-decoration:underline;color:#1a8cff}
.btn-primary{background:#1a8cff;color:#fff;border:none;height:50px;border-radius:8px;cursor:pointer;font-size:16px;font-weight:500;width:100%}
.btn-primary:disabled{background:#90CAF9;cursor:not-allowed}
.btn-secondary{background:#f5f5f5;border:1px solid #dcdfe6;color:#606266;height:50px;border-radius:8px;cursor:pointer;font-size:14px}
.btn-danger{background:#f44336;color:#fff;border:none;padding:12px;border-radius:6px;cursor:pointer;font-size:16px;width:100%}
.footer{text-align:center;padding:20px;color:#666;font-size:14px;border-top:1px solid #eee;margin-top:20px}
.example-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-top:8px;border:1px solid #eee;border-radius:8px}
.example-table{border-collapse:collapse;white-space:nowrap;min-width:100%}
.example-table th,.example-table td{border:1px solid #ddd;padding:8px 12px;text-align:center;white-space:nowrap}
.example-table th{background:#f0f0f0;font-weight:bold}
.download-btn{background:#FF9800;color:#fff;border:none;padding:10px 20px;border-radius:6px;cursor:pointer;margin-top:20px;width:100%;font-size:16px}
.function-note-preview{margin-top:8px;padding:6px 8px;background:#fff9c4;border-left:3px solid #ffc107;border-radius:4px;font-size:13px;color:#555;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer;word-break:break-all}
.menu-btn{background:none;border:none;color:#fff;font-size:24px;cursor:pointer;padding:4px;border-radius:4px;display:flex;align-items:center;gap:4px}
.menu-btn:hover{background:rgba(255,255,255,.2)}
.dropdown-panel{display:none;position:absolute;top:100%;left:0;background:#fff;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.2);z-index:300;min-width:180px;padding:8px 0}
.dropdown-panel.active{display:block}
.dropdown-panel button{display:block;width:100%;padding:10px 16px;border:none;background:none;text-align:left;font-size:14px;cursor:pointer;color:#333}
.dropdown-panel button:hover{background:#f0f0f0}
#practiceScenarioSelect{font-size:14px!important;width:160px!important;min-width:160px!important;max-width:160px!important}
.pc-input{width:100%;padding:10px 12px;border:2px solid #e0e0e0;border-radius:6px;font-size:14px;margin-bottom:12px}
.pc-input:focus{outline:none;border-color:#2196F3}
#loadingOverlay{position:fixed;inset:0;background:rgba(255,255,255,.96);z-index:5000;display:none;align-items:center;justify-content:center;flex-direction:column;gap:20px}
#loadingOverlay.active{display:flex}
.spinner{width:40px;height:40px;border:4px solid #e0e0e0;border-top-color:#2196F3;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.subpage-header{position:sticky;top:0;z-index:120;background:rgba(245,245,245,.95);backdrop-filter:blur(4px);box-shadow:0 2px 8px rgba(0,0,0,.1);padding:8px 16px;display:flex;align-items:center;gap:8px}
.subpage-header h2{color:#2196F3;font-size:15px;margin:0}
.subpage-header button{background:none;border:none;font-size:15px;color:#1a8cff;cursor:pointer;padding:4px 8px;white-space:nowrap}
.link-btn{background:none;border:none;color:#1a8cff;cursor:pointer;font-size:13px;text-decoration:none;padding:0}
.link-btn:hover{color:#1a8cff;text-decoration:underline}
.msg-box{display:none;margin-top:15px;padding:12px;border-radius:6px;font-size:14px}
.msg-error{background:#FFEBEE;border-left:4px solid #f44336;color:#c62828}
.msg-success{background:#E8F5E9;border-left:4px solid #4CAF50;color:#2E7D32}
.msg-info{background:#FFF3E0;border-left:4px solid #FF9800;color:#333}
/* ★ 智能体入口横条 */
.agent-banner{background:linear-gradient(135deg,#2196F3 0%,#1976D2 100%);border:none;border-radius:12px;padding:14px 16px;margin:20px 0 8px;display:flex;align-items:center;gap:10px;cursor:pointer;position:relative;transition:all .25s;box-shadow:0 2px 8px rgba(33,150,243,.3);color:#fff}
.agent-banner:hover{border:none;box-shadow:0 4px 16px rgba(33,150,243,.4);transform:translateY(-1px)}
.agent-banner-icon{font-size:24px}
.agent-banner-text{flex:1;font-size:16px;font-weight:600;text-align:center;color:#fff}
.agent-banner-arrow{font-size:20px;color:rgba(255,255,255,.8);transition:transform .2s}
.agent-banner:hover .agent-banner-arrow{transform:translateX(3px);color:#fff}
.agent-badge{position:absolute;top:-8px;right:-8px;background:#f44336;color:#fff;font-size:11px;padding:2px 8px;border-radius:10px;font-weight:700;box-shadow:0 2px 6px rgba(244,67,54,.4);animation:agentPulse 1.5s infinite}
@keyframes agentPulse{0%,100%{opacity:1}50%{opacity:.6}}
/* 工单未读红点 */
.ticket-unread-dot{display:inline-block;width:8px;height:8px;background:#f44336;border-radius:50%;margin-left:4px;vertical-align:middle}
/* 底部Tab未读红点 */
.tab-unread-dot{position:absolute;top:-4px;right:-6px;width:8px;height:8px;background:#f44336;border-radius:50%;pointer-events:none}
/* 子Tab未读红点 */
.sub-tab-unread-dot{display:inline-block;width:6px;height:6px;background:#f44336;border-radius:50%;margin-left:2px;vertical-align:middle}
/* ★ 智能体视图 */
#excelAgentView{display:none;flex-direction:column;background:#fff}
#excelAgentView .credits-bar{flex-shrink:0}
#excelAgentView .agent-panel{flex:1;overflow:hidden;min-height:0;display:flex;flex-direction:column}
#excelAgentView .chat-messages{flex:1;overflow-y:auto;padding:16px;-webkit-overflow-scrolling:touch;min-height:0}
#excelAgentView .chat-input-area{flex-shrink:0;border-top:1px solid #e8edf2;background:#fff;padding-bottom:calc(10px + env(safe-area-inset-bottom, 0))}

/* 智能助手/工具中心全屏布局 */
body.showing-agent .container,
body.showing-tools .container{
    padding-top:48px!important;
    padding-left:0!important;
    padding-right:0!important;
    min-height:auto!important;
    height:calc(100dvh - 48px)!important;
    height:calc(var(--vh, 100vh) - 48px)!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
}
/* 工作台激活时去掉容器padding */
body.showing-tools.workbench-active .container{
    padding-top:0!important;
    height:100dvh!important;
    height:var(--vh, 100vh)!important;
}
body.showing-agent #excelAgentView{flex:1!important;overflow:hidden}
body.showing-tools #toolCenterView{flex:1!important;overflow:hidden}
body.showing-tools #toolWorkbenchView{flex:1!important;overflow:hidden}
.agent-nav{background:linear-gradient(135deg,#2196F3 0%,#1976D2 100%);color:#fff;padding:12px 16px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(0,0,0,.15);flex-shrink:0}
.agent-nav h2{text-align:center;font-size:17px;margin:0}
.credits-bar{background:#E3F2FD;padding:10px 16px;font-size:14px;color:#1565C0;border-bottom:1px solid #BBDEFB;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.credits-zero{color:#f44336!important;font-weight:600}
.agent-tabs{display:flex;background:#fff;border-bottom:2px solid #f0f0f0;flex-shrink:0}
.agent-tab{flex:1;text-align:center;padding:12px 0;font-size:15px;color:#999;cursor:pointer;border-bottom:3px solid transparent;transition:all .2s;user-select:none}
.agent-tab.active{color:#2196F3;border-bottom-color:#2196F3;font-weight:600}
.agent-panel{display:none;flex:1;overflow:hidden;min-height:0}
.agent-panel.active{display:flex;flex-direction:column}
.chat-messages{padding:16px;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;min-height:0}
.chat-msg{margin-bottom:16px;display:flex;flex-direction:column}
.chat-msg.user{align-items:flex-end}
.chat-msg.assistant{align-items:flex-start}
.chat-bubble{max-width:85%;padding:10px 14px;border-radius:12px;font-size:14px;line-height:1.6;word-break:break-word;white-space:pre-wrap}
.chat-bubble.user{background:#2196F3;color:#fff;border-bottom-right-radius:4px}
.chat-bubble.assistant{background:#f0f0f0;color:#333;border-bottom-left-radius:4px}
.chat-time{font-size:11px;color:#999;margin-top:4px;padding:0 4px}
.chat-msg.user .chat-time{text-align:right}
.chat-meta{display:flex;align-items:center;gap:8px;margin-top:4px}
.chat-copy-btn{background:none;border:1px solid #ddd;padding:2px 10px;border-radius:4px;font-size:12px;color:#666;cursor:pointer;transition:all .2s;min-height:24px;min-width:44px}
.chat-copy-btn:hover{background:#e0e0e0}
.chat-copy-btn:active{background:#ccc;transform:scale(0.95)}
.credits-info{font-size:11px;color:#999;margin-top:6px;padding-top:6px;border-top:1px solid rgba(0,0,0,0.06)}
.chat-ticket-link{font-size:11px;color:#bbb;margin-left:8px;white-space:nowrap}
.chat-ticket-link-text{color:#999;text-decoration:none;cursor:pointer}
.chat-ticket-link-text:hover{color:#2196F3;text-decoration:underline}
.chat-input-area{width:100%;background:#fff;padding:10px 14px;padding-bottom:calc(10px + env(safe-area-inset-bottom, 0));border-top:1px solid #e8edf2;display:flex;gap:8px;align-items:center;flex-shrink:0}
.chat-textarea{flex:1;border:2px solid #e0e0e0;border-radius:8px;padding:10px;font-size:14px;resize:none;min-height:56px;max-height:140px;overflow-y:auto;font-family:inherit;line-height:1.4}
.chat-textarea:focus{outline:none;border-color:#2196F3}
.chat-send-btn{background:#2196F3;color:#fff;border:none;padding:10px 20px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s;flex-shrink:0}
.chat-send-btn:hover{background:#1976D2}
.chat-send-btn:disabled{background:#90CAF9;cursor:not-allowed}
.process-file-info{margin:0 16px;padding:10px 14px;background:#e8f5e9;border-radius:8px;display:none;align-items:center;justify-content:space-between;font-size:14px}
.process-file-info button{background:none;border:none;color:#999;font-size:18px;cursor:pointer;padding:2px 6px}
.process-file-info button:hover{color:#f44336}
.credits-modal-body{text-align:center;padding:24px 24px 20px}
.credits-modal-body .credits-icon{font-size:48px;margin-bottom:12px}
.credits-modal-body .credits-msg{font-size:15px;color:#666;margin-bottom:20px;line-height:1.6}
.credits-url-box{background:#f5f5f5;padding:12px;border-radius:8px;word-break:break-all;margin-bottom:16px;font-size:13px;color:#555;border:1px solid #eee}
#appToast{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.75);color:#fff;padding:12px 24px;border-radius:8px;font-size:14px;z-index:9999;max-width:80%;text-align:center;opacity:0;transition:opacity .3s;pointer-events:none}
/* 问答模式上传按钮 */
.chat-attach-btn{background:#f5f5f5;color:#666;border:2px solid #ddd;padding:6px 10px;border-radius:6px;font-size:20px;font-weight:700;cursor:pointer;flex-shrink:0;transition:all .2s;min-width:36px;height:36px;display:flex;align-items:center;justify-content:center;line-height:1}
.chat-attach-btn:hover{background:#e0e0e0;border-color:#ccc;color:#333}
.chat-attach-btn:active{transform:scale(0.95)}
.chat-attachments{display:flex;flex-wrap:nowrap;gap:8px;padding:8px 16px;overflow-x:auto;-webkit-overflow-scrolling:touch;flex-shrink:0}
.chat-attachment-item{display:flex;align-items:center;gap:6px;background:#f5f5f5;border:1px solid #ddd;border-radius:6px;padding:4px 8px;font-size:12px;max-width:200px}
.chat-attachment-item img{width:32px;height:32px;object-fit:cover;border-radius:4px}
.chat-attachment-item .attach-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:120px}
.chat-attachment-item .attach-remove{background:none;border:none;color:#999;font-size:16px;cursor:pointer;padding:0 2px;line-height:1}
.chat-attachment-item .attach-remove:hover{color:#f44336}
/* 处理结果说明 */
.process-result-desc{margin:0 16px 12px;padding:12px;background:#FFF3E0;border-left:4px solid #FF9800;border-radius:4px;font-size:14px;color:#555;line-height:1.6}
.process-result-desc strong{color:#E65100}
/* 气泡内附件展示 */
.bubble-attachments{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.bubble-attachment-item{display:inline-flex;align-items:center;gap:4px;background:rgba(255,255,255,.2);border-radius:6px;padding:3px 8px;font-size:11px;max-width:160px}
.chat-bubble.user .bubble-attachment-item{background:rgba(255,255,255,.2);color:#fff}
.chat-bubble.assistant .bubble-attachment-item{background:#e0e0e0;color:#333}
.bubble-attachment-item .attach-icon{width:18px;height:18px;flex-shrink:0}
.bubble-attachment-item .attach-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:110px}
/* 加载气泡 */
.chat-bubble.loading{background:#f0f0f0;color:#666;border-bottom-left-radius:4px;display:flex;align-items:center;gap:8px}
.loading-dots{display:inline-flex;gap:3px}
.loading-dots span{width:6px;height:6px;background:#999;border-radius:50%;animation:loadingDot 1.4s infinite both}
.loading-dots span:nth-child(2){animation-delay:.2s}
.loading-dots span:nth-child(3){animation-delay:.4s}
@keyframes loadingDot{0%,80%,100%{transform:scale(.4);opacity:.4}40%{transform:scale(1);opacity:1}}
/* 下载卡片（嵌在AI气泡内） */
.download-card{display:flex;align-items:center;gap:10px;background:#E8F5E9;border:1px solid #A5D6A7;border-radius:8px;padding:10px 12px;margin-top:8px;cursor:pointer;text-decoration:none;color:#2E7D32;transition:all .2s}
.download-card:hover{background:#C8E6C9;border-color:#81C784}
.download-card .dl-icon{font-size:22px;flex-shrink:0}
.download-card .dl-info{flex:1;min-width:0}
.download-card .dl-label{font-size:12px;color:#666}
.download-card .dl-name{font-size:13px;font-weight:600;color:#2E7D32;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 改动说明 */
.change-desc{margin-top:8px;padding:8px 10px;background:#FFF3E0;border-left:3px solid #FF9800;border-radius:4px;font-size:13px;color:#555;line-height:1.5}
.change-desc strong{color:#E65100}
/* 处理文件标签 */
.process-file-tag{display:inline-flex;align-items:center;gap:4px;background:#E3F2FD;border-radius:6px;padding:2px 8px;font-size:11px;color:#1565C0;margin-bottom:4px}
.process-file-tag .tag-icon{font-size:13px}
/* 协议勾选区 */
.agreement-check{display:flex;align-items:flex-start;gap:6px;margin-bottom:16px;text-align:left;font-size:12px;color:#666;line-height:1.5}
.agreement-check input[type="checkbox"]{margin-top:2px;flex-shrink:0;cursor:pointer;width:14px;height:14px}
.agreement-check label{cursor:pointer}
.agreement-link{color:#1a8cff;text-decoration:none;cursor:pointer}
.agreement-link:hover{text-decoration:underline}
/* 协议模态弹窗 */
.agreement-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);z-index:2000;align-items:center;justify-content:center}
.agreement-modal.active{display:flex}
.agreement-content{background:#fff;border-radius:12px;width:90%;max-width:500px;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 10px 30px rgba(0,0,0,.3)}
.agreement-header{padding:20px 24px 12px;text-align:center;border-bottom:1px solid #f0f0f0;flex-shrink:0}
.agreement-header h3{font-size:18px;color:#333;margin:0}
.agreement-body{padding:16px 24px;overflow-y:auto;flex:1;font-size:13px;color:#555;line-height:1.8;text-align:left}
.agreement-body h4{font-size:14px;color:#333;margin:16px 0 8px;font-weight:600}
.agreement-body h4:first-of-type{margin-top:0}
.agreement-body p{margin:0 0 10px}
.agreement-footer{padding:12px 24px 20px;text-align:center;border-top:1px solid #f0f0f0;flex-shrink:0}
.login-icp-footer{margin:0 auto;text-align:center;width:100%}
.login-operator{font-size:12px;color:#aaaaaa;text-align:center;line-height:2;margin:0}
.login-icp-link{font-size:12px;color:#aaaaaa;text-decoration:none;display:block;text-align:center;line-height:2}
.login-icp-link:hover{color:#999999;text-decoration:underline}
/* 联网备案样式 */
.login-mps-footer{margin:0 auto;text-align:center;width:100%}
.login-mps-link{font-size:12px;color:#aaaaaa;text-decoration:none;display:inline-flex;align-items:center;gap:4px;line-height:2}
.login-mps-link:hover{color:#999999;text-decoration:underline}
.mps-icon{width:16px;height:16px;vertical-align:middle}
/* 登录卡片载入动画 */
@keyframes cardFadeIn{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
@keyframes elFadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
.anim-card{animation:cardFadeIn 0.5s ease forwards}
.anim-el{opacity:0;animation:elFadeIn 0.4s ease forwards}
.anim-d1{animation-delay:0.1s}
.anim-d2{animation-delay:0.15s}
.anim-d3{animation-delay:0.2s}
.anim-d4{animation-delay:0.3s}
.anim-d5{animation-delay:0.35s}
.anim-d6{animation-delay:0.4s}
.anim-d7{animation-delay:0.45s}
.anim-d8{animation-delay:0.5s}
.anim-d9{animation-delay:0.55s}
/* 个人中心页面 */
.pc-page{padding:20px 16px;background:#f5f7fa;min-height:100vh}
.pc-header{background:#fff;height:50px;display:flex;align-items:center;padding:0 16px;box-shadow:0 1px 4px rgba(0,0,0,.06);position:sticky;top:0;z-index:10}
.pc-header h2{font-size:16px;font-weight:600;color:#333;margin:0}
.pc-header button{background:none;border:none;font-size:15px;color:#1a8cff;cursor:pointer;padding:4px 8px}
.pc-card{background:#fff;border:1px solid #f0f0f0;border-radius:10px;padding:24px}
.pc-card-title{font-size:16px;font-weight:600;color:#333;margin-bottom:16px}
.pc-card-account{background:#f9fafc;border:1px solid #eef1f6;border-radius:10px;padding:20px}
.pc-card-account .pc-card-title{margin-bottom:12px}
.pc-card-account p{font-size:14px;color:#666;margin:0 0 8px 0}
.pc-card-account p:last-child{margin-bottom:0}
.pc-label{display:block;font-size:14px;font-weight:500;color:#333;margin-bottom:8px}
.pc-input{width:100%;height:44px;padding:0 12px;border:1px solid #dcdfe6;border-radius:8px;font-size:14px;color:#333}
.pc-input::placeholder{color:#c0c4cc}
.pc-input:focus{outline:none;border-color:#1a8cff}
.pc-form-item{margin-bottom:18px}
.pc-form-item:last-of-type{margin-bottom:0}
.pc-btn{width:100%;height:40px;background:#1a8cff;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:14px;font-weight:500;margin-top:20px}
.pc-btn:disabled{background:#90CAF9;cursor:not-allowed}
.pc-divider{border:none;border-top:1px solid #f0f0f0;margin:24px 0}
.pc-logout{text-align:center;padding-bottom:40px}
.pc-logout-btn{width:100%;height:40px;background:#fff;color:#f56c6c;border:1px solid #f0f0f0;border-radius:8px;cursor:pointer;font-size:14px;font-weight:500;transition:all .2s}
.pc-logout-btn:hover{color:#e64242;border-color:#f56c6c}
.pc-two-col{display:flex;gap:24px;max-width:800px;margin:0 auto}
.pc-col-left{width:280px;flex-shrink:0}
.pc-col-right{flex:1;min-width:0}
@media(max-width:768px){
    .pc-two-col{flex-direction:column;gap:16px}
    .pc-col-left{width:100%}
}
/* 底部Tab导航栏 */
.bottom-tab-bar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:800px;height:56px;padding-bottom:env(safe-area-inset-bottom, 0);background:#fff;border-top:1px solid #e8edf2;box-shadow:0 -2px 8px rgba(0,0,0,.04);display:flex;z-index:200}
body.agent-active{height:100vh;height:100dvh;height:calc(var(--vh, 100vh));overflow:hidden;display:flex;flex-direction:column}
body.agent-active .container{display:flex;flex-direction:column;flex:1;height:100%;overflow:auto;min-height:0;padding:0!important;max-width:800px;margin:0 auto;width:100%}
body.agent-active .bottom-tab-bar{position:static;flex-shrink:0;transform:none;left:0;max-width:800px;margin:0 auto;width:100%}
.bottom-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;color:#999;transition:color .2s ease;position:relative;-webkit-tap-highlight-color:transparent}
.bottom-tab.active{color:#3b8cff}
.bottom-tab.active .bottom-tab-text{font-weight:600}
.bottom-tab.active::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:32px;height:3px;background:#3b8cff;border-radius:0 0 3px 3px}
.bottom-tab:not(.active):hover{color:#555}
.bottom-tab-icon{width:22px;height:22px}
.bottom-tab-text{font-size:12px;line-height:1}

/* ===== 工具中心：一级页面 - 工具大厅 ===== */
.tool-hall{display:none;flex:1;flex-direction:column;overflow:hidden}
.tool-hall.active{display:flex}
.hall-search{padding:10px 16px;background:#fff;border-bottom:1px solid #f0f0f0;flex-shrink:0}
.hall-search input{width:100%;padding:10px 14px;border:2px solid #e0e0e0;border-radius:10px;font-size:14px;background:#f8f9fa;transition:all .2s}
.hall-search input:focus{outline:none;border-color:#2196F3;background:#fff}
.hall-tabs{display:flex;padding:0 8px;background:#fff;border-bottom:1px solid #f0f0f0;overflow-x:auto;flex-shrink:0;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.hall-tabs::-webkit-scrollbar{display:none}
.hall-tab{padding:12px 16px;font-size:14px;color:#999;cursor:pointer;white-space:nowrap;border-bottom:3px solid transparent;transition:all .2s;user-select:none;flex-shrink:0}
.hall-tab.active{color:#2196F3;border-bottom-color:#2196F3;font-weight:600}
.hall-tab:not(.active):hover{color:#555}
.hall-grid{flex:1;overflow-y:auto;padding:16px 16px 60px 16px;display:grid;grid-template-columns:repeat(2,1fr);gap:12px;align-content:start;-webkit-overflow-scrolling:touch}
@media(min-width:600px){.hall-grid{grid-template-columns:repeat(3,1fr)}}
.hall-empty{grid-column:1/-1;text-align:center;padding:60px 20px;color:#bbb}
.hall-empty-icon{font-size:48px;margin-bottom:12px}
.hall-empty-text{font-size:15px}

/* 工具卡片 */
.hall-card{background:#fff;border-radius:12px;padding:16px;box-shadow:0 2px 8px rgba(0,0,0,.06);cursor:pointer;transition:all .2s;position:relative;border:1px solid #f0f0f0}
.hall-card:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0,0,0,.1);border-color:#2196F3}
.hall-card-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:8px}
.hall-card-icon{font-size:32px;line-height:1}.hall-card-icon svg{display:block}
.hall-card-badge{font-size:11px;padding:2px 8px;border-radius:10px;font-weight:700;flex-shrink:0}
.hall-badge-hot{background:#FFEBEE;color:#f44336}
.hall-badge-new{background:#E8F5E9;color:#2E7D32}
.hall-card-name{font-size:16px;font-weight:600;color:#333;margin-bottom:4px}
.hall-card-desc{font-size:13px;color:#888;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ===== Excel查错工作台 ===== */
.tool-workbench{display:none;flex:1;flex-direction:column;overflow:hidden;background:#f5f7fa}
.tool-workbench.active{display:flex}
.tool-workbench-header{background:linear-gradient(135deg,#2196F3 0%,#1976D2 100%);color:#fff;padding:12px 16px;display:flex;align-items:center;gap:12px;flex-shrink:0}
.tool-workbench-title{font-size:17px;font-weight:600;flex:1}
.tool-workbench-badge{font-size:20px}
.tool-back-btn{background:rgba(255,255,255,.2);border:none;color:#fff;font-size:18px;cursor:pointer;padding:6px 12px;border-radius:6px}
.tool-back-btn:hover{background:rgba(255,255,255,.3)}

/* Sticky顶部固定区域 */
.diag-sticky-header{position:sticky;top:0;z-index:100;flex-shrink:0}
/* 功能说明区域 */
.diag-intro{background:#E3F2FD;padding:16px;border-bottom:1px solid #BBDEFB}
.diag-intro-title{font-size:16px;font-weight:600;color:#1565C0;margin-bottom:4px}
.diag-intro-desc{font-size:14px;color:#1976D2;margin-bottom:10px}
.diag-intro-features{display:flex;flex-direction:column;gap:6px}
.diag-intro-feature{font-size:13px;color:#333;line-height:1.4}

/* 可滚动内容区域 */
.diag-scroll-content{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}

/* 步骤指示器 */
.diagnosis-steps{display:flex;align-items:center;justify-content:center;padding:16px 20px;background:#fff;border-bottom:1px solid #f0f0f0;flex-shrink:0;gap:0}
.diagnosis-step{display:flex;flex-direction:column;align-items:center;gap:4px;opacity:.5;transition:opacity .2s}
.diagnosis-step.active{opacity:1}
.diagnosis-step.completed{opacity:.7}
.diagnosis-step .step-dot{width:28px;height:28px;border-radius:50%;background:#e0e0e0;color:#999;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600}
.diagnosis-step.active .step-dot{background:#2196F3;color:#fff}
.diagnosis-step.completed .step-dot{background:#4CAF50;color:#fff}
.diagnosis-step span{font-size:11px;color:#666;white-space:nowrap}
.step-line{width:30px;height:2px;background:#e0e0e0;margin:0 4px;flex-shrink:0;margin-bottom:18px}

/* 表单区域 */
.diagnosis-form{flex:1;overflow-y:auto;padding:16px;-webkit-overflow-scrolling:touch}
.diagnosis-section{background:#fff;border-radius:12px;padding:16px;margin-bottom:12px;box-shadow:0 2px 6px rgba(0,0,0,.04)}
.diag-section-title{font-size:16px;font-weight:600;color:#333;margin-bottom:8px;display:flex;align-items:center;gap:6px}
.diag-section-hint{font-size:13px;color:#999;margin-bottom:12px}
.diag-form-row{margin-bottom:12px}.diag-form-row label{display:block;font-weight:600;color:#555;margin-bottom:4px;font-size:13px}
.diag-location-help,.diag-description-help{font-size:12px;color:#666;background:#f8f9fa;padding:10px 12px;border-radius:8px;margin-bottom:12px;line-height:1.6}

/* 上传区域 */
.diag-upload-area{border:2px dashed #ddd;border-radius:12px;padding:32px 16px;text-align:center;cursor:pointer;transition:all .2s}
.diag-upload-area:hover{border-color:#2196F3;background:#f0f9ff}
.diag-upload-icon{font-size:40px;margin-bottom:8px}
.diag-upload-text{font-size:15px;color:#666;margin-bottom:4px}
.diag-upload-hint{font-size:12px;color:#bbb;line-height:1.6}

/* 文件卡片 */
.diag-file-list{margin-top:12px}
.diag-file-card{display:flex;align-items:center;gap:10px;background:#f0f9ff;border:1px solid #BBDEFB;border-radius:8px;padding:10px 12px}
.diag-file-icon{font-size:24px;flex-shrink:0}
.diag-file-info{flex:1;min-width:0}
.diag-file-name{font-size:14px;font-weight:600;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.diag-file-size{font-size:12px;color:#999}
.diag-file-remove{background:none;border:none;color:#999;font-size:20px;cursor:pointer;padding:4px}
.diag-file-remove:hover{color:#f44336}

/* 定位输入 */
.diag-input{width:100%;padding:10px 14px;border:2px solid #e0e0e0;border-radius:8px;font-size:14px;transition:border-color .2s}
.diag-input:focus{outline:none;border-color:#2196F3}
.diag-location-examples{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.diag-example{background:#f0f0f0;border:1px solid #e0e0e0;border-radius:16px;padding:4px 12px;font-size:12px;color:#666;cursor:pointer;transition:all .2s}
.diag-example:hover{background:#E3F2FD;border-color:#2196F3;color:#1565C0}

/* 问题描述 */
.diag-textarea{width:100%;padding:10px 14px;border:2px solid #e0e0e0;border-radius:8px;font-size:14px;resize:vertical;min-height:80px;font-family:inherit;line-height:1.5}
.diag-textarea:focus{outline:none;border-color:#2196F3}
.diag-textarea-count{text-align:right;font-size:12px;color:#999;margin-top:4px}

/* 模式选择 */
.diag-mode-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.diag-mode-option{cursor:pointer}
.diag-mode-option.disabled{opacity:.4;cursor:not-allowed}
.diag-mode-option input{display:none}
.diag-mode-card{padding:14px 12px;border:2px solid #e0e0e0;border-radius:10px;text-align:center;transition:all .2s}
.diag-mode-option.active .diag-mode-card{border-color:#2196F3;background:#f0f9ff}
.diag-mode-icon{font-size:28px;margin-bottom:4px}
.diag-mode-name{font-size:14px;font-weight:600;color:#333;margin-bottom:2px}
.diag-mode-desc{font-size:12px;color:#999}
.diag-mode-hint{font-size:12px;margin-top:8px;text-align:center}

/* 提交栏 */
.diagnosis-submit-bar{padding:12px 16px;background:#fff;border-top:1px solid #f0f0f0;flex-shrink:0}
.diag-submit-btn{width:100%;padding:14px;background:linear-gradient(135deg,#2196F3 0%,#1976D2 100%);color:#fff;border:none;border-radius:10px;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center;gap:8px}
.diag-submit-btn:disabled{background:#ccc;cursor:not-allowed}
.diag-submit-loading{display:flex;align-items:center;gap:8px}
.diag-submit-loading .loading-dots{display:inline-flex;gap:3px}
.diag-submit-loading .loading-dots span{width:6px;height:6px;background:#fff;border-radius:50%;animation:loadingDot 1.4s infinite both}
.diag-submit-loading .loading-dots span:nth-child(2){animation-delay:.2s}
.diag-submit-loading .loading-dots span:nth-child(3){animation-delay:.4s}
@keyframes loadingDot{0%,80%,100%{transform:scale(0)}40%{transform:scale(1)}}

/* PPT场景选项 */
.ppt-scene-options{grid-template-columns:repeat(3,1fr)}

/* PPT色块选择器 */
.ppt-color-options{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.ppt-color-option{cursor:pointer;text-align:center;transition:all .2s;position:relative}
.ppt-color-option.active .ppt-color-swatch{border-color:#2196F3;box-shadow:0 0 0 2px #2196F3}
.ppt-color-swatch{width:100%;height:40px;border-radius:8px;border:2px solid #e0e0e0;transition:all .2s}
.ppt-color-name{font-size:12px;color:#666;margin-top:4px}
.ppt-color-custom-swatch{display:flex;align-items:center;justify-content:center;background:#f5f5f5!important}
.ppt-color-plus{font-size:20px;color:#999;font-weight:300}

/* PPT背景模式 */
.ppt-bg-mode-options{grid-template-columns:1fr 1fr}
.ppt-bg-ratio-tip{display:flex;align-items:center;gap:6px;padding:8px 12px;background:#E3F2FD;border-radius:8px;font-size:12px;color:#1565C0;margin-bottom:12px;line-height:1.5}
.ppt-bg-ratio-icon{font-size:14px;flex-shrink:0}
.ppt-bg-upload-item{margin-top:12px}
.ppt-bg-upload-label{font-size:13px;font-weight:600;color:#555;margin-bottom:6px;display:flex;align-items:center;gap:4px}
.ppt-bg-required{color:#f44336}
.ppt-bg-label-hint{font-weight:400;color:#999;font-size:12px;margin-left:4px}
.ppt-bg-upload-area{position:relative;border:2px dashed #ddd;border-radius:10px;padding:16px;text-align:center;cursor:pointer;transition:all .2s;min-height:80px;display:flex;align-items:center;justify-content:center}
.ppt-bg-upload-area:hover{border-color:#2196F3;background:#f0f9ff}
.ppt-bg-upload-area.has-image{border-style:solid;border-color:#4CAF50;padding:0}
.ppt-bg-upload-icon{font-size:32px;margin-bottom:4px}
.ppt-bg-upload-text{font-size:13px;color:#666}
.ppt-bg-upload-hint{font-size:11px;color:#bbb;margin-top:2px}
.ppt-bg-preview{width:100%;max-height:120px;object-fit:cover;border-radius:8px;display:block}
.ppt-bg-remove-btn{position:absolute;top:6px;right:6px;width:24px;height:24px;border-radius:50%;background:rgba(0,0,0,.5);color:#fff;border:none;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:1}
.ppt-bg-remove-btn:hover{background:rgba(244,67,54,.8)}

/* PPT页数选项 */
.ppt-page-options{grid-template-columns:repeat(3,1fr)}

/* 结果区域 */
.diagnosis-result{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:16px;padding-bottom:120px}
.diagnosis-result-content{}
.diag-result-actions{display:flex;gap:10px;margin-bottom:16px}
.diag-result-back-btn,.diag-result-new-btn{flex:1;padding:12px;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer}
.diag-result-back-btn{background:#2196F3;color:#fff}
.diag-result-new-btn{background:#f0f0f0;color:#333}
.diag-result-card{background:#fff;border-radius:12px;padding:20px;box-shadow:0 2px 8px rgba(0,0,0,.06);margin-bottom:12px}
.diag-result-card h3{font-size:17px;margin:0 0 12px 0;color:#333}
.diag-result-changes{background:#FFF3E0;border-left:4px solid #FF9800;border-radius:6px;padding:12px;margin-bottom:12px;font-size:14px;line-height:1.6}
.diag-result-changes strong{color:#E65100;display:block;margin-bottom:4px}
.diag-result-answer{font-size:14px;line-height:1.7;color:#333}

/* 思考中动画 */
.thinking-bubble{display:flex;align-items:center;gap:8px}
.thinking-animation{display:flex;gap:4px}
.thinking-dot{width:6px;height:6px;border-radius:50%;background:#999;animation:thinkingBounce 1.4s infinite ease-in-out}
.thinking-dot:nth-child(1){animation-delay:-0.32s}
.thinking-dot:nth-child(2){animation-delay:-0.16s}
@keyframes thinkingBounce{0%,80%,100%{transform:scale(0)}40%{transform:scale(1)}}
.thinking-timer{font-size:12px;color:#999}
/* 警告消息 */
.warning-msg{color:#E65100;background:#FFF3E0;padding:8px 12px;border-radius:6px;border-left:3px solid #FF9800}
/* Markdown 表格 */
.table-wrapper{overflow-x:auto;margin:8px 0;-webkit-overflow-scrolling:touch}
.md-table{width:100%;border-collapse:collapse;font-size:13px;white-space:nowrap}
.md-table th,.md-table td{padding:6px 12px;border:1px solid #ddd;text-align:left}
.md-table th{background:#f5f5f5;font-weight:600;position:sticky;left:0}
.md-table tr:nth-child(even){background:#fafafa}
.md-table tr:hover{background:#f0f7ff}
/* 行内代码 */
.inline-code{background:#f0f0f0;padding:1px 5px;border-radius:3px;font-family:monospace;font-size:12px;color:#c7254e}

/* ===== 需求反馈 ===== */
.demand-view{display:none;flex:1;flex-direction:column;overflow:hidden;background:#f5f5f5;position:relative;max-width:800px;margin:0 auto;width:100%}
.demand-view.active{display:flex}
.demand-credits-bar{background:#E3F2FD;padding:10px 16px;font-size:14px;color:#1565C0;border-bottom:1px solid #BBDEFB;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;position:sticky;top:0;z-index:10}
.credit-history-btn{background:#1565C0;border:none;color:#fff;padding:2px 10px;border-radius:4px;font-size:13px;cursor:pointer;white-space:nowrap}
.demand-list{flex:1;overflow-y:auto;padding:16px;padding-bottom:calc(16px + 56px);-webkit-overflow-scrolling:touch}
.demand-empty{text-align:center;padding:60px 20px;color:#bbb}
.demand-empty-icon{font-size:48px;margin-bottom:12px}
.demand-empty-text{font-size:15px}
.demand-card{background:#fff;border-radius:12px;padding:16px;margin-bottom:12px;box-shadow:0 2px 8px rgba(0,0,0,.05)}
.demand-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.demand-card-no{font-size:13px;color:#999}
.demand-card-status{font-size:12px;padding:2px 8px;border-radius:4px;font-weight:600}
.demand-card-status.pending{background:#FFF3E0;color:#E65100}
.demand-card-status.approved{background:#E8F5E9;color:#2E7D32}
.demand-card-status.rejected{background:#FFEBEE;color:#c62828}
.demand-card-status.processing{background:#E3F2FD;color:#1565C0}
.demand-card-status.done{background:#E8F5E9;color:#2E7D32}
.demand-card-status.closed{background:#F5F5F5;color:#999}
.demand-card-title{font-size:16px;font-weight:600;color:#333;margin-bottom:8px;text-align:left}
.demand-card-desc{font-size:14px;color:#666;line-height:1.6;text-align:left;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.demand-card-time{font-size:12px;color:#999;margin-top:8px;text-align:right}
.demand-card-remark{margin-top:10px;padding:8px 12px;background:#f0f7ff;border-left:3px solid #2196F3;border-radius:4px;font-size:13px;color:#1565C0;text-align:left}
.demand-subpage-header{background:linear-gradient(135deg,#2196F3 0%,#1976D2 100%);color:#fff;padding:0 16px;height:44px;line-height:44px;display:flex;align-items:center;flex-shrink:0}
.demand-form{flex:1;overflow-y:auto;padding:16px;padding-bottom:calc(16px + 56px);background:#fff}
.demand-empty-hint{font-size:13px;color:#9BA8B7;margin-top:8px}

/* 子Tab切换栏 */
.demand-sub-tabs{display:flex;background:#fff;border-bottom:1px solid #eee;flex-shrink:0}
.demand-sub-tab{flex:1;text-align:center;padding:12px 0;font-size:14px;font-weight:500;color:#999;cursor:pointer;position:relative;transition:color .2s}
.demand-sub-tab.active{color:#2196F3;font-weight:600}
.demand-sub-tab.active::after{content:'';position:absolute;bottom:0;left:20%;width:60%;height:3px;background:#2196F3;border-radius:2px}
.demand-sub-panel{flex:1;overflow:hidden;display:flex;flex-direction:column}

/* 筛选器 */
.demand-filter-bar{display:flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border-bottom:1px solid #eee;flex-shrink:0;flex-wrap:wrap}
.demand-filter-input{padding:6px 8px;border:1px solid #ddd;border-radius:6px;font-size:13px;flex:1;min-width:0}
.demand-filter-sep{color:#999;font-size:13px;flex-shrink:0}
.demand-filter-btn{background:#2196F3;color:#fff;border:none;padding:6px 14px;border-radius:6px;font-size:13px;cursor:pointer;white-space:nowrap;flex-shrink:0}
.demand-filter-reset{background:none;color:#999;border:1px solid #ddd;padding:6px 10px;border-radius:6px;font-size:13px;cursor:pointer;white-space:nowrap;flex-shrink:0}

/* FAB按钮 */
.demand-fab{position:absolute;bottom:24px;right:24px;width:60px;height:60px;border-radius:20px;background:linear-gradient(135deg,#4A9AF5,#2B7DE9);box-shadow:0 6px 24px rgba(43,125,233,.35);cursor:pointer;z-index:100;display:flex;align-items:center;justify-content:center;transition:transform .2s ease,box-shadow .2s ease;animation:fab-bob 3s ease-in-out infinite,fab-enter .5s cubic-bezier(.34,1.56,.64,1) .4s both}
.demand-fab.hidden{display:none}
.demand-fab-icon{font-size:26px;color:#fff;font-weight:300;line-height:1;transition:transform .2s ease}
.demand-fab-tooltip{position:absolute;right:calc(100% + 12px);top:50%;transform:translateY(-50%);background:rgba(0,0,0,.8);color:#fff;padding:6px 12px;border-radius:6px;font-size:13px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s ease}
.demand-fab-tooltip::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:5px solid transparent;border-left-color:rgba(0,0,0,.8)}
.demand-fab-ripple{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none}
.demand-fab-ripple .ripple{position:absolute;border-radius:50%;background:rgba(255,255,255,.6);transform:scale(0);animation:ripple-expand .6s ease-out forwards}
@keyframes fab-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes fab-enter{0%{transform:scale(0) rotate(-180deg);opacity:0}100%{transform:scale(1) rotate(0deg);opacity:1}}
@keyframes ripple-expand{to{transform:scale(4);opacity:0}}
.demand-fab:hover{transform:scale(1.08);box-shadow:0 8px 32px rgba(43,125,233,.5);animation-play-state:paused}
.demand-fab:hover .demand-fab-tooltip{opacity:1}
.demand-fab:active{transform:scale(.95);animation-play-state:paused}

/* 需求反馈全屏布局 */
body.showing-demands .container{
    padding-top:48px!important;
    padding-left:0!important;
    padding-right:0!important;
    min-height:auto!important;
    height:calc(100dvh - 48px)!important;
    height:calc(var(--vh, 100vh) - 48px)!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    background:none!important;
}
body.showing-demands #demandFeedbackView{flex:1!important;overflow:hidden}

/* 需求附件上传区域 */
.demand-upload-area{background:#fff;border:2px dashed #ddd;border-radius:12px;padding:24px 16px;text-align:center;cursor:pointer;transition:all .2s;margin-top:12px}
.demand-upload-area:hover,.demand-upload-area.drag-over{border-color:#2196F3;background:#f0f9ff}
.demand-upload-area.drag-over{border-style:solid;transform:scale(1.01)}
.demand-upload-icon{font-size:36px;margin-bottom:6px}
.demand-upload-text{font-size:14px;color:#666}
.demand-upload-hint{font-size:12px;color:#bbb;margin-top:4px}
.demand-attachment-list{margin-top:8px}
.demand-attachment-item{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;background:#f5f5f5;border-radius:6px;margin-bottom:4px;gap:8px}
.demand-attachment-item .att-icon{width:24px;height:24px;flex-shrink:0;object-fit:contain}
.demand-attachment-item .att-name{font-size:13px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.demand-attachment-item .att-size{font-size:11px;color:#999;flex-shrink:0}
.demand-attachment-item .att-remove{background:none;border:none;color:#f44336;cursor:pointer;font-size:18px;padding:0 2px;flex-shrink:0;line-height:1}
.demand-attachment-item .att-remove:hover{color:#d32f2f}
.demand-attachment-item.uploading .att-name{color:#2196F3}
.demand-upload-progress{width:100%;height:3px;background:#e0e0e0;border-radius:2px;margin-top:4px;overflow:hidden}
.demand-upload-progress-bar{height:100%;background:#2196F3;border-radius:2px;transition:width .3s}

/* ===== 数据处理中心样式 ===== */
.sub-tabs{display:flex;overflow-x:auto;background:#fff;border-bottom:1px solid #f0f0f0;flex-shrink:0;scrollbar-width:none}
.sub-tabs::-webkit-scrollbar{display:none}
.sub-tab{flex-shrink:0;padding:12px 16px;font-size:13px;font-weight:500;color:#666;cursor:pointer;position:relative;white-space:nowrap;transition:color .2s}
.sub-tab.active{color:#2196F3}
.sub-tab.active::after{content:'';position:absolute;bottom:0;left:16px;right:16px;height:3px;background:#2196F3;border-radius:3px 3px 0 0}
.sub-tab-icon{margin-right:4px}

#subContentArea{min-height:100px}
.diag-checkbox-group{display:flex;flex-direction:column;gap:8px}
.diag-checkbox{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;background:#fff;border:1px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s}
.diag-checkbox.checked{border-color:#2196F3;background:#f0f9ff}
.diag-checkbox input{margin-top:2px;accent-color:#2196F3;width:16px;height:16px}
.diag-checkbox span{font-size:14px;color:#333}
.diag-sub-section{margin-top:12px;padding-top:12px;border-top:1px solid #f0f0f0}
.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:none;z-index:1000;justify-content:center;align-items:center}
.modal-overlay.active{display:flex}
.modal-actions{display:flex;gap:10px;margin-top:16px}
.modal-btn-cancel,.modal-btn-ok{flex:1;padding:10px;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer}
.modal-btn-cancel{background:#f5f5f5;color:#666}
.modal-btn-ok{background:linear-gradient(135deg,#2196F3,#1976D2);color:#fff}

/* ===== 新建工单/新建需求：覆盖容器padding ===== */
body:not(.showing-demands) #newTicketView.active,
body:not(.showing-demands) #newDemandView.active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--vh, 100vh);
    z-index: 150;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    background: #f5f5f5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 工单详情：与新建工单统一使用 position:fixed，紧贴屏幕顶部、填满左右宽度 */
body:not(.showing-demands) #ticketDetailView.active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--vh, 100vh);
    z-index: 150;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    background: #f5f5f5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
body.showing-ticket-detail .container {
    overflow: hidden !important;
}

/* 新建工单/新建需求的导航栏固定在顶部 */
#newTicketView .demand-subpage-header,
#newDemandView .demand-subpage-header {
    position: sticky;
    top: 0;
    z-index: 10;
}
/* 工单详情导航栏：固定在顶部，与新建工单一致 */
#ticketDetailView .demand-subpage-header {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}
#ticketDetailView .ticket-detail-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

/* 子页面导航栏高度与主界面一致 */
.demand-subpage-header {
    padding: 0 16px;
    height: 44px;
    line-height: 44px;
}

/* ===== 多轮对话：上下文设置 ===== */

/* 上下文设置按钮 - 固定在右上角 */
.context-settings-wrapper {
    position: sticky;
    top: 0;
    right: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
    margin-bottom: 8px;
}

.context-settings-group {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.context-settings-trigger {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.context-settings-trigger:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.context-settings-trigger:active {
    transform: scale(0.95);
}

.context-settings-trigger.active {
    background: #E3F2FD;
    border-color: #1565C0;
}

.context-settings-trigger svg {
    width: 22px;
    height: 22px;
    color: #8A8A8A;
    transition: color 0.2s;
}

.context-settings-trigger.active svg {
    color: #1565C0;
}

/* 上下文状态标签 */
.context-status-badge {
    background: #E3F2FD;
    color: #1565C0;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: none;
    pointer-events: auto;
}

.context-status-badge.show {
    display: block;
}

/* 设置弹窗 */
.context-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.context-settings-overlay.show {
    opacity: 1;
    visibility: visible;
}

.context-settings-modal {
    background: #fff;
    border-radius: 12px;
    width: 360px;
    max-width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s;
    overflow: hidden;
}

.context-settings-overlay.show .context-settings-modal {
    transform: scale(1);
}

.context-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
}

.context-settings-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.context-settings-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.context-settings-close:hover {
    color: #333;
}

.context-settings-body {
    padding: 24px 20px;
}

.context-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.context-settings-label {
    font-size: 14px;
    color: #333;
}

.context-settings-value {
    color: #1565C0;
    font-weight: 600;
    font-size: 14px;
}

.context-slider-container {
    margin-bottom: 20px;
}

.context-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.context-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1565C0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(21, 101, 192, 0.3);
}

.context-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1565C0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(21, 101, 192, 0.3);
}

.context-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.context-settings-hint {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.context-settings-hint p {
    margin: 0;
}

.context-settings-hint strong {
    color: #1565C0;
}

.context-settings-clear {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8edf2;
    display: flex;
    align-items: center;
    gap: 10px;
}
.context-settings-clear-btn {
    background: none;
    border: 1px solid #ef5350;
    color: #ef5350;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.context-settings-clear-btn:hover {
    background: #FFEBEE;
}
.context-settings-clear-hint {
    font-size: 12px;
    color: #999;
}

.context-settings-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
}

.context-settings-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.context-settings-btn.cancel {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #666;
}

.context-settings-btn.cancel:hover {
    background: #eee;
}

.context-settings-btn.confirm {
    background: #1565C0;
    border: none;
    color: #fff;
}

.context-settings-btn.confirm:hover {
    background: #0D47A1;
}

.context-settings-btn:active {
    transform: scale(0.98);
}

/* 开关切换 */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: #1565C0;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* ============================================================
   会议纪要生成工具
   ============================================================ */

/* 操作按钮组 */
.mm-action-bar { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.mm-action-bar .diag-submit-btn { flex: 1; min-width: 0; }
.mm-btn-polish { background: linear-gradient(135deg, #FF9800, #F57C00) !important; box-shadow: 0 4px 12px rgba(255,152,0,0.3) !important; }
.mm-btn-polish:hover { box-shadow: 0 6px 16px rgba(255,152,0,0.4) !important; }
.mm-btn-polish:disabled { background: #e0e0e0 !important; box-shadow: none !important; color: #999 !important; }
.mm-btn-skip { flex: 0 0 auto; padding: 14px 20px; background: #fff; color: #666; border: 1.5px solid #e0e0e0; border-radius: 10px; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.mm-btn-skip:hover { background: #f5f5f5; border-color: #ccc; }

/* 会议纪要大表格（扩宽20%，支持横向滚动） */
.mm-table-wrapper { padding: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
.mm-form-table { width: 120%; border-collapse: collapse; font-size: 14px; table-layout: fixed; min-width: 700px; }
.mm-form-table th,
.mm-form-table td { border: 1px solid #d0d5dd; padding: 0; vertical-align: middle; }
.mm-form-table th { background: #f0f7ff; color: #1565C0; font-weight: 600; text-align: center; padding: 10px 8px; white-space: nowrap; }
.mm-form-table td { padding: 0; }

/* 全宽行标签 */
.mm-full-label th { background: #f0f7ff; color: #1565C0; font-weight: 600; text-align: center; padding: 10px 8px; font-size: 14px; }

/* 全宽行值 */
.mm-full-value td { padding: 10px 12px; line-height: 1.6; }

/* 表格内编辑区（textarea） */
.cell-edit { width: 100%; min-height: 40px; padding: 10px 12px; border: none; outline: none; font-size: 14px; font-family: inherit; line-height: 1.6; background: transparent; resize: none; overflow: hidden; display: block; }
.cell-edit:focus { background: #fffde7; }
.cell-edit::placeholder { color: #c0c0c0; }
.cell-edit.auto-height { min-height: 40px; height: auto; }

/* 标题行 */
.mm-title-row th { background: #1565C0; color: #fff; font-size: 16px; padding: 12px; letter-spacing: 2px; }

/* 子表头 */
.mm-sub-header th { background: #e3f2fd; color: #1565C0; font-size: 13px; padding: 8px; }

/* 序号列 */
.mm-todo-num { text-align: center; background: #f5f8ff; color: #999; font-size: 13px; }

/* 待办事项标题行（表格内第一行） */
.mm-todo-title-row th { background: #f0f7ff; color: #1565C0; font-weight: 600; text-align: center; padding: 10px; font-size: 14px; letter-spacing: 2px; }

/* 待办独立表格 */
.mm-todo-table { width: 120%; border-collapse: collapse; font-size: 14px; table-layout: fixed; margin-bottom: 0; margin-top: -1px; min-width: 700px; }
.mm-todo-table th,
.mm-todo-table td { border: 1px solid #d0d5dd; padding: 0; vertical-align: middle; }
.mm-todo-table th { background: #f0f7ff; color: #1565C0; font-weight: 600; text-align: center; padding: 8px; white-space: nowrap; }

/* 跟进人、截止时间列居中 */
.mm-todo-table td:nth-child(3),
.mm-todo-table td:nth-child(4) { text-align: center; }

/* 主表格底部无间距 */
.mm-form-table { margin-bottom: 0; }

/* 水印：防截图 */
.mm-watermark-wrapper { position: relative; }
.mm-watermark-wrapper::after {
    content: '叽歪办公助手';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; font-weight: 700; color: rgba(0,0,0,0.04);
    transform: rotate(-25deg); pointer-events: none; z-index: 1;
    letter-spacing: 12px; white-space: nowrap; user-select: none;
}

/* 添加待办按钮 */
.mm-add-todo-bar { padding: 8px 16px; text-align: center; }
.mm-add-todo-btn { background: #f0f7ff; color: #1976D2; border: 1.5px dashed #90CAF9; border-radius: 8px; padding: 8px 20px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.mm-add-todo-btn:hover { background: #E3F2FD; border-color: #42A5F5; }
.mm-remove-todo { background: none; border: none; color: #ccc; font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: all 0.15s; }
.mm-remove-todo:hover { color: #f44336; background: #ffebee; }

/* 结果操作栏 */
.mm-result-top-bar { padding: 12px 16px; display: flex; gap: 10px; border-bottom: 1px solid #f0f0f0; flex-wrap: wrap; }
.mm-result-top-btn { padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; display: flex; align-items: center; gap: 5px; transition: all 0.2s; }
.mm-btn-outline { background: #fff; color: #666; border: 1px solid #e0e0e0; }
.mm-btn-outline:hover { background: #f5f5f5; }
.mm-btn-green { background: linear-gradient(135deg, #4CAF50, #43A047); color: #fff; box-shadow: 0 2px 8px rgba(76,175,80,0.3); }
.mm-btn-green:hover { box-shadow: 0 4px 12px rgba(76,175,80,0.4); transform: translateY(-1px); }
.mm-result-status { padding: 10px 16px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #4CAF50; border-bottom: 1px solid #f0f0f0; }
.mm-result-status .credits { font-weight: 400; color: #999; font-size: 12px; margin-left: auto; }
.mm-edit-hint { padding: 12px 16px; text-align: center; font-size: 12px; color: #999; border-top: 1px solid #f0f0f0; }

/* ============================================================
   PPT生成器 - 主题选择
   ============================================================ */
.ppt-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.ppt-theme-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: #fff;
}

.ppt-theme-card:hover {
    border-color: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.ppt-theme-card.active {
    border-color: #2196F3;
    background: #E3F2FD;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.ppt-theme-preview {
    width: 100%;
    height: 40px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.ppt-theme-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.ppt-theme-desc {
    font-size: 10px;
    color: #999;
    line-height: 1.2;
}

/* ============================================================
   PPT生成器 - 预览区域
   ============================================================ */
.ppt-preview-section {
    padding: 16px;
}

.ppt-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.ppt-preview-container {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #f5f5f5;
}

.ppt-preview-frame {
    width: 100%;
    height: 350px;
    border: none;
    background: #fff;
}

.ppt-preview-link-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.ppt-link-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.ppt-link-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ppt-link-url {
    flex: 1;
    font-size: 13px;
    color: #2196F3;
    text-decoration: none;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ppt-link-url:hover {
    text-decoration: underline;
}

.ppt-copy-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    background: #e0e0e0;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.ppt-copy-btn:hover {
    background: #d0d0d0;
}

.ppt-export-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
}

.ppt-export-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.ppt-export-buttons {
    display: flex;
    gap: 12px;
}

.ppt-export-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ppt-export-pptx {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.ppt-export-pptx:hover {
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    transform: translateY(-1px);
}

.ppt-export-new {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.ppt-export-new:hover {
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    transform: translateY(-1px);
}

.ppt-export-icon {
    font-size: 18px;
}

/* 响应式 */
@media (max-width: 480px) {
    .ppt-theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ppt-export-buttons {
        flex-direction: column;
    }
    .ppt-link-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* AI 分析提示 */
.ppt-ai-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #1565C0;
    border: 1px solid #90CAF9;
}

.ppt-ai-icon {
    font-size: 16px;
    flex-shrink: 0;
}