.chat-fab {
    position:fixed; bottom:24px; right:24px;
    width:52px; height:52px; border-radius:50%;
    background:#1e293b; border:2px solid #10b981;
    color:#10b981; display:flex; align-items:center; justify-content:center;
    cursor:pointer; z-index:9999;
    box-shadow:0 4px 16px rgba(0,0,0,0.35);
    transition:transform .2s, box-shadow .2s;
}
.chat-fab:hover { transform:scale(1.08); box-shadow:0 6px 24px rgba(16,185,129,0.35); }

.chat-window {
    position:fixed; bottom:86px; right:24px;
    width:320px; max-height:480px;
    background:#1e293b;
    border:1px solid rgba(255,255,255,0.1);
    border-radius:16px;
    display:flex; flex-direction:column;
    z-index:9998;
    box-shadow:0 8px 32px rgba(0,0,0,0.45);
    transform:scale(0.95) translateY(8px);
    opacity:0; pointer-events:none;
    transition:transform .2s ease, opacity .2s ease;
    overflow:hidden;
}
.chat-window.open { transform:scale(1) translateY(0); opacity:1; pointer-events:all; }

.chat-header {
    background:#0f172a; padding:12px 14px;
    display:flex; align-items:center; gap:9px;
    border-bottom:1px solid rgba(255,255,255,0.07);
    flex-shrink:0;
}
.chat-avatar {
    width:32px; height:32px; border-radius:50%;
    background:linear-gradient(135deg,#10b981,#0f766e);
    display:flex; align-items:center; justify-content:center;
    font-size:15px; flex-shrink:0;
}
.chat-header-info { flex:1; }
.chat-header-name { font-size:13px; font-weight:600; color:#f1f5f9; }
.chat-header-status {
    font-size:11px; color:#10b981;
    display:flex; align-items:center; gap:4px;
}
.chat-header-status::before {
    content:''; width:5px; height:5px; border-radius:50%;
    background:#10b981; display:inline-block;
}
.chat-close {
    background:none; border:none; color:#64748b;
    cursor:pointer; padding:4px; border-radius:6px;
    display:flex; align-items:center;
}
.chat-close:hover { color:#94a3b8; background:rgba(255,255,255,0.06); }

.chat-messages {
    flex:1; overflow-y:auto;
    padding:12px; display:flex;
    flex-direction:column; gap:10px;
    scroll-behavior:smooth;
}
.chat-messages::-webkit-scrollbar { width:3px; }
.chat-messages::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.1); border-radius:2px; }

.chat-msg { display:flex; gap:7px; align-items:flex-end; }
.chat-msg.user { flex-direction:row-reverse; }

@keyframes msgIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:translateY(0)} }
.chat-msg { animation:msgIn .18s ease; }

.chat-bubble {
    max-width:82%; padding:9px 12px;
    border-radius:12px; font-size:13px;
    line-height:1.55; color:#e2e8f0;
}
.chat-msg.bot  .chat-bubble { background:#0f172a; border-radius:3px 12px 12px 12px; }
.chat-msg.user .chat-bubble { background:#10b981; color:#fff; border-radius:12px 3px 12px 12px; }
.chat-bubble a { color:#10b981; text-decoration:underline; cursor:pointer; }
.chat-msg.user .chat-bubble a { color:#d1fae5; }

.chat-msg-avatar {
    width:24px; height:24px; border-radius:50%;
    background:linear-gradient(135deg,#10b981,#0f766e);
    display:flex; align-items:center; justify-content:center;
    font-size:11px; flex-shrink:0;
}

.chat-typing {
    display:flex; gap:4px; align-items:center;
    padding:9px 12px; background:#0f172a;
    border-radius:3px 12px 12px 12px; width:fit-content;
}
.chat-typing span {
    width:5px; height:5px; border-radius:50%;
    background:#475569; animation:typing 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay:.2s; }
.chat-typing span:nth-child(3) { animation-delay:.4s; }
@keyframes typing {
    0%,60%,100%{transform:translateY(0);background:#475569}
    30%{transform:translateY(-3px);background:#10b981}
}

.chat-suggestions {
    padding:0 10px 8px;
    display:flex; flex-wrap:wrap; gap:5px;
    flex-shrink:0;
}
.chat-sug-btn {
    background:rgba(16,185,129,0.1);
    border:1px solid rgba(16,185,129,0.2);
    color:#10b981; border-radius:16px;
    padding:4px 10px; font-size:11px;
    cursor:pointer; transition:background .15s;
    white-space:nowrap; font-family:inherit;
}
.chat-sug-btn:hover { background:rgba(16,185,129,0.22); }

.chat-input-wrap {
    padding:10px 12px;
    border-top:1px solid rgba(255,255,255,0.07);
    display:flex; gap:7px; align-items:flex-end;
    flex-shrink:0;
}
.chat-input {
    flex:1; background:rgba(255,255,255,0.05);
    border:1px solid rgba(255,255,255,0.1);
    border-radius:9px; padding:8px 11px;
    color:#e2e8f0; font-size:13px;
    font-family:inherit; resize:none;
    outline:none; max-height:80px;
    transition:border-color .15s;
}
.chat-input:focus { border-color:#10b981; }
.chat-input::placeholder { color:#475569; }
.chat-send {
    width:34px; height:34px; border-radius:9px;
    background:#10b981; border:none; color:#fff;
    cursor:pointer; display:flex;
    align-items:center; justify-content:center;
    flex-shrink:0; transition:background .15s;
}
.chat-send:hover { background:#0f766e; }
.chat-send:disabled { background:#1e3a34; cursor:not-allowed; }
.chat-send svg { width:15px; height:15px; }

@media (max-width:480px) {
    .chat-window { width:calc(100vw - 20px); right:10px; bottom:76px; max-height:420px; }
    .chat-fab    { right:10px; bottom:16px; }
}
