:root{--primary-color: #2563EB;--primary-hover: #1D4ED8;--primary-light: #EFF6FF;--primary-disabled: #93C5FD}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#f9fafb;height:100dvh}#app{height:100dvh}.chat-container{display:flex;flex-direction:column;height:100%;max-width:600px;margin:0 auto;background:#fff}.chat-header{display:flex;align-items:center;padding:0 20px;height:60px;background:var(--primary-color);color:#fff;flex-shrink:0;gap:12px}.chat-header h1{font-size:18px;font-weight:600;flex:1}.chat-header-logo{width:32px;height:32px;border-radius:6px;object-fit:contain}.chat-header-actions{display:flex;gap:4px}.header-btn{width:36px;height:36px;background:#ffffff26;border:none;border-radius:8px;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s}.header-btn:hover{background:#ffffff40}.chat-error{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:#fef2f2;border-bottom:1px solid #FECACA;color:#dc2626;font-size:13px;flex-shrink:0}.chat-error button{background:none;border:none;color:#dc2626;font-size:18px;cursor:pointer;padding:0 4px}.chat-messages{flex:1;overflow-y:auto;padding:20px 16px;display:flex;flex-direction:column;gap:12px;background:#f9fafb}.chat-welcome{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:16px;padding:0 40px;text-align:center}.chat-welcome-icon{width:72px;height:72px;border-radius:50%;background:var(--primary-light);display:flex;align-items:center;justify-content:center}.welcome-icon-svg{stroke:var(--primary-color)}.chat-welcome h2{font-size:18px;font-weight:600;color:#18181b}.chat-welcome p{font-size:14px;line-height:1.6;color:#71717a}.chat-message{display:flex}.chat-message--user{justify-content:flex-end}.chat-message--assistant{justify-content:flex-start}.chat-bubble{max-width:75%;padding:10px 14px;border-radius:16px;font-size:14px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.chat-message--user .chat-bubble{background:var(--primary-color);color:#fff;border-bottom-right-radius:4px}.chat-message--assistant .chat-bubble{background:#e5e7eb;color:#1f2937;border-bottom-left-radius:4px}.chat-bubble--loading{display:flex;gap:4px;padding:14px 20px}.dot{width:8px;height:8px;background:#9ca3af;border-radius:50%;animation:bounce 1.4s infinite ease-in-out both}.dot:nth-child(1){animation-delay:-.32s}.dot:nth-child(2){animation-delay:-.16s}@keyframes bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.chat-attachments{display:flex;flex-direction:column;gap:4px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(0,0,0,.1)}.chat-attachment{display:flex;align-items:center;gap:6px;font-size:12px;color:inherit;text-decoration:none;opacity:.8}.chat-attachment:hover{opacity:1;text-decoration:underline}.attachment-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}.attachment-size{flex-shrink:0;opacity:.7}.pending-files{display:flex;flex-wrap:wrap;gap:6px;padding:8px 16px;background:#f9fafb;border-top:1px solid #E4E4E7;flex-shrink:0}.pending-file{display:flex;align-items:center;gap:4px;padding:4px 8px;background:#e5e7eb;border-radius:8px;font-size:12px;color:#374151}.pending-file-name{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pending-file-size{opacity:.7}.pending-file-remove{background:none;border:none;color:#6b7280;font-size:16px;cursor:pointer;padding:0 2px;line-height:1}.pending-file-remove:hover{color:#dc2626}.chat-input{display:flex;gap:8px;padding:12px 16px;border-top:1px solid #E4E4E7;background:#fff;align-items:flex-end;flex-shrink:0}.chat-input textarea{flex:1;padding:10px 14px;border:1px solid #D1D5DB;border-radius:22px;font-size:14px;font-family:inherit;resize:none;outline:none;min-height:44px;max-height:120px;line-height:1.5}.chat-input textarea:focus{border-color:var(--primary-color)}.attach-btn{width:44px;height:44px;background:transparent;color:#6b7280;border:none;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:color .15s,background .15s}.attach-btn:hover:not(:disabled){color:var(--primary-color);background:var(--primary-light)}.attach-btn:disabled{opacity:.4;cursor:not-allowed}.send-btn{width:44px;height:44px;background:var(--primary-color);color:#fff;border:none;border-radius:50%;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s}.send-btn:disabled{background:var(--primary-disabled);cursor:not-allowed}.send-btn:hover:not(:disabled){background:var(--primary-hover)}.chat-history{flex:1;overflow-y:auto;display:flex;flex-direction:column}.history-header{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 12px;border-bottom:1px solid #E5E7EB}.history-header h2{font-size:16px;font-weight:600;color:#18181b}.new-chat-btn{display:flex;align-items:center;gap:6px;padding:8px 14px;background:var(--primary-color);color:#fff;border:none;border-radius:8px;font-size:13px;font-weight:500;cursor:pointer;transition:background .15s}.new-chat-btn:hover{background:var(--primary-hover)}.history-empty{flex:1;display:flex;align-items:center;justify-content:center;color:#71717a;font-size:14px}.history-list{display:flex;flex-direction:column}.history-item{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:none;border-bottom:1px solid #F3F4F6;background:#fff;cursor:pointer;text-align:left;font-family:inherit;transition:background .1s;width:100%}.history-item:hover{background:#f9fafb}.history-item--active{background:var(--primary-light);border-left:3px solid var(--primary-color)}.history-item-title{font-size:14px;font-weight:500;color:#18181b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-item-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:#71717a}.history-status{padding:2px 8px;border-radius:10px;font-size:11px;font-weight:500}.history-status--open{background:#fef3c7;color:#92400e}.history-status--resolved{background:#d1fae5;color:#065f46}.history-status--archived{background:#e5e7eb;color:#4b5563}
