.ia-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid #4f46e5;
  background: linear-gradient(145deg, #5a52f3, #3930bf);
  color: #fff;
  z-index: 1100;
  box-shadow: 0 14px 35px rgba(49, 37, 169, .45);
  transition: transform .2s ease, filter .2s ease;
  overflow: hidden;
}
.ia-fab:hover { transform: translateY(-2px); filter: brightness(1.08); }
.ia-fab-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ia-chat {
  position: fixed;
  right: 22px;
  bottom: 92px;
  width: min(390px, calc(100vw - 26px));
  max-height: 72vh;
  border: 1px solid #36405d;
  border-radius: 14px;
  overflow: hidden;
  background: #0f1522;
  z-index: 1100;
  display: none;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .52);
}
.ia-chat.open { display: flex; flex-direction: column; animation: iaIn .2s ease; }
@keyframes iaIn { from { opacity: 0; transform: translateY(8px) scale(.98);} to { opacity:1; transform: none;} }

.ia-head {
  padding: 10px 12px;
  border-bottom: 1px solid #273049;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #111a2b;
}
.ia-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ia-head-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #3a4566;
  flex: 0 0 34px;
}
.ia-head-title { font-weight: 700; color: #edf2ff; }
.ia-head-sub { font-size: .82rem; color: #94a0c0; }

.ia-quick {
  display: flex;
  gap: 6px;
  padding: 10px 10px 0;
  flex-wrap: wrap;
}
.ia-quick button {
  border: 1px solid #3a4566;
  background: #141e31;
  color: #dbe6ff;
  border-radius: 20px;
  padding: 6px 10px;
  font-size: .8rem;
}

.ia-body {
  padding: 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 260px;
}
.ia-msg {
  border-radius: 10px;
  padding: 9px 11px;
  font-size: .93rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.ia-user { align-self: flex-end; background: #3f39cf; color: #fff; max-width: 88%; }
.ia-bot { align-self: flex-start; background: #1b253a; color: #ecf1ff; max-width: 92%; }
.ia-typing::after {
  content: '...';
  display: inline-block;
  width: 14px;
  overflow: hidden;
  vertical-align: bottom;
  animation: dots 1s steps(4,end) infinite;
}
@keyframes dots { from { width: 0; } to { width: 14px; } }

.ia-form {
  border-top: 1px solid #273049;
  padding: 10px;
  display: flex;
  gap: 8px;
  background: #0f1522;
}
.ia-form input {
  flex: 1;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid #3a4566;
  background: #131d30;
  color: #eef4ff;
  padding: 0 12px;
}
.ia-form button {
  min-width: 70px;
  border-radius: 10px;
  border: 1px solid #4f46e5;
  background: #4f46e5;
  color: #fff;
}

@media (max-width: 768px) {
  .ia-fab { right: 14px; bottom: 14px; }
  .ia-chat { right: 10px; bottom: 80px; width: calc(100vw - 20px); max-height: 76vh; }
}
