/* Dedicated Magnetic client portal (not the BizMagnet staff chrome) */

html {
  scrollbar-gutter: stable;
}

.cp-body {
  margin: 0;
  min-height: 100%;
  font-family: "Montserrat", system-ui, sans-serif;
  color: #1a1014;
  background: #f6f6f6;
}

.cp-wash {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 0% -10%, rgba(88, 16, 47, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 8%, rgba(160, 80, 55, 0.08), transparent 50%),
    linear-gradient(165deg, #faf7f8 0%, #f6f6f6 42%, #e8e6e5 100%);
}

.cp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0.5rem;
}

.cp-brand img {
  display: block;
  height: 42px;
  width: auto;
}

.cp-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cp-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #58102f;
  background: rgba(88, 16, 47, 0.08);
  border: 1px solid rgba(88, 16, 47, 0.14);
  border-radius: 7px;
  padding: 0.35rem 0.7rem;
}

.cp-badge.is-released {
  color: #1d6b3c;
  background: rgba(29, 107, 60, 0.09);
  border-color: rgba(29, 107, 60, 0.22);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.cp-admin-view {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  color: #fff;
  background: #b91c1c;
  border: 1px solid #7f1d1d;
  border-radius: 0;
  padding: 0.2rem 0.9rem;
}

.cp-hero-row .cp-admin-view {
  margin: 0 auto;
}

.cp-release-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.cp-release-select {
  min-height: 34px;
  margin: 0;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #1a1014;
  font: inherit;
  font-size: 0.875rem;
}

.cp-release-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #6e5c64;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.cp-release-count {
  color: #6e5c64;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.cp-release-note {
  margin: 0 0 16px;
  color: #6e5c64;
  font-size: 0.875rem;
}

.cp-release-note::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #c98a12;
  vertical-align: 1px;
}

.cp-main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 3rem;
}

.cp-hero {
  margin: 0.375rem 0 1rem;
}

.cp-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #58102f;
}

.cp-hero h1 {
  margin: 0;
  font-size: 1.5rem;
}

.cp-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.cp-hero-row .cp-period {
  margin-top: 0;
}

.cp-body-full .cp-top {
  padding: 12px 1.25rem 0;
}

.cp-body-full .cp-brand img {
  height: 39.6px;
}

.cp-body-full .cp-hero {
  margin: 8px 0 8px;
  align-items: center;
}

.cp-body-full .cp-sub {
  margin-top: 2px;
}

.cp-body-full .cp-tabs {
  margin-bottom: 12px;
}

.cp-body-full .cp-panel {
  padding: 12px 16px;
  margin-bottom: 12px;
}

.cp-summary strong {
  margin-right: 8px;
}

.cp-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 16px;
  background: rgba(250, 247, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(88, 16, 47, 0.14);
}

.cp-tabs-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
}

@media (max-width: 40rem) {
  .cp-tabs .cp-tab {
    padding: 0 12px;
  }
  .cp-hero-actions {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .cp-hero-row > .cp-hero-divider {
    display: none;
  }
  .cp-period {
    max-width: 100%;
  }
  .cp-period select {
    max-width: 100%;
    text-overflow: ellipsis;
  }
}

.cp-tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 3px solid transparent;
  color: #6e5c64;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.cp-tab:hover {
  color: #58102f;
}

.cp-tab.is-active {
  color: #58102f;
  border-bottom-color: #58102f;
}

.cp-tab:focus-visible {
  outline: 2px solid #58102f;
  outline-offset: -2px;
}

.cp-tab-panel [id] {
  scroll-margin-top: 64px;
}

.cp-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: min(320px, calc(100vw - 16px));
  padding: 8px 12px;
  border-radius: 8px;
  background: #1a1014;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 6px 20px rgba(26, 16, 20, 0.25);
  pointer-events: none;
}

.cp-tooltip[hidden] {
  display: none;
}

th[data-tip],
h2[data-tip] {
  cursor: help;
  text-decoration: underline dotted rgba(110, 92, 100, 0.6);
  text-underline-offset: 4px;
}

div.cp-stat-row[data-tip] {
  cursor: help;
}

[data-tip]:focus-visible {
  outline: 2px solid #58102f;
  outline-offset: 2px;
  border-radius: 4px;
}

.cp-tab[data-tip]:focus-visible {
  outline-offset: -2px;
  border-radius: 0;
}

.cp-sub {
  margin: 0.4rem 0 0;
  color: #6e5c64;
}

.cp-period {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  align-items: center;
}

.cp-period-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6e5c64;
}

.cp-period select,
.cp-period .cp-date-text,
.cp-period-go {
  min-height: 34px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #1a1014;
  font: inherit;
  font-size: 0.8125rem;
}

.cp-period .cp-date-text {
  width: 6.25rem;
}

.cp-period select {
  min-width: 9rem;
  padding-right: 26px;
  font-weight: 600;
}

.cp-period-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 34px;
  padding: 0 3px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #58102f;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.cp-period-step:hover,
.cp-period-step:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-period-step.is-disabled {
  opacity: 0.35;
  cursor: default;
}

.cp-period-custom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border-left: 1px solid rgba(88, 16, 47, 0.18);
  padding-left: 8px;
}

.cp-period-custom[hidden],
.cp-period-go[hidden] {
  display: none;
}

.cp-period-custom label {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6e5c64;
}

.cp-period-go {
  padding: 0 10px;
  background: #58102f;
  border-color: #58102f;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.cp-period-note {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: #6e5c64;
}

.cp-period select:focus-visible,
.cp-period .cp-date-text:focus-visible,
.cp-period-go:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-tab-panel .table-wrap {
  position: relative;
  overflow-x: auto;
}

.cp-hero-row > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.cp-hero-row > div:first-child .cp-sub {
  margin: 0;
}

.cp-opp-table thead th {
  white-space: nowrap;
}

.cp-tab-panel .grid.charts > .panel {
  min-width: 0;
}

.cp-compare-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

@media (min-width: 72rem) {
  .cp-compare-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .cp-compare-list {
    grid-template-columns: 1fr;
  }
}

.cp-period-btn {
  min-height: 34px;
  padding: 0 12px;
  margin: 0;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #1a1014;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.cp-period-btn:hover,
.cp-period-btn:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-period-btn.is-active {
  background: #58102f;
  border-color: #58102f;
  color: #fff;
}

.cp-period-select-hidden {
  display: none;
}

.cp-period-dd {
  position: relative;
  display: inline-flex;
}

.cp-period-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cp-period-dd-caret {
  font-size: 0.7rem;
  color: #6e5c64;
}

.cp-period-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto auto;
  row-gap: 2px;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(88, 16, 47, 0.18);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(26, 16, 20, 0.14);
}

.cp-period-menu[hidden] {
  display: none;
}

.cp-period-menu > :not(.cp-period-bcol) {
  padding-right: 24px;
}

.cp-period-bcol {
  padding-left: 24px;
  border-left: 1px solid rgba(88, 16, 47, 0.1);
}

.cp-period-col-title {
  padding: 2px 8px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6e5c64;
}

.cp-period-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-height: 44px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  box-shadow: none;
  font: inherit;
  text-align: left;
  color: #1a1014;
  cursor: pointer;
}

.cp-period-opt:hover,
.cp-period-opt:focus-visible {
  background: rgba(88, 16, 47, 0.06);
  box-shadow: none;
  transform: none;
  filter: none;
}

.cp-period-opt.is-selected {
  background: rgba(88, 16, 47, 0.08);
}

.cp-period-opt.is-selected .cp-period-opt-name {
  color: #58102f;
  font-weight: 700;
}

.cp-period-opt-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.cp-period-opt-range {
  font-size: 0.75rem;
  color: #6e5c64;
  white-space: nowrap;
}

.cp-billing-star {
  margin-left: 2px;
  font-weight: 700;
  color: #58102f;
  cursor: help;
}

@media (max-width: 40rem) {
  .cp-period-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: calc(100vw - 2rem);
    max-height: 70vh;
    overflow-y: auto;
  }

  .cp-period-menu > :not(.cp-period-bcol) {
    padding-right: 0;
  }

  .cp-period-col-title:not(.cp-period-bcol) {
    order: 0;
  }

  .cp-period-opt:not(.cp-period-bcol) {
    order: 1;
  }

  .cp-period-col-title.cp-period-bcol {
    order: 2;
    padding-top: 12px;
  }

  .cp-period-bcol {
    order: 3;
    padding-left: 0;
    border-left: 0;
  }

  .cp-period-spacer {
    display: none;
  }
}

.cp-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(88, 16, 47, 0.12);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1rem;
  box-shadow: 0 12px 36px rgba(33, 41, 52, 0.06);
}

.cp-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.cp-intro,
.cp-panel p {
  margin: 0;
  line-height: 1.5;
}

.cp-kpis {
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.cp-kpis .kpi {
  padding: 12px 16px;
}

.cp-kpis .kpi span {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #1a1014;
}

.cp-kpis .kpi strong {
  margin-top: 4px;
  font-size: 1.75rem;
}

.cp-kpis .kpi strong.kpi-text {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
}

.cp-kpis .kpi em {
  margin-top: 4px;
  font-size: 0.875rem;
  line-height: 1.35;
}

.cp-scorecards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.cp-scorecards-col {
  display: contents;
}

@media (min-width: 64rem) {
  .cp-scorecards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: none;
    grid-template-rows: none;
    row-gap: 0;
  }

  .cp-scorecards-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .cp-scorecards-solo {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
  }

  .cp-scorecards-col .cp-scorecard {
    margin-bottom: 0;
  }

  .cp-scorecard-meetings { margin-bottom: 12px; }
  .cp-scorecard-commercial { margin-bottom: 12px; }

}

