/* BusinessPro — Frontend (webapp + customer login) */
/* ==================================================
   Tema: dark mode con accenti neon (magenta/pink)
   Mobile-first, responsive desktop.
   Tutte le classi con prefisso .bp-
   ================================================== */

/* v1.2.0 — font Poppins + Inter (Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

.bp-app, .bp-auth-wrap {
    --bp-bg: #0b0a12;
    --bp-bg-2: #131122;
    --bp-surface: #1a1730;
    --bp-surface-2: #221e3a;
    --bp-border: rgba(255,255,255,0.08);
    --bp-text: #eaeaf3;
    --bp-muted: #9a98b5;
    --bp-accent: #ec3c8c;
    --bp-accent-2: #b43cec;
    --bp-accent-3: #6e49f7;
    --bp-success: #2ec277;
    --bp-danger: #f45b6a;
    --bp-warn: #f5c451;
    --bp-radius: 14px;
    --bp-radius-lg: 22px;
    --bp-shadow: 0 8px 24px rgba(0,0,0,0.35);
    color: var(--bp-text);
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.45;
    box-sizing: border-box;
}
.bp-app *, .bp-app *::before, .bp-app *::after,
.bp-auth-wrap *, .bp-auth-wrap *::before, .bp-auth-wrap *::after { box-sizing: border-box; }

/* LAYOUT APP ------------------------------------------------------- */
.bp-app {
    background: radial-gradient(1200px 600px at 10% -10%, rgba(236,60,140,0.12), transparent 60%),
                radial-gradient(900px 500px at 120% 10%, rgba(180,60,236,0.1), transparent 55%),
                var(--bp-bg);
    min-height: 100vh;
    padding: 14px 16px 96px;
    position: relative;
    overflow-x: hidden;
}
@media (min-width: 900px) {
    .bp-app { padding: 24px 32px 40px; max-width: 1280px; margin: 0 auto; }
}

/* v1.1.9 — sfondo interno personalizzabile dal Titolare ----------- */
.bp-app.bp-bg-custom {
    background: var(--bp-app-bg, var(--bp-bg));
}
.bp-app.bp-bg-custom.bp-bg-gradient {
    background: linear-gradient(135deg,
        var(--bp-app-bg, var(--bp-bg)) 0%,
        var(--bp-app-bg-secondary, var(--bp-bg-2)) 100%);
}

/* Modalità "no fidelity" — landing page senza login/punti */
.bp-app.bp-no-fidelity .bp-quiz-card { display: none; }
/* v1.2.5 — safety net: nasconde tutto il blocco actions (login/chip/logout)
   se il modulo fidelity non è attivo, a prescindere dallo stato PHP */
.bp-app.bp-no-fidelity .bp-header-right,
.bp-app.bp-no-fidelity [data-bp-modal="login"],
.bp-app.bp-no-fidelity [data-bp-modal="points"] { display: none !important; }

/* HEADER ----------------------------------------------------------- */
.bp-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 6px 2px 16px;
}
.bp-brand {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; letter-spacing: 0.02em;
    color: var(--bp-accent);
}
.bp-brand-ic { color: var(--bp-accent); }
.bp-header-right { display: flex; align-items: center; gap: 10px; }
.bp-user-chip {
    display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1;
}
.bp-user-name { font-size: 13px; color: var(--bp-text); }
.bp-user-points { font-size: 11px; color: var(--bp-accent); font-weight: 700; letter-spacing: .04em; }
.bp-icon-btn {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.04); border: 1px solid var(--bp-border);
    color: var(--bp-text); cursor: pointer; transition: background .2s, transform .2s;
    text-decoration: none;
}
.bp-icon-btn:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }

/* MAIN ------------------------------------------------------------- */
.bp-main { display: flex; flex-direction: column; gap: 18px; }
.bp-hello { font-size: 26px; font-weight: 800; margin: 10px 2px 0; line-height: 1.1; }
.bp-wave { display: inline-block; transform: translateY(-2px); }
.bp-sub { color: var(--bp-muted); margin: 0 2px 8px; }

