.crm-command-center,
.crm-editor-shell {
  --crm-bg: #08090b;
  --crm-surface: rgba(18, 20, 23, .94);
  --crm-surface-raised: rgba(25, 27, 31, .96);
  --crm-surface-soft: rgba(31, 34, 38, .72);
  --crm-border: rgba(255, 255, 255, .105);
  --crm-border-strong: rgba(255, 255, 255, .2);
  --crm-text: #f4f5f7;
  --crm-muted: #a8abb2;
  --crm-faint: #737780;
  --crm-success: #66c58a;
  --crm-warning: #e1b85f;
  --crm-danger: #e07171;
  color: var(--crm-text);
  letter-spacing: 0;
}

.crm-command-center *,
.crm-editor-shell * { box-sizing: border-box; }

.crm-command-header,
.crm-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.crm-command-header h2,
.crm-editor-topbar h2 { margin: 2px 0 0; color: var(--crm-text); font-size: 24px; line-height: 1.2; }
.crm-command-header span,
.crm-editor-topbar > div > span { color: var(--crm-muted); font-size: 12px; }

.crm-add-button,
.crm-editor-top-actions .button,
.crm-back-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.crm-add-button svg,
.crm-editor-top-actions svg,
.crm-back-button svg { width: 17px; height: 17px; }

.crm-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(112px, 148px)) auto minmax(96px, auto) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  margin-bottom: 12px;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(31, 33, 37, .9), rgba(14, 15, 17, .96));
  box-shadow: 0 12px 34px rgba(0, 0, 0, .24);
}

.crm-filter-bar label { min-width: 0; }
.crm-filter-bar label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.crm-filter-bar input,
.crm-filter-bar select,
.crm-editor-form input,
.crm-editor-form select,
.crm-editor-form textarea {
  width: 100%;
  min-height: 40px;
  color: var(--crm-text);
  background: #0d0f11;
  border: 1px solid var(--crm-border);
  border-radius: 7px;
  outline: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.crm-filter-bar input:focus,
.crm-filter-bar select:focus,
.crm-editor-form input:focus,
.crm-editor-form select:focus,
.crm-editor-form textarea:focus {
  border-color: rgba(255, 255, 255, .38);
  background: #121417;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .055);
}

.crm-global-search { position: relative; }
.crm-global-search svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; color: var(--crm-faint); transform: translateY(-50%); pointer-events: none; }
.crm-global-search input { padding-left: 38px; }

.crm-filter-reset,
.crm-duplicates-button,
.crm-archive-toggle,
.crm-icon-action,
.crm-back-button {
  min-height: 40px;
  color: var(--crm-muted);
  background: #111316;
  border: 1px solid var(--crm-border);
  border-radius: 7px;
}

