.chat-card {
  background: #fff;
  border-radius: 21px;
  padding: 20px;
  margin-top: 21px;
  box-shadow: 0 3px 18px rgba(0,0,0,0.04);
}

.chat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.chat-card-title {
  font-size: 1.275rem;
  font-weight: 700;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-status {
  font-size: 0.8rem;
  color: #999;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-status.online { color: #4caf50; }
.chat-status.online::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
}

.chat-messages {
  height: 280px;
  overflow-y: auto;
  background: #f8f9fb;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.chat-load-more {
  text-align: center;
  color: #667eea;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px;
  display: none;
}

.chat-message {
  display: flex;
  margin-bottom: 12px;
  max-width: 80%;
}

.chat-message.visitor { margin-left: auto; flex-direction: row-reverse; }
.chat-message.agent { margin-right: auto; }
.chat-message.system {
  margin: 8px auto;
  max-width: 100%;
  justify-content: center;
}

.chat-bubble {
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-message.visitor .chat-bubble {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-top-right-radius: 4px;
}

.chat-message.agent .chat-bubble {
  background: #fff;
  border: 1px solid #e8eaf0;
  border-top-left-radius: 4px;
}

.chat-message.system .chat-bubble {
  background: #e8eaf0;
  color: #666;
  font-size: 0.75rem;
  padding: 4px 10px;
}

.chat-message img {
  max-width: 160px;
  max-height: 160px;
  border-radius: 10px;
  cursor: pointer;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input-row textarea {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid #e8eaf0;
  border-radius: 12px;
  font-size: 0.95rem;
  resize: none;
  min-height: 46px;
  max-height: 100px;
}

.chat-input-row textarea:focus {
  outline: none;
  border-color: #667eea;
}

.chat-upload-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.chat-input-row input[type="file"] { display: none; }

.chat-send-btn {
  padding: 11px 20px;
  background: #ff4757;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-empty {
  text-align: center;
  color: #999;
  padding: 30px 0;
  font-size: 0.9rem;
}
