.st-customer-filters-card {
  display: grid;
  gap: var(--st-space-md);
}

.st-customer-filters-top,
.st-customer-balance-row,
.st-customer-load-more {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-space-md);
  justify-content: space-between;
}

.st-customer-search-field {
  flex: 1 1 480px;
}

.st-customer-search-row {
  align-items: center;
  display: flex;
  gap: var(--st-space-sm);
}

.st-customer-filter-input {
  background: var(--st-surface);
  border: 1px solid var(--st-border-soft);
  border-radius: var(--st-radius-button);
  color: var(--st-text-primary);
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.st-customer-filter-input:focus {
  border-color: rgba(30, 58, 47, 0.35);
  box-shadow: 0 0 0 3px rgba(30, 58, 47, 0.08);
  outline: none;
}

.st-customer-filter-summary {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  min-height: 74px;
}

.st-customer-filter-summary strong {
  font-size: 1.35rem;
}

.st-customer-filter-summary span,
.st-customer-attention-banner,
.st-customer-balance-chip span {
  color: var(--st-text-secondary);
}

.st-customer-filter-chip-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.st-customer-filter-chip {
  background: var(--st-hover-bg);
  border: 1px solid transparent;
  border-radius: var(--st-radius-pill);
  color: var(--st-action-default);
  cursor: pointer;
  font-weight: 700;
  min-height: 38px;
  padding: 0 14px;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.st-customer-filter-chip:hover:not(:disabled) {
  border-color: rgba(30, 58, 47, 0.12);
  color: var(--st-forest-green);
}

.st-customer-filter-chip.is-active {
  background: var(--st-selected-bg);
  border-color: rgba(30, 58, 47, 0.16);
  color: var(--st-forest-green);
}

.st-customer-filter-clear {
  margin-left: auto;
}

.st-customer-empty-state {
  padding-top: var(--st-space-sm);
}

.st-customer-status-badge {
  align-self: flex-start;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--st-radius-pill);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
  width: fit-content;
  max-width: 100%;
}

.st-customer-grid-tooltip-target {
  cursor: help;
}

.st-customer-status-cell {
  display: flex;
  justify-content: center;
  width: 100%;
}

.st-customer-grid-action-shell {
  display: flex;
  justify-content: flex-end;
}

.st-customer-grid-action-toggle {
  min-width: 42px;
}

.st-customer-grid-action-toggle .e-caret {
  display: none;
}

.st-customer-grid-action-toggle .e-btn-content {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.st-customer-status-badge.is-attention {
  background: rgba(255, 122, 26, 0.12);
  border-color: rgba(255, 122, 26, 0.22);
  color: var(--st-chainsaw-orange);
}

.st-customer-status-badge.is-active {
  background: rgba(30, 58, 47, 0.08);
  border-color: rgba(30, 58, 47, 0.16);
  color: var(--st-forest-green);
}

.st-customer-status-badge.is-success {
  background: rgba(30, 58, 47, 0.1);
  border-color: rgba(30, 58, 47, 0.12);
  color: var(--st-forest-green);
}

.st-customer-status-badge.is-warning {
  background: rgba(255, 194, 60, 0.18);
  border-color: rgba(255, 194, 60, 0.28);
  color: #8a5a00;
}

.st-customer-status-badge.is-neutral {
  background: #f7f8f9;
  border-color: var(--st-border-soft);
  color: var(--st-text-secondary);
}

.st-customer-status-badge.is-info {
  background: var(--st-color-info-surface);
  border-color: transparent;
  color: var(--st-color-info);
}

.st-customer-attention-banner {
  background: linear-gradient(180deg, rgba(255, 122, 26, 0.1), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 122, 26, 0.16);
  border-radius: var(--st-radius-card);
  padding: 12px 14px;
}

.st-customer-balance-row {
  gap: var(--st-space-sm);
}

.st-customer-balance-chip {
  background: #fbfcfc;
  border: 1px solid var(--st-border-soft);
  border-radius: var(--st-radius-card);
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 12px 14px;
}

.st-customer-balance-chip.is-attention {
  background: linear-gradient(180deg, rgba(255, 122, 26, 0.08), rgba(255, 255, 255, 0));
  border-color: rgba(255, 122, 26, 0.16);
}

.st-customer-balance-chip strong {
  font-size: 1rem;
}

.st-customer-load-more {
  justify-content: center;
  margin-top: var(--st-space-sm);
}

.st-customer-page .st-page-content {
  gap: var(--st-space-5);
}

.st-customer-skeleton-stack,
.st-customer-panel-stack,
.st-customer-info-sections {
  display: grid;
  gap: var(--st-space-4);
}

.st-customer-list-section.st-page-section.is-surface {
  border-color: var(--st-color-border-strong);
  box-shadow: none;
  overflow: hidden;
  padding: 0;
}

.st-customer-list-section .st-page-section-content {
  border-radius: inherit;
  min-width: 0;
  overflow: hidden;
}

.st-customer-table-frame {
  background: var(--st-color-surface-white);
  border-radius: inherit;
  overflow-x: auto;
  overflow-y: hidden;
}

.st-customer-table-frame .e-grid {
  background: var(--st-color-surface-white);
  border: 0 !important;
  border-radius: 0;
  min-width: 1448px;
}

.st-customer-table-frame .e-grid .e-gridheader,
.st-customer-table-frame .e-grid .e-headercontent {
  background: var(--st-color-surface-white);
  border-color: #eaebe9 !important;
}

.st-customer-table-frame .e-headercell,
.st-customer-table-frame .e-detailheadercell {
  background: var(--st-color-surface-white);
  color: var(--st-color-text-muted);
  font-size: var(--st-font-overline-size);
  font-weight: var(--st-font-weight-semibold);
  height: 44px;
  letter-spacing: 0.04em;
  padding: 0 var(--st-space-4) !important;
  text-transform: uppercase;
  vertical-align: middle;
}

.st-customer-table-frame .e-headercell:first-child,
.st-customer-table-frame .e-rowcell:first-child {
  padding-left: var(--st-space-6) !important;
}

.st-customer-table-frame .e-headercell:last-child,
.st-customer-table-frame .e-rowcell:last-child {
  padding-right: var(--st-space-6) !important;
}

.st-customer-table-frame .e-headercelldiv,
.st-customer-table-frame .e-headertext {
  align-items: center;
  display: inline-flex;
  height: 44px;
  line-height: normal;
  min-height: 44px;
  padding: 0;
}

.st-customer-table-frame .e-rowcell {
  color: var(--st-color-text-primary);
  font-size: var(--st-font-small-size);
  height: 72px;
  padding: 0 var(--st-space-4) !important;
  vertical-align: middle;
}

.st-customer-table-frame .e-row {
  cursor: pointer;
  height: 72px;
}

.st-customer-table-frame .e-row:hover .e-rowcell {
  background: #fbfbfa;
}

.st-customer-table-frame .e-gridpager {
  background: var(--st-color-surface-white);
  border-color: #eaebe9 !important;
}

.st-customer-table-customer {
  align-items: center;
  display: flex;
  gap: var(--st-space-3);
  min-width: 0;
}

.st-customer-avatar {
  align-items: center;
  background: #e8efeb;
  border-radius: 50%;
  color: var(--st-color-brand-primary);
  display: inline-flex;
  flex: 0 0 36px;
  font-size: var(--st-font-body-size);
  font-weight: var(--st-font-weight-semibold);
  height: 36px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

.st-customer-table-customer-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.st-customer-table-customer-copy strong {
  color: #15181c;
  font-size: var(--st-font-body-size);
  font-weight: var(--st-font-weight-semibold);
  line-height: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-customer-table-customer-copy span,
.st-customer-table-text {
  color: #69707e;
  font-size: var(--st-font-small-size);
  font-weight: var(--st-font-weight-regular);
  line-height: normal;
}

.st-customer-table-customer-copy span,
.st-customer-table-location {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-customer-table-status.st-customer-status-badge {
  border: 0;
  font-size: var(--st-font-overline-size);
  font-weight: var(--st-font-weight-semibold);
  min-height: 24px;
  padding: 0 9px;
}

.st-customer-table-balance {
  color: #15181c;
  font-size: var(--st-font-body-size);
  font-weight: var(--st-font-weight-medium);
  white-space: nowrap;
}

.st-customer-activity {
  align-items: center;
  display: inline-flex;
  font-size: var(--st-font-small-size);
  font-weight: var(--st-font-weight-regular);
  gap: var(--st-space-2);
  line-height: normal;
  white-space: nowrap;
}

.st-customer-activity-dot {
  border-radius: 50%;
  flex: 0 0 8px;
  height: 8px;
  width: 8px;
}

.st-customer-activity.is-success {
  color: var(--st-color-success);
}

.st-customer-activity.is-success .st-customer-activity-dot {
  background: var(--st-color-success);
}

.st-customer-activity.is-warning {
  color: var(--st-color-warning);
}

.st-customer-activity.is-warning .st-customer-activity-dot {
  background: var(--st-color-warning);
}

.st-customer-activity.is-neutral {
  color: #69707e;
}

.st-customer-activity.is-neutral .st-customer-activity-dot {
  background: var(--st-color-text-muted);
}

.st-customer-grid-action-toggle.e-dropdown-btn,
.e-btn.st-customer-grid-action-toggle {
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--st-radius-md) !important;
  box-shadow: none !important;
  color: #b8bec7 !important;
  height: 32px;
  min-height: 32px;
  min-width: 32px;
  padding: 0 !important;
  width: 32px;
}

.st-customer-grid-action-toggle.e-dropdown-btn:hover,
.e-btn.st-customer-grid-action-toggle:hover {
  background: var(--st-color-surface-background) !important;
  color: var(--st-color-text-primary) !important;
}

.st-customer-card-grid {
  display: grid;
  gap: var(--st-space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 536px), 536px));
  justify-content: start;
}

.st-customer-card {
  background: var(--st-color-surface-white);
  border: 1px solid var(--st-color-border-strong);
  border-radius: var(--st-radius-md);
  box-shadow: var(--st-elevation-card);
  cursor: pointer;
  display: block;
  min-height: 212px;
  min-width: 0;
  padding: var(--st-card-padding);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  width: 100%;
}

.st-customer-card:hover {
  border-color: var(--st-color-brand-primary);
  box-shadow: var(--st-elevation-md);
  transform: translateY(-1px);
}

.st-customer-card:focus-visible {
  border-color: var(--st-color-brand-primary);
  box-shadow: 0 0 0 3px var(--st-color-focus-ring), var(--st-elevation-md);
  outline: none;
}

.st-customer-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--st-space-3);
  min-width: 0;
  width: 100%;
}

