.content:has(> .crm-leads-section) {
  align-content: start;
}

.crm-leads-section,
.crm-lead-list,
.crm-lead-lines {
  display: grid;
  gap: 8px;
}

.crm-leads-head,
.crm-lead-card {
  min-width: 0;
}

.crm-leads-head {
  gap: 10px;
  padding: 15px 17px;
  align-content: start;
}

.crm-leads-topbar {
  display: grid;
  grid-template-columns: auto minmax(480px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

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

.crm-lead-new-button {
  min-height: 36px;
  padding: 7px 15px;
  font-size: 12px;
  white-space: nowrap;
}

.crm-lead-scope-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--surface-soft);
}

.crm-lead-scope-tabs .mode-chip {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.crm-lead-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 0.32fr);
  align-items: end;
  gap: 8px;
  margin: 0;
}

.crm-lead-search,
.crm-lead-manager-filter {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.crm-lead-search > span,
.crm-lead-manager-filter > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-lead-toolbar input,
.crm-lead-toolbar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--stroke);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
}

.crm-lead-toolbar input {
  padding: 0 13px;
}

.crm-lead-toolbar select {
  padding: 0 36px 0 13px;
}

.crm-lead-card {
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 17px;
  background: var(--surface-card);
}

.crm-lead-card[open] {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--stroke));
  background: var(--surface-card-strong);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 12%, transparent);
}

.crm-lead-card[open] > .crm-lead-summary {
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 36%),
    linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 5%, transparent), transparent 58%);
}

.crm-lead-card[open] .crm-lead-number {
  color: color-mix(in srgb, var(--accent) 70%, var(--text));
}

.crm-lead-card.is-inactive {
  opacity: 0.84;
}

.crm-lead-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 13px;
  cursor: pointer;
  list-style: none;
}

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

.crm-lead-summary::after {
  content: "⌄";
  width: 18px;
  color: var(--muted);
  font-size: 18px;
  text-align: center;
  transition: transform 150ms ease;
}

.crm-lead-card[open] > .crm-lead-summary::after {
  transform: rotate(180deg);
}

.crm-lead-summary-main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.crm-lead-identity,
.crm-lead-summary-meta,
.crm-lead-summary-subline,
.crm-lead-actions {
  display: flex;
  align-items: center;
  gap: 8px 11px;
  min-width: 0;
}

.crm-lead-identity strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-lead-number {
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.crm-lead-summary-subline,
.crm-lead-summary-meta {
  color: var(--muted);
  font-size: 13px;
}

.crm-lead-summary-subline > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-lead-summary-subline > span + span::before {
  content: "·";
  margin-right: 11px;
  color: var(--muted);
}

.crm-lead-summary-meta {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 5px;
}

.crm-lead-owner,
.crm-lead-task-count,
.crm-lead-current-step,
.crm-lead-next-contact {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.crm-lead-current-step {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-soft));
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
}

.crm-lead-summary-step {
  max-width: 230px;
  min-height: 27px;
  padding: 4px 28px 4px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--stroke));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface-soft));
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.crm-lead-summary-step:hover,
.crm-lead-summary-step:focus {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--stroke));
  outline: none;
}

.crm-lead-summary-step:disabled {
  cursor: wait;
  opacity: 0.62;
}

.crm-lead-next-contact {
  background: color-mix(in srgb, var(--accent-2) 12%, var(--surface-soft));
  color: color-mix(in srgb, var(--accent-2) 68%, var(--text));
}

.crm-lead-next-contact.needs-attention {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}

.crm-lead-summary-meta > .chip {
  min-height: 27px;
  padding: 5px 9px;
  font-size: 12px;
}

.crm-lead-workflow-state.is-active {
  background: var(--status-ok-bg);
  color: var(--status-ok-text);
}

.crm-lead-workflow-state.is-paused {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}

.crm-lead-workflow-state.is-converted {
  background: color-mix(in srgb, var(--accent-2) 16%, var(--surface-soft));
  color: color-mix(in srgb, var(--accent-2) 70%, var(--text));
}

.crm-lead-workflow-state.is-rejected {
  background: var(--status-stop-bg);
  color: var(--status-stop-text);
}

.crm-lead-task-count {
  color: var(--text);
}

.crm-lead-body {
  display: grid;
  gap: 9px;
  padding: 4px 14px 14px;
}

.crm-lead-workflow-panel {
  display: grid;
  grid-template-columns:
    minmax(130px, 0.62fr)
    minmax(240px, 1.55fr)
    minmax(160px, 0.72fr)
    minmax(170px, auto);
  align-items: end;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--stroke));
  border-radius: 13px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 45%),
    color-mix(in srgb, var(--bg) 32%, transparent);
}

.crm-lead-workflow-panel.needs-attention {
  border-color: var(--flash-warning-stroke);
  background:
    linear-gradient(90deg, var(--flash-warning-bg), transparent 48%),
    color-mix(in srgb, var(--bg) 32%, transparent);
}

