#upt-launcher {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    align-items: center;
    z-index: 99999;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#upt-launcher:hover {
    transform: scale(1.04);
}

#upt-bubble {
    position: relative;
    height: 52px;
    border-radius: 100px;
    background: linear-gradient(135deg, #1a3a5c 0%, #2e6da4 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px 0 16px;
    transition: background 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(26,58,92,0.4);
}

#upt-bubble-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#upt-bubble-icon svg { width: 24px; height: 24px; fill: #fff; }

#upt-bubble-label {
    font-size: 14px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    color: #fff;
    letter-spacing: 0.01em;
}

#upt-launcher:hover #upt-bubble {
    background: linear-gradient(135deg, #1e4570 0%, #3a7fc1 100%);
    box-shadow: 0 6px 24px rgba(26,58,92,0.5);
}

#upt-badge {
    position: fixed;
    bottom: 90px;
    right: 32px;
    background: #e53e3e;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

#upt-window {
    position: fixed;
    bottom: 96px;
    right: 28px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99998;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#upt-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

#upt-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2e6da4 100%);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.upt-av {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upt-av svg { width: 20px; height: 20px; fill: #fff; }
.upt-info { flex: 1; }
.upt-info p { margin: 0; color: #fff; font-size: 14px; font-weight: 600; }
.upt-info span { font-size: 11px; color: rgba(255,255,255,0.75); }
#upt-online span { width: 8px; height: 8px; background: #4ade80; border-radius: 50%; display: inline-block;}

#upt-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

#upt-close svg { width: 18px; height: 18px; fill: rgba(255,255,255,0.8); }

#upt-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7f9fc;
}

.upt-msg { max-width: 82%; display: flex; flex-direction: column; gap: 3px; }
.upt-msg.bot { align-self: flex-start; }
.upt-msg.user { align-self: flex-end; }

.upt-bubble-msg {
    padding: 9px 13px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.55;
}

.bot .upt-bubble-msg {
    background: #fff;
    color: #1a202c;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.user .upt-bubble-msg {
    background: #1a3a5c;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.upt-time { font-size: 10.5px; color: #a0aec0; }

#upt-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 14px 8px;
    background: #f7f9fc;
    border-top: 1px solid #edf2f7;
}

.upt-qbtn {
    font-size: 12px;
    padding: 5px 11px;
    border: 1px solid #cbd5e0;
    border-radius: 20px;
    background: #fff;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.15s;
}

.upt-qbtn:hover { background: #1a3a5c; color: #fff; }

#upt-input-row {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border-top: 1px solid #edf2f7;
}

#upt-input {
    flex: 1;
    padding: 8px 13px;
    border: 1px solid #cbd5e0;
    border-radius: 20px;
    font-size: 13.5px;
    outline: none;
}

#upt-send {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1a3a5c;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#upt-send svg { width: 15px; height: 15px; fill: #fff; }

.upt-typing { display: flex; gap: 4px; align-items: center; padding: 9px 13px; }
.upt-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: #a0aec0;
    animation: upt-bounce 1.2s infinite;
}
.upt-typing span:nth-child(2) { animation-delay: .2s; }
.upt-typing span:nth-child(3) { animation-delay: .4s; }

@keyframes upt-bounce {
    0%,60%,100%{transform:translateY(0)}
    30%{transform:translateY(-5px)}
}

#upt-branding {
    text-align: center;
    font-size: 10px;
    color: #a0aec0;
    padding: 5px 0 6px;
    background: #fff;
    border-top: 1px solid #edf2f7;
}

@media (max-width: 400px) {
    #upt-window { right: 10px; bottom: 86px; width: calc(100vw - 20px); }
    #upt-launcher { right: 10px; bottom: 16px; }
}