.st-customer-card__header,
.st-customer-card__meta,
.st-customer-card__footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}

.st-customer-card__header {
  gap: var(--st-space-4);
}

.st-customer-card__identity {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 14px;
  min-width: 0;
}

.st-customer-card__avatar {
  align-items: center;
  background: var(--st-color-brand-primary-light);
  border-radius: 50%;
  color: var(--st-color-brand-primary);
  display: inline-flex;
  flex: 0 0 50px;
  font-size: 18px;
  font-weight: var(--st-font-weight-bold);
  height: 50px;
  justify-content: center;
  line-height: 1;
  width: 50px;
}

.st-customer-card__identity-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.st-customer-card__identity-copy strong,
.st-customer-card__identity-copy span,
.st-customer-card__contact-item span,
.st-customer-card__metric span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-customer-card__identity-copy strong {
  color: var(--st-color-text-primary);
  font-size: 16px;
  font-weight: var(--st-font-weight-bold);
  line-height: normal;
}

.st-customer-card__identity-copy span {
  color: var(--st-color-text-secondary);
  font-size: var(--st-font-caption-size);
  font-weight: var(--st-font-weight-regular);
  line-height: normal;
}

.st-customer-card__status-actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: var(--st-space-1);
}

.st-customer-card__status.st-customer-status-badge {
  border: 0;
  font-size: var(--st-font-overline-size);
  font-weight: var(--st-font-weight-semibold);
  min-height: 24px;
  padding: 0 10px;
}