.crm-lead-workflow-panel .field {
  min-width: 0;
  gap: 4px;
}

.crm-lead-workflow-panel .field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.crm-lead-workflow-panel .field input,
.crm-lead-workflow-panel .field select {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  border-color: color-mix(in srgb, var(--accent) 22%, var(--stroke));
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg) 68%, var(--accent-soft));
}

.crm-lead-current-step-field input {
  color: var(--text);
  font-weight: 800;
}

.crm-lead-attention-control {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--status-warn-text);
  font-size: 11px;
  font-weight: 800;
  flex-wrap: wrap;
}

.crm-lead-attention-control .action-chip {
  min-height: 36px;
  white-space: nowrap;
}

.crm-lead-workflow-save {
  flex: 0 0 auto;
}

.crm-lead-attention-ok {
  color: var(--status-ok-text);
}

.crm-lead-step-choices {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  padding-top: 1px;
}

.crm-lead-step-choices > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.crm-lead-step-choices > div {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.crm-lead-step-choice {
  min-height: 29px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--stroke));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 82%, transparent);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}

.crm-lead-step-choice:hover,
.crm-lead-step-choice.active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--stroke));
  background: var(--accent-soft);
  color: var(--text);
}

.crm-lead-step-choice:disabled {
  cursor: wait;
  opacity: 0.56;
}

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

.crm-lead-compact-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 10px 0 2px;
  border-top: 1px solid var(--stroke);
}

.crm-lead-compact-form .field {
  min-width: 0;
  gap: 4px;
}

.crm-lead-compact-form .field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.crm-lead-address-field,
.crm-lead-comment-field {
  grid-column: span 2;
}

.crm-lead-card .crm-lead-compact-form .field input,
.crm-lead-card .crm-lead-compact-form .field select {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  border-color: var(--stroke);
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}

.crm-lead-card .crm-lead-compact-form .field input:focus,
.crm-lead-card .crm-lead-compact-form .field select:focus {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--stroke));
  background: color-mix(in srgb, var(--bg) 58%, var(--accent-soft));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}

.crm-lead-form-grid .full-width {
  grid-column: 1 / -1;
}

.crm-lead-card .field input,
.crm-lead-card .field textarea,
.crm-lead-card .field select,
.crm-lead-dialog .field input,
.crm-lead-dialog .field textarea,
.crm-lead-dialog .field select {
  border-color: color-mix(in srgb, var(--stroke) 72%, transparent);
  background: var(--surface-soft);
}

.crm-comment-field textarea {
  min-height: 58px;
  max-height: 140px;
}

.crm-source-field {
  position: relative;
  align-content: start;
  z-index: 1;
}

.crm-source-field:focus-within {
  z-index: 12;
}

.crm-source-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  max-height: 184px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--stroke-strong);
  border-radius: 12px;
  background: var(--surface-card-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    visibility 120ms ease;
  scrollbar-width: thin;
}

.crm-source-field:focus-within .crm-source-suggestions {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.crm-source-suggestions button {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
}

.crm-source-suggestions button:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--stroke));
  background: var(--accent-soft);
  color: var(--text);
}

.crm-product-field {
  min-width: 0;
  margin: 0;
  padding: 9px 12px 11px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--surface-soft);
}

.crm-product-title {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.crm-product-field.is-disabled {
  opacity: 0.82;
}

.crm-product-options {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.crm-product-option {
  cursor: pointer;
}

.crm-product-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
}

.crm-product-option span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft-strong) 72%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.crm-product-option input:checked + span {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--stroke));
  background: var(--accent-soft);
  color: var(--text);
}

.crm-product-option input:disabled + span {
  cursor: default;
  opacity: 0.72;
}

.crm-lead-subpanel,
.crm-lead-history,
.crm-lead-converted,
.crm-lead-rejection-banner {
  padding: 11px 12px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 30%, transparent);
}

.crm-lead-tasks-panel {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--stroke));
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 10%, transparent), transparent 38%),
    color-mix(in srgb, var(--bg) 32%, transparent);
}

.crm-lead-tasks-panel .subsection-title {
  color: color-mix(in srgb, var(--accent) 74%, var(--text));
}

.crm-lead-tasks-panel .crm-lead-line {
  background: color-mix(in srgb, var(--accent-soft) 38%, transparent);
}

.crm-lead-rejection-banner {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border: 1px solid rgba(255, 107, 107, 0.24);
  background: rgba(255, 107, 107, 0.07);
}

.crm-lead-rejection-banner span {
  color: var(--muted);
}

.crm-lead-payment-panel {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 30%, transparent);
}

.crm-lead-payment-panel.has-payments {
  border-color: rgba(71, 212, 141, 0.3);
  background: rgba(71, 212, 141, 0.07);
}

.crm-lead-payment-panel.has-no-payments {
  border-color: color-mix(in srgb, var(--accent-2) 26%, var(--stroke));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 42%),
    color-mix(in srgb, var(--bg) 30%, transparent);
}