/* HERO OFFER ------------------------------------------------------- */
.bp-hero-offer {
    position: relative; overflow: hidden;
    border-radius: var(--bp-radius-lg); padding: 20px;
    background:
        linear-gradient(135deg, rgba(180,60,236,0.25), rgba(236,60,140,0.25)),
        var(--bp-surface);
    border: 1px solid var(--bp-border);
    box-shadow: var(--bp-shadow);
    min-height: 200px; display: flex; gap: 14px; align-items: stretch;
    animation: bp-fade-up .4s ease both;
}
.bp-hero-text { flex: 1 1 60%; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.bp-hero-tag { font-size: 11px; letter-spacing: .16em; color: var(--bp-warn); font-weight: 700; }
.bp-hero-title { font-size: 26px; font-weight: 800; margin: 4px 0; line-height: 1.05; }
.bp-hero-sub { color: #ffeec2; font-weight: 600; font-size: 15px; margin: 0; }
.bp-hero-price { font-size: 30px; font-weight: 800; margin-top: 6px; }
.bp-hero-img {
    flex: 1 1 40%; background-size: cover; background-position: center;
    border-radius: var(--bp-radius); min-height: 160px;
}
@media (min-width: 900px) {
    .bp-hero-offer { padding: 32px; }
    .bp-hero-title { font-size: 36px; }
    .bp-hero-price { font-size: 42px; }
}

/* QUICK NAV -------------------------------------------------------- */
.bp-quicknav {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 4px 0 2px;
}
.bp-qn {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 10px 2px; text-decoration: none; color: var(--bp-text);
    transition: transform .2s;
}
.bp-qn:hover { transform: translateY(-2px); }
.bp-qn-ic {
    width: 44px; height: 44px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; color: #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,.35);
}
.bp-qn-a .bp-qn-ic { background: linear-gradient(135deg, #ec3c8c, #b43cec); }
.bp-qn-b .bp-qn-ic { background: linear-gradient(135deg, #6e49f7, #3b2bb3); }
.bp-qn-c .bp-qn-ic { background: linear-gradient(135deg, #2cc4e3, #2462d4); }
.bp-qn-d .bp-qn-ic { background: linear-gradient(135deg, #24c978, #148b56); }
.bp-qn-e .bp-qn-ic { background: linear-gradient(135deg, #f5c451, #d97b2a); }
.bp-qn small { font-size: 11px; color: var(--bp-muted); }

/* POINTS CARD ------------------------------------------------------ */
.bp-points-card {
    padding: 18px; border-radius: var(--bp-radius-lg);
    background:
        linear-gradient(135deg, rgba(180,60,236,0.35), rgba(236,60,140,0.12)),
        var(--bp-surface);
    border: 1px solid var(--bp-border); box-shadow: var(--bp-shadow);
    animation: bp-fade-up .4s ease both;
}
.bp-points-top { display: flex; align-items: center; justify-content: space-between; }
.bp-points-label { color: var(--bp-muted); font-size: 12px; letter-spacing: .14em; }
.bp-points-value { font-size: 28px; font-weight: 800; }
.bp-points-gift { font-size: 38px; filter: drop-shadow(0 0 10px rgba(236,60,140,.55)); }
.bp-points-hint { color: #d6d5ea; margin: 10px 0 12px; font-size: 14px; }
.bp-progress {
    height: 10px; border-radius: 999px; background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.bp-progress-bar {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--bp-accent), var(--bp-accent-2));
    transition: width .5s ease;
    box-shadow: 0 0 16px rgba(236,60,140,.5);
}

/* QUIZ CARD -------------------------------------------------------- */
.bp-quiz-card, .bp-rewards-card, .bp-offers {
    background: var(--bp-surface); border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg); padding: 18px;
    animation: bp-fade-up .4s ease both;
}
.bp-quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bp-section-tag { font-size: 10px; letter-spacing: .2em; color: var(--bp-accent); font-weight: 800; }
.bp-quiz-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, #2cc4e3, #2462d4);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 900; color: #fff;
}
.bp-quiz-q { padding: 10px 0; border-top: 1px dashed var(--bp-border); }
.bp-quiz-q:first-child { border-top: 0; padding-top: 4px; }
.bp-quiz-n { font-weight: 600; margin-bottom: 8px; }
.bp-quiz-options { display: flex; flex-direction: column; gap: 6px; }
.bp-quiz-opt {
    display: flex; gap: 10px; align-items: center;
    padding: 10px 12px; border-radius: 12px;
    border: 1px solid var(--bp-border); background: rgba(255,255,255,0.02);
    cursor: pointer; transition: background .2s, border-color .2s;
}
.bp-quiz-opt:hover { background: rgba(255,255,255,0.06); border-color: rgba(236,60,140,0.35); }
.bp-quiz-opt input { accent-color: var(--bp-accent); }
.bp-quiz-opt.bp-correct { border-color: var(--bp-success); background: rgba(46,194,119,0.15); }
.bp-quiz-opt.bp-wrong { border-color: var(--bp-danger); background: rgba(244,91,106,0.15); }
.bp-quiz-progress { margin: 12px 0; }
.bp-quiz-feedback {
    margin-top: 12px; padding: 12px; border-radius: 12px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--bp-border);
}
.bp-quiz-done { padding: 10px 12px; background: rgba(255,255,255,0.03); border-radius: 12px; }
.bp-ok { color: var(--bp-success); font-weight: 700; }

/* REWARDS ---------------------------------------------------------- */
.bp-rewards-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.bp-reward-row {
    display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: center;
    padding: 10px 12px; border-radius: 12px; border: 1px solid var(--bp-border);
    background: rgba(255,255,255,0.02);
}
.bp-reward-row.bp-reward-on { border-color: rgba(236,60,140,.45); background: rgba(236,60,140,.06); }
.bp-reward-thr { font-weight: 800; color: var(--bp-accent); }
.bp-codes-title { margin: 16px 0 6px; font-size: 14px; color: var(--bp-muted); }
.bp-codes-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bp-codes-list li {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 999px;
    background: rgba(236,60,140,.14); border: 1px solid rgba(236,60,140,.4);
}
.bp-codes-list code { font-family: 'JetBrains Mono', monospace; font-weight: 700; }

/* OFFERS ----------------------------------------------------------- */
.bp-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bp-link { color: var(--bp-accent); text-decoration: none; font-weight: 600; font-size: 13px; }
.bp-offer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) {
    .bp-offer-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
.bp-offer-row {
    display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center;
    padding: 10px; border-radius: var(--bp-radius); background: var(--bp-surface-2);
    border: 1px solid var(--bp-border);
}
@media (min-width: 900px) {
    .bp-offer-row { grid-template-columns: 1fr; padding: 12px; }
    .bp-offer-row .bp-offer-img { height: 180px; }
}
.bp-offer-img {
    width: 90px; height: 90px; border-radius: 12px; background-size: cover; background-position: center;
    background-color: rgba(255,255,255,0.06);
}
.bp-offer-img-ph { background: linear-gradient(135deg, #2b264a, #3a3364); }
.bp-offer-title { font-weight: 700; }
.bp-offer-sub { color: var(--bp-muted); font-size: 13px; margin-top: 2px; }
.bp-offer-price { color: var(--bp-warn); font-weight: 800; margin-top: 4px; }
.bp-offer-go {
    width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--bp-accent); color: #fff; font-size: 20px; line-height: 1;
    box-shadow: 0 4px 14px rgba(236,60,140,.5);
}

/* BUTTONS --------------------------------------------------------- */
.bp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 700; cursor: pointer; font-size: 14px;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    text-decoration: none;
}
.bp-btn-primary {
    background: linear-gradient(135deg, var(--bp-accent), #ff5fa6);
    color: #fff; box-shadow: 0 10px 24px rgba(236,60,140,.35);
}
.bp-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(236,60,140,.5); }
.bp-btn-ghost { background: rgba(255,255,255,0.04); color: var(--bp-text); border-color: var(--bp-border); }
.bp-btn-ghost:hover { background: rgba(255,255,255,0.08); }
.bp-btn-small { padding: 8px 12px; font-size: 13px; }
.bp-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* MODAL & FORMS --------------------------------------------------- */
.bp-modal {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(5,4,12,.72); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; animation: bp-fade .2s ease both;
}
.bp-modal[hidden] { display: none; }
.bp-modal-inner {
    width: 100%; max-width: 440px; background: var(--bp-surface);
    border: 1px solid var(--bp-border); border-radius: var(--bp-radius-lg);
    padding: 22px; position: relative; box-shadow: var(--bp-shadow);
    animation: bp-fade-up .25s ease both;
}
.bp-modal-close {
    position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
    border-radius: 50%; border: 0; background: rgba(255,255,255,.06);
    color: #fff; font-size: 22px; cursor: pointer;
}
.bp-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.bp-tab {
    flex: 1; padding: 10px; border-radius: 999px; border: 1px solid var(--bp-border);
    background: transparent; color: var(--bp-muted); cursor: pointer; font-weight: 600;
    transition: all .2s;
}
.bp-tab.bp-tab-active { background: var(--bp-accent); color: #fff; border-color: transparent; }
.bp-form { display: flex; flex-direction: column; gap: 12px; }
.bp-form label {
    display: flex; flex-direction: column; gap: 6px;
    font-size: 12px; color: var(--bp-muted); font-weight: 600; letter-spacing: .04em;
}
.bp-form input, .bp-form textarea, .bp-form select {
    width: 100%; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--bp-border); background: rgba(255,255,255,0.04);
    color: var(--bp-text); font-size: 14px; outline: none;
    transition: border-color .2s, background .2s;
}
.bp-form input:focus, .bp-form textarea:focus {
    border-color: var(--bp-accent); background: rgba(255,255,255,0.07);
}
.bp-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bp-form-feedback {
    padding: 10px 12px; border-radius: 10px; font-size: 13px;
    background: rgba(46,194,119,.1); color: #c9f4d8; border: 1px solid rgba(46,194,119,.35);
}
.bp-form-feedback.bp-err { background: rgba(244,91,106,.1); color: #ffd4d9; border-color: rgba(244,91,106,.4); }
.bp-muted { color: var(--bp-muted); font-size: 13px; }
.bp-center { text-align: center; }
.bp-accent { color: var(--bp-accent); }

/* AUTH WRAPPER (owner & customer login standalone) ---------------- */
.bp-auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 30px 16px;
    background: radial-gradient(1000px 500px at 20% -10%, rgba(236,60,140,0.18), transparent 60%),
                radial-gradient(800px 400px at 120% 10%, rgba(180,60,236,0.15), transparent 55%),
                var(--bp-bg);
}
.bp-auth-card {
    width: 100%; max-width: 420px; background: var(--bp-surface);
    border: 1px solid var(--bp-border); border-radius: var(--bp-radius-lg);
    padding: 26px; box-shadow: var(--bp-shadow);
}
.bp-auth-brand { text-align: center; margin-bottom: 18px; }
.bp-auth-brand h1 { margin: 6px 0 2px; font-size: 26px; color: var(--bp-accent); }
.bp-auth-brand p { margin: 0; color: var(--bp-muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.bp-brand-ic-lg { font-size: 36px; filter: drop-shadow(0 0 14px rgba(236,60,140,.4)); }
#bp-owner-login .forgetmenot { margin: 6px 0; }
#bp-owner-login input[type="text"],
#bp-owner-login input[type="password"] {
    width: 100%; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--bp-border); background: rgba(255,255,255,0.04);
    color: var(--bp-text); margin-bottom: 10px;
}
#bp-owner-login .submit { text-align: center; }
#bp-owner-login #wp-submit {
    width: 100%; padding: 12px; border: 0; border-radius: 999px;
    background: linear-gradient(135deg, var(--bp-accent), #ff5fa6); color: #fff; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 24px rgba(236,60,140,.35);
}
.bp-inline-msg { padding: 10px 12px; border-radius: 10px; background: rgba(236,60,140,.12); border: 1px solid rgba(236,60,140,.4); margin-bottom: 12px; font-size: 13px; }

/* TOAST ----------------------------------------------------------- */
.bp-toast {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    padding: 10px 16px; border-radius: 999px; background: rgba(26,23,48,.95);
    border: 1px solid rgba(236,60,140,.45); color: #fff; font-size: 13px; z-index: 100;
    box-shadow: 0 10px 24px rgba(0,0,0,.4);
    animation: bp-fade-up .3s ease both;
}

/* ANIMATIONS ------------------------------------------------------ */
@keyframes bp-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bp-fade { from {opacity: 0;} to {opacity: 1;} }

/* v1.1 polish ---------------------------------------------------- */
.bp-brand-logo {
    width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
    box-shadow: 0 0 0 1px var(--bp-border), 0 6px 14px rgba(0,0,0,.3);
}
@media (min-width: 700px) {
    .bp-brand-logo { width: 68px; height: 68px; border-radius: 14px; }
}
.bp-brand { gap: 0; }
.bp-auth-logo {
    width: 64px; height: 64px; border-radius: 16px; object-fit: cover;
    margin-bottom: 6px; box-shadow: 0 0 0 1px var(--bp-border), 0 8px 18px rgba(0,0,0,.4);
}
a.bp-btn-primary { color: #fff; }
a.bp-offer-go {
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
}

/* CONTATTI / SOCIAL ---------------------------------------------- */
.bp-contacts {
    margin-top: 14px; padding: 16px 18px; border-radius: var(--bp-radius-lg);
    background: linear-gradient(135deg, rgba(110,73,247,0.18), rgba(236,60,140,0.12)), var(--bp-surface);
    border: 1px solid var(--bp-border);
}
.bp-contacts h4 { margin: 0 0 10px; font-size: 14px; color: var(--bp-muted); letter-spacing: .12em; text-transform: uppercase; }
.bp-contacts-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-contact-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    text-decoration: none; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,0.04); color: var(--bp-text); border: 1px solid var(--bp-border);
    transition: transform .15s, background .2s, border-color .2s;
}
.bp-contact-chip:hover { transform: translateY(-1px); background: rgba(255,255,255,.08); border-color: rgba(236,60,140,.5); }
.bp-contact-chip.bp-wa { background: rgba(37,211,102,.12); border-color: rgba(37,211,102,.4); color: #c9f6d8; }
.bp-contact-chip.bp-ig { background: linear-gradient(135deg, rgba(225,48,108,.18), rgba(247,119,55,.18)); border-color: rgba(225,48,108,.4); color: #ffd1de; }
.bp-contact-chip.bp-fb { background: rgba(59,89,152,.16); border-color: rgba(59,89,152,.5); color: #cfe0ff; }

.bp-h3 {
    margin: 18px 0 6px; font-size: 13px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--bp-accent);
}

/* Login Titolare custom: leggibilità */
.bp-owner-login-form .bp-check { color: var(--bp-muted); font-size: 13px; flex-direction: row; align-items: center; gap: 8px; }
.bp-inline-msg.bp-err { background: rgba(244,91,106,.12); border-color: rgba(244,91,106,.45); color: #ffd4d9; }


/* v1.1.3 — card cliccabili + modal offerta ---------------------- */
.bp-offer-card { cursor: pointer; transition: transform .18s ease, box-shadow .2s ease, border-color .2s; }
.bp-offer-card:hover { transform: translateY(-2px); }
.bp-offer-card:focus-visible { outline: 2px solid var(--bp-accent); outline-offset: 3px; }
section.bp-offer-card:hover { box-shadow: 0 16px 40px rgba(0,0,0,.45); }
li.bp-offer-card:hover { border-color: rgba(236,60,140,.45); }

.bp-hero-hint {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 10px; font-size: 12px; letter-spacing: .14em;
    color: rgba(255,255,255,.75); text-transform: uppercase; font-weight: 700;
}
.bp-offer-card .bp-offer-go {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bp-accent); color: #fff; font-size: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(236,60,140,.5); pointer-events: none;
}

/* Modal offerta */
.bp-offer-modal .bp-offer-modal-inner {
    max-width: 520px; padding: 0; overflow: hidden;
    display: flex; flex-direction: column;
    animation: bp-scale-in .22s ease both;
}
.bp-om-img {
    width: 100%; height: 240px; background-size: cover; background-position: center;
    background-color: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--bp-border);
}
.bp-om-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.bp-om-title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.15; }
.bp-om-price {
    align-self: flex-start; padding: 4px 12px; border-radius: 999px;
    background: rgba(245,196,81,.14); color: var(--bp-warn);
    font-weight: 800; font-size: 14px; border: 1px solid rgba(245,196,81,.35);
}
.bp-om-sub { margin: 0; color: #d6d5ea; font-weight: 600; font-size: 14px; }
.bp-om-desc { margin: 0; color: var(--bp-muted); font-size: 14px; line-height: 1.55; white-space: pre-line; }
.bp-om-cta { margin-top: 8px; align-self: flex-start; }

@keyframes bp-scale-in {
    from { opacity: 0; transform: scale(.96) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* v1.1.4 — In evidenza (carosello) + tweak rewards title --------- */
.bp-rewards-title { font-size: 16px; line-height: 1.2; margin: 0 0 4px; }
@media (min-width: 700px) { .bp-rewards-title { font-size: 18px; } }

.bp-featured { background: var(--bp-surface); border: 1px solid var(--bp-border); border-radius: var(--bp-radius-lg); padding: 18px; animation: bp-fade-up .4s ease both; }
.bp-featured-scroll {
    display: flex; gap: 12px; overflow-x: auto;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px; margin: 0 -2px;
    scrollbar-width: thin;
}
.bp-featured-scroll::-webkit-scrollbar { height: 6px; }
.bp-featured-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }
.bp-featured-card {
    flex: 0 0 64%; max-width: 280px; min-width: 200px;
    scroll-snap-align: start;
    background: var(--bp-surface-2); border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius); padding: 0; overflow: hidden;
    display: flex; flex-direction: column;
}
@media (min-width: 700px) { .bp-featured-card { flex-basis: 220px; } }
.bp-featured-img {
    width: 100%; height: 160px; background-size: cover; background-position: center;
    background-color: rgba(255,255,255,0.04);
}
.bp-featured-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.bp-featured-title { font-weight: 700; font-size: 14px; line-height: 1.2; }
.bp-featured-price { color: var(--bp-warn); font-weight: 800; font-size: 14px; }

/* v1.1.5 — header badge punti + modal punti + quiz step ---------- */
button.bp-user-chip {
    display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px;
    padding: 6px 12px; border-radius: 999px; cursor: pointer;
    background: rgba(255,255,255,0.04); border: 1px solid var(--bp-border);
    color: var(--bp-text); line-height: 1.05;
    transition: background .2s, border-color .2s, transform .15s;
}
button.bp-user-chip:hover { background: rgba(236,60,140,.12); border-color: rgba(236,60,140,.4); transform: translateY(-1px); }
button.bp-user-chip:focus-visible { outline: 2px solid var(--bp-accent); outline-offset: 2px; }
.bp-user-points { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--bp-accent); font-weight: 700; letter-spacing: .04em; }
.bp-pts-ic { color: var(--bp-warn); font-size: 11px; }

/* Modal punti */
.bp-points-modal-inner { max-width: 480px; }
.bp-pm-head {
    display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
    padding-bottom: 14px; border-bottom: 1px solid var(--bp-border);
}
.bp-pm-head .bp-points-gift { font-size: 36px; filter: drop-shadow(0 0 12px rgba(236,60,140,.5)); }
.bp-pm-title { margin: 18px 0 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--bp-accent); }

/* Quiz step mode */
.bp-quiz-stepper {
    display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px;
    padding-bottom: 12px; border-bottom: 1px dashed var(--bp-border);
}
.bp-quiz-step-label { font-size: 12px; letter-spacing: .1em; color: var(--bp-muted); text-transform: uppercase; }
.bp-quiz-step-label strong { color: var(--bp-accent); }
.bp-quiz-track { position: relative; min-height: 160px; }
.bp-quiz-q { padding: 6px 0; border-top: 0; }
.bp-quiz-q[hidden] { display: none !important; }
.bp-quiz-summary { text-align: center; padding: 18px 0; }
.bp-quiz-summary .bp-quiz-n { font-size: 18px; margin-bottom: 8px; }
.bp-quiz-nav {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    margin-top: 12px;
}
.bp-quiz-nav .bp-quiz-prev { margin-right: auto; }
.bp-quiz-nav .bp-quiz-submit-btn { margin-left: auto; }

@keyframes bp-quiz-slide-in {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* v1.1.6 — riepilogo compatto quiz (post-submit) */
.bp-quiz-result {
    display: flex; flex-direction: column; gap: 10px; align-items: stretch;
    padding: 16px 18px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(110,73,247,0.18), rgba(236,60,140,0.12));
    border: 1px solid rgba(236,60,140,.3);
    text-align: center;
    animation: bp-fade-up .3s ease both;
}
.bp-quiz-result-score {
    font-size: 38px; font-weight: 800; color: var(--bp-accent); line-height: 1;
    text-shadow: 0 0 20px rgba(236,60,140,.45);
}
.bp-quiz-result-label { font-size: 13px; color: var(--bp-muted); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.bp-quiz-result-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; background: rgba(255,255,255,.04); border-radius: 10px;
    font-size: 14px;
}
.bp-quiz-result-row span { color: var(--bp-muted); }
.bp-quiz-result-row strong { color: #fff; font-size: 16px; }
.bp-quiz-result-prize {
    margin-top: 6px; padding: 12px; border-radius: 10px;
    background: rgba(46,194,119,0.12); border: 1px solid rgba(46,194,119,0.4);
    color: #c9f4d8;
}
.bp-quiz-result-prize code {
    display: inline-block; margin-top: 4px; padding: 4px 10px;
    background: rgba(0,0,0,.25); border-radius: 6px;
    font-size: 16px; color: #fff; font-weight: 700; letter-spacing: .08em;
}

/* v1.1.7 — quiz card compatta + collapse */
.bp-quiz-card .bp-quiz-head { margin-bottom: 6px; }
.bp-quiz-intro {
    margin: 4px 0 12px; color: var(--bp-muted); font-size: 14px; line-height: 1.4;
}
.bp-quiz-toggle { align-self: flex-start; }
.bp-quiz-collapse {
    margin-top: 14px; padding-top: 14px;
    border-top: 1px dashed var(--bp-border);
    animation: bp-quiz-collapse-in .25s ease both;
    overflow: hidden;
}
.bp-quiz-collapse[hidden] { display: none; }

@keyframes bp-quiz-collapse-in {
    from { opacity: 0; transform: translateY(-4px); max-height: 0; }
    to   { opacity: 1; transform: translateY(0); max-height: 1500px; }
}

/* ==================================================
   v1.1.8 — Hero Slider, Eventi, layout polish
   ================================================== */

/* Hero Slider --------------------------------------------------- */
.bp-hero-slider {
    position: relative; overflow: hidden;
    border-radius: var(--bp-radius-lg);
    border: 1px solid var(--bp-border);
    box-shadow: var(--bp-shadow);
    animation: bp-fade-up .4s ease both;
    background: var(--bp-surface);
    -webkit-user-select: none; user-select: none;
}
.bp-hero-track { position: relative; width: 100%; }
.bp-hero-slide {
    position: relative;
    min-height: 240px;
    padding: 22px 22px 26px;
    background-size: cover; background-position: center;
    background-color: var(--bp-surface);
    display: flex; flex-direction: column; justify-content: flex-end;
    cursor: pointer;
    animation: bp-hero-slide-in .45s ease both;
}
.bp-hero-slide[hidden] { display: none !important; }
.bp-hero-slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11,10,18,0) 30%, rgba(11,10,18,.45) 65%, rgba(11,10,18,.85) 100%);
    pointer-events: none;
}
.bp-hero-slide-body {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; gap: 6px;
}
.bp-hero-slide .bp-hero-tag {
    display: inline-block; align-self: flex-start;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(245,196,81,.18); border: 1px solid rgba(245,196,81,.45);
    font-size: 11px; letter-spacing: .14em; color: var(--bp-warn); font-weight: 800;
    text-transform: uppercase;
}
.bp-hero-slide .bp-hero-title {
    color: #fff; margin: 6px 0 2px; font-size: 24px; line-height: 1.1;
    text-shadow: 0 4px 18px rgba(0,0,0,.5);
}
.bp-hero-slide .bp-hero-sub {
    color: #f3eaff; margin: 0; font-size: 14px; font-weight: 500;
    text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.bp-hero-cta { align-self: flex-start; margin-top: 12px; }

@media (min-width: 900px) {
    .bp-hero-slide { min-height: 320px; padding: 36px 40px; }
    .bp-hero-slide .bp-hero-title { font-size: 34px; }
    .bp-hero-slide .bp-hero-sub { font-size: 16px; }
}

.bp-hero-dots {
    position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3;
    display: flex; justify-content: center; gap: 8px;
}
.bp-hero-dot {
    width: 8px; height: 8px; padding: 0;
    border-radius: 999px; border: 0;
    background: rgba(255,255,255,.35); cursor: pointer;
    transition: width .25s ease, background .2s ease;
}
.bp-hero-dot.bp-active { width: 24px; background: var(--bp-accent); box-shadow: 0 0 12px rgba(236,60,140,.55); }

@keyframes bp-hero-slide-in {
    from { opacity: 0; transform: scale(1.02); }
    to   { opacity: 1; transform: scale(1); }
}

/* Ultime: immagini con object-fit: cover + griglia desktop ------ */
@media (min-width: 700px) and (max-width: 899px) {
    .bp-offer-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .bp-offer-list .bp-offer-row { grid-template-columns: 1fr; padding: 12px; }
    .bp-offer-list .bp-offer-row .bp-offer-img { height: 160px; width: 100%; }
}
.bp-offer-row .bp-offer-img,
.bp-featured-card .bp-featured-img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* In evidenza: rifinitura card */
.bp-featured-card { transition: transform .18s ease, box-shadow .2s ease, border-color .2s; }
.bp-featured-card:hover { border-color: rgba(236,60,140,.45); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0,0,0,.35); }

/* Eventi --------------------------------------------------------- */
.bp-events {
    background: var(--bp-surface); border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg); padding: 18px;
    animation: bp-fade-up .4s ease both;
}
.bp-events-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
@media (min-width: 700px) {
    .bp-events-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (min-width: 1100px) {
    .bp-events-list { grid-template-columns: repeat(3, 1fr); }
}
.bp-event-row {
    display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center;
    padding: 12px; border-radius: var(--bp-radius);
    background: var(--bp-surface-2); border: 1px solid var(--bp-border);
    transition: border-color .2s, transform .18s ease;
}
.bp-event-row:hover { border-color: rgba(110,73,247,.45); transform: translateY(-2px); }
.bp-event-icon {
    width: 64px; height: 64px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(110,73,247,.4), rgba(236,60,140,.3));
    background-size: cover; background-position: center;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.bp-event-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.bp-event-when {
    color: var(--bp-warn); font-weight: 700; font-size: 12px; margin-top: 4px;
    letter-spacing: .04em;
}

/* Quiz button più leggibile + card più compatta ----------------- */
.bp-quiz-card { padding: 16px; }
@media (min-width: 700px) { .bp-quiz-card { padding: 20px; } }
.bp-quiz-card .bp-quiz-toggle {
    background: linear-gradient(135deg, var(--bp-accent), #ff5fa6);
    color: #fff;
    padding: 12px 20px;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(236,60,140,.4);
}
.bp-quiz-card .bp-quiz-toggle:hover {
    box-shadow: 0 12px 26px rgba(236,60,140,.55);
    transform: translateY(-1px);
}

/* Help text in dashboard ---------------------------------------- */
.bp-help { color: var(--bp-muted); font-size: 12px; margin: -2px 0 4px; line-height: 1.45; }

/* ==================================================
   v1.2.0 — Override CSS vars (testi, card, pulsanti)
   Ogni regola usa var(--bp-xxx, fallback) così se il
   Titolare non ha impostato il colore custom, resta
   il default storico.
   ================================================== */

/* Titoli principali */
.bp-app .bp-hello                { color: var(--bp-text-h1, var(--bp-text)); }

/* Sottotitoli / descrizione hero */
.bp-app .bp-sub                  { color: var(--bp-text-sub, var(--bp-muted)); }

/* Titoli sezioni (Ultime, In evidenza, Eventi, ecc) */
.bp-app .bp-section-head h3,
.bp-app .bp-quiz-head h3,
.bp-app .bp-pm-title             { color: var(--bp-text-section-title, var(--bp-text)); }

/* Testo sezioni (intro quiz, descrizioni, riepiloghi) */
.bp-app .bp-quiz-intro,
.bp-app .bp-quiz-n,
.bp-app .bp-points-hint          { color: var(--bp-text-section, var(--bp-text)); }

/* Testo card (offerte, eventi, in evidenza) */
.bp-app .bp-offer-title,
.bp-app .bp-featured-title,
.bp-app .bp-event-title,
.bp-app .bp-hero-slide .bp-hero-title { color: var(--bp-text-card, var(--bp-text)); }

/* Prezzo / promo */
.bp-app .bp-offer-price,
.bp-app .bp-featured-price,
.bp-app .bp-hero-tag,
.bp-app .bp-hero-slide .bp-hero-tag,
.bp-app .bp-event-when,
.bp-app .bp-hero-price           { color: var(--bp-text-price, var(--bp-warn)); }

/* Sfondo card / sezioni */
.bp-app .bp-quiz-card,
.bp-app .bp-rewards-card,
.bp-app .bp-offers,
.bp-app .bp-featured,
.bp-app .bp-events,
.bp-app .bp-hero-slider,
.bp-app .bp-points-card,
.bp-app .bp-contacts             { background-color: var(--bp-card-bg, var(--bp-surface)); }

.bp-app .bp-offer-row,
.bp-app .bp-featured-card,
.bp-app .bp-event-row            { background-color: var(--bp-card-bg, var(--bp-surface-2)); }

/* Bordo card */
.bp-app .bp-quiz-card,
.bp-app .bp-rewards-card,
.bp-app .bp-offers,
.bp-app .bp-featured,
.bp-app .bp-events,
.bp-app .bp-hero-slider,
.bp-app .bp-points-card,
.bp-app .bp-contacts,
.bp-app .bp-offer-row,
.bp-app .bp-featured-card,
.bp-app .bp-event-row            { border-color: var(--bp-card-border, var(--bp-border)); }

/* Pulsanti CTA primari (override gradiente con tinta unita custom + testo) */
.bp-app.bp-has-btn-bg .bp-btn-primary {
    background: var(--bp-btn-bg, var(--bp-accent));
    color: var(--bp-btn-text, #fff);
}
.bp-app .bp-btn-primary { color: var(--bp-btn-text, #fff); }
.bp-app .bp-quiz-card .bp-quiz-toggle { color: var(--bp-btn-text, #fff); }

/* ==================================================
   v1.2.1 — Polish finale: gerarchia font, spacing,
   contrasto, override colori hardcoded.
   ================================================== */

/* Gerarchia tipografica */
.bp-app, .bp-auth-wrap { font-family: 'Inter', 'Poppins', system-ui, sans-serif; font-weight: 400; }
.bp-app .bp-hello,
.bp-app .bp-hero-title,
.bp-app .bp-section-head h3,
.bp-app .bp-quiz-head h3,
.bp-app .bp-pm-title,
.bp-app .bp-offer-title,
.bp-app .bp-featured-title,
.bp-app .bp-event-title,
.bp-app .bp-om-title {
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.bp-app .bp-hello { font-weight: 800; font-size: 28px; line-height: 1.1; }
@media (min-width: 700px) { .bp-app .bp-hello { font-size: 32px; } }
.bp-app .bp-sub,
.bp-app .bp-quiz-intro,
.bp-app .bp-points-hint {
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-weight: 500;
    line-height: 1.5;
}
.bp-app .bp-section-head h3,
.bp-app .bp-quiz-head h3 { font-size: 18px; }
@media (min-width: 700px) { .bp-app .bp-section-head h3, .bp-app .bp-quiz-head h3 { font-size: 20px; } }

/* Override colori hardcoded che impedivano la personalizzazione --- */
.bp-app .bp-hero-sub          { color: var(--bp-text-sub, #f3eaff); }
.bp-app .bp-quiz-result-row strong { color: var(--bp-text-section, #fff); }
.bp-app .bp-quiz-result-prize { color: var(--bp-text-section, #c9f4d8); }
.bp-app .bp-points-value      { color: var(--bp-text-section, #fff); }
.bp-app .bp-points-label      { color: var(--bp-text-sub, var(--bp-muted)); }
.bp-app .bp-quiz-step-label   { color: var(--bp-text-sub, var(--bp-muted)); }
.bp-app .bp-quiz-step-label strong { color: var(--bp-text-price, var(--bp-accent)); }
.bp-app .bp-link              { color: var(--bp-text-price, var(--bp-accent)); }

/* Pulsanti CTA: gradiente di default, tinta unita se Titolare ha
   impostato btn_bg. Usa SEMPRE var(--bp-btn-text) per il testo. */
.bp-app .bp-btn-primary {
    background: linear-gradient(135deg, var(--bp-accent), #ff5fa6);
    color: var(--bp-btn-text, #fff);
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-weight: 700;
}
.bp-app.bp-has-btn-bg .bp-btn-primary,
.bp-app.bp-has-btn-bg .bp-quiz-card .bp-quiz-toggle {
    background: var(--bp-btn-bg, var(--bp-accent));
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}
.bp-app.bp-has-btn-bg .bp-btn-primary:hover,
.bp-app.bp-has-btn-bg .bp-quiz-card .bp-quiz-toggle:hover {
    filter: brightness(1.08);
    box-shadow: 0 12px 26px rgba(0,0,0,0.22);
}
.bp-app .bp-btn-ghost { font-family: 'Poppins', 'Inter', system-ui, sans-serif; font-weight: 600; }

/* Spacing più arioso (mobile + desktop) */
.bp-app .bp-main { gap: 22px; }
@media (min-width: 700px) { .bp-app .bp-main { gap: 28px; } }
.bp-app .bp-quiz-card,
.bp-app .bp-offers,
.bp-app .bp-featured,
.bp-app .bp-events,
.bp-app .bp-rewards-card,
.bp-app .bp-points-card,
.bp-app .bp-contacts { padding: 22px; border-radius: var(--bp-radius-lg); }
@media (min-width: 700px) {
    .bp-app .bp-quiz-card,
    .bp-app .bp-offers,
    .bp-app .bp-featured,
    .bp-app .bp-events,
    .bp-app .bp-rewards-card,
    .bp-app .bp-points-card,
    .bp-app .bp-contacts { padding: 26px; }
}
.bp-app .bp-section-head { margin-bottom: 14px; }
.bp-app .bp-offer-list { gap: 12px; }
.bp-app .bp-offer-row { padding: 12px; gap: 14px; }
@media (min-width: 900px) { .bp-app .bp-offer-row { padding: 14px; } }
.bp-app .bp-event-row { padding: 14px; }
.bp-app .bp-featured-body { padding: 12px 14px 16px; gap: 6px; }

/* Contrasto pulsanti: bordo sottile per separare da sfondi chiari */
.bp-app .bp-btn-primary { border: 1px solid rgba(0,0,0,0.06); }
.bp-app .bp-btn-ghost {
    background: var(--bp-card-bg, rgba(255,255,255,0.04));
    border-color: var(--bp-card-border, var(--bp-border));
    color: var(--bp-text-section, var(--bp-text));
}

/* Fallback intelligente leggibilità: se sfondo chiaro non c'è
   override del Titolare, usa testo scuro come safety net */
@media (prefers-color-scheme: light) {
    .bp-app:not([style*="--bp-text-h1"]) .bp-hello { color: #14121f; }
    .bp-app:not([style*="--bp-text-sub"]) .bp-sub { color: #4a4866; }
}

/* ==================================================
   v1.2.2 — Header pulito + logo centrato + freccia leggibile
   ================================================== */

/* Layout header a 3 colonne: prima colonna vuota | brand centrato | actions */
.bp-app .bp-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}
.bp-app .bp-header > .bp-brand        { grid-column: 2; justify-self: center; gap: 0; }
.bp-app .bp-header > .bp-header-right { grid-column: 3; justify-self: end; }

/* Logo più grande + centrato */
.bp-app .bp-brand-logo {
    width: 72px; height: 72px; border-radius: 14px; object-fit: cover;
    box-shadow: 0 0 0 1px var(--bp-card-border, var(--bp-border)), 0 8px 18px rgba(0,0,0,.25);
    display: block;
}
@media (min-width: 700px) {
    .bp-app .bp-brand-logo { width: 88px; height: 88px; border-radius: 16px; }
}

/* Freccia card "Ultime"/offerte — sempre leggibile su chiaro/scuro */
.bp-app .bp-offer-go,
.bp-app a.bp-offer-go,
.bp-app .bp-offer-card .bp-offer-go {
    background: var(--bp-btn-bg, var(--bp-accent));
    color: var(--bp-btn-text, #fff);
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.bp-app .bp-offer-card:hover .bp-offer-go {
    filter: brightness(1.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
