:root { --ai-bg: #0a101f; --ai-panel: #101b31; --ai-panel-soft: #0d172a; --ai-line: rgba(0, 150, 255, .2); --ai-blue: #00ccff; --ai-cyan: #40e0ff; --ai-text: #fff; --ai-muted: #b0c4e0; --ai-dim: #667892; }
.ai-customer-page { background: var(--ai-bg); color: var(--ai-text); min-height: 100vh; }
.ai-customer-shell { max-width: 1440px; min-height: 720px; margin: 0 auto; padding: 104px 5% 34px; display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; }
.ai-customer-sidebar, .ai-chat-panel { background: var(--ai-panel); border: 1px solid var(--ai-line); box-shadow: 0 18px 50px rgba(0, 0, 0, .24); }
.ai-customer-sidebar { display: flex; flex-direction: column; height: calc(100vh - 138px); max-height: 760px; padding: 26px 20px; box-sizing: border-box; }
.ai-sidebar-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-shrink: 0; }
.ai-eyebrow { color: var(--ai-cyan); font-size: 10px; letter-spacing: 2px; }
.ai-sidebar-head h1 { margin: 9px 0 0; font-size: 24px; }
.ai-sidebar-note { color: var(--ai-muted); line-height: 1.7; font-size: 13px; margin: 22px 0; flex-shrink: 0; }
.ai-icon-button, .ai-send-button, .ai-stop-button, .ai-suggestion { cursor: pointer; border: 1px solid var(--ai-line); transition: .3s ease; }
.ai-icon-button { width: 34px; height: 34px; color: var(--ai-cyan); background: transparent; font-size: 22px; }
.ai-icon-button:hover, .ai-send-button:hover { transform: translateY(-2px); box-shadow: 0 0 22px rgba(0, 204, 255, .3); }
.ai-history-list { flex: 1 1 auto; min-height: 0; max-height: calc(100vh - 290px); overflow-y: auto; overflow-x: hidden; }
.ai-history-item { display: flex; align-items: center; width: 100%; color: var(--ai-muted); background: transparent; border-left: 2px solid transparent; }
.ai-history-item:hover, .ai-history-item.active { color: var(--ai-text); background: rgba(0, 153, 255, .08); border-left-color: var(--ai-cyan); }
.ai-history-open { flex: 1; min-width: 0; text-align: left; color: inherit; background: transparent; border: 0; padding: 12px 6px 12px 8px; cursor: pointer; }
.ai-history-item strong, .ai-history-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-history-delete { flex: 0 0 28px; width: 28px; height: 28px; margin-right: 6px; color: var(--ai-dim); background: transparent; border: 0; cursor: pointer; font-size: 19px; line-height: 1; opacity: 0; transition: .2s ease; }
.ai-history-item:hover .ai-history-delete, .ai-history-delete:focus { color: var(--ai-cyan); opacity: 1; }
.ai-mobile-history-toggle { display: none; }
.ai-history-item strong { font-size: 13px; font-weight: 600; }.ai-history-item span { color: var(--ai-dim); font-size: 11px; margin-top: 5px; }.ai-history-empty { color: var(--ai-dim); font-size: 13px; padding: 18px 8px; }
.ai-sidebar-foot { display: flex; gap: 8px; align-items: center; color: var(--ai-dim); font-size: 12px; padding-top: 20px; }.ai-status-dot { width: 7px; height: 7px; background: #36d370; box-shadow: 0 0 9px #36d370; border-radius: 50%; }
.ai-chat-panel { display: flex; flex-direction: column; min-height: 650px; overflow: hidden; }.ai-chat-header { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--ai-line); }.ai-agent-mark { display: grid; place-items: center; width: 38px; height: 38px; color: var(--ai-bg); background: var(--ai-cyan); font-weight: 800; font-size: 12px; box-shadow: 0 0 20px rgba(0, 204, 255, .28); }.ai-chat-title { font-weight: 700; }.ai-chat-subtitle { color: var(--ai-dim); font-size: 12px; margin-top: 4px; }.ai-quota { margin-left: auto; color: var(--ai-cyan); font-size: 12px; }.ai-message-list { flex: 1; min-height: 430px; padding: 26px 7%; overflow-y: auto; }.ai-message { max-width: 76%; margin-bottom: 22px; animation: ai-in .3s ease both; }.ai-message-user { margin-left: auto; text-align: right; }.ai-message-label { color: var(--ai-dim); font-size: 11px; margin-bottom: 7px; }.ai-message-body { display: inline-block; text-align: left; line-height: 1.8; font-size: 14px; padding: 13px 16px; background: var(--ai-panel-soft); border: 1px solid var(--ai-line); }.ai-message-body p { margin: 0 0 10px; }.ai-message-body p:last-child { margin-bottom: 0; }.ai-message-body h1, .ai-message-body h2, .ai-message-body h3, .ai-message-body h4, .ai-message-body h5, .ai-message-body h6 { color: var(--ai-cyan); line-height: 1.45; margin: 15px 0 8px; }.ai-message-body h1 { font-size: 21px; }.ai-message-body h2 { font-size: 18px; }.ai-message-body h3 { font-size: 16px; }.ai-message-body ul, .ai-message-body ol { margin: 8px 0 12px; padding-left: 24px; }.ai-message-body li { margin: 4px 0; }.ai-message-body code { color: var(--ai-cyan); background: rgba(0, 153, 255, .1); padding: 2px 5px; font-size: .92em; }.ai-message-body pre { overflow-x: auto; margin: 10px 0; padding: 12px; background: rgba(0, 0, 0, .28); border: 1px solid var(--ai-line); }.ai-message-body pre code { padding: 0; background: transparent; white-space: pre; }.ai-message-body a { color: var(--ai-cyan); text-decoration: underline; }.ai-md-spacer { height: 5px; }.ai-thinking { display: block; margin-bottom: 9px; border-left: 2px solid var(--ai-blue); background: rgba(0, 153, 255, .06); }.ai-thinking[hidden] { display: none; }.ai-thinking-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; color: var(--ai-muted); background: transparent; border: 0; padding: 8px 11px; cursor: pointer; text-align: left; font-size: 12px; }.ai-thinking-status { color: var(--ai-cyan); }.ai-thinking-body { max-height: 180px; overflow-y: auto; padding: 0 11px 10px; color: var(--ai-dim); font-size: 12px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }.ai-thinking-body[hidden] { display: none; }.ai-feedback { display: flex; gap: 7px; align-items: center; margin-top: 8px; }.ai-feedback button { border: 0; color: var(--ai-dim); background: transparent; padding: 0; cursor: pointer; font-size: 11px; }.ai-feedback button:hover { color: var(--ai-cyan); }.ai-feedback button:disabled { cursor: default; opacity: .55; }.ai-feedback span { color: var(--ai-cyan); font-size: 11px; }.ai-message-user .ai-message-body { color: var(--ai-bg); background: var(--ai-cyan); border-color: var(--ai-cyan); }.ai-suggestion-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 7% 14px; }.ai-suggestion { color: var(--ai-muted); background: transparent; padding: 7px 11px; font-size: 12px; }.ai-suggestion:hover { color: var(--ai-cyan); border-color: var(--ai-cyan); }.ai-composer { margin: 0 7% 18px; border: 1px solid var(--ai-line); background: var(--ai-panel-soft); }.ai-composer textarea { width: 100%; resize: vertical; border: 0; outline: 0; color: var(--ai-text); background: transparent; padding: 15px 16px 5px; font: inherit; box-sizing: border-box; }.ai-composer-foot { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px 10px 16px; }.ai-input-hint { color: var(--ai-dim); font-size: 11px; }.ai-composer-actions { display: flex; gap: 8px; }.ai-send-button { color: var(--ai-bg); background: var(--ai-cyan); padding: 8px 14px; font-weight: 700; }.ai-stop-button { color: #ff9c40; background: transparent; padding: 7px 11px; }.ai-contact-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 7% 20px; padding: 12px 14px; color: var(--ai-muted); background: rgba(0, 153, 255, .06); font-size: 12px; }.ai-contact-strip strong { color: var(--ai-text); margin-right: 9px; }.ai-contact-strip .ai-wechat-link { color: var(--ai-cyan); background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; white-space: nowrap; }.ai-contact-strip .ai-wechat-link[hidden] { display: none !important; }.ai-contact-strip span:last-child { color: var(--ai-dim); white-space: nowrap; }

/* 企业微信二维码弹窗 */
.ai-qr-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.ai-qr-modal[hidden] { display: none !important; }
.ai-qr-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.ai-qr-panel { position: relative; width: 280px; background: rgba(14, 22, 41, 0.98); border: 1px solid rgba(0, 212, 255, 0.3); border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 255, 0.2); overflow: hidden; animation: ai-qr-in .25s ease; }
.ai-qr-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.ai-qr-header h3 { margin: 0; font-size: 16px; color: #fff; }
.ai-qr-close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: rgba(255, 255, 255, 0.5); background: transparent; border: 0; cursor: pointer; border-radius: 50%; transition: all 0.2s; }
.ai-qr-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.ai-qr-body { padding: 16px; text-align: center; }
.ai-qr-img-wrap { display: inline-block; padding: 8px; background: #fff; border-radius: 8px; }
.ai-qr-img-wrap img { display: block; width: 180px; height: 180px; }
.ai-qr-tip { margin: 14px 0 4px; color: var(--ai-muted); font-size: 13px; }
@keyframes ai-qr-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }@keyframes ai-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }@media (max-width: 900px) { .ai-customer-shell { grid-template-columns: 220px minmax(0, 1fr); padding: 94px 3% 22px; } .ai-message-list, .ai-suggestion-row { padding-left: 5%; padding-right: 5%; }.ai-composer, .ai-contact-strip { margin-left: 5%; margin-right: 5%; } }@media (max-width: 600px) { .ai-customer-shell { display: block; padding: 82px 0 0; }.ai-customer-sidebar { height: auto; max-height: none; border-width: 0 0 1px; padding: 18px 16px; }.ai-sidebar-note, .ai-sidebar-foot { display: none; }.ai-mobile-history-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; color: var(--ai-muted); background: transparent; border: 1px solid var(--ai-line); padding: 10px 12px; cursor: pointer; text-align: left; }.ai-mobile-history-toggle[aria-expanded="true"] span { transform: rotate(180deg); }.ai-history-list { display: none; max-height: 230px; margin-top: 8px; }.ai-history-list.is-mobile-open { display: block; }.ai-history-delete { opacity: 1; }.ai-chat-panel { border-width: 0; min-height: calc(100vh - 130px); }.ai-chat-header { padding: 14px 16px; }.ai-message-list { padding: 20px 16px; min-height: 390px; }.ai-message { max-width: 90%; }.ai-suggestion-row, .ai-composer, .ai-contact-strip { margin-left: 16px; margin-right: 16px; padding-left: 0; padding-right: 0; }.ai-composer { border-left: 0; border-right: 0; }.ai-contact-strip { align-items: flex-start; flex-direction: column; }.ai-contact-strip .ai-wechat-link { white-space: normal; text-align: left; }.ai-contact-strip span:last-child { white-space: normal; }}
