:root {
  --crm-page: #f5f6f8;
  --crm-surface: #ffffff;
  --crm-surface-raised: #f8fafc;
  --crm-border: #e2e8f0;
  --crm-border-strong: #cbd5e1;
  --crm-text: #0f172a;
  --crm-text-secondary: #475569;
  --crm-text-muted: #64748b;
  --crm-primary: #0ea5e9;
  --crm-primary-hover: #0284c7;
  --crm-primary-strong: #0369a1;
  --crm-primary-soft: #e0f2fe;
  --crm-success: #16815f;
  --crm-warning: #9a5b08;
  --crm-danger: #be3e52;
  --crm-radius: 8px;
  --crm-shadow-soft: 0 1px 2px rgb(15 23 42 / 5%);
  color: var(--crm-text);
  background: var(--crm-page);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--crm-page);
}

button,
input,
select,
textarea {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.crm-shell {
  background: var(--crm-page);
  display: flex;
  min-height: 100vh;
  padding: 0;
}

.crm-main {
  flex: 1;
  min-width: 0;
  padding: 20px 24px 24px;
}

.crm-sidebar {
  background: var(--crm-surface);
  border-right: 1px solid var(--crm-border);
  color: var(--crm-text-secondary);
  display: flex;
  flex: 0 0 240px;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  width: 240px;
  z-index: 40;
}

.crm-sidebar-brand {
  align-items: flex-start;
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 18px 16px 14px;
}

.crm-sidebar-brand h1 {
  color: var(--crm-text);
  font-size: 16px;
  line-height: 1.25;
  margin: 0;
}

.crm-sidebar-brand span {
  color: var(--crm-text-muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  margin-top: 4px;
}

.crm-sidebar-close,
.crm-mobile-menu-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: none;
  justify-content: center;
}

.crm-sidebar-nav {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 8px;
  scrollbar-width: thin;
}

.crm-sidebar-group {
  display: grid;
  gap: 2px;
}

.crm-sidebar-group-title {
  color: var(--crm-text-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 8px 8px 4px;
}

.crm-sidebar-item,
.crm-sidebar-action {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--crm-text-secondary);
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.crm-sidebar-item {
  border-radius: var(--crm-radius);
  border-left: 3px solid transparent;
}

.crm-sidebar-item:hover,
.crm-sidebar-action:hover {
  background: var(--crm-surface-raised);
  color: var(--crm-text);
}

.crm-sidebar-item.is-active {
  background: var(--crm-primary-soft);
  border-left-color: var(--crm-primary);
  color: var(--crm-primary-strong);
}

.crm-sidebar-item span,
.crm-sidebar-action span {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
}

.crm-sidebar-item small {
  background: var(--crm-primary-soft);
  border-radius: 999px;
  color: var(--crm-primary-strong);
  font-size: 11px;
  font-weight: 800;
  min-width: 24px;
  padding: 1px 7px;
  text-align: center;
}

.crm-page-guide {
  flex: 0 0 auto;
  position: relative;
}

.crm-page-guide summary {
  align-items: center;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text-secondary);
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  list-style: none;
  padding: 0;
  user-select: none;
  width: 40px;
}

.crm-page-guide summary::-webkit-details-marker {
  display: none;
}

.crm-page-guide summary:hover,
.crm-page-guide[open] summary {
  background: var(--crm-primary-soft);
  border-color: #bae6fd;
  color: var(--crm-primary-strong);
}

.crm-page-guide-panel {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  box-shadow: 0 18px 42px rgb(15 23 42 / 16%);
  display: grid;
  gap: 10px;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 32px));
  z-index: 65;
}

.crm-page-guide:not([open]) .crm-page-guide-panel {
  display: none;
}

.crm-page-guide.is-partial .crm-page-guide-panel {
  border-color: #fde68a;
}

.crm-page-guide.is-view .crm-page-guide-panel {
  border-color: #e2e8f0;
}

.crm-page-guide-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.crm-page-guide-icon {
  align-items: center;
  background: #e0edff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.crm-page-guide-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.crm-page-guide-copy span {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.crm-page-guide-copy strong {
  color: var(--crm-text);
  font-size: 14px;
  line-height: 1.35;
}

.crm-page-guide-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.crm-page-guide-meta span,
.crm-page-guide-meta small {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  padding: 5px 8px;
}

.crm-page-guide-meta span {
  background: #e0edff;
  color: #1d4ed8;
}

.crm-page-guide-meta small {
  background: #fff;
  border: 1px solid #dbeafe;
  color: #33516f;
}

.crm-page-guide ol {
  border-top: 1px solid #dbeafe;
  counter-reset: crm-guide;
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
}

.crm-page-guide li {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  min-width: 0;
}

.crm-page-guide li::before {
  align-items: center;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  content: counter(crm-guide);
  counter-increment: crm-guide;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  width: 22px;
}

@media (max-width: 980px) {
  .crm-page-guide-panel {
    right: -2px;
    width: min(340px, calc(100vw - 24px));
  }
}

.crm-sidebar-foot {
  background: var(--crm-surface);
  border-top: 1px solid var(--crm-border);
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 12px;
}

.crm-sidebar-action {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  min-height: 40px;
  padding: 0 12px;
}

.crm-sidebar-session {
  align-items: center;
  background: var(--crm-surface-raised);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text-secondary);
  display: flex;
  gap: 8px;
  min-height: 38px;
  min-width: 0;
  padding: 0 12px;
}

.crm-sidebar-session span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-locale-switch {
  background: var(--crm-surface-raised);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text-secondary);
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.crm-locale-switch span {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
}

.crm-locale-switch select {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text);
  min-height: 34px;
  padding: 0 8px;
}

.crm-locale-switch option {
  color: #172026;
}

.crm-sidebar-backdrop {
  display: none;
}

.crm-topbar {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 0 auto 14px;
  max-width: 1440px;
}

.crm-topbar-title {
  min-width: 0;
}

.crm-topbar-title span {
  color: var(--crm-text-muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.crm-topbar h1,
.crm-detail h2,
.crm-section-title h2,
.crm-section-title h3 {
  margin: 0;
}

.crm-topbar h1 {
  color: var(--crm-text);
  font-size: 24px;
  line-height: 1.2;
}

.crm-topbar-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.crm-eyebrow {
  color: var(--crm-text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.crm-icon-button {
  align-items: center;
  background: var(--crm-primary);
  border: 1px solid var(--crm-primary);
  border-radius: var(--crm-radius);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
}

.crm-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crm-secondary-button,
.crm-ghost-button {
  align-items: center;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text);
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
}

.crm-secondary-button:hover,
.crm-ghost-button:hover {
  border-color: var(--crm-primary);
  color: var(--crm-primary-strong);
}

.crm-secondary-button.is-active {
  background: var(--crm-primary-soft);
  border-color: #bae6fd;
  color: var(--crm-primary-strong);
}

.crm-ghost-button {
  justify-content: center;
  padding: 0;
  width: 40px;
}

.crm-session-chip {
  align-items: center;
  background: var(--crm-primary-soft);
  border: 1px solid #bae6fd;
  border-radius: 999px;
  color: var(--crm-primary-strong);
  display: inline-flex;
  gap: 7px;
  min-height: 40px;
  max-width: 220px;
  padding: 0 12px;
}

.crm-session-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-toolbar {
  align-items: center;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(130px, 180px));
  margin: 0 auto 16px;
  max-width: 1440px;
  padding: 10px;
}

.crm-filter-toggle {
  align-items: center;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text);
  cursor: pointer;
  display: none;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
}

.crm-filter-toggle.is-active {
  background: var(--crm-primary-soft);
  border-color: #bae6fd;
  color: var(--crm-primary-strong);
}

.crm-filter-fields {
  display: contents;
}

.crm-search,
.crm-toolbar select,
.crm-filter-fields input {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  min-height: 38px;
}

.crm-search {
  align-items: center;
  display: flex;
  gap: 10px;
  padding: 0 12px;
}

.crm-search input {
  border: 0;
  flex: 1;
  min-width: 0;
  outline: 0;
}

.crm-toolbar select,
.crm-filter-fields input {
  color: var(--crm-text);
  padding: 0 10px;
}

.crm-customer-filter-chips {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -8px auto 16px;
  max-width: 1440px;
}

.crm-customer-filter-chips span {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.crm-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  overflow: visible;
  padding-bottom: 2px;
}

.crm-detail-tabs button {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text-secondary);
  cursor: pointer;
  flex: 0 0 auto;
  font-weight: 800;
  min-height: 36px;
  padding: 0 12px;
}

.crm-detail-tabs button.is-active {
  background: var(--crm-primary);
  border-color: var(--crm-primary);
  color: #fff;
}

.crm-write-panel {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  margin: 0 auto 16px;
  max-width: 1440px;
  padding: 16px;
}

.crm-detail .crm-write-panel {
  box-sizing: border-box;
  margin-bottom: 22px;
  max-width: none;
  width: 100%;
}

.crm-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-field {
  color: var(--crm-text);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.crm-field input,
.crm-field select,
.crm-field textarea {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text);
  min-height: 40px;
  outline: 0;
  padding: 9px 10px;
  width: 100%;
}

.crm-field input:focus,
.crm-field select:focus,
.crm-field textarea:focus {
  border-color: var(--crm-primary);
  box-shadow: 0 0 0 3px rgb(14 165 233 / 14%);
}

.crm-field textarea {
  min-height: 88px;
  resize: vertical;
}

.crm-field-wide {
  grid-column: 1 / -1;
}

.crm-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.crm-dialog-backdrop {
  align-items: center;
  background: rgb(15 23 42 / 42%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 80;
}

.crm-action-dialog {
  background: var(--crm-surface);
  border: 1px solid rgb(226 232 240 / 90%);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgb(15 23 42 / 22%);
  max-height: min(720px, calc(100vh - 48px));
  max-width: 760px;
  overflow: hidden;
  width: min(100%, 760px);
}

.crm-action-dialog-header {
  align-items: center;
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 18px;
}

.crm-action-dialog-header h2 {
  color: var(--crm-text);
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
}

.crm-action-dialog-body {
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding: 18px;
}

.crm-action-dialog .crm-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-action-dialog .crm-coupon-inline-form,
.crm-action-dialog .crm-loyalty-form,
.crm-action-dialog .crm-tier-editor,
.crm-action-dialog .crm-task-create,
.crm-action-dialog .crm-note-form {
  border: 0;
  margin: 0;
  padding: 0;
}

.crm-action-dialog .crm-product-subscription-form,
.crm-action-dialog .crm-project-create {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

@media (max-width: 720px) {
  .crm-dialog-backdrop {
    align-items: stretch;
    padding: 12px;
  }

  .crm-action-dialog {
    max-height: calc(100vh - 24px);
  }

  .crm-action-dialog .crm-form-grid,
  .crm-action-dialog .crm-product-subscription-form,
  .crm-action-dialog .crm-project-create {
    grid-template-columns: 1fr;
  }
}

.crm-inline-error {
  color: #a32727;
  font-size: 13px;
  margin: 10px 0 0;
}

.crm-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1440px;
}

.crm-grid-list-only {
  grid-template-columns: minmax(0, 1fr);
}

.crm-detail-page {
  display: grid;
  gap: 12px;
  margin: 0 auto;
  max-width: 1360px;
  width: 100%;
}

.crm-detail-page > * {
  max-width: 100%;
  min-width: 0;
}

.crm-back-link {
  align-items: center;
  color: var(--crm-primary-strong);
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  width: fit-content;
}

.crm-back-link:hover {
  color: var(--crm-primary-hover);
}

.crm-list,
.crm-detail {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  min-height: 560px;
}

.crm-list {
  padding: 16px;
}

.crm-section-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.crm-section-actions,
.crm-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crm-action-row {
  border-top: 1px solid #edf0f5;
  margin-top: 14px;
  padding-top: 14px;
}

.crm-section-title span,
.crm-muted,
.crm-timeline-item small,
.crm-table-stack small,
.crm-customer-name-link small,
.crm-detail-header p {
  color: var(--crm-text-muted);
}

.crm-avatar {
  align-items: center;
  background: var(--crm-primary-soft);
  border-radius: var(--crm-radius);
  color: var(--crm-primary-strong);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.crm-customer-table table {
  min-width: 1240px;
}

.crm-customer-table th:first-child {
  width: 240px;
}

.crm-customer-table th:nth-child(2),
.crm-customer-table th:nth-child(5) {
  width: 210px;
}

.crm-customer-table th:nth-child(6),
.crm-customer-table th:nth-child(7),
.crm-customer-table th:nth-child(8),
.crm-customer-table th:nth-child(10) {
  width: 88px;
}

.crm-customer-table th:nth-child(4) {
  width: 170px;
}

.crm-customer-table tbody tr:last-child td {
  border-bottom: 0;
}

.crm-customer-table-row.is-selected td {
  background: #f8fbff;
}

.crm-customer-table-row.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--crm-primary);
}

.crm-customer-name-cell {
  min-width: 220px;
}

.crm-customer-name-link {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  text-decoration: none;
}

.crm-customer-name-link > span:last-child,
.crm-table-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.crm-customer-name-link strong,
.crm-customer-name-link small,
.crm-table-stack strong,
.crm-table-stack span,
.crm-table-stack small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-customer-name-link:hover strong {
  color: var(--crm-primary-strong);
}

.crm-customer-health {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-width: 36px;
  padding: 2px 8px;
}

.crm-customer-health.is-healthy {
  background: #ecfdf3;
  border-color: #b7ebca;
}