.crm-filter-reset,
.crm-duplicates-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; white-space: nowrap; }
.crm-filter-reset svg,
.crm-duplicates-button svg { width: 16px; height: 16px; }
.crm-filter-reset:hover,
.crm-duplicates-button:hover,
.crm-duplicates-button.is-active { color: var(--crm-text); border-color: var(--crm-border-strong); background: #1a1d21; }
.crm-duplicates-button b { min-width: 20px; padding: 2px 5px; color: var(--crm-text); border: 1px solid var(--crm-border); border-radius: 999px; font-size: 11px; }
.crm-archive-toggle { position: relative; display: flex; align-items: center; gap: 7px; min-width: 96px; padding: 0 11px; white-space: nowrap; }
.crm-archive-toggle input { width: 16px; min-height: 16px; accent-color: #777b82; }
.crm-archive-toggle > span { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; }

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

.crm-kpi-grid article {
  position: relative;
  min-height: 104px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(30, 32, 36, .94), rgba(15, 17, 19, .96));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 12px 28px rgba(0, 0, 0, .18);
}
.crm-kpi-grid article > span { display: block; max-width: calc(100% - 42px); color: var(--crm-muted); font-size: 12px; }
.crm-kpi-grid article > strong { display: block; margin: 8px 0 4px; color: var(--crm-text); font-size: clamp(20px, 2vw, 28px); line-height: 1; font-variant-numeric: tabular-nums; }
.crm-kpi-grid article > small { color: var(--crm-faint); }
.crm-kpi-grid article > svg { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; color: #a7aab0; }

.crm-registry-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 350px); gap: 12px; align-items: start; }
.crm-registry-panel,
.crm-inspector,
.crm-duplicates-workspace,
.crm-editor-steps,
.crm-editor-form,
.crm-editor-preview {
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(24, 26, 29, .96), rgba(12, 13, 15, .98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
}

.crm-registry-head,
.crm-registry-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) minmax(170px, 1.15fr) minmax(106px, .7fr) minmax(110px, .72fr) minmax(126px, .8fr) minmax(120px, .72fr) 24px;
  align-items: center;
  gap: 10px;
}
.crm-registry-head { min-height: 44px; padding: 0 14px; color: var(--crm-faint); border-bottom: 1px solid var(--crm-border); font-size: 11px; font-weight: 700; }
.crm-registry-row { width: 100%; min-height: 67px; padding: 8px 14px; color: var(--crm-text); text-align: left; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.07); transition: background-color 140ms ease, box-shadow 140ms ease; }
.crm-registry-row:last-child { border-bottom: 0; }
.crm-registry-row:hover { background: rgba(255,255,255,.035); }
.crm-registry-row.is-selected { background: linear-gradient(90deg, rgba(255,255,255,.085), rgba(255,255,255,.018)); box-shadow: inset 3px 0 #b7bac0; }
.crm-registry-row strong { color: var(--crm-text); font-size: 12px; line-height: 1.25; }
.crm-registry-row small { display: block; margin-top: 3px; color: var(--crm-muted); font-size: 10px; line-height: 1.3; }
.crm-entity-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crm-entity-cell > span:last-child,
.crm-contact-cell { min-width: 0; }
.crm-entity-cell strong,
.crm-entity-cell small,
.crm-contact-cell strong,
.crm-contact-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-avatar { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border: 1px solid var(--crm-border); border-radius: 50%; background: #17191c; color: #c6c8cc; }
.crm-avatar svg { width: 17px; height: 17px; }
.crm-tag { display: inline-flex; max-width: 100%; padding: 4px 7px; overflow: hidden; color: #d1d3d7; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--crm-border); border-radius: 5px; background: rgba(255,255,255,.025); font-size: 10px; }
.crm-status { display: inline-flex; align-items: center; gap: 5px; color: #d5d7da; font-size: 10px; white-space: nowrap; }
.crm-status svg { width: 12px; height: 12px; color: var(--crm-faint); }
.crm-status--active svg { color: var(--crm-success); }
.crm-status--review svg { color: var(--crm-warning); }
.crm-status--blocked svg { color: var(--crm-danger); }
.crm-money-cell strong { font-variant-numeric: tabular-nums; }
.crm-row-chevron { color: var(--crm-faint); }
.crm-row-chevron svg { width: 16px; height: 16px; }
.crm-registry-panel > footer { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; color: var(--crm-muted); border-top: 1px solid var(--crm-border); font-size: 11px; }
.crm-registry-panel > footer small { color: var(--crm-faint); }

.crm-inspector { position: sticky; top: 10px; max-height: calc(100vh - 132px); padding: 14px; overflow: auto; scrollbar-width: none; }
.crm-inspector::-webkit-scrollbar { display: none; }
.crm-inspector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--crm-border); }
.crm-inspector-head h3 { margin: 4px 0; color: var(--crm-text); font-size: 17px; line-height: 1.25; }
.crm-inspector-head div > span,
.crm-inspector-head small { color: var(--crm-muted); font-size: 10px; }
.crm-inspector-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.crm-icon-action { display: flex; min-width: 0; min-height: 52px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; }
.crm-icon-action:hover { color: var(--crm-text); border-color: var(--crm-border-strong); background: #1b1e21; }
.crm-icon-action svg { width: 16px; height: 16px; }
.crm-balance-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 10px; padding: 10px 0; border-top: 1px solid var(--crm-border); border-bottom: 1px solid var(--crm-border); }
.crm-balance-grid div { min-width: 0; padding: 0 7px; border-right: 1px solid var(--crm-border); }
.crm-balance-grid div:last-child { border-right: 0; }
.crm-balance-grid dt { color: var(--crm-faint); font-size: 9px; }
.crm-balance-grid dd { margin: 5px 0 0; overflow: hidden; color: var(--crm-text); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.crm-inspector-section { padding: 11px 0; border-bottom: 1px solid var(--crm-border); }
.crm-inspector-section:last-child { border-bottom: 0; }
.crm-inspector-section > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.crm-inspector-section h4 { margin: 0; color: var(--crm-text); font-size: 12px; }
.crm-inspector-section header > span { color: var(--crm-faint); font-size: 10px; }
.crm-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.crm-tags > span { padding: 4px 7px; color: var(--crm-muted); border: 1px solid var(--crm-border); border-radius: 999px; font-size: 9px; }
.crm-contact-list,
.crm-document-list,
.crm-inspector-timeline { display: grid; gap: 6px; }
.crm-contact-list article,
.crm-document-list article,
.crm-inspector-timeline article { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px; border: 1px solid rgba(255,255,255,.06); border-radius: 6px; background: rgba(255,255,255,.018); }
.crm-contact-list article > div:nth-child(2),
.crm-document-list article > div,
.crm-inspector-timeline article > div { min-width: 0; flex: 1; }
.crm-contact-list strong,
.crm-document-list strong,
.crm-inspector-timeline strong { display: block; overflow: hidden; color: #e4e5e7; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.crm-contact-list small,
.crm-document-list small,
.crm-inspector-timeline small { display: block; margin-top: 2px; overflow: hidden; color: var(--crm-faint); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.crm-contact-avatar { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 50%; background: #24272b; font-size: 10px; }
.crm-contact-links { display: flex; gap: 4px; }
.crm-contact-links a { display: grid; width: 25px; height: 25px; place-items: center; color: var(--crm-muted); border: 1px solid var(--crm-border); border-radius: 5px; }
.crm-contact-links svg,
.crm-document-list > article > svg { width: 13px; height: 13px; }
.crm-inspector-timeline article > span { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border: 1px solid var(--crm-border); border-radius: 50%; }
.crm-inspector-timeline svg { width: 12px; height: 12px; }
.crm-inspector--empty,
.crm-registry-empty { display: grid; min-height: 260px; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.crm-inspector--empty h3,
.crm-registry-empty h3 { margin: 12px 0 4px; color: var(--crm-text); }
.crm-inspector--empty p,
.crm-registry-empty p { max-width: 290px; margin: 0; color: var(--crm-muted); }
.crm-empty-icon,
.crm-registry-empty > svg { display: grid; width: 46px; height: 46px; place-items: center; color: var(--crm-muted); border: 1px solid var(--crm-border); border-radius: 50%; }
.crm-empty-icon svg { width: 20px; height: 20px; }

.crm-duplicates-workspace { padding: 14px; }
.crm-duplicates-workspace > header { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.crm-duplicates-workspace h3 { margin: 3px 0 0; }
.crm-duplicates-workspace header span { color: var(--crm-muted); font-size: 11px; }
.crm-duplicate-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--crm-border); border-radius: 7px; background: rgba(255,255,255,.02); }
.crm-duplicate-card + .crm-duplicate-card { margin-top: 8px; }
.crm-duplicate-card span,
.crm-duplicate-card p { color: var(--crm-muted); font-size: 11px; }
.crm-duplicate-card h3 { margin: 4px 0; color: var(--crm-text); font-size: 14px; }

.crm-editor-topbar { position: sticky; top: 0; z-index: 6; margin: -4px -2px 12px; padding: 9px 2px 12px; background: linear-gradient(180deg, #090a0c 72%, rgba(9,10,12,0)); }
.crm-back-button { align-self: stretch; padding: 0 12px; }
.crm-editor-topbar > div:nth-child(2) { flex: 1; min-width: 0; }
.crm-editor-top-actions { display: flex; gap: 8px; }
.crm-editor-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.crm-editor-steps { position: sticky; top: 78px; padding: 12px; }
.crm-editor-steps > header { display: grid; gap: 3px; padding: 5px 4px 12px; border-bottom: 1px solid var(--crm-border); }
.crm-editor-steps > header span { color: var(--crm-text); font-size: 12px; font-weight: 700; }
.crm-editor-steps > header strong { color: var(--crm-faint); font-size: 10px; font-weight: 500; }
.crm-editor-step { position: relative; display: grid; width: 100%; grid-template-columns: 31px minmax(0, 1fr); gap: 9px; align-items: center; padding: 9px 5px; color: var(--crm-muted); text-align: left; background: transparent; border: 0; border-radius: 6px; }
.crm-editor-step::after { content: ""; position: absolute; left: 20px; top: 40px; width: 1px; height: 16px; background: var(--crm-border); }
.crm-editor-step:last-child::after { display: none; }
.crm-editor-step > span:first-child { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--crm-border); border-radius: 50%; background: #121416; }
.crm-editor-step svg { width: 13px; height: 13px; }
.crm-editor-step strong,
.crm-editor-step small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-editor-step strong { color: #d8dade; font-size: 11px; }
.crm-editor-step small { margin-top: 2px; color: var(--crm-faint); font-size: 9px; }
.crm-editor-step.is-active { background: rgba(255,255,255,.055); }
.crm-editor-step.is-active > span:first-child { color: var(--crm-text); border-color: var(--crm-border-strong); }
.crm-editor-step.is-complete > span:first-child { color: var(--crm-success); border-color: rgba(102,197,138,.35); }

.crm-editor-form { padding: 0 16px 16px; }
.crm-editor-section { scroll-margin-top: 90px; padding: 16px 0; border-bottom: 1px solid var(--crm-border); }
.crm-editor-section:last-child { border-bottom: 0; }
.crm-editor-section > header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.crm-editor-section > header > span { display: grid; width: 30px; height: 30px; place-items: center; color: var(--crm-muted); border: 1px solid var(--crm-border); border-radius: 7px; background: #111315; font-size: 10px; font-weight: 700; }
.crm-editor-section h3 { margin: 0; color: var(--crm-text); font-size: 16px; }
.crm-editor-section p { margin: 3px 0 0; color: var(--crm-muted); font-size: 10px; }
.crm-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.crm-editor-grid > label { display: grid; min-width: 0; gap: 6px; color: var(--crm-muted); font-size: 10px; font-weight: 600; }
.crm-editor-grid > label > small { color: var(--crm-faint); font-size: 9px; font-weight: 400; }
.crm-editor-form input,
.crm-editor-form select { padding: 0 11px; }
.crm-editor-form textarea { min-height: 72px; padding: 10px 11px; resize: vertical; }
.crm-field-wide { grid-column: 1 / -1; }
.crm-role-fields { display: flex; gap: 8px; padding: 0; border: 0; }
.crm-role-fields legend { margin-bottom: 7px; color: var(--crm-muted); font-size: 10px; font-weight: 600; }
.crm-role-fields label { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--crm-border); border-radius: 7px; background: #101214; }
.crm-role-fields input { width: 15px; min-height: 15px; accent-color: #898d94; }

.crm-editor-preview { position: sticky; top: 78px; padding: 13px; }
.crm-completeness { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 10px; align-items: center; padding-bottom: 13px; border-bottom: 1px solid var(--crm-border); }
.crm-completeness > header { grid-column: 1 / -1; }
.crm-completeness header span,
.crm-completeness header small { display: block; }
.crm-completeness header span { color: var(--crm-text); font-size: 11px; font-weight: 700; }
.crm-completeness header small { margin-top: 2px; color: var(--crm-faint); font-size: 9px; }
.crm-completeness-score { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 50%; background: conic-gradient(#aeb1b7 var(--crm-progress), #292c30 0); }
.crm-completeness-score::before { content: ""; position: absolute; width: 49px; height: 49px; border-radius: 50%; background: #111315; }
.crm-completeness-score strong { position: relative; z-index: 1; font-size: 16px; }
.crm-completeness > div:last-child strong,
.crm-completeness > div:last-child span,
.crm-completeness > div:last-child small { display: block; }
.crm-completeness > div:last-child strong { font-size: 11px; }
.crm-completeness > div:last-child span { margin: 4px 0; color: var(--crm-success); font-size: 9px; }
.crm-completeness > div:last-child small { color: var(--crm-faint); font-size: 9px; }
.crm-duplicate-warning { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 10px 0; padding: 10px; color: var(--crm-warning); border: 1px solid rgba(225,184,95,.3); border-radius: 7px; background: rgba(225,184,95,.07); }
.crm-duplicate-warning svg { width: 17px; height: 17px; }
.crm-duplicate-warning strong,
.crm-duplicate-warning span { display: block; }
.crm-duplicate-warning strong { font-size: 10px; }
.crm-duplicate-warning span { margin-top: 2px; color: #c8c9cc; font-size: 9px; }
.crm-duplicate-warning button { color: var(--crm-text); background: #16181b; border: 1px solid var(--crm-border); border-radius: 5px; }
.crm-profile-preview,
.crm-preview-checklist { margin-top: 10px; padding: 11px; border: 1px solid var(--crm-border); border-radius: 7px; background: rgba(255,255,255,.018); }
.crm-profile-preview > header { display: flex; align-items: center; gap: 9px; padding-bottom: 10px; border-bottom: 1px solid var(--crm-border); }
.crm-profile-preview h3 { margin: 0 0 3px; overflow-wrap: anywhere; font-size: 13px; }
.crm-profile-preview header span { color: var(--crm-muted); font-size: 9px; }
.crm-profile-preview dl { display: grid; gap: 7px; margin: 10px 0 0; }
.crm-profile-preview dl div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
.crm-profile-preview dt { color: var(--crm-faint); font-size: 9px; }
.crm-profile-preview dd { margin: 0; overflow-wrap: anywhere; color: #d5d7da; font-size: 9px; }
.crm-preview-checklist h4 { margin: 0 0 9px; font-size: 11px; }
.crm-preview-checklist > div { display: flex; align-items: center; gap: 7px; padding: 4px 0; color: var(--crm-faint); font-size: 9px; }
.crm-preview-checklist > div svg { width: 13px; height: 13px; }
.crm-preview-checklist > div.is-done { color: #d3d5d8; }
.crm-preview-checklist > div.is-done svg { color: var(--crm-success); }

@media (max-width: 1240px) {
  .crm-filter-bar { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(100px, 1fr)) auto minmax(96px, auto) auto; }
  .crm-global-search { grid-column: 1 / -1; }
  .crm-filter-reset span { display: none; }
  .crm-registry-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .crm-registry-head,
  .crm-registry-row { grid-template-columns: minmax(175px, 1.3fr) minmax(150px, 1fr) 100px 104px 118px 24px; }
  .crm-registry-head > span:nth-child(6),
  .crm-registry-row > span:nth-child(6) { display: none; }
  .crm-editor-layout { grid-template-columns: 180px minmax(0, 1fr) 270px; }
}

@media (max-width: 980px) {
  .crm-filter-bar { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(110px, 140px)) auto auto; }
  .crm-filter-bar label:has([data-crm-filter="tag"]) { display: none; }
  .crm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-registry-layout { grid-template-columns: 1fr; }
  .crm-inspector { position: static; max-height: none; }
  .crm-editor-layout { grid-template-columns: 160px minmax(0, 1fr); }
  .crm-editor-preview { position: static; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .crm-completeness { align-content: start; }
  .crm-editor-topbar { flex-wrap: wrap; }
  .crm-editor-top-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 720px) {
  .crm-command-header { align-items: flex-start; }
  .crm-command-header h2 { font-size: 21px; }
  .crm-add-button { min-width: 42px; padding-inline: 12px; }
  .crm-add-button:not(:focus) { font-size: 0; }
  .crm-add-button svg { margin: 0; }
  .crm-filter-bar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .crm-filter-bar > label:not(.crm-global-search):not(.crm-archive-toggle),
  .crm-filter-reset { display: none; }
  .crm-global-search { grid-column: 1 / -1; }
  .crm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .crm-kpi-grid article { min-height: 90px; padding: 12px; }
  .crm-kpi-grid article > strong { font-size: 18px; overflow-wrap: anywhere; }
  .crm-registry-head { display: none; }
  .crm-registry-body { display: grid; gap: 7px; padding: 7px; }
  .crm-registry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; gap: 9px 12px; padding: 12px; border: 1px solid var(--crm-border); border-radius: 7px; background: rgba(255,255,255,.018); }
  .crm-registry-row > span { min-width: 0; }
  .crm-registry-row > span::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--crm-faint); font-size: 8px; font-weight: 600; }
  .crm-registry-row .crm-entity-cell { grid-column: 1 / -1; }
  .crm-registry-row .crm-entity-cell::before,
  .crm-registry-row .crm-row-chevron::before { display: none; }
  .crm-registry-row .crm-contact-cell { grid-column: 1 / -1; }
  .crm-registry-row > span:nth-child(3),
  .crm-registry-row > span:nth-child(6) { display: none; }
  .crm-registry-row .crm-row-chevron { position: absolute; right: 13px; top: 20px; }
  .crm-registry-row { position: relative; }
  .crm-registry-panel > footer { align-items: flex-start; flex-direction: column; }
  .crm-editor-topbar { position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .crm-editor-topbar > div:nth-child(2) h2 { font-size: 18px; }
  .crm-back-button span { display: none; }
  .crm-editor-top-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .crm-editor-top-actions .button { min-width: 0; padding-inline: 9px; font-size: 10px; }
  .crm-editor-layout { grid-template-columns: 1fr; }
  .crm-editor-steps { position: static; display: flex; gap: 6px; padding: 8px; overflow-x: auto; scrollbar-width: none; }
  .crm-editor-steps::-webkit-scrollbar { display: none; }
  .crm-editor-steps > header { display: none; }
  .crm-editor-step { flex: 0 0 54px; display: grid; grid-template-columns: 1fr; justify-items: center; padding: 7px; }
  .crm-editor-step > span:nth-child(2) { display: none; }
  .crm-editor-step::after { display: none; }
  .crm-editor-form { padding-inline: 12px; }
  .crm-editor-grid { grid-template-columns: 1fr; }
  .crm-field-wide { grid-column: auto; }
  .crm-editor-preview { grid-column: auto; grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .crm-kpi-grid { grid-template-columns: 1fr; }
  .crm-kpi-grid article { min-height: 82px; }
  .crm-command-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .crm-command-header > div { min-width: 0; }
  .crm-filter-bar { padding: 7px; }
  .crm-balance-grid { grid-template-columns: 1fr; gap: 8px; }
  .crm-balance-grid div { padding: 0 3px; border-right: 0; }
  .crm-editor-top-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .crm-command-center *,
  .crm-editor-shell * { scroll-behavior: auto !important; transition-duration: 0ms !important; }
}