.st-customer-card__status.is-info {
  background: var(--st-color-info-surface);
  color: var(--st-color-info);
}

.st-customer-card__status.is-active,
.st-customer-card__status.is-success {
  background: var(--st-color-success-surface);
  color: var(--st-color-success);
}

.st-customer-card__status.is-warning,
.st-customer-card__status.is-attention {
  background: var(--st-color-warning-surface);
  color: var(--st-color-warning);
}

.st-customer-card__status.is-neutral {
  background: var(--st-color-surface-muted);
  color: var(--st-color-text-secondary);
}

.st-customer-card__action-toggle.e-dropdown-btn,
.e-btn.st-customer-card__action-toggle {
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--st-radius-md) !important;
  box-shadow: none !important;
  color: var(--st-color-text-muted) !important;
  height: 28px;
  min-height: 28px;
  min-width: 28px;
  padding: 0 !important;
  width: 28px;
}

.st-customer-card__action-toggle.e-dropdown-btn:hover,
.e-btn.st-customer-card__action-toggle:hover,
.st-customer-card__action-toggle.e-dropdown-btn:focus,
.e-btn.st-customer-card__action-toggle:focus {
  background: var(--st-color-surface-muted) !important;
  color: var(--st-color-text-primary) !important;
}

.st-customer-card__action-toggle .e-caret {
  display: none;
}

