.assistant-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgb(var(--line));
  background: rgb(var(--surface));
}

.assistant-chat-header h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.assistant-chat-header span {
  display: block;
  margin-top: 4px;
  color: rgb(var(--muted));
  font-size: 0.78rem;
  font-weight: 600;
}

.assistant-icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgb(var(--line));
  border-radius: 7px;
  background: rgb(var(--surface));
  color: rgb(var(--muted));
  font-size: 1.25rem;
  box-shadow: none;
}

.assistant-icon-button:hover {
  border-color: rgb(var(--line-strong));
  background: rgb(var(--surface));
  color: rgb(var(--ink));
  box-shadow: none;
}

.assistant-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;  
  background: rgb(var(--bg));
}

.assistant-message {
  max-width: 86%;
  padding: 10px 12px;
  border: 1px solid rgb(var(--line));
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
  background: rgb(var(--surface));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.assistant-message-agent {
  align-self: flex-start;
}

.assistant-chat-form {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid rgb(var(--line));
  background: rgb(var(--panel));
}

.assistant-attach-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgb(var(--line));
  border-radius: 10px;
  background: rgb(var(--surface));
  color: rgb(var(--muted));
  box-shadow: none;
}

.assistant-attach-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.assistant-attach-button:hover {
  border-color: rgb(var(--brand));
  background: rgb(var(--brand) / 0.1);
  color: rgb(var(--brand));
  box-shadow: none;
}

.assistant-chat-form textarea {
  min-height: 44px;
  max-height: 140px;
  resize: vertical;
}

.assistant-chat-form button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.assistant-upload-status {
  grid-column: 1 / -1;
  min-height: 16px;
  color: rgb(var(--muted));
  font-size: 0.78rem;
  line-height: 1.35;
}

.assistant-message-user {
  align-self: flex-end;
  border-color: rgb(var(--line));
  background: rgb(var(--surface));
}

.assistant-message-typing {
  display: flex;
  align-items: center;
}

.assistant-message-typing .typing-dot {
  width: 8px;
  height: 8px;
  margin: 0 1.5px;
  background-color: rgb(var(--muted));
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.assistant-message-typing .typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.assistant-message-typing .typing-dot:nth-child(3) {
  animation-delay: -0.32s;
}

@keyframes typing-bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}