.crm-customer-health.is-info {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.crm-customer-health.is-warning {
  background: #fff7e6;
  border-color: #ffd591;
}

.crm-customer-health.is-danger {
  background: #fff1f0;
  border-color: #ffa39e;
}

.crm-icon-link {
  align-items: center;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  color: var(--crm-text-secondary);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  text-decoration: none;
  width: 30px;
}

.crm-icon-link:hover {
  background: var(--crm-primary-soft);
  border-color: var(--crm-primary);
  color: var(--crm-primary-strong);
}

.crm-customer-pagination {
  border-top: 1px solid var(--crm-border);
  margin-top: 12px;
}

.crm-detail {
  padding: 20px;
}

.crm-detail-page > .crm-detail:not(.crm-detail-empty) {
  background: transparent;
  border: 0;
  min-height: auto;
  min-width: 0;
  padding: 0;
  width: 100%;
}

.crm-detail-page .crm-detail-header {
  align-items: center;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
  padding: 16px;
}

.crm-detail-page .crm-detail-header h2 {
  font-size: 24px;
  line-height: 1.25;
  margin: 2px 0 0;
}

.crm-detail-page .crm-detail-header p {
  overflow-wrap: anywhere;
}

.crm-detail-page .crm-metrics {
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  margin: 0 0 12px;
}

.crm-detail-page .crm-metrics div {
  background: var(--crm-surface);
  min-width: 0;
  padding: 10px 12px;
}

.crm-detail-page .crm-metrics dd {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.crm-detail-page .crm-detail-tabs {
  background: var(--crm-page);
  flex-wrap: nowrap;
  margin: 0 0 12px;
  overflow-x: auto;
  padding: 4px 0 8px;
  position: sticky;
  scrollbar-width: thin;
  top: 0;
  z-index: 20;
}

.crm-detail-page .crm-detail-tabs button {
  min-height: 34px;
  padding: 0 11px;
  white-space: nowrap;
}

.crm-detail-empty {
  align-content: center;
  color: #68727d;
  display: grid;
  justify-items: center;
  text-align: center;
}

.crm-detail-empty svg {
  margin-bottom: 8px;
}

.crm-detail-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.crm-detail-header p {
  margin: 6px 0 0;
}

.crm-status {
  background: #eaf7ee;
  border: 1px solid #b8e3c5;
  border-radius: 999px;
  color: #1c7c39;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}

.crm-status.is-inactive {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.crm-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 0 0 22px;
}

.crm-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 22px;
}

.crm-cards-single {
  grid-template-columns: 1fr;
}

.crm-cards section {
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  padding: 12px;
}

.crm-cards h3 {
  font-size: 14px;
  margin: 0 0 10px;
}

.crm-cards ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-cards li {
  display: grid;
  gap: 2px;
}

.crm-cards li span {
  color: #68727d;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-parity-definition-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 0 0 14px;
}

.crm-parity-definition-list div,
.crm-parity-card-grid article,
.crm-asset-list li {
  background: var(--crm-surface-raised);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  padding: 12px;
}

.crm-parity-definition-list dt {
  color: var(--crm-text-muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.crm-parity-definition-list dd {
  color: var(--crm-text);
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.crm-parity-card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.crm-parity-card-grid article {
  display: grid;
  gap: 6px;
}

.crm-parity-card-grid article strong,
.crm-asset-list strong {
  color: var(--crm-text);
}

.crm-parity-card-grid article span,
.crm-asset-list span {
  color: var(--crm-primary-strong);
  font-size: 12px;
  font-weight: 800;
}

.crm-parity-card-grid article p,
.crm-asset-list small {
  color: var(--crm-text-secondary);
  margin: 0;
}

.crm-asset-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.crm-asset-list li {
  display: grid;
  gap: 4px;
}

.crm-duplicate-warning {
  align-items: center;
  background: #fff8ed;
  border: 1px solid #ffd391;
  border-radius: 10px;
  color: #7a4a00;
  display: grid;
  gap: 12px;
  grid-template-columns: 24px minmax(0, 1fr);
  margin-bottom: 18px;
  padding: 12px 14px;
}

.crm-duplicate-warning div {
  display: grid;
  gap: 3px;
}

.crm-duplicate-warning span,
.crm-identity-list small,
.crm-merge-candidates small,
.crm-merge-preview small {
  color: #68727d;
  font-size: 12px;
}

.crm-source-panel,
.crm-merge-panel,
.crm-merge-preview {
  display: grid;
  gap: 12px;
}

.crm-identity-list,
.crm-merge-candidates,
.crm-merge-preview ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-identity-list li {
  align-items: center;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 9px 10px;
}

.crm-identity-icon {
  align-items: center;
  background: #eef4ff;
  border-radius: 999px;
  color: #2d6cdf;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.crm-identity-form {
  border-top: 1px solid #edf0f5;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 12px;
}

.crm-checkbox {
  align-items: center;
  color: #172026;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

.crm-merge-panel,
.crm-merge-preview {
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 14px;
}

.crm-merge-candidates article {
  align-items: center;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 10px 12px;
}

.crm-merge-candidates article div,
.crm-merge-preview li {
  display: grid;
  gap: 4px;
}

.crm-match-score {
  background: #f3f4f6;
  border-radius: 999px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.crm-match-score.is-exact {
  background: #eaf7ee;
  color: #1c7c39;
}

.crm-warning-list {
  display: grid;
  gap: 8px;
}

.crm-warning-list p {
  align-items: center;
  background: #fff8ed;
  border: 1px solid #ffe2b8;
  border-radius: 8px;
  color: #7a4a00;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 10px;
}

.crm-merge-preview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-merge-preview-grid section {
  background: #f8fafc;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  padding: 12px;
}

.crm-merge-preview-grid h4 {
  margin: 0 0 10px;
}

.crm-merge-preview li {
  background: #fff;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  padding: 10px;
}

.crm-merge-preview li.has-conflict {
  border-color: #ffd391;
}

.crm-metrics div {
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  padding: 12px;
}

.crm-metrics dt {
  color: #68727d;
  font-size: 12px;
  margin-bottom: 6px;
}

.crm-metrics dd {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.is-healthy {
  color: #14824b !important;
}

.is-info {
  color: #2563eb !important;
}

.is-warning {
  color: #a15c00 !important;
}

.is-danger {
  color: #b42318 !important;
}

.crm-timeline {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-source-event-panel {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: var(--crm-radius);
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
}

.crm-source-event-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-source-event-list li {
  align-items: start;
  background: #ffffff;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: 68px minmax(0, 1fr);
  padding: 10px 12px;
}

.crm-source-chip {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 28px;
  padding: 4px 8px;
}

.crm-source-chip.is-line {
  background: #ecfdf3;
  color: #047857;
}

.crm-source-chip.is-pos {
  background: #fef3c7;
  color: #92400e;
}

.crm-pos-purchase-viewer {
  background: #fffaf0;
  border: 1px solid #fde68a;
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.crm-reservation-timeline-viewer {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.crm-reservation-timeline-viewer .crm-source-event-head p {
  color: #68727d;
  font-size: 13px;
  margin: 4px 0 0;
}

.crm-reservation-timeline-viewer .crm-source-event-head span {
  color: #047857;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.crm-reservation-table {
  border-color: #bbf7d0;
}

.crm-reservation-table th,
.crm-reservation-table td {
  border-bottom-color: #dcfce7;
}

.crm-reservation-table th {
  background: #f0fdf4;
  color: #047857;
}

.crm-reservation-table td:nth-child(4) {
  color: var(--crm-text);
  font-weight: inherit;
  white-space: normal;
}

.crm-reservation-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  min-height: 24px;
  padding: 5px 9px;
  width: max-content;
}

.crm-reservation-status.is-scheduled {
  background: #eff6ff;
  color: #1d4ed8;
}

.crm-reservation-status.is-confirmed,
.crm-reservation-status.is-completed {
  background: #ecfdf3;
  color: #047857;
}

.crm-reservation-status.is-cancelled {
  background: #f1f5f9;
  color: #475569;
}

.crm-reservation-status.is-no-show {
  background: #fef2f2;
  color: #b42318;
}

.crm-reservation-status.is-unknown {
  background: #f8fafc;
  color: #64748b;
}

.crm-pos-purchase-viewer .crm-source-event-head p {
  color: #68727d;
  font-size: 13px;
  margin: 4px 0 0;
}

.crm-pos-purchase-viewer .crm-source-event-head span {
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.crm-pos-purchase-filters {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(118px, 1fr)) auto;
}

.crm-pos-purchase-filters label {
  display: grid;
  gap: 5px;
}

.crm-pos-purchase-filters span {
  color: #68727d;
  font-size: 12px;
  font-weight: 800;
}

.crm-pos-purchase-filters input {
  background: #ffffff;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  color: var(--crm-text);
  min-height: 36px;
  min-width: 0;
  padding: 0 9px;
}

.crm-pos-purchase-filters button {
  align-self: end;
  min-height: 36px;
}

.crm-pos-purchase-table {
  background: #ffffff;
  border: 1px solid #f1e4b8;
  border-radius: 10px;
  overflow: auto;
}

.crm-pos-purchase-table table {
  border-collapse: collapse;
  min-width: 780px;
  width: 100%;
}

.crm-pos-purchase-table th,
.crm-pos-purchase-table td {
  border-bottom: 1px solid #f3ead0;
  font-size: 13px;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.crm-pos-purchase-table th {
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
  white-space: nowrap;
}

.crm-pos-purchase-table td:nth-child(4) {
  color: #92400e;
  font-weight: 800;
  white-space: nowrap;
}

.crm-pos-purchase-table strong,
.crm-pos-purchase-table span,
.crm-pos-purchase-table small {
  display: block;
}

.crm-pos-purchase-table small {
  color: #68727d;
  margin-top: 3px;
}

.crm-source-event-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.crm-source-event-head time,
.crm-source-event-list small {
  color: #68727d;
  font-size: 12px;
}

.crm-source-event-list p {
  margin: 4px 0;
}

.crm-empty-card {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.crm-timeline-item {
  display: grid;
  gap: 10px;
  grid-template-columns: 14px minmax(0, 1fr);
}

.crm-timeline-dot {
  background: #2d6cdf;
  border-radius: 50%;
  height: 9px;
  margin-top: 7px;
  width: 9px;
}

.crm-timeline-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.crm-timeline-head time {
  color: #68727d;
  font-size: 12px;
}

.crm-timeline-item p {
  margin: 4px 0;
}

.crm-intent-router-summary {
  background: #f8fbff;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
}

.crm-intent-router-title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.crm-intent-router-title span {
  background: #e8f1ff;
  border-radius: 999px;
  color: #2458b8;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
}

.crm-intent-router-fields {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
}

.crm-intent-router-fields div {
  min-width: 0;
}

.crm-intent-router-fields dt {
  color: var(--crm-text-muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.crm-intent-router-fields dd {
  color: var(--crm-text);
  margin: 0;
  overflow-wrap: anywhere;
}

.crm-intent-router-json summary {
  color: #2458b8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.crm-intent-router-json pre {
  background: #ffffff;
  border: 1px solid #dce6f7;
  border-radius: 6px;
  color: #172026;
  margin: 8px 0 0;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.crm-empty-state {
  align-content: center;
  color: #172026;
  display: grid;
  justify-items: center;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
}

.crm-empty-state svg {
  color: #2d6cdf;
  height: 36px;
  width: 36px;
}

.crm-error {
  background: #fff3f3;
  border: 1px solid #ffd0d0;
  border-radius: 8px;
  color: #a32727;
  margin: 0;
  padding: 12px;
}

.crm-login-shell {
  align-content: center;
  background: var(--crm-page);
  display: grid;
  min-height: 100vh;
  padding: 24px;
}

.crm-login-panel {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  box-shadow: var(--crm-shadow-soft);
  display: grid;
  gap: 18px;
  justify-self: center;
  max-width: 440px;
  padding: 24px;
  width: min(100%, 440px);
}

.crm-login-brand h1 {
  color: var(--crm-text);
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
}

.crm-login-locale {
  align-items: center;
  color: var(--crm-text-muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  margin-top: 14px;
}

.crm-login-locale select {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text);
  min-height: 34px;
  padding: 0 8px;
}

.crm-login-form,
.crm-login-advanced-fields {
  display: grid;
  gap: 14px;
}

.crm-login-password {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
}

.crm-login-password input {
  border-radius: 8px 0 0 8px;
}

.crm-login-eye-button {
  align-items: center;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  color: var(--crm-text-muted);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}

.crm-login-eye-button:hover {
  color: var(--crm-primary-strong);
}

.crm-login-advanced {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--crm-primary-strong);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  justify-self: start;
  padding: 0;
}

.crm-google-login-button {
  align-items: center;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  color: var(--crm-text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  width: 100%;
}

.crm-google-login-button:hover {
  border-color: var(--crm-primary);
  color: var(--crm-primary-strong);
}

.crm-login-divider {
  align-items: center;
  color: var(--crm-text-muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
  text-transform: uppercase;
}

.crm-login-divider::before,
.crm-login-divider::after {
  background: var(--crm-border);
  content: "";
  height: 1px;
}

.crm-login-submit {
  justify-content: center;
  width: 100%;
}

@media (max-width: 980px) {
  .crm-shell {
    display: block;
    padding: 0;
  }

  .crm-main {
    padding: 16px;
  }

  .crm-sidebar {
    bottom: 0;
    box-shadow: 12px 0 34px rgb(15 23 42 / 12%);
    height: auto;
    left: 0;
    max-width: 292px;
    position: fixed;
    top: 0;
    transform: translateX(-104%);
    transition: transform 0.18s ease;
    width: min(82vw, 292px);
    z-index: 80;
  }

  .crm-sidebar.is-open {
    transform: translateX(0);
  }

  .crm-shell.is-nav-open .crm-sidebar-backdrop {
    background: rgb(15 23 42 / 34%);
    border: 0;
    display: block;
    inset: 0;
    position: fixed;
    z-index: 70;
  }

  .crm-sidebar-close,
  .crm-mobile-menu-button {
    display: inline-flex;
  }

  .crm-topbar {
    align-items: center;
    background: rgb(255 255 255 / 96%);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    gap: 10px;
    padding: 10px 12px;
    position: sticky;
    top: 8px;
    z-index: 30;
  }

  .crm-mobile-menu-button {
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    color: var(--crm-text);
    flex: 0 0 40px;
    height: 40px;
  }

  .crm-toolbar,
  .crm-grid,
  .crm-form-grid,
  .crm-cards,
  .crm-metrics,
  .crm-identity-form,
  .crm-merge-candidates article,
  .crm-merge-preview-grid {
    grid-template-columns: 1fr;
  }

  .crm-list,
  .crm-detail {
    min-height: auto;
  }

  .crm-login-shell {
    padding: 16px;
  }

  .crm-login-panel {
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .crm-main {
    padding: 12px;
  }

  .crm-topbar {
    margin-bottom: 12px;
  }

  .crm-topbar h1 {
    font-size: 21px;
  }

  .crm-topbar-title span {
    font-size: 12px;
  }

  .crm-detail-tabs::-webkit-scrollbar {
    display: none;
  }

  .crm-topbar-actions .crm-secondary-button,
  .crm-topbar-actions .crm-icon-button,
  .crm-topbar-actions .crm-page-guide summary {
    gap: 0;
    height: 36px;
    justify-content: center;
    min-height: 36px;
    padding: 0;
    width: 38px;
  }

  .crm-topbar-actions .crm-secondary-button span,
  .crm-topbar-actions .crm-icon-button span {
    display: none;
  }

  .crm-toolbar {
    align-items: stretch;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 12px;
  }

  .crm-filter-toggle {
    display: inline-flex;
  }

  .crm-filter-fields {
    display: none;
    gap: 8px;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .crm-toolbar.is-filter-open .crm-filter-fields {
    display: grid;
  }

  .crm-filter-fields .crm-secondary-button {
    justify-content: center;
  }

  .crm-write-panel,
  .crm-list,
  .crm-detail {
    border-radius: 8px;
    padding: 12px;
  }

  .crm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-detail-tabs {
    margin-left: -2px;
    margin-right: -2px;
    padding: 0 2px 4px;
  }
}

.crm-import-wizard {
  display: grid;
  gap: 16px;
}

.crm-import-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-import-steps span {
  background: #f3f6fb;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #68727d;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  text-align: center;
}

.crm-import-steps span.is-active {
  background: #eef4ff;
  border-color: #2d6cdf;
  color: #2d6cdf;
}

.crm-dropzone {
  align-items: center;
  background: #f8fbff;
  border: 1px dashed #9fb8e8;
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 18px;
}

.crm-dropzone svg {
  color: #2d6cdf;
  height: 34px;
  width: 34px;
}

.crm-dropzone strong,
.crm-dropzone span,
.crm-import-history article,
.crm-import-history article div {
  min-width: 0;
}

.crm-dropzone span,
.crm-mapping-grid small,
.crm-import-history small,
.crm-import-history span {
  color: #68727d;
  font-size: 12px;
}

.crm-import-source-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) auto;
}

.crm-mapping-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.crm-preview-table {
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  max-width: 100%;
  overflow: auto;
}

.crm-preview-table table {
  border-collapse: collapse;
  min-width: 680px;
  width: 100%;
}

.crm-preview-table th,
.crm-preview-table td {
  border-bottom: 1px solid #edf0f5;
  font-size: 13px;
  padding: 9px 10px;
  text-align: left;
  white-space: nowrap;
}

.crm-preview-table th {
  background: #f7f8fa;
  color: #68727d;
  font-weight: 800;
}

.crm-import-result {
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  padding: 14px;
}

.crm-import-counters {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.crm-import-counters div {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
}

.crm-import-counters dt {
  color: #68727d;
  font-size: 12px;
  margin-bottom: 6px;
}

.crm-import-counters dd {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.crm-import-errors {
  background: #fff8ed;
  border: 1px solid #ffe2b8;
  border-radius: 8px;
  margin-top: 12px;
  padding: 12px;
}

.crm-import-errors ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.crm-import-history-block {
  border-top: 1px solid #edf0f5;
  padding-top: 14px;
}

.crm-import-history {
  display: grid;
  gap: 8px;
}

.crm-import-history article {
  align-items: center;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.crm-import-history article div {
  display: grid;
  gap: 4px;
}

@media (max-width: 980px) {
  .crm-import-steps,
  .crm-dropzone,
  .crm-import-source-row,
  .crm-mapping-grid,
  .crm-import-counters,
  .crm-import-history article {
    grid-template-columns: 1fr;
  }
}

.crm-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.crm-row-tags em {
  background: #eef4ff;
  border: 1px solid #cbdafe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  padding: 2px 6px;
}

.crm-success {
  color: #15803d;
  font-size: 13px;
  margin: 8px 0 0;
}

.crm-segmentation-panel h3 {
  margin: 0 0 12px;
}

.crm-segmentation-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

.crm-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-tag-cloud span {
  align-items: center;
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 999px;
  color: #172026;
  display: inline-flex;
  gap: 6px;
  min-height: 30px;
  padding: 4px 10px;
}

.crm-tag-cloud small {
  color: #68727d;
  font-size: 11px;
}

.crm-customer-tag-manager {
  display: grid;
  gap: 12px;
}

.crm-customer-tag-cloud span {
  padding-right: 6px;
}

.crm-customer-tag-cloud button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  padding: 0;
  width: 22px;
}

.crm-customer-tag-cloud button:hover:not(:disabled) {
  background: #e2e8f0;
  color: #0f172a;
}

.crm-customer-tag-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) 92px auto;
}

.crm-tag-color-field input[type="color"] {
  min-width: 56px;
  padding: 5px;
}

.crm-segment-list-block {
  border-top: 1px solid #e2e6eb;
  margin-top: 18px;
  padding-top: 16px;
}

.crm-segment-list {
  display: grid;
  gap: 8px;
}

.crm-segment-list article {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 10px 12px;
}

.crm-segment-list article.is-active {
  background: #eef4ff;
  border-color: #2d6cdf;
}

.crm-segment-list strong,
.crm-segment-list small {
  display: block;
}

.crm-segment-list small {
  color: #68727d;
  margin-top: 3px;
}

.crm-segment-list article > span {
  color: #68727d;
  font-size: 12px;
  font-weight: 700;
}

.crm-tag-summary {
  min-width: 0;
}

.crm-consent-panel {
  border-top: 1px solid #e2e6eb;
  grid-column: 1 / -1;
  padding-top: 16px;
}

.crm-loyalty-panel {
  border-top: 1px solid #e2e6eb;
  grid-column: 1 / -1;
  padding-top: 16px;
}

.crm-loyalty-panel h4,
.crm-tier-editor h4 {
  margin: 0 0 10px;
}

.crm-loyalty-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 14px;
}

.crm-loyalty-metrics div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}

.crm-loyalty-metrics dt {
  color: #68727d;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.crm-loyalty-metrics dd {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.crm-loyalty-metrics small,
.crm-ledger-table small {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.crm-loyalty-form,
.crm-tier-editor {
  border-top: 1px solid #edf0f5;
  margin-top: 14px;
  padding-top: 14px;
}

.crm-tier-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.crm-tier-chip {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 999px;
  color: #172026;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 4px 10px;
}

.crm-tier-chip.is-active {
  background: #eef4ff;
  border-color: #2d6cdf;
  color: #1d4ed8;
}

.crm-ledger-table {
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  max-width: 100%;
  overflow: auto;
}

.crm-ledger-table table {
  border-collapse: collapse;
  min-width: 1080px;
  width: 100%;
}

.crm-ledger-table th,
.crm-ledger-table td {
  border-bottom: 1px solid #edf0f5;
  font-size: 13px;
  padding: 9px 10px;
  text-align: left;
  white-space: nowrap;
}

.crm-ledger-table th {
  background: #f7f8fa;
  color: #68727d;
  font-weight: 800;
}

.crm-ledger-table .is-positive {
  color: #15803d;
  font-weight: 800;
}

.crm-ledger-table .is-negative {
  color: #b91c1c;
  font-weight: 800;
}

.crm-loyalty-empty {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.crm-coupon-campaign-panel,
.crm-coupon-panel {
  display: grid;
  gap: 16px;
}

.crm-coupon-panel {
  border-top: 1px solid #e2e6eb;
  grid-column: 1 / -1;
  padding-top: 16px;
}

.crm-coupon-campaign-panel h3,
.crm-coupon-panel h4 {
  margin: 0 0 10px;
}

.crm-coupon-campaign-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.crm-coupon-campaign-list,
.crm-coupon-issue-flow,
.crm-coupon-result,
.crm-coupon-inline-form,
.crm-coupon-ops form {
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  padding: 14px;
}

.crm-coupon-campaign-cards,
.crm-coupon-wallet,
.crm-coupon-events,
.crm-coupon-ops {
  display: grid;
  gap: 10px;
}

.crm-coupon-campaign-cards article,
.crm-coupon-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.crm-coupon-card.is-redeemed {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.crm-coupon-card.is-cancelled,
.crm-coupon-card.is-expired {
  background: #f3f4f6;
  color: #6b7280;
}

.crm-coupon-campaign-cards strong,
.crm-coupon-campaign-cards small,
.crm-coupon-card strong,
.crm-coupon-card small {
  display: block;
  min-width: 0;
}

.crm-coupon-campaign-cards small,
.crm-coupon-card small,
.crm-coupon-events small {
  color: #68727d;
  font-size: 12px;
  margin-top: 3px;
}

.crm-coupon-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crm-coupon-events {
  grid-column: 1 / -1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-coupon-events li {
  background: #fff;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  font-size: 13px;
  padding: 8px 10px;
}

.crm-coupon-ops {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-coupon-errors {
  color: #a32727;
  font-size: 13px;
  margin: 12px 0 0;
  padding-left: 18px;
}

.crm-consent-panel h4 {
  margin: 0 0 10px;
}

.crm-consent-warning {
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.crm-contact-preferences {
  align-items: stretch;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
  padding: 14px;
}

.crm-contact-preferences h4,
.crm-contact-preferences p {
  margin: 0;
}

.crm-contact-preferences p {
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 4px;
}

.crm-contact-preferences dl {
  align-content: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  margin: 0;
}

.crm-contact-preferences dl div {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  display: grid;
  min-width: 74px;
  padding: 10px;
}

.crm-contact-preferences dl div.is-alert {
  background: #fef2f2;
  border-color: #fecaca;
}

.crm-contact-preferences dl div.is-muted {
  background: #f8fafc;
}

.crm-contact-preferences dt {
  color: #68727d;
  font-size: 11px;
  font-weight: 800;
}

.crm-contact-preferences dd {
  font-size: 24px;
  font-weight: 850;
  margin: 0;
}

.crm-consent-grid,
.crm-consent-actions {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
}

.crm-consent-actions {
  border-top: 1px solid #e2e6eb;
  margin-top: 16px;
  padding-top: 16px;
}

.crm-consent-cards {
  display: grid;
  gap: 8px;
}

.crm-consent-cards article {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.crm-consent-cards article.is-blocked {
  background: #fef2f2;
  border-color: #fecaca;
}

.crm-consent-cards strong,
.crm-consent-cards span,
.crm-consent-cards small {
  min-width: 0;
}

.crm-consent-cards small {
  color: #68727d;
  font-size: 12px;
}

.crm-contact-preference-table {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-width: 100%;
  overflow: auto;
}

.crm-contact-preference-table table {
  border-collapse: collapse;
  min-width: 820px;
  width: 100%;
}

.crm-contact-preference-table th,
.crm-contact-preference-table td {
  border-bottom: 1px solid #edf0f5;
  font-size: 12px;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.crm-contact-preference-table th {
  background: #f7f8fa;
  color: #68727d;
  font-weight: 800;
  white-space: nowrap;
}

.crm-contact-preference-table tr.is-blocked {
  background: #fff7ed;
}

.crm-contact-preference-table small {
  color: #68727d;
  display: block;
  margin-top: 3px;
}

.crm-contact-preference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 980px) {
  .crm-loyalty-metrics,
  .crm-contact-preferences,
  .crm-consent-grid,
  .crm-consent-actions,
  .crm-coupon-campaign-grid,
  .crm-coupon-campaign-cards article,
  .crm-coupon-card,
  .crm-coupon-ops {
    grid-template-columns: 1fr;
  }

  .crm-loyalty-empty {
    align-items: flex-start;
    flex-direction: column;
  }
}

.crm-task-panel,
.crm-task-workspace,
.crm-teleagent-form,
.crm-task-board {
  display: grid;
  gap: 14px;
}

.crm-campaign-audience-builder {
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
}

.crm-campaign-audience-builder .crm-section-title span {
  color: #68727d;
  font-size: 12px;
  font-weight: 700;
}

.crm-campaign-audience-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.crm-campaign-audience-summary > div {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.crm-campaign-audience-summary strong,
.crm-campaign-audience-summary small {
  display: block;
}

.crm-campaign-audience-summary small {
  color: #68727d;
  margin-top: 4px;
}

.crm-churn-risk-panel {
  background: #fff8f6;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
}

.crm-churn-risk-panel > .crm-section-title {
  align-items: flex-start;
}

.crm-churn-risk-panel > .crm-section-title span {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.crm-churn-risk-counters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-churn-risk-counters dd {
  color: #9a3412;
}

.crm-churn-risk-counters small {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-churn-risk-cta {
  align-items: center;
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.crm-churn-risk-cta strong,
.crm-churn-risk-cta span {
  display: block;
}

.crm-churn-risk-cta span {
  color: #68727d;
  font-size: 12px;
  margin-top: 4px;
}

.crm-churn-risk-table table {
  min-width: 1040px;
}

.crm-churn-risk-table td:nth-child(5) {
  max-width: 360px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.crm-task-workspace-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.crm-task-create,
.crm-teleagent-form,
.crm-task-board {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}

.crm-task-create h3,
.crm-task-workspace h3,
.crm-teleagent-form h3 {
  margin: 0 0 10px;
}

.crm-task-list,
.crm-outbound-list {
  display: grid;
  gap: 8px;
}

.crm-task-list.is-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-task-card,
.crm-outbound-list article {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.crm-task-card.is-in_progress,
.crm-outbound-list article:first-child {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgb(147 197 253 / 18%);
}

.crm-task-card.is-done {
  border-color: #86efac;
}

.crm-task-card.is-failed,
.crm-task-card.is-cancelled {
  border-color: #fecaca;
}

.crm-task-card small,
.crm-outbound-list small {
  color: #68727d;
  font-size: 12px;
}

.crm-campaign-variant-editor {
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  padding: 12px;
}

.crm-campaign-variant-editor .crm-section-title {
  align-items: flex-start;
}

.crm-campaign-variant-editor .crm-section-title span {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.crm-variant-total {
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
}

.crm-variant-total.is-valid {
  background: #ecfdf3;
  color: #15803d;
}

.crm-variant-total.is-invalid {
  background: #fff7ed;
  color: #c2410c;
}

.crm-campaign-variant-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-campaign-variant-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: 86px minmax(120px, 1fr) 90px;
  margin: 0;
  padding: 12px;
}

.crm-campaign-variant-card legend {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  padding: 0 4px;
}

.crm-campaign-variant-card .crm-field-wide {
  grid-column: 1 / -1;
}

.crm-campaign-variant-review-panel {
  background: #f8faff;
  border-color: #c7d2fe;
}

.crm-campaign-variant-review-panel > .crm-section-title {
  align-items: flex-start;
}

.crm-campaign-variant-review-panel > .crm-section-title span {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.crm-campaign-variant-counters small {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.crm-campaign-variant-table {
  overflow-x: auto;
}

.crm-campaign-variant-table table {
  border-collapse: collapse;
  min-width: 820px;
  width: 100%;
}

.crm-campaign-variant-table th,
.crm-campaign-variant-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 9px 10px;
  text-align: left;
}

.crm-campaign-variant-table th {
  background: #f7f8fa;
  color: #68727d;
  font-size: 12px;
  font-weight: 900;
}

.crm-delivery-filter-bar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 150px 150px minmax(220px, 1fr) auto auto;
}

.crm-suppression-list-panel {
  border-color: #dbeafe;
  background: #f8fbff;
}

.crm-suppression-list-panel > .crm-section-title {
  align-items: flex-start;
}

.crm-suppression-list-panel > .crm-section-title span {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.crm-suppression-counters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-suppression-counters small {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.crm-suppression-filter-bar {
  grid-template-columns: 150px 170px minmax(240px, 1fr) auto auto;
}

.crm-suppression-table table {
  min-width: 1040px;
}

.crm-suppression-table td:nth-child(4) {
  max-width: 340px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.crm-delivery-log-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
}

.crm-delivery-log-table table {
  min-width: 980px;
}

.crm-delivery-log-table tr.is-selected td {
  background: #f8fbff;
}

.crm-delivery-status {
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  white-space: nowrap;
}

.crm-delivery-status.is-done {
  background: #ecfdf3;
  color: #15803d;
}

.crm-delivery-status.is-failed {
  background: #fff1f0;
  color: #b91c1c;
}

.crm-delivery-status.is-cancelled {
  background: #f8fafc;
  color: #64748b;
}

.crm-delivery-status.is-in_progress {
  background: #eff6ff;
  color: #1d4ed8;
}

.crm-delivery-status.is-neutral {
  background: #f8fafc;
  color: #475569;
}

.crm-campaign-approval-panel {
  border-color: #c7d2fe;
  background: #f8faff;
}

.crm-campaign-approval-panel > .crm-section-title {
  align-items: flex-start;
}

.crm-campaign-approval-panel > .crm-section-title span {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.crm-campaign-approval-counters small {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.crm-campaign-approval-counters dd {
  font-size: 16px;
}

.crm-campaign-approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.crm-campaign-approval-table table {
  min-width: 920px;
}

.crm-campaign-approval-table td:last-child {
  max-width: 360px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.crm-delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-delivery-actions .crm-secondary-button,
.crm-delivery-actions .crm-icon-button {
  min-height: 30px;
  padding: 5px 8px;
}

.crm-delivery-detail {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.crm-delivery-detail h4 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.crm-delivery-detail dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.crm-delivery-detail dt {
  color: #68727d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-delivery-detail dd {
  color: var(--crm-text);
  font-size: 13px;
  font-weight: 700;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.crm-task-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 150px minmax(120px, 1fr) auto;
}

.crm-task-actions input,
.crm-task-actions select {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  min-height: 36px;
  padding: 7px 9px;
}

.crm-outbound-overview-panel {
  display: grid;
  gap: 14px;
}

.crm-outbound-overview-panel > * {
  min-width: 0;
}

.crm-outbound-tabs,
.crm-outbound-actions,
.crm-outbound-title-actions,
.crm-outbound-wizard-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-outbound-tabs .crm-chip-button {
  gap: 7px;
}

.crm-outbound-tabs small {
  background: rgb(255 255 255 / 70%);
  border-radius: 999px;
  color: inherit;
  font-size: 11px;
  padding: 1px 6px;
}

.crm-outbound-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-outbound-summary article,
.crm-outbound-inspector {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}

.crm-outbound-summary span,
.crm-outbound-summary small,
.crm-outbound-inspector span,
.crm-outbound-inspector dt {
  color: #68727d;
  font-size: 12px;
}

.crm-outbound-summary strong {
  color: #172026;
  display: block;
  font-size: 22px;
  margin: 4px 0;
}

.crm-outbound-filter-bar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
}

.crm-outbound-filter-bar .crm-field:first-child,
.crm-outbound-filter-bar .crm-field:nth-child(6),
.crm-outbound-filter-bar .crm-field:nth-child(7) {
  grid-column: span 2;
}

.crm-outbound-table {
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  max-width: 100%;
  overflow: auto;
}

.crm-outbound-table table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

.crm-outbound-table th,
.crm-outbound-table td {
  border-bottom: 1px solid #edf0f5;
  font-size: 13px;
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.crm-outbound-table th {
  background: #f7f8fa;
  color: #68727d;
  font-weight: 800;
}

.crm-outbound-table tr.is-selected td {
  background: #eef6ff;
}

.crm-outbound-table td:first-child strong,
.crm-outbound-table td:first-child small,
.crm-outbound-table td:nth-child(2) span,
.crm-outbound-table td:nth-child(2) small {
  display: block;
}

.crm-outbound-table small {
  color: #68727d;
  font-size: 12px;
  margin-top: 3px;
}

.crm-outbound-consent {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  max-width: 240px;
  overflow: hidden;
  padding: 4px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-outbound-status {
  border: 1px solid #dbe3ea;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
}

.crm-outbound-status.is-healthy {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #15803d;
}

.crm-outbound-status.is-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.crm-outbound-status.is-risk,
.crm-outbound-state.is-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.crm-outbound-status.is-neutral,
.crm-outbound-state.is-readonly {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.crm-outbound-state {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #68727d;
  display: block;
  font-size: 13px;
  padding: 10px 12px;
}

.crm-outbound-table td:last-child,
.crm-outbound-table th:last-child {
  min-width: 148px;
}

.crm-outbound-actions {
  flex-wrap: nowrap;
  gap: 3px;
}

.crm-outbound-actions .crm-ghost-button {
  min-height: 24px;
  min-width: 24px;
  padding: 3px;
}

.crm-outbound-inspector {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
}

.crm-outbound-inspector h3 {
  margin: 2px 0 4px;
}

.crm-outbound-inspector dl {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.crm-outbound-inspector dd {
  color: #172026;
  font-size: 13px;
  font-weight: 700;
  margin: 3px 0 0;
}

.crm-outbound-wizard {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #cfe1ff;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgb(37 99 235 / 10%);
  display: grid;
  gap: 14px;
  padding: 14px;
}

.crm-outbound-wizard .crm-section-title span {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.crm-outbound-wizard-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.crm-outbound-wizard-step {
  align-items: start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 10px;
  position: relative;
  text-align: left;
}

.crm-outbound-wizard-step strong {
  color: #172026;
  font-size: 13px;
}

.crm-outbound-wizard-step small {
  color: #68727d;
  font-size: 11px;
  line-height: 1.35;
}

.crm-outbound-wizard-step span {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 22px;
}

.crm-outbound-wizard-step.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.crm-outbound-wizard-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.crm-outbound-wizard-card h4 {
  color: #172026;
  font-size: 15px;
  margin: 0;
}

.crm-outbound-preview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-outbound-preview-grid article {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.crm-outbound-preview-grid span,
.crm-outbound-preview-grid small {
  color: #68727d;
  display: block;
  font-size: 12px;
}

.crm-outbound-preview-grid strong {
  color: #172026;
  display: block;
  font-size: 24px;
  margin: 4px 0;
}

.crm-checkbox-field {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-start;
}

.crm-checkbox-field input {
  min-height: auto;
  width: auto;
}

.crm-outbound-wizard-footer {
  justify-content: flex-end;
}

.crm-hub-panel {
  display: grid;
  gap: 16px;
}

.crm-hub-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-hub-form,
.crm-hub-section {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.crm-hub-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-hub-form-grid .crm-field.is-wide {
  grid-column: 1 / -1;
}

.crm-hub-secret {
  align-items: center;
  background: var(--crm-surface-muted);
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 0.3fr) minmax(0, 1fr) auto;
  padding: 10px;
}

.crm-hub-secret code,
.crm-hub-section code {
  color: var(--crm-text-secondary);
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .crm-campaign-audience-summary,
  .crm-churn-risk-counters,
  .crm-churn-risk-cta,
  .crm-task-workspace-grid,
  .crm-task-list.is-compact,
  .crm-task-actions,
  .crm-outbound-summary,
  .crm-hub-grid,
  .crm-hub-form-grid,
  .crm-hub-secret,
  .crm-outbound-preview-grid,
  .crm-outbound-filter-bar,
  .crm-suppression-counters,
  .crm-suppression-filter-bar,
  .crm-outbound-inspector,
  .crm-outbound-inspector dl,
  .crm-outbound-wizard-steps {
    grid-template-columns: 1fr;
  }

  .crm-outbound-filter-bar .crm-field:first-child,
  .crm-outbound-filter-bar .crm-field:nth-child(6),
  .crm-outbound-filter-bar .crm-field:nth-child(7) {
    grid-column: auto;
  }
}

.crm-dashboard-panel h2 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-dashboard-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(140px, 1fr)) auto auto;
  margin-bottom: 16px;
}

.crm-dashboard-summary {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.1fr) repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.crm-dashboard-summary > div,
.crm-dashboard-summary article {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.crm-dashboard-summary > div {
  background: #eef6ff;
  border-color: #cfe1ff;
}

.crm-dashboard-summary span {
  color: #68727d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-dashboard-summary strong {
  color: #172026;
  font-size: 24px;
  line-height: 1.15;
}

.crm-dashboard-summary p {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.crm-dashboard-attribution {
  background: #fff;
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(45, 108, 223, 0.06);
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
}

.crm-dashboard-attribution-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-dashboard-attribution-summary article,
.crm-dashboard-attribution-breakdown article {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.crm-dashboard-attribution-summary span,
.crm-dashboard-attribution-breakdown span {
  color: #68727d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-dashboard-attribution-summary strong {
  color: #172026;
  font-size: 24px;
  line-height: 1.15;
}

.crm-dashboard-attribution-summary small,
.crm-dashboard-attribution-breakdown small {
  color: #68727d;
  font-size: 12px;
}

.crm-dashboard-attribution-table {
  overflow-x: auto;
}

.crm-dashboard-attribution-table table {
  border-collapse: collapse;
  min-width: 780px;
  width: 100%;
}

.crm-dashboard-attribution-table th,
.crm-dashboard-attribution-table td {
  border-top: 1px solid #eef1f5;
  font-size: 13px;
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.crm-dashboard-attribution-table thead th {
  background: #f8fafc;
  color: #68727d;
  font-size: 12px;
  text-transform: uppercase;
}

.crm-dashboard-attribution-breakdown {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-dashboard-export-history {
  background: #fff;
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(45, 108, 223, 0.05);
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
}

.crm-dashboard-export-table {
  overflow-x: auto;
}

.crm-dashboard-export-table table {
  border-collapse: collapse;
  min-width: 920px;
  width: 100%;
}

.crm-dashboard-export-table th,
.crm-dashboard-export-table td {
  border-top: 1px solid #eef1f5;
  font-size: 13px;
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.crm-dashboard-export-table thead th {
  background: #f8fafc;
  color: #68727d;
  font-size: 12px;
  text-transform: uppercase;
}

.crm-dashboard-export-table td strong,
.crm-dashboard-export-table td small {
  display: block;
}

.crm-dashboard-export-table td small {
  color: #68727d;
  line-height: 1.4;
  margin-top: 2px;
  max-width: 240px;
  overflow-wrap: anywhere;
}

.crm-export-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.crm-export-status.is-completed {
  background: #ecfdf3;
  color: #14824b;
}

.crm-export-status.is-failed {
  background: #fff3f3;
  color: #b42318;
}

.crm-export-status.is-processing {
  background: #eef4ff;
  color: #2d6cdf;
}

.crm-export-failure {
  color: #b42318;
  display: block;
  max-width: 280px;
  overflow-wrap: anywhere;
}

.crm-dashboard-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.crm-dashboard-card {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  min-height: 142px;
  padding: 14px;
}

.crm-dashboard-card span {
  color: #68727d;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.crm-dashboard-card strong {
  color: #172026;
  font-size: 26px;
  line-height: 1.15;
}

.crm-dashboard-card small.is-positive,
.crm-ledger-table .is-positive {
  color: #14824b;
}

.crm-dashboard-card small.is-negative,
.crm-ledger-table .is-negative {
  color: #b42318;
}

.crm-dashboard-card p {
  color: #68727d;
  font-size: 12px;
  margin: 0;
}

.crm-dashboard-trend-overview {
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  margin-bottom: 16px;
  padding: 14px;
}

.crm-dashboard-trend-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-dashboard-trend-grid .crm-dashboard-trend {
  min-height: 240px;
}

.crm-dashboard-empty-trend {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #d5dce5;
  border-radius: 10px;
  color: #68727d;
  display: flex;
  justify-content: center;
  min-height: 180px;
  text-align: center;
}

.crm-dashboard-empty-state {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #d5dce5;
  border-radius: 10px;
  color: #68727d;
  display: flex;
  font-size: 13px;
  justify-content: center;
  line-height: 1.5;
  margin: 0;
  min-height: 96px;
  padding: 14px;
  text-align: center;
}

.crm-dashboard-grid,
.crm-dashboard-kpi-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  margin-top: 16px;
}

.crm-dashboard-trend,
.crm-dashboard-breakdowns,
.crm-performance-notes,
.crm-dashboard-kpi-grid > section {
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  padding: 14px;
}

.crm-trend-bars {
  align-items: end;
  display: flex;
  gap: 4px;
  height: 180px;
  padding-top: 16px;
}

.crm-trend-bars span {
  align-items: end;
  background: #eef4ff;
  border-radius: 999px 999px 0 0;
  display: flex;
  flex: 1;
  min-width: 4px;
  overflow: hidden;
}

.crm-trend-bars i {
  background: linear-gradient(180deg, #2d6cdf, #79a8ff);
  border-radius: inherit;
  display: block;
  width: 100%;
}

.crm-dashboard-breakdowns {
  display: grid;
  gap: 12px;
}

.crm-dashboard-breakdowns table {
  border-collapse: collapse;
  width: 100%;
}

.crm-dashboard-breakdowns caption {
  color: #68727d;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: left;
  text-transform: uppercase;
}

.crm-dashboard-breakdowns th,
.crm-dashboard-breakdowns td {
  border-top: 1px solid #eef1f5;
  font-size: 13px;
  padding: 7px 0;
}

.crm-dashboard-breakdowns th {
  color: #172026;
  font-weight: 600;
  text-align: left;
}

.crm-dashboard-breakdowns td {
  text-align: right;
}

.crm-kpi-slot-list {
  display: grid;
  gap: 10px;
}

.crm-kpi-slot-list article {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  padding: 12px;
}

.crm-kpi-slot-list small,
.crm-performance-notes li,
.crm-performance-notes p {
  color: #68727d;
  font-size: 13px;
}

.crm-kpi-slot-list p,
.crm-performance-notes p {
  margin: 6px 0 0;
}

.crm-performance-notes ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.crm-dashboard-note-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.crm-dashboard-note-list div {
  display: grid;
  gap: 4px;
}

.crm-dashboard-note-list dt,
.crm-dashboard-note-title {
  color: #172026;
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.crm-dashboard-note-list dd {
  color: #68727d;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}


.crm-aio-kpi-panel {
  border-color: #d7e5ff;
  box-shadow: 0 16px 40px rgba(45, 108, 223, 0.08);
}

.crm-aio-kpi-panel h2,
.crm-aio-kpi-panel h3 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-aio-kpi-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-aio-kpi-state {
  align-items: center;
  background: #fff8eb;
  border: 1px solid #ffd391;
  border-radius: 10px;
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
}

.crm-aio-kpi-state.is-healthy {
  background: #ecfdf3;
  border-color: #b7e4c7;
}

.crm-aio-kpi-state.is-danger {
  background: #fff3f3;
  border-color: #ffd0d0;
}

.crm-aio-kpi-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  margin-bottom: 14px;
}

.crm-aio-kpi-rollup {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.crm-aio-kpi-rollup article {
  background: #f7fbff;
  border: 1px solid #d7e5ff;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  padding: 14px;
}

.crm-aio-kpi-rollup strong {
  color: #172026;
  font-size: 28px;
}

.crm-aio-kpi-rollup span {
  font-weight: 800;
}

.crm-aio-kpi-rollup small {
  color: #68727d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-aio-kpi-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-aio-kpi-card {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  min-height: 158px;
  padding: 14px;
}

.crm-aio-kpi-card span,
.crm-aio-kpi-card em,
.crm-aio-kpi-contracts small,
.crm-aio-kpi-contracts p,
.crm-aio-kpi-next-actions span,
.crm-aio-kpi-cohort-table small {
  color: #68727d;
  font-size: 12px;
}

.crm-aio-kpi-card span {
  font-weight: 800;
  text-transform: uppercase;
}

.crm-aio-kpi-card strong {
  color: #172026;
  font-size: 26px;
  line-height: 1.15;
}

.crm-aio-kpi-card p,
.crm-aio-kpi-contracts p {
  margin: 0;
}

.crm-aio-kpi-card em {
  font-style: normal;
  font-weight: 700;
}

.crm-aio-kpi-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  margin-top: 16px;
}

.crm-aio-kpi-grid > section,
.crm-aio-kpi-table-section,
.crm-aio-kpi-next-actions {
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  padding: 14px;
}

.crm-aio-kpi-contracts {
  display: grid;
  gap: 10px;
}

.crm-aio-kpi-contracts article {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.crm-aio-kpi-contracts code {
  color: #2d6cdf;
  font-size: 12px;
  white-space: normal;
}

.crm-aio-kpi-table-section {
  margin-top: 16px;
}

.crm-aio-kpi-cohort-table td:first-child {
  min-width: 210px;
}

.crm-aio-kpi-funnel-table td:first-child {
  min-width: 190px;
}

.crm-aio-kpi-cohort-table td:first-child,
.crm-aio-kpi-cohort-table td:last-child {
  white-space: normal;
}

.crm-aio-kpi-cohort-table strong,
.crm-aio-kpi-cohort-table small {
  display: block;
}

.crm-aio-kpi-chip {
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  color: #2d6cdf;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.crm-aio-kpi-chip.is-healthy {
  background: #ecfdf3;
  border-color: #b7e4c7;
  color: #14824b !important;
}

.crm-aio-kpi-chip.is-warning {
  background: #fff8eb;
  border-color: #ffd391;
  color: #a15c00 !important;
}

.crm-aio-kpi-chip.is-danger {
  background: #fff3f3;
  border-color: #ffd0d0;
  color: #b42318 !important;
}

.crm-aio-kpi-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.crm-aio-kpi-next-actions strong,
.crm-aio-kpi-next-actions span {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 999px;
  padding: 7px 10px;
}

.crm-pipeline-dashboard {
  border-color: #d8e8ff;
  box-shadow: 0 16px 40px rgba(34, 92, 168, 0.06);
}

.crm-pipeline-dashboard h2 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-pipeline-command-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.crm-pipeline-command-strip article {
  background: #ffffff;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
}

.crm-pipeline-command-strip article.is-warning {
  border-color: #f6c76f;
}

.crm-pipeline-command-strip article.is-risk {
  border-color: #ffb4ad;
}

.crm-pipeline-command-strip small,
.crm-pipeline-command-strip span,
.crm-pipeline-flow-header span,
.crm-pipeline-stage-bar small,
.crm-risk-list span,
.crm-risk-list small,
.crm-pipeline-renewal-list span,
.crm-pipeline-renewal-list small,
.crm-pipeline-history small {
  color: #68727d;
  font-size: 12px;
}

.crm-pipeline-command-strip strong {
  color: #172026;
  font-size: 26px;
  font-weight: 800;
}

.crm-pipeline-filter-bar {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.crm-pipeline-filter-bar label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.crm-pipeline-filter-bar label span,
.crm-pipeline-filter-bar small {
  color: #68727d;
  font-size: 12px;
}

.crm-pipeline-filter-bar select {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  color: #172026;
  min-height: 34px;
  min-width: 180px;
  padding: 0 10px;
}

.crm-pipeline-flow-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.crm-pipeline-stage-bar {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 14px;
}

.crm-pipeline-stage-bar article {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 12px;
}

.crm-pipeline-stage-bar span {
  color: #172026;
  font-size: 22px;
  font-weight: 800;
}

.crm-pipeline-stage-bar i {
  background: linear-gradient(90deg, #2d6cdf, #79a8ff);
  border-radius: 999px;
  display: block;
  height: 6px;
}

.crm-pipeline-product-line-matrix {
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  margin-bottom: 14px;
  overflow: hidden;
}

.crm-pipeline-product-line-head,
.crm-pipeline-product-line-matrix article {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.4fr) repeat(6, minmax(64px, 0.55fr));
  min-height: 44px;
  padding: 10px 12px;
}

.crm-pipeline-product-line-head {
  background: #f8fafc;
  color: #68727d;
  font-size: 12px;
  font-weight: 700;
}

.crm-pipeline-product-line-matrix article {
  background: #ffffff;
  border-top: 1px solid #eef1f5;
  color: #172026;
  font-weight: 800;
}

.crm-pipeline-product-line-matrix article.is-risk {
  background: #fff7f6;
}

.crm-pipeline-product-line-matrix strong {
  display: grid;
  gap: 2px;
}

.crm-pipeline-product-line-matrix small {
  color: #68727d;
  font-size: 12px;
  font-weight: 500;
}

.crm-pipeline-action-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.crm-risk-list {
  border: 1px solid #eef1f5;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.crm-pipeline-renewal-list {
  border: 1px solid #eef1f5;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.crm-risk-list > div,
.crm-risk-list article,
.crm-pipeline-renewal-list > div,
.crm-pipeline-renewal-list article {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(150px, 0.48fr) minmax(180px, 0.58fr) minmax(0, 1fr);
}

.crm-pipeline-renewal-list > div,
.crm-pipeline-renewal-list article {
  grid-template-columns: minmax(160px, 0.7fr) minmax(160px, 0.8fr) minmax(0, 1fr);
}

.crm-pipeline-card {
  grid-column: 1 / -1;
}

.crm-health-score {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 24px;
  height: 52px;
  justify-content: center;
  min-width: 52px;
  padding: 0 14px;
}

.crm-pipeline-history {
  border-top: 1px solid #eef1f5;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
}

.crm-pipeline-history ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-pipeline-history li {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 10px;
}

@media (max-width: 1080px) {
  .crm-dashboard-filters,
  .crm-dashboard-summary,
  .crm-dashboard-attribution-summary,
  .crm-dashboard-attribution-breakdown,
  .crm-dashboard-cards,
  .crm-dashboard-grid,
  .crm-dashboard-kpi-grid,
  .crm-dashboard-trend-grid,
  .crm-aio-kpi-filters,
  .crm-aio-kpi-rollup,
  .crm-aio-kpi-cards,
  .crm-aio-kpi-grid,
  .crm-pipeline-command-strip,
  .crm-pipeline-stage-bar,
  .crm-pipeline-action-grid,
  .crm-pipeline-product-line-head,
  .crm-pipeline-product-line-matrix article,
  .crm-risk-list > div,
  .crm-risk-list article,
  .crm-pipeline-renewal-list > div,
  .crm-pipeline-renewal-list article {
    grid-template-columns: 1fr;
  }

  .crm-pipeline-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-pipeline-filter-bar label {
    align-items: stretch;
    flex-direction: column;
  }
}

.crm-industry-panel {
  border-color: #d8e8ff;
  box-shadow: 0 16px 40px rgba(34, 92, 168, 0.08);
}

.crm-industry-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.crm-industry-tabs button {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 10px;
  color: #172026;
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-width: 150px;
  padding: 10px 12px;
  text-align: left;
}

.crm-industry-tabs button.is-active {
  background: #eff6ff;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgb(96 165 250 / 14%);
}

.crm-industry-tabs small {
  color: #68727d;
  font-size: 12px;
}

.crm-industry-hero {
  align-items: flex-start;
  background: linear-gradient(135deg, #eef7ff, #fff7ed);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 16px;
}

.crm-industry-hero p,
.crm-industry-card p,
.crm-industry-card small,
.crm-industry-fieldset small,
.crm-template-card span,
.crm-preset-list small,
.crm-preset-list code {
  color: #68727d;
  font-size: 13px;
}

.crm-industry-hero p {
  margin: 6px 0 0;
}

.crm-industry-hero > span {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

.crm-industry-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  margin-top: 16px;
}

.crm-industry-card {
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.crm-industry-card.is-policy {
  background: #fbfdff;
}

.crm-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-pill-list span {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}

.crm-industry-fieldset {
  border-top: 1px solid #eef1f5;
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.crm-industry-fieldset:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.crm-industry-fieldset dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.crm-industry-fieldset dl > div {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 140px minmax(0, 1fr);
}

.crm-industry-fieldset dt {
  color: #172026;
  font-size: 13px;
  font-weight: 700;
}

.crm-industry-fieldset dd {
  color: #334155;
  font-size: 13px;
  margin: 0;
}

.crm-template-list,
.crm-preset-list {
  display: grid;
  gap: 10px;
}

.crm-template-card,
.crm-preset-list article {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  padding: 12px;
  text-align: left;
}

.crm-template-card {
  cursor: pointer;
}

.crm-template-card.is-selected {
  background: #eff6ff;
  border-color: #60a5fa;
}

.crm-template-task-form {
  border-top: 1px solid #eef1f5;
  padding-top: 12px;
}

.crm-checkbox-field {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 13px;
  gap: 8px;
}

.crm-preset-list code {
  background: #ffffff;
  border: 1px solid #eef1f5;
  border-radius: 6px;
  color: #475569;
  display: block;
  overflow-wrap: anywhere;
  padding: 8px;
}

.crm-campaign-preset-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-campaign-preset-list article {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.crm-campaign-preset-list p,
.crm-campaign-preset-list small {
  color: #68727d;
  font-size: 13px;
  margin: 0;
}

.crm-success-message {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  font-size: 13px;
  margin: 16px 0 0;
  padding: 10px 12px;
}

@media (max-width: 1080px) {
  .crm-industry-grid {
    grid-template-columns: 1fr;
  }

  .crm-industry-hero {
    display: grid;
  }

  .crm-campaign-preset-list {
    grid-template-columns: 1fr;
  }
}

.crm-project-board {
  border-color: rgba(79, 70, 229, 0.22);
  gap: 14px;
  max-width: 1440px;
}

.crm-project-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1.3fr) repeat(5, minmax(128px, 0.7fr)) auto;
}

.crm-project-filters .crm-field > span:first-child {
  align-items: center;
  display: flex;
  gap: 6px;
}

.crm-project-filter-chips,
.crm-project-trace-list,
.crm-project-table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-project-filter-chips span,
.crm-project-trace-list a,
.crm-project-trace-list > span {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  padding: 5px 8px;
}

.crm-project-filter-chips span {
  background: #eff6ff;
  color: #1d4ed8;
}

.crm-project-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-width: 100%;
  overflow-x: auto;
}

.crm-project-table {
  border-collapse: collapse;
  min-width: 1180px;
  width: 100%;
}

.crm-project-table th,
.crm-project-table td {
  border-bottom: 1px solid #edf0f5;
  color: #0f172a;
  font-size: 13px;
  padding: 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.crm-project-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.crm-project-table td:first-child strong,
.crm-project-table td:first-child small,
.crm-project-table td:nth-child(3) strong,
.crm-project-table td:nth-child(3) small,
.crm-project-table td:nth-child(4) small,
.crm-project-table td:nth-child(5) small {
  display: block;
}

.crm-project-table small {
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}

.crm-project-name-link {
  color: inherit;
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.crm-project-name-link:hover strong {
  color: #2563eb;
  text-decoration: underline;
}

.crm-project-table .crm-status-pill {
  border: 1px solid #e2e8f0;
  display: inline-flex;
  font-size: 12px;
  margin: 0 5px 5px 0;
  padding: 4px 8px;
}

.crm-project-table .crm-status-pill.is-healthy {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857 !important;
}

.crm-project-table .crm-status-pill.is-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309 !important;
}

.crm-project-table .crm-status-pill.is-risk {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c !important;
}

.crm-project-table .crm-status-pill.is-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.crm-project-table .crm-status-pill.is-neutral {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.crm-project-table .crm-project-progress {
  min-width: 120px;
}

.crm-project-trace-list {
  max-width: 260px;
}

.crm-project-trace-list a {
  background: #ecfeff;
  border-color: #cffafe;
  color: #0e7490;
  max-width: 180px;
  overflow: hidden;
  text-decoration: none;
}

.crm-project-trace-list a span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-project-trace-list > span {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.crm-project-table-actions {
  flex-wrap: nowrap;
}

.crm-project-table-actions .crm-ghost-button {
  min-height: 28px;
  min-width: 28px;
  padding: 3px;
}

.crm-project-state {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  display: block;
  padding: 10px 12px;
}

.crm-project-pagination {
  margin-top: 2px;
}

.crm-project-detail {
  gap: 14px;
  max-width: 1440px;
}

.crm-project-detail-head,
.crm-project-detail-badges,
.crm-project-finance-panel header {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.crm-project-detail-head h2,
.crm-project-finance-panel h3,
.crm-project-detail-section h3 {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0;
}

.crm-project-detail-head > div:first-child {
  display: grid;
  gap: 6px;
}

.crm-project-detail-head > div:first-child > span,
.crm-project-detail-section p,
.crm-project-finance-lock,
.crm-project-risk-list span,
.crm-project-risk-list p {
  color: #64748b;
  font-size: 13px;
  margin: 0;
}

.crm-project-back-link {
  justify-self: start;
  width: fit-content;
}

.crm-project-detail-grid,
.crm-project-detail-columns {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.crm-project-detail-section,
.crm-project-finance-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.crm-project-detail-facts,
.crm-project-finance-grid {
  display: grid;
  gap: 8px;
  margin: 0;
}

.crm-project-detail-facts {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.crm-project-finance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-project-detail-facts div,
.crm-project-finance-grid div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
}

.crm-project-detail-facts dt,
.crm-project-finance-grid dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.crm-project-detail-facts dd,
.crm-project-finance-grid dd {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
}

.crm-project-detail-facts dd.is-risk {
  color: #b91c1c;
}

.crm-project-finance-grid small {
  color: #b45309;
  font-size: 11px;
  font-weight: 800;
}

.crm-project-finance-grid dd.is-masked {
  color: #64748b;
  letter-spacing: 0;
}

.crm-project-finance-panel.is-locked {
  background: #fffbeb;
  border-color: #fde68a;
}

.crm-project-finance-panel header > span {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 999px;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.crm-project-finance-lock {
  align-items: center;
  display: flex;
  gap: 6px;
}

.crm-project-detail-progress {
  display: grid;
  gap: 7px;
}

.crm-project-detail-progress > span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.crm-project-detail-table {
  overflow-x: auto;
}

.crm-project-detail-table td.is-risk {
  color: #b91c1c;
  font-weight: 800;
}

.crm-project-risk-list {
  display: grid;
  gap: 8px;
}

.crm-project-risk-list article {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

@media (max-width: 1100px) {
  .crm-project-detail-grid,
  .crm-project-detail-columns,
  .crm-project-detail-facts,
  .crm-project-finance-grid {
    grid-template-columns: 1fr;
  }

  .crm-project-detail-head,
  .crm-project-finance-panel header {
    align-items: stretch;
    flex-direction: column;
  }
}

.crm-project-card {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
}

.crm-project-card.is-overdue {
  border-color: rgba(239, 68, 68, 0.36);
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.11);
}

.crm-project-card header,
.crm-project-card dl,
.crm-project-links {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.crm-project-card header div {
  display: grid;
  gap: 2px;
}

.crm-project-card header span,
.crm-project-card p,
.crm-project-card small,
.crm-project-card dt {
  color: #64748b;
  font-size: 12px;
}

.crm-project-card header em {
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  padding: 4px 8px;
  text-transform: uppercase;
}

.crm-project-card header em.is-healthy {
  background: #ecfdf5;
  color: #047857;
}

.crm-project-card header em.is-warning {
  background: #fffbeb;
  color: #b45309;
}

.crm-project-card header em.is-risk,
.crm-project-card dd.is-risk {
  background: #fef2f2;
  color: #b91c1c;
}

.crm-project-progress {
  background: #e2e8f0;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.crm-project-progress span {
  background: linear-gradient(90deg, #6366f1, #22c55e);
  display: block;
  height: 100%;
  min-width: 6px;
}

.crm-project-card dl {
  align-items: stretch;
}

.crm-project-card dl div {
  background: #f8fafc;
  border-radius: 12px;
  flex: 1;
  padding: 7px 8px;
}

.crm-project-card dd {
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  margin: 2px 0 0;
}

.crm-project-warning {
  background: #fff7ed;
  border-radius: 12px;
  color: #c2410c !important;
  padding: 7px 9px;
}

.crm-project-links {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.crm-project-links a {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  padding: 5px 8px;
  text-decoration: none;
}

.crm-rollout-plan {
  border-color: rgba(14, 165, 233, 0.26);
  box-shadow: 0 18px 44px rgba(14, 165, 233, 0.07);
}

.crm-rollout-plan h2 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-rollout-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.crm-rollout-summary article {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 16px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.crm-rollout-summary article.is-healthy {
  border-color: rgba(34, 197, 94, 0.3);
}

.crm-rollout-summary article.is-warning {
  border-color: rgba(245, 158, 11, 0.34);
}

.crm-rollout-summary article.is-risk {
  border-color: rgba(239, 68, 68, 0.34);
}

.crm-rollout-summary span,
.crm-rollout-summary small,
.crm-rollout-table small,
.crm-rollout-link-list span {
  color: #64748b;
  font-size: 12px;
}

.crm-rollout-summary strong {
  color: #0f172a;
  font-size: 24px;
}

.crm-rollout-filters {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.42fr));
  margin-bottom: 14px;
}

.crm-rollout-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
}

.crm-rollout-table-wrap {
  overflow-x: auto;
}

.crm-rollout-table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

.crm-rollout-table th,
.crm-rollout-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.crm-rollout-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

.crm-rollout-table td {
  color: #0f172a;
  font-size: 13px;
}

.crm-rollout-table td:first-child,
.crm-rollout-table td:nth-child(2),
.crm-rollout-table td:nth-child(3),
.crm-rollout-table td:nth-child(4),
.crm-rollout-table td:nth-child(5) {
  display: grid;
  gap: 5px;
}

.crm-rollout-chip-list,
.crm-rollout-link-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-rollout-chip-list span {
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.crm-rollout-link-list a {
  background: #ecfeff;
  border-radius: 999px;
  color: #0e7490;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
  text-decoration: none;
}

.crm-rollout-sidepanel,
.crm-rollout-create,
.crm-rollout-blueprint {
  display: grid;
  gap: 12px;
}

.crm-rollout-sidepanel > section,
.crm-rollout-create {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 12px;
}

.crm-rollout-blueprint article {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.crm-rollout-blueprint article span,
.crm-rollout-blueprint article small {
  color: #64748b;
  font-size: 12px;
}

.crm-rollout-create .crm-field-wide,
.crm-rollout-create .crm-inline-error,
.crm-rollout-create .crm-form-actions {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .crm-rollout-summary,
  .crm-rollout-filters,
  .crm-rollout-grid {
    grid-template-columns: 1fr;
  }
}

.crm-project-panel,
.crm-project-stack,
.crm-project-create {
  display: grid;
  gap: 12px;
}

.crm-project-panel {
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: 20px;
  padding: 16px;
}

.crm-project-create {
  background: #f8fafc;
  border-radius: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.crm-project-create .crm-form-actions,
.crm-project-create .crm-inline-error {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .crm-customer-tag-form {
    grid-template-columns: 1fr;
  }

  .crm-project-create {
    grid-template-columns: 1fr;
  }
}

.crm-product-matrix {
  border-color: rgba(14, 165, 233, 0.24);
}

.crm-product-filter-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.crm-product-search {
  flex: 1 1 260px;
  min-width: 240px;
}

.crm-product-filter-field {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  gap: 10px;
  padding: 8px 10px;
}

.crm-product-filter-field svg,
.crm-product-filter-field span {
  color: #64748b;
}

.crm-product-filter-field span {
  font-size: 12px;
  font-weight: 800;
}

.crm-product-filter-field select {
  border: 0;
  color: #0f172a;
  font: inherit;
  min-width: 116px;
  outline: 0;
}

.crm-product-entitlement-summary {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.crm-product-entitlement-summary span {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  color: #475569;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 2px;
  padding: 10px 12px;
}

.crm-product-entitlement-summary strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
}

.crm-product-entitlement-summary .is-open {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.25);
  color: #047857;
}

.crm-product-entitlement-summary .is-blocked {
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.22);
  color: #b91c1c;
}

.crm-product-entitlement-summary .is-warning {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.26);
  color: #b45309;
}

.crm-product-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
}

.crm-product-table {
  border-collapse: collapse;
  min-width: 980px;
  width: 100%;
}

.crm-product-table th,
.crm-product-table td {
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.crm-product-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.crm-product-table tbody tr:hover td {
  background: #f8fafc;
}

.crm-product-table code {
  color: #475569;
  font-size: 12px;
}

.crm-product-line-cell,
.crm-product-customer-list,
.crm-product-entitlement-cell,
.crm-product-route-cell,
.crm-product-renewal-list {
  display: grid;
  gap: 6px;
}

.crm-product-line-cell strong {
  color: #0f172a;
  white-space: nowrap;
}

.crm-product-line-cell small,
.crm-product-entitlement-cell small,
.crm-product-route-cell small,
.crm-product-customer-pill,
.crm-product-renewal-list span,
.crm-renewal-reminders span,
.crm-product-subscription-card header span,
.crm-product-subscription-card dt,
.crm-product-subscription-card p {
  color: #64748b;
  font-size: 12px;
}

.crm-product-customer-pill {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-product-summary-chip,
.crm-product-customer-pill em,
.crm-product-subscription-card header em {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  padding: 3px 7px;
  text-transform: uppercase;
  width: fit-content;
}

.crm-product-summary-chip.is-muted,
.crm-product-customer-pill .is-muted,
.crm-product-subscription-card.is-muted header em {
  background: #f1f5f9;
  color: #64748b;
}

.crm-product-customer-pill .is-healthy,
.crm-product-summary-chip.is-healthy,
.crm-product-subscription-card.is-healthy header em {
  background: #ecfdf5;
  color: #047857;
}

.crm-product-customer-pill .is-warning,
.crm-product-summary-chip.is-warning,
.crm-product-subscription-card.is-warning header em {
  background: #fffbeb;
  color: #b45309;
}

.crm-product-summary-chip.is-risk,
.crm-product-customer-pill .is-risk,
.crm-product-subscription-card.is-risk header em {
  background: #fef2f2;
  color: #b91c1c;
}

.crm-product-route-button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  width: fit-content;
}

.crm-product-route-button.is-open {
  background: linear-gradient(135deg, #059669, #0ea5e9);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.16);
}

.crm-product-route-button.is-blocked,
.crm-product-route-button:disabled {
  background: #cbd5e1;
  box-shadow: none;
  color: #475569;
  cursor: not-allowed;
}

.crm-product-renewal-list span {
  display: grid;
  gap: 2px;
}

.crm-product-renewal-list span.is-risk,
.crm-renewal-reminders span.is-risk,
.crm-product-subscription-card dd.is-risk {
  color: #b91c1c;
}

.crm-product-renewal-list span.is-warning,
.crm-renewal-reminders span.is-warning {
  color: #b45309;
}

.crm-product-renewal-list small {
  color: inherit;
  font-size: 11px;
}

.crm-product-pagination {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 10px;
  justify-content: flex-end;
}

.crm-product-pagination label {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.crm-product-pagination select {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #0f172a;
  padding: 4px 6px;
}

.crm-product-pagination button {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #0f172a;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.crm-product-pagination button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.crm-product-subscriptions-panel,
.crm-product-subscription-stack,
.crm-product-subscription-form {
  display: grid;
  gap: 10px;
}

.crm-renewal-reminders {
  background: #f8fafc;
  border-radius: 10px;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding: 12px;
}

.crm-renewal-reminders strong {
  color: #0f172a;
  margin-right: 4px;
}

.crm-product-subscriptions-panel {
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 20px;
  padding: 16px;
}

.crm-product-subscription-card {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.crm-product-progress {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.crm-product-progress span {
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  display: block;
  height: 100%;
  min-width: 6px;
}

.crm-product-subscription-card.is-risk {
  border-color: rgba(239, 68, 68, 0.34);
}

.crm-product-subscription-card.is-warning {
  border-color: rgba(245, 158, 11, 0.34);
}

.crm-product-subscription-card header div {
  display: grid;
  gap: 2px;
}

.crm-product-subscription-card header,
.crm-product-subscription-card dl {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.crm-product-subscription-card dl {
  align-items: stretch;
  margin: 0;
}

.crm-product-subscription-card dl div {
  background: #f8fafc;
  border-radius: 12px;
  flex: 1;
  padding: 7px 8px;
}

.crm-product-subscription-card dd {
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  margin: 2px 0 0;
}

.crm-product-subscription-form {
  background: #f8fafc;
  border-radius: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.crm-product-subscription-form .crm-field-wide,
.crm-product-subscription-form .crm-form-actions,
.crm-product-subscription-form .crm-inline-error {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .crm-product-filter-bar {
    align-items: stretch;
    display: grid;
  }

  .crm-product-entitlement-summary {
    grid-template-columns: 1fr;
  }

  .crm-product-search,
  .crm-product-filter-field {
    min-width: 0;
  }

  .crm-product-subscription-form,
  .crm-product-subscription-card dl {
    grid-template-columns: 1fr;
  }
}

.crm-m26-panel {
  border-color: rgba(37, 99, 235, 0.22);
}

.crm-saved-view-bar,
.crm-save-view-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.crm-save-view-row .crm-field {
  min-width: min(340px, 100%);
}

.crm-chip-button {
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 11px;
}

.crm-chip-button.is-active {
  background: #2563eb;
  color: #fff;
}

.crm-m26-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  margin-top: 16px;
}

.crm-search-result-list,
.crm-work-item-list {
  display: grid;
  gap: 10px;
}

.crm-search-result-card,
.crm-work-item-card {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.crm-search-result-card div,
.crm-work-item-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.crm-search-result-card strong,
.crm-work-item-card strong {
  color: #0f172a;
}

.crm-search-result-card small,
.crm-work-item-card small {
  color: #64748b;
  font-size: 12px;
}

.crm-result-type,
.crm-work-item-card span {
  background: #f8fafc;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  width: fit-content;
}

.crm-work-item-card.is-risk {
  border-color: rgba(239, 68, 68, 0.28);
}

.crm-work-item-card.is-risk span {
  background: #fef2f2;
  color: #b91c1c;
}

.crm-toolbar input,
.crm-toolbar select {
  min-width: 140px;
}

@media (max-width: 900px) {
  .crm-m26-grid {
    grid-template-columns: 1fr;
  }

  .crm-search-result-card,
  .crm-work-item-card {
    align-items: stretch;
    flex-direction: column;
  }
}

.crm-service-center-panel {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 18px 44px rgb(15 23 42 / 6%);
}

.crm-service-center-panel h2 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-service-kpis,
.crm-service-report-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.crm-service-kpis article,
.crm-service-report-grid article,
.crm-service-detail-card,
.crm-service-lower-grid > section {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #e2e6eb;
  border-radius: 12px;
  padding: 14px;
}

.crm-service-kpis span,
.crm-service-report-grid span,
.crm-service-detail-card dt,
.crm-service-ai-card span,
.crm-service-boundary-card li,
.crm-service-timeline li {
  color: #64748b;
  font-size: 12px;
}

.crm-service-kpis strong,
.crm-service-report-grid strong {
  color: #0f172a;
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin: 5px 0;
}

.crm-service-kpis small,
.crm-service-detail-card small,
.crm-service-table-card small,
.crm-service-report-grid small {
  color: #64748b;
  display: block;
  font-size: 12px;
}

.crm-service-filters {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(132px, 170px)) auto;
  margin-bottom: 16px;
}

.crm-service-filters select {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  color: #172026;
  min-height: 42px;
  padding: 0 10px;
}

.crm-service-layout,
.crm-service-lower-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.85fr);
  margin-top: 16px;
}

.crm-service-table-card {
  min-width: 0;
}

.crm-service-table-card tr.is-selected td {
  background: #f0f6ff;
}

.crm-link-button {
  background: transparent;
  border: 0;
  color: #172026;
  cursor: pointer;
  display: grid;
  gap: 3px;
  padding: 0;
  text-align: left;
}

.crm-link-button:hover {
  color: #1d4ed8;
}

.crm-service-chip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe3ed;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  white-space: nowrap;
}

.crm-service-chip.is-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.crm-service-chip.is-success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #15803d;
}

.crm-service-chip.is-warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.crm-service-chip.is-risk {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.crm-service-pagination {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 10px;
}

.crm-customer-commerce-panel {
  display: grid;
  gap: 10px;
}

.crm-commerce-order-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.crm-commerce-order-strip article {
  background: var(--crm-surface-raised);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px 12px;
}

.crm-commerce-order-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.crm-commerce-order-head strong {
  color: var(--crm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-commerce-order-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crm-commerce-order-main strong {
  color: var(--crm-text);
  font-size: 16px;
}

.crm-commerce-order-main span,
.crm-commerce-order-state,
.crm-commerce-order-meta {
  color: var(--crm-text-secondary);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.crm-service-detail-card {
  display: grid;
  gap: 12px;
}

.crm-service-detail-card > strong {
  color: #0f172a;
  font-size: 18px;
}

.crm-service-detail-card p {
  color: #475569;
  margin: 0;
}

.crm-service-detail-card dl {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.crm-service-detail-card dd {
  color: #0f172a;
  font-weight: 800;
  margin: 2px 0 0;
}

.crm-service-ai-card {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.crm-rag-card-header,
.crm-rag-trace-grid,
.crm-rag-citations article,
.crm-rag-gap-list article {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.crm-rag-query {
  max-width: none;
}

.crm-rag-trace-grid {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-rag-trace-grid article,
.crm-rag-citations article,
.crm-rag-gap-list article {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 9px;
}

.crm-rag-trace-grid article {
  display: grid;
  gap: 4px;
}

.crm-rag-trace-grid span,
.crm-rag-citations span,
.crm-rag-gap-list span,
.crm-rag-sop-list li {
  color: #64748b;
  font-size: 12px;
}

.crm-rag-trace-grid strong,
.crm-rag-citations strong,
.crm-rag-gap-list strong {
  color: #0f172a;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.crm-rag-sop-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.crm-rag-citations,
.crm-rag-gap-list {
  display: grid;
  gap: 8px;
}

.crm-rag-citations article,
.crm-rag-gap-list article {
  align-items: flex-start;
}

.crm-rag-citations article > div,
.crm-rag-gap-list article > div {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.crm-rag-citations p {
  color: #475569;
  grid-column: 1 / -1;
  margin: 0;
}

.crm-service-timeline,
.crm-service-boundary-card ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-service-timeline li,
.crm-service-boundary-card li {
  background: #f8fafc;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  padding: 9px 10px;
}

.crm-service-lower-grid > section:first-child {
  min-width: 0;
}

.crm-service-manager-card,
.crm-service-boundary-card {
  display: grid;
  gap: 12px;
}

@media (max-width: 1120px) {
  .crm-service-kpis,
  .crm-service-filters,
  .crm-service-layout,
  .crm-service-lower-grid,
  .crm-rag-trace-grid,
  .crm-service-report-grid {
    grid-template-columns: 1fr;
}
}

/* Integrated styles from redmine-14157-line-binding-entry */
.crm-line-binding-panel {
  border-color: rgba(45, 108, 223, 0.24);
  box-shadow: 0 16px 40px rgba(34, 92, 168, 0.06);
}
.crm-line-binding-panel h2 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.crm-line-binding-overview {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}
.crm-line-binding-overview article {
  align-items: center;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 14px;
}
.crm-line-binding-overview svg {
  color: #2d6cdf;
}
.crm-line-binding-overview span,
.crm-line-binding-card dt,
.crm-line-binding-card span,
.crm-line-binding-blueprint span,
.crm-line-binding-empty span {
  color: #68727d;
  font-size: 12px;
}
.crm-line-binding-overview strong {
  color: #172026;
  font-size: 20px;
}
.crm-line-binding-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  margin-bottom: 16px;
}
.crm-line-binding-form,
.crm-line-binding-blueprint {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
}
.crm-line-binding-blueprint ol {
  counter-reset: line-binding-step;
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.crm-line-binding-blueprint li {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 11px 12px 11px 42px;
  position: relative;
}
.crm-line-binding-blueprint li::before {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  content: counter(line-binding-step);
  counter-increment: line-binding-step;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  left: 10px;
  position: absolute;
  top: 11px;
  width: 24px;
}
.crm-line-binding-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.crm-line-binding-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  display: grid;
  gap: 10px;
  padding: 12px;
}
.crm-line-binding-card.is-healthy {
  border-color: rgba(34, 197, 94, 0.35);
}
.crm-line-binding-card.is-warning {
  border-color: rgba(245, 158, 11, 0.35);
}
.crm-line-binding-card.is-risk {
  border-color: rgba(239, 68, 68, 0.35);
}
.crm-line-binding-card header,
.crm-line-binding-card dl {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.crm-line-binding-card header div {
  display: grid;
  gap: 3px;
}
.crm-line-binding-card header em {
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  padding: 4px 8px;
}
.crm-line-binding-card.is-healthy header em {
  background: #ecfdf5;
  color: #047857;
}
.crm-line-binding-card.is-warning header em {
  background: #fffbeb;
  color: #b45309;
}
.crm-line-binding-card.is-risk header em {
  background: #fef2f2;
  color: #b91c1c;
}
.crm-line-binding-card dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}
.crm-line-binding-card dl div {
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px;
}
.crm-line-binding-card dd {
  color: #172026;
  font-size: 12px;
  font-weight: 800;
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-line-binding-warning {
  background: #fff7ed;
  border-radius: 10px;
  color: #c2410c;
  font-size: 12px;
  margin: 0;
  padding: 8px 10px;
}
.crm-line-binding-link {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  justify-self: start;
  padding: 6px 9px;
  text-decoration: none;
}
.crm-line-binding-empty {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 26px;
  text-align: center;
}
.crm-line-binding-empty svg {
  color: #2d6cdf;
}
@media (max-width: 1080px) {
  .crm-line-binding-overview,
  .crm-line-binding-grid,
  .crm-line-binding-card dl {
    grid-template-columns: 1fr;
  }
}

/* Integrated styles from redmine-14159-aio-checklist-ui */
.crm-aio-checklist-panel h2,
.crm-aio-checklist-panel h3 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.crm-aio-checklist-overview {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}
.crm-aio-checklist-overview article {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 12px;
}
.crm-aio-checklist-overview article svg {
  color: #2d6cdf;
  grid-row: span 2;
}
.crm-aio-checklist-overview span,
.crm-aio-checklist-card span,
.crm-aio-contract-box span,
.crm-aio-section-table p,
.crm-aio-reminder-copy p {
  color: #68727d;
  font-size: 12px;
}
.crm-aio-checklist-overview strong {
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-aio-checklist-notice {
  background: #fff8ed;
  border: 1px solid #ffe2b8;
  border-radius: 8px;
  color: #7a4a00;
  margin: 0 0 14px;
  padding: 10px 12px;
}
.crm-aio-checklist-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 340px;
}
.crm-aio-checklist-form,
.crm-aio-reminder-panel,
.crm-aio-contract-box {
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}
.crm-aio-section-table {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.crm-aio-section-table fieldset {
  border: 1px solid #edf0f5;
  border-radius: 8px;
  margin: 0;
  padding: 12px;
}
.crm-aio-section-table legend {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  padding: 0 6px;
}
.crm-aio-section-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr);
}
.crm-aio-section-fields input,
.crm-aio-section-fields select {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 10px;
}
.crm-aio-reminder-copy {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
  padding: 12px;
}
.crm-aio-reminder-copy p {
  margin: 0;
}
.crm-aio-contract-box {
  background: #0f172a;
  color: #fff;
  gap: 8px;
}
.crm-aio-contract-box code {
  background: rgb(255 255 255 / 10%);
  border-radius: 6px;
  color: #dbeafe;
  display: block;
  font-size: 12px;
  padding: 6px 8px;
}
.crm-aio-checklist-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 14px;
}
.crm-aio-checklist-card {
  border: 1px solid #e6eaf0;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}
.crm-aio-checklist-card.is-healthy {
  border-left-color: #16a34a;
}
.crm-aio-checklist-card.is-danger {
  border-left-color: #dc2626;
}
.crm-aio-checklist-card header,
.crm-aio-checklist-card dl {
  display: grid;
  gap: 8px;
}
.crm-aio-checklist-card header {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) auto;
}
.crm-aio-checklist-card header div,
.crm-aio-checklist-card dl div {
  display: grid;
  gap: 2px;
}
.crm-aio-checklist-card em {
  background: #eef4ff;
  border-radius: 999px;
  color: #2d6cdf;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 5px 9px;
}
.crm-aio-checklist-card dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.crm-aio-checklist-card dt {
  color: #68727d;
  font-size: 11px;
}
.crm-aio-checklist-card dd {
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-aio-checklist-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.crm-aio-checklist-chip {
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}
.crm-success-message {
  background: #eaf7ee;
  border: 1px solid #b8e3c5;
  border-radius: 8px;
  color: #1c7c39;
  font-size: 13px;
  margin: 10px 0 0;
  padding: 10px;
}
@media (max-width: 980px) {
  .crm-aio-checklist-grid,
  .crm-aio-checklist-overview {
    grid-template-columns: 1fr;
  }
  .crm-aio-section-fields {
    grid-template-columns: 1fr;
  }
}

/* Integrated styles from redmine-14160-conversation-evidence-ui */
.crm-aio-extraction-panel h2,
.crm-aio-extraction-panel h3 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.crm-aio-extraction-overview {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}
.crm-aio-extraction-overview article {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  padding: 12px;
}
.crm-aio-extraction-overview article svg {
  color: #2563eb;
}
.crm-aio-extraction-overview span,
.crm-aio-extraction-card span,
.crm-aio-extraction-contract span,
.crm-aio-extraction-card small {
  color: #68727d;
  font-size: 12px;
}
.crm-aio-extraction-overview strong {
  font-size: 22px;
}
.crm-aio-extraction-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  margin-bottom: 14px;
}
.crm-aio-extraction-form,
.crm-aio-extraction-contract,
.crm-aio-extraction-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}
.crm-aio-extraction-contract {
  align-content: start;
  display: grid;
  gap: 10px;
}
.crm-aio-extraction-contract code {
  background: #eef4ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1d4ed8;
  display: block;
  font-size: 12px;
  padding: 8px 10px;
}
.crm-aio-extraction-notice {
  background: #fff8ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 13px;
  margin: 0 0 12px;
  padding: 10px 12px;
}
.crm-aio-extraction-card {
  display: grid;
  gap: 12px;
}
.crm-aio-extraction-card header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.crm-aio-extraction-card header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.crm-aio-status-chip,
.crm-aio-evidence-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}
.crm-aio-status-chip.is-healthy {
  background: #dcfce7;
  color: #166534;
}
.crm-aio-status-chip.is-warning {
  background: #fef3c7;
  color: #92400e;
}
.crm-aio-status-chip.is-danger {
  background: #fee2e2;
  color: #991b1b;
}
.crm-aio-field-table td:first-child {
  min-width: 170px;
}
.crm-aio-field-table td:first-child strong,
.crm-aio-field-table td:first-child small,
.crm-aio-evidence-stack,
.crm-aio-next-actions {
  display: grid;
  gap: 4px;
}
.crm-aio-evidence-pill {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-aio-next-actions {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}
@media (max-width: 980px) {
  .crm-aio-extraction-grid,
  .crm-aio-extraction-overview {
    grid-template-columns: 1fr;
  }
}

/* Integrated styles from redmine-14163-faq-knowledge-ui */
.crm-aio-knowledge-panel {
  border-color: rgba(37, 99, 235, 0.24);
}
.crm-aio-kpi-grid,
.crm-aio-knowledge-grid,
.crm-aio-draft-form {
  display: grid;
  gap: 12px;
}
.crm-aio-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}
.crm-aio-kpi-grid article {
  align-items: center;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 12px;
}
.crm-aio-kpi-grid article svg {
  color: #2563eb;
  grid-row: span 2;
}
.crm-aio-kpi-grid strong {
  color: #0f172a;
  font-size: 18px;
}
.crm-aio-kpi-grid span,
.crm-aio-release-card small,
.crm-aio-entry-table small,
.crm-aio-attachments {
  color: #64748b;
  font-size: 12px;
}
.crm-aio-knowledge-grid {
  grid-template-columns: minmax(260px, 0.35fr) minmax(0, 0.65fr);
}
.crm-aio-release-list,
.crm-aio-release-detail,
.crm-aio-draft-form {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  padding: 12px;
}
.crm-aio-release-list {
  display: grid;
  gap: 8px;
}
.crm-aio-release-card {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  color: #172026;
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 11px;
  text-align: left;
}
.crm-aio-release-card.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.crm-aio-release-card > span,
.crm-aio-status,
.crm-aio-gate {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  width: fit-content;
}
.crm-aio-release-card > span,
.crm-aio-status {
  background: #eff6ff;
  color: #1d4ed8;
}
.crm-aio-status.is-published,
.crm-aio-release-card.is-published > span {
  background: #ecfdf5;
  color: #047857;
}
.crm-aio-status.is-failed,
.crm-aio-release-card.is-failed > span {
  background: #fef2f2;
  color: #b91c1c;
}
.crm-aio-gates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.crm-aio-gate.is-passed {
  background: #ecfdf5;
  color: #047857;
}
.crm-aio-gate.is-blocked {
  background: #fef2f2;
  color: #b91c1c;
}
.crm-aio-gate.is-warning {
  background: #fffbeb;
  color: #b45309;
}
.crm-aio-entry-table {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  overflow: hidden;
}
.crm-aio-entry-table [role="row"] {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1.5fr) minmax(140px, 0.9fr) 70px 110px;
  padding: 10px 12px;
}
.crm-aio-entry-table [role="row"]:first-child {
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}
.crm-aio-entry-table [role="row"]:not(:first-child) {
  background: #fff;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}
.crm-aio-entry-table [role="row"] span:first-child {
  display: grid;
  gap: 4px;
}
.crm-aio-attachments {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.crm-aio-draft-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}
.crm-aio-draft-form .crm-field-wide,
.crm-aio-draft-form .crm-form-actions {
  grid-column: 1 / -1;
}
.crm-aio-action-message {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  font-size: 13px;
  margin: 12px 0 0;
  padding: 10px 12px;
}
.crm-aio-action-message.is-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
@media (max-width: 900px) {
  .crm-aio-kpi-grid,
  .crm-aio-knowledge-grid,
  .crm-aio-draft-form,
  .crm-aio-entry-table [role="row"] {
    grid-template-columns: 1fr;
  }
}

/* Integrated styles from redmine-14167-post-launch-feedback */
.crm-aio-m11-panel {
  border-color: rgba(37, 99, 235, 0.22);
}
.crm-aio-m11-warning {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #9a3412;
  display: flex;
  font-size: 13px;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
}
.crm-aio-m11-summary-strip {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 9px 10px;
}
.crm-aio-m11-summary-strip span {
  align-items: center;
  background: #f8fafc;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
}
.crm-aio-m11-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
.crm-aio-m11-main,
.crm-aio-m11-detail,
.crm-aio-m11-create,
.crm-aio-m11-related-list article {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}
.crm-aio-m11-filterbar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(210px, 1.2fr) repeat(3, minmax(140px, 0.8fr)) auto;
  margin-bottom: 12px;
}
.crm-aio-m11-filterbar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.crm-aio-m11-filterbar label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.crm-aio-m11-filterbar input,
.crm-aio-m11-filterbar select {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}
.crm-aio-m11-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 10px;
}
.crm-aio-m11-active-filters span {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}
.crm-aio-m11-table tbody tr {
  cursor: pointer;
}
.crm-aio-m11-table table {
  min-width: 1040px;
}
.crm-aio-m11-table tbody tr.is-selected td {
  background: #eff6ff;
}
.crm-aio-m11-table td strong,
.crm-aio-m11-table td small {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crm-aio-m11-table td small {
  color: #64748b;
  margin-top: 3px;
}
.crm-aio-m11-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  margin: 0;
  padding: 18px;
  text-align: center;
}
.crm-aio-m11-chip {
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}
.crm-aio-m11-chip.is-blocked {
  background: #fef2f2;
  color: #b91c1c;
}
.crm-aio-m11-chip.is-resolved,
.crm-aio-m11-chip.is-linked_to_crm {
  background: #dcfce7;
  color: #15803d;
}
.crm-aio-m11-chip.is-waiting_customer {
  background: #fff7ed;
  color: #c2410c;
}
.crm-aio-m11-detail {
  display: grid;
  gap: 12px;
}
.crm-aio-m11-detail h3 {
  margin: 8px 0 6px;
}
.crm-aio-m11-detail p,
.crm-aio-m11-detail ul {
  margin: 0;
}
.crm-aio-m11-detail dl {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}
.crm-aio-m11-detail dl div {
  background: #fff;
  border-radius: 10px;
  padding: 9px;
}
.crm-aio-m11-detail dt,
.crm-aio-m11-detail small,
.crm-aio-m11-related-list small {
  color: #64748b;
  font-size: 12px;
}
.crm-aio-m11-detail dd {
  font-size: 13px;
  font-weight: 800;
  margin: 3px 0 0;
}
.crm-aio-m11-evidence {
  background: #fff;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
}
.crm-aio-m11-evidence span {
  color: #475569;
  font-size: 12px;
}
.crm-aio-m11-related-list,
.crm-aio-m11-related-list div {
  display: grid;
  gap: 8px;
}
.crm-aio-m11-related-list h3 {
  margin: 0;
}
.crm-aio-m11-related-list article {
  background: #fff;
  padding: 10px;
}
.crm-aio-m11-related-list p {
  color: #475569;
  font-size: 12px;
  margin: 4px 0 0;
}
.crm-aio-m11-create {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}
.crm-aio-m11-create h3,
.crm-aio-m11-create .crm-field-wide,
.crm-aio-m11-create .crm-form-actions {
  grid-column: 1 / -1;
}
.crm-aio-m11-create h3 {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0;
}
.crm-aio-m11-pagination {
  margin-top: 10px;
}
@media (max-width: 980px) {
  .crm-aio-m11-grid,
  .crm-aio-m11-detail dl,
  .crm-aio-m11-create,
  .crm-aio-m11-filterbar {
    grid-template-columns: 1fr;
  }
}

/* Integrated styles from redmine-14169-aio-privacy-audit */
.crm-aio-privacy-panel {
  border-color: #cbdff5;
  box-shadow: 0 16px 40px rgba(13, 65, 119, 0.08);
}
.crm-aio-privacy-panel h2,
.crm-aio-privacy-panel h3 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.crm-aio-privacy-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.crm-aio-privacy-state {
  align-items: center;
  background: #eef7ff;
  border: 1px solid #cbdff5;
  border-radius: 10px;
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
}
.crm-aio-privacy-state.is-healthy {
  background: #ecfdf3;
  border-color: #b7e4c7;
}
.crm-aio-privacy-state.is-warning {
  background: #fff8eb;
  border-color: #ffd391;
}
.crm-aio-privacy-state.is-danger {
  background: #fff3f3;
  border-color: #ffd0d0;
}
.crm-aio-privacy-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  margin-bottom: 14px;
}
.crm-aio-privacy-rollup {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 14px;
}
.crm-aio-privacy-rollup article {
  background: #f7fbff;
  border: 1px solid #d8e6f7;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
}
.crm-aio-privacy-rollup strong {
  color: #172026;
  font-size: 26px;
}
.crm-aio-privacy-rollup span {
  font-weight: 800;
}
.crm-aio-privacy-rollup small {
  color: #68727d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-aio-privacy-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  margin-top: 16px;
}
.crm-aio-privacy-grid.is-balanced {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.crm-aio-privacy-grid > section,
.crm-aio-privacy-table-section,
.crm-aio-privacy-next-actions {
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  padding: 14px;
}
.crm-aio-privacy-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.crm-aio-privacy-card {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  display: grid;
  gap: 7px;
  padding: 12px;
}
.crm-aio-privacy-card > div,
.crm-aio-privacy-events article,
.crm-aio-privacy-next-actions {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.crm-aio-privacy-card p,
.crm-aio-privacy-card small,
.crm-aio-privacy-events span,
.crm-aio-privacy-events small,
.crm-aio-privacy-contracts span,
.crm-aio-privacy-contracts small {
  color: #68727d;
  font-size: 12px;
  margin: 0;
}
.crm-aio-privacy-card strong,
.crm-aio-privacy-events strong,
.crm-aio-privacy-next-actions strong,
.crm-aio-privacy-contracts strong {
  color: #172026;
}
.crm-aio-privacy-card code,
.crm-aio-privacy-contracts code,
.crm-aio-privacy-delete-table code {
  color: #2d6cdf;
  font-size: 12px;
  white-space: normal;
}
.crm-aio-privacy-chip {
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  color: #2d6cdf;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}
.crm-aio-privacy-chip.is-healthy {
  background: #ecfdf3;
  border-color: #b7e4c7;
  color: #14824b !important;
}
.crm-aio-privacy-chip.is-warning {
  background: #fff8eb;
  border-color: #ffd391;
  color: #a15c00 !important;
}
.crm-aio-privacy-chip.is-danger {
  background: #fff3f3;
  border-color: #ffd0d0;
  color: #b42318 !important;
}
.crm-aio-privacy-permission-table td:first-child,
.crm-aio-privacy-delete-table td:first-child {
  min-width: 210px;
  white-space: normal;
}
.crm-aio-privacy-permission-table small,
.crm-aio-privacy-delete-table small {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 3px;
}
.crm-aio-privacy-events {
  display: grid;
  gap: 10px;
}
.crm-aio-privacy-events article {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  justify-content: flex-start;
  padding: 10px;
}
.crm-aio-privacy-events article > div {
  display: grid;
  flex: 1;
  gap: 3px;
}
.crm-aio-privacy-table-section {
  margin-top: 16px;
}
.crm-aio-privacy-contracts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.crm-aio-privacy-contracts > div {
  display: grid;
  gap: 10px;
}
.crm-aio-privacy-contracts article {
  background: #f8fafc;
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px;
}
.crm-aio-privacy-next-actions {
  justify-content: flex-start;
  margin-top: 16px;
}
.crm-aio-privacy-next-actions > div {
  display: grid;
  gap: 5px;
}
.crm-aio-privacy-next-actions span {
  color: #68727d;
  font-size: 13px;
}
.crm-aio-privacy-retention-table td:first-child,
.crm-aio-privacy-retention-table td:last-child {
  min-width: 180px;
  white-space: normal;
}
.crm-aio-privacy-retention-table small {
  color: #68727d;
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

/* Integrated styles from redmine-14172-aio-billing-renewal */
.crm-aio-billing {
  border-color: rgba(37, 99, 235, 0.22);
}
.crm-aio-billing .crm-section-title h2 {
  align-items: center;
  display: flex;
  gap: 8px;
}
.crm-aio-billing-notice,
.crm-aio-action-result {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1d4ed8;
  display: grid;
  font-size: 13px;
  gap: 4px;
  margin: 0 0 14px;
  padding: 10px 12px;
}
.crm-aio-billing-notice small {
  color: #64748b;
  overflow-wrap: anywhere;
}

.crm-customer-contract-panel {
  border-color: rgba(37, 99, 235, 0.18);
  margin-bottom: 16px;
}

.crm-contract-fallback {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  color: #1e3a8a;
  display: grid;
  font-size: 13px;
  gap: 4px;
  margin: 0 0 12px;
  padding: 10px 12px;
}

.crm-contract-fallback small {
  color: #64748b;
  overflow-wrap: anywhere;
}

.crm-contract-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.crm-contract-summary-grid article {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.crm-contract-summary-grid article.is-healthy {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.crm-contract-summary-grid article.is-warning {
  background: #fffbeb;
  border-color: #fde68a;
}

.crm-contract-summary-grid article.is-risk {
  background: #fef2f2;
  border-color: #fecaca;
}

.crm-contract-summary-grid article.is-muted {
  background: #f1f5f9;
}

.crm-contract-summary-grid span,
.crm-contract-summary-grid small,
.crm-contract-table small {
  color: #64748b;
  font-size: 12px;
}

.crm-contract-summary-grid strong {
  color: #0f172a;
  font-size: 18px;
}

.crm-contract-warning {
  align-items: flex-start;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 14px;
  color: #92400e;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
}

.crm-contract-warning > div {
  display: grid;
  gap: 4px;
}

.crm-contract-warning span {
  display: block;
  font-size: 13px;
}

.crm-contract-table {
  margin-bottom: 12px;
}

.crm-contract-table td strong,
.crm-contract-table td small {
  display: block;
}

.crm-aio-billing-summary,
.crm-aio-plan-grid,
.crm-aio-billing-columns,
.crm-aio-payment-grid {
  display: grid;
  gap: 12px;
}
.crm-aio-billing-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}
.crm-aio-billing-summary article {
  align-items: center;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  display: grid;
  gap: 6px;
  padding: 12px;
}
.crm-aio-billing-summary svg {
  color: #2563eb;
}
.crm-aio-billing-summary span,
.crm-aio-plan-card small,
.crm-aio-price-list span,
.crm-aio-payment-grid small,
.crm-aio-payment-grid em,
.crm-aio-billing-table small {
  color: #64748b;
  font-size: 12px;
}
.crm-aio-billing-summary strong {
  color: #0f172a;
  font-size: 20px;
}
.crm-aio-plan-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 12px;
}
.crm-aio-plan-card,
.crm-aio-payment-grid article {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 10px;
  padding: 12px;
}
.crm-aio-plan-card header,
.crm-aio-plan-card dl {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.crm-aio-plan-card header span {
  color: #64748b;
  display: block;
  font-size: 12px;
  margin-top: 3px;
}
.crm-aio-plan-card header em {
  background: #ecfdf5;
  border-radius: 999px;
  color: #047857;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  padding: 4px 8px;
  text-transform: uppercase;
}
.crm-aio-plan-card dl {
  margin: 0;
}
.crm-aio-plan-card dt,
.crm-aio-plan-card dd {
  margin: 0;
}
.crm-aio-plan-card dt {
  color: #64748b;
  font-size: 11px;
}
.crm-aio-plan-card dd {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}
.crm-aio-price-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.crm-aio-price-list span,
.crm-aio-release-gates span {
  background: #f8fafc;
  border-radius: 999px;
  padding: 5px 8px;
}
.crm-aio-billing-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}
.crm-aio-billing-columns h3,
.crm-aio-opportunities h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.crm-aio-billing-table td strong,
.crm-aio-billing-table td small {
  display: block;
}
.crm-aio-billing-table .is-warning {
  color: #b45309;
  font-weight: 800;
}
.crm-aio-billing-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}
.crm-aio-billing-chip.is-healthy {
  background: #ecfdf5;
  color: #047857;
}
.crm-aio-billing-chip.is-warning,
.crm-aio-billing-chip.is-neutral {
  background: #fffbeb;
  color: #b45309;
}
.crm-aio-billing-chip.is-risk {
  background: #fef2f2;
  color: #b91c1c;
}
.crm-aio-billing-chip.is-muted {
  background: #f1f5f9;
  color: #64748b;
}
.crm-mini-button {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  color: #172026;
  cursor: pointer;
  font-size: 12px;
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}
.crm-mini-button:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.crm-mini-button.is-danger {
  border-color: #fecaca;
  color: #b91c1c;
}
.crm-aio-opportunities,
.crm-aio-payment-grid {
  margin-bottom: 12px;
}
.crm-aio-payment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.crm-aio-payment-grid article {
  box-shadow: none;
}
.crm-aio-payment-grid em {
  font-style: normal;
}
.crm-aio-release-gates {
  align-items: center;
  background: #f8fafc;
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}
.crm-aio-release-gates strong {
  color: #0f172a;
}
.crm-aio-action-result {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #047857;
  margin: 12px 0 0;
}
@media (max-width: 980px) {
  .crm-aio-billing-summary,
  .crm-contract-summary-grid,
  .crm-aio-billing-columns,
  .crm-aio-payment-grid {
    grid-template-columns: 1fr;
  }
}

/* CRM-M30 / CRM-M31 service center action buttons */
.crm-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}


.crm-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-inline-actions .crm-ghost-button {
  font-size: 11px;
  min-height: 28px;
  padding: 0 7px;
}

/* CRM-M34 service dashboard / reports */
.crm-service-dashboard-panel {
  display: grid;
  gap: 18px;
}

.crm-service-dashboard-panel h2 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-service-dashboard-filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.crm-service-dashboard-search {
  grid-column: span 2;
}

.crm-service-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.crm-service-dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(260px, 0.75fr);
}

.crm-service-rank-list {
  display: grid;
  gap: 10px;
}

.crm-service-rank-list article {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px 1fr auto;
  padding: 10px 12px;
}

.crm-service-rank-list strong {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.crm-service-rank-list span {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
}

.crm-service-rank-list b {
  color: #0f172a;
  font-size: 1.05rem;
}

.crm-service-pagination label {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-service-pagination select {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 6px 8px;
}

/* CRM-M35 service admin settings */
.crm-service-admin-panel {
  display: grid;
  gap: 18px;
}

.crm-service-admin-panel h2 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-service-admin-kpis {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.crm-service-admin-filters {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(130px, 170px)) auto;
}

.crm-service-admin-filters select {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  color: #172026;
  min-height: 42px;
  padding: 0 10px;
}

.crm-service-admin-search {
  min-width: 0;
}

.crm-service-admin-message {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  padding: 10px 12px;
}

.crm-service-admin-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
}

.crm-service-admin-table table {
  min-width: 900px;
}

.crm-service-admin-table td {
  vertical-align: top;
}

.crm-service-admin-table td strong,
.crm-service-admin-table td small {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-service-admin-table td small {
  color: #64748b;
  margin-top: 4px;
  white-space: nowrap;
}

.crm-service-admin-form-card {
  align-self: start;
}

.crm-service-admin-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-service-admin-wide-field,
.crm-service-admin-toggle,
.crm-service-admin-form-actions {
  grid-column: 1 / -1;
}

.crm-service-admin-toggle {
  align-items: center;
  color: #172026;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

.crm-service-admin-toggle input {
  height: 16px;
  width: 16px;
}

.crm-service-admin-boundaries {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-service-admin-boundaries article {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #475569;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.crm-service-admin-boundaries svg {
  color: #2563eb;
}

.crm-service-admin-boundaries strong {
  color: #0f172a;
}

.crm-service-admin-boundaries span {
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .crm-service-dashboard-filters,
  .crm-service-dashboard-kpis,
  .crm-service-dashboard-grid,
  .crm-service-admin-filters,
  .crm-service-admin-kpis,
  .crm-service-admin-grid,
  .crm-service-admin-boundaries {
    grid-template-columns: 1fr 1fr;
  }

  .crm-service-dashboard-search {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .crm-service-dashboard-filters,
  .crm-service-dashboard-kpis,
  .crm-service-dashboard-grid,
  .crm-service-admin-filters,
  .crm-service-admin-kpis,
  .crm-service-admin-grid,
  .crm-service-admin-boundaries,
  .crm-service-admin-form {
    grid-template-columns: 1fr;
  }

  .crm-service-dashboard-search {
    grid-column: span 1;
  }
}

/* Generic service template */
.crm-service-template-panel {
  display: grid;
  gap: 18px;
}

.crm-service-template-panel h2,
.crm-service-template-lower-grid h3 {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.crm-service-template-kpis article {
  border-left: 5px solid #2563eb;
}

.crm-service-template-filters {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px, 1fr) minmax(136px, 168px) auto auto;
}

.crm-service-template-filters select {
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  color: #172026;
  min-height: 42px;
  padding: 0 10px;
}

.crm-service-template-search {
  min-width: 0;
}

.crm-service-template-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
}

.crm-service-template-table table {
  min-width: 900px;
}

.crm-service-template-table td {
  vertical-align: top;
}

.crm-service-template-table td span,
.crm-service-template-table td small {
  display: block;
  max-width: 320px;
}

.crm-service-template-table tr.is-selected td {
  background: #eef6ff;
}

.crm-service-template-detail-card dd {
  overflow-wrap: anywhere;
}

.crm-service-template-flow-list {
  display: grid;
  gap: 10px;
}

.crm-service-template-flow-list article {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 12px;
}

.crm-service-template-flow-list article > span {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.crm-service-template-flow-list strong,
.crm-service-template-boundary-note span {
  color: #0f172a;
}

.crm-service-template-flow-list small {
  color: #64748b;
  display: block;
  margin-top: 4px;
}

.crm-service-template-report-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-service-template-boundary-note {
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  display: flex;
  gap: 8px;
  padding: 12px;
}

.crm-service-template-boundary-note svg {
  color: #c2410c;
  flex: 0 0 auto;
}

@media (max-width: 1120px) {
  .crm-service-template-filters,
  .crm-service-template-grid {
    grid-template-columns: 1fr;
  }
}

/* CRM MVP visual alignment with Amaze Retail's light admin workspace. */
.crm-main :is(
  .crm-write-panel,
  .crm-list,
  .crm-detail,
  .crm-preview-table,
  .crm-ledger-table,
  .crm-rollout-table-wrap,
  .crm-rollout-sidepanel,
  .crm-dashboard-trend,
  .crm-dashboard-breakdowns,
  .crm-dashboard-summary > div,
  .crm-dashboard-summary article,
  .crm-dashboard-kpi-grid > section,
  .crm-performance-notes,
  .crm-aio-kpi-grid > section,
  .crm-aio-kpi-table-section,
  .crm-aio-kpi-next-actions,
  .crm-risk-list,
  .crm-pipeline-renewal-list,
  .crm-industry-card,
  .crm-aio-billing-table,
  .crm-aio-release-gates,
  .crm-product-table-wrap,
  .crm-m26-grid > section,
  .crm-service-table-card,
  .crm-service-detail-card,
  .crm-service-manager-card,
  .crm-service-boundary-card,
  article[class*="-card"],
  section[class*="-card"],
  div[class*="-card"]
) {
  border-color: var(--crm-border);
  border-radius: var(--crm-radius);
  box-shadow: none;
}

.crm-main :is(
  .crm-write-panel,
  .crm-list,
  .crm-detail,
  .crm-dashboard-card,
  .crm-aio-kpi-card,
  .crm-industry-hero,
  .crm-project-card,
  .crm-aio-plan-card,
  .crm-product-subscription-card,
  .crm-service-ai-card,
  .crm-service-dashboard-card,
  .crm-service-admin-form-card,
  article[class*="-card"],
  section[class*="-card"],
  div[class*="-card"]
) {
  background: var(--crm-surface);
}

.crm-main :is(
  .crm-import-counters div,
  .crm-loyalty-metrics div,
  .crm-dashboard-card,
  .crm-aio-kpi-rollup article,
  .crm-aio-kpi-contracts article,
  .crm-pipeline-command-strip article,
  .crm-pipeline-stage-bar article,
  .crm-task-create,
  .crm-teleagent-form,
  .crm-task-board,
  .crm-consent-cards article,
  .crm-kpi-slot-list article,
  .crm-service-admin-boundaries article
) {
  background: var(--crm-surface-raised);
  border-color: var(--crm-border);
}

.crm-main :is(.crm-dashboard-card, .crm-aio-kpi-card, .crm-industry-hero) {
  background-image: none;
}

.crm-main :is(
  .crm-trend-bars i,
  .crm-pipeline-stage-bar i,
  .crm-project-progress i,
  .crm-product-progress i,
  .crm-service-progress i
) {
  background: var(--crm-primary);
}

.crm-main :is(.crm-preview-table th, .crm-ledger-table th) {
  background: var(--crm-surface-raised);
  color: var(--crm-text-muted);
}

.crm-main :is(.crm-preview-table td, .crm-ledger-table td) {
  border-bottom-color: #eef2f7;
}

.crm-main :is(.crm-preview-table tbody tr:hover td, .crm-ledger-table tbody tr:hover td) {
  background: #f8fbff;
}

.crm-main :is(
  .crm-status-pill,
  .crm-service-chip,
  .crm-aio-kpi-chip,
  .crm-aio-billing-chip,
  .crm-chip-button,
  .crm-tier-chip,
  .crm-tag-cloud span,
  .crm-row-tags em,
  .crm-match-score
) {
  border-radius: 999px;
  font-weight: 800;
}

.crm-main :is(.crm-section-title h2, .crm-section-title h3, .crm-detail h2, .crm-detail h3) {
  color: var(--crm-text);
  font-size: 18px;
  line-height: 1.25;
}

.crm-main :is(.crm-section-title span, .crm-muted, small) {
  color: var(--crm-text-muted);
}

.crm-icon-button:hover {
  background: var(--crm-primary-hover);
  border-color: var(--crm-primary-hover);
}

.crm-icon-button:focus-visible,
.crm-secondary-button:focus-visible,
.crm-ghost-button:focus-visible,
.crm-sidebar-item:focus-visible,
.crm-sidebar-action:focus-visible {
  outline: 3px solid rgb(14 165 233 / 26%);
  outline-offset: 2px;
}

.crm-outbound-table table {
  table-layout: fixed;
}

.crm-outbound-table th:first-child,
.crm-outbound-table td:first-child {
  width: 19%;
  white-space: normal;
}

.crm-outbound-table th:nth-child(2),
.crm-outbound-table td:nth-child(2) {
  width: 17%;
  white-space: normal;
}

.crm-outbound-table th:nth-child(3),
.crm-outbound-table td:nth-child(3),
.crm-outbound-table th:nth-child(4),
.crm-outbound-table td:nth-child(4) {
  width: 6%;
}

.crm-outbound-table th:nth-child(5),
.crm-outbound-table td:nth-child(5) {
  width: 10%;
}

.crm-outbound-table th:nth-child(8),
.crm-outbound-table td:nth-child(8) {
  width: 11%;
}

.crm-outbound-table th:nth-child(6),
.crm-outbound-table td:nth-child(6) {
  width: 7%;
}

.crm-outbound-table th:nth-child(7),
.crm-outbound-table td:nth-child(7) {
  width: 8%;
}

.crm-outbound-table th:nth-child(9),
.crm-outbound-table td:nth-child(9) {
  width: 16%;
}

.crm-template-library-panel {
  display: grid;
  gap: 16px;
}

.crm-template-filter-bar {
  align-items: end;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) 180px 160px auto;
  padding: 12px;
}

.crm-template-search-input {
  align-items: center;
  background: #fff;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  display: flex;
  gap: 8px;
  padding: 0 10px;
}

.crm-template-search-input input {
  border: 0;
  box-shadow: none !important;
  padding-left: 0;
}

.crm-template-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crm-template-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(560px, 1.15fr) minmax(420px, 0.85fr);
}

.crm-template-list-card,
.crm-template-preview-card,
.crm-template-create-card {
  background: #fff;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  padding: 14px;
}

.crm-template-table-wrap {
  overflow-x: auto;
}

.crm-template-table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.crm-template-table th,
.crm-template-table td {
  border-bottom: 1px solid var(--crm-border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.crm-template-table th {
  background: #f8fafc;
  color: var(--crm-text-secondary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-template-table td:first-child strong,
.crm-template-table td:first-child small {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-template-table td:first-child small,
.crm-template-selected-summary span,
.crm-template-body-preview small {
  color: var(--crm-text-muted);
  font-size: 12px;
}

.crm-template-table tr.is-selected td {
  background: #eff6ff;
}

.crm-template-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
}

.crm-template-status.is-active {
  background: #ecfdf5;
  color: #047857;
}

.crm-template-status.is-archived {
  background: #f1f5f9;
  color: #64748b;
}

.crm-template-selected-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.crm-template-selected-summary > div,
.crm-template-body-preview,
.crm-template-apply-grid article {
  background: #f8fafc;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.crm-template-selected-summary strong {
  color: var(--crm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-template-body-preview pre,
.crm-template-apply-grid pre {
  color: #172026;
  font-size: 12px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.crm-template-variable-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.crm-template-apply-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.crm-template-apply-grid article.is-matched {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgb(134 239 172 / 18%);
}

.crm-template-apply-grid h4 {
  margin: 0;
}

.crm-template-consistency {
  align-items: center;
  color: #047857;
  display: flex;
  font-weight: 800;
  gap: 6px;
  margin: 0;
}

@media (max-width: 1180px) {
  .crm-template-filter-bar,
  .crm-template-layout,
  .crm-template-apply-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .crm-template-selected-summary,
  .crm-template-variable-grid {
    grid-template-columns: 1fr;
  }
}

.crm-integration-log-panel {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.crm-integration-log-panel > .crm-section-title {
  align-items: flex-start;
}

.crm-integration-log-counters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-integration-log-filter-bar {
  grid-template-columns: 140px 140px minmax(190px, 1.15fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto auto;
}

.crm-integration-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-integration-log-grid {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.38fr);
}

.crm-integration-log-table table {
  min-width: 1080px;
}

.crm-integration-log-table td:nth-child(5) {
  max-width: 260px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.crm-integration-log-table tr.is-selected td {
  background: #eff6ff;
}

.crm-integration-log-detail details {
  display: grid;
  gap: 6px;
}

.crm-integration-log-detail summary {
  cursor: pointer;
  font-weight: 800;
}

.crm-integration-log-detail pre {
  background: #0f172a;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.crm-integration-log-pagination {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
}

.crm-integration-log-pagination .crm-field {
  min-width: 120px;
}

.crm-integration-channel-breakdown {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 12px;
}

@media (max-width: 1180px) {
  .crm-integration-log-filter-bar,
  .crm-integration-log-grid,
  .crm-integration-log-counters {
    grid-template-columns: 1fr;
  }
}
