.iming365-ai-chat-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: 380px;
}

.iming365-ai-fab {
  border: 0;
  border-radius: 999px;
  background: #22c55e;
  color: #052e16;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.iming365-ai-panel {
  width: 100%;
  height: 520px;
  margin-top: 10px;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1220;
  color: #e2e8f0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  display: none;
  grid-template-rows: auto 1fr auto auto;
}
.iming365-ai-chat-root.is-open .iming365-ai-panel {
  display: grid;
}
.iming365-ai-chat-root.is-open .iming365-ai-panel[hidden] {
  display: grid !important;
}

.iming365-ai-head {
  background: #111827;
  padding: 10px 12px;
  font-weight: 700;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}
.iming365-ai-head span:last-of-type {
  flex: 1;
}

.iming365-ai-head-badge {
  background: #22c55e;
  color: #052e16;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}

.iming365-ai-close {
  border: 1px solid #334155;
  background: #0b1220;
  color: #cbd5e1;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.iming365-ai-messages {
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 240px;
}

.iming365-ai-msg {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.35;
}

.iming365-ai-msg.user {
  background: #1d4ed8;
  color: #eff6ff;
  align-self: flex-end;
}

.iming365-ai-msg.assistant {
  background: #1f2937;
  color: #e5e7eb;
  align-self: flex-start;
}
.iming365-ai-msg.assistant a,
.iming365-ai-msg.assistant a:link,
.iming365-ai-msg.assistant a:visited,
.iming365-ai-msg.assistant a:hover,
.iming365-ai-msg.assistant a:active {
  color: #ffffff !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  font-weight: 700;
  word-break: break-all;
}

.iming365-ai-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #334155;
}

.iming365-ai-form input {
  background: #020617;
  border: 1px solid #334155;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc !important;
  border-radius: 8px;
  padding: 8px 10px;
}
.iming365-ai-form input::placeholder {
  color: #94a3b8 !important;
}

.iming365-ai-form button {
  border: 0;
  border-radius: 8px;
  background: #22c55e;
  color: #052e16;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}

.iming365-ai-status {
  margin: 0;
  padding: 0 10px 10px;
  font-size: 12px;
  color: #93c5fd;
}