.cp-scorecards-solo { display: block; }

.cp-stat-valwrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  text-align: right;
}

.cp-partial-flag {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.cp-scorecard {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(88, 16, 47, 0.12);
  border-radius: 12px;
  padding: 8px 16px 4px;
}

.cp-scorecard-title {
  margin: 0;
  padding: 4px 0 8px;
  border-bottom: 2px solid #58102f;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #58102f;
}

.cp-stats {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cp-stat + .cp-stat {
  border-top: 1px solid rgba(88, 16, 47, 0.1);
}

.cp-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
}

.cp-stat-label {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1a1014;
}

.cp-stat-label small {
  display: block;
  margin-top: 2px;
  font-size: 0.875rem;
  font-weight: 400;
  color: #6e5c64;
}

.cp-stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #58102f;
  white-space: nowrap;
}

.cp-stat-value.is-text {
  max-width: 9rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
}

.cp-stat-link {
  min-height: 44px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
}

.cp-stat-link .cp-stat-value {
  text-decoration: none;
}

.cp-stat-link:hover {
  background: rgba(88, 16, 47, 0.06);
}

.cp-stat-link:focus-visible {
  outline: 2px solid #58102f;
  outline-offset: 0;
}

.cp-kpi-groups {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.cp-kpi-group {
  display: grid;
  gap: 8px;
}

.cp-kpi-group-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #5a6570);
}

.cp-opp-table textarea {
  min-height: 44px;
  width: 100%;
  min-width: 8rem;
  margin: 0;
  font: inherit;
  font-size: 0.9375rem;
  resize: vertical;
}

table.cp-opp-table select {
  min-width: 0;
  max-width: 100%;
  font-size: 0.75rem;
}

table.cp-opp-table select[name="ownership"] {
  width: auto;
  min-width: 62px;
}

table.cp-opp-table input {
  width: 100%;
}

#cp-open-opportunities .auth-error,
#cp-open-opportunities .flash-ok {
  margin: 0 0 12px;
}

.cp-kpis .kpi-link {
  padding: 0;
}

.cp-kpis .kpi-hit {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 100%;
  padding: 0.85rem 1rem;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}

.cp-kpis .kpi-hit:hover,
.cp-kpis .kpi-hit:focus-visible {
  outline: 2px solid #58102f;
  outline-offset: 2px;
}

.cp-kpis .kpi-hit em {
  font-style: normal;
}

.cp-ms-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  align-items: start;
}

@media (max-width: 720px) {
  .cp-ms-split {
    grid-template-columns: 1fr;
  }
}

.cp-foot {
  text-align: center;
  padding: 1rem 1.25rem 2rem;
  color: #6e5c64;
  font-size: 0.9rem;
}

.cp-foot a {
  color: #58102f;
}

.cp-subhead {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
}

.cp-alert {
  border: 1px solid rgba(146, 64, 14, 0.28);
  background: #fffbeb;
  padding: 12px 16px;
  margin: 0 0 16px;
}

.cp-alert h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #92400e;
}

.cp-alert > p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #78350f;
}

.cp-alert-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}

.cp-alert-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.cp-feedback-form {
  border: 1px solid rgba(88, 16, 47, 0.12);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.6rem 0;
  background: #fff;
}

.cp-feedback-form p {
  margin: 0 0 0.5rem;
}

.cp-mfb-table {
  font-size: 0.9375rem;
}

.cp-mfb-table th,
.cp-mfb-table td {
  vertical-align: middle;
  padding: 8px;
}

.cp-mfb-table th.num,
.cp-mfb-table td.num {
  text-align: right;
}

.cp-mfb-table select,
.cp-mfb-table input,
.cp-mfb-table button {
  min-height: 44px;
  margin: 0;
  font: inherit;
  font-size: 0.9375rem;
}

.cp-mfb-table select {
  min-width: 6.5rem;
}

.cp-mfb-table input {
  width: 8rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cp-mfb-table form {
  margin: 0;
}

.cp-mfb-table tr.is-saved td {
  background: rgba(31, 107, 74, 0.06);
}

#cp-meeting-feedback .auth-error,
#cp-meeting-feedback .flash-ok {
  margin: 0 0 12px;
}

.cp-group-table th,
.cp-group-table td {
  padding: 8px 12px;
  vertical-align: middle;
  font-size: 0.9375rem;
  text-transform: none;
  letter-spacing: 0;
}

.cp-group-table thead th {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted, #5a6570);
}

.cp-group-table tbody th,
.cp-group-table tfoot th {
  text-align: left;
  font-weight: 600;
}

.cp-group-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cp-group-table tfoot th,
.cp-group-table tfoot td {
  font-weight: 700;
  border-top: 2px solid currentColor;
}

.cp-main-wide {
  max-width: 96rem;
}

.cp-body-full .cp-top {
  max-width: 84rem;
}

.cp-body-full .cp-main {
  max-width: 84rem;
}

.cp-main-wide > .panel {
  margin-bottom: 16px;
}

.cp-group-table .nowrap {
  white-space: nowrap;
}

.cp-group-table .cp-group-text {
  min-width: 20rem;
  max-width: 48rem;
}

.cp-records th,
.cp-records td {
  vertical-align: top;
  line-height: 1.45;
}

.cp-records tbody th[scope="row"] {
  min-width: 12rem;
}

.cp-records small {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted, #5a6570);
}

.cp-records .cp-records-client th {
  padding-top: 16px;
  background: rgba(88, 16, 47, 0.06);
  color: #58102f;
  font-size: 1rem;
  font-weight: 700;
}

.cp-records .cp-records-client th span {
  margin-left: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted, #5a6570);
}

@media (max-width: 720px) {
  .cp-top {
    flex-wrap: wrap;
  }
}

.cp-tab-panel .panel,
.cp-tab-panel .cp-panel:not(.cp-alert) {
  margin: 0 0 12px;
  padding: 8px 16px 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(88, 16, 47, 0.12);
  border-radius: 12px;
  box-shadow: none;
}

.cp-tab-panel .cp-panel.cp-summary {
  padding: 12px 16px;
}

.cp-tab-panel .panel-head {
  align-items: baseline;
  gap: 4px 16px;
  margin: 0 0 4px;
  padding: 4px 0 8px;
  border-bottom: 2px solid #58102f;
}

.cp-tab-panel .panel-head h2,
.cp-tab-panel .cp-panel > h2 {
  margin: 0;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #58102f;
}

.cp-tab-panel .cp-panel > h2 {
  padding: 4px 0 8px;
  margin-bottom: 8px;
  border-bottom: 2px solid #58102f;
}

.cp-tab-panel .panel-head p {
  font-size: 0.875rem;
  color: #6e5c64;
}

.cp-tab-panel .panel > .muted,
.cp-tab-panel .panel > p {
  margin: 8px 0 0;
}

.cp-tab-panel .cp-subhead {
  margin: 16px 0 4px;
  font-size: 0.9375rem;
  color: #1a1014;
}

.cp-tab-panel table {
  font-size: 0.9375rem;
}

.cp-tab-panel th,
.cp-tab-panel td {
  border-bottom: 1px solid rgba(88, 16, 47, 0.1);
}

.cp-tab-panel table:not(.cp-mfb-table) th,
.cp-tab-panel table:not(.cp-mfb-table) td {
  padding: 8px 12px;
}

.cp-tab-panel table:not(.cp-mfb-table) :is(th, td):first-child {
  padding-left: 0;
}

.cp-tab-panel table:not(.cp-mfb-table) :is(th, td):last-child {
  padding-right: 0;
}

.cp-tab-panel .cp-opp-table-wrap .cp-opp-table tr :is(th, td):first-child {
  padding-left: 8px;
}

.cp-tab-panel .cp-opp-table-wrap .cp-opp-table tr :is(th, td):last-child {
  padding-right: 8px;
}

.cp-tab-panel .cp-records .cp-records-client th {
  padding-left: 8px;
}

.cp-tab-panel thead th {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #6e5c64;
  border-bottom: 1px solid rgba(88, 16, 47, 0.2);
}

.cp-tab-panel tbody tr:last-child > * {
  border-bottom: 0;
}

.cp-tab-panel td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cp-tab-panel .cp-ms-split {
  margin-bottom: 0;
}

.cp-tab-panel .cp-date {
  white-space: nowrap;
}

.cp-tab-panel .cp-comment {
  min-width: 20rem;
}

.cp-tab-panel .panel .cp-feedback-form {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: none;
}

/* New opportunity filters, export and table */
.cp-opp-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 4px 0 12px;
}

@media (max-width: 52rem) {
  .cp-opp-header {
    flex-wrap: wrap;
  }
}

.cp-opp-header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.cp-opp-header .cp-table-filter .cp-filter-toggle {
  margin-left: 0;
  font-size: 0.8125rem;
}

.cp-opp-header .cp-table-filter .cp-filter-toggle[aria-expanded="true"] {
  text-decoration: underline;
}

.cp-opp-header-content .cp-bdm-form {
  gap: 6px;
}

.cp-opp-header-content .cp-bdm-form label {
  font-size: 0.8125rem;
}

.cp-opp-header-content h2,
.cp-opp-header-content p {
  margin: 0;
}

.cp-opp-header-content h2 {
  white-space: nowrap;
}

.cp-opp-adv {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin: -6px 0 12px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(88, 16, 47, 0.15);
}

.cp-opp-adv .cp-filter-grid {
  align-items: center;
}

.cp-opp-adv .cp-filter-actions {
  align-items: center;
  gap: 6px;
}