.crm-lead-payment-panel.has-no-payments .subsection-title {
  color: color-mix(in srgb, var(--accent-2) 62%, var(--text));
}

.crm-measurement-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.crm-measurement-head,
.crm-measurement-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-measurement-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(180px, 1fr) minmax(170px, 0.8fr);
  gap: 12px;
  margin-top: 14px;
}

.crm-measurement-comment {
  grid-column: 1 / -1;
}

.crm-measurement-actions,
.crm-measurement-history,
.crm-measurement-panel > .summary-inline-note {
  margin-top: 12px;
}

.crm-lead-payment-details {
  min-width: 0;
}

.crm-lead-payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
  list-style: none;
}

.crm-lead-payment-details > summary::-webkit-details-marker {
  display: none;
}

.crm-lead-payment-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.crm-lead-payment-title .subsection-title {
  margin: 0;
}

.crm-lead-payment-empty {
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.crm-lead-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto) max-content;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
}

.crm-lead-line > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-lead-line > span:has(.crm-task-due) {
  display: flex;
  align-items: center;
  gap: 7px;
}

.crm-task-due {
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: color-mix(in srgb, var(--accent) 68%, var(--text));
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.crm-task-due.today {
  color: var(--warning);
}

.crm-task-due.overdue {
  color: var(--danger);
}

.crm-task-status-open {
  background: color-mix(in srgb, var(--accent-2) 14%, transparent);
  color: color-mix(in srgb, var(--accent-2) 64%, var(--text));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-2) 20%, transparent);
}

.crm-lead-payment-form {
  display: grid;
  grid-template-columns: 0.7fr 0.9fr 1fr 1.2fr 1.2fr auto;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
}

.crm-lead-history > summary {
  cursor: pointer;
  font-weight: 800;
}

.crm-lead-history {
  border-color: color-mix(in srgb, var(--accent-2) 18%, var(--stroke));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 6%, transparent), transparent 30%),
    color-mix(in srgb, var(--bg) 30%, transparent);
}

.crm-lead-history > summary::marker {
  color: var(--accent-2);
}

.crm-lead-history[open] > summary {
  margin-bottom: 10px;
}

.crm-lead-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--stroke-strong);
  border-radius: 20px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.crm-lead-dialog::backdrop {
  background: rgba(3, 8, 14, 0.72);
  backdrop-filter: blur(5px);
}

.crm-lead-dialog-shell {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.crm-lead-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.crm-lead-dialog-header h2 {
  margin: 0;
}

.crm-dialog-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.crm-lead-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.crm-lead-dialog-actions .action-chip {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 12px;
}

.crm-refusal-dialog {
  width: min(620px, calc(100vw - 32px));
}

.order-lead-source-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(71, 212, 141, 0.28);
  border-radius: 12px;
  background: rgba(71, 212, 141, 0.08);
}

.order-lead-source-banner > div {
  display: grid;
  gap: 3px;
}

.order-lead-source-banner span {
  color: var(--muted);
  font-size: 13px;
}

.order-lead-credit-check {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .crm-leads-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .crm-lead-scope-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .crm-lead-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .crm-lead-summary-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .crm-lead-summary-step {
    max-width: min(230px, 100%);
  }

  .crm-lead-summary::after {
    grid-column: 2;
    grid-row: 1;
  }

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

  .crm-lead-compact-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .crm-measurement-comment {
    grid-column: auto;
  }
  .crm-leads-head {
    padding: 12px;
  }

  .crm-leads-topbar {
    gap: 8px;
  }

  .crm-lead-new-button {
    width: auto;
  }

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

  .crm-lead-scope-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crm-lead-scope-tabs .mode-chip {
    min-height: 40px;
    padding: 7px 4px;
    font-size: 12px;
  }

  .crm-lead-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-left: 12px;
    padding-right: 12px;
  }

  .crm-lead-summary-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .crm-lead-summary-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .crm-lead-identity,
  .crm-lead-summary-subline {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .crm-lead-summary-subline > span {
    width: 100%;
  }

  .crm-lead-summary-subline > span + span::before {
    content: "";
    margin: 0;
  }

  .crm-lead-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .crm-lead-form-grid,
  .crm-lead-payment-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-lead-compact-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-lead-workflow-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-lead-step-choices {
    align-items: flex-start;
    flex-direction: column;
  }

  .crm-lead-attention-control {
    justify-content: space-between;
  }

  .crm-lead-address-field,
  .crm-lead-comment-field {
    grid-column: auto;
  }

  .crm-lead-payment-summary,
  .crm-lead-payment-title,
  .crm-lead-rejection-banner {
    align-items: flex-start;
  }

  .crm-lead-payment-summary,
  .crm-lead-rejection-banner {
    flex-direction: column;
  }

  .crm-lead-payment-title {
    flex-wrap: wrap;
  }

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

  .crm-lead-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .crm-lead-dialog-shell {
    padding: 14px;
  }

  .order-lead-source-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}
