/* pages/retention.css — Customer Retention & VIP Buyers Club */
.ret-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-4) var(--sp-6) var(--sp-8);
  max-width: 1540px;
  margin: 0 auto;
}

.ret-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.ret-header h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px 0;
  color: var(--brand);
}

.ret-header p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

/* RFM Segments Strip */
.ret-segments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-3);
}

.ret-seg-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.ret-seg-card:hover {
  border-color: var(--info-vivid);
  transform: translateY(-2px);
  box-shadow: var(--sh-1);
}

.ret-seg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ret-seg-title {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--ink);
}

.ret-seg-count {
  font-size: var(--fs-xs);
  font-weight: 800;
  background: var(--surface-3);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  color: var(--brand);
}

.ret-seg-desc {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  line-height: 1.45;
  margin: 0;
}

.ret-seg-stats {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  color: var(--ink-muted);
}

.ret-seg-stats b {
  color: var(--ink);
}

/* Executive Table Design */
.ret-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.ret-table th {background: var(--surface-2);
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px;
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.ret-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.ret-table tr:hover td {
  background: var(--surface-2);
}

/* A section per currency, and the source line (2026-09-16: real figures, no named customers) */
.ret-cur {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

.ret-cur-h {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--brand);
}

.ret-source {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-xs);
}

/* Table Toolbar Controls */
.ret-table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}

.ret-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.ret-search-input {
  padding: 8px 12px 8px 34px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: var(--fs-sm);
  color: var(--ink);
  width: 280px;
  transition: all var(--dur-fast) var(--ease);
}

.ret-search-input:focus {
  border-color: var(--info-vivid);
  outline: none;
  width: 320px;
}

.ret-search-icon {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
  pointer-events: none;
}

.ret-filter-select {
  padding: 8px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: var(--fs-sm);
  color: var(--ink);
  cursor: pointer;
}

.ret-filter-select:focus {
  border-color: var(--info-vivid);
  outline: none;
}

/* Top shoppers (2026-09-27): the heading and its note on two lines -- they ran together -- and the size choice beside */
.card-h .ret-sub {
  display: block;
  margin: 4px 0 0;
  text-align: left;
  font-size: var(--fs-sm);
  max-width: 72ch;
}

.ret-top-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
}

.ret-more {
  margin: 8px 0 0;
  font-size: var(--fs-sm);
}

/* a shopper number is one token: it broke after "S-" on a phone */
.ret-table .chip { white-space: nowrap; }
