/* --------------------------------------------------------------------------
   模組二：HITL Review & Approval Gate (人工審核卡片)
   -------------------------------------------------------------------------- */
.hitl-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hitl-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card-glass);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
}

.hitl-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 480px));
  gap: 20px;
}

.hitl-card {
  background: var(--gradient-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-card);
  max-width: 520px;
}

.hitl-card:hover {
  border-color: var(--border-glass-glow);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.hitl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hitl-tag-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-medium);
  border: 1px solid var(--border-card-light);
  margin-bottom: 14px;
}

.hitl-tag-box.unclassified {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.hitl-meta-row {
  display: flex;
  gap: 8px;
  font-size: 0.88rem;
  margin-bottom: 8px;
  align-items: baseline;
}

.hitl-meta-label {
  color: var(--text-muted);
  font-weight: 600;
  min-width: 76px;
  white-space: nowrap;
}

.hitl-meta-value {
  color: var(--text-heading);
  font-weight: 700;
}

.hitl-log-box {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--bg-panel-deep);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-sm);
  border-top: 1px solid var(--border-card-light);
  border-right: 1px solid var(--border-card-light);
  border-bottom: 1px solid var(--border-card-light);
}


.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.4;
}

.card-field-group {
  background: var(--bg-panel-deep);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}

.field-row {
  display: flex;
  gap: 8px;
}

.field-label {
  color: var(--text-subtle);
  min-width: 80px;
  font-weight: 600;
}

.field-value {
  color: var(--text-main);
  word-break: break-word;
}

/* HITL 四向按鈕群 (Approve / Dismiss / Edit / Reject) - 統一 2x2 平衡網格排版 */
.hitl-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.hitl-actions button {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  transition: var(--transition-fast);
}

.btn-approve {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
}

.btn-approve:hover {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-dismiss-safe {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border: 1px solid #3b82f6 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-dismiss-safe:hover {
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-edit {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border: none;
}

.btn-edit:hover {
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.btn-reject {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-reject:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

