/* Targetes de fidelització (segells i bons): pàgina de producte (sobre style.css i fidelitzat.css) */

.tg-cta { display: grid; justify-items: start; gap: 16px; }
.tg-cta h2 { margin: 0; }
.tg-cta .lead { margin: 0; max-width: 52ch; }
.tg-access { margin: 8px 0 0; color: var(--stamp); }
.tg-access a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-color); font-weight: 600; text-underline-offset: 4px; }

/* Un premi per a cada negoci: targetes petites, d'oliva, amb els segells que ja porta el client */
.tg-ideas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.ti { min-width: 0; display: grid; grid-template-rows: auto auto 1fr; gap: 14px; padding: 16px; border-radius: 14px; background: var(--torna); color: var(--on-color); box-shadow: 0 18px 32px -22px rgb(30 36 29 / .55); }
.ti-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 600; font-size: 16px; }
.ti-h .ico { width: 20px; height: 20px; color: var(--on-color); --ac: #7A8574; }
.ti-h small { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--stamp); white-space: nowrap; }
.ti-dots { display: grid; grid-template-columns: repeat(var(--c, 5), 18px); justify-content: start; align-content: start; gap: 6px; padding: 8px; border-radius: 8px; background: var(--torna-deep); }
.ti-dots i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed #9AA394; }
.ti-dots i.on { background: var(--stamp); border: 1.5px solid var(--stamp); }
.ti-dots i[data-gift] { border-style: solid; border-color: var(--stamp); position: relative; }
.ti-dots i[data-gift]::after { content: ""; position: absolute; inset: 22%; background: var(--stamp); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 10h16v10H4zM3 7h18v3H3zM12 7v13' fill='none' stroke='black' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.ti-p { font-size: 15px; line-height: 1.4; color: var(--stamp); }
@media (prefers-reduced-motion: no-preference) {
  /* En arribar a la vista, els segells «piquen» un rere l'altre */
  .tg-ideas.is-in .ti-dots i.on { animation: stamp .42s var(--ease-out) backwards; animation-delay: calc(.35s + var(--i) * 110ms); }
}

/* Cas real del MOOM: banda d'oliva profund amb les dues fotos del local */
.tg-moom { background: var(--ink); color: var(--paper); padding-block: clamp(56px, 8vw, 104px); }
.tg-moom-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.tg-moom h2 { font-size: clamp(26px, 3vw, 36px); margin: 6px 0 14px; }
.tg-moom-txt > p { margin: 0; color: rgb(241 233 221 / .86); max-width: 50ch; }
.tg-moom .sp-src { color: var(--on-dark-2); }
.tg-moom .cp-go { color: var(--paper); text-decoration-color: var(--vine); margin-top: 14px; }
.tg-moom .cp-go:hover { text-decoration-thickness: 2.5px; }
.tg-moom .cp-go .ico { color: var(--paper); --ac: transparent; }
.tg-moom :focus-visible { outline-color: var(--stamp); }
.tg-moom-pics { position: relative; padding: 0 0 clamp(40px, 6vw, 72px) 0; min-width: 0; }
.tm-lounge { width: 86%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-block); }
.tm-card { position: absolute; right: 0; bottom: 0; width: 40%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border: 8px solid #FBF7F0; border-radius: 4px; box-shadow: 0 28px 50px -22px rgb(0 0 0 / .6); rotate: 2deg; }
@media (max-width: 860px) { .tg-moom-in { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) {
  .motion-ready .tg-moom-pics[data-in] > .tm-card { transition-delay: .3s; }
}

/* Tipus de targeta: les dues que ja funcionen, amb la maqueta. Les que vindran són al final de la pàgina (.tg-soon) */
.tt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tt { min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: clamp(22px, 3vw, 36px); border: 1.5px solid var(--line); border-radius: var(--r-block); background: var(--paper); }
.tt-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.tt h3 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); }
.tt-p { margin: 0; color: var(--ink-2); max-width: 46ch; }
.tt-vis { padding: clamp(18px, 3vw, 28px); border-radius: var(--r-block); background: var(--paper-2); display: grid; justify-items: center; }
.tt-vis .mc { width: min(100%, 320px); box-shadow: 0 18px 32px -22px rgb(30 36 29 / .55); }
.mc-left { margin-left: auto; display: grid; justify-items: end; font: 400 26px/1 var(--f-head); }
.mc-left small { font: 500 12px/1.3 var(--f-body); color: var(--stamp); }
.mc-bono .mc-stamps { grid-template-columns: repeat(5, 30px); justify-content: center; gap: 8px; }
.mc-bono .mc-stamps i.on::after { content: none; }
.mc-bono .mc-stamps i.used { border: 1.5px dashed #9AA394; position: relative; }
.mc-bono .mc-stamps i.used::after { content: ""; position: absolute; inset: 46% 22% auto; height: 1.5px; background: #9AA394; rotate: -45deg; }

/* Més tipus, aviat: secció pròpia al final de la pàgina, més quieta que la resta */
.tg-soon h2 { margin: 0 0 20px; font-size: clamp(22px, 2.4vw, 28px); color: var(--ink-2); }
.tt-soon-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.tt-soon-grid li { display: grid; align-content: start; gap: 6px; padding: 16px; border: 1px dashed var(--piedra); border-radius: var(--r-block); }
.tt-sh { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-weight: 600; font-size: 16px; color: var(--ink); }
.tt-sh .state { padding: 0 8px; font-size: 12px; }
.tt-soon .fine a { color: var(--ink); font-weight: 600; text-underline-offset: 4px; }
@media (max-width: 860px) { .tt-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) {
  /* En arribar a la vista, els segells de la targeta i les sessions que queden del bo «piquen» d'un en un */
  .tt-vis .mc-stamps i.on { transition-delay: calc(var(--i) * 110ms + 250ms); }
  .motion-ready .tt-vis:not(.is-in) .mc-stamps i.on { opacity: 0; scale: 1.35; transition: none; }
}

/* ===== El teu panell: demostració (panell-demo.js). Còpia senzilla del panell real (app/admin.html, tokens de .ops) a l'ordinador
   i el mòbil del client amb la targeta del Wallet. Tot amb prefix .pd-. Sense JS: dues captures (.pd-static). ===== */
.pd { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.pd h2 { font-size: clamp(26px, 3vw, 36px); margin: 0; }
.pd-intro .lead { margin-top: 12px; }

.pd-static { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); gap: clamp(28px, 4vw, 56px); align-items: start; margin-top: clamp(28px, 4vw, 44px); }
.pd-static[hidden] { display: none; }
/* .pd-shot i .pd-bar (el marc de la captura) són a ../fidelitzat.css: també es fan servir a la visió general */
.pd-shot-ph img { border: 9px solid var(--ink); border-radius: 30px; }
.pd-shot figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 760px) { .pd-static { grid-template-columns: minmax(0, 1fr); } .pd-shot-ph { justify-self: center; width: min(100%, 260px); } }

.pd-demo {
  --a-bg: #F1E9DD; --a-surf: #F8F3EA; --a-surf2: #EEE6D8; --a-hover: #E8DDCC; --a-line: #D5CCBC; --a-strong: #858779;
  --a-ink: #2C332A; --a-ink2: #596456; --a-pri: #596456; --a-pri-d: #3E463C; --a-soft: #DEDDD0;
  margin-top: clamp(28px, 4vw, 44px);
}
.pd-demo[hidden] { display: none; }
.pd-switch, .pd-mini, .pd-phone .pd-to-panel { display: none; }
.pd-stage { display: grid; grid-template-columns: minmax(0, 1fr) clamp(236px, 22vw, 268px); gap: clamp(28px, 3.5vw, 44px); align-items: center; }

/* Ordinador */
.pd-laptop { position: relative; min-width: 0; }
.pd-laptop > .art-ex { right: 22px; }
.pd-screen { padding: 12px 12px 14px; border-radius: 16px 16px 0 0; background: #23281F; box-shadow: 0 34px 60px -40px rgb(30 36 29 / .7), inset 0 0 0 1.5px #384035; }
.pd-base { position: relative; display: block; height: 16px; margin: 0 -12px; border-radius: 0 0 14px 14px; background: linear-gradient(#E1D9CB, #C9C4B3); box-shadow: 0 18px 24px -18px rgb(30 36 29 / .55); }
.pd-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 5px; translate: -50% 0; border-radius: 0 0 8px 8px; background: #B4AE9D; }
.pd-app { height: 540px; display: grid; grid-template-columns: 176px minmax(0, 1fr); overflow: hidden; border-radius: 3px; background: var(--a-bg); color: var(--a-ink); font: 400 14px/1.45 var(--f-body); }

.pd-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 16px 10px; background: var(--a-surf); border-right: 1px solid var(--a-line); }
.pd-prod { display: flex; gap: 8px; align-items: center; margin: 0; padding: 0 6px; font: 700 14px/1.15 var(--f-body); }
.pd-prod small { display: block; font-size: 11px; font-weight: 500; color: var(--a-ink2); }
.pd-mark { width: 27px; height: 19px; flex: none; fill: var(--a-pri); }
.pd-biz { display: flex; gap: 9px; align-items: center; margin: 0; padding: 9px; border-radius: 6px; background: var(--a-bg); min-width: 0; }
.pd-biz b, .pd-staff b { display: block; font-size: 13.5px; }
.pd-biz small, .pd-staff small { display: block; font-size: 11.5px; color: var(--a-ink2); }
.pd-logo { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #3B2A20; color: #FFF8EF; font: 800 13px/1 var(--f-body); }
.pd-nav { display: grid; gap: 2px; }
.pd-nav [role="tab"] { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--a-ink2); font: 600 14px/1.2 var(--f-body); text-align: left; cursor: pointer; transition: background-color .15s ease-out, color .15s ease-out; }
.pd-nav [role="tab"]:hover { background: var(--a-hover); color: var(--a-ink); }
.pd-nav [role="tab"][aria-selected="true"] { background: var(--a-ink); color: var(--a-bg); }
.pd-nav .ico { width: 20px; height: 20px; color: currentColor; --ac: transparent; }
.pd-nav [aria-selected="true"] .ico { --ac: rgb(241 233 221 / .22); }

.pd-main { min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; container: pdmain / inline-size; scrollbar-width: thin; scrollbar-color: var(--a-line) transparent; }
.pd-view { display: grid; gap: 14px; align-content: start; border-radius: 4px; }
.pd-view[hidden] { display: none; }
.pd-view:focus-visible { outline-offset: -3px; }
.pd-card { min-width: 0; margin: 0; padding: 16px 18px; border: 1px solid var(--a-line); border-radius: 6px; background: var(--a-surf); }
.pd-h { margin: 0; font: 400 21px/1.15 var(--f-head); letter-spacing: -.01em; color: var(--a-ink); }
.pd-sub { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--a-ink2); }
.pd-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.pd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--a-pri); border-radius: 7px; background: var(--a-pri); color: var(--a-bg); font: 600 14px/1.2 var(--f-body); cursor: pointer; transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out; }
.pd-btn:hover { background: var(--a-pri-d); border-color: var(--a-pri-d); }
.pd-btn.ghost { background: transparent; color: var(--a-ink); border-color: var(--a-strong); }
.pd-btn.ghost:hover { background: var(--a-hover); border-color: var(--a-ink); }
.pd-btn.sm { flex: none; min-height: 36px; padding: 0 12px; font-size: 13px; }
.pd-btn.wide { width: 100%; }
.pd-btn[hidden] { display: none; }
.pd-btn:disabled { opacity: .45; cursor: not-allowed; }
.pd-btn:active:not(:disabled) { transform: translateY(1px); }

