.client-profile {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.client-profile-identity,
.client-profile-card,
.client-profile-install {
  min-width: 0;
  padding: 12px clamp(12px, 1.8vw, 20px);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.client-profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.client-profile-monogram {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--lime);
  color: var(--accent-ink);
  font-size: 19px;
  font-weight: 750;
}
.client-profile-identity-details {
  display: grid;
  min-width: 0;
  gap: 2px;
  overflow-wrap: anywhere;
}
.client-profile-identity-details strong { font-size: 18px; }
.client-profile-identity-label { color: var(--muted); font-size: 14px; }
.client-profile-card-head,
.client-profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.client-profile-card-head h2 {
  flex: 1; min-width: 0;
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.17;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.client-profile-toggle { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 11px; padding: 0; text-align: start; background: none; color: var(--ink); }
.client-profile-toggle .cab-glyph { --icon-size: 20px; color: var(--cab-accent-text); flex: none; }
.profile-group-caption { display: grid; gap: 2px; min-width: 0; }
.profile-group-label { font-size: 16px; font-weight: 650; line-height: 1.25; }
.profile-group-preview { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.client-profile-toggle::after { content: ''; flex: none; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.client-profile-toggle[aria-expanded="true"]::after { transform: rotate(225deg); }
.client-profile-edit {
  padding: 0 12px;
  min-height: 44px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.client-profile-edit:hover {
  border-color: var(--muted);
}
.client-profile :is(input, textarea, button, summary):focus-visible {
  outline: 2px solid var(--card-selected-border);
  outline-offset: 3px;
}
.client-profile-toggle::after { margin-left: auto; }
.client-profile-summary { margin-top: 8px; }
.cab-field-rows { margin: 0; padding: 0; list-style: none; }
.cab-field-rows > li { border-top: 1px solid var(--line-soft); }
.cab-field-action {
  display: grid; width: 100%; min-width: 0; min-height: 44px; gap: 8px 12px;
  grid-template-columns: minmax(6rem, .82fr) minmax(0, 1.18fr) 16px;
  align-items: center; padding: 8px 0; border: 0; background: transparent; color: var(--ink);
  text-align: left; cursor: pointer;
}
.cab-field-action .cab-glyph { --icon-size: 15px; width: 15px; height: 15px; color: var(--muted); }
.cab-field-action:focus-visible { outline: 2px solid var(--cab-accent-text); outline-offset: 2px; }
.cab-field-action:disabled { cursor: default; }
.cab-field-action:disabled .cab-glyph { visibility: hidden; }
.cab-field-label { color: var(--muted); font-size: 14px; font-weight: 400; }
.cab-field-value { overflow-wrap: anywhere; white-space: pre-line; font-size: 15px; line-height: 1.4; font-weight: 550; font-variant-numeric: tabular-nums; }
.cab-field-value[data-empty="true"] { color: var(--cab-accent-text); font-weight: 500; }
.client-profile-form { padding: 9px 0; }
.client-profile-install p { color: var(--muted); }
.client-profile-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}
.client-profile-field.is-wide { grid-column: 1 / -1; }
.client-profile-field :is(input, textarea) {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface-soft);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
.client-profile-field textarea { resize: vertical; }
.client-profile-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 9px;
}
.client-profile-actions button { min-height: 44px; }
.client-profile-feedback { margin: 14px 0 0; font-size: 15px; }
.client-profile-feedback[data-error], .client-profile-conflict { color: var(--danger); }
.client-profile-conflict { overflow-wrap: anywhere; font-size: 14px; font-weight: 400; }
.client-profile-install { padding-block: 0; }
.client-profile-install summary { padding-block: 15px; font-weight: 600; cursor: pointer; }
.client-profile-install p { margin: 0 0 16px; }
.client-profile [hidden] { display: none !important; }
@media (max-width: 640px) {
  .client-profile { gap: 8px; }
  .cab-field-action { grid-template-columns: minmax(0,1fr) 16px; gap: 1px 12px; }
  .cab-field-label, .cab-field-value { grid-column: 1; }
  .cab-field-action .cab-glyph { grid-area: 1 / 2 / span 2 / 3; }
}