.cp-hero-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.cp-hero-divider {
  width: 1px;
  height: 18px;
  background: rgba(88, 16, 47, 0.2);
  flex-shrink: 0;
}

.cp-export-menu {
  position: relative;
}

.cp-export-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(88, 16, 47, 0.2);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 0.8125rem;
  color: #58102f;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}

.cp-export-toggle:hover {
  border-color: #58102f;
  background: rgba(88, 16, 47, 0.04);
}

.cp-export-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 120px;
  background: #fff;
  border: 1px solid rgba(88, 16, 47, 0.12);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 4px 0;
  z-index: 100;
  list-style: none;
}

.cp-export-dropdown[hidden] {
  display: none;
}

.cp-export-dropdown li {
  margin: 0;
  padding: 0;
}

.cp-export-dropdown li form {
  margin: 0;
}

.cp-export-dropdown a {
  display: block;
  padding: 6px 16px;
  color: #1a1014;
  text-decoration: none;
  font-size: 0.8125rem;
  line-height: 1.4;
  cursor: pointer;
}

.cp-export-dropdown a:hover {
  background: rgba(88, 16, 47, 0.06);
  color: #58102f;
}



.cp-btn-primary,
.cp-btn-secondary,
.cp-btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #1a1014;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.cp-btn-primary {
  background: #58102f;
  border-color: #58102f;
  color: #fff;
}

.cp-btn-primary:disabled,
.cp-btn-primary[aria-disabled="true"] {
  background: rgba(88, 16, 47, 0.5);
  border-color: rgba(88, 16, 47, 0.2);
  cursor: not-allowed;
}

.cp-btn-secondary:disabled,
.cp-btn-secondary[aria-disabled="true"] {
  background: #efe9ec;
  border-color: #d9cfd4;
  color: #a4959c;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.cp-btn-primary:hover:not(:disabled),
.cp-btn-primary:focus-visible,
.cp-btn-secondary:hover:not(:disabled),
.cp-btn-secondary:focus-visible:not(:disabled),
.cp-btn-text:hover,
.cp-btn-text:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-btn-primary:hover:not(:disabled),
.cp-btn-primary:focus-visible {
  background: #6e1a3d;
}

.cp-btn-text {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #58102f;
  text-decoration: none;
}

.cp-filter-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: flex-end;
  margin: 0 0 12px;
  padding: 0;
}

@media (max-width: 52rem) {
  .cp-filter-row {
    flex-wrap: wrap;
  }
}

.cp-filter-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  flex: 1 1 auto;
  align-items: flex-end;
  min-width: 0;
}

.cp-filter-field {
  flex: 1 1 110px;
  min-width: 90px;
  max-width: 180px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-filter-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6e5c64;
  white-space: nowrap;
}

.cp-filter-field select,
.cp-filter-field .cp-multiselect-toggle {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  padding: 0 26px 0 10px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #1a1014;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
}

.cp-filter-field select:focus-visible,
.cp-filter-field .cp-multiselect-toggle:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-filter-field select[multiple] {
  min-height: 88px;
  padding: 6px;
}

.cp-filter-field-simple {
  flex: 0 1 240px;
  max-width: 280px;
}

.cp-filter-toggle {
  align-self: center;
  margin-left: 4px;
  color: #58102f;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.cp-filter-toggle:hover,
.cp-filter-toggle:focus-visible {
  color: #3e0b22;
  text-decoration: none;
}

.cp-multiselect-toggle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-filter-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}

.cp-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(88, 16, 47, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
  color: #1a1014;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.cp-filter-chip:hover,
.cp-filter-chip:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-filter-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: flex-end;
  flex: 0 0 auto;
}

.cp-bdm-form {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.cp-bdm-form label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6e5c64;
  white-space: nowrap;
}

.cp-bdm-form input[type="number"] {
  width: 52px;
  min-height: 34px;
  padding: 0 4px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 6px;
  font: inherit;
  font-size: 0.9375rem;
  text-align: center;
}

.cp-bdm-form input[type="number"]:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-bdm-form input[type="text"][inputmode="decimal"] {
  width: 110px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 6px;
  font: inherit;
  font-size: 0.9375rem;
  text-align: right;
}

.cp-bdm-form input[type="text"][inputmode="decimal"]:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-stat-valwrap .cp-stat-sub {
  display: block;
  font-size: 0.75rem;
  color: #6e5c64;
  margin-top: 2px;
}

.cp-btn-small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.875rem;
}

.cp-opp-table-wrap {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px;
}

.cp-opp-table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  font-size: 0.8125rem;
  table-layout: fixed;
}

.cp-opp-table--group {
  min-width: 1360px;
}

.cp-opp-table thead th {
  padding: 6px 3px;
  border-bottom: 1px solid rgba(88, 16, 47, 0.2);
  font-size: 0.75rem;
  font-weight: 600;
  color: #6e5c64;
  text-align: center;
  vertical-align: bottom;
  white-space: normal;
  line-height: 1.25;
}

