/*
 * FastRewards — area clienti nuova (restyling, predefinita; la vecchia con ?vecchia=1).
 * Layout: resources/views/customer/layouts/customer-nuova.blade.php. Mockup: public/mockups/area-clienti.html.
 * Non carica admin.css: tutte le classi hanno il prefisso .ac- (tranne la card .frd-pass*, copiata da admin-theme.css).
 * I colori della struttura arrivano dal layout come variabili su :root (--ac-navy, --ac-primary, --ac-on-primary, --ac-ink).
 */
:root {
    --ac-navy: #001f3f;
    --ac-on-navy: #fff;
    --ac-primary: #1572e8;
    --ac-on-primary: #fff;
    --ac-ink: #1572e8;          /* colore della struttura scurito per testi e link (contrasto AA su bianco) */
    --ac-bg: #f4f6f9;
    --ac-panel: #fff;
    --ac-text: #1f2733;
    --ac-muted: #5b6573;
    --ac-line: #e3e7ed;
    --ac-soft: #eef1f5;
    --ac-tint: #eef3fa;
    --ac-pos: #1d7a22;
    --ac-neg: #c0323b;
    --ac-pts: #a4510f;
    --ac-warn-bg: #fff4e5;
    --ac-warn-line: #ffd59e;
    /* livelli: stessi colori "metallo" del pannello (tema Classico) */
    --frd-lv0: #a0673a;
    --frd-lv1: #9aa3ad;
    --frd-lv2: #d1a421;
    --frd-lv3: #55697b;
    --frd-lv4: #23869a;
}

* { box-sizing: border-box; }
body.ac { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; margin: 0; background: var(--ac-bg); color: var(--ac-text); font: 15px/1.5 Raleway, system-ui, sans-serif; font-variant-numeric: lining-nums; }
.ac a { color: var(--ac-ink); }
.ac button { font-family: inherit; font-size: inherit; line-height: inherit; }
.ac :focus-visible { outline: 2px solid var(--ac-ink); outline-offset: 2px; }
.ac h1, .ac h2, .ac h3 { margin: 0; line-height: 1.25; }
.ac-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- testata ---------- */
.ac-top { background: var(--ac-navy); color: var(--ac-on-navy); position: sticky; top: 0; z-index: 50; }
.ac-top-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.ac-brand { display: flex; align-items: center; gap: 10px; color: inherit !important; text-decoration: none; min-width: 0; }
.ac-brand-logo { height: 36px; width: auto; max-width: 120px; object-fit: contain; flex: none; }
/* riquadro bianco solo se la struttura lo sceglie (Stile > Logo), per i loghi scuri sulla barra */
.ac-brand-logo-box { background: #fff; border-radius: 6px; padding: 2px 4px; }
.ac-brand-mk { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; flex: none; }
.ac-brand-mk svg { width: 22px; height: 22px; }
.ac-brand b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-brand small { display: block; font-size: 12px; opacity: .8; }
.ac-brand > span:last-child { min-width: 0; }
.ac-top-sp { flex: 1; }
.ac-icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: inherit !important; text-decoration: none; }
.ac-icon-btn:hover { background: rgba(255, 255, 255, .12); }
.ac-icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ac-lang select { background: transparent; color: inherit; border: 1px solid rgba(255, 255, 255, .4); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 13px; text-transform: uppercase; }
.ac-lang option { color: #000; }
.ac-me { position: relative; }
.ac-me summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.ac-me summary::-webkit-details-marker { display: none; }
.ac-me summary i { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--ac-navy); display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; }
.ac-me summary span { display: none; }
.ac-me-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--ac-panel); color: var(--ac-text); border: 1px solid var(--ac-line); border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 20, 40, .18); min-width: 230px; padding: 6px; z-index: 60; }
.ac-me-menu a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--ac-text) !important; text-decoration: none; }
.ac-me-menu a:hover { background: var(--ac-soft); }

