.customer-profile-screen {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: clamp(14px, 2vw, 28px) clamp(14px, 2vw, 28px) 104px;
  color: #253c48;
  background: #f4f7f6;
  scrollbar-color: #91a5af #e9efef;
  scrollbar-width: thin;
  caret-color: #c95349;
}
.customer-profile-shell { width: min(100%, 1380px); margin: 0 auto; }
.customer-profile-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}
.customer-profile-toolbar h1 {
  margin: 0;
  color: #203b4b;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 760;
  letter-spacing: -.025em;
  line-height: 1.15;
}
.customer-profile-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #d3dfe2;
  border-radius: 10px;
  background: #fff;
  color: #31566a;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.customer-profile-back:hover { background: #edf4f4; border-color: #aabdc5; }
.customer-profile-back:focus-visible,
.ws-customer-period-button:focus-visible,
.ws-customer-identity button:focus-visible,
.ws-customer-reward-action:focus-visible,
.ws-customer-history button:focus-visible,
.ws-customer-notes button:focus-visible {
  outline: 3px solid #315b79;
  outline-offset: 2px;
}
.ws-customer-profile-body { min-width: 0; }
.ws-customer-loading,
.ws-customer-empty {
  margin: 12px 0;
  padding: 15px 16px;
  color: #526873;
  background: #edf3f3;
  border-radius: 10px;
  line-height: 1.5;
}
.ws-customer-identity {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto auto;
  align-items: center;
  gap: 6px 16px;
  min-width: 0;
  margin: 0 0 18px;
  padding: 22px 24px !important;
  border: 1px solid #e1e9e9 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(34, 60, 72, .06) !important;
  animation: customerProfileArrive 380ms cubic-bezier(.16, 1, .3, 1) both;
}
.ws-customer-identity.ws-customer-no-entry { animation: none; }
.ws-customer-photo { grid-column: 1; grid-row: 1 / span 3; width: 58px; height: 58px; border: 1px solid #e2c4be; border-radius: 16px; object-fit: cover; background: #fff0ed; }
.ws-customer-avatar {
  grid-column: 1;
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #f1c9c2;
  border-radius: 16px;
  background: #fff0ed;
  color: #9c453c;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
}
.ws-customer-identity h2 {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
  color: #203b4b;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.ws-customer-status {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.ws-customer-status.is-positive { color: #14683b; background: #e7f5ec; border-color: #b8e0c7; }
.ws-customer-status.is-caution { color: #765313; background: #fff5dc; border-color: #efd99b; }
.ws-customer-status.is-negative { color: #9c3535; background: #fff0ee; border-color: #efc3be; }
.ws-customer-status.is-neutral { color: #405c6b; background: #eaf1f3; border-color: #d0dfe3; }
.ws-customer-identity > p {
  grid-column: 2;
  margin: 0;
  color: #435b67;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ws-customer-identity > p:nth-of-type(1) { grid-row: 2; font-size: 13px; }
.ws-customer-identity > p:nth-of-type(2) { grid-row: 3; color: #5b707a; font-size: 12px; }
.ws-customer-tags { grid-column: 2; grid-row: 4; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ws-customer-identity .ws-actions {
  grid-column: 3;
  grid-row: 2 / span 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}
.ws-customer-identity .ws-actions button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #cbd9de;
  border-radius: 10px;
  background: #fff;
  color: #31566a;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.ws-customer-identity .ws-actions button:hover { background: #edf4f4; border-color: #a7bdc5; }
.ws-customer-identity .ws-actions #wsCustomerOrder {
  border-color: #cf554b;
  background: #cf554b;
  color: #fff;
}
.ws-customer-identity .ws-actions #wsCustomerOrder:hover { background: #b9473e; border-color: #b9473e; }
.ws-customer-identity .ws-actions .ws-customer-history-jump { background: #edf3f5; }
.ws-customer-identity .ws-actions button:not(#wsCustomerWA):not(#wsCustomerOrder):not(.ws-customer-history-jump) { background: #fff8e8; border-color: #e8d49a; color: #725318; }
.ws-customer-data-strip {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0 !important;
  margin: 0 0 26px !important;
  overflow: hidden;
  border: 1px solid #e0e8e8;
  border-radius: 14px;
  background: #fff;
}
.ws-customer-data-strip > h3 {
  grid-column: 1 / -1;
  margin: 0;
  padding: 13px 16px;
  border-bottom: 1px solid #e8eeee;
  color: #294858;
  font-size: 13px;
  font-weight: 750;
}
.ws-customer-stat {
  min-width: 0;
  min-height: 96px;
  padding: 14px 13px 12px;
  border-right: 1px solid #e8eeee;
}
.ws-customer-stat:last-child { border-right: 0; }
.ws-customer-stat > span,
.ws-customer-stat > small { display: block; color: #526873; font-size: 11px; line-height: 1.4; }
.ws-customer-stat > strong {
  display: block;
  margin: 7px 0 5px;
  color: #203b4b;
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 760;
  line-height: 1.18;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.ws-customer-stat > small { color: #60747e; font-size: 10px; }
.ws-customer-analysis { position: relative; min-width: 0; margin: 0 0 24px; transition: opacity 180ms ease, transform 180ms ease; }
.ws-customer-analysis.is-period-refreshing { opacity: .68; transform: translateY(2px); pointer-events: none; }
.ws-customer-analysis.is-period-refreshing::before { position: absolute; z-index: 2; top: 0; left: 0; width: 34%; height: 3px; border-radius: 99px; background: #d86b5f; content: ''; animation: ws-customer-period-progress 900ms ease-in-out infinite alternate; }
.ws-customer-analysis.ws-customer-period-entering { opacity: 0; transform: translateY(7px); }
@keyframes ws-customer-period-progress { from { transform: translateX(0); } to { transform: translateX(190%); } }
@media (prefers-reduced-motion: reduce) {
  .ws-customer-analysis { transition: none; }
  .ws-customer-analysis.is-period-refreshing::before { animation: none; width: 100%; }
}
.ws-customer-analytics-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 15px;
}
.ws-customer-analytics-head h2 {
  margin: 0 0 5px;
  color: #203b4b;
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 760;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.ws-customer-analytics-head p,
.ws-panel-heading p { margin: 0; color: #536a75; font-size: 12px; line-height: 1.5; }
.ws-customer-period {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 3px;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid #dce5e6;
  border-radius: 12px;
  background: #eaf0f0;
}
.ws-customer-period-button {
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #435c68;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.ws-customer-period-button:hover { background: #f8fbfb; border-color: #d9e3e5; }
.ws-customer-period-button.active { background: #284f64; border-color: #284f64; color: #fff; }
.ws-customer-trend-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  padding: 14px 17px;
  border: 1px solid #dce5e6;
  border-radius: 14px;
  background: #fff;
}
.ws-customer-trend-summary.is-up { border-color: #b7dfc6; background: #f0faf3; }
.ws-customer-trend-summary.is-down { border-color: #efc3be; background: #fff4f2; }
.ws-customer-trend-summary.is-flat { border-color: #dce5e6; background: #fff; }
.ws-customer-trend-summary > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px; min-width: 0; }
.ws-customer-direction { grid-row: 1 / span 2; align-self: center; color: #506773; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.ws-customer-trend-summary.is-up .ws-customer-direction { color: #17683b; }
.ws-customer-trend-summary.is-down .ws-customer-direction { color: #9d3734; }
.ws-customer-trend-summary strong { color: #233f4e; font-size: 15px; line-height: 1.3; }
.ws-customer-trend-summary small { color: #516873; font-size: 11px; font-variant-numeric: tabular-nums; }
.ws-customer-trend-summary p { max-width: 42ch; margin: 0; color: #516873; font-size: 11px; line-height: 1.45; text-align: right; }
.ws-customer-period-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 18px;
  border-top: 1px solid #dce5e6;
  border-bottom: 1px solid #dce5e6;
  background: #f8faf9;
}
.ws-customer-period-stats > div { min-width: 0; padding: 12px 15px; border-right: 1px solid #dce5e6; }
.ws-customer-period-stats > div:last-child { border-right: 0; }
.ws-customer-period-stats span,
.ws-customer-period-stats strong { display: block; }
.ws-customer-period-stats span { color: #526873; font-size: 11px; line-height: 1.4; }
.ws-customer-period-stats strong { margin-top: 5px; color: #203b4b; font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ws-customer-chart-grid,
.ws-customer-preference-grid,
.ws-customer-profile-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .95fr); gap: 16px; margin: 16px 0; align-items: start; }
.ws-analytics-panel {
  min-width: 0;
  padding: 19px;
  border: 1px solid #e0e8e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(29, 55, 67, .045);
}
.ws-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 0 0 12px; }
.ws-trend-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; margin: -1px 0 9px; }
.ws-trend-legend > span { display: inline-flex; align-items: center; gap: 6px; color: #435d69; font-size: 10px; line-height: 1.35; }
.ws-trend-mark { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 2px; background: #39789a; }
.ws-mark-value { width: 18px; background: linear-gradient(90deg, #18864b 0 33%, #d14747 33% 66%, #87969d 66% 100%); }
.ws-mark-count { position: relative; width: 15px; height: 2px; border-radius: 999px; background: #254c63; }
.ws-mark-count::after { position: absolute; top: -2px; left: 6px; width: 6px; height: 6px; border: 1px solid #254c63; border-radius: 50%; background: #fff; content: ''; }
.ws-mark-up { background: #18864b; }
.ws-mark-down { background: #d14747; }
.ws-mark-flat { background: #87969d; }
.ws-panel-heading h3 { margin: 0 0 4px; color: #253f4e; font-size: 16px; font-weight: 750; line-height: 1.3; }
.ws-customer-chart { position: relative; height: 290px; min-width: 0; }
.ws-customer-footnote,
.ws-customer-data-note { margin: 10px 0 0; color: #536a75; font-size: 10px; line-height: 1.5; }
.ws-payment-layout { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); align-items: center; gap: 15px; }
.ws-payment-chart { position: relative; width: 100%; height: 190px; min-width: 0; }
.ws-payment-legend { display: grid; gap: 8px; min-width: 0; }
.ws-payment-legend-row { display: grid; grid-template-columns: 11px minmax(0, 1fr); align-items: start; gap: 8px; }
.ws-payment-swatch { width: 10px; height: 10px; margin-top: 4px; border-radius: 3px; background: var(--payment-color, #71818a); }
.ws-payment-legend-row strong,
.ws-payment-legend-row small { display: block; overflow-wrap: anywhere; }
.ws-payment-legend-row strong { color: #294553; font-size: 12px; line-height: 1.35; }
.ws-payment-legend-row small { margin-top: 2px; color: #536a75; font-size: 10px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.ws-customer-rank-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ws-customer-rank-list li { min-width: 0; padding: 0 0 10px; border-bottom: 1px solid #edf1f1; }
.ws-customer-rank-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.ws-rank-copy { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.ws-rank-copy strong { color: #2e4a59; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.ws-rank-copy span { flex: 0 0 auto; color: #536a75; font-size: 10px; line-height: 1.4; text-align: right; font-variant-numeric: tabular-nums; }
.ws-rank-track { height: 6px; overflow: hidden; border-radius: 999px; background: #e8eeee; }
.ws-rank-track span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: #39789a; }
.ws-rank-track .rank-1 { background: #cf6256; }
.ws-rank-track .rank-2 { background: #39789a; }
.ws-rank-track .rank-3 { background: #4f9b7c; }
.ws-rank-track .rank-4 { background: #d7a03b; }
.ws-rank-track .rank-5 { background: #748d9a; }
.ws-rank-track .rank-6 { background: #9c8c70; }
.ws-customer-segment-status { display: inline-flex; align-items: center; min-height: 30px; margin: 0 0 8px; padding: 4px 10px; border: 1px solid transparent; border-radius: 999px; font-size: 12px; font-weight: 750; }
.ws-customer-segment-status.is-positive { color: #14683b; background: #e7f5ec; border-color: #b8e0c7; }
.ws-customer-segment-status.is-caution { color: #765313; background: #fff5dc; border-color: #efd99b; }
.ws-customer-segment-status.is-negative { color: #9c3535; background: #fff0ee; border-color: #efc3be; }
.ws-customer-segment-status.is-neutral { color: #405c6b; background: #eaf1f3; border-color: #d0dfe3; }
.ws-customer-segment > p { margin: 0 0 12px; color: #435d69; font-size: 12px; line-height: 1.5; }
.ws-customer-profile-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #e7eded; }
.ws-customer-profile-facts > div { min-width: 0; padding: 10px 10px 10px 0; border-bottom: 1px solid #e7eded; }
.ws-customer-profile-facts > div:nth-child(odd) { border-right: 1px solid #e7eded; }
.ws-customer-profile-facts > div:nth-child(even) { padding-left: 12px; }
.ws-customer-profile-facts span,
.ws-customer-profile-facts strong,
.ws-customer-profile-facts small { display: block; }
.ws-customer-profile-facts span { color: #536a75; font-size: 10px; line-height: 1.4; }
.ws-customer-profile-facts strong { margin-top: 4px; color: #253f4e; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ws-customer-profile-facts small { margin-top: 3px; color: #536a75; font-size: 10px; line-height: 1.4; }
.ws-customer-segment .ws-customer-footnote { margin-top: 10px; }
.ws-customer-reward-action { min-height: 44px; margin: 11px 0 2px; padding: 0 13px; border: 1px solid #e4d08f; border-radius: 9px; background: #fff8e6; color: #6e5319; font: inherit; font-size: 12px; font-weight: 720; cursor: pointer; }
.ws-customer-reward-action:hover { background: #fff1c8; }
.ws-customer-interval { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 11px 0; border-top: 1px solid #e7eded; border-bottom: 1px solid #e7eded; }
.ws-customer-interval span { color: #536a75; font-size: 11px; }
.ws-customer-interval strong { color: #203b4b; font-size: 17px; font-variant-numeric: tabular-nums; }
.ws-customer-pattern h4 { margin: 13px 0 7px; color: #304b5a; font-size: 11px; font-weight: 750; }
.ws-pattern-list { display: grid; gap: 6px; }
.ws-pattern-list > div { display: grid; grid-template-columns: 74px 28px minmax(30px, 1fr); align-items: center; gap: 8px; min-height: 18px; }
.ws-pattern-list span { color: #4c6470; font-size: 10px; }
.ws-pattern-list strong { color: #294553; font-size: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.ws-pattern-list i { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #e9eeee; }
.ws-pattern-list i b { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: #39789a; }
.ws-customer-highlights { margin-top: 16px; }
.ws-customer-highlight-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid #e7eded; }
.ws-customer-highlight-row > div { min-width: 0; padding: 12px 15px 3px 0; }
.ws-customer-highlight-row > div + div { padding-left: 15px; border-left: 1px solid #e7eded; }
.ws-customer-highlight-row span,
.ws-customer-highlight-row strong,
.ws-customer-highlight-row small { display: block; }
.ws-customer-highlight-row span { color: #536a75; font-size: 11px; }
.ws-customer-highlight-row strong { margin: 6px 0 4px; color: #203b4b; font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ws-customer-highlight-row small { color: #536a75; font-size: 10px; line-height: 1.45; }
.ws-customer-data-note { margin: 13px 2px 0; }
.ws-customer-history,
.ws-customer-incidents,
.ws-customer-notes { margin: 18px 0 !important; scroll-margin-top: 24px; }
.ws-customer-history > h3,
.ws-customer-incidents > h3,
.ws-customer-notes > h3 { color: #294858; font-size: 16px; }
.ws-customer-history .ws-list-row { align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid #e8eeee; }
.ws-customer-history .ws-list-row > div { min-width: 0; }
.ws-customer-history .ws-list-row strong { color: #294858; font-variant-numeric: tabular-nums; }
.ws-customer-history .ws-list-row small { display: block; margin-top: 4px; color: #536a75; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.ws-customer-history .ws-list-row .ws-order-service { color: #304f60; font-weight: 650; }
.ws-customer-history .ws-list-row .ws-order-method { color: #526873; }
.ws-customer-history .ws-list-row button { min-height: 40px; margin-top: 7px; padding: 0 12px; border: 1px solid #cbd9de; border-radius: 9px; background: #f5f8f8; color: #31566a; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.ws-customer-incidents .ws-note,
.ws-customer-notes .ws-note { padding: 12px 0; border-top: 1px solid #e8eeee; color: #3f5966; line-height: 1.5; overflow-wrap: anywhere; }
.ws-customer-notes textarea { width: 100%; min-height: 90px; padding: 11px 12px; border: 1px solid #cbd9de; border-radius: 10px; color: #253c48; background: #fff; font: inherit; line-height: 1.45; resize: vertical; }
.ws-customer-notes textarea:focus { border-color: #39789a; outline: 2px solid #39789a33; }
.ws-customer-notes #wsSaveNote { min-height: 44px; margin: 9px 0 10px; padding: 0 14px; border: 1px solid #315b79; border-radius: 9px; background: #315b79; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.ws-customer-chart-error { margin: 12px 0; padding: 14px; border: 1px solid #efc3be; border-radius: 10px; background: #fff4f2; color: #8d3935; }
.customer-profile-screen ::selection { background: #f4c6bf; color: #382d2b; }
@keyframes customerProfileArrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1050px) {
  .ws-customer-data-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ws-customer-stat:nth-child(4) { border-right: 0; }
  .ws-customer-stat:nth-child(n + 5) { border-top: 1px solid #e8eeee; }
  .ws-customer-chart-grid,
  .ws-customer-preference-grid,
  .ws-customer-profile-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr); }
  .ws-trend-panel,
  .ws-payment-panel { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .main-content > .customer-profile-screen {
    height: calc(100dvh - var(--jafa-topbar-space, 62px) - 20px - 59px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - var(--jafa-topbar-space, 62px) - 20px - 59px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .customer-profile-screen { padding: 12px 12px 100px; }
  .customer-profile-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 13px; }
  .customer-profile-back { min-height: 44px; padding: 0 10px; }
  .ws-customer-identity {
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    gap: 6px 12px;
    padding: 16px 14px !important;
  }
  .ws-customer-avatar { grid-column: 1; grid-row: 1 / span 3; width: 48px; height: 48px; border-radius: 14px; font-size: 16px; }
  .ws-customer-identity h2 { grid-column: 2; grid-row: 1; font-size: 20px; }
  .ws-customer-status { grid-column: 2; grid-row: 2; justify-self: start; min-height: 25px; padding: 2px 8px; }
  .ws-customer-identity > p:nth-of-type(1) { grid-column: 2; grid-row: 3; font-size: 12px; }
  .ws-customer-identity > p:nth-of-type(2) { grid-column: 1 / -1; grid-row: 4; margin-top: 3px; }
  .ws-customer-tags { grid-column: 1 / -1; grid-row: 5; }
  .ws-customer-identity .ws-actions { grid-column: 1 / -1; grid-row: 6; justify-content: flex-start; gap: 7px; margin-top: 7px; }
  .ws-customer-identity .ws-actions button { flex: 1 1 auto; min-width: 100px; padding: 0 10px; font-size: 11px; }
  .ws-customer-data-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 22px !important; }
  .ws-customer-stat { min-height: 86px; padding: 11px 10px; border-top: 1px solid #e8eeee; }
  .ws-customer-stat:nth-child(odd) { border-right: 1px solid #e8eeee; }
  .ws-customer-stat:nth-child(even) { border-right: 0; }
  .ws-customer-stat > strong { margin: 5px 0 3px; font-size: 16px; }
  .ws-customer-stat > span { font-size: 10px; }
  .ws-customer-stat > small { font-size: 9px; }
  .ws-customer-analytics-head { flex-direction: column; align-items: stretch; gap: 11px; }
  .ws-customer-analytics-head h2 { font-size: 21px; }
  .ws-customer-period { width: 100%; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ws-customer-period-button { min-height: 44px; padding: 0 3px; font-size: 11px; }
  .ws-customer-trend-summary { align-items: flex-start; flex-direction: column; gap: 7px; padding: 13px; }
  .ws-customer-trend-summary > div { grid-template-columns: 60px minmax(0, 1fr); }
  .ws-customer-trend-summary p { max-width: none; text-align: left; }
  .ws-customer-period-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-customer-period-stats > div { padding: 10px 9px; border-bottom: 1px solid #dce5e6; }
  .ws-customer-period-stats > div:nth-child(even) { border-right: 0; }
  .ws-customer-period-stats > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .ws-customer-period-stats strong { font-size: 13px; }
  .ws-customer-chart-grid,
  .ws-customer-preference-grid,
  .ws-customer-profile-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 12px 0; }
  .ws-trend-panel { grid-column: auto; }
  .ws-analytics-panel { padding: 15px 13px; border-radius: 14px; }
  .ws-panel-heading h3 { font-size: 15px; }
  .ws-customer-chart { height: 255px; }
  .ws-payment-layout { grid-template-columns: minmax(130px, 44%) minmax(0, 1fr); gap: 11px; }
  .ws-payment-chart { height: 170px; }
  .ws-payment-legend { gap: 7px; }
  .ws-payment-legend-row { gap: 6px; }
  .ws-payment-legend-row strong { font-size: 11px; }
  .ws-payment-legend-row small { font-size: 9px; }
  .ws-rank-copy { align-items: flex-start; flex-direction: column; gap: 2px; }
  .ws-rank-copy span { text-align: left; }
  .ws-customer-highlight-row { grid-template-columns: minmax(0, 1fr); }
  .ws-customer-highlight-row > div { padding: 11px 0; }
  .ws-customer-highlight-row > div + div { padding-left: 0; border-left: 0; border-top: 1px solid #e7eded; }
  .ws-customer-history .ws-list-row { flex-direction: row; }
  .ws-customer-history .ws-list-row > div:last-child { text-align: right; }
}
@media (max-width: 390px) {
  .ws-customer-identity .ws-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ws-customer-identity .ws-actions button { min-width: 0; width: 100%; }
  .ws-customer-identity .ws-actions #wsCustomerOrder { grid-column: 1 / -1; grid-row: 1; }
  .ws-customer-identity .ws-actions #wsCustomerWA { grid-column: 1; grid-row: 2; }
  .ws-customer-identity .ws-actions .ws-customer-history-jump { grid-column: 2; grid-row: 2; }
  .ws-customer-identity .ws-actions button:not(#wsCustomerWA):not(#wsCustomerOrder):not(.ws-customer-history-jump):not(.ws-customer-edit):not(.ws-customer-upload-photo) { grid-column: 1 / -1; grid-row: 3; }
  .ws-payment-layout { grid-template-columns: 1fr; }
  .ws-payment-chart { width: min(100%, 210px); height: 190px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-customer-identity { animation: none; }
  .customer-profile-back, .ws-customer-period-button, .ws-customer-identity .ws-actions button { transition: none; }
}

/* XUI customer profile layer: lead with the person and money; keep promo contextual. */
.ws-customer-stat > span { color: #435c68; font-size: 11px; }
.ws-customer-stat > small { color: #596d76; font-size: 10px; }
.ws-customer-stat.is-outstanding { background: #fff8e9; }
.ws-customer-stat.is-outstanding > strong { color: #8a5b13; }
.ws-promo10-profile {
  padding: 16px 18px !important;
  border: 1px solid #eedcc5 !important;
  border-left: 4px solid #cf554b !important;
  border-radius: 14px !important;
  background: #fffaf4 !important;
  box-shadow: 0 3px 12px rgba(76, 55, 32, .04) !important;
}
.ws-promo10-profile .card-header { padding: 0 0 8px; border-bottom: 1px solid #f0e5d8; }
.ws-promo10-profile .card-header h3 { margin: 0; color: #62472f; font-size: 14px; }
.ws-promo10-profile > div:last-child { margin: 8px 0 0 !important; }

@media (max-width: 700px) {
  .ws-customer-identity .ws-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .ws-customer-identity .ws-actions button { width: 100%; min-width: 0; }
  .ws-customer-identity .ws-actions #wsCustomerOrder { grid-column: 1 / -1; grid-row: 1; }
  .ws-customer-identity .ws-actions #wsCustomerWA { grid-column: 1; grid-row: 2; }
  .ws-customer-identity .ws-actions .ws-customer-history-jump { grid-column: 2; grid-row: 2; }
  .ws-customer-identity .ws-actions .ws-customer-edit { grid-column: 1; grid-row: 3; }
  .ws-customer-identity .ws-actions .ws-customer-upload-photo { grid-column: 2; grid-row: 3; }
  .ws-customer-stat { min-height: 90px; }
  .ws-customer-stat > span { font-size: 11px; }
  .ws-customer-stat > small { font-size: 10px; }
}
