/* ==========================================================================
   AUDIT BCTC — form đầy đủ, bên phải dưới chatbox
   ========================================================================== */

.audit-section {
  margin-top: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
}
.audit-label {
  font-size: 13px;
  font-weight: 700;
  color: #800020;
  margin-bottom: 10px;
}
.audit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.audit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #800020;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.audit-btn:hover {
  background: #a00028;
  transform: translateY(-1px);
}
.audit-btn-outline {
  background: #fff;
  color: #800020;
  border: 1.5px solid #800020;
}
.audit-btn-outline:hover {
  background: #fdf2f4;
}
.audit-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 6px;
}
.audit-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
}
.audit-spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid #e5e7eb;
  border-top-color: #800020;
  border-radius: 50%;
  animation: audit-spin 0.8s linear infinite;
}
@keyframes audit-spin { to { transform: rotate(360deg); } }
.audit-result {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
}
.audit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 14px;
}
.audit-badge.ok { background: #ecfdf5; }
.audit-badge.warn { background: #fffbeb; }
.audit-badge.err { background: #fef2f2; }
.audit-summary {
  color: #374151;
  font-weight: 500;
  line-height: 1.3;
}
.audit-error {
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
  line-height: 1.4;
}

/* Cột phải: chatbox + audit */
.chatbox-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;   /* anchor cho chatbox phóng to */
}

/* Audit luôn hiển thị trên cùng, kể cả khi chatbox phóng to */
.audit-section {
  flex-shrink: 0;
  position: relative;
  z-index: 21; /* cao hơn chatbox z-index:20 */
}

@media (max-width: 991px) {
  .chatbox-col { width: 100%; }
}
