.system-assistant-shell {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 2000;
  font-family: Arial, sans-serif;
}

.system-assistant-shell.assistant-right {
  left: auto;
  right: 20px;
}

.system-assistant-toggle {
  border: none;
  border-radius: 999px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.system-assistant-toggle.active {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
}

.system-assistant-panel {
  width: min(360px, calc(100vw - 24px));
  max-height: 70vh;
  margin-bottom: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.system-assistant-panel.hidden {
  display: none;
}

.system-assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 14px 16px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-bottom: 1px solid #bfdbfe;
}

.system-assistant-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-assistant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.system-assistant-header h4 {
  margin: 0 0 4px;
  color: #1e3a8a;
}

.system-assistant-header p {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
}

.system-assistant-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #16a34a;
}

.system-assistant-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

.system-assistant-close {
  border: none;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 1rem;
}

.system-assistant-messages {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  background: #f8fafc;
}

.system-assistant-message {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.45;
  font-size: 0.95rem;
}

.system-assistant-message.bot {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.system-assistant-message.user {
  background: #2563eb;
  color: #fff;
  align-self: flex-end;
}

.system-assistant-message a {
  color: inherit;
  text-decoration: none;
}

.system-assistant-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  border: 1px solid #bfdbfe;
}

.system-assistant-message.user .system-assistant-contact-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.system-assistant-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}

.system-assistant-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: assistant-bounce 1.1s infinite ease-in-out;
}

.system-assistant-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.system-assistant-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes assistant-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.6; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.system-assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 0;
  background: #f8fafc;
}

.system-assistant-suggestion {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.system-assistant-input-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.system-assistant-input-row input {
  flex: 1;
  border: 1px solid #cbd5e0;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.system-assistant-input-row button {
  border: none;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}
