.cid-inline-panel {
  width: 100%;
  box-sizing: border-box;
  margin-top: 16px;
  border-top: 1px solid #e5e8ed;
  color: #263244;
  background: #fff;
  font-size: 13px;
}

.cid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 12px;
}

.cid-head > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cid-head h3 { margin: 0; color: #182230; font-size: 15px; line-height: 22px; }
.cid-head span { color: #8490a1; font-size: 12px; }
.cid-head .cid-saved { color: #17824b; }

.cid-consumer-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid #b8d5ff;
  border-radius: 4px;
  color: #1f2f46;
  background: #f4f8ff;
  font-weight: 600;
}
.cid-switch-control { display: inline-flex; align-items: center; gap: 7px; color: #1677ff; font-size: 12px; }
.cid-switch-control input { margin: 0; }
.cid-switch-control b { font-weight: 500; }

.cid-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 12px; }
.cid-add button,
.cid-actions button {
  border: 1px solid #d5dbe4;
  border-radius: 4px;
  color: #344258;
  background: #fff;
  cursor: pointer;
}
.cid-add button { height: 32px; font-size: 12px; }
.cid-add button:hover,
.cid-actions button:hover { border-color: #1677ff; color: #1677ff; }

.cid-categories { border-top: 1px solid #edf0f4; }
.cid-category { padding: 13px 0 14px; border-bottom: 1px solid #edf0f4; }
.cid-category.is-disabled > :not(.cid-category-head) { opacity: .5; }
.cid-category-head { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.cid-order {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  color: #fff;
  background: #344258;
  text-align: center;
  font-size: 11px;
  line-height: 20px;
}
.cid-type { color: #66758a; font-size: 12px; }
.cid-enable,
.cid-check { display: inline-flex; align-items: center; gap: 6px; color: #39475b; }
.cid-enable { margin-left: auto; }
.cid-actions { display: flex; gap: 4px; }
.cid-actions button { width: 26px; height: 26px; padding: 0; font-size: 15px; line-height: 24px; }
.cid-actions button:disabled { color: #b4bcc7; background: #f5f6f8; cursor: not-allowed; }
.cid-actions button.danger:hover { border-color: #d4383f; color: #d4383f; }

.cid-title { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px; color: #6a7789; }
.cid-title input,
.cid-range input,
.cid-badge-text input,
.cid-activity-label input {
  width: 100%;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid #d1d8e2;
  border-radius: 4px;
  padding: 0 9px;
  color: #253247;
  background: #fff;
  outline: none;
}
.cid-title input:focus,
.cid-range input:focus,
.cid-badge-text input:focus,
.cid-activity-label input:focus { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(22,119,255,.1); }

.cid-badge-setting {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border-left: 3px solid #ff4d4f;
  border-radius: 4px;
  background: #fff7f6;
}
.cid-badge-switches { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cid-badge-toggle { margin: 0; white-space: nowrap; }
.cid-badge-text { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; color: #6a7789; }
.cid-badge-ui { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cid-badge-ui label { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 6px; color: #6a7789; font-size: 12px; }
.cid-badge-ui input[type="color"],
.cid-badge-ui select {
  width: 100%;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid #d1d8e2;
  border-radius: 4px;
  color: #253247;
  background: #fff;
  outline: none;
}
.cid-badge-ui input[type="color"] { min-width: 44px; padding: 3px; cursor: pointer; }
.cid-badge-ui select { padding: 0 7px; }
.cid-badge-ui input[type="color"]:focus,
.cid-badge-ui select:focus { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(22,119,255,.1); }

.cid-range { display: grid; grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr); align-items: end; gap: 6px; margin-top: 10px; }
.cid-range label { display: grid; gap: 5px; color: #7a8798; font-size: 11px; }
.cid-range > span { padding-bottom: 8px; color: #8c96a5; text-align: center; }
.cid-check { margin-top: 10px; font-size: 12px; }

.cid-activity-picker { margin-top: 10px; border: 1px solid #dfe4eb; border-radius: 4px; background: #fafbfd; }
.cid-activity-picker summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  box-sizing: border-box;
  padding: 0 10px;
  color: #3d4a5d;
  cursor: pointer;
  list-style-position: inside;
}
.cid-activity-picker summary b { color: #1677ff; font-size: 11px; font-weight: 500; }
.cid-activity-list { max-height: 280px; overflow-y: auto; border-top: 1px solid #e4e8ee; background: #fff; }
.cid-activity-option { display: grid; gap: 8px; padding: 9px 10px; border-bottom: 1px solid #f0f2f5; }
.cid-activity-option:last-child { border-bottom: 0; }
.cid-activity-option:hover { background: #f7f9fc; }
.cid-activity-option.is-selected { background: #f7faff; }
.cid-activity-choice { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cid-activity-choice > span { display: grid; min-width: 0; gap: 2px; }
.cid-activity-option strong { overflow: hidden; color: #344258; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.cid-activity-option small { color: #8a96a6; font-size: 11px; }
.cid-activity-label { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 8px; padding-left: 22px; color: #6a7789; font-size: 11px; }
.cid-activity-label input:disabled { color: #a7b0bd; background: #f3f5f8; cursor: not-allowed; }
.cid-empty { padding: 24px 10px; color: #8a96a6; text-align: center; }
.cid-warning { margin: 6px 0 0; color: #cf3d44; font-size: 11px; }

.cid-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 1400;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 4px;
  color: #fff;
  background: #208a53;
  box-shadow: 0 6px 20px rgba(18,39,66,.2);
  font-size: 13px;
}
.cid-toast.error { background: #c9363e; }

@media (max-width: 760px) {
  .cid-inline-panel { margin-top: 12px; }
  .cid-add { grid-template-columns: 1fr; }
  .cid-badge-switches { align-items: flex-start; flex-direction: column; }
  .cid-badge-ui { grid-template-columns: 1fr; }
}
