/* Loyalty screen layout restoration */
#sc-loyalty .tbar.dark {
  display: flex !important;
  align-items: center;
  flex: 0 0 64px;
  width: 100%;
  height: 64px;
  box-sizing: border-box;
  padding: 0 8px;
  background: var(--surface-2, var(--cream));
  border-bottom: 1px solid var(--border, rgba(28, 20, 16, 0.08));
  box-shadow: none;
  visibility: visible;
}

#sc-loyalty .tbar.dark .back-btn {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

#sc-loyalty .tbar.dark .tbar-title.w {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #fff !important;
  font-family: 'Google Sans', 'DM Sans', sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

html body #shell #sc-loyalty .tbar.dark .tbar-title.w {
  color: #fff !important;
}

#sc-loyalty .loy-hero {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: auto;
  min-height: 0;
  margin: 4px 16px 16px;
  padding: 22px 22px 24px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(155deg, #1c1410 0%, #2d1800 55%, var(--md-primary) 130%);
  box-shadow: 0 10px 28px rgba(28, 20, 16, 0.18);
}

#sc-loyalty .lh-blob {
  display: none;
}

#sc-loyalty .lh-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

#sc-loyalty .lh-tier {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 auto;
  gap: 6px;
  min-width: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

#sc-loyalty .lh-tier .icon-inline,
#sc-loyalty .lh-tier svg {
  display: block;
  flex: 0 0 14px;
  width: 14px !important;
  height: 14px !important;
  max-width: 14px;
  max-height: 14px;
  color: #ffb070;
}

#sc-loyalty .lh-id {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Roboto Mono', 'SF Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3px;
  line-height: 1.3;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sc-loyalty .lh-pts-block {
  position: relative;
  z-index: 1;
  margin: 18px 0;
}

#sc-loyalty .lh-pts {
  color: #fff;
  font-family: 'Google Sans', sans-serif;
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -2.5px;
  line-height: 1;
}

#sc-loyalty .lh-ptslbl {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

#sc-loyalty .lh-progress-card {
  position: relative;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

#sc-loyalty .lh-prog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-family: 'Google Sans', sans-serif;
  font-size: 13px;
  line-height: 1.3;
}

#sc-loyalty .lh-prog-head strong,
#sc-loyalty .lh-prog-pct {
  color: #fff;
}

#sc-loyalty .lh-bar {
  position: relative;
  height: 6px;
  margin: 0 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

#sc-loyalty .lh-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--md-primary);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

      #sc-loyalty .lh-prog-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#lh-pending-badge.pts-pending-badge,
#home-loyalty-pending-badge.pts-pending-badge {
  display: none;
}

#sc-loyalty .lh-prog {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.4;
}

#sc-loyalty .loy-quick {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 4px;
  padding: 0 16px;
}

#sc-loyalty .lq-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 8px;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-family: 'Google Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

#sc-loyalty .lq-item svg {
  display: block;
  flex: 0 0 18px;
  width: 18px !important;
  height: 18px !important;
  max-width: 18px;
  max-height: 18px;
  color: #111;
}

#sc-loyalty .prof-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
  padding: 8px 16px 32px;
}

#sc-loyalty .prof-sec-lbl {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 20px 8px 8px;
  color: var(--muted, #6b6259);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

#sc-loyalty #rew-grid .rew-header h3 {
  display: block;
  margin: 0 0 4px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

#sc-loyalty #rew-grid .rew-header p {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  line-height: 1.3;
}

#sc-loyalty #my-coupons-grid,
#sc-loyalty #rew-grid {
  box-sizing: border-box;
  width: auto;
}

#sc-loyalty #rew-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
}

#sc-loyalty .prof-sec-lbl + #rew-grid {
  margin-top: 0;
}

#sc-loyalty #rew-grid > .rew-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 218px;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid rgba(28, 20, 16, 0.1) !important;
  border-radius: 16px !important;
  background: #fffaf7 !important;
  box-shadow: 0 8px 24px rgba(28, 20, 16, 0.08), 0 2px 6px rgba(28, 20, 16, 0.04) !important;
  overflow: hidden;
}

#sc-loyalty #rew-grid > .rew-card .rew-header {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 76px;
  padding: 13px 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: linear-gradient(135deg, #1c1410 0%, #382012 68%, #8f330f 150%) !important;
}

#sc-loyalty #rew-grid > .rew-card .rew-body {
  display: block;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 142px;
  padding: 12px;
  background: #fffaf7 !important;
}

