/* Connections hub + Claude notification panel (mounted inside #uc-ads-app) */
.uc-cx {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 28px 56px;
  color: #1c1e21;
}

.uc-cx h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.uc-cx h2 span {
  color: #9ca3af;
  font-weight: 600;
  margin-left: 4px;
}

.uc-cx h3.uc-cx-sub {
  margin: 22px 0 8px;
  font-size: 14px;
}

.uc-cx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.uc-cx-health {
  font-size: 12px;
  color: #6b7280;
}

.uc-cx-health.warn {
  color: #b45309;
  font-weight: 600;
}

.uc-cx-group,
.uc-cx-grouplabel {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 18px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #4b5563;
}

.uc-cx-group span {
  color: #9ca3af;
  font-weight: 600;
}

.uc-cx-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
}

.uc-cx-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 28px 0 22px;
}

.uc-cx-avail {
  margin-bottom: 4px !important;
}

/* connected rows */
.uc-cx-row {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 10px;
}

.uc-cx-row-main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.uc-cx-ico {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.uc-cx-ico.sm {
  width: 22px;
  height: 22px;
}

.uc-cx-ico svg {
  width: 24px;
  height: 24px;
}

.uc-cx-ico.sm svg {
  width: 20px;
  height: 20px;
}

.uc-cx-name {
  min-width: 0;
  flex: 1 1 36%;
}

.uc-cx-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.uc-cx-name .uc-ads-muted {
  margin-top: 2px;
}

.uc-cx-mid {
  flex: 1 1 28%;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  min-width: 0;
}

.uc-cx-mid span {
  color: #6b7280;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uc-cx-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}

.uc-cx-actions .uc-ads-btn {
  background: #fff;
  border-color: #e5e7eb;
  color: #111827;
}

.uc-cx-dots {
  width: 36px;
  padding: 8px 0 !important;
  text-align: center;
  font-size: 16px;
  line-height: 1;
}

.uc-cx-menu-wrap {
  position: relative;
}

.uc-cx-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 190px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 6px;
  z-index: 5;
}

.uc-cx-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.uc-cx-menu button:hover {
  background: #f3f4f6;
}

.uc-cx-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 18px;
}

.uc-cx-pill.ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.uc-cx-pill.warn {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.uc-cx-pill.bad {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.uc-cx-pill.off {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

.uc-cx-notif {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: #374151;
}

.uc-cx-notif-ico svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.uc-cx-chip {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
}

.uc-cx-chip.ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.uc-cx-chip.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.uc-cx-expand {
  border-top: 1px solid #f0f1f3;
  padding: 14px 18px 16px;
}

.uc-cx-expand-actions {
  margin-top: 12px;
}

.uc-cx-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.uc-cx-detail-list li {
  display: flex;
  gap: 10px;
}

.uc-cx-detail-list span {
  color: #6b7280;
}

/* available tiles */
.uc-cx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.uc-cx-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: #f4f5f7;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  color: #1f2937;
}

.uc-cx-tile:hover {
  background: #eceef1;
}

.uc-cx-tile small {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

/* notification panel */
.uc-cx-notify.embed {
  padding: 2px 0 0;
}

.uc-cx-intro p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #4b5563;
  max-width: 720px;
}

.uc-cx-prefs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  margin-bottom: 14px;
}

.uc-cx-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}

.uc-cx-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
}

.uc-cx-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.uc-cx-field {
  display: block;
  margin: 10px 0;
  font-size: 12px;
  color: #4b5563;
}

.uc-cx-field.inline {
  margin: 0;
}

.uc-cx-field span {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.uc-cx-field em {
  font-weight: 400;
  color: #6b7280;
  font-style: normal;
}

.uc-cx-field input,
.uc-cx-field select,
.uc-cx-code {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
}

.uc-cx-field.inline input,
.uc-cx-field.inline select {
  width: 120px;
}

.uc-cx-code {
  width: 130px;
  letter-spacing: 0.2em;
  text-align: center;
}

.uc-cx-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.uc-cx-radios {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 13px;
}

.uc-cx-radios label.dis {
  opacity: 0.5;
}

.uc-cx-radios small {
  color: #6b7280;
  margin-left: 4px;
}

.uc-cx-template {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 8px 0;
}

.uc-cx-template code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
}