.ac-nav { display: none; background: var(--ac-panel); border-bottom: 1px solid var(--ac-line); }
.ac-nav-in { max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; }
.ac-nav a { text-decoration: none; color: var(--ac-muted); font-weight: 600; padding: 13px 12px 11px; border-bottom: 3px solid transparent; white-space: nowrap; }
.ac-nav a:hover { color: var(--ac-text); }
.ac-nav a[aria-current="page"] { color: var(--ac-ink); border-bottom-color: var(--ac-ink); }
/* sito della struttura: a destra nel menu (computer), icona nella barra alta (telefono) */
.ac-nav a.ac-nav-ext { margin-left: auto; }

/* barra in basso (telefono) */
.ac-tabs { position: sticky; bottom: 0; z-index: 50; background: var(--ac-panel); border-top: 1px solid var(--ac-line); display: grid; grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom); }
.ac-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 10px; font-size: 11.5px; font-weight: 600; color: var(--ac-muted); text-decoration: none; text-align: center; }
.ac-tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ac-tabs a[aria-current="page"] { color: var(--ac-ink); }

@media (min-width: 760px) {
    .ac-nav { display: block; }
    .ac-tabs { display: none; }
    .ac-site-m { display: none; }
    .ac-me summary span { display: inline; }
}

/* ---------- contenuto ---------- */
.ac-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 16px 32px; }
.ac-hello { margin-bottom: 18px; }
.ac-hello h1 { font-size: 24px; }
.ac-hello p { margin: 4px 0 0; color: var(--ac-muted); }
.ac-panel { background: var(--ac-panel); border: 1px solid var(--ac-line); border-radius: 12px; }
.ac-panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px 0; }
.ac-panel-h h2 { font-size: 17px; }
.ac-panel-h a { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ac-panel-b { padding: 12px 16px 16px; }
.ac-muted { color: var(--ac-muted); }
.ac-stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.ac-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; padding: 10px 16px; font-weight: 700; text-decoration: none; cursor: pointer;
    border: 1px solid var(--ac-primary); background: var(--ac-primary); color: var(--ac-on-primary) !important; line-height: 1.2; }
.ac-btn:hover { filter: brightness(.93); }
.ac-btn-ghost { background: var(--ac-panel); color: var(--ac-ink) !important; border-color: var(--ac-line); }
.ac-btn-ghost:hover { filter: none; background: var(--ac-tint); border-color: var(--ac-ink); }
.ac-btn-sm { padding: 6px 12px; font-size: 14px; }
.ac-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ac-pts { color: var(--ac-pts); font-weight: 700; white-space: nowrap; }
.ac-alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }
.ac-alert-ok { background: #e6f4e7; color: var(--ac-pos); }
.ac-alert-ko { background: #fbe9ea; color: var(--ac-neg); }

/* home: due colonne da schermo largo */
.ac-home { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.ac-home > * { min-width: 0; }
.ac-home-card { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14.5px; }
.ac-home-card .ac-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 15px; }
@media (min-width: 760px) {
    .ac-home { grid-template-columns: 330px minmax(0, 1fr); align-items: start; }
    .ac-home-card { position: sticky; top: 130px; font-size: 15px; }
}
@media (max-width: 360px) {
    .ac-home-card { font-size: 13.5px; }
}

/* saldo e avanzamento */
.ac-bal { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.ac-bal-n { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.ac-bal-n small { font-size: 15px; font-weight: 600; color: var(--ac-muted); letter-spacing: 0; }
.ac-sep { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ac-soft); }
.ac-prog { height: 10px; background: var(--ac-soft); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.ac-prog i { display: block; height: 100%; background: var(--ac-ink); border-radius: 99px; }
.ac-prog-l { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ac-muted); margin-top: 6px; }

/* prossimo soggiorno */
.ac-stay { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.ac-cal { width: 58px; border: 1px solid var(--ac-line); border-radius: 10px; text-align: center; overflow: hidden; }
.ac-cal small { display: block; background: var(--ac-ink); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 0; text-transform: lowercase; }
.ac-cal b { display: block; font-size: 24px; line-height: 1.3; padding: 2px 0 4px; }
.ac-stay h3 { font-size: 16px; }
.ac-stay p { margin: 2px 0 0; }
.ac-use { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--ac-warn-bg); border: 1px solid var(--ac-warn-line); font-size: 14px; }
.ac-row-a { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* elenchi di premi / offerte */
.ac-rw { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--ac-soft); }
.ac-rw:first-child { border-top: 0; padding-top: 0; }
.ac-rw:last-child { padding-bottom: 0; }
.ac-rw-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--ac-tint); color: var(--ac-ink); display: grid; place-items: center; overflow: hidden; }
.ac-rw-ic { position: relative; }
.ac-rw-ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--ac-tint); }
.ac-rw-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ac-rw b { display: block; line-height: 1.3; }
.ac-rw small { color: var(--ac-muted); font-size: 13px; }
.ac-empty { margin: 0; color: var(--ac-muted); }
.ac-svc { list-style: none; margin: 0; padding: 0; }
.ac-svc li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--ac-soft); }
.ac-svc li:first-child { border-top: 0; padding-top: 0; }
.ac-svc small { display: block; color: var(--ac-muted); font-size: 13px; }