#sc-loyalty #rew-grid > .rew-card .rew-header h3 {
  color: #fff !important;
  font-family: 'Google Sans', 'DM Sans', sans-serif;
  font-size: 15px;
  letter-spacing: -0.15px;
}

#sc-loyalty #rew-grid > .rew-card .rew-header h3 .ipoo-price-kes {
  color: #ff8a4c !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#sc-loyalty #rew-grid > .rew-card .rew-header h3 .ipoo-price-amt {
  color: #fff !important;
  font-size: 20px;
  font-weight: 800;
}

#sc-loyalty #rew-grid > .rew-card .rew-header p {
  color: rgba(255, 255, 255, 0.72) !important;
  letter-spacing: 0.02em;
}

#sc-loyalty #rew-grid > .rew-card .rew-body > div:last-child {
  margin-top: auto;
}

#sc-loyalty #rew-grid > .rew-card .rew-body > div:first-child {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px !important;
}

#sc-loyalty #rew-grid > .rew-card .rew-body > div:first-child span:first-child {
  color: #857370 !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
}

#sc-loyalty #rew-grid > .rew-card .rew-body > div:first-child span:last-child {
  color: #1c1410 !important;
  font-size: 15px !important;
  font-weight: 800;
}

#sc-loyalty #rew-grid > .rew-card .rew-body > div:nth-child(2) {
  height: 6px !important;
  margin-bottom: 12px !important;
  border-radius: 999px !important;
  background: #eadfd9 !important;
}

#sc-loyalty #rew-grid > .rew-card .rew-body > div:nth-child(2) > div {
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #ff6b22, #ffb06f) !important;
}

#sc-loyalty #rew-grid > .rew-card .rew-body > div:last-child {
  box-sizing: border-box;
  padding: 9px 10px !important;
  border-radius: 10px !important;
  background: #f5ebe5 !important;
  color: #6b5148 !important;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.3;
}

#sc-loyalty .pts-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

#sc-loyalty .pts-empty-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: var(--md-primary-container);
  color: var(--md-primary);
}

#sc-loyalty .pts-empty-ico svg {
  display: block;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px;
  max-height: 22px;
}

#sc-loyalty .pts-empty-ttl {
  display: block;
  margin: 0 0 6px;
  color: var(--suite-ink, #1c0e06);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

#sc-loyalty .pts-empty-sub {
  display: block;
  max-width: 280px;
  color: var(--muted, #6b6259);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

#sc-loyalty .pts-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 12px 8px;
  padding: 13px 14px;
  border: 1px solid rgba(28, 20, 16, 0.08);
  border-radius: 12px;
  background: #fffaf7;
}

#sc-loyalty .pts-history-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 18px;
  font-weight: 700;
}

#sc-loyalty .pts-history-row.is-redeemed .pts-history-mark {
  background: #fff0e6;
  color: var(--md-primary);
}

#sc-loyalty .pts-history-copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

#sc-loyalty .pts-history-copy strong {
  overflow: hidden;
  color: var(--suite-ink, #1c0e06);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sc-loyalty .pts-history-copy span {
  color: var(--muted, #6b6259);
  font-size: 11px;
}

#sc-loyalty .pts-history-value {
  flex: 0 0 auto;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#sc-loyalty .pts-history-row.is-redeemed .pts-history-value {
  color: var(--md-primary);
}

#sc-loyalty .pts-history-row.is-pending .pts-history-mark,
#sc-loyalty .pts-history-row.is-pending .pts-history-value {
  background: #fff8e1;
  color: #9a6700;
}

#sc-loyalty .pts-history-row.is-pending .pts-history-mark {
  font-size: 12px;
}

@media (max-width: 380px) {
  #sc-loyalty .loy-quick {
    gap: 8px;
    padding-right: 12px;
    padding-left: 12px;
  }

  #sc-loyalty .lq-item {
    padding: 10px 8px;
    font-size: 12px;
  }

  #sc-loyalty #rew-grid {
    gap: 8px;
  }

  #sc-loyalty #rew-grid > .rew-card .rew-header,
  #sc-loyalty #rew-grid > .rew-card .rew-body {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (max-width: 520px) {
  #sc-loyalty .lh-top {
    align-items: flex-start;
  }

  #sc-loyalty .lh-id {
    max-width: 46%;
  }
}

/* Rewards dashboard refinement */
html body #sc-loyalty {
  background: #FFF8F6 !important;
}