.uc-cx-link {
  border: 0;
  background: none;
  padding: 0;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.uc-cx-err {
  margin: 8px 0 0;
  font-size: 12px;
  color: #b91c1c;
}

.uc-cx-msg {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.uc-cx-msg.ok {
  background: #ecfdf5;
  color: #047857;
}

.uc-cx-msg.bad {
  background: #fef2f2;
  color: #b91c1c;
}

.uc-cx-recent {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.uc-cx-recent small {
  color: #9ca3af;
  margin-left: 6px;
}

@media (max-width: 760px) {
  .uc-cx-row-main {
    flex-wrap: wrap;
  }
  .uc-cx-mid {
    display: none;
  }
}

.uc-cx-tile small {
  display: inline-block;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2563eb;
}

/* ───────── connection popups ───────── */
.uc-cxm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.45);
  font-family: Inter, Roboto, Helvetica, Arial, sans-serif;
}

.uc-cxm {
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 24px 24px 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  color: #1c1e21;
}

.uc-cxm.embed {
  width: min(1000px, 100%);
  height: min(760px, calc(100vh - 40px));
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.uc-cxm-embed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.uc-cxm-embed-head .uc-cxm-title {
  margin: 0;
}

.uc-cxm-x {
  border: 0;
  background: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}

.uc-cxm-frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: #fff;
}

.uc-cxm-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
}

.uc-cxm-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #f4f5f7;
  border: 1px solid #eceef1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #4b5563;
  margin-bottom: 14px;
}

.uc-cxm-note svg {
  margin-top: 2px;
  flex: 0 0 auto;
}

.uc-cxm-field {
  display: block;
  margin: 12px 0;
  font-size: 13px;
}

.uc-cxm-field > span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #374151;
}

.uc-cxm-field input,
.uc-cxm-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.uc-cxm-field input:focus,
.uc-cxm-field select:focus {
  outline: 2px solid #c7d2fe;
  border-color: #6366f1;
}

.uc-cxm-help {
  display: block;
  margin: 6px 0;
  font-size: 12px;
  color: #6b7280;
}

.uc-cxm-adv {
  margin: 12px 0 0;
  font-size: 13px;
}

.uc-cxm-adv summary {
  cursor: pointer;
  color: #4b5563;
  font-weight: 600;
}

.uc-cxm-checks {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  margin: 8px 0;
  font-size: 13px;
}

.uc-cxm-checks small {
  color: #9ca3af;
}

.uc-cxm-code {
  display: block;
  word-break: break-all;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  margin: 6px 0 10px;
}

.uc-cxm-steps {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
}

.uc-cxm-done {
  background: #ecfdf5;
  color: #047857;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.uc-cxm-msg {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.uc-cxm-msg.ok {
  background: #ecfdf5;
  color: #047857;
}

.uc-cxm-msg.bad {
  background: #fef2f2;
  color: #b91c1c;
}

.uc-cxm-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.uc-cxm-cancel {
  border: 0;
  background: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #1c1e21;
}

.uc-cxm-primary {
  border: 0;
  background: #2f5bea;
  color: #fff;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.uc-cxm-primary:hover {
  background: #2449c7;
}

.uc-cxm-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ── notifications v2: reach line, rules, quiet hours ── */
.uc-cx-reachline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.uc-cx-reach {
  font-weight: 600;
}

.uc-cx-reach.ok {
  color: #15803d;
}

.uc-cx-reach.bad {
  color: #b45309;
}

.uc-cx-reach em {
  font-weight: 400;
  font-style: normal;
  color: #6b7280;
}

.uc-cx-card.wide {
  margin-bottom: 14px;
}

.uc-cx-cards.stack {
  grid-template-columns: 1fr;
  margin-top: 10px;
}

.uc-cx-card.wide .uc-cx-prefs {
  margin-bottom: 8px;
}

.uc-cx-card-head .uc-ads-switch {
  margin-left: auto;
  font-weight: 400;
  font-size: 13px;
}

.uc-cx-field.inline input[type="time"] {
  width: 110px;
}

.uc-cx-field.inline input[list] {
  width: 190px;
}
