.crm-commissions-module {
  background: #f6f8fb;
  border-radius: 8px;
}

.crm-commissions-list-card,
.crm-commission-assignment-card,
.crm-commission-rules-panel {
  border-radius: 8px;
}

.crm-commissions-table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e5ebf2;
}

.crm-commission-agent-cell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  min-width: 240px;
}

.crm-commission-agent-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #0f5132;
  background: #e8f6ee;
  border: 1px solid #cce8d8;
}

.crm-commission-rule-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.crm-commission-rule-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-weight: 500;
}

.crm-commission-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.crm-commission-section-head > .bi {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #0d6efd;
  background: #edf5ff;
}

.crm-commission-rules-panel {
  padding: 1rem;
  border: 1px solid #e5ebf2;
  background: #f8fafc;
}

.crm-commission-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.crm-commission-rule-card {
  display: grid;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.crm-commission-rule-card.is-enabled {
  border-color: #86b7fe;
  background: #f4f8ff;
  box-shadow: 0 0 0 .16rem rgba(13, 110, 253, .08);
}

.crm-commission-rule-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  color: #1f2937;
}

.crm-commission-rule-title .bi {
  color: #0d6efd;
}

.crm-commission-rule-desc {
  display: block;
  margin-top: .15rem;
  font-size: .78rem;
  color: #64748b;
}

.crm-commission-rule-rate {
  max-width: 120px;
}

.crm-commission-bill-preview {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .65rem;
  border: 1px solid #e5ebf2;
  border-radius: 8px;
  background: #f8fafc;
}

@media (max-width: 767.98px) {
  .crm-commission-agent-cell {
    grid-template-columns: 36px minmax(0, 1fr);
    min-width: 0;
  }

  .crm-commission-agent-avatar {
    width: 36px;
    height: 36px;
  }

  .crm-commission-rule-rate {
    max-width: none;
  }
}