/* piede */
.ac-foot { text-align: center; color: var(--ac-muted); font-size: 13px; padding: 8px 16px 24px; line-height: 1.7; }
.ac-foot a { color: inherit; }
.ac-foot img { height: 22px; vertical-align: middle; margin-left: 4px; }

/* finestra (riscatto premio, codice) */
.ac-dlg { border: 0; border-radius: 14px; padding: 0; width: min(420px, calc(100vw - 32px)); color: var(--ac-text); background: var(--ac-panel); }
.ac-dlg::backdrop { background: rgba(0, 15, 30, .5); }
.ac-dlg-b { padding: 20px; display: grid; gap: 12px; }
.ac-dlg-b h2 { font-size: 19px; }
.ac-dlg-b p { margin: 0; }
.ac-dlg-a { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.ac-qr-big { background: #fff; padding: 14px; border-radius: 12px; border: 1px solid var(--ac-line); width: min(260px, 100%); margin: 0 auto; }
.ac-qr-big svg { display: block; width: 100%; height: auto; }

/* ---------- card che si gira (home): clic, Invio o Spazio mostra il retro ---------- */
.ac-flip { all: unset; display: block; cursor: pointer; perspective: 1400px; border-radius: 14px; -webkit-tap-highlight-color: transparent; }
.ac-flip:focus-visible { outline: 3px solid var(--ac-ink); outline-offset: 4px; }
/* fronte e retro nella stessa cella: la card prende l'altezza della faccia più alta */
.ac-flip-in { display: grid; transition: transform .7s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; }
.ac-flip-face { grid-area: 1 / 1; display: flex; }
.ac-flip-face .frd-pass { flex: 1; }
.ac-flip[aria-pressed="true"] .ac-flip-in { transform: rotateY(180deg); }
.ac-flip-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ac-flip-back { transform: rotateY(180deg); }
.ac-flip-ic { position: absolute; right: .8em; bottom: .8em; width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center;
    background: rgba(127, 127, 127, .22); color: var(--pass-fg); opacity: .85; }
.ac-flip-ic svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@keyframes ac-flip-peek { 0%, 100% { transform: rotateY(0); } 40% { transform: rotateY(-22deg); } 70% { transform: rotateY(6deg); } }
.ac-flip.is-peek .ac-flip-in { animation: ac-flip-peek 1.1s ease-in-out .9s 1; }
@media (hover: hover) {
    .ac-flip:hover .ac-flip-in { transform: rotateY(-6deg); }
    .ac-flip[aria-pressed="true"]:hover .ac-flip-in { transform: rotateY(174deg); }
}
@media (prefers-reduced-motion: reduce) {
    .ac-flip-in, .ac-flip:hover .ac-flip-in { transition: none; transform: none !important; animation: none !important; }
    .ac-flip-face { backface-visibility: visible; transition: opacity .2s; }
    .ac-flip-back { transform: none; opacity: 0; }
    .ac-flip[aria-pressed="true"] .ac-flip-back { opacity: 1; }
    .ac-flip[aria-pressed="true"] .ac-flip-front { opacity: 0; }
}
/* retro: stessi colori del fronte (.frd-pass-N), contenuti diversi */
.ac-pb-sec { margin-top: 1.1em; padding-top: .9em; border-top: 1px solid rgba(127, 127, 127, .35); }
.ac-pb-sec > small { margin-bottom: .45em; }
.ac-pb-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: .5em; }
.ac-pb-perks li { display: flex; gap: .55em; align-items: flex-start; font-weight: 700; font-size: .95em; line-height: 1.25; }
.ac-pb-perks svg { width: 1.1em; height: 1.1em; flex: none; margin-top: .05em; fill: none; stroke: var(--pass-mk); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ac-pb-bar { height: .45em; border-radius: 99px; background: rgba(127, 127, 127, .35); overflow: hidden; margin: .5em 0 .35em; }
.ac-pb-bar i { display: block; height: 100%; background: var(--pass-mk); border-radius: 99px; }
.ac-pb-note { font-size: .85em; }
.ac-pb-foot { margin-top: auto; padding-top: 1em; padding-right: 2.4em; display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; font-size: .8em; }
.ac-pb-foot b { font-size: 1.05em; }
.ac-pb-foot > div:last-child { text-align: right; }
.frd-pass-qrbox svg path, .frd-pass-qrbox svg rect { fill: #1f2733; }
.frd-pass-qrbox svg rect:first-child { fill: #fff; }

/* ---------- card "pass" del livello: copia di public/assets/css/admin-theme.css (.frd-pass*) ---------- */
.frd-pass {
    --pass-bg: var(--frd-lv4); --pass-fg: #fff; --pass-mk: #f2c94c;
    box-sizing: border-box; width: 21em; min-height: 27.5em; border-radius: 14px; padding: 1.15em 1.25em 1.25em;
    display: flex; flex-direction: column; position: relative; overflow: hidden; text-align: left;
    background-color: var(--pass-bg); color: var(--pass-fg); font-family: Raleway, system-ui, sans-serif; line-height: 1.3; font-variant-numeric: lining-nums;
    background-image: radial-gradient(rgba(255, 255, 255, .07) .06em, transparent .09em), radial-gradient(rgba(0, 0, 0, .08) .06em, transparent .1em);
    background-size: .7em .7em, 1.1em 1.1em; background-position: 0 0, .35em .5em;
    box-shadow: 0 1px 2px rgba(0, 31, 63, .18), 0 18px 40px -12px rgba(0, 31, 63, .45);
}
.frd-pass-0 { --pass-bg: var(--frd-lv0); --pass-fg: #fff;    --pass-mk: #f2c94c; }
.frd-pass-1 { --pass-bg: var(--frd-lv1); --pass-fg: #1f2733; --pass-mk: #1f2733; }
.frd-pass-2 { --pass-bg: var(--frd-lv2); --pass-fg: #1f2733; --pass-mk: #1f2733; }
.frd-pass-3 { --pass-bg: var(--frd-lv3); --pass-fg: #fff;    --pass-mk: #f2c94c; }
.frd-pass-4 { --pass-bg: var(--frd-lv4); --pass-fg: #fff;    --pass-mk: #f2c94c; }
.frd-pass small { display: block; font-size: .7em; opacity: .78; line-height: 1.3; font-weight: 500; }
.frd-pass b { display: block; font-weight: 700; line-height: 1.2; }
.frd-pass-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; }
.frd-pass-brand { display: flex; align-items: center; gap: .5em; font-weight: 700; font-size: .95em; line-height: 1.15; min-width: 0; }
.frd-pass-brand span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.frd-pass-brand svg { width: 1.7em; height: 1.7em; flex: none; }
.frd-pass-mk { fill: var(--pass-mk); }
.frd-pass-mk-l { fill: none; stroke: var(--pass-mk); }
.frd-pass-pf { text-align: right; flex: none; }
.frd-pass-pf b { font-size: 1.05em; }
.frd-pass-primary { margin-top: 1.6em; padding-top: 1em; border-top: 1px solid rgba(127, 127, 127, .35); }
.frd-pass-primary b { font-size: 2.6em; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.frd-pass-row { display: flex; justify-content: space-between; gap: 1em; margin-top: 1.1em; }
.frd-pass-row > div:first-child { min-width: 0; }
.frd-pass-row > div:last-child { text-align: right; flex: none; }
.frd-pass-row b { font-size: 1em; overflow-wrap: anywhere; }
.frd-pass-more { display: inline; font-size: .8em; font-weight: 700; opacity: .75; margin-left: .3em; }
.frd-pass-qr { margin-top: auto; padding-top: 1.3em; display: flex; flex-direction: column; align-items: center; gap: .45em; }
.frd-pass-qrbox { background: #fff; border-radius: .5em; padding: .55em; width: 8.6em; height: 8.6em; box-sizing: border-box; }
.frd-pass-qrbox svg { display: block; width: 100%; height: 100%; }
.frd-pass-qrp { fill: #1f2733; }
.frd-pass-qr span { font-size: .72em; opacity: .8; letter-spacing: .02em; }

/* ---------- pagine interne (La mia card, Premi, Soggiorni, Profilo) ---------- */
.ac-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ac-perks li { display: flex; gap: 10px; align-items: flex-start; }
.ac-perks svg { width: 20px; height: 20px; flex: none; margin-top: 1px; fill: none; stroke: var(--ac-pos); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ac-promo code { display: inline-block; font: 700 22px/1 ui-monospace, monospace; letter-spacing: .1em; padding: 12px 16px; background: var(--ac-soft); border-radius: 10px; user-select: all; }
.ac-promo p { margin: 10px 0 0; font-size: 14px; }

.ac-ladder { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; }
.ac-step { flex: none; width: 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; }
.ac-step .frd-pass { font-size: 7.1px; min-height: 12em; box-shadow: 0 2px 6px rgba(0, 31, 63, .18); }
.ac-step.is-off .frd-pass { opacity: .55; }
.ac-step-cap { font-size: 13px; line-height: 1.4; color: var(--ac-muted); }
.ac-step-cap b { display: block; color: var(--ac-text); font-size: 14px; }
.ac-step-cap b span { color: var(--ac-ink); font-weight: 700; }
.ac-step-cap ul { margin: 6px 0 0; padding-left: 16px; }

.ac-seg { display: inline-flex; background: var(--ac-soft); border-radius: 9px; padding: 3px; margin-bottom: 14px; max-width: 100%; overflow-x: auto; }
.ac-seg a { padding: 7px 14px; border-radius: 7px; font-weight: 700; color: var(--ac-muted) !important; text-decoration: none; white-space: nowrap; }
.ac-seg a[aria-current="page"] { background: var(--ac-panel); color: var(--ac-text) !important; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ac-filters { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }
.ac-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.ac-check input { width: 18px; height: 18px; accent-color: var(--ac-ink); margin: 0; }

.ac-cat { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .ac-cat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .ac-cat { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ac-item { background: var(--ac-panel); border: 1px solid var(--ac-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.ac-item[hidden] { display: none; }
.ac-item-img { position: relative; aspect-ratio: 16 / 9; background: var(--ac-tint); color: var(--ac-ink); display: grid; place-items: center; }
.ac-item-img svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.ac-item-img.is-empty { aspect-ratio: auto; height: 64px; }
.ac-item-img.is-empty svg { width: 28px; height: 28px; }
.ac-item-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ac-item-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ac-item-b h2 { font-size: 16px; }
.ac-item-b p { margin: 0; color: var(--ac-muted); font-size: 14px; flex: 1; }
.ac-item-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--ac-soft); padding-top: 10px; margin-top: auto; }
.ac-miss { font-size: 13px; color: var(--ac-muted); }
.ac-mini { height: 6px; background: var(--ac-soft); border-radius: 99px; overflow: hidden; margin-top: 4px; width: 110px; }
.ac-mini i { display: block; height: 100%; background: var(--ac-pts); }
.ac-btn[disabled] { background: var(--ac-soft); color: var(--ac-muted) !important; border-color: var(--ac-line); cursor: not-allowed; filter: none; }
/* Bacheca in home: schede con foto grande dentro il riquadro "Per te" (al massimo 2 per riga, la colonna è stretta) */
@media (min-width: 960px) { .ac-cat.ac-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ac-offers .ac-item-b { gap: 6px; }
.ac-offers .ac-item-b h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.ac-offers .ac-item-b small { font-size: 13px; }
.ac-offers + .ac-rw { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ac-soft); }

.ac-tag { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--ac-soft); color: var(--ac-muted); white-space: nowrap; }
.ac-tag-ok { background: #e6f4e7; color: var(--ac-pos); }
.ac-tag-go { background: var(--ac-warn-bg); color: var(--ac-pts); }
.ac-plus { color: var(--ac-pos); font-weight: 700; white-space: nowrap; }

.ac-rows { list-style: none; margin: 0; padding: 0; }
.ac-rows li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--ac-soft); }
.ac-rows li:first-child { border-top: 0; padding-top: 0; }
.ac-rows b { display: block; }
.ac-rows small { display: block; color: var(--ac-muted); font-size: 13px; }
.ac-rows-v { text-align: right; flex: none; }
.ac-stay-row + .ac-stay-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ac-soft); }
.ac-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; }

.ac-prof { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .ac-prof { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .ac-prof > :last-child { grid-column: 1 / -1; } }
.ac-dl { margin: 0 0 14px; display: grid; gap: 10px; }
.ac-dl dt { font-size: 13px; color: var(--ac-muted); }
.ac-dl dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.ac-form { display: grid; gap: 14px; }
.ac-form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ac-form-row .ac-field { flex: 1; min-width: 160px; }
.ac-field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.ac-field input, .ac-field select { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--ac-line); border-radius: 8px; background: var(--ac-panel); color: var(--ac-text); }
.ac-field input[aria-invalid="true"] { border-color: var(--ac-neg); }
.ac-err { margin: 4px 0 0; color: var(--ac-neg); font-size: 13.5px; }
.ac-pw { position: relative; }
.ac-pw input { padding-right: 84px; }
.ac-pw-eye { position: absolute; right: 4px; top: 4px; bottom: 4px; border: 0; background: var(--ac-soft); color: var(--ac-ink); border-radius: 6px; padding: 0 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.ac-narrow { max-width: 520px; }
.ac-switch { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--ac-soft); }
.ac-switch:first-of-type { border-top: 0; padding-top: 0; }
.ac-switch label { cursor: pointer; }
.ac-switch b { display: block; }
.ac-switch small { display: block; color: var(--ac-muted); font-size: 13.5px; margin-top: 2px; }
.ac-tog { position: relative; width: 44px; height: 26px; flex: none; }
.ac-tog input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.ac-tog span { position: absolute; inset: 0; background: var(--ac-line); border-radius: 99px; transition: background .15s; }
.ac-tog span::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.ac-tog input:checked + span { background: var(--ac-ink); }
.ac-tog input:checked + span::after { transform: translateX(18px); }
.ac-tog input:focus-visible + span { outline: 2px solid var(--ac-ink); outline-offset: 2px; }
.ac-prose { line-height: 1.65; overflow-wrap: anywhere; }
.ac-prose h2 { font-size: 20px; margin-bottom: 10px; }
.ac-prose img { max-width: 100%; height: auto; }

/* ---------- WhatsApp (customer/partials/ac-widgets): pulsante fisso in basso a destra ---------- */
.ac-wa { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
@media (min-width: 760px) { .ac-wa { bottom: 20px; right: 20px; } }
.ac .ac-wa-btn { width: 54px; height: 54px; border-radius: 50%; border: 0; background: #1d8a47; color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
    display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.ac-wa-btn:hover { background: #17733b; }
.ac-wa-btn:focus-visible { outline: 3px solid #1d8a47; outline-offset: 3px; }
.ac-wa-panel { width: min(330px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow-y: auto; background: var(--ac-panel); color: var(--ac-text);
    border: 1px solid var(--ac-line); border-radius: 14px; box-shadow: 0 12px 34px rgba(0, 20, 40, .25); }
.ac-wa-head { background: #1d8a47; color: #fff; padding: 12px 16px; border-radius: 13px 13px 0 0; }
.ac-wa-head b, .ac-wa-head small { display: block; }
.ac-wa-head small { opacity: .85; font-size: 13px; }
.ac-wa-topics, .ac-wa-msg { padding: 12px 16px 16px; display: grid; gap: 8px; }
.ac-wa-topics[hidden], .ac-wa-msg[hidden] { display: none; }
.ac-wa-topics p { margin: 0 0 4px; color: var(--ac-muted); font-size: 14px; }
.ac-wa-topic { text-align: left; border: 1px solid var(--ac-line); background: var(--ac-panel); color: var(--ac-text); border-radius: 10px; padding: 10px 12px; font-weight: 600; cursor: pointer; }
.ac-wa-topic:hover { border-color: #1d8a47; background: #eef8f1; }
.ac-wa-msg label { font-weight: 700; font-size: 14px; }
.ac-wa-msg textarea { width: 100%; font: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--ac-line); border-radius: 10px; resize: vertical; color: var(--ac-text); background: var(--ac-panel); }
.ac-wa-a { display: flex; justify-content: flex-end; gap: 8px; }
.ac .ac-wa-send { background: #1d8a47; border-color: #1d8a47; color: #fff !important; }

/* ---------- banner della struttura in home (foto o colore), la card sale sopra il bordo ---------- */
.ac-hero { background-color: var(--ac-hero-bg); background-size: cover; background-position: center; color: var(--ac-hero-fg); min-height: 190px; }
.ac-hero-in { max-width: 1120px; margin: 0 auto; padding: 22px 16px 0; }
.ac-hero h1 { font-size: 26px; color: inherit; }
.ac-hero p { margin: 4px 0 0; opacity: .92; }
.ac-hero.has-img h1, .ac-hero.has-img p { text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.ac-main-hero { padding-top: 0; }
.ac-main-hero .ac-home { margin-top: -84px; }
.ac-main-hero .ac-stack { padding-top: 0; }
@media (min-width: 760px) {
    .ac-hero { min-height: 220px; }
    .ac-hero-in { padding-top: 30px; }
    .ac-hero h1 { font-size: 30px; }
    .ac-main-hero .ac-home { margin-top: -70px; }
    /* da computer sale solo la colonna della card; i pannelli partono sotto il banner */
    .ac-main-hero .ac-stack { margin-top: 70px; padding-top: 20px; }
}

.ac-icon-btn[aria-current="page"] { background: rgba(255, 255, 255, .18); box-shadow: inset 0 -2px 0 currentColor; }

/* ---------- accesso e registrazione del cliente (layout customer/layouts/accesso, 2026-11-20) ---------- */
.ac-auth { display: grid; gap: 18px; align-content: start; align-items: start; grid-template-columns: minmax(0, 1fr); }
.ac-auth-form { padding: 22px 18px; display: grid; gap: 18px; align-content: start; }
.ac-auth-form h1 { font-size: 24px; }
.ac-auth-form h1 + p { margin: 4px 0 0; }
.ac-auth-form .ac-alert { margin: 0; }
.ac-auth-form .ac-field input { height: 46px; padding: 0 12px; border-color: #c9d1db; }
.ac-auth-form .ac-field input:focus { outline: none; border-color: var(--ac-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-ink) 22%, transparent); }
.ac-auth-form .ac-field input[aria-invalid="true"] { border-color: var(--ac-neg); background: #fffafa; }
.ac-auth-form .ac-pw input { padding-right: 84px; }
.ac-auth-form .ac-err { font-weight: 600; }
.ac-auth-hint { margin: 4px 0 0; font-size: 13px; color: var(--ac-muted); }
.ac-auth-row { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.ac-auth-gr { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ac-muted); margin-top: 6px !important; }
.ac-auth-check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.ac-auth-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ac-ink); cursor: pointer; }
.ac-auth-check input[aria-invalid="true"] { outline: 2px solid var(--ac-neg); outline-offset: 1px; }
.ac-auth-check a { font-weight: 600; white-space: nowrap; }
.ac-auth-check .ac-err { display: block; }
.ac-auth-btn { width: 100%; min-height: 48px; font-size: 16px; }
.ac-auth-right { margin: -4px 0 0; text-align: right; }
.ac-auth-center { margin: 0; text-align: center; }
.ac-auth-right a, .ac-auth-center a { font-weight: 600; text-decoration: none; }
.ac-auth-right a:hover, .ac-auth-center a:hover { text-decoration: underline; }
.ac-auth-or { display: flex; align-items: center; gap: 12px; color: var(--ac-muted); font-size: 13px; }
.ac-auth-or::before, .ac-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--ac-line); }
.ac-auth-bonus { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--ac-warn-bg); border: 1px solid var(--ac-warn-line); font-size: 14px; font-weight: 600; color: var(--ac-pts); }
.ac-auth-bonus svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ac-auth-aside { display: grid; gap: 16px; justify-items: center; align-content: start; }
.ac-auth-pass { font-size: 12.5px; width: 100%; max-width: 360px; } /* stessa larghezza del riquadro sotto */
.ac-auth-pass .frd-pass-qrbox { filter: blur(3px); opacity: .7; }
.ac-auth-perks { width: 100%; max-width: 360px; padding: 16px; }
.ac-auth-perks h2 { font-size: 17px; }
.ac-auth-perks ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.ac-auth-perks li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; font-size: 14px; }
.ac-auth-perks b { display: block; font-size: 15px; }
.ac-auth-perks span { color: var(--ac-muted); }
.ac-auth-perks i { width: 40px; height: 40px; border-radius: 10px; background: var(--ac-tint); color: var(--ac-ink); display: grid; place-items: center; }
.ac-auth-perks svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 560px) {
    .ac-auth-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 860px) {
    .ac-auth { max-width: 1040px; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; padding-top: 32px; }
    .ac-auth-form { padding: 30px 32px; }
    .ac-auth-pass { font-size: 14px; }
}

/* ---------- pagina "Vedi la tua Carta" (admin/customers/cards, rotta sendCard): una colonna con la card al centro ---------- */
.ac-auth.ac-auth-card { grid-template-columns: minmax(0, 440px); justify-content: center; }
.ac-cardpage-pass { display: flex; justify-content: center; font-size: 15px; }
.ac-cardpage-pass .frd-pass { max-width: 100%; }
@media (max-width: 380px) { .ac-cardpage-pass { font-size: 13.5px; } }
.ac-cardpage-wallet { background: none; border: 0; padding: 0; cursor: pointer; }
.ac-cardpage-wallet img { display: block; height: 48px; width: auto; }

/* ---------- pagina pubblica dei livelli (customer/cards/index-na, rotta guest.card) ---------- */
.ac-auth.ac-auth-levels { grid-template-columns: minmax(0, 960px); justify-content: center; }
.ac-lvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px 18px; }
.ac-lvgrid .ac-step { width: auto; }
.ac-lvgrid .ac-step .frd-pass { width: 100%; font-size: 7.6px; }
.ac-lv-none { margin: 6px 0 0; }
.ac-lv-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) {
    .ac-lvgrid { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
    .ac-lvgrid .ac-step .frd-pass { font-size: 6.6px; }
    .ac-lv-cta { grid-template-columns: 1fr; }
}
