/* ==========================================================================
   Loyalty module (WP-I): member card, tier progress, rewards grid, badges,
   challenges, offers, referral link. Prefix ly-.
   ========================================================================== */
.ly-card { border-radius: 10px; padding: 20px 22px; color: #fff; position: relative; overflow: hidden; min-height: 168px; display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(130deg, var(--brand-navy, #061a36), #0b4a8f); box-shadow: 0 8px 20px -10px rgba(6, 26, 54, .6); }
.ly-card:after { content: ""; position: absolute; right: -70px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.ly-card.t-bronze { background: linear-gradient(130deg, #6b3a1d, #c27a45); } .ly-card.t-silver { background: linear-gradient(130deg, #4b5a6b, #9fb0c2); }
.ly-card.t-gold { background: linear-gradient(130deg, #8a5a00, #e0a426); } .ly-card.t-platinum { background: linear-gradient(130deg, #2b1d6e, #7553d6); }
.ly-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; position: relative; z-index: 1; }
.ly-card .prog { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.ly-card .tier { font: 700 22px/1.1 var(--fd); }
.ly-card .bal { font-size: 34px; font-weight: 700; letter-spacing: -.02em; position: relative; z-index: 1; }
.ly-card .bal small { font-size: 13px; font-weight: 400; opacity: .9; margin-left: 6px; }
.ly-card .foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; opacity: .95; position: relative; z-index: 1; flex-wrap: wrap; }
.ly-progress { margin-top: 6px; }
.ly-progress .bar { height: 10px; background: #e6edf3; border-radius: 6px; overflow: hidden; }
.ly-progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, #13b985, #29b6db); border-radius: 6px; }
.ly-progress .lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 5px; gap: 8px; flex-wrap: wrap; }
.ly-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ly-tier { border: 1px solid var(--line2); border-radius: 6px; padding: 10px; background: #fff; }
.ly-tier.on { border-color: #0962d3; box-shadow: 0 0 0 2px #d8ebff; }
.ly-tier b { display: block; } .ly-tier ul { margin: 6px 0 0; padding-left: 16px; font-size: 12px; color: var(--text2); }
.ly-rewards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ly-reward { background: #fff; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.ly-reward .band { height: 74px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; }
.ly-reward .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ly-reward .pts { font-size: 18px; font-weight: 700; }
.ly-reward form { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ly-reward form input { width: 96px; }
.ly-reward.locked { opacity: .75; }
.ly-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.ly-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; text-align: center; font-size: 11.5px; color: var(--text2); }
.ly-badge .ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 22px; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }
.ly-badge.off .ic { background: #cfd8e2 !important; box-shadow: none; }
.bg-blue { background: linear-gradient(135deg, #2083ee, #0962d3); } .bg-green { background: linear-gradient(135deg, #13b985, #04955d); } .bg-amber { background: linear-gradient(135deg, #f5a524, #e08a00); }
.bg-purple { background: linear-gradient(135deg, #7553d6, #4a2bb0); } .bg-coral { background: linear-gradient(135deg, #ef5927, #d23a10); } .bg-teal { background: linear-gradient(135deg, #29b6db, #0c8ec6); }
.bg-slate { background: linear-gradient(135deg, #97a6b8, #71849a); } .bg-navy { background: linear-gradient(135deg, #1d4f8f, #0b2a57); }
.ly-challenge { border: 1px solid var(--line2); border-radius: 8px; padding: 12px; background: #fff; display: grid; gap: 6px; }
.ly-challenge .hd { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ly-link { display: flex; gap: 6px; } .ly-link input { flex: 1; min-width: 0; font-family: monospace; }
.ly-code { font: 700 22px/1 monospace; letter-spacing: .08em; background: #f2f7fc; border: 1px dashed #9fb7cf; border-radius: 6px; padding: 10px 14px; display: inline-block; }
.ly-offer { display: flex; gap: 12px; align-items: center; border: 1px solid #b7e6d2; background: linear-gradient(90deg, #effaf5, #fff); border-radius: 8px; padding: 12px; }
.ly-offer i.big { font-size: 26px; color: #04955d; }
.ly-offer .tx { flex: 1; min-width: 0; }
.ly-offer form { display: flex; gap: 6px; }
.ly-banner { border-radius: 8px; padding: 12px 14px; background: linear-gradient(90deg, #0962d3, #29b6db); color: #fff; display: flex; gap: 10px; align-items: center; }
.ly-banner i { font-size: 22px; }
.ly-statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 720px) {
    .ly-statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ly-card .bal { font-size: 28px; }
    .ly-offer { flex-wrap: wrap; }
}
.db-sect.s-loyalty { --a1: #7553d6; --a2: #4a2bb0; }
.ly-details > summary { cursor: pointer; color: var(--link, #0962d3); font-size: 12.5px; margin-top: 6px; list-style: none; }
.ly-details > summary::-webkit-details-marker { display: none; }
.ly-details[open] > summary { margin-bottom: 8px; }
td .ly-details[open] { text-align: left; min-width: min(560px, 80vw); }
.ly-kv { padding: 5px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.ly-kv:last-of-type { border-bottom: 0; }
.ly-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.ly-dl dt { color: var(--muted); } .ly-dl dd { margin: 0; }
