/* ==============================================================================
   🛡️ 全域治理闸口大盘专属 Bento 视觉与交互样式体系 (ADR-0378 / ADR-0491)
   ============================================================================== */
.gate-governance-section {
  border-left: 6px solid #6366f1;
}
.gate-logo-pill {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border: 1px solid #c4b5fd;
}
.gate-chip-badge {
  background: #6366f1;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
}
.gate-sub-badge {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.gate-status-running {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* 闸口分类 Tabs */
.gate-tabs .gate-tab-btn {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.gate-tabs .gate-tab-btn:hover {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #c4b5fd;
}
.gate-tabs .gate-tab-btn.active {
  background: #6366f1;
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* 闸口微卡片网格与卡片排盘 */
.gate-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}
.gate-card-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.gate-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.08);
  border-color: #cbd5e1;
}
.gate-card-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.gate-card-block::before { background: #ef4444; }
.gate-card-warn::before { background: #f59e0b; }
.gate-card-stage::before { background: #3b82f6; }

.gate-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.gate-card-id {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 12px;
  color: #0f172a;
}
.gate-card-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pill-block { background: #fee2e2; color: #b91c1c; }
.pill-warn { background: #fef3c7; color: #b45309; }
.pill-stage { background: #dbeafe; color: #1d4ed8; }

.gate-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}
.gate-card-desc {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 8px;
}
.gate-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: #4f46e5;
  font-weight: 600;
  border-top: 1px dashed #f1f5f9;
  padding-top: 6px;
}

body.theme-dark .gate-logo-pill { background: rgba(99, 102, 241, 0.2); border-color: #6366f1; }
body.theme-dark .gate-sub-badge { background: #1e293b; border-color: #334155; color: #c4b5fd; }
body.theme-dark .gate-card-item { background: #1e293b; border-color: #334155; }
body.theme-dark .gate-card-id { color: #f8fafc; }
body.theme-dark .gate-card-name { color: #f1f5f9; }
body.theme-dark .gate-card-desc { color: #94a3b8; }
body.theme-dark .gate-card-footer { border-color: #334155; color: #a5b4fc; }
body.theme-dark .gate-tabs .gate-tab-btn.active { background: #6366f1; color: #fff; }