/* Inici */
.pd-today { list-style: none; margin: 6px 0 0; padding: 0; }
.pd-today li { display: flex; align-items: center; gap: 8px 12px; padding: 11px 0; border-bottom: 1px solid var(--a-line); border-radius: 2px; }
.pd-today li > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pd-today b { font-size: 14.5px; font-weight: 700; }
.pd-today span { font-size: 13px; color: var(--a-ink2); }
.pd-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; overflow: hidden; border: 1px solid var(--a-line); border-radius: 6px; background: var(--a-surf); }
.pd-kpi { min-width: 0; padding: 12px 14px; box-shadow: 1px 0 0 var(--a-line), 0 1px 0 var(--a-line); }
.pd-kpi dt { font-size: 12.5px; font-weight: 600; line-height: 1.25; color: var(--a-ink2); }
.pd-kv { margin: 5px 0 0; font: 600 26px/1.1 var(--f-body); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pd-kd { margin: 2px 0 0; font-size: 12px; color: var(--a-ink2); }
.pd-chart { display: flex; align-items: flex-end; gap: 8px; height: 92px; margin-top: 26px; border-bottom: 1px solid var(--a-line); }
.pd-chart i { position: relative; flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: var(--piedra); }
.pd-chart i.now { background: var(--a-pri); }
.pd-chart b { display: none; position: absolute; left: -8px; right: -8px; bottom: 100%; margin-bottom: 3px; text-align: center; font-size: 12px; font-weight: 700; }
.pd-chart i.now b { display: block; }

/* Clients */
.pd-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.pd-count { font-size: 13px; color: var(--a-ink2); }
.pd-field { display: grid; gap: 5px; margin-top: 12px; font-size: 13px; font-weight: 600; min-width: 0; }
.pd-field input, .pd-field textarea { width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1.5px solid var(--a-strong); border-radius: 6px; background: #FCF9F3; color: var(--a-ink); font: 400 14px/1.4 var(--f-body); }
.pd-field textarea { resize: none; }
.pd-field input:focus-visible, .pd-field textarea:focus-visible { outline: none; border-color: var(--a-pri); box-shadow: 0 0 0 3px rgb(89 100 86 / .25); }
.pd-field input::placeholder { color: #7D8073; }
.pd-rows { list-style: none; display: grid; gap: 6px; margin: 12px 0 0; padding: 0; }
.pd-rows button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 8px 12px; border: 1px solid var(--a-line); border-radius: 6px; background: var(--a-surf); color: var(--a-ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease-out, background-color .15s ease-out; }
.pd-rows button:hover { border-color: var(--a-strong); background: #FBF7F0; }
.pd-av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--a-soft); font: 700 12.5px/1 var(--f-body); color: var(--a-ink); }
.pd-rn { display: grid; min-width: 0; }
.pd-rn b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-rn small { font-size: 12.5px; color: var(--a-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-rs { display: flex; align-items: center; gap: 8px; }
.pd-rs em { padding: 2px 8px; border-radius: 999px; background: var(--a-soft); font: 700 11.5px/1.4 var(--f-body); font-style: normal; white-space: nowrap; }
.pd-rs em.t-full { background: var(--a-ink); color: var(--a-bg); }
.pd-rs em.t-bday { background: var(--vine-soft); color: var(--vine-ink); }
.pd-rc { font-size: 13px; color: var(--a-ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-rc b { font-size: 15px; color: var(--a-ink); }
.pd-empty { margin: 12px 0 0; padding: 14px; border: 1px dashed var(--a-strong); border-radius: 6px; font-size: 13.5px; color: var(--a-ink2); }
.pd-empty[hidden] { display: none; }

.pd-back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-left: -6px; padding: 0 10px 0 4px; border: 0; border-radius: 6px; background: none; color: var(--a-ink); font: 600 13.5px/1 var(--f-body); cursor: pointer; }
.pd-back:hover { background: var(--a-hover); }
.pd-fhead { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; min-width: 0; }
.pd-fhead > div { min-width: 0; }
.pd-fhead .pd-av { width: 46px; height: 46px; font-size: 15px; }
.pd-fname { margin: 0; font: 400 25px/1.1 var(--f-head); letter-spacing: -.01em; border-radius: 3px; }
.pd-fgrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.pd-fcol { display: grid; gap: 12px; min-width: 0; }
.pd-tile, .pd-box { min-width: 0; padding: 12px 14px; border: 1px solid var(--a-line); border-radius: 6px; background: var(--a-surf); }
.pd-box { background: var(--a-surf2); }
.pd-big { margin: 0; font-size: 14px; color: var(--a-ink2); }
.pd-big b { font: 600 30px/1 var(--f-body); color: var(--a-ink); font-variant-numeric: tabular-nums; }
.pd-dots { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 6px; }
.pd-dots i { width: 17px; height: 17px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--a-strong); transition: background-color .2s ease-out; }
.pd-dots i.on { background: var(--a-pri); box-shadow: none; }
.pd-dots.big i { width: 21px; height: 21px; }
.pd-dots.big i:last-child:not(.on) { box-shadow: inset 0 0 0 1.5px var(--vine); }
.pd-bt { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14.5px; font-weight: 700; }
.pd-adj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 2px; }
.pd-adj .pd-field { grid-column: 1 / -1; margin-top: 8px; }
.pd-reward { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; padding: 12px 14px; border-radius: 6px; background: var(--a-ink); color: var(--a-bg); }
.pd-reward[hidden] { display: none; }
.pd-reward .pd-i { width: 28px; height: 28px; color: var(--vine-light); }
.pd-reward p { display: grid; margin: 0; min-width: 0; }
.pd-reward b { font-size: 15px; }
.pd-reward span { font-size: 13px; color: var(--on-dark-2); }
.pd-reward .pd-btn { grid-column: 1 / -1; margin-top: 8px; background: var(--vine); border-color: var(--vine); color: var(--on-vine); }
.pd-reward .pd-btn:hover { background: var(--vine-hover); border-color: var(--vine-hover); }
.pd-reward :focus-visible { outline-color: var(--stamp); }
.pd-ok { margin: 10px 0 0; padding: 9px 12px; border-radius: 6px; background: var(--a-soft); font-size: 13px; font-weight: 600; line-height: 1.4; }
.pd-ok[hidden] { display: none; }
.pd-ok.is-err { background: #F4DDD3; color: #7A2416; }
.pd-hist ol { list-style: none; margin: 6px 0 0; padding: 0; }
.pd-hist li { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--a-line); font-size: 13px; }
.pd-hist li:last-child { border-bottom: 0; }
.pd-hist time { font-size: 12px; color: var(--a-ink2); font-variant-numeric: tabular-nums; }
.pd-hist span { display: grid; min-width: 0; }
.pd-hist small { font-size: 12.5px; color: var(--a-ink2); overflow-wrap: anywhere; }
.pd-hist .k-give b { color: var(--vine-ink); }

/* Missatges */
.pd-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pd-two .pd-btn.wide { margin-top: 14px; }
.pd-cnt { margin: 4px 0 0; text-align: right; font-size: 12px; color: var(--a-ink2); font-variant-numeric: tabular-nums; }
.pd-note { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 0; font-size: 13px; color: var(--a-ink2); }
.pd-note .pd-i { width: 17px; height: 17px; }

/* Targeta */
.pd-step, .pd-fs legend { margin: 16px 0 8px; padding: 0; font-size: 13px; font-weight: 700; color: var(--a-ink2); }
.pd-tpls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pd-tpl { display: grid; gap: 6px; min-width: 0; padding: 5px 5px 7px; border: 1.5px solid var(--a-line); border-radius: 6px; background: var(--a-surf); color: var(--a-ink2); font: 600 12.5px/1.2 var(--f-body); cursor: pointer; transition: border-color .15s ease-out; }
.pd-tpl:hover { border-color: var(--a-strong); }
.pd-tpl[aria-pressed="true"], .pd-shapes input:checked + span { border-color: var(--a-ink); background: var(--a-bg); color: var(--a-ink); box-shadow: inset 0 0 0 1px var(--a-ink); }
.pd-tc { display: grid; align-content: space-between; gap: 8px; height: 50px; padding: 8px 7px 7px; border-radius: 5px; background: var(--tb); }
.pd-tc > i { display: block; width: 58%; height: 4px; border-radius: 2px; background: var(--tt); opacity: .85; }
.pd-tc > span { display: flex; gap: 4px; }
.pd-tc b { width: 15px; height: 15px; }
.pd-tc svg { display: block; width: 100%; height: 100%; fill: color-mix(in srgb, var(--tt) 28%, transparent); }
.pd-tc b.on svg { fill: var(--ts); }
.pd-tnote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 10px 0 0; padding: 10px 12px; border-radius: 6px; background: var(--a-soft); font-size: 13px; }
.pd-tnote[hidden] { display: none; }
.pd-link { padding: 0; border: 0; background: none; color: var(--a-ink); font: 700 13px/1.5 var(--f-body); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; }
.pd-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.pd-fs { min-width: 0; margin: 0; padding: 0; border: 0; }
.pd-sws { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 -6px; }
.pd-sws label, .pd-shapes label { position: relative; cursor: pointer; }
.pd-sws label { display: grid; place-items: center; width: 42px; height: 42px; }
.pd-sws input, .pd-shapes input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pd-sw { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); transition: box-shadow .15s ease-out; }
.pd-sws input:checked + .pd-sw { box-shadow: 0 0 0 2px var(--a-surf), 0 0 0 4px var(--a-ink); }
.pd-sws input:focus-visible + .pd-sw, .pd-shapes input:focus-visible + span { outline: 3px solid var(--vine-ink); outline-offset: 3px; }
.pd-shapes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pd-shapes span { display: grid; justify-items: center; gap: 4px; padding: 8px 2px 6px; border: 1.5px solid var(--a-line); border-radius: 6px; background: var(--a-surf); color: var(--a-ink2); font-size: 11.5px; font-weight: 600; transition: border-color .15s ease-out; }
.pd-shapes label:hover span { border-color: var(--a-strong); }
.pd-shapes svg { width: 22px; height: 22px; fill: var(--a-ink); }

/* Escàner */
.pd-scan { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pd-scol { display: grid; gap: 12px; min-width: 0; }
.pd-staff { display: flex; align-items: center; gap: 10px; margin: 0; }
.pd-cam { position: relative; display: grid; place-items: end center; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 8px; background: radial-gradient(circle at 50% 42%, #434B3F, #191C17 72%); }
.pd-cam::before { content: ""; position: absolute; inset: 24% 31% 22%; border-radius: 7px; background: #2E2A26; box-shadow: 0 0 0 1px rgb(255 255 255 / .06); opacity: .8; }
.pd-cam-c { --c: var(--stamp); position: absolute; inset: 16% 25% 14%;
  background: linear-gradient(var(--c), var(--c)) top left / 22px 3px, linear-gradient(var(--c), var(--c)) top left / 3px 22px,
    linear-gradient(var(--c), var(--c)) top right / 22px 3px, linear-gradient(var(--c), var(--c)) top right / 3px 22px,
    linear-gradient(var(--c), var(--c)) bottom left / 22px 3px, linear-gradient(var(--c), var(--c)) bottom left / 3px 22px,
    linear-gradient(var(--c), var(--c)) bottom right / 22px 3px, linear-gradient(var(--c), var(--c)) bottom right / 3px 22px;
  background-repeat: no-repeat; }
.pd-cam.is-ok .pd-cam-c { --c: #A0BB89; }
.pd-cam-l { position: absolute; left: 27%; right: 27%; top: 50%; height: 2px; border-radius: 2px; background: var(--stamp); box-shadow: 0 0 10px 1px rgb(234 223 208 / .6); opacity: 0; }
.pd-cam.is-reading .pd-cam-l { opacity: 1; }
.pd-cam > span { position: relative; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; background: rgb(0 0 0 / .45); color: var(--paper); font-size: 12.5px; font-weight: 600; }
.pd-sres { padding: 14px 16px; border: 1px solid var(--a-line); border-radius: 6px; background: var(--a-surf); }
.pd-sres[hidden] { display: none; }
.pd-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--a-soft); font-size: 12px; font-weight: 700; }
.pd-sname { margin: 8px 0 0; font: 400 26px/1.1 var(--f-head); border-radius: 3px; }
.pd-srow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin: 0; font-size: 13.5px; color: var(--a-ink2); }
.pd-srow b { color: var(--a-ink); }
.pd-sres .pd-btn.wide { margin-top: 10px; }
.pd-swait { margin: 0; padding: 14px 16px; border: 1px dashed var(--a-strong); border-radius: 6px; font-size: 13.5px; color: var(--a-ink2); }
.pd-swait[hidden] { display: none; }

@container pdmain (max-width: 519.98px) {
  .pd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-fgrid, .pd-two, .pd-scan, .pd-opts { grid-template-columns: minmax(0, 1fr); }
  .pd-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-shapes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pd-today li { flex-wrap: wrap; }
  .pd-today li > div { flex-basis: 100%; }
}
@container pdmain (max-width: 300px) { .pd-shapes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Mòbil del client: la targeta com al Wallet (fidelitzat/app/card-view.css) */
.pd-phone { display: grid; justify-items: center; gap: 10px; min-width: 0; }
.pd-phone-of { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.pd-device { width: 100%; max-width: 280px; padding: 9px; border-radius: 42px; background: #1E221C; box-shadow: 0 34px 60px -34px rgb(30 36 29 / .7), inset 0 0 0 1.5px #3A4036; }
.pd-ph { position: relative; display: flex; flex-direction: column; height: 540px; overflow: hidden; padding: 10px 12px 14px; border-radius: 34px; background: #F3EFE9; color: #1C1C1E; }
.pd-status { display: flex; align-items: center; justify-content: space-between; height: 26px; padding: 0 12px; font: 700 13px/1 var(--f-body); }
.pd-isl { width: 74px; height: 22px; border-radius: 999px; background: #111; }
.pd-sig { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.pd-sig i { width: 3px; border-radius: 1px; background: #1C1C1E; }
.pd-sig i:nth-child(1) { height: 4px; } .pd-sig i:nth-child(2) { height: 6px; } .pd-sig i:nth-child(3) { height: 8px; } .pd-sig i:nth-child(4) { height: 11px; }
.pd-wt { margin: 16px 4px 18px; font: 700 26px/1 var(--f-body); letter-spacing: -.02em; }
.pd-pass { --b: #3B2A20; --s: #F2C14E; --f: #FFF8EF; position: relative; padding: 14px 14px 16px; border-radius: 14px; background: var(--b); color: var(--f); box-shadow: 0 14px 28px -16px rgb(0 0 0 / .6); transition: background-color .35s ease-out; }
.pd-pass-h { display: flex; align-items: center; gap: 9px; }
.pd-pass-logo { font: 800 24px/1 var(--f-body); letter-spacing: -.04em; }
.pd-pass-n { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-pass-r { display: grid; justify-items: end; }
.pd-pl { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--s); transition: color .35s ease-out; }
.pd-pv { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 6px; margin: 12px -4px 0; padding: 12px 10px; border-radius: 8px;
  background: radial-gradient(color-mix(in srgb, var(--f) 10%, transparent) 1px, transparent 1.6px) 0 0 / 9px 9px, color-mix(in srgb, var(--b), #000 24%); }
.pd-st { display: grid; place-items: center; aspect-ratio: 1; color: color-mix(in srgb, var(--f) 26%, transparent); transition: color .3s ease-out; }
.pd-st svg { width: 84%; height: 84%; fill: currentColor; }
.pd-st.on { color: var(--s); }
.pd-st.gift { border-radius: 50%; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--f) 45%, transparent); }
.pd-st .pd-gift { width: 56%; height: 56%; fill: none; stroke: color-mix(in srgb, var(--f) 70%, transparent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pd-st.gift.on { background: var(--s); box-shadow: none; }
.pd-st.gift.on .pd-gift { stroke: var(--b); }
.pd-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 12px; }
.pd-fields > div { display: grid; min-width: 0; border-radius: 4px; }
.pd-fields .r { justify-items: end; text-align: right; }
.pd-fields .w { grid-column: 1 / -1; }
.pd-fields .pd-pv { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-qr { width: 84px; height: 84px; margin: 14px auto 0; padding: 6px; border-radius: 8px; background: #fff; transition: box-shadow .2s ease-out; }
.pd-qr svg { display: block; width: 100%; height: 100%; fill: #111; }
.pd-qr.is-read { box-shadow: 0 0 0 3px var(--s); }
.pd-ribbon { position: absolute; z-index: 1; top: -11px; left: 50%; max-width: calc(100% - 24px); margin: 0; padding: 4px 11px; translate: -50% 0; border-radius: 999px; background: var(--s); color: var(--b); font: 800 11px/1.3 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 14px -6px rgb(0 0 0 / .5); }
.pd-ribbon[hidden] { display: none; }
.pd-notif { position: absolute; z-index: 3; top: 42px; left: 8px; right: 8px; display: flex; gap: 9px; padding: 10px 11px; border-radius: 16px; background: rgb(252 250 246 / .97); box-shadow: 0 12px 30px -10px rgb(0 0 0 / .45), 0 0 0 1px rgb(0 0 0 / .05); font-size: 12px; line-height: 1.35; }
.pd-notif[hidden] { display: none; }
.pd-notif:not(.is-in) { visibility: hidden; }
.pd-n-ico { flex: none; width: 30px; height: 30px; border-radius: 7px; background: linear-gradient(#F2C14E 0 0) 6px 7px / 18px 4px no-repeat, linear-gradient(#5FD3C2 0 0) 6px 13px / 18px 4px no-repeat, linear-gradient(#E8A0B4 0 0) 6px 19px / 18px 4px no-repeat, #141414; }
.pd-n-txt { display: grid; min-width: 0; }
.pd-n-app { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: #6B6B70; }
.pd-n-txt b { font-size: 12.5px; overflow-wrap: anywhere; }
.pd-n-txt > span:last-child { overflow-wrap: anywhere; }

/* Peu: avís de demostració i «Tornar a començar» */
.pd-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 22px; }
.pd-cap { margin: 0; font-size: 14px; color: var(--ink-2); }
.pd-cap .art-ex-in { margin: 0 8px 0 0; }
.pd-does { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px 36px; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0; font-size: 16px; color: var(--ink-2); }
.pd-does li { display: flex; align-items: flex-start; gap: 12px; }
.pd-does b { color: var(--ink); }
.pd-does .ico { margin-top: 1px; }
.pd-us { display: flex; align-items: flex-start; gap: 12px; max-width: 62ch; margin: clamp(28px, 4vw, 40px) 0 0; padding: 16px 18px; border-radius: var(--r-block); background: var(--paper-2); font-size: 16px; }
.pd-us .ico { margin-top: 1px; --ac: var(--vine-soft); }

/* Moviment: només si no s'ha demanat reduir-lo. Tot finit */
@media (prefers-reduced-motion: no-preference) {
  .pd-notif { transform: translateY(-130%); opacity: 0; transition: transform .45s var(--ease-out), opacity .3s ease-out, visibility 0s .45s; }
  .pd-notif.is-in { transform: none; opacity: 1; transition: transform .45s var(--ease-out), opacity .2s ease-out, visibility 0s; }
  .pd-st.is-new { animation: pd-stamp .5s var(--ease-out) backwards; }
  .pd-fields .is-flash { animation: pd-flash 1.4s ease-out; }
  .pd-kv.is-up { animation: pd-up .5s var(--ease-out); }
  .pd-reward:not([hidden]), .pd-ribbon:not([hidden]) { animation: pd-pop .5s var(--ease-out); }
  .pd-cam.is-reading .pd-cam-l { animation: pd-scanline 1.1s ease-in-out both; }
  .pd-chart i { transition: height .4s var(--ease-out); }
  .pd-view:not([hidden]) { animation: pd-in .2s ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-demo *, .pd-demo *::before { transition: none !important; }
}
@keyframes pd-stamp { from { opacity: 0; transform: scale(1.5) rotate(-8deg); } }
@keyframes pd-flash { from { background-color: color-mix(in srgb, var(--s) 32%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s) 32%, transparent); } to { background-color: transparent; box-shadow: 0 0 0 4px transparent; } }
@keyframes pd-up { from { color: var(--a-pri); transform: translateY(5px); } }
@keyframes pd-pop { from { opacity: 0; transform: scale(.94); } }
@keyframes pd-in { from { opacity: 0; } }
@keyframes pd-scanline { from { top: 18%; } to { top: 82%; } }

/* Entre 860 i 1099: panell amb pestanyes a dalt */
@media (max-width: 1099.98px) {
  .pd-app { height: 520px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pd-side { padding: 6px; border-right: 0; border-bottom: 1px solid var(--a-line); }
  .pd-prod, .pd-biz { display: none; }
  .pd-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pd-nav [role="tab"] { flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px; font-size: 12px; text-align: center; }
  .pd-nav [role="tab"] span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}

/* Mòbil i tauleta: o el panell o el mòbil del client (botons de dalt); una barra fixa a baix ensenya la targeta en petit */
@media (max-width: 859.98px) {
  .pd-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: 9px; background: var(--paper-2); }
  .pd-switch button { position: relative; min-height: 44px; padding: 0 8px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font: 600 14.5px/1.2 var(--f-body); cursor: pointer; }
  .pd-switch button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgb(44 51 42 / .16); }
  .pd-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--vine-ink); }
  .pd-dot[hidden] { display: none; }
  .pd-stage { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pd-demo[data-view="panel"] .pd-phone, .pd-demo[data-view="phone"] .pd-laptop { display: none; }
  .pd-app { height: auto; }
  .pd-main { overflow: visible; padding: 14px; }
  .pd-phone .pd-to-panel { display: inline-flex; min-height: 44px; margin: 4px 0 0; color: var(--ink); }
  .pd-laptop > .art-ex { display: none; }
  .pd-device { max-width: 300px; }
  .pd-mini { position: sticky; bottom: 12px; z-index: 4; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--b, #3B2A20); color: #FFF8EF; box-shadow: 0 14px 30px -12px rgb(30 36 29 / .6); }
  .pd-mini-card { flex: none; display: grid; grid-template-columns: repeat(5, 13px); gap: 2px 3px; }
  .pd-ms { display: grid; place-items: center; width: 13px; height: 13px; color: rgb(255 248 239 / .3); }
  .pd-ms svg { width: 100%; height: 100%; fill: currentColor; }
  .pd-ms.on { color: var(--s, #F2C14E); }
  .pd-ms.gift { border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(255 248 239 / .5); }
  .pd-ms .pd-gift { width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 2; }
  .pd-ms.gift.on { background: var(--s, #F2C14E); }
  .pd-ms.gift.on .pd-gift { stroke: var(--b, #3B2A20); }
  .pd-mini-t { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
  .pd-mini-go { flex: none; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: rgb(255 248 239 / .14); color: inherit; font: 700 13.5px/1.2 var(--f-body); cursor: pointer; }
  .pd-mini :focus-visible { outline-color: var(--stamp); }
  .pd-btn, .pd-btn.sm { min-height: 44px; }
  .pd-field input, .pd-field textarea { min-height: 46px; font-size: 16px; }
  .pd-back { min-height: 44px; }
  .pd-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
  .pd-sws label { width: 44px; height: 44px; }
  .pd-shapes span { min-height: 56px; }
  .pd-tpl { min-height: 44px; }
  .pd-nav [role="tab"] { min-height: 54px; }
}
@media (max-width: 599.98px) {
  .pd-screen { padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .pd-app { border: 1px solid var(--line); border-radius: 8px; }
  .pd-base { display: none; }
  .pd-laptop > .art-ex { right: 12px; }
}
@media (max-width: 359.98px) {
  .pd-nav [role="tab"] { font-size: 11px; letter-spacing: -.01em; }
}
