/* Tarjetas de fidelidad: página pública (/fidelidad, /tarjeta) y sección del portal. */
:root { --fc: #c8102e; --fc-ink: #fff; }
.fd-page { background: var(--fd-bg, #f5f6fa); min-height: 100vh; font-family: var(--fd-body, inherit); }
.fd h1, .fd-head strong, .fd-reward, .fd-hi { font-family: var(--fd-head, inherit); }
.fd { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; padding: 24px 16px 40px; }
/* Adornos de la plantilla (los mismos del menú, js/decor): marca de agua detrás de la tarjeta. */
.fd-page .decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: var(--decor-o, .07);
  background-image: var(--decor-glow, none), var(--decor-sparse, none); background-repeat: no-repeat, repeat; background-size: 100% 100%, auto; }
@media (min-width: 700px) { .fd-page .decor { background-image: var(--decor-glow, none), var(--decor-dense, none); } }
.fd-card { background: #fff; border-radius: 24px; box-shadow: 0 18px 40px rgba(15, 18, 34, .14); overflow: hidden; }
.fd-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; background: var(--fc); color: var(--fc-ink); }
.fd-head strong { display: block; font-size: 1.1rem; font-weight: 800; }
.fd-head small { opacity: .85; font-weight: 600; }
/* Portada del negocio: foto con velo del color de la marca para que se lea el nombre. */
.fd-head.has-cover { min-height: 150px; align-items: flex-end; background: linear-gradient(180deg, rgb(0 0 0 / .05), rgb(0 0 0 / .65)), var(--fd-cover) center / cover; color: #fff; }
.fd-reward-img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 16px; }
.fd-logo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #fff; flex: none; border: 2px solid rgba(255, 255, 255, .7); }
.fd-initial { display: grid; place-items: center; color: var(--fc); font-weight: 800; font-size: 1.4rem; }
.fd-body { padding: 20px; display: grid; gap: 14px; }
.fd-body h1 { font-size: 1.3rem; margin: 0; }
.fd-reward { font-size: 1.25rem; font-weight: 800; color: var(--fc); margin: 0; }
.fd-hi { font-weight: 800; font-size: 1.2rem; margin: 0; }
.fd-form { display: grid; gap: 12px; }
.fd-btn { background: var(--fc); color: var(--fc-ink); border-color: transparent; }
.fd-btn:hover { filter: brightness(1.05); }
.fd-stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.fd-stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #c9ccd8; display: grid; place-items: center; color: #9a9fb2; font-weight: 700; font-size: .85rem; }
.fd-stamp.on { border: 0; background: var(--fc); color: var(--fc-ink); animation: fd-pop .3s ease; }
.fd-stamp .ico { width: 60%; height: 60%; stroke-width: 2.6; }
@keyframes fd-pop { from { transform: scale(.6); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .fd-stamp.on { animation: none; } }
.fd-status { margin: 0; font-size: 1rem; }
.fd-ready { background: #e4f7ec; color: #0b6b3a; padding: 12px; border-radius: 12px; }
.fd-qr-box { display: grid; justify-items: center; gap: 6px; padding-top: 6px; border-top: 1px dashed #e3e5ee; }
.fd-qr { width: 200px; height: 200px; }
.fd-qr svg { width: 100%; height: 100%; }
.fd-qr-box small { color: #6b7086; font-weight: 600; text-align: center; }
.fd-qr-box code { font-size: 1.1rem; font-weight: 800; letter-spacing: .15em; }
.fd-msg { padding: 32px 20px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.fd-msg .ico { width: 36px; height: 36px; color: var(--fc); }

/* Portal */
.fd-list { display: grid; gap: 8px; }
.fd-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.fd-row-info { flex: 1; min-width: 0; display: grid; }
.fd-row-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-row-info small { color: var(--muted); }
.fd-count { font-weight: 800; white-space: nowrap; }
.fd-count.full { color: var(--ok); }
.fd-share { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.fd-share .fd-qr { width: 140px; height: 140px; }
.fd-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.fd-grid > .btn { justify-self: start; }
.fd-check { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-weight: 600; }
.fd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.m-mods { display: flex; gap: 6px; margin-left: auto; margin-right: 8px; }
.m-mods .icon-btn { color: #fff; }
.m-mods .icon-btn.on { background: rgb(255 255 255 / .18); }
.fd-scan { display: grid; gap: 10px; }
.fd-scan-video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: #0f1222; }
/* Aviso de privacidad corto del registro */
.fd-legal { margin: 10px 0 0; text-align: center; font-size: .78rem; opacity: .75; }
.fd-legal a { color: inherit; text-decoration: underline; }
