.aia-fab {
    position: fixed; inset-inline-end: 22px; inset-block-end: 22px; z-index: 1050;
    width: 56px; height: 56px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff;
    font-size: 1.35rem; cursor: pointer; box-shadow: 0 8px 26px rgba(79,70,229,.4);
    display: flex; align-items: center; justify-content: center; transition: transform .2s;
}
.aia-fab:hover { transform: scale(1.06); }
.aia-panel {
    position: fixed; inset-inline-end: 22px; inset-block-end: 90px; z-index: 1050;
    width: 370px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 130px);
    background: #fff; border: 1px solid #e9e4f5; border-radius: 18px;
    box-shadow: 0 20px 60px rgba(30,10,60,.22);
    display: none; flex-direction: column; overflow: hidden;
}
.aia-panel.open { display: flex; }
.aia-head { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.aia-head strong { font-size: .95rem; display: block; }
.aia-head small { font-size: .72rem; opacity: .8; }
.aia-head .aia-x { margin-inline-start: auto; background: none; border: none; color: #fff; font-size: 1.1rem; cursor: pointer; }
.aia-body { flex: 1; overflow-y: auto; padding: 14px; background: #faf9fc; }
.aia-msg { margin-bottom: 12px; display: flex; }
.aia-msg.user { justify-content: flex-end; }
.aia-bubble { max-width: 82%; padding: 9px 13px; border-radius: 13px; font-size: .86rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.aia-msg.user .aia-bubble { background: #4f46e5; color: #fff; border-bottom-right-radius: 4px; }
.aia-msg.bot .aia-bubble { background: #f1eefb; color: #2a1a4a; border-bottom-left-radius: 4px; }
.aia-bubble code { background: rgba(0,0,0,.08); padding: 1px 4px; border-radius: 4px; font-size: .82em; }
.aia-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.aia-chip { background: #f1eefb; color: #5b21b6; border: 1px solid #e2d9f7; border-radius: 999px; padding: 5px 11px; font-size: .76rem; cursor: pointer; }
.aia-chip:hover { background: #e6dffb; }
.aia-foot { border-top: 1px solid #eee; padding: 10px; display: flex; gap: 8px; align-items: flex-end; }
.aia-foot textarea { flex: 1; resize: none; border: 1.5px solid #e2ddef; border-radius: 10px; padding: 8px 10px; font-size: .85rem; font-family: inherit; max-height: 90px; }
.aia-foot button { background: #4f46e5; color: #fff; border: none; border-radius: 10px; width: 38px; height: 38px; cursor: pointer; flex-shrink: 0; }
.aia-foot button:disabled { opacity: .5; cursor: not-allowed; }
.aia-typing { font-size: .8rem; color: #8b7fa8; padding: 0 4px 8px; display: none; }
.aia-clear { background: none; border: none; color: #fff; font-size: .72rem; cursor: pointer; opacity: .8; }
[dir="rtl"] .aia-msg.user .aia-bubble { border-bottom-right-radius: 13px; border-bottom-left-radius: 4px; }
