body.loyalty-page-body {
  min-height: 100vh;
  background: linear-gradient(180deg, #fbf6f1 0%, #f4ede6 100%);
  color: #2c2018;
}

.loyalty-nav-shell {
  position: sticky;
  top: 0;
  z-index: 20;
}

.loyalty-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.loyalty-hero-card,
.loyalty-panel,
.tier-progress-card,
.detail-card,
.stat-card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(139, 26, 26, .1);
  box-shadow: 0 14px 36px rgba(54, 28, 14, .08);
}

.loyalty-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, .9fr);
  gap: 28px;
  border-radius: 28px;
  padding: 32px;
  margin-bottom: 24px;
}

.loyalty-eyebrow,
.panel-eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  color: #8b1a1a;
  font-weight: 700;
}

.loyalty-hero-card h1,
.panel-head h2,
.account-head h2 {
  margin: 10px 0 12px;
}

.loyalty-benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.loyalty-benefit-grid article,
.loyalty-hero-stat {
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(139, 26, 26, .05), rgba(255,255,255,.9));
  border: 1px solid rgba(139, 26, 26, .08);
}

.loyalty-hero-stat ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.loyalty-layout,
.details-grid,
.stat-grid {
  display: grid;
  gap: 18px;
}

.loyalty-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
}

.loyalty-panel,
.tier-progress-card,
.detail-card {
  border-radius: 24px;
  padding: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.panel-head p,
.account-head p {
  max-width: 420px;
  margin: 0;
  color: #6f594a;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label,
.lookup-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-grid input,
.lookup-row input {
  width: 100%;
  border: 1px solid rgba(139, 26, 26, .16);
  border-radius: 14px;
  background: #fff;
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
}

.lookup-row {
  flex-direction: row;
  align-items: center;
}

.primary-btn,
.ghost-btn {
  border-radius: 14px;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.primary-btn {
  border: 0;
  background: #8b1a1a;
  color: #fff;
}

.ghost-btn {
  background: transparent;
  color: #8b1a1a;
  border: 1px solid rgba(139, 26, 26, .24);
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.inline-message {
  min-height: 24px;
  margin-top: 12px;
  font-size: .95rem;
  color: #6f594a;
}

.inline-message.success { color: #1f7a45; }
.inline-message.error { color: #b42318; }

.account-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stat-card {
  border-radius: 22px;
  padding: 20px;
}

.stat-card.emphasis {
  background: linear-gradient(135deg, #8b1a1a 0%, #b25a26 100%);
  color: #fff;
}

.stat-label {
  display: block;
  font-size: .84rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .8;
  margin-bottom: 12px;
}

.stat-card strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.1;
}

.stat-card small {
  display: block;
  margin-top: 8px;
  color: inherit;
  opacity: .78;
}

.tier-progress-head,
.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(139, 26, 26, .1);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b1a1a 0%, #c7893c 100%);
}

.details-grid {
  grid-template-columns: 1.05fr .95fr;
}

.reward-list,
.txn-list {
  display: grid;
  gap: 12px;
}

.reward-item,
.txn-item {
  border: 1px solid rgba(139, 26, 26, .1);
  border-radius: 18px;
  padding: 14px 16px;
  background: #fffdfb;
}

.reward-item.locked { opacity: .7; }
.reward-item-head,
.txn-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 6px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  background: rgba(139, 26, 26, .1);
  color: #8b1a1a;
}

.badge-pill.eligible {
  background: rgba(31, 122, 69, .12);
  color: #1f7a45;
}

.txn-points.positive { color: #1f7a45; }
.txn-points.negative { color: #b42318; }

.empty-state {
  color: #6f594a;
  font-size: .95rem;
}

.anchor-btn { white-space: nowrap; }

@media (max-width: 960px) {
  .loyalty-hero-card,
  .loyalty-layout,
  .details-grid,
  .stat-grid,
  .loyalty-benefit-grid {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .account-head,
  .tier-progress-head,
  .detail-head,
  .lookup-row {
    flex-direction: column;
  }
}
