.butler-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 390px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border: 1px solid #d9e0ea;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
    z-index: 99999;
    overflow: hidden;
    font-family: inherit;
}
.butler-widget.butler-collapsed { width: 210px; }
.butler-widget.butler-collapsed .butler-body { display: none; }
.butler-header {
    height: 48px;
    background: linear-gradient(135deg, #111827, #1f3b62);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 16px;
    cursor: move;
    user-select: none;
}
.butler-title {
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.butler-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(34, 197, 94, .85);
}
.butler-actions { display: flex; gap: 6px; }
.butler-actions button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: rgba(255,255,255,.14);
    color: white;
    cursor: pointer;
    font-weight: 800;
}
.butler-body { padding: 12px; }
.butler-context {
    background: #f4f7fb;
    border: 1px solid #e2e8f0;
    padding: 10px;
    border-radius: 12px;
    font-size: 13px;
    color: #263244;
    margin-bottom: 10px;
}
.butler-hint {
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
}
.butler-messages {
    height: 280px;
    overflow-y: auto;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.butler-message {
    border-radius: 13px;
    padding: 10px 11px;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
}
.butler-message-system,
.butler-message-answer {
    background: #f1f5f9;
    color: #1f2937;
    align-self: flex-start;
}
.butler-message-user {
    background: #1f3b62;
    color: #ffffff;
    align-self: flex-end;
}
.butler-message-error {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}
.butler-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 10px;
}
.butler-form textarea {
    resize: none;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
}
.butler-form button {
    border: 0;
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    padding: 0 14px;
    font-weight: 800;
    cursor: pointer;
}
@media (max-width: 700px) {
    .butler-widget {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
}