/* Auto-save row feedback */
.cp-opp-table tr.is-saving { opacity: 0.6; pointer-events: none; }
.cp-opp-table tr.is-save-ok { animation: cp-save-flash 0.6s ease; }
.cp-opp-table tr.is-save-err td { background: #fff0f0 !important; }

#cp-client-feedback tbody tr:has(+ tr.cp-note-row) > td { border-bottom: 0; padding-bottom: 4px; }
#cp-client-feedback tbody tr:has(+ tr.cp-note-row):hover + tr.cp-note-row td,
#cp-client-feedback tbody tr.cp-note-row:hover td,
#cp-client-feedback tbody tr:has(+ tr.cp-note-row:hover) td { background: rgba(88, 16, 47, 0.035); }
tr.cp-note-row > td { padding: 0 8px 8px; border-top: 0; border-bottom: 1px solid rgba(88, 16, 47, 0.25); }
tr.cp-note-row form { margin: 0; }
.cp-note-label { display: block; }
.cp-note-label > span { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--cp-muted, #64748b); }
tr.cp-note-row textarea { width: 100%; box-sizing: border-box; padding: 6px 8px; font-size: 13px; resize: vertical; }
tr.cp-note-row td.is-saving { opacity: 0.6; }
tr.cp-note-row td.is-save-ok { animation: cp-save-flash 0.6s ease; }
tr.cp-note-row td.is-save-err { background: #fff0f0 !important; }
.cp-note-status { font-style: normal; font-weight: 400; font-size: 11px; margin-left: 8px; color: var(--cp-muted, #64748b); }
.cp-note-status.is-saved { color: #15803d; }
.cp-note-status.is-error { color: #b91c1c; font-weight: 600; }

.cp-feedback-bar { display: flex; align-items: center; gap: 8px; background: #eef4ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 14px; }
.cp-feedback-bar[hidden] { display: none; }
.cp-feedback-bar-text { flex: 1; }
.cp-feedback-bar-close { border: 0; background: none; font-size: 18px; line-height: 1; padding: 2px 6px; cursor: pointer; color: #475569; border-radius: 4px; }
.cp-feedback-bar-close:hover { background: #dbeafe; color: #0f172a; }

.cp-fx { position: fixed; z-index: 60; pointer-events: none; }
.cp-fx-thumb { position: absolute; transform: translate(-50%, -50%); font-size: 30px; animation: cp-fx-thumb 0.95s ease forwards; }
.cp-fx-spark { position: absolute; left: 0; top: 0; width: 6px; height: 6px; border-radius: 50%; transform: translate(-50%, -50%); animation: cp-fx-spark 0.85s ease-out forwards; }
@keyframes cp-fx-thumb {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  25% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
  60% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -60%) scale(1); opacity: 0; }
}
@keyframes cp-fx-spark {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.4); opacity: 0; }
}
@keyframes cp-save-flash {
  0%   { background: #e8f5e9; }
  100% { background: transparent; }
}

.cp-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding: 1px 4px;
  margin: -1px -4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cp-table-sort:hover,
.cp-table-sort:focus-visible {
  background: rgba(88, 16, 47, 0.06);
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-opp-table tbody td {
  padding: 5px 3px;
  border-bottom: 1px solid rgba(88, 16, 47, 0.1);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-opp-table tbody tr:hover td {
  background: rgba(88, 16, 47, 0.02);
}

.cp-opp-table tbody tr.is-editing td {
  background: rgba(88, 16, 47, 0.05);
}

.cp-col-company,
.cp-col-opportunity {
  min-width: 0;
  max-width: 200px;
  font-size: 0.75rem;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

.cp-opp-caret {
  display: inline-block;
  margin-right: 4px;
  color: var(--cp-muted, #64748b);
  font-size: 9px;
  transition: transform .15s ease;
}

tr.cp-opp-row.is-open .cp-opp-caret { transform: rotate(90deg); }

.cp-opp-person {
  display: block;
  margin-top: 1px;
  font-size: 0.6875rem;
  color: var(--cp-muted, #6e5c64);
}

tr.cp-opp-row:focus-visible {
  outline: 2px solid rgba(88, 16, 47, 0.4);
  outline-offset: -2px;
}

.cp-opp-table select,
.cp-opp-table input[type="date"],
.cp-opp-table input[type="text"] {
  min-height: 28px;
  padding: 2px 14px 2px 5px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 4px;
  background: #fff;
  color: #1a1014;
  font: inherit;
  font-size: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.cp-opp-table input[type="date"] {
  padding-right: 4px;
  min-width: 0;
}

.cp-opp-table select {
  -webkit-appearance: none;
  appearance: none;
  padding: 2px 6px;
}

.cp-opp-table select::-ms-expand { display: none; }

.cp-opp-table input[list]::-webkit-calendar-picker-indicator {
  display: none !important;
}

.cp-opp-table input[type="text"] {
  padding: 2px 6px;
  min-width: 0;
  max-width: 100%;
  text-align: right;
}

.cp-opp-table select:focus-visible,
.cp-opp-table input[type="date"]:focus-visible,
.cp-opp-table input[type="text"]:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-opp-edit-form[hidden] {
  display: none;
}

.cp-opp-edit-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.cp-edit-error {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #b91c1c;
  text-align: right;
}

.cp-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cp-badge-status.is-unset {
  background: #f3f4f6;
  color: #6b7280;
}

.cp-badge-status.is-yes {
  background: rgba(31, 107, 74, 0.1);
  color: #1f6b4a;
}

.cp-badge-status.is-no {
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
}

/* Custom multi-select filter control */
.cp-multiselect {
  position: relative;
}

.cp-multiselect-toggle {
  width: 100%;
  min-height: 40px;
  padding: 0 32px 0 12px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #1a1014;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.cp-multiselect-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  width: 0;
  height: 0;
  margin-top: -3px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #6e5c64;
  pointer-events: none;
}

.cp-multiselect.is-open .cp-multiselect-toggle::after {
  transform: rotate(180deg);
}

.cp-multiselect-toggle:focus-visible {
  border-color: #58102f;
  outline: 2px solid rgba(88, 16, 47, 0.28);
  outline-offset: 2px;
}

.cp-multiselect-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  max-height: 280px;
  overflow: auto;
  padding: 6px 0;
  background: #fff;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(26, 16, 20, 0.12);
}

.cp-multiselect.is-open .cp-multiselect-menu {
  display: block;
}

.cp-multiselect-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 0;
  font-size: 0.9375rem;
  cursor: pointer;
}

.cp-multiselect-option:hover,
.cp-multiselect-option:focus-within {
  background: rgba(88, 16, 47, 0.05);
}

.cp-multiselect-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #58102f;
}

.cp-multiselect-option span {
  flex: 1 1 auto;
  min-width: 0;
}

/* Pipeline report -------------------------------------------------------- */

.cp-pipeline-table td {
  vertical-align: top;
}

.cp-pipeline-table td:nth-child(2),
.cp-pipeline-table td:nth-child(3),
.cp-pipeline-table td:nth-child(4),
.cp-pipeline-table td:nth-child(5) {
  text-align: center;
}

/* Kept as a normal table cell so the vertical-align: top above applies;
   making the td a flex container would middle-align it against the row. */

.cp-pipeline-act {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: baseline;
  padding: 3px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.8125rem;
}

.cp-pipeline-act + .cp-pipeline-act {
  margin-top: 8px;
}

.cp-pipeline-act:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cp-pipeline-act:first-child {
  padding-top: 0;
}

.cp-pipeline-act-date {
  flex: 0 0 auto;
  font-weight: 600;
  color: #1a1014;
  white-space: nowrap;
}

.cp-pipeline-act-type {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #58102f;
  background: rgba(88, 16, 47, 0.07);
  padding: 1px 6px;
  border-radius: 3px;
}

.cp-pipeline-act-subject {
  flex: 0 0 auto;
  color: #1a1014;
}

.cp-pipeline-act-disp {
  flex: 0 0 auto;
  color: #6e5c64;
  font-style: italic;
}

.cp-pipeline-act-comment {
  flex: 1 1 100%;
  font-size: 0.8125rem;
  color: #4a3540;
  white-space: pre-line;
  word-break: break-word;
}

.cp-top-3 {
  display: grid;
  grid-template-columns: 1fr auto;
}

.cp-top-3 .cp-top-actions {
  justify-self: end;
}

.cp-report-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid rgba(88, 16, 47, 0.2);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #58102f;
  cursor: pointer;
  white-space: nowrap;
}

.cp-report-btn:hover,
.cp-report-btn:focus-visible {
  border-color: #58102f;
  background: rgba(88, 16, 47, 0.04);
}

.cp-send-sf-form {
  margin: 0;
}

.cp-send-sf-form .cp-report-btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

.cp-report-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(26, 16, 20, 0.45);
}

.cp-report-modal[hidden] {
  display: none;
}

.cp-report-locked {
  overflow: hidden;
}

.cp-report-panel {
  width: 100%;
  max-width: 30rem;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(88, 16, 47, 0.14);
  box-shadow: 0 12px 40px rgba(26, 16, 20, 0.28);
  padding: 16px 20px 20px;
}

.cp-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cp-report-head h2 {
  margin: 0;
  font-size: 1.125rem;
  color: #1a1014;
}

.cp-report-close {
  border: 0;
  background: transparent;
  font-size: 1.375rem;
  line-height: 1;
  color: #6e5c64;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.cp-report-close:hover,
.cp-report-close:focus-visible {
  color: #58102f;
  background: rgba(88, 16, 47, 0.06);
}

.cp-report-text {
  margin: 8px 0 12px;
  font-size: 0.875rem;
  color: #6e5c64;
}

.cp-report-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cp-report-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a1014;
}

.cp-report-field textarea,
.cp-report-field input[type="text"] {
  font: inherit;
  font-weight: 400;
  font-size: 0.9375rem;
  padding: 8px 10px;
  border: 1px solid rgba(88, 16, 47, 0.2);
  border-radius: 8px;
  background: #fff;
  color: #1a1014;
}

.cp-report-field textarea:focus-visible,
.cp-report-field input[type="text"]:focus-visible {
  outline: 2px solid rgba(88, 16, 47, 0.4);
  outline-offset: 1px;
  border-color: #58102f;
}

.cp-report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 30rem) {
  .cp-report-grid {
    grid-template-columns: 1fr;
  }
}

.cp-report-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@page { size: landscape; margin: 10mm; }

@media print {
  .cp-top, .cp-foot, .cp-tabs, .cp-hero-actions,
  .cp-export-menu, .cp-period, .cp-badge,
  .cp-opp-filter, .cp-feedback-bar, .cp-fx,
  .cp-bdm-form button, .cp-tab-toggle, .cp-report-btn,
  .cp-top-actions { display: none !important; }
  .cp-tab-panel[hidden] { display: block !important; }
  .cp-tab-panel { break-before: page; page-break-before: always; }
  .cp-tab-panel::before {
    content: attr(data-tab-label);
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c1220;
    margin: 0 0 10px;
  }
  .cp-opp-details[hidden] { display: table-row !important; }
  .cp-body { background: #fff; }
  .cp-main { max-width: none; padding: 0; }
  .cp-hero { margin-bottom: 8px; }
  .cp-wash { display: none; }
  table { page-break-inside: auto; font-size: 0.75rem; width: 100%; }
  td, th { word-wrap: break-word; overflow-wrap: break-word; }
  tr { page-break-inside: avoid; }
  .cp-opp-table select,
  .cp-opp-table input[type="date"],
  .cp-opp-table input[type="text"],
  .cp-note-form textarea { border: 0; padding: 0; min-height: auto; background: none; -webkit-appearance: none; appearance: none; }
  .cp-note-form textarea { height: auto; overflow: visible; white-space: pre-wrap; }
  .cp-note-status, .cp-savebar, .cp-cfr-switch { display: none; }
}

.conn-setup .cp-panel:not(.cp-alert) {
  padding: 16px 20px 20px;
  margin: 0 0 16px;
  box-shadow: 0 2px 10px rgba(33, 41, 52, 0.05);
}

.conn-setup .cp-panel > h2 {
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 1rem;
  font-weight: 700;
  color: #2c1220;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 10px;
}

.conn-setup .cp-panel > h2 .muted {
  font-weight: 600;
  color: #4a3b43;
}

.conn-setup .note,
.conn-setup .cp-panel p {
  color: #45353c;
}

.conn-setup {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cp-tab-panel .conn-setup {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.conn-setup .cp-panel.conn-setup-main {
  padding: 32px;
}

.conn-setup-main .conn-head-row {
  margin-bottom: 10px;
}

.conn-setup-main .conn-head-row > h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c1220;
  letter-spacing: -0.01em;
}

.conn-block {
  margin-top: 14px;
}

.conn-block + .conn-block {
  border-top: 1px solid rgba(88, 16, 47, 0.1);
  margin-top: 16px;
  padding-top: 16px;
}

.conn-setup-main > .conn-block:last-child {
  border-top: 1px solid #e5e7eb;
  margin-top: 20px;
  padding-top: 24px;
}

.conn-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 8px;
}

.conn-task-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #2c1220;
  letter-spacing: -0.01em;
}

.conn-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(88, 16, 47, 0.08);
  color: #58102f;
  white-space: nowrap;
}

.conn-badge-action {
  background: #fdf3e0;
  color: #8a5a00;
}

.conn-badge-waiting_us {
  background: #edf0f5;
  color: #475067;
}

.conn-badge-done {
  background: #e5f4ea;
  color: #1e7a3c;
}

.conn-progress {
  width: 100%;
  height: 8px;
  margin-top: 6px;
  background: rgba(88, 16, 47, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.conn-progress > span {
  display: block;
  height: 100%;
  background: #58102f;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.conn-lead {
  margin-top: 8px;
  color: #3d2f36;
  font-size: 0.95rem;
}

.conn-setup .inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  margin-right: 12px;
  vertical-align: middle;
}

.conn-setup .inline-actions > button {
  min-height: 44px;
}

@media (max-width: 480px) {
  .conn-setup .cp-panel.conn-setup-main {
    padding: 20px;
  }
  .conn-setup .inline-actions {
    display: flex;
    margin-right: 0;
    width: 100%;
  }
  .conn-setup .inline-actions > button {
    flex: 1 1 auto;
  }
}

.conn-setup button.secondary,
.conn-setup .inline-actions button.secondary {
  background: rgba(88, 16, 47, 0.08);
  border-color: rgba(88, 16, 47, 0.18);
  color: #3d1524;
}

.conn-setup button.secondary:hover,
.conn-setup .inline-actions button.secondary:hover {
  background: rgba(88, 16, 47, 0.14);
  border-color: rgba(88, 16, 47, 0.3);
  color: #58102f;
}

.conn-setup input[type="text"],
.conn-setup input[type="url"],
.conn-setup textarea {
  min-height: 40px;
}

.conn-setup .cp-panel details {
  margin-top: 4px;
}
.cp-resched-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 7px;
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}

.cp-tab-toggle {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.cp-tab-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.cp-cal {
  position: absolute;
  z-index: 70;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(88, 16, 47, 0.18);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(26, 16, 20, 0.14);
}

.cp-cal[hidden] {
  display: none;
}

.cp-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cp-cal-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1014;
}

.cp-cal-nav {
  min-width: 32px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #58102f;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.cp-cal-nav:hover,
.cp-cal-nav:focus-visible {
  background: rgba(88, 16, 47, 0.08);
}

.cp-cal-grid {
  display: grid;
  grid-template-columns: auto repeat(7, 32px);
  gap: 2px;
  align-items: center;
}

.cp-cal-dow {
  padding: 2px 0 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  color: #6e5c64;
}

.cp-cal-wk {
  padding-right: 8px;
  border-right: 1px solid rgba(88, 16, 47, 0.1);
  margin-right: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: right;
  color: #9a8a92;
}

.cp-cal-day {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #1a1014;
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.cp-cal-day:hover,
.cp-cal-day:focus-visible {
  background: rgba(88, 16, 47, 0.08);
}

.cp-cal-day.is-other {
  color: #b6a7ae;
}

.cp-cal-day:disabled,
.cp-cal-day.is-off {
  color: #cfc2c8;
  cursor: default;
}

.cp-cal-day:disabled:hover,
.cp-cal-day.is-off:hover {
  background: none;
}

.cp-cal-day.is-today {
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(88, 16, 47, 0.35);
}

.cp-cal-day.is-range {
  background: rgba(88, 16, 47, 0.12);
  border-radius: 0;
}

.cp-cal-day.is-selected {
  background: #58102f;
  color: #fff;
}

.cp-savebar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.cp-savebar.is-fixed {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  margin: 0;
}

.cp-savebar-nav {
  align-items: center;
  margin: 0 0 0 auto;
}

.cp-saveall {
  min-height: 28px;
  padding: 3px 12px;
  border: 0;
  border-radius: 8px;
  background: #58102f;
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 16, 20, 0.2);
}

.cp-saveall:hover,
.cp-saveall:focus-visible {
  background: #6d1a3f;
}

.cp-saveall.is-busy {
  opacity: 0.75;
  cursor: default;
}

.cp-saveall.is-saved {
  background: #15803d;
}

.cp-saveall.is-saved:hover,
.cp-saveall.is-saved:focus-visible {
  background: #166534;
}

.cp-cal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.cp-cal-link {
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #58102f;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.cp-cal-link:hover,
.cp-cal-link:focus-visible {
  background: rgba(88, 16, 47, 0.08);
}

/* Opportunity row expand + details */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

tr.cp-opp-history > td { background: #faf7f8; padding: 12px 16px; border-top: 0; }
.cp-history-panel { max-width: 46rem; }
.cp-history-title { display: block; font-size: 0.8125rem; margin-bottom: 8px; color: #3d2530; }
.cp-history-entry { padding: 8px 0; border-top: 1px solid rgba(88, 16, 47, 0.1); }
.cp-history-entry:first-child { border-top: 0; padding-top: 0; }
.cp-history-head { font-size: 0.8125rem; font-weight: 600; color: #6e5c64; margin-bottom: 2px; }
.cp-history-change { font-size: 0.8125rem; color: #1a1014; }
.cp-history-more { margin-top: 6px; padding: 0; border: 0; background: none; font-size: 0.8125rem; font-weight: 600; color: #58102f; cursor: pointer; }
.cp-history-more:hover { text-decoration: underline; }
tr.cp-opp-row { cursor: pointer; }
tr.cp-opp-row.is-closed td { opacity: .62; }
tr.cp-opp-row.is-concluded td { opacity: .62; }
tr.cp-opp-row.needs-feedback td { animation: cp-opp-pulse 3.2s ease-in-out infinite; }
@keyframes cp-opp-pulse {
  0%, 100% { background-color: rgba(245, 158, 11, .07); }
  50% { background-color: rgba(245, 158, 11, .16); }
}
@media (prefers-reduced-motion: reduce) {
  tr.cp-opp-row.needs-feedback td { animation: none; background-color: rgba(245, 158, 11, .12); }
}
.cp-opp-hint { margin: 4px 0 0; font-size: 13px; }
tr.cp-opp-details > td { background: var(--cp-soft, #f8fafc); padding: 12px 16px; border-top: 0; }
.cp-opp-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cp-opp-detail-line { margin: 0 0 6px; font-size: 13px; }
.cp-opp-detail-line strong { display: inline-block; min-width: 96px; font-weight: 600; }
.cp-opp-notes-field { display: flex; flex-direction: column; }
.cp-opp-notes-wide { margin-top: 12px; }
.cp-opp-notes-field > span { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--cp-muted, #64748b); }
.cp-opp-notes-field textarea { width: 100%; flex: 1; min-height: 46px; font: inherit; padding: 8px; border: 1px solid var(--cp-line, #e2e8f0); border-radius: 8px; resize: vertical; }
.cp-opp-cal-field { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--cp-ink, #0f172a); cursor: pointer; }
.cp-opp-cal-field input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--cp-accent, #58102f); cursor: pointer; }
.cp-next-steps select { width: 100%; }
.cp-opp-remind-form { margin-top: 8px; }
.cp-opp-remind-form[hidden] { display: none; }
.cp-remind-wrap { display: inline-flex; align-items: center; gap: 8px; }
.cp-remind-wrap input[type="date"] { font: inherit; padding: 4px 8px; border: 1px solid var(--cp-line, #e2e8f0); border-radius: 8px; }
.cp-remind-status { font-size: 12px; }
.cp-opp-reminders { margin-top: 8px; }
.cp-opp-brief { max-width: 46rem; margin-top: 8px; padding: 10px 14px; border: 1px solid var(--cp-line, #e2e8f0); border-radius: 10px; background: var(--cp-soft, #f8fafc); }
.cp-opp-brief-title { display: block; font-size: 0.8125rem; margin-bottom: 8px; color: #3d2530; }
.cp-opp-reminder-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-opp-reminder-line strong { min-width: 0; font-weight: 600; }
/* Member tasks/promises on opportunities */
.cp-opp-tasks { margin-top: 8px; }
.cp-opp-task-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-opp-task-line strong { min-width: 0; font-weight: 600; }
.cp-opp-taskdone-form { display: inline; }
.cp-opp-task-form { margin-top: 8px; }
.cp-task-wrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-task-wrap input[type="text"] { font: inherit; padding: 4px 8px; border: 1px solid var(--cp-line, #e2e8f0); border-radius: 8px; min-width: 180px; }
.cp-task-wrap input[type="date"] { font: inherit; padding: 4px 8px; border: 1px solid var(--cp-line, #e2e8f0); border-radius: 8px; }
.cp-task-kind { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--cp-mut, #64748b); }
.cp-my-reminders { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--cp-line, #e2e8f0); border-radius: 10px; background: var(--cp-soft, #f8fafc); font-size: 13px; }
.cp-my-reminders ul { margin: 6px 0 0; padding-left: 18px; }
.cp-my-reminders li { margin: 2px 0; }
/* "Needs attention" strip on the opportunities tab */
.cp-attention { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #f3c98a; border-radius: 10px; background: #fdf6ec; font-size: 13px; }
.cp-attention ul { margin: 6px 0 0; padding-left: 18px; }
.cp-attention li { margin: 2px 0; }
.cp-attention a { color: inherit; font-weight: 600; }
.cp-agenda { margin: 0 0 14px; padding: 12px 16px; }
.cp-agenda-title { margin: 0 0 6px; font-size: 0.95rem; font-weight: 700; }
.cp-agenda-list { margin: 0; padding: 0; list-style: none; font-size: 0.88rem; }
.cp-agenda-ready { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(0,0,0,.08); }
.cp-agenda-list li { margin: 3px 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cp-agenda-detail { color: var(--cp-muted, #64748b); }
.cp-agenda-list a { font-size: 0.82rem; }
.cp-team-week { margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--cp-line, #ececf0); border-radius: 10px; background: var(--cp-soft, #faf9fb); }
.cp-team-week h3 { margin: 0 0 6px; }
.cp-team-week .cp-agenda-list li { align-items: baseline; }
.cp-team-week .cp-chip { font-size: 0.7rem; }
.cp-htab-co { margin: 0 0 16px; }
.cp-htab-co h3 { margin: 0 0 6px; font-size: 0.98rem; }
.cp-htab-list { margin: 0; padding: 0; list-style: none; font-size: 0.88rem; }
.cp-htab-list li { margin: 3px 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cp-htab-when { min-width: 64px; color: var(--cp-muted, #64748b); font-size: 0.82rem; flex: none; }
@media (max-width: 860px) {
  .cp-opp-details-grid { grid-template-columns: 1fr; }
}

@media (max-width: 52rem) {
  .cp-top-3 {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .cp-top-3 .cp-top-actions {
    justify-self: start;
    flex-wrap: wrap;
  }

  .cp-release-form,
  .cp-release-tab {
    flex-wrap: wrap;
    white-space: normal;
  }

  .cp-opp-header .cp-table-filter,
  .cp-opp-adv,
  .cp-filter-actions,
  .cp-opp-header-content .cp-bdm-form {
    flex-wrap: wrap;
  }

  .cp-filter-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .cp-filter-grid {
    flex-wrap: wrap;
    flex: 1 1 100%;
  }

  .cp-opp-header-content h2 {
    white-space: normal;
  }
}

@media (max-width: 80rem) {
  .cp-opp-table:not(.cp-pipeline-table) {
    display: block;
    min-width: 0;
  }

  .cp-opp-table:not(.cp-pipeline-table) thead {
    display: none;
  }

  .cp-opp-table:not(.cp-pipeline-table) tbody,
  .cp-opp-table tbody tr.cp-opp-details:not([hidden]),
  .cp-opp-table tbody tr.cp-opp-details > td {
    display: block;
  }

  .cp-opp-table tbody tr.cp-opp-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    width: 100%;
    padding: 6px 4px;
    box-sizing: border-box;
  }

  .cp-opp-table tbody tr.cp-opp-row > td {
    overflow: visible;
    text-overflow: clip;
    padding: 4px 5px;
    box-sizing: border-box;
  }

  .cp-opp-row > td.cp-col-company {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    font-weight: 600;
  }

  .cp-opp-row > td.cp-col-opportunity {
    order: 2;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }

  .cp-opp-table tbody tr.cp-opp-row::after {
    content: '';
    order: 3;
    flex-basis: 100%;
    height: 0;
  }

  .cp-opp-row > td[data-label] {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .cp-opp-row > td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    color: #6e5c64;
    text-align: left;
  }

  .cp-opp-row > td.cp-f {
    order: 4;
    flex: 1 1 11%;
    min-width: 96px;
  }

  .cp-opp-row > td.cp-f-att {
    flex-basis: 14%;
  }

  .cp-opp-row > td.cp-f-reason {
    flex-basis: 20%;
    flex-grow: 2;
  }

  .cp-opp-row > td.cp-f-next {
    flex-basis: 19%;
    flex-grow: 2;
  }

  .cp-opp-row > td.cp-f-own {
    flex-basis: 8%;
    min-width: 74px;
  }

  .cp-opp-row > td.cp-f-val {
    flex-basis: 9%;
    min-width: 78px;
  }
}

@media (max-width: 80rem) {
  .cp-opp-table tbody tr.cp-opp-history:not([hidden]),
  .cp-opp-table tbody tr.cp-opp-history > td {
    display: block;
  }
}



.cp-strategy .cp-strategy-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.cp-strategy-request {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(88, 16, 47, 0.12);
  border-radius: 8px;
  background: rgba(88, 16, 47, 0.02);
}

.cp-strategy-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 12rem);
  gap: 8px;
}

.cp-strategy-label {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.cp-strategy-form textarea {
  display: block;
  width: 100%;
  min-height: 5.5rem;
  padding: 8px 10px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 6px;
  font: inherit;
  font-weight: 400;
  resize: vertical;
  box-sizing: border-box;
}

.cp-strategy-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-strategy-side .cp-btn-primary {
  margin-top: auto;
  white-space: nowrap;
}

.cp-strategy-name {
  padding: 7px 10px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 6px;
  font: inherit;
}

.cp-strategy-request .flash-ok,
.cp-strategy-request .auth-error {
  margin: 8px 0 0;
}

.cp-strategy-history {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(88, 16, 47, 0.1);
}

.cp-strategy-frame {
  display: block;
  width: 100%;
  height: 72vh;
  border: 1px solid rgba(88, 16, 47, 0.14);
  border-radius: 8px;
  background: #fff;
}

.cp-strategy-open {
  margin: 8px 0 0;
  font-size: 0.85rem;
}

.cp-strategy-admin {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px dashed rgba(88, 16, 47, 0.35);
  border-left: 4px solid #e8a41c;
  border-radius: 8px;
  background: rgba(232, 164, 28, 0.06);
}

.cp-strategy-admin-title {
  display: block;
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #58102f;
}

.cp-strategy-admin-cur {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.cp-strategy-admin-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cp-strategy-admin-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.cp-strategy-admin-form select {
  flex: 1 1 16rem;
  min-width: 0;
  max-width: 34rem;
  padding: 7px 10px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}

.cp-strategy-admin .flash-ok,
.cp-strategy-admin .auth-error {
  margin: 8px 0 0;
}

.cp-req-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.cp-requests .cp-req-history {
  max-width: none;
}

.cp-req-form .cp-report-field span {
  font-size: 0.8125rem;
  font-weight: 600;
}

.cp-req-form .cp-report-field select,
.cp-req-form .cp-report-field input[type="date"] {
  font: inherit;
  font-weight: 400;
  font-size: 0.9375rem;
  padding: 8px 10px;
  border: 1px solid rgba(88, 16, 47, 0.2);
  border-radius: 8px;
  background: #fff;
  color: #1a1014;
}

.cp-req-form .cp-report-field select:focus-visible,
.cp-req-form .cp-report-field input[type="date"]:focus-visible {
  outline: 2px solid rgba(88, 16, 47, 0.4);
  outline-offset: 1px;
  border-color: #58102f;
}

.cp-req-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.cp-req-row .cp-report-field {
  flex: 1 1 10rem;
}

.cp-req-name {
  flex: 1 1 10rem;
  min-width: 9rem;
}

.cp-req-form .cp-btn-primary {
  align-self: flex-start;
}

.cp-req-status {
  font-weight: 600;
  color: #58102f;
}

.cp-req-reply {
  margin-top: 2px;
  padding: 6px 10px;
  border-left: 3px solid rgba(88, 16, 47, 0.3);
  background: rgba(88, 16, 47, 0.03);
  border-radius: 0 6px 6px 0;
}

.cp-req-details > summary {
  cursor: pointer;
  list-style: none;
}

.cp-req-details > summary::-webkit-details-marker {
  display: none;
}

.cp-req-details > summary::before {
  content: '\25B8';
  display: inline-block;
  margin-right: 6px;
  color: #58102f;
  transition: transform 0.12s ease;
}

.cp-req-details[open] > summary::before {
  transform: rotate(90deg);
}

.cp-req-summary .cp-req-title {
  display: block;
  margin-top: 1px;
}

.cp-req-body {
  margin-top: 6px;
  padding-left: 18px;
}

.cp-req-msg,
.cp-req-our-reply {
  margin-top: 6px;
  padding: 6px 10px;
  border-left: 3px solid rgba(88, 16, 47, 0.3);
  background: rgba(88, 16, 47, 0.03);
  border-radius: 0 6px 6px 0;
}

.cp-req-our-reply {
  border-left-color: #15803d;
}

.cp-req-replied {
  font-weight: 700;
  color: #15803d;
}

.cp-req-remove-form {
  margin: 8px 0 0;
}

.cp-req-remove {
  font-size: 0.8125rem;
  padding: 4px 12px;
}

@media (max-width: 30rem) {
  .cp-req-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.cp-campaign {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-campaign-select {
  min-height: 30px;
  margin: 0;
  padding: 0 26px 0 9px;
  border: 1px solid rgba(88, 16, 47, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #6e5c64;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
}

@media (max-width: 52rem) {
  .cp-strategy-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .cp-strategy-frame {
    height: 60vh;
  }
}

.cp-app-qr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 4px;
  border: 1px solid rgba(88, 16, 47, 0.2);
  border-radius: 8px;
  background: #fff;
  color: #58102f;
  text-decoration: none;
  flex-shrink: 0;
}

.cp-app-qr svg {
  display: block;
  width: 32px;
  height: 32px;
}

.cp-app-qr-label {
  font-size: 0.65625rem;
  font-weight: 600;
  white-space: nowrap;
}

.cp-install-steps {
  text-align: left;
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.cp-install-steps li {
  margin-bottom: 0.5rem;
}

.cp-install-qr {
  margin-top: 1.5rem;
}

.cp-install-qr svg {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 0.5rem;
}

.cp-install-qr p {
  margin: 0;
  font-size: 0.75rem;
}

/* Client Feedback Required section (Feedback tab) */
.cp-cfr.cp-cfr-alert {
  border: 1px solid rgba(146, 64, 14, 0.45);
  background: #fffbeb;
}

.cp-cfr.cp-cfr-alert .panel-head h2 {
  color: #92400e;
}

.cp-cfr.cp-cfr-alert .panel-head p {
  color: #78350f;
}

/* Feedback tab: open-items dot and attention highlight */
.cp-tab .cp-fb-dot,
.cp-fb-sub .cp-fb-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: #b45309;
  vertical-align: middle;
}

.cp-tab.is-alert {
  color: #92400e;
  font-weight: 700;
  border-bottom-color: rgba(146, 64, 14, 0.55);
}

.cp-tab.is-alert:hover,
.cp-tab.is-alert.is-active {
  color: #92400e;
  border-bottom-color: #92400e;
}

/* Feedback sub-menu inside the Feedback and Requests panels */
.cp-fb-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.cp-fb-sub {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid rgba(88, 16, 47, 0.2);
  border-radius: 999px;
  background: #fff;
  color: #58102f;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.cp-fb-sub:hover {
  border-color: #58102f;
}

.cp-fb-sub.is-active {
  background: #58102f;
  border-color: #58102f;
  color: #fff;
}

.cp-fb-sub .cp-fb-dot.is-done {
  background: #15803d;
}

.cp-fb-sub.has-items {
  font-weight: 700;
  border-color: rgba(88, 16, 47, 0.5);
}

.cp-fb-sub.is-active .cp-fb-dot {
  background: #fbbf24;
}

.cp-fb-sub.is-active .cp-fb-dot.is-done {
  background: #4ade80;
}

tr.cp-cfr-done td {
  opacity: 0.62;
}

.cp-cfr-act {
  white-space: nowrap;
}

.cp-cfr-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}

.cp-cfr-check input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
}

.cp-cfr-switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.25s ease;
}

.cp-cfr-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(26, 16, 20, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cp-cfr-check input:checked + .cp-cfr-switch {
  background: #15803d;
}

.cp-cfr-check input:checked + .cp-cfr-switch::before {
  transform: translateX(18px);
}

.cp-cfr-check input:focus-visible + .cp-cfr-switch {
  outline: 2px solid #58102f;
  outline-offset: 2px;
}

.cp-cfr-state {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 2.6em;
}

@media (prefers-reduced-motion: reduce) {
  .cp-cfr-switch,
  .cp-cfr-switch::before {
    transition: none;
  }
}

.cp-cfr-who {
  margin-left: 6px;
  font-size: 0.8rem;
}

.cp-legend {
  margin: 4px 0 0;
  font-size: 0.82rem;
}

/* Client dashboard controls share the Campaign field's corner radius */
.cp-body button,
.cp-body .cp-fb-sub,
.cp-body .cp-app-qr {
  border-radius: 8px;
}

/* Per-table "Filter by" controls pinned to the right of the panel head row */
.panel-head .cp-table-filter {
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 0 auto;
}

.panel-head .cp-table-filter .cp-filter-field-simple {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  max-width: none;
  min-width: 0;
}

.panel-head .cp-table-filter .cp-filter-field-simple label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.panel-head .cp-table-filter .cp-filter-field-simple select {
  width: 160px;
  min-height: 32px;
  font-size: 0.8125rem;
}

.panel-head .cp-table-filter .cp-filter-actions {
  align-items: center;
  gap: 6px;
}

.panel-head .cp-table-filter .cp-btn-primary,
.panel-head .cp-table-filter .cp-btn-secondary {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.8125rem;
}

@media (max-width: 52rem) {
  .panel-head .cp-table-filter {
    flex-wrap: wrap;
  }
}

/* Request conversations: chat bubbles, Magnetic palette */
.cp-chat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.cp-chat-empty {
  margin: 0.25rem 0;
}

.cp-msg {
  max-width: 78%;
  padding: 0.5rem 0.8rem 0.3rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  box-shadow: 0 1px 1px rgba(26, 16, 20, 0.06);
}

.cp-msg-them {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid rgba(88, 16, 47, 0.12);
  border-bottom-left-radius: 4px;
  color: #1a1014;
}

.cp-msg-me {
  align-self: flex-end;
  background: rgba(88, 16, 47, 0.1);
  border: 1px solid rgba(88, 16, 47, 0.18);
  border-bottom-right-radius: 4px;
  color: #1a1014;
}

.cp-msg-body {
  white-space: normal;
  overflow-wrap: anywhere;
}

.cp-msg-meta {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: #8a7a82;
  text-align: right;
}

.cp-msg-them .cp-msg-meta {
  text-align: left;
}

.cp-req-reply-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.cp-req-reply-form textarea {
  flex: 1;
  min-height: 2.6rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(88, 16, 47, 0.2);
  border-radius: 14px;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
  background: #ffffff;
}

.cp-req-reply-form textarea:focus {
  outline: 2px solid #58102f;
  outline-offset: 1px;
}

.cp-req-send {
  flex-shrink: 0;
  border-radius: 14px;
}

.cp-req-staff-hint {
  margin: 0.25rem 0 0.75rem;
}

/* Request conversations: Outlook-style list/detail panes */
.cp-req-layout {
  display: flex;
  border: 1px solid rgba(88, 16, 47, 0.14);
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  min-height: 18rem;
}

.cp-req-list {
  flex: 0 0 15rem;
  overflow-y: auto;
  max-height: 30rem;
  border-right: 1px solid rgba(88, 16, 47, 0.12);
  background: rgba(88, 16, 47, 0.03);
}

.cp-req-item {
  display: block;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(88, 16, 47, 0.08);
  border-left: 3px solid transparent;
  color: inherit;
  text-decoration: none;
}

.cp-req-item:hover {
  background: rgba(88, 16, 47, 0.06);
}

.cp-req-item.is-sel {
  background: rgba(88, 16, 47, 0.1);
  border-left-color: #58102f;
}

.cp-req-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.cp-req-item-name {
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-req-item-date {
  font-size: 0.7rem;
  color: #8a7a82;
  flex-shrink: 0;
}

.cp-req-item-sub {
  display: block;
  margin-top: 1px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #58102f;
}

.cp-req-item-prev {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: #8a7a82;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-req-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0.8rem 1rem 1rem;
}

.cp-req-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(88, 16, 47, 0.1);
}

.cp-req-pane-title strong {
  font-size: 1rem;
}

.cp-req-pane-meta {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: #8a7a82;
}

.cp-req-pane .cp-chat {
  flex: 1;
}

.cp-req-pane .cp-req-remove-form {
  margin: 0;
  flex-shrink: 0;
}

@media (max-width: 44rem) {
  .cp-req-layout {
    flex-direction: column;
  }

  .cp-req-list {
    flex: none;
    max-height: 12rem;
    border-right: 0;
    border-bottom: 1px solid rgba(88, 16, 47, 0.12);
  }
}

/* Staff "new request" composer in the admin view */
.cp-req-new {
  margin: 0.25rem 0 0.25rem;
}

.cp-req-new > summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
}

.cp-req-new > summary::-webkit-details-marker {
  display: none;
}

.cp-req-new-form {
  margin-top: 0.6rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(88, 16, 47, 0.14);
  border-radius: 10px;
  background: rgba(88, 16, 47, 0.03);
}

.cp-period-pick {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

.cp-period-weeks {
  white-space: nowrap;
  flex: none;
}

/* Admin preview: decluttered staff view - chrome-only, hides preview/admin controls */
body.cp-preview .cp-badge,
body.cp-preview .cp-release-form,
body.cp-preview .cp-release-count,
body.cp-preview .ghost-link[href*="client-portal-edit"],
body.cp-preview .ghost-link[href*="client-portal-group-edit"],
body.cp-preview .cp-report-btn[data-cp-report-open],
body.cp-preview .cp-campaign-select,
body.cp-preview label[for="cp-campaign-select"],
body.cp-preview .cp-feedback-bar,
body.cp-preview .cp-app-qr,
body.cp-preview .cp-saveall,
body.cp-preview .cp-badge.is-released {
  display: none !important;
}

/* Admin view: centered red marker in the top logo row */
.cp-top { position: relative; }
.cp-top .cp-admin-view { position: absolute; left: 50%; transform: translateX(-50%); }


/* Admin preview: publication top bar (replaces the side menu) */
body.cp-preview .cp-main { padding-left: 0; }
.cp-pubside {
  position: sticky; top: 0; z-index: 600;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem;
  width: auto; padding: 0.45rem 0.8rem; margin: 0 0 0.8rem;
  background: #fdf4e3; border: 1px solid #e5cf9f; border-radius: 8px;
  font-size: 0.85rem; color: #374151;
}
.cp-pubside-h { font-weight: 700; color: #58102f; }
.cp-pubside-status { display: inline-flex; align-items: center; gap: 0.45rem; }
.cp-pubside-cand { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.15rem 0.5rem; border: 1px solid #d97706; border-radius: 6px; background: #fffbeb; }
.cp-pubside-hist { position: relative; }
.cp-pubside-hist summary { cursor: pointer; color: #58102f; font-weight: 600; }
.cp-pubside-pop {
  position: absolute; left: 0; top: calc(100% + 4px); min-width: 320px; max-height: 60vh; overflow-y: auto;
  background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; padding: 0.4rem 0.7rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 700;
}
.cp-pubside-manage { margin-left: auto; color: #58102f; }

/* Publication versions dropdown: compact clean rows */
.cp-pubside-pop { min-width: 340px; padding: 0.3rem 0; }
.cp-pubside-row { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 0.6rem; align-items: center; padding: 0.45rem 0.7rem; border-bottom: 1px solid #f1f2f4; }
.cp-pubside-row:last-child { border-bottom: 0; }
.cp-pubside-row .cp-chip { font-size: 0.7rem; padding: 0.05rem 0.4rem; }
.cp-pubside-acts { display: inline-flex; align-items: center; gap: 0.5rem; }
.cp-pubside-acts a { font-size: 0.82rem; }
.cp-pubside-row button.cp-pubside-link {
  background: #fff; border: 1px solid #58102f; color: #58102f;
  font-size: 0.78rem; font-weight: 600; padding: 0.12rem 0.55rem;
  border-radius: 6px; cursor: pointer; text-decoration: none; line-height: 1.4;
}
.cp-pubside-row button.cp-pubside-link:hover { background: #58102f; color: #fff; }

/* Client-view preview of a published version: hide remaining admin chrome */
body.cp-cv .cp-admin-view,
body.cp-cv .cp-pubside,
body.cp-cv .cp-top-actions { display: none !important; }

/* Manager allocation rail: sits outside the opportunities table, one select per row */

/* Manager allocation rail hangs outside the card on the right */
.cp-alloc-rel { position: relative; }
.cp-alloc-rail {
  position: absolute; right: -10.75rem; top: 0; width: 9.5rem;
  display: flex; flex-direction: column;
}
.cp-alloc-rail-head {
  display: flex; align-items: center; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: #6b7280; padding: 0 0.2rem;
}
.cp-alloc-rail-cell { display: flex; align-items: center; }
.cp-alloc-rail-cell select {
  width: 100%; font-size: 0.8rem; padding: 0.3rem 0.4rem;
  border: 1px solid #d9dce2; border-radius: 6px; background: #fff; color: #1a1014;
}
@media (max-width: 1560px) {
  .cp-alloc-rail { position: static; width: 12rem; margin: 0.5rem 0 0; }
  .cp-alloc-rail-head { display: none; }
}

/* My Team tab (manager-only, client dashboard) */
.cp-myteam-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.cp-myteam-table th { text-align: left; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; padding: 0.4rem 0.55rem; border-bottom: 1px solid #e5e7eb; }
.cp-myteam-table td { padding: 0.5rem 0.55rem; border-bottom: 1px solid #f1f2f4; vertical-align: middle; }
#cp-my-team .cp-team-members { table-layout: auto; }
#cp-my-team .cp-team-members th, #cp-my-team .cp-team-members td { white-space: nowrap; }
#cp-my-team .cp-team-members th:last-child { text-align: center; }
#cp-my-team { overflow-x: auto; }
#cp-my-team .cp-team-members td:nth-child(3) { min-width: 14rem; }
#cp-my-team .cp-team-members .cp-list-actions { white-space: nowrap; text-align: right; }
#cp-my-team .cp-team-members .cp-list-actions .cp-tbtn { padding: 0.22rem 0.45rem; margin: 0.1rem 0.04rem; gap: 0.25rem; }
#cp-my-team .cp-team-members .cp-list-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.25rem; }
#cp-my-team .cp-team-members .cp-list-actions > * { margin: 0 !important; flex: 0 0 auto; }
#cp-my-team .cp-team-members .cp-list-actions > :nth-child(1) { min-width: 6.9rem; }
#cp-my-team .cp-team-members .cp-list-actions .cp-tbtn { justify-content: center; }
#cp-my-team .cp-list-actions .cp-tbtn svg, #cp-my-team .cp-list-actions summary.cp-tbtn svg { flex: 0 0 12px; }
.cp-acts-menu { min-width: 12rem; padding: 0.25rem; display: flex; flex-direction: column; }
#cp-my-team .cp-sect-div { border: 0; height: 1px; margin: 1.6rem 0 1.1rem; background: linear-gradient(to right, transparent, #d9dce2 18%, #d9dce2 82%, transparent); }
#cp-my-team h3 { font-size: 0.95rem; margin: 0 0 0.7rem; }
.cp-acts-menu form { margin: 0; }
.cp-acts-item { display: flex; align-items: center; gap: 0.45rem; width: 100%; padding: 0.42rem 0.6rem; border: 0; background: none; box-shadow: none; appearance: none; -webkit-appearance: none; font-family: inherit; font-size: 0.8rem; font-weight: 600; color: #374151; text-align: left; cursor: pointer; border-radius: 6px; list-style: none; box-sizing: border-box; }
.cp-acts-item:hover { background: #f4f5f7; box-shadow: none; transform: none; filter: none; }
.cp-acts-item.is-danger { color: #b91c1c; }
.cp-acts-item.is-muted { color: #6b7280; cursor: default; }
.cp-acts-item.is-muted:hover { background: none; }
summary.cp-acts-item::-webkit-details-marker { display: none; }
summary.cp-acts-item::marker { content: none; }
.cp-acts-sub[open] > summary.cp-acts-item { background: #f4f5f7; }
.cp-acts-sub form label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: #374151; }
.cp-acts-sub form label:has(input:not([type=checkbox])), .cp-acts-sub form label:has(select) { flex-direction: column; align-items: stretch; gap: 0.18rem; }
.cp-acts-sub form label span { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }
.cp-acts-sub form input:not([type=checkbox]), .cp-acts-sub form select { width: 100%; padding: 0.34rem 0.5rem; border: 1px solid #cfd4da; border-radius: 7px; font-size: 0.85rem; box-sizing: border-box; background: #fff; }
#cp-my-team .cp-chip { display: inline-block; padding: 0.04rem 0.38rem; border-radius: 7px; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.35; background: rgba(88,16,47,0.08); color: #58102f; }
#cp-my-team .cp-chip.is-ok { background: #e8f6ef; color: #1f6b4a; }
#cp-my-team .cp-chip.is-need { background: #fde8ee; color: #58102f; }
.cp-myteam-acts { white-space: nowrap; }
.cp-myteam-acts form, .cp-myteam-acts details { display: inline-flex; margin-left: 0.3rem; vertical-align: middle; }
.cp-tm-dd { position: relative; display: inline-flex; }
.cp-tm-dd summary { list-style: none; }
.cp-tm-dd-body {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 40;
  background: #fff; border: 1px solid #e3e6ea; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(26,16,20,0.18); min-width: 15rem;
}
.cp-tm-dd-body form { font-size: 0.82rem; }
.cp-tm-dd-body label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: #374151; }
.cp-tm-dd-body label:has(input:not([type=checkbox])) { flex-direction: column; align-items: stretch; gap: 0.18rem; }
.cp-tm-dd-body label span { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }
.cp-tm-dd-body input:not([type=checkbox]), .cp-tm-dd-body select { width: 100%; padding: 0.34rem 0.5rem; border: 1px solid #cfd4da; border-radius: 7px; font-size: 0.85rem; box-sizing: border-box; background: #fff; }
.cp-tbtn.is-primary { border-color: #58102f; color: #58102f; }
.cp-tbtn.is-primary:hover { background: #58102f; color: #fff; }
.cp-tbtn.is-static { cursor: default; color: #6b7280; background: #f6f7f9; border-style: dashed; }
.cp-tbtn.is-static:hover { border-color: #d9dce2; color: #6b7280; background: #f6f7f9; }
.cp-myteam-dd { position: relative; }
.cp-myteam-dd-body {
  position: absolute; right: 0; z-index: 30; background: #fff; border: 1px solid #e3e6ea;
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,0.12); min-width: 15rem;
}
.cp-myteam-dd-body form { display: grid; gap: 0.4rem; padding: 0.6rem 0.85rem; font-size: 0.82rem; }
.cp-myteam-dd-body label { display: flex; align-items: center; gap: 0.35rem; }
.cp-myteam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem 0.8rem; }
.cp-myteam-grid label span { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; margin-bottom: 0.15rem; }
.cp-myteam-grid input, .cp-myteam-grid select { width: 100%; padding: 0.42rem 0.55rem; border: 1px solid #cfd4da; border-radius: 7px; font-size: 0.88rem; box-sizing: border-box; background: #fff; }
@media (max-width: 900px) { .cp-myteam-grid { grid-template-columns: 1fr 1fr; } }
#cp-my-team h3 { margin: 1rem 0 0.4rem; font-size: 0.95rem; }
.cp-chip { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 999px; background: #f1f2f4; color: #4b5563; }
.cp-chip.is-ok { background: #ecfdf5; color: #047857; }
.cp-chip.is-need { background: #fef2f2; color: #b91c1c; }
.cp-tbtn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.28rem 0.62rem; border-radius: 7px; border: 1px solid #d9dce2;
  background: #fff; color: #374151; font-family: inherit; font-size: 0.76rem; font-weight: 600;
  cursor: pointer; line-height: 1.3; text-decoration: none; list-style: none; box-sizing: border-box;
}
summary.cp-tbtn::-webkit-details-marker { display: none; }
summary.cp-tbtn::marker { content: none; }
.cp-tbtn:hover { border-color: #58102f; color: #58102f; }
.cp-tbtn.is-danger { color: #b91c1c; border-color: #efd4d4; }
.cp-tbtn.is-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.cp-tbtn-solid {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.34rem 0.9rem; border-radius: 7px; border: 0;
  background: #58102f; color: #fff; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.cp-tbtn-solid:hover { background: #6d1a3f; }
.cp-tm-access { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 0.7rem; }
.cp-tm-access-box { display: flex; flex-direction: column; gap: 0.35rem; }
.cp-tm-access-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }
.cp-tm-flags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cp-tm-chips label { position: relative; }
.cp-tm-chips input { position: absolute; opacity: 0; pointer-events: none; }
.cp-tm-chips span {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.75rem;
  border: 1px dashed #d9dce2; border-radius: 8px; font-size: 0.78rem;
  font-weight: 600; color: #6b7280; cursor: pointer; background: #fff; user-select: none;
}
.cp-tm-chips span:hover { border-color: #58102f; color: #58102f; }
.cp-tm-chips input:checked + span { border-style: solid; background: rgba(88,16,47,0.07); color: #58102f; }
.cp-tm-chips input:focus-visible + span { outline: 2px solid #58102f; outline-offset: 1px; }

/* Allocation rail: instant-save feedback */
.cp-alloc-rail-cell select.is-saved {
  border-color: #1f6b4a;
  box-shadow: 0 0 0 2px rgba(31, 107, 74, 0.18);
}
.cp-alloc-rail-cell select:disabled { opacity: 0.65; }

/* F17 renewal-check workspace */
.cp-renewal-badge{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap;}
.cp-renewal-badge.is-overdue{background:#fde8e8;color:#9b1c1c;}
.cp-renewal-badge.is-upcoming{background:#e3f2e9;color:#166534;}
.cp-renewal-badge.is-missing{background:#f3f4f6;color:#4b5563;}
.cp-renewal-summary{display:flex;gap:10px;flex-wrap:wrap;}