.st-customer-card__action-toggle .e-btn-content {
  font-size: var(--st-font-body-size);
  letter-spacing: 0.08em;
  line-height: 1;
}

.st-customer-card__divider {
  background: var(--st-color-border-default);
  height: 1px;
  width: 100%;
}

.st-customer-card__meta {
  gap: var(--st-space-5);
}

.st-customer-card__contact,
.st-customer-card__metrics {
  align-items: center;
  display: flex;
  min-width: 0;
}

.st-customer-card__contact {
  flex: 1 1 auto;
  gap: var(--st-space-6);
}

.st-customer-card__contact-item {
  align-items: center;
  color: var(--st-color-text-secondary);
  display: inline-flex;
  flex: 0 1 auto;
  font-size: var(--st-font-small-size);
  font-weight: var(--st-font-weight-regular);
  gap: 10px;
  line-height: normal;
  min-width: 0;
}

.st-customer-card__contact-item:first-child {
  flex: 0 0 auto;
}

.st-customer-card__contact-item:last-child {
  flex: 1 1 auto;
}

.st-customer-card__meta-icon {
  color: var(--st-color-text-muted);
  flex: 0 0 15px;
  height: 15px;
  width: 15px;
}

.st-customer-card__metrics {
  flex: 0 0 auto;
  gap: 10px;
}

.st-customer-card__metric {
  align-items: center;
  background: var(--st-color-surface-muted);
  border-radius: var(--st-radius-md);
  color: var(--st-color-text-secondary);
  display: inline-flex;
  font-size: var(--st-font-caption-size);
  font-weight: var(--st-font-weight-medium);
  gap: 6px;
  height: 30px;
  line-height: normal;
  min-width: 0;
  padding: 0 12px;
}

.st-customer-card__metric-icon {
  color: var(--st-color-text-secondary);
  flex: 0 0 14px;
  height: 14px;
  width: 14px;
}

.st-customer-card__footer {
  gap: var(--st-space-4);
  justify-content: flex-end;
}

.st-customer-card__activity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.st-customer-card__activity {
  flex: 0 1 180px;
  text-align: right;
}

.st-customer-card__activity > span {
  color: var(--st-color-text-muted);
  font-size: 10px;
  font-weight: var(--st-font-weight-semibold);
  line-height: normal;
  text-transform: uppercase;
}

