:root{--cb-bg: #ffffff;--cb-surface: #f7f7f8;--cb-border: #e5e7eb;--cb-text: #111827;--cb-text-muted: #6b7280;--cb-accent: #013469;--cb-accent-hover: #0a4fa8;--cb-accent-light: #eaf1f9;--cb-user-bg: #013469;--cb-user-text: #ffffff;--cb-bot-bg: #ffffff;--cb-bot-border: #e5e7eb;--cb-shadow: 0 8px 40px rgba(0,0,0,.15);--cb-shadow-sm: 0 2px 8px rgba(0,0,0,.08);--cb-radius: 16px;--cb-radius-bubble: 18px;--cb-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--cb-header-h: 60px;--cb-footer-h: 80px;--cb-accent-grad: linear-gradient(135deg, #013469, #0a4fa8)}@media (prefers-color-scheme: dark){:root{--cb-bg: #1e1e2e;--cb-surface: #181825;--cb-border: #313244;--cb-text: #cdd6f4;--cb-text-muted: #6c7086;--cb-accent: #0a4fa8;--cb-accent-hover: #6a9fd0;--cb-accent-light: #0d2240;--cb-bot-bg: #1e1e2e;--cb-bot-border: #313244;--cb-shadow: 0 8px 40px rgba(0,0,0,.5)}}#chat-toggle{position:fixed;bottom:88px;right:24px;width:54px;height:54px;border-radius:50%;background:var(--cb-accent);color:#fff;border:2px solid rgba(255,255,255,.8);display:flex;justify-content:center;align-items:center;cursor:pointer;box-shadow:0 4px 20px #01346973;z-index:10001;transition:transform .2s ease,box-shadow .2s ease,background .2s}#chat-toggle:hover{background:var(--cb-accent-hover);transform:scale(1.08);box-shadow:0 6px 28px #0134698c}#chat-toggle svg{width:24px;height:24px;transition:opacity .15s}.chat-toggle-badge{position:absolute;top:-2px;right:-2px;width:18px;height:18px;background:#ef4444;color:#fff;border-radius:50%;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;border:2px solid #fff}#chat-window{position:fixed;bottom:160px;right:24px;width:390px;height:580px;max-height:calc(100vh - 160px);background:var(--cb-bg);border:1px solid var(--cb-border);border-radius:var(--cb-radius);display:none;flex-direction:column;overflow:hidden;box-shadow:var(--cb-shadow);z-index:10002;font-family:var(--cb-font);animation:chatWindowIn .22s cubic-bezier(.34,1.56,.64,1)}#chat-window.is-open{display:flex}@keyframes chatWindowIn{0%{opacity:0;transform:translateY(20px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}#chat-header{display:flex;align-items:center;justify-content:space-between;padding:0 14px 0 16px;height:var(--cb-header-h);background:var(--cb-accent-grad);color:#fff;flex-shrink:0}.chat-header-left{display:flex;align-items:center;gap:12px}.chat-header-avatar{position:relative;width:36px;height:36px;border-radius:50%;background:#fff3;display:flex;align-items:center;justify-content:center;flex-shrink:0}.chat-header-avatar svg{width:20px;height:20px;fill:#fff}.chat-header-status{position:absolute;bottom:1px;right:1px;width:10px;height:10px;background:#22c55e;border-radius:50%;border:2px solid var(--cb-accent)}.chat-header-name{font-size:14.5px;font-weight:700;letter-spacing:.3px;line-height:1.2}.chat-header-sub{font-size:11px;opacity:.85;display:flex;align-items:center;gap:5px;margin-top:2px}.status-dot{width:6px;height:6px;background:#22c55e;border-radius:50%;display:inline-block;animation:statusPulse 2s ease infinite}@keyframes statusPulse{0%,to{opacity:1}50%{opacity:.5}}.chat-header-actions{display:flex;gap:4px}.chat-header-actions button{width:32px;height:32px;border:none;background:#ffffff26;border-radius:8px;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s}.chat-header-actions button:hover{background:#ffffff47}.chat-header-actions button svg{width:16px;height:16px}#chat-body{flex:1;overflow-y:auto;padding:16px 14px 12px;background:var(--cb-surface);display:flex;flex-direction:column;gap:4px;scroll-behavior:smooth}#chat-body::-webkit-scrollbar{width:5px}#chat-body::-webkit-scrollbar-track{background:transparent}#chat-body::-webkit-scrollbar-thumb{background:var(--cb-border);border-radius:99px}.msg-row{display:flex;align-items:flex-end;gap:8px;max-width:100%;animation:msgIn .2s ease}.msg-row.user-row{flex-direction:row-reverse}@keyframes msgIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.msg-avatar{width:30px;height:30px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;border:2px solid var(--cb-border)}.msg-avatar.bot-av{background:var(--cb-accent);color:#fff;border-color:var(--cb-accent)}.msg-avatar.bot-av svg{width:16px;height:16px;fill:#fff}.msg-avatar.user-av{background:#f3f4f6;color:var(--cb-text-muted);border-color:var(--cb-border)}.msg-avatar.user-av svg{width:16px;height:16px}.msg-bubble-wrap{display:flex;flex-direction:column;max-width:calc(100% - 46px);gap:4px}.user-row .msg-bubble-wrap{align-items:flex-end}.msg-bubble{padding:11px 14px;border-radius:var(--cb-radius-bubble);font-size:13.5px;line-height:1.65;word-break:break-word;position:relative;transition:box-shadow .15s}.bot-bubble{background:var(--cb-bot-bg);color:var(--cb-text);border:1px solid var(--cb-bot-border);border-bottom-left-radius:5px;box-shadow:var(--cb-shadow-sm)}.user-bubble{background:var(--cb-user-bg);color:var(--cb-user-text);border:none;border-bottom-right-radius:5px;box-shadow:0 2px 10px #0134694d}.bot-bubble a{color:var(--cb-accent);text-decoration:underline;font-weight:500}.cb-action-btn{display:inline-flex;align-items:center;gap:6px;margin-top:10px;padding:8px 14px;background:var(--cb-accent);color:#fff!important;border-radius:8px;font-size:13px;font-weight:600;text-decoration:none!important;transition:background .2s,transform .15s}.cb-action-btn:hover{background:var(--cb-accent-hover);transform:translateY(-1px)}.msg-meta{display:flex;align-items:center;gap:8px;padding:0 2px}.user-row .msg-meta{justify-content:flex-end}.msg-time{font-size:10.5px;color:var(--cb-text-muted)}.msg-copy{background:none;border:none;padding:2px 4px;cursor:pointer;color:var(--cb-text-muted);border-radius:4px;display:flex;align-items:center;transition:color .15s,background .15s;opacity:0;transition:opacity .15s}.msg-row:hover .msg-copy{opacity:1}.msg-copy:hover{color:var(--cb-accent);background:var(--cb-accent-light)}.msg-copy svg{width:13px;height:13px}.typing-indicator{display:flex;align-items:center;gap:5px;padding:12px 14px;background:var(--cb-bot-bg);border:1px solid var(--cb-bot-border);border-radius:var(--cb-radius-bubble);border-bottom-left-radius:5px;box-shadow:var(--cb-shadow-sm);width:fit-content}.typing-dot{width:7px;height:7px;border-radius:50%;background:#9ca3af;animation:typingBounce 1.4s ease infinite}.typing-dot:nth-child(2){animation-delay:.2s}.typing-dot:nth-child(3){animation-delay:.4s}@keyframes typingBounce{0%,80%,to{transform:translateY(0);opacity:.6}40%{transform:translateY(-5px);opacity:1}}#chat-suggestions{display:flex;flex-wrap:wrap;gap:6px;padding:8px 14px 10px;background:var(--cb-surface);border-top:1px solid var(--cb-border)}.suggestion-chip{padding:6px 12px;background:var(--cb-bg);border:1px solid var(--cb-border);border-radius:99px;font-size:12px;font-weight:500;color:var(--cb-text);cursor:pointer;white-space:nowrap;transition:border-color .15s,background .15s,color .15s;font-family:var(--cb-font)}.suggestion-chip:hover{border-color:var(--cb-accent);color:var(--cb-accent);background:var(--cb-accent-light)}#chat-footer{background:var(--cb-bg);border-top:1px solid var(--cb-border);padding:10px 14px 8px;flex-shrink:0}#chat-input-wrapper{display:flex;align-items:flex-end;gap:8px;background:var(--cb-surface);border:1.5px solid var(--cb-border);border-radius:14px;padding:8px 8px 8px 14px;transition:border-color .2s}#chat-input-wrapper:focus-within{border-color:var(--cb-accent);box-shadow:0 0 0 3px #0134691f}#chat-input{flex:1;border:none;outline:none;background:transparent;font-size:13.5px;font-family:var(--cb-font);color:var(--cb-text);resize:none;max-height:120px;overflow-y:auto;line-height:1.55}#chat-input::placeholder{color:var(--cb-text-muted)}#send-btn{width:36px;height:36px;border:none;border-radius:10px;background:var(--cb-accent);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .2s,transform .15s,opacity .2s}#send-btn:hover{background:var(--cb-accent-hover);transform:scale(1.05)}#send-btn:disabled{opacity:.45;cursor:not-allowed;transform:none}#send-btn svg{width:18px;height:18px}#chat-footer-note{text-align:center;font-size:10.5px;color:var(--cb-text-muted);margin-top:6px}.msg-date-sep{text-align:center;font-size:11px;color:var(--cb-text-muted);margin:8px 0;position:relative}.msg-date-sep:before,.msg-date-sep:after{content:"";position:absolute;top:50%;width:28%;height:1px;background:var(--cb-border)}.msg-date-sep:before{left:0}.msg-date-sep:after{right:0}@media (max-width: 480px){#chat-window{right:0;bottom:0;top:0;width:100%;height:100%;max-height:100%;border-radius:0;border:none;z-index:10002}#chat-toggle{bottom:88px;right:24px}}@media (max-width: 360px){#chat-toggle{bottom:74px;right:12px}}.cb-toast{position:fixed;bottom:100px;left:50%;transform:translate(-50%) translateY(10px);background:#1f2937;color:#fff;font-size:12px;padding:7px 16px;border-radius:8px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:99999;white-space:nowrap}.cb-toast.show{opacity:1;transform:translate(-50%) translateY(0)}