html body #sc-loyalty .scroll {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 112, 32, 0.1), transparent 30%),
    #FFF8F6 !important;
}

html body #sc-loyalty .loy-hero {
  margin: 18px 16px 14px;
  padding: 22px;
  border: 1px solid rgba(255, 176, 112, 0.18);
  border-radius: 30px;
  background: linear-gradient(145deg, #1c1410 0%, #3a1d0b 58%, #ff4d00 145%);
  box-shadow: 0 18px 38px rgba(28, 20, 16, 0.18);
}

html body #sc-loyalty .lh-pts {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -2px;
}

html body #sc-loyalty .lh-progress-card {
  border-radius: 18px;
  background: rgba(17, 10, 6, 0.34);
}

html body #sc-loyalty .lh-prog-head {
  color: rgba(255, 255, 255, 0.82) !important;
}

html body #sc-loyalty .lh-prog-head strong,
html body #sc-loyalty .lh-prog-pct {
  color: #fff !important;
}

html body #sc-loyalty .loy-quick {
  gap: 12px;
  margin: 0 0 8px;
}

html body #sc-loyalty .lq-item {
  min-height: 52px;
  border: 1px solid rgba(120, 75, 40, 0.12);
  border-radius: 18px;
  background: #fffaf7;
  color: #1c1410;
  box-shadow: 0 6px 16px rgba(84, 48, 26, 0.05);
}

html body #sc-loyalty .prof-body {
  gap: 0;
  padding: 10px 16px 40px;
}

html body #sc-loyalty .prof-sec-lbl {
  padding: 22px 4px 10px;
  color: #b8420b;
  font-size: 10px;
  letter-spacing: 0.16em;
}

html body #sc-loyalty #my-coupons-grid {
  min-height: 76px;
  border: 1px dashed rgba(232, 80, 10, 0.24);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42) !important;
}

html body #sc-loyalty #rew-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

html body #sc-loyalty #rew-grid .rew-offline {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid rgba(232, 80, 10, 0.18);
  border-radius: 16px;
  background: #fff3e8;
  color: #8f4a1c;
  box-shadow: 0 5px 14px rgba(84, 48, 26, 0.04);
}

html body #sc-loyalty #rew-grid > .rew-card {
  min-width: 0;
  min-height: 224px;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  text-align: left !important;
  padding: 0 !important;
  border: 1px solid rgba(190, 145, 76, 0.34) !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, #fffdf9 0%, #f7ecdc 100%) !important;
  box-shadow: 0 12px 28px rgba(70, 40, 18, 0.1) !important;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-header {
  position: relative;
  min-height: 86px;
  padding: 18px 16px 15px;
  border-radius: 23px 23px 0 0;
  background: linear-gradient(135deg, #17100c 0%, #342116 58%, #8d672f 150%) !important;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-header::after {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f4d89c;
  content: 'OFFER';
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-header h3 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding-right: 44px;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-offer-kicker {
  margin-bottom: 8px;
  color: #f4d89c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-offer-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-offer-progress-label {
  color: #806239;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-offer-points {
  color: #1c1410;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-offer-locked {
  padding: 10px;
  border: 1px solid rgba(190, 145, 76, 0.28);
  border-radius: 12px;
  background: rgba(255, 250, 239, 0.8);
  color: #806239;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

html body #sc-loyalty #rew-grid > .rew-card {
  background: linear-gradient(145deg, #fffdf9 0%, #f7ecdc 100%) !important;
  border-color: rgba(190, 145, 76, 0.34) !important;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-body {
  min-height: 138px;
  padding: 14px;
  background: #fffaf7 !important;
}

html body #sc-loyalty #rew-grid > .rew-card .rew-body > div:last-child {
  border: 1px solid rgba(232, 80, 10, 0.12);
  background: #fff0e6 !important;
  color: #9a4d21 !important;
}

html body #sc-loyalty #pts-hist {
  border: 1px solid rgba(120, 75, 40, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.42);
}

html body #sc-loyalty .pts-empty {
  margin: 0;
  min-height: 190px;
  border: 0;
  background: transparent;
}

@media (max-width: 380px) {
  html body #sc-loyalty .loy-hero { margin-right: 12px; margin-left: 12px; padding: 18px; }
  html body #sc-loyalty #rew-grid { gap: 10px; }
  html body #sc-loyalty #rew-grid > .rew-card { border-radius: 20px !important; }
}