.st-customer-card__activity strong {
  font-size: var(--st-font-small-size);
  font-weight: var(--st-font-weight-semibold);
  line-height: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-customer-card__activity strong.is-success {
  color: var(--st-color-success);
}

.st-customer-card__activity strong.is-warning {
  color: var(--st-color-warning);
}

.st-customer-card__activity strong.is-neutral {
  color: var(--st-color-text-secondary);
}

.st-customer-edit-panel .st-page-section {
  gap: var(--st-space-3);
}

.st-customer-edit-panel .st-page-section.is-surface {
  box-shadow: none;
  padding: var(--st-space-4);
}

.st-customer-edit-panel .st-page-section-header {
  margin: calc(var(--st-space-4) * -1) calc(var(--st-space-4) * -1) 0;
  padding: var(--st-space-4);
}

.st-customer-create-panel {
  width: min(760px, 100vw);
}

.st-customer-create-panel .st-slide-panel-header {
  align-items: flex-start;
  border-color: var(--st-color-border-default);
  padding: 24px var(--st-space-8) 20px;
}

.st-customer-create-panel .st-slide-panel-header h2 {
  color: var(--st-color-text-primary);
  font-size: var(--st-font-title-h3-size);
  font-weight: var(--st-font-weight-bold);
  line-height: 1;
}

.st-customer-create-panel .st-slide-panel-header p {
  color: var(--st-color-text-secondary);
  font-size: var(--st-font-small-size);
  line-height: 1;
  margin-top: 8px;
}

.st-customer-create-panel .st-slide-panel-body {
  padding: 20px var(--st-space-8);
}

.st-customer-create-panel .st-validation-summary {
  margin-bottom: var(--st-space-5);
}

.st-customer-create-form {
  gap: 24px;
  width: 100%;
}

.st-customer-create-section.st-page-section {
  gap: 16px;
}

.st-customer-create-section .st-page-section-header {
  border: 0;
  display: block;
  margin: 0;
  padding: 0;
}

.st-customer-create-section .st-page-section-copy {
  display: block;
}

.st-customer-create-section .st-page-section-content {
  min-width: 0;
}

.st-customer-create-overline {
  color: var(--st-color-text-muted);
  font-size: var(--st-font-overline-size);
  font-weight: var(--st-font-weight-semibold);
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.st-customer-create-field-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.st-customer-create-row {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.st-customer-create-row.is-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.st-customer-create-row.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.st-customer-create-panel .st-field {
  gap: 5px;
  min-width: 0;
}

.st-customer-create-panel .st-field label {
  color: var(--st-color-text-secondary);
  font-size: var(--st-font-caption-size);
  font-weight: var(--st-font-weight-medium);
  line-height: 1;
}

.st-customer-create-panel .st-required-asterisk {
  color: var(--st-color-danger);
  margin-left: 2px;
}

.st-customer-create-panel .st-field > :is(.e-input-group, .e-control.e-textbox, .e-control.e-textarea, textarea) {
  background: var(--st-color-surface-white) !important;
  border: 1px solid var(--st-color-border-default) !important;
  border-radius: var(--st-radius-md) !important;
  box-shadow: none !important;
  min-height: 44px;
  width: 100%;
}

.st-customer-create-panel .st-field > :is(.e-input-group.e-control-wrapper.e-input-focus, .e-control.e-textbox.e-input-focus, .e-control.e-textarea.e-input-focus) {
  border-color: rgba(27, 58, 45, 0.35) !important;
  box-shadow: 0 0 0 3px rgba(27, 58, 45, 0.08) !important;
}

.st-customer-create-panel :is(.e-input-group input.e-input, input.e-control.e-textbox, textarea.e-control.e-textarea, textarea.e-input) {
  color: var(--st-color-text-primary);
  font-family: var(--st-font-family);
  font-size: var(--st-font-body-size);
  font-weight: var(--st-font-weight-regular);
  line-height: normal;
}

.st-customer-create-panel :is(.e-input-group input.e-input, input.e-control.e-textbox) {
  height: 42px;
  padding: 0 12px !important;
}

.st-customer-create-panel :is(.e-input-group input.e-input::placeholder, input.e-control.e-textbox::placeholder, textarea.e-control.e-textarea::placeholder, textarea.e-input::placeholder) {
  color: var(--st-color-text-muted);
  opacity: 1;
}

.st-customer-create-panel .st-field > :is(.e-control.e-textarea, textarea) {
  min-height: 96px;
}

.st-customer-create-panel textarea {
  padding: 12px !important;
  resize: vertical;
}

.st-customer-create-panel .st-slide-panel-footer {
  border-color: var(--st-color-border-default);
  padding: 20px var(--st-space-8) calc(20px + env(safe-area-inset-bottom, 0px));
}

.st-customer-create-panel .st-slide-panel-footer .st-btn {
  border-radius: var(--st-radius-md);
  font-size: var(--st-font-body-size);
  font-weight: var(--st-font-weight-semibold);
  height: 42px;
  min-height: 42px;
}

.st-customer-create-panel .st-slide-panel-footer .st-btn:not(.st-btn-primary) {
  width: 120px;
}

.st-customer-create-panel .st-slide-panel-footer .st-btn-primary {
  width: 180px;
}

.st-field.is-full {
  grid-column: 1 / -1;
}

.st-customer-detail-page-header .st-page-header-main,
.st-customer-detail-page-header .st-page-header-copy,
.st-customer-detail-header {
  width: 100%;
}

.st-customer-detail-page-header .st-page-header-main {
  align-items: center;
}

.st-customer-detail-header {
  align-items: center;
  display: flex;
  gap: var(--st-space-4);
  justify-content: space-between;
  min-width: 0;
}

.st-customer-detail-header-copy {
  display: grid;
  gap: var(--st-space-1);
  min-width: 0;
}

.st-customer-detail-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--st-space-2);
  min-width: 0;
}

.st-customer-detail-title-row h1 {
  color: var(--st-color-text-primary);
  font-size: var(--st-font-display-h1-size);
  font-weight: var(--st-font-weight-bold);
  letter-spacing: 0;
  line-height: var(--st-line-height-tight);
  margin: 0;
}

.st-customer-detail-header-copy p {
  color: var(--st-color-text-secondary);
  font-size: var(--st-font-small-size);
  margin: 0;
}

.st-customer-detail-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: var(--st-space-2);
  justify-content: flex-end;
}

.st-customer-detail-content {
  background: var(--st-color-surface-background);
  padding: var(--st-page-gutter);
}

.st-customer-detail-grid {
  align-items: start;
  display: grid;
  gap: var(--st-space-5);
  grid-template-columns: minmax(0, 1007px) minmax(360px, 617px);
  justify-content: space-between;
  width: 100%;
}

.st-customer-detail-grid.is-quotes-tab,
.st-customer-detail-grid.is-collection-tab {
  grid-template-columns: minmax(0, 1fr);
}

.st-customer-detail-main,
.st-customer-detail-side {
  min-width: 0;
}

.st-customer-contact-card.st-page-section.is-surface,
.st-customer-summary-card {
  background: var(--st-color-surface-white);
  border: 1px solid var(--st-color-border-default);
  border-radius: var(--st-radius-xl);
  box-shadow: var(--st-elevation-pill);
}

.st-customer-contact-card.st-page-section.is-surface {
  align-content: start;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 832px;
  padding: 22px var(--st-space-6) var(--st-space-6);
}

.st-customer-contact-card .st-page-section-header {
  border-bottom-color: var(--st-color-border-default);
  margin: 0;
  padding: 10px 10px 20px 0;
}

.st-customer-contact-card .st-page-section-copy h2,
.st-customer-summary-card h2 {
  color: var(--st-color-text-primary);
  font-size: var(--st-font-title-h3-size);
  font-weight: var(--st-font-weight-bold);
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.st-customer-contact-card .st-page-section-content {
  min-width: 0;
}

.st-customer-detail-list {
  display: grid;
  gap: 0;
  margin: 0;
  min-width: 0;
}

.st-customer-detail-list div {
  border-bottom: 1px solid var(--st-color-border-subtle);
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 0;
}

.st-customer-detail-list div:first-child {
  padding-top: 0;
}

.st-customer-detail-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.st-customer-detail-list dt {
  color: var(--st-color-text-secondary);
  font-size: var(--st-font-caption-size);
  font-weight: var(--st-font-weight-medium);
  line-height: 1;
}

.st-customer-detail-list dd {
  color: var(--st-color-text-primary);
  font-size: 14.5px;
  font-weight: var(--st-font-weight-regular);
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.st-customer-notes {
  white-space: pre-wrap;
}

.st-customer-summary-card {
  display: grid;
  gap: var(--st-space-4);
  padding: 20px var(--st-space-6);
}

.st-customer-summary-card-header {
  border-bottom: 1px solid var(--st-color-border-default);
  padding-bottom: 20px;
}

.st-customer-summary-metrics {
  display: grid;
  gap: 16px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.st-customer-summary-metrics div {
  background: var(--st-color-surface-background);
  border-radius: var(--st-radius-lg);
  display: grid;
  gap: 3px;
  min-height: 76px;
  min-width: 0;
  padding: 14px 16px 13px;
}

.st-customer-summary-metrics strong {
  color: var(--st-color-text-primary);
  font-size: var(--st-font-display-h1-size);
  font-weight: var(--st-font-weight-bold);
  line-height: 1;
  overflow-wrap: anywhere;
}

.st-customer-summary-metrics strong.is-brand {
  color: var(--st-color-brand-primary);
}

.st-customer-summary-metrics strong.is-success {
  color: var(--st-color-success);
}

.st-customer-summary-metrics strong.is-warning {
  color: var(--st-color-warning);
}

.st-customer-summary-metrics span {
  color: var(--st-color-text-secondary);
  font-size: var(--st-font-caption-size);
  font-weight: var(--st-font-weight-regular);
  line-height: 1;
}

.st-customer-summary-divider {
  background: var(--st-color-border-subtle);
  height: 1px;
  width: 100%;
}

.st-customer-recent-quote {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.st-customer-recent-quote h3 {
  color: var(--st-color-text-muted);
  font-size: var(--st-font-overline-size);
  font-weight: var(--st-font-weight-semibold);
  letter-spacing: 0.04em;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.st-customer-recent-quote-card {
  align-items: center;
  background: var(--st-color-surface-white);
  border: 1px solid var(--st-color-border-default);
  border-radius: var(--st-radius-lg);
  display: flex;
  gap: var(--st-space-4);
  justify-content: space-between;
  min-height: 76px;
  min-width: 0;
  padding: 20px;
}

.st-customer-recent-quote-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.st-customer-recent-quote-copy strong {
  color: var(--st-color-text-primary);
  font-size: var(--st-font-body-size);
  font-weight: var(--st-font-weight-semibold);
  line-height: 1;
}

.st-customer-recent-quote-copy span {
  color: var(--st-color-text-secondary);
  font-size: 12.5px;
  font-weight: var(--st-font-weight-regular);
  line-height: 1;
}

.st-customer-recent-quote-card .st-status-pill {
  flex: 0 0 auto;
}

.st-customer-quotes-section .st-page-section-content {
  display: grid;
  gap: var(--st-space-4);
}

@media (max-width: 1180px) {
  .st-customer-detail-grid {
    grid-template-columns: 1fr;
  }

  .st-customer-contact-card.st-page-section.is-surface {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .st-customer-filters-top,
  .st-customer-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .st-customer-search-field {
    flex: 1 1 auto;
  }

  .st-customer-filter-summary {
    align-items: flex-start;
    min-height: auto;
  }

  .st-customer-detail-side {
    position: static;
  }

  .st-customer-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .st-customer-detail-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .st-customer-detail-actions .st-btn {
    flex: 1 1 180px;
  }
}

@media (max-width: 699px) {
  .st-customer-create-panel .st-slide-panel-header,
  .st-customer-create-panel .st-slide-panel-body,
  .st-customer-create-panel .st-slide-panel-footer {
    padding-left: var(--st-space-4);
    padding-right: var(--st-space-4);
  }

  .st-customer-create-row.is-two,
  .st-customer-create-row.is-three {
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .st-customer-create-panel .st-slide-panel-footer {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .st-customer-create-panel .st-slide-panel-footer .st-btn:not(.st-btn-primary) {
    width: 120px;
  }

  .st-customer-create-panel .st-slide-panel-footer .st-btn-primary {
    width: 120px;
  }

  .st-customer-card-grid,
  .st-customer-summary-metrics {
    grid-template-columns: 1fr;
  }

  .st-customer-card__meta {
    align-items: stretch;
    flex-direction: column;
  }

  .st-customer-card__contact {
    flex-direction: column;
    gap: var(--st-space-2);
  }

  .st-customer-card__contact-item:first-child,
  .st-customer-card__contact-item:last-child {
    flex: 0 1 auto;
  }

  .st-customer-card__metrics {
    flex-wrap: wrap;
  }

  .st-customer-recent-quote-card {
    align-items: stretch;
    flex-direction: column;
  }

  .st-customer-detail-title-row h1 {
    font-size: var(--st-font-heading-h2-size);
  }

  .st-customer-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .st-customer-detail-actions .st-btn {
    width: 100%;
  }
}
