@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&display=swap');

/* Fallback colori "inchiostro" (testo scuro su sfondi chiari).
   Non era definito: sui temi scuri il testo degli input ereditava il bianco
   finendo bianco-su-bianco. I temi possono comunque sovrascriverlo. */
:root {
    --ink-2: #1a1a1a;
}

/* ============================
   BASE
   ============================ */

body {
    font-family: var(--font-main, 'Montserrat', sans-serif);
    background: var(--body-bg, radial-gradient(circle at top center, #0f0f0f, var(--black)));
    color: var(--body-text, #fdfdfd);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.logo-container {
    text-align: center;
    margin: 30px 0 10px;
}

.logo {
    width: var(--logo-width, 120px);
    height: var(--logo-height, 120px);
    background-image: var(--logo-image, url('images/logo.png'));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    filter: drop-shadow(0 0 6px var(--logo-shadow-color, gold));
}

.container {
    background: var(--container-bg, linear-gradient(135deg, #f1c40f, #b8860b));
    border-radius: var(--container-radius, 18px);
    padding: 30px 25px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--container-shadow-1, 0 0 20px rgba(255, 215, 0, 0.25)),
        var(--container-shadow-2, 0 8px 20px rgba(0, 0, 0, 0.6));
    position: relative;
    animation: slideIn 0.7s ease-out;
}

.container::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: calc(var(--container-radius, 18px) + 2px);
    background: var(--container-border-glass,
            linear-gradient(45deg, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.2)));
    pointer-events: none;
    z-index: 0;
}

.container>* {
    position: relative;
    z-index: 1;
}

/* ============================
   SALDO / TESTI GENERICI
   ============================ */

.saldo-box {
    background: var(--saldo-box-bg, rgba(255, 255, 255, 0.15));
    padding: 15px 25px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 0 10px var(--saldo-box-shadow, rgba(255, 215, 0, 0.3));
    display: inline-block;
    text-align: center;
    animation: pulseGlow 2s infinite ease-in-out;
}

.saldo-importo {
    font-size: 2.5em;
    font-weight: 800;
    background: var(--saldo-gradient-main, linear-gradient(to right, var(--white), #fffbd1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.4em;
    color: var(--text-dark-1, #2d2d2d);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

h1#credito {
    font-size: 3.4em;
    font-weight: 700;
    margin: 0.3em 0;
    background: var(--saldo-gradient-main, linear-gradient(to right, var(--white), #fffbd1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h3 {
    font-size: 1.1em;
    margin-top: 10px;
    color: var(--text-dark-2, #2c2c2c);
}

ul {
    text-align: left;
    margin-top: 15px;
    list-style: none;
    padding-left: 0;
}

ul li {
    padding: 10px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-weight: 500;
    color: var(--ink, var(--ink));
}

/* ============================
   FOOTER / PRIVACY
   ============================ */

footer {
    margin-top: auto;
    /* spazio sotto sopra la lineetta home di iPhone */
    padding: 15px 20px max(20px, calc(env(safe-area-inset-bottom) + 14px));
    background: var(--footer-bg, rgba(255, 255, 255, 0.05));
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.95em;
    color: var(--text-inverse, var(--white));
}

footer a,
footer button {
    color: var(--link-color, #FFD700);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s ease;
}

footer a:hover,
footer button:hover {
    color: var(--link-hover-color, #ffffff);
    text-decoration: underline;
}

/* nelle pagine staff il footer ha un solo <button> (Esci/Remove access):
   lo rendiamo un bottone vero, grande e ben tappabile */
footer button {
    background: var(--gold-main, #c25a26);
    color: #fff;
    padding: 15px 26px;
    border-radius: 12px;
    font-size: 1.05rem;
    min-height: 50px;
    min-width: 200px;
}

footer button:hover {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.06);
}

.privacy-text {
    margin-top: 20px;
    font-size: 0.85em;
    color: var(--text-muted, #aaa);
    text-align: center;
}

.privacy-text a {
    color: var(--link-color, #FFD700);
    font-weight: bold;
    cursor: pointer;
}

/* ============================
   POPUP
   ============================ */

.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.55);
}

.popup-overlay>div {
    background-color: var(--popup-bg, var(--ink-2));
    color: var(--text-inverse, var(--white));
    padding: 25px;
    border-radius: 15px;
    max-width: 700px;
    margin: auto;
    box-shadow: 0 0 20px var(--popup-border-shadow, rgba(255, 215, 0, 0.4));
    position: relative;
}

body.popup-open {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    overflow: hidden;
}

.popup-box {
    background: var(--popup-card-bg, linear-gradient(145deg, #1c1c1c, #2a2a2a));
    color: var(--text-inverse, #f9f9f9);
    padding: 22px;
    border-radius: 20px;
    max-height: 74vh;
    max-width: 560px;
    overflow-y: auto;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3), 0 0 5px rgba(0, 0, 0, 0.7);
    /* niente backdrop-filter qui (18 ott 2026): su iPhone (Instagram, app) un riquadro
       che scorre con la sfocatura sfoca a pezzi il suo stesso testo, vedi il
       regolamento dalla registrazione. Lo sfondo e' gia' pieno: non cambia nulla. */
    scrollbar-width: thin;
    scrollbar-color: var(--popup-scrollbar-thumb, #FFD700) #1c1c1c;
}

.popup-box,
#popupOffertaAttiva .popup-box--offer {
    box-sizing: border-box;
    margin: 0;
}

.popup-box h2,
.popup-box h3 {
    color: var(--gold-main, #FFD700);
}

.popup-box ul li {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    color: var(--text-inverse, var(--white));
}

.popup-box::-webkit-scrollbar {
    width: 8px;
}

.popup-box::-webkit-scrollbar-thumb {
    background-color: var(--popup-scrollbar-thumb, #FFD700);
    border-radius: 5px;
}

.popup-box::-webkit-scrollbar-track {
    background-color: transparent;
}

/* ============================
   FORM GENERICO
   ============================ */

form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

label {
    font-size: 1.1em;
    color: var(--label-color, rgba(255, 255, 255, .88));
}

button[type="submit"] {
    background-color: var(--btn-primary-bg, #8B6508);
    color: var(--btn-primary-text, #ffffff);
    font-size: 1.2em;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
}

button[type="submit"]:hover,
footer button:hover {
    background-color: var(--btn-primary-bg-hover, #B8860B);
    color: var(--btn-primary-text, #ffffff);
}

/* ============================
   BONUS / VIP
   ============================ */

.highlight-bonus {
    font-weight: 800;
    font-size: 1.4em;
    color: transparent;
    background: var(--bonus-highlight-gradient,
            linear-gradient(90deg, #ffec8b, #FFD700, #ffec8b));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    animation: shine 3s linear infinite;
}

.bonus-wrapper {
    border-radius: 14px;
    padding: 8px 12px;
    /* quasi altezza testo */
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 6px 0 10px;
    max-width: none;
    /* meno impatto */
    box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
    font-weight: 600;
    background: var(--panel-dark, rgba(0, 0, 0, .38));
    border: 1px solid var(--gold-border-soft, rgba(255, 215, 0, .22));
    color: var(--text-inverse, var(--white));
    /* testo bianco */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bonus-wrapper::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -60%;
    width: 55%;
    height: 140%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, .28),
            transparent);
    transform: skewX(-20deg);
    animation: light-glide 5.5s ease-in-out infinite;
    opacity: .55;
    pointer-events: none;
}

.bonus-wrapper h3 {
    margin: 0;
    color: var(--bonus-wrapper-title, var(--white));
    line-height: 1.15;
}

.bonus-wrapper p {
    margin: 6px 0 0;
    color: var(--bonus-wrapper-text, rgba(255, 255, 255, .85));
    line-height: 1.25;
    font-weight: 400;
}

.bonus-wrapper a {
    color: var(--bonus-wrapper-link, var(--white));
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

.vip-success-message {
    background: linear-gradient(90deg, #1db954, #1ed760);
    color: var(--white);
    font-size: 1.3em;
    font-weight: 700;
    padding: 18px 25px;
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(30, 215, 96, 0.5), 0 0 8px rgba(0, 0, 0, 0.5);
    animation: dropIn 0.5s ease-out, glowVIP 3s infinite ease-in-out;
    margin: 25px auto 10px;
    text-align: center;
    max-width: 90%;
    border: 2px solid var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.vip-error-message {
    background: linear-gradient(90deg, #ff4e50, #f44336);
    color: var(--white);
    font-size: 1.2em;
    font-weight: 700;
    padding: 18px 25px;
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5), 0 0 8px rgba(0, 0, 0, 0.5);
    animation: shakeIt 0.4s ease-in-out, glowFail 2s infinite ease-in-out;
    margin: 25px auto 10px;
    text-align: center;
    max-width: 90%;
    border: 2px solid var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ============================
   PR BOX
   ============================ */

.saldo-pr-text {
    font-size: 1em;
    font-weight: 600;
    color: var(--gold-soft, #fff8b0);
    margin-top: 8px;
    margin-bottom: 8px;
}

.pr-box {
    background: var(--pr-bg-soft, rgba(255, 215, 0, 0.1));
    border: 2px solid var(--pr-border, #FFD700);
    padding: 20px;
    margin-top: 15px;
    border-radius: 15px;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.2);
    text-align: center;
}

.pr-box label {
    font-size: 1.1em;
    color: var(--pr-text, #FFD700);
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.pr-box input[type="number"] {
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-2);
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 1.4em;
    font-weight: bold;
    width: 100%;
    max-width: 180px;
    text-align: center;
    box-shadow: inset 0 0 8px rgba(255, 215, 0, 0.4);
}

/* ============================
   STATS / INPUT DATE
   ============================ */

.stats-container {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    margin-top: 20px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    text-align: center;
}

.stats-container p {
    font-size: 1.1em;
    color: var(--ink-2);
    margin: 10px 0;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 15px;
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(255, 215, 0, 0.3);
}

input[type="date"] {
    padding: 10px 15px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-2);
    box-shadow: inset 0 0 5px rgba(255, 215, 0, 0.3);
    cursor: pointer;
}

/* ============================
   USER INFO BLOCK
   ============================ */

.user-info {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    text-align: left;
    font-size: 1em;
}

.user-info p {
    margin: 8px 0;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(255, 215, 0, 0.2);
}

.user-info strong {
    color: #b8860b;
}

/* ============================
   DATA SELECTOR
   ============================ */

.data-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.data-selector button {
    background: var(--gold-main, gold);
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--black);
    transition: background 0.3s ease;
}

.data-selector button:hover {
    background: var(--accent-hover, darkorange);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================
   SALDO / BONUS COMPATTO
   ============================ */

.saldo-con-bonus {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 8px;
}

.main-saldo-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.main-saldo {
    font-size: 3.4em;
    font-weight: 700;
    background: var(--saldo-gradient-main, linear-gradient(to right, var(--white), #fffbd1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.bonus-piccolo {
    font-size: 2.4em;
    font-weight: 800;
    margin-left: 4px;
    position: relative;
    top: -2px;
    line-height: 1;
}

/* ============================
   PR BUTTON / BIG INPUT
   ============================ */

.pr-button {
    background-color: var(--btn-primary-bg, #b8860b);
    color: var(--btn-primary-text, var(--white));
    border: none;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.pr-button:hover {
    background-color: var(--btn-primary-bg-hover, #d4a017);
}

.big-input {
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-2);
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 1.6em;
    font-weight: bold;
    width: 100%;
    max-width: 220px;
    text-align: center;
    box-shadow: inset 0 0 8px rgba(255, 215, 0, 0.4);
}

/* ============================
   SWITCH TAVOLO
   ============================ */

.tavolo-box {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.tavolo-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--white);
    gap: 10px;
}

.tavolo-switch input {
    display: none;
}

.slider {
    position: relative;
    width: 50px;
    height: 28px;
    background-color: var(--switch-track-off, #ccc);
    border-radius: 34px;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

.slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: var(--switch-knob, var(--white));
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tavolo-switch input:checked+.slider {
    background-color: var(--gold-main, #ffd700);
    box-shadow: 0 0 10px var(--gold-main, #ffd700),
        0 0 20px rgba(255, 215, 0, 0.5);
}

.tavolo-switch input:checked+.slider::before {
    transform: translateX(22px);
}

.label-text {
    color: var(--text-on-light, var(--ink));
    background: var(--gold-soft-bg, #fffbb0);
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* ============================
   NUMERO TAVOLO
   ============================ */

#numeroTavoloWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}

#numeroTavoloWrapper label {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
    max-width: 300px;
}

#numeroTavoloWrapper input[type="number"] {
    width: 100%;
    max-width: 200px;
    padding: 14px 20px;
    font-size: 1.6em;
    font-weight: bold;
    text-align: center;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink-3);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
}

/* ============================
   SPINNER
   ============================ */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid transparent;
    border-top-color: var(--spinner-main, var(--accent, #007bff));
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* ============================
   STATO WRAPPER
   ============================ */

.stato-wrapper {
    max-width: 100%;
    width: 100%;
    margin: 25px auto 0;
    padding: 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid var(--gold-main, #FFD700);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    color: var(--white);
    text-align: left;
    font-size: 16px;
    line-height: 1.6;
    animation: fadeIn 0.6s ease-in-out;
    display: none;
    box-sizing: border-box;
}

.stato-wrapper h3 {
    color: var(--white);
    font-size: 1.2em;
    margin-top: 12px;
}

.stato-wrapper p {
    margin: 0 0 10px;
    font-weight: 600;
}

.stato-wrapper strong {
    color: var(--gold-main, #FFD700);
}

.stato-intestazione {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    flex-wrap: wrap;
}

.label-gialla {
    color: var(--gold-main, #FFD700);
    font-weight: bold;
}

/* ============================
   BUTTONS BONUS / CANCEL
   ============================ */

.btn-bonus-confirm {
    background-color: var(--btn-success-bg, #22b573);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    padding: 10px 28px;
    cursor: pointer;
    transition: background 0.18s;
    box-shadow: 1px 2px 7px rgba(0, 0, 0, 0.07);
}

.btn-bonus-confirm:hover {
    background-color: var(--btn-success-bg-hover, #17995a);
}

.btn-bonus-cancel {
    background: var(--white);
    color: var(--btn-danger-bg, #f44336);
    border: 2px solid var(--btn-danger-border, #f44336);
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    padding: 10px 28px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.btn-bonus-cancel:hover {
    background: var(--btn-danger-bg, #f44336);
    color: var(--white);
}

.btn-bonus-main {
    display: block;
    margin: 40px auto 0 auto;
}

/* ============================
   VARI STILI
   ============================ */

.operatore-nome {
    color: var(--black);
    font-weight: 500;
}

.ordine-stato {
    font-size: 1em;
    color: #b8860b;
    margin-bottom: 6px;
}

/* ============================
   BOTTONI AZIONE (.btn-dj, nome storico)
   ============================ */

.btn-refill {
    display: block;
    width: 100%;
    background-color: var(--btn-refill-bg, var(--accent, #007BFF));
    color: var(--white);
    font-size: 1.4em;
    font-weight: bold;
    padding: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s ease, transform 0.15s ease;
    margin-bottom: 20px;
}

.btn-refill:hover {
    background-color: var(--btn-refill-bg-hover, var(--accent-dark, #0056b3));
    transform: translateY(-2px);
}

.btn-dj {
    display: block;
    width: 100%;
    color: var(--btn-dj-text, var(--white));
    font-size: 1.3em;
    font-weight: 700;
    padding: 18px 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, filter 0.2s ease;
    margin: 4px 0 8px;
}

/* variante neutra: usala SOLO dove serve (eventi, ecc.) */
.btn-dj-neutral {
    background: var(--white);
    color: var(--ink);
    border: 1px solid rgba(0, 0, 0, .18);
}

/* 🟣 ORDINA BOTTIGLIA */
.btn-dj-bottiglia {
    background: var(--btn-bottiglia-bg);
}

/* 🔵 NOI REFILL */
.btn-dj-refill {
    background: var(--btn-refill-grad-bg);
}

/* 🟢 SALTACODA */
.btn-dj-saltacoda {
    background: var(--btn-saltacoda-bg);
}

/* 💳 RICARICA CONTO — CTA primaria (colore brand del tema) */
.btn-dj-ricarica {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--btn-primary-bg, var(--gold-main, #c25a26));
    color: var(--btn-primary-text, #fff);
}

.btn-dj-ricarica svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.btn-dj:hover {
    transform: scale(1.04);
    filter: brightness(1.1);
}

/* ============================
   TIMER
   ============================ */

.timer-big {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 360px;
    width: 100%;
    margin: 16px auto;
    padding: 18px 0;
    font-size: 2.6em;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--timer-text, var(--white));
    background: var(--timer-bg, linear-gradient(135deg, var(--accent, #007BFF), var(--accent-dark, #0056b3)));
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    user-select: none;
}

/* ============================
   POPUP SPECIFICI (Analcolici / Riepilogo)
   ============================ */

#popupAnalcolici .popup-box label,
#popupRiepilogo .popup-box label {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 10px 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#popupRiepilogo input[type="radio"] {
    accent-color: var(--gold-main, #FFD700);
}

/* ============================
   RETURN CART BUTTON
   ============================ */

.return-cart-btn {
    appearance: none;
    border: 1px solid var(--return-cart-border, rgba(180, 140, 20, 0.45));
    background: var(--return-cart-bg, linear-gradient(135deg, #f6f1e6 0%, #ece6d8 100%));
    color: var(--return-cart-text, #1b1b1f);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    min-height: 52px;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: .2px;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.18),
        inset 0 0 0 999px rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: transform .08s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
    width: 100%;
    max-width: 360px;
}

.return-cart-btn:hover {
    background: var(--return-cart-bg-hover, linear-gradient(135deg, #fff9eb 0%, #f2ebdc 100%));
    border-color: rgba(200, 160, 40, 0.55);
    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 215, 0, 0.15) inset;
    transform: translateY(-1px);
}

.return-cart-btn:active {
    transform: translateY(1px) scale(.99);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(200, 160, 40, 0.25) inset;
}

.return-cart-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255, 215, 0, 0.45),
        0 8px 22px rgba(0, 0, 0, 0.25);
}

@media (max-width: 420px) {
    .return-cart-btn {
        font-size: 1.06rem;
        padding: 16px 22px;
        min-height: 56px;
    }
}

/* ============================
   WIZARD / BOTTIGLIE / MIXER
   ============================ */

.wiz-steps {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 8px 0 6px
}

.wiz-step {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--ink), #2a2a2a);
    color: var(--white);
    font-weight: 800;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    transition: transform .08s ease, box-shadow .2s ease, opacity .2s ease
}

.wiz-step span:first-child {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold-main, #ffd700);
    color: var(--ink);
    font-size: .9em
}

.wiz-step.is-active {
    outline: 2px solid var(--gold-main, #ffd700);
    box-shadow: 0 6px 18px rgba(255, 215, 0, .25)
}

.wiz-step.is-locked {
    opacity: .35;
    pointer-events: none;
    filter: grayscale(30%)
}

.wiz-step.shake {
    animation: shakeX .45s
}

.wiz-pane {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    padding: 14px
}

.wiz-title {
    margin: .2rem 0 .6rem;
    color: var(--white)
}

.tipo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center
}

.tipo-chip {
    appearance: none;
    border: 0;
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a1a, #2b2b2b);
    color: var(--white);
    font-weight: 800;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .06);
    transition: transform .08s ease, filter .2s ease
}

.tipo-chip .tipo-ic {
    font-size: 1.2em
}

.tipo-chip.active {
    outline: 2px solid var(--gold-main, #ffd700);
    box-shadow: 0 8px 24px rgba(255, 215, 0, .20), inset 0 0 0 1px rgba(255, 215, 0, .45)
}

.tipo-chip:hover {
    filter: brightness(1.05)
}

.bottle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px
}

@media (min-width:480px) {
    .bottle-grid {
        grid-template-columns: 1fr;
    }
}

.bottle-card {
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(145deg, #1c1c1c, #2a2a2a);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .15);
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    transition: transform .08s ease, box-shadow .2s ease
}

.bottle-card:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, .32)
}

.bottle-card.selected {
    outline: 2px solid var(--gold-main, #ffd700);
    box-shadow: 0 10px 26px rgba(255, 215, 0, .18)
}

.bottle-name {
    font-weight: 800
}

.bottle-price {
    opacity: .9;
    font-size: .95em
}

.mixer-mini {
    opacity: .7;
    font-size: .85em;
    margin-top: 2px
}

.mix-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 10px 0 6px;
}

.mix-chip {
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;
    border-radius: 999px;
    border: 2px solid var(--chip-border, #e0e0e0);
    background: var(--chip-bg, var(--white));
    color: var(--chip-text, var(--ink-2));
    font-weight: 800;
    transition: transform .08s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.mix-chip:hover {
    transform: translateY(-1px);
}

.mix-chip[data-active="true"] {
    background: var(--btn-success-bg, #22b573);
    border-color: var(--btn-success-bg, #22b573);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(34, 181, 115, .35);
}

.mix-chip[data-active="true"]::after {
    content: "✓";
    margin-left: 8px;
    font-weight: 900;
}

.combo-hint {
    text-align: center;
    font-weight: 800;
    color: var(--white);
    background: rgba(255, 215, 0, .12);
    border: 1px solid rgba(255, 215, 0, .4);
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.no-mix {
    text-align: center;
    opacity: .85;
}

.actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 8px;
}

/* ============================
   DANGER BUTTON
   ============================ */

.btn-danger {
    background: var(--btn-danger-bg, #f44336) !important;
    color: var(--white) !important;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 800;
    box-shadow: 0 2px 10px rgba(229, 57, 53, .35);
    transition: transform .08s ease, filter .15s ease;
}

.btn-danger:hover {
    filter: brightness(1.05);
}

.btn-danger:active {
    transform: translateY(1px);
}

/* ============================
   BADGE / BATCH
   ============================ */

.batch-badge {
    display: inline-block;
    margin: 2px 0 10px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    background: rgba(255, 215, 0, .14);
    border: 1px solid rgba(255, 215, 0, .35);
    color: rgba(255, 255, 255, .92);
}

.batch-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, .45);
    color: rgba(255, 255, 255, .92);
}

.batch-item {
    position: relative;
    padding: 16px 12px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    min-height: 56px;
}

.time-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
    background: var(--time-badge-bg, #111827);
    color: var(--time-badge-text, #f9fafb);
    border: 1px solid var(--time-badge-border, rgba(255, 255, 255, .12));
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    user-select: none;
    white-space: nowrap;
}

@media (max-width: 380px) {
    .time-badge {
        font-size: 11px;
        padding: 2px 6px;
    }
}

.batch-item:last-child {
    border-bottom: 0;
}

.batch-row {
    margin: 3px 0;
}

.batch-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.batch-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* ============================
   BTN PROGRESS
   ============================ */

.btn-progress {
    background: var(--btn-progress-bg, #f1c40f);
    color: var(--btn-progress-text, var(--ink));
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1.5px 6px rgba(0, 0, 0, .09);
    transition: background .2s ease;
}

.btn-progress:hover {
    background: var(--btn-progress-hover, #ffd700);
    color: var(--btn-progress-text, var(--black));
}

/* ============================
   ORDINE BOX / DELIVERY
   ============================ */

.ordine-box {
    position: relative;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 215, 0, 0.25);
    padding: 14px 14px 12px;
    margin: 14px 0;
    overflow: hidden;
}

.delivery-standard {
    border-color: rgba(255, 215, 0, .35);
    box-shadow: 0 2px 10px rgba(255, 215, 0, .12) inset;
}

.delivery-standard .delivery-ribbon .badge-truck {
    background: linear-gradient(135deg, var(--ink), #2c2c2c);
    color: var(--white);
}

.delivery-express {
    border-color: var(--delivery-express-accent);
    box-shadow:
        0 0 22px rgba(255, 61, 113, .35),
        inset 0 0 18px rgba(255, 61, 113, .18);
}

.delivery-express .delivery-ribbon .badge-rocket {
    background: linear-gradient(135deg, #ff3d71, #ff8a3d);
    color: var(--white);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 0 12px rgba(255, 255, 255, .5);
    border-color: rgba(255, 255, 255, .35);
}

.delivery-express::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(-45deg,
            rgba(255, 61, 113, .10) 0 14px,
            rgba(255, 255, 255, .05) 14px 28px);
    animation: expressSpeed 1.25s linear infinite;
    z-index: 0;
}

.delivery-express::after {
    content: "";
    position: absolute;
    left: -120px;
    top: 22px;
    width: 220px;
    height: 3px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, .85),
            rgba(255, 61, 113, 0));
    filter: blur(.6px);
    animation: expressStreak 1.25s linear infinite;
    z-index: 1;
}

.ordine-box>* {
    position: relative;
    z-index: 3;
}

.delivery-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: .9rem;
    letter-spacing: .5px;
    padding: 6px 10px;
    border-radius: 999px;
    user-select: none;
}

.delivery-standard {
    color: var(--delivery-standard-text);
    background: var(--delivery-standard-bg);
    border: 1px solid var(--delivery-standard-border);
    box-shadow: var(--delivery-standard-inset);
}

.delivery-express {
    color: var(--delivery-express-text);
    background: var(--delivery-express-bg);
    border: 1px solid var(--delivery-express-border);
    box-shadow: var(--delivery-express-glow);
    animation: expressPulse 1.2s infinite ease-in-out;
}

.ordine-stato {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.stato-txt {
    font-size: 1em;
    color: #b8860b;
    flex-basis: 100%;
    margin-top: 2px;
}

/* ============================
   EXTRAS GRID
   ============================ */

.extra-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.extra-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.extra-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.extra-name {
    font-weight: 700;
    letter-spacing: .2px;
}

.extra-ctrl {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    padding: 6px;
}

.extra-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 999px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    background: rgba(255, 255, 255, .14);
    transition: transform .08s ease, background .12s ease;
}

.extra-btn:hover {
    background: rgba(255, 255, 255, .2);
}

.extra-btn:active {
    transform: scale(.96);
}

.extra-qty {
    min-width: 44px;
    text-align: center;
    border: none;
    background: transparent;
    color: inherit;
    font-weight: 700;
    font-size: 16px;
    pointer-events: none;
}

.extra-price {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .12);
    font-weight: 600;
}

.extra-qty.changed {
    animation: qtyPop .12s ease;
}

/* ============================
   ANIMAZIONI
   ============================ */

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(25px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

@keyframes pulseGlow {
    0% {
        text-shadow: 0 0 5px var(--gold-main, #FFD700);
    }

    50% {
        text-shadow: 0 0 15px var(--white);
    }

    100% {
        text-shadow: 0 0 5px var(--gold-main, #FFD700);
    }
}

@keyframes light-glide {
    0% {
        left: -75%;
    }

    100% {
        left: 125%;
    }
}

@keyframes dropIn {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes glowVIP {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(30, 215, 96, 0.4), 0 0 6px rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 12px rgba(30, 215, 96, 0.8);
    }
}

@keyframes shakeIt {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes glowFail {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cartPulse {
    0% {
        transform: scale(1)
    }

    40% {
        transform: scale(1.06)
    }

    100% {
        transform: scale(1)
    }
}

@keyframes expressSpeed {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 56px 0;
    }
}

@keyframes expressStreak {
    0% {
        transform: translateX(0);
        opacity: .85;
    }

    60% {
        opacity: 1;
    }

    100% {
        transform: translateX(360px);
        opacity: 0;
    }
}

@keyframes expressPulse {

    0%,
    100% {
        transform: translateZ(0);
        box-shadow: 0 0 10px rgba(240, 152, 25, .45)
    }

    50% {
        transform: translateZ(0) scale(1.02);
        box-shadow: 0 0 18px rgba(240, 152, 25, .65)
    }
}

@keyframes qtyPop {
    0% {
        transform: scale(.9)
    }

    100% {
        transform: scale(1)
    }
}

/* ============================
   INGRESSIERE (SALTACODA)
   ============================ */

.status-box {
    border-radius: 16px;
    padding: 20px;
    margin: 18px 0;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.10);
    font-weight: 600;
    text-align: center;
}

.status-bad {
    background: var(--status-bad-bg, #ffe8e6);
    color: var(--status-bad-text, #b3261e);
}

.status-warn {
    background: var(--status-warn-bg, #fff3cd);
    color: var(--status-warn-text, #7a5d00);
}

.status-ok {
    background: var(--status-ok-bg, #e6ffed);
    color: var(--status-ok-text, #1e7b34);
}

.big-action {
    display: inline-block;
    margin-top: 14px;
    font-size: 1.2em;
    padding: 14px 22px;
    border: none;
    border-radius: 12px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.big-action.validate {
    background: #1f883d;
    color: var(--white);
}

.big-action.disabled {
    opacity: .6;
    cursor: not-allowed;
}

.mini-info {
    opacity: .7;
    font-weight: 500;
    margin-top: 8px;
}

.pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .85em;
    font-weight: 700;
    vertical-align: middle;
}

.pill-exists {
    background: #e8f1ff;
    color: #0b57d0;
}

.pill-none {
    background: #ffe8e6;
    color: #b3261e;
}

.pill-validated {
    background: #e6ffed;
    color: #1e7b34;
}

/* ============================
   PAGER
   ============================ */

.pager {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: center;
}

.pager .pager-btn,
.pager .pager-ph {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;

    border: 1px solid var(--pager-border, rgba(255, 255, 255, .22));
    background: rgba(255, 255, 255, .08);

    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    box-sizing: border-box;

    /* ✅ FIX: niente viola da link visitato */
    color: rgba(255, 255, 255, .92);
}

.pager .pager-btn:visited {
    color: rgba(255, 255, 255, .92);
}

.pager .pager-btn:hover {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .35);
}

.pager .pager-ph {
    opacity: 0;
    pointer-events: none;
    border-color: transparent;
    background: transparent;
}

/* ============================
   IMG BTN
   ============================ */

.img-btn {
    font-size: 16px;
    opacity: .9;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 2px 4px;
    line-height: 1;
    border-radius: 6px;
}

.img-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, .08);
}

.img-btn--light {
    color: rgba(255, 255, 255, .75);
    opacity: .9;
    transition: opacity .15s ease, transform .05s ease;
}

.img-btn--light:hover {
    opacity: 1;
    transform: scale(1.04);
}

.img-btn--light svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

/* ============================
   WALLET CARD
   ============================ */

.wallet-card {
    border-radius: 14px;
    background: var(--card-dark-bg, linear-gradient(135deg, #1f1f28 0%, #15151c 100%));
    padding: 16px 18px;
    margin: 10px 0 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    border: 1px solid var(--card-dark-border, rgba(255, 255, 255, .06));
    color: var(--card-dark-text, #eaeaf3);
    font-family: system-ui, sans-serif;
}

.wallet-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.wallet-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    font-size: 18px;
}

.wallet-title {
    font-weight: 700;
    letter-spacing: .2px;
}

.wallet-tag {
    margin-left: auto;
    font-size: 12px;
    color: var(--ui-muted);
    background: rgba(255, 255, 255, .06);
    padding: 4px 8px;
    border-radius: 999px;
}

.wallet-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.wallet-total-amount {
    font-size: 30px;
    font-weight: 800;
    color: var(--wallet-total-text, var(--white));
    line-height: 1;
}

.wallet-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.wallet-badge {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid transparent;
}

.saldo-badge {
    background: var(--wallet-saldo-bg, rgba(76, 175, 80, .12));
    border-color: var(--wallet-saldo-border, rgba(76, 175, 80, .35));
    color: var(--wallet-saldo-text, #b7f5c3);
}

.bonus-badge {
    background: var(--wallet-bonus-bg, rgba(255, 152, 0, .12));
    border-color: var(--wallet-bonus-border, rgba(255, 152, 0, .35));
    color: var(--wallet-bonus-text, #ffd9a6);
}

.pr-badge {
    background: var(--wallet-pr-bg, rgba(33, 150, 243, .12));
    border-color: var(--wallet-pr-border, rgba(33, 150, 243, .35));
    color: var(--wallet-pr-text);
}

.wallet-progress {
    background: rgba(255, 255, 255, .06);
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    display: flex;
}

.wallet-progress-segment {
    height: 100%;
}

.saldo-segment {
    background: var(--wallet-progress-saldo, #4caf50);
}

.bonus-segment {
    background: var(--wallet-progress-bonus, #ff9800);
}

.pr-segment {
    background: var(--wallet-progress-pr, #2196f3);
}

.wallet-labels {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--ui-muted, #9ea3b0);
}

/* ============================
   LOADING OVERLAY
   ============================ */

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 9999;
    color: var(--white);
    font-size: 20px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.is-visible {
    display: flex;
}

.loading-overlay .spinner {
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid var(--white, var(--white));
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* ============================
   ORDINI ANNULLATI
   ============================ */

.ordine-box.is-cancelled {
    border: 2px solid var(--cancel-main, #ff1744) !important;
    background: var(--cancel-bg, rgba(255, 23, 68, 0.1)) !important;
    box-shadow: 0 0 0 3px var(--cancel-ring, rgba(255, 23, 68, 0.25));
    position: relative;
    animation: cancelled-pulse 1.2s ease-in-out 0s 4;
}

.cancel-banner {
    background: var(--cancel-main, #ff1744);
    color: var(--cancel-banner-text, var(--white));
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 8px 10px;
    border-radius: 6px;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes cancelled-pulse {
    0% {
        box-shadow: 0 0 0 3px var(--cancel-ring, rgba(255, 23, 68, 0.25));
    }

    50% {
        box-shadow: 0 0 0 6px color-mix(in srgb, var(--cancel-main, #ff1744) 45%, transparent);
    }

    100% {
        box-shadow: 0 0 0 3px var(--cancel-ring, rgba(255, 23, 68, 0.25));
    }
}

/* ============================
   BOTTLE OFFER HIGHLIGHT
   ============================ */

.bottle-card {
    position: relative;
}

.bottle-card.offer-highlight {
    position: relative;
    border: 2px solid rgba(255, 215, 0, 0.8) !important;
    background: linear-gradient(145deg, rgba(50, 50, 50, 0.95), rgba(25, 25, 25, 0.9)) !important;
    box-shadow:
        0 0 25px rgba(255, 215, 0, 0.4),
        inset 0 0 15px rgba(255, 215, 0, 0.25);
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 0;
}

.bottle-card.offer-highlight::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from 0deg,
            rgba(255, 215, 0, 0.0) 0deg,
            rgba(255, 230, 100, 0.7) 60deg,
            rgba(255, 215, 0, 0.0) 120deg,
            rgba(255, 215, 0, 0.0) 360deg);
    animation: golden-spin 3.5s linear infinite;
    mask: linear-gradient(var(--black) 0 0) content-box, linear-gradient(var(--black) 0 0);
    -webkit-mask: linear-gradient(var(--black) 0 0) content-box, linear-gradient(var(--black) 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 2px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.9;
    filter: blur(0.5px);
}

.bottle-card.offer-highlight::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.25), rgba(0, 0, 0, 0.2));
    box-shadow:
        0 0 40px rgba(255, 215, 0, 0.4) inset,
        0 0 30px rgba(255, 215, 0, 0.25);
    animation: offer-pulse 2.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

@keyframes golden-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes offer-pulse {

    0%,
    100% {
        opacity: .55;
        filter: brightness(1);
    }

    50% {
        opacity: .95;
        filter: brightness(1.12);
    }
}

.bottle-price .old-price {
    text-decoration: line-through;
    opacity: .65;
    margin-right: 6px;
    font-weight: 400;
}

.bottle-price .offer-price {
    font-weight: 800;
}

.ordine-time {
    opacity: .8;
    font-variant-numeric: tabular-nums;
}

/* ============================
   AUTH (LOGIN / REGISTER)
   ============================ */

.auth-container {
    margin-bottom: 30px;
}

.auth-card {
    background: var(--auth-card-bg);
    border-radius: 18px;
    padding: 20px 18px 22px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.45),
        0 0 0 1px var(--auth-card-border);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background:
        radial-gradient(circle at 0 0, rgba(255, 215, 0, 0.25), transparent 55%),
        radial-gradient(circle at 100% 0, rgba(147, 197, 253, 0.22), transparent 60%);
    opacity: 0.9;
    pointer-events: none;
}

.auth-card>* {
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: left;
    margin-bottom: 14px;
}

.auth-eyebrow {
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--auth-eyebrow);
    margin: 0 0 6px;
}

.auth-title {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 800;
    color: var(--white);
}

.auth-subtitle {
    margin: 6px 0 0;
    font-size: .9rem;
    color: var(--auth-subtitle);
}

.auth-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-form .form-row {
    width: 100%;
    text-align: left;
}

.auth-label,
.auth-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 4px;
}

.auth-input,
.auth-form input[type="text"],
.auth-form input[type="tel"],
.auth-form input[type="password"],
.auth-form input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid var(--auth-input-border);
    background: var(--auth-input-bg);
    color: var(--auth-input-text);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease,
        background .18s ease, transform .06s ease;
}

.auth-form input::placeholder {
    color: var(--auth-placeholder);
}

.auth-form input:focus {
    border-color: var(--gold-main, #ffd700);
    box-shadow: var(--auth-focus-ring-1), var(--auth-focus-ring-2);
    background: var(--auth-input-bg-focus);
    transform: translateY(-0.5px);
}

.auth-submit {
    width: 100%;
    border-radius: 12px;
    background: var(--auth-submit-bg);
    color: var(--auth-submit-text);
    border: none;
    font-weight: 800;
    font-size: 1.02rem;
    padding: 12px 16px;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: var(--auth-submit-shadow);
    transition: transform .08s ease, box-shadow .15s ease, filter .15s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: var(--auth-submit-shadow-hover);
}

.auth-submit:active {
    transform: translateY(1px);
    box-shadow: var(--auth-submit-shadow-active);
}

.auth-helper {
    text-align: center;
    font-size: 0.85rem;
    color: var(--auth-helper);
    margin-top: 6px;
}

.auth-helper a {
    color: var(--gold-main, #ffd700);
    font-weight: 600;
    text-decoration: none;
}

.auth-helper a:hover {
    text-decoration: underline;
}

/* Messaggi di errore / successo */

.auth-alert {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: left;
}

.auth-alert ul {
    margin: 0;
    padding-left: 18px;
}

.auth-alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: #fecaca;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.7);
    color: #bbf7d0;
}

/* Bottoni secondari (OTP) */

.auth-ghost-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.auth-ghost-btn {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s ease, border-color .15s ease,
        transform .06s ease;
}

.auth-ghost-btn:hover {
    background: rgba(30, 64, 175, 0.8);
    border-color: rgba(191, 219, 254, 0.9);
    transform: translateY(-0.5px);
}

.otp-status {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Responsive */

@media (max-width: 480px) {
    .auth-card {
        padding: 18px 14px 20px;
    }

    .auth-title {
        font-size: 1.4rem;
    }
}

/* ============================
   LE MIE TESSERE
   ============================ */

.loyalty-page {
    margin-bottom: 30px;
}

.loyalty-header {
    text-align: left;
    margin-bottom: 18px;
}

.loyalty-eyebrow {
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 6px;
}

.loyalty-title {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 800;
    color: var(--card-dark-text, #ffffff);
}

.loyalty-subtitle {
    margin: 6px 0 0;
    font-size: .9rem;
    color: rgba(249, 250, 251, 0.8);
}

.loyalty-user-label {
    font-size: 0.8rem;
    color: rgba(209, 213, 219, 0.9);
    margin-top: 4px;
}

.loyalty-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.loyalty-card {
    position: relative;
    border-radius: 18px;
    padding: 14px 14px 16px;
    background: var(--card-dark-bg,
            radial-gradient(circle at top left,
                rgba(255, 255, 255, 0.1),
                rgba(15, 23, 42, 0.95)));
    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.5),
        0 0 0 1px var(--card-dark-border, rgba(148, 163, 184, 0.35));
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* Tessera COMPLETATA: glow che usa il colore tema (gold-main/teal ecc.) */
.loyalty-card--completed {
    box-shadow:
        0 0 0 2px var(--gold-main, #facc15),
        0 0 30px var(--gold-main, #facc15),
        0 12px 30px rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}

/* Badge "COMPLETA 🎉" accanto al contatore timbri */
.loyalty-card--completed .loyalty-card-progress::after {
    content: " • COMPLETA 🎉";
    color: var(--gold-main, #facc15);
    font-weight: 700;
}

.loyalty-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background:
        radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.26), transparent 60%),
        radial-gradient(circle at 100% 0, rgba(96, 165, 250, 0.18), transparent 65%);
    opacity: 0.7;
    pointer-events: none;
}

.loyalty-card>* {
    position: relative;
    z-index: 1;
}

.loyalty-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 8px;
}

.loyalty-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--card-dark-text, #f9fafb);
    margin: 0;
}

.loyalty-card-progress {
    font-size: 0.85rem;
    color: rgba(229, 231, 235, 0.9);
    white-space: nowrap;
}

.loyalty-card-subtitle {
    font-size: 0.8rem;
    color: rgba(209, 213, 219, 0.9);
    margin: 0 0 10px;
}

.loyalty-stamp-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.loyalty-stamp {
    border-radius: 999px;
    border: 1px dashed var(--card-dark-border, rgba(148, 163, 184, 0.6));
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.9);
    background: rgba(15, 23, 42, 0.9);
}

.loyalty-stamp--filled {
    border-style: solid;
    border-color: var(--gold-main, rgba(250, 204, 21, 0.9));
    background: radial-gradient(circle at 30% 0,
            rgba(250, 250, 250, 0.95),
            var(--gold-main, rgba(250, 204, 21, 0.95)));
    color: #1f2933;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(250, 204, 21, 0.45);
}

.loyalty-stamp--filled span {
    transform: translateY(-0.5px);
}

.loyalty-footer-note {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.95);
    margin-top: 4px;
}

/* =========================
   FIX OVERFLOW STEPPER MERCH
   (stesso selettore degli Analcolici)
   ========================= */

#popupMerch .stepper-list[data-scope="merch"] .extra-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--stepper-row-bg, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--stepper-row-border, rgba(255, 255, 255, 0.10));
    overflow: hidden;
}

#popupMerch .stepper-list[data-scope="merch"] .extra-name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    line-height: 1.15;
}

#popupMerch .stepper-list[data-scope="merch"] .extra-price {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-left: 4px;
}

#popupMerch .stepper-list[data-scope="merch"] .extra-ctrl {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

#popupMerch .stepper-list[data-scope="merch"] .extra-btn {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
}

#popupMerch .stepper-list[data-scope="merch"] .extra-qty {
    width: 24px;
    text-align: center;
    padding: 0;
}

/* =========================
   FIX OVERFLOW STEPPER ANALCOLICI
   (solo popupAnalcolici)
   ========================= */

#popupAnalcolici #extraList .extra-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-right: 14px;
    /* spazio di sicurezza per il + */
}

#popupAnalcolici #extraList .extra-name {
    flex: 1 1 auto;
    min-width: 0;
}

#popupAnalcolici #extraList .extra-price {
    flex: 0 0 auto;
    white-space: nowrap;
}

#popupAnalcolici #extraList .extra-ctrl {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

#popupAnalcolici #extraList .extra-btn {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
}

#popupAnalcolici #extraList .extra-qty {
    width: 24px;
    text-align: center;
    padding: 0;
}

.cashback-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--cashback-badge-bg, rgba(255, 215, 0, .18));
    border: 1px solid var(--cashback-badge-border, rgba(255, 215, 0, .55));
    box-shadow: 0 0 0 2px var(--cashback-badge-ring, rgba(255, 215, 0, .10));
    white-space: nowrap;
}

.auth-note {
    margin-top: 10px;
    font-size: .92rem;
    opacity: .85;
    line-height: 1.35;
}

.auth-note-link {
    font-weight: 800;
    opacity: 1;
    /* bypassa l'opacità del trafiletto */
    color: var(--link-color, var(--accent, #ffffff));
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .10);
}

.auth-note-link:hover {
    background: rgba(255, 255, 255, .16);
}

.segmented {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.segmented-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* base bottoni */
.segmented-btn {
    flex: 1;
    text-align: center;
    padding: 12px 12px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;

    border: 2px solid rgba(255, 255, 255, .20);
    background: rgba(255, 255, 255, .06);

    font-weight: 950;
    letter-spacing: .03em;

    transition: transform .10s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease, filter .15s ease;
}

/* non selezionati: più “spenti” quando uno è scelto */
.segmented:has(.segmented-input:checked) .segmented-btn {
    opacity: .55;
    filter: saturate(.85);
}

/* selezionato: pieno, contrastato, impossibile da ignorare */
.segmented-input:checked+.segmented-btn {
    opacity: 1 !important;
    filter: none;

    background: rgba(255, 255, 255, .32);
    border-color: rgba(255, 255, 255, .85);

    box-shadow:
        0 0 0 4px rgba(255, 255, 255, .22),
        0 10px 24px rgba(0, 0, 0, .25);

    transform: translateY(-2px) scale(1.01);
}

/* check grosso e chiaro */
.segmented-input:checked+.segmented-btn::after {
    content: "  ✅";
    font-size: 1.05em;
}

/* hover */
.segmented-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .35);
}

/* focus tastiera */
.segmented-input:focus+.segmented-btn {
    outline: 3px solid rgba(255, 255, 255, .70);
    outline-offset: 3px;
}

/* Disponibilita' e livello (attributi utente, 24 set 2026): tre scelte per
   riga anche sul telefono; il pulsante scelto si vede dal colore, senza la ✅
   che le mandava a capo */
.segmented.pf-scelte {
    gap: 8px;
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

.segmented.pf-scelte .segmented-btn {
    min-width: 0;
    padding: 10px 4px;
    font-size: .86rem;
    letter-spacing: 0;
    line-height: 1.2;
}

.segmented.pf-scelte .segmented-input:checked+.segmented-btn::after {
    content: none;
}

/* Eventi di interesse (7 ott 2026): nomi lunghi, una scelta per riga */
.segmented.pf-scelte.pf-colonna {
    flex-direction: column;
    gap: 10px;
}

.segmented.pf-scelte.pf-colonna .segmented-btn {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: .95rem;
    transform: none;
}

.auth-forgot {
    margin-top: -6px;
    text-align: right;
}

.auth-forgot a {
    display: inline-block;
    font-size: .92rem;
    font-weight: 900;
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .10);
}

.auth-forgot a:hover {
    background: rgba(255, 255, 255, .16);
}

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    backdrop-filter: blur(6px);
}

.lb-prev {
    left: 14px;
}

.lb-next {
    right: 14px;
}

.lb-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    backdrop-filter: blur(6px);
}

.change-event-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .18);
}

.change-event-link:hover {
    background: rgba(255, 255, 255, .18);
}

.change-event-link:active {
    transform: translateY(1px);
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

@media (min-width: 520px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 820px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ph {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    /* niente gap da inline img */
    background: transparent;
    /* niente filo bianco */
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.event-link {
    display: block;
    text-decoration: none;
}

.topbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

.btn-back {
    border: none;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.muted {
    opacity: .85;
    font-size: .95rem;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--black) 85%, transparent);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 18px;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 16px;
    background: var(--white);
}

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    backdrop-filter: blur(6px);
}

.lb-prev {
    left: 14px;
}

.lb-next {
    right: 14px;
}

.lb-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    backdrop-filter: blur(6px);
}

.change-event-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .18);
}

.change-event-link:hover {
    background: rgba(255, 255, 255, .18);
}

.change-event-link:active {
    transform: translateY(1px);
}

/* =========================================================
   NOICLUB • CLUB MODE (story vibe + neon + torn paper)
   Incollare in fondo al file per override
   ========================================================= */

body {
    padding-top: 64px;
    /* spazio per topbar */
    overflow-x: hidden;
}

/* luci “club” animate dietro */
body::before {
    content: "";
    position: fixed;
    inset: -20%;
    background: var(--club-lights-bg,
            radial-gradient(220px 220px at 20% 15%, rgba(255, 45, 149, .22), transparent 60%),
            radial-gradient(260px 260px at 80% 20%, rgba(45, 252, 255, .18), transparent 62%),
            radial-gradient(320px 320px at 55% 85%, rgba(167, 90, 255, .18), transparent 65%),
            radial-gradient(420px 420px at 15% 75%, rgba(255, 195, 0, .10), transparent 70%));
    filter: blur(10px) saturate(1.2);
    opacity: .95;
    z-index: -1;
    animation: clubDrift 12s ease-in-out infinite alternate;
}

@keyframes clubDrift {
    from {
        transform: translate3d(-2%, -1%, 0) scale(1.02);
    }

    to {
        transform: translate3d(2%, 2%, 0) scale(1.06);
    }
}

/* TOPBAR (ricicla .logo-container senza cambiare PHP) */
.logo-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, .55);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

/* logo più “wordmark”, ma se hai un’immagine resta ok */
.logo {
    width: 110px;
    height: 26px;
    filter: drop-shadow(0 0 14px rgba(255, 45, 149, .35));
}

/* hamburger “finto” (solo estetica). Se vuoi click, lo facciamo dopo */
.logo-container::after {
    content: "≡";
    font-size: 26px;
    line-height: 1;
    color: rgba(255, 255, 255, .9);
    text-shadow: 0 0 18px rgba(45, 252, 255, .22);
}

/* STORY HERO */
.club-story {
    width: min(520px, 92vw);
    height: min(520px, 74vh);
    margin: 10px auto 14px;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 22px 60px rgba(0, 0, 0, .75),
        0 0 0 1px rgba(255, 255, 255, .08) inset,
        inset 0 0 0 9999px rgba(0, 0, 0, .18);
}

/* qui metti un’immagine “club”. Se vuoi video, lo sostituiamo */
.club-story-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.12) contrast(1.08);
    z-index: 1;
}

/* strappo carta (top/bottom) via mask svg */
/* strappo carta DISABILITATO (top/bottom) */
.club-story::before,
.club-story::after {
    content: "";
    display: none;
}

/* swipe up */
.club-story-swipe {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
    z-index: 4;
    text-shadow: 0 10px 30px rgba(0, 0, 0, .65);
}

.club-story-swipe span {
    display: block;
    margin-top: 6px;
    font-size: 18px;
    opacity: .9;
    animation: swipeBounce 1.1s ease-in-out infinite;
}

@keyframes swipeBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: .75;
    }

    50% {
        transform: translateY(6px);
        opacity: 1;
    }
}

/* CONTAINER più “glass” e più largo (così respira con lo story sopra) */
.container {
    max-width: 520px;
    padding: 18px 16px;
    background: var(--container-bg, rgba(10, 10, 14, .42));
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(14px);
}

/* greeting come strip “paper” */
.greeting-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 6px 0 14px 0;
    border-radius: 16px;
    background: rgba(250, 250, 250, .96);
    color: #0b0b10;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
    position: relative;
    overflow: hidden;
}

/* micro-accent neon sul bordo */
.greeting-hero::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    pointer-events: none;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, .08) inset,
        0 0 0 1px rgba(255, 45, 149, .22);
}

/* liste e testi “non neri su scuro” */
h2,
h3 {
    color: var(--heading-color, rgba(255, 255, 255, .88));
}

ul li {
    background: var(--surface-5, rgba(255, 255, 255, 0.2));
    border: 1px solid rgba(255, 255, 255, .08);
    color: var(--ink, var(--ink));
}

/* SOLO MOVIMENTI */
#movList li,
#movListWrap #movList li,
#movimenti li,
#listaMovimenti li,
ul.movimenti li,
.movimenti li {
    background: var(--movimenti-bg, var(--white)) !important;
    border: 1px solid var(--movimenti-border, rgba(0, 0, 0, .08)) !important;
    color: var(--movimenti-text, var(--ink)) !important;
}

/* bottoni neutri: meno “ufficio” */
.btn-dj-neutral {
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
}

/* TOPBAR */
body {
    padding-top: 64px;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--topbar-bg, rgba(0, 0, 0, .55));
    border-bottom: 1px solid var(--border-1, rgba(255, 255, 255, .08));
    backdrop-filter: blur(12px);
    z-index: 2000;
}

.topbar-brand {
    font-weight: 900;
    letter-spacing: .34em;
    font-size: 18px;
    color: rgba(255, 255, 255, .92);
    text-shadow: 0 0 18px rgba(255, 45, 149, .20);
}

.topbar-menu-btn {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.topbar-menu-btn span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 0 14px rgba(45, 252, 255, .14);
}

/* MENU OVERLAY */

.club-menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--menu-overlay-bg, rgba(0, 0, 0, .66));
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 2500;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 12px 12px;

    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.club-menu-panel {
    width: min(520px, 92vw);
    background: var(--menu-panel-bg, rgba(10, 10, 14, .78));
    border: 1px solid var(--border-2, rgba(255, 255, 255, .12));
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .75);
    padding: 14px;

    max-height: calc(100dvh - 84px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.club-menu-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.club-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.club-menu-title {
    font-weight: 900;
    letter-spacing: .18em;
    color: rgba(255, 255, 255, .88);
}

.club-menu-close {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .92);
    cursor: pointer;
}

.club-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.club-menu-actions .btn-dj {
    width: 100%;
}

/* Greeting: tutto a sinistra, anche se .container è centrato */
.greeting-hero {
    justify-content: flex-start;
    text-align: left;
}

.greeting-hero>div {
    text-align: left;
}

/* immagine evento */
.event-img-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
}

.event-img {
    width: 100%;
    height: auto;
    display: block;
}

/* badge data in alto a destra */
.event-date-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: .9rem;
    letter-spacing: .5px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, .45);
    color: var(--white);
}

/* link-bottone: niente sottolineatura + centrato */
.btn-link-no-underline {
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.event-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.event-actions>.btn-dj {
    width: 100%;
}

/* Riga bottoni uguali */
.event-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Stile identico per <button> e <a> */
.event-action-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 12px;
    font-weight: 900;
    font-size: 1.05rem;
    text-align: center;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
    min-height: 56px;
    /* stessa altezza, sempre */
}

button.event-action-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* POPUP sopra a TUTTO */
.popup-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    background: rgba(0, 0, 0, .72) !important;
    padding: 18px !important;
    overflow: auto !important;
}

/* Il box deve stare sopra l'overlay e non farsi "incastrare" */
.popup-box {
    position: relative !important;
    z-index: 1000000 !important;
}

.greeting-hero {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-qr.is-open {
    transform: scale(0.98);
    opacity: .95;
}

.btn-qr {
    --qr-bg: var(--white);
    /* colore “vuoto” dentro i finder */
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* mostra l'SVG e rendilo "QR" vero (moduli pieni) */
.btn-qr .qr-ico {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    /* metti var(--white)) se lo vuoi bianco */
}

.btn-qr .qr-ico svg {
    display: block;
    width: 26px;
    height: 26px;
}

/* colore pattern: prende il colore del bottone */
.btn-qr .qr-ico {
    color: var(--ink);
    /* metti var(--white)) se lo vuoi bianco */
}

/* la X resta leggibile */
.btn-qr .qr-x {
    color: var(--ink);
    /* metti var(--white)) se lo vuoi bianco */
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Torna indietro: sempre sotto ai popup + non cliccabile quando un popup è aperto */
.back-btn {
    position: relative;
    z-index: 0;
}

body.popup-open .back-btn {
    pointer-events: none;
}

/* popup: layout con footer sticky */
.popup-box {
    display: flex;
    flex-direction: column;
    max-height: 74vh;
    /* coerente col punto 1 */
}

/* contenuto scrollabile (prende tutto lo spazio disponibile) */
.popup-scroll {
    overflow: auto;
    flex: 1 1 auto;
    padding-right: 6px;
    /* evita che la scrollbar schiacci il testo */
}

/* footer fissato in basso nel popup */
.popup-footer {
    position: sticky;
    bottom: 0;
    margin-top: 14px;
    padding-top: 12px;

    /* separatore chiaro sopra ai bottoni */
    border-top: 1px solid rgba(255, 255, 255, .14);

    /* stacca meglio dal contenuto quando scrolli */
    box-shadow: 0 -10px 22px rgba(0, 0, 0, .35);

    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--popup-card-bg, #1c1c1c) 45%);
}

html {
    background: var(--body-bg, radial-gradient(circle at top center, #0f0f0f, var(--black)));
    background-color: var(--black);
    /* fallback */
    min-height: 100%;
}

.tavolo-badge {
    font-size: 1.6em;
    font-weight: 700;
    color: #d32f2f;
    background: #ffeaea;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
}

/* --- Layout campi Tavolo + Note --- */
.order-fields {
    display: grid;
    gap: 12px;
    margin: 14px 0 10px;
}

.order-fields {
    overflow: hidden;
    /* taglia eventuali sbordi interni */
}

.field {
    min-width: 0;
    /* importantissimo: evita overflow nei layout grid/flex */
}

.field {
    border: 1px solid var(--field-border, rgba(255, 255, 255, .14));
    background: var(--field-bg, rgba(255, 255, 255, .04));
    border-radius: var(--field-radius, 16px);
    padding: 12px;
}

.field>label {
    display: block;
    font-weight: 800;
    letter-spacing: .2px;
    margin-bottom: 8px;
}

.field input,
.field textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: var(--control-radius, 14px);
    border: 1px solid var(--control-border, rgba(255, 255, 255, .16));
    background: var(--control-bg, rgba(0, 0, 0, .18));
    color: inherit;
    padding: 12px 14px;
    outline: none;
    transition: border-color .15s ease, transform .15s ease;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--control-focus-border, rgba(255, 255, 255, .35));
    transform: translateY(-1px);
}

.tavolo-input {
    font-size: 26px;
    text-align: center;
    font-weight: 900;
    letter-spacing: 1px;
}

.field-note textarea {
    min-height: 120px;
    resize: vertical;
    font-size: 16px;
    line-height: 1.25;
}

.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    font-size: 12px;
    opacity: var(--meta-opacity, .78);
}

/* togli gli spinner brutti sugli input number */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* --- Bottom back button (index.php) --- */
.bottom-actions {
    margin: var(--space-4, 16px) 0 var(--space-2, 8px);
    display: flex;
    justify-content: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-2, 10px);

    padding: var(--btn-pad-y, 8px) var(--btn-pad-x, 16px);
    min-height: var(--btn-min-h, 40px);
    border-radius: var(--field-radius, 16px);

    text-decoration: none;
    font-weight: var(--btn-weight, 900);
    letter-spacing: var(--btn-letter, .2px);

    border: 1px solid var(--control-border, rgba(255, 255, 255, .16));
    background: var(--field-bg, rgba(255, 255, 255, .06));
    color: inherit;

    box-shadow: var(--btn-shadow, 0 10px 28px rgba(0, 0, 0, .28));
    transition: transform .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.btn-back:hover {
    transform: translateY(-1px);
    border-color: var(--control-focus-border, rgba(255, 255, 255, .35));
    background: var(--btn-hover-bg, rgba(255, 255, 255, .08));
}

.btn-back:active {
    transform: translateY(0px);
}

.btn-back:focus-visible {
    outline: none;
    border-color: var(--control-focus-border, rgba(255, 255, 255, .45));
    box-shadow:
        0 0 0 4px var(--focus-ring, rgba(255, 255, 255, .12)),
        var(--btn-shadow, 0 10px 28px rgba(0, 0, 0, .28));
}

.btn-back-ic {
    display: grid;
    place-items: center;

    width: var(--btn-ic-size, 28px);
    height: var(--btn-ic-size, 28px);
    border-radius: 999px;

    background: var(--control-bg, rgba(0, 0, 0, .18));
    border: 1px solid var(--field-border, rgba(255, 255, 255, .14));
}

.btn-back-svg {
    width: var(--btn-ic-svg, 18px);
    height: var(--btn-ic-svg, 18px);
    display: block;
    fill: currentColor;
}

.info-i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .06);
    color: #e8eaf6;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.info-i:hover {
    background: rgba(255, 255, 255, .12);
}

/* =========================
   OFFERS (offerte.php)
   ========================= */

.offers-section-title {
    margin: 18px 0 10px;
    font-weight: 900;
    font-size: 1.05rem;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.offers-section-title::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: linear-gradient(90deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0));
    opacity: .9;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

/* Card base: più “premium” */
.offer-card {
    border-radius: 18px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03) 55%, rgba(0, 0, 0, .18) 100%);
    backdrop-filter: blur(10px);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, .28),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

/* Sheen / “luce che scorre” */
.offer-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    /* overlay scuro + un filo di colore */
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .72)),
        radial-gradient(120% 60% at 0% 0%, rgba(255, 214, 98, .10) 0%, rgba(255, 214, 98, 0) 45%),
        radial-gradient(120% 60% at 100% 0%, rgba(120, 160, 255, .10) 0%, rgba(120, 160, 255, 0) 45%);
    opacity: .9;
}

.offer-card::after {
    content: "";
    position: absolute;
    inset: -55% -24%;
    background: linear-gradient(120deg, transparent 34%, rgba(255, 255, 255, .16) 50%, transparent 66%);
    transform: translateX(-190%) skewX(-18deg);
    animation: offer-sheen 6.2s linear infinite;
    pointer-events: none;
}

@keyframes offer-sheen {
    0% {
        transform: translateX(-190%) skewX(-18deg);
        opacity: 0;
    }

    14% {
        opacity: .16;
    }

    52% {
        opacity: .30;
    }

    90% {
        opacity: .12;
    }

    100% {
        transform: translateX(190%) skewX(-18deg);
        opacity: 0;
    }
}

.offer-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 18px 44px rgba(0, 0, 0, .36),
        inset 0 1px 0 rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .18);
    filter: brightness(1.03);
}

.offer-card>* {
    position: relative;
    z-index: 1;
}

.offer-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.offer-img {
    width: 82px;
    height: 82px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    overflow: hidden;
    flex: 0 0 auto;
    box-shadow: 0 10px 18px rgba(0, 0, 0, .22);
}

.offer-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.offer-title {
    margin: 0 0 4px;
    font-weight: 950;
    font-size: 1.05rem;
    line-height: 1.12;
    letter-spacing: .2px;
}

.offer-muted {
    opacity: .86;
    font-size: .92rem;
    line-height: 1.25;
}

.offer-pills {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Riga pillole a tutta larghezza (prezzo · utilizzi · orario): sta fuori dalla
   colonna di testo, che accanto alla miniatura era troppo stretta e mandava
   l'orario a capo da solo. */
.offer-pills--wide {
    justify-content: center;
    margin-top: 12px;
}

.offer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .86rem;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(0, 0, 0, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* telefoni: le pillole si stringono invece di andare a capo */
@media (max-width: 420px) {

    .offer-pills--wide {
        gap: 6px;
        flex-wrap: nowrap;
    }

    .offer-pills--wide .offer-pill {
        padding: 6px 9px;
        font-size: .8rem;
        white-space: nowrap;
    }
}

/* schermi molto stretti (iPhone SE): ultimi pixel per tenere la riga intera */
@media (max-width: 360px) {

    .offer-img {
        width: 62px;
        height: 62px;
    }

    .offer-pills--wide {
        gap: 5px;
        /* con 4 pillole (prezzo, utilizzi, orario, rimaste) qui non ci si sta:
           meglio andare a capo che uscire dal bordo della card */
        flex-wrap: wrap;
    }

    .offer-pills--wide .offer-pill {
        padding: 5px 7px;
        font-size: .74rem;
    }
}

.offer-pill--timer {
    font-variant-numeric: tabular-nums;
    border-color: rgba(255, 255, 255, .20);
    background: rgba(0, 0, 0, .28);
}

.offer-pill--status {
    font-weight: 900;
    letter-spacing: .2px;
}

.offer-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

/* ✅ Attiva: scintilla, glow vivo, bordo “premium” che gira */
.offer-card--active {
    border-color: rgba(255, 215, 0, .55);
    /* glow DENTRO (non viene tagliato da overflow della auth-card) */
    box-shadow:
        0 18px 55px rgba(0, 0, 0, .40),
        inset 0 0 0 2px rgba(255, 215, 0, .20),
        inset 0 0 28px rgba(255, 215, 0, .18),
        inset 0 0 18px rgba(46, 204, 113, .12);
    animation: offer-live 1.2s ease-in-out infinite;
}

/* Sovrascrivo gli overlay base per renderla “viva” */
.offer-card--active::before {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .46), rgba(0, 0, 0, .70)),
        radial-gradient(120% 70% at 0% 0%, rgba(255, 215, 0, .18) 0%, rgba(255, 215, 0, 0) 52%),
        radial-gradient(120% 70% at 100% 0%, rgba(46, 204, 113, .14) 0%, rgba(46, 204, 113, 0) 55%);
    opacity: .95;
}

/* “bordo che gira” + scintille usando lo sheen già esistente */
.offer-card--active::after {
    /* sovrascrivo completamente l’after base */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
    opacity: .85;
    pointer-events: none;

    background:
        radial-gradient(80% 60% at 20% 0%, rgba(255, 215, 0, .28), rgba(255, 215, 0, 0) 60%),
        radial-gradient(80% 60% at 80% 0%, rgba(46, 204, 113, .18), rgba(46, 204, 113, 0) 60%),
        radial-gradient(120% 90% at 50% 50%, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 55%);
    mix-blend-mode: screen;
    animation: offer-pulse 1.8s ease-in-out infinite;
}

@keyframes offer-live {

    0%,
    100% {
        transform: translateY(0);
        filter: brightness(1);
    }

    50% {
        transform: translateY(-2px);
        filter: brightness(1.06);
    }
}

@keyframes offer-ring {
    to {
        transform: translateX(0) skewX(-18deg) rotate(360deg);
    }
}

/* Badge stato: verde “GO”, più cicciotto */
.offer-card--active .offer-pill--status {
    border-color: rgba(46, 204, 113, .55);
    background: rgba(46, 204, 113, .18);
    box-shadow: 0 0 0 1px rgba(46, 204, 113, .12) inset, 0 0 18px rgba(46, 204, 113, .14);
}

/* ☠️ Scaduta: opaca, grigia, triste come un lunedì */
.offer-card--expired {
    border-color: rgba(148, 163, 184, .22);
    opacity: .55;
    filter: grayscale(1) saturate(.2) brightness(.82);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, .30),
        inset 0 1px 0 rgba(255, 255, 255, .04);
}

/* stop animazioni / lucine */
.offer-card--expired,
.offer-card--expired::before,
.offer-card--expired::after {
    animation: none !important;
}

.offer-card--expired::before {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .68), rgba(0, 0, 0, .82));
    opacity: .98;
}

.offer-card--expired::after {
    opacity: .10;
}

.offer-card--expired .offer-pill--status {
    border-color: rgba(148, 163, 184, .28);
    background: rgba(148, 163, 184, .10);
}

/* Usata */
.offer-card--used {
    border-color: rgba(52, 152, 219, .28);
}

.offer-card--used .offer-pill--status {
    border-color: rgba(52, 152, 219, .40);
    background: rgba(52, 152, 219, .12);
}

/* Sold out in shop */
.offer-card--soldout {
    opacity: .78;
    filter: grayscale(.2);
}

/* Empty */
.offer-card--empty {
    text-align: center;
    padding: 18px;
    opacity: .92;
}

.offer-form {
    margin: 0;
}

/* Popup offerta: più alto, layout a colonna, bottoni sempre visibili */
#popupOffertaAttiva .popup-box--offer {
    width: min(92vw, 620px);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    padding-bottom: 14px;

    margin: 0 !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Corpo scrollabile */
#popupOffertaAttiva .offer-popup-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    min-height: 0;
    padding-right: 4px;
}

/* Barra bottoni sticky */
#popupOffertaAttiva .offer-popup-actions {
    position: sticky;
    bottom: 0;
    padding-top: 10px;
    margin-top: 6px;
    background: inherit;
    border-top: 1px solid rgba(255, 255, 255, .12);
    z-index: 2;
}

#popupOffertaAttiva {
    overscroll-behavior: contain;
    touch-action: none;
}

#popupOffertaAttiva .popup-box--offer,
#popupOffertaAttiva .offer-popup-actions {
    touch-action: pan-y;
}

body.modal-open {
    overflow: hidden;
    touch-action: none;
}

/* Su schermi piccoli: bottoni full-width e sempre cliccabili */
@media (max-width: 480px) {
    #popupOffertaAttiva .popup-box--offer {
        width: calc(100vw - 20px);
        max-height: min(84vh, 84dvh);
        margin: 10px auto;
        padding-bottom: 10px;
    }

    #popupOffertaAttiva .offer-popup-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
}

/* PREZZO OFFERTA = WOW / COMMERCIALE */
.offer-pill--price {
    font-weight: 950;
    font-size: 1rem;
    letter-spacing: .02em;
    padding: 8px 12px;
    border: 1px solid rgba(255, 215, 0, .55);
    background:
        linear-gradient(135deg, rgba(255, 215, 0, .22), rgba(255, 153, 0, .14)),
        rgba(0, 0, 0, .28);
    box-shadow:
        0 0 0 1px rgba(255, 215, 0, .12) inset,
        0 6px 16px rgba(255, 190, 0, .20);
    color: #fff6c7;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .45);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.offer-pill--price::before {
    content: "";
    position: absolute;
    inset: -40% -20%;
    background: linear-gradient(120deg,
            transparent 38%,
            rgba(255, 255, 255, .25) 50%,
            transparent 62%);
    transform: translateX(-140%) skewX(-18deg);
    animation: offerPriceShine 2.8s linear infinite;
    pointer-events: none;
}

.offer-card--shop .offer-pill--price {
    font-size: 1.08rem;
    padding: 9px 14px;
    border-color: rgba(255, 215, 0, .75);
    box-shadow:
        0 0 0 1px rgba(255, 215, 0, .18) inset,
        0 0 18px rgba(255, 215, 0, .22),
        0 8px 20px rgba(255, 170, 0, .18);
    animation: offerPricePulse 1.25s ease-in-out infinite, offerPriceBounce 1.25s ease-in-out infinite;
    transform-origin: center;
    will-change: transform, box-shadow;
}

@keyframes offerPriceShine {
    0% {
        transform: translateX(-140%) skewX(-18deg);
        opacity: 0;
    }

    12% {
        opacity: .25;
    }

    55% {
        opacity: .45;
    }

    100% {
        transform: translateX(140%) skewX(-18deg);
        opacity: 0;
    }
}

@keyframes offerPricePulse {
    0% {
        transform: scale(1);
        box-shadow:
            0 0 0 1px rgba(255, 215, 0, .18) inset,
            0 0 12px rgba(255, 215, 0, .16),
            0 6px 14px rgba(255, 170, 0, .14);
    }

    50% {
        transform: scale(1.07);
        box-shadow:
            0 0 0 1px rgba(255, 215, 0, .28) inset,
            0 0 24px rgba(255, 215, 0, .34),
            0 10px 24px rgba(255, 170, 0, .24);
    }

    100% {
        transform: scale(1);
        box-shadow:
            0 0 0 1px rgba(255, 215, 0, .18) inset,
            0 0 12px rgba(255, 215, 0, .16),
            0 6px 14px rgba(255, 170, 0, .14);
    }
}

@keyframes offerPriceBounce {

    0%,
    100% {
        transform: scale(1) translateY(0);
    }

    50% {
        transform: scale(1.07) translateY(-1px);
    }
}

/* mini layer profilo: usa classi esistenti + poco CSS locale */
.profile-wrap {
    margin-top: 12px;
}

.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid rgba(255, 215, 0, .35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.8rem;
    color: #fff;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-username {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .92);
    font-weight: 700;
    font-size: .95rem;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.profile-bio {
    margin-top: 4px;
    color: rgba(255, 255, 255, .88);
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: center;
}

.profile-bio.is-empty {
    opacity: .65;
    font-style: italic;
}

.profile-meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    text-align: left;
}

.profile-meta-item {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .09);
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .92);
    font-size: .95rem;
}

.profile-meta-item strong {
    color: #FFD700;
}

.profile-form textarea,
.profile-form input[type="text"],
.profile-form input[type="url"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-radius: 12px;
    padding: 12px;
    font-size: 0.98rem;
    outline: none;
}

.profile-form textarea {
    min-height: 110px;
    resize: vertical;
}

.profile-form .field-label {
    width: 100%;
    text-align: left;
    font-weight: 700;
    font-size: .95rem;
    color: rgba(255, 255, 255, .9);
    margin-top: 2px;
}

.profile-form .hint {
    width: 100%;
    text-align: left;
    opacity: .75;
    font-size: .82rem;
    margin-top: -8px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
}

.profile-link {
    color: inherit;
    text-decoration: none;
    opacity: .9;
}

.profile-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.profile-empty-card {
    text-align: center;
    padding: 16px;
}

/* Riga amico: testo a sinistra, bottone a destra */
.friend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
}

/* blocco info */
.friend-row__info {
    min-width: 0;
    /* permette ellissi */
    flex: 1;
}

.friend-row__name {
    font-weight: 900;
    line-height: 1.15;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: baseline;
}

.friend-row__uname {
    opacity: .75;
    font-weight: 800;
}

.friend-row__meta {
    opacity: .75;
    font-size: .92rem;
    margin-top: 4px;
}

/* Bottone piccolo a destra */
.btn-mini {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;

    height: 34px;
    padding: 0 12px;
    border-radius: 999px;

    font-weight: 900;
    font-size: .9rem;
    letter-spacing: .2px;

    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
}

.btn-mini:hover {
    filter: brightness(1.08);
}

.btn-mini:active {
    transform: translateY(1px);
}

/* Nome: lascia andare a capo */
.friend-row__name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* Meta: ellissi ok */
.friend-row__meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes offerPriceBounce {

    0%,
    100% {
        transform: scale(1) translateY(0);
    }

    50% {
        transform: scale(1.07) translateY(-1px);
    }
}

/* Lightbox: su schermi grandi l’immagine non deve mangiarsi tutto */
#lb .lb-body {
    max-width: min(1000px, 92vw);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lb #lbImg {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

#lb .lb-meta {
    width: 100%;
    max-height: 20vh;
    overflow: auto;
    padding-bottom: 6px;
}

/* Link tag: niente blu, niente underline */
.lb-tag-link {
    color: inherit;
    text-decoration: none;
}

.lb-tag-link:hover {
    text-decoration: underline;
}

/* Popup "altri" */
.lb-tags-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lb-tags-box {
    background: #111;
    border-radius: 14px;
    padding: 14px;
    width: 92vw;
    max-width: 520px;
    max-height: 70vh;
    overflow: auto;
}

.lb-tags-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.lb-tags-list {
    display: grid;
    gap: 8px;
}

.lb-tags-list .lb-tag-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
}

.lb-tags-line {
    margin-top: 10px;
}

.lb-tagme-btn {
    width: 100%;
    margin-top: 10px;
}

.lb-tags-box .btn-dj {
    width: 100%;
    margin-top: 12px;
}

.tagged-ph-wrap {
    position: relative;
}

.tagged-ph-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    cursor: pointer;
    z-index: 2;
}

.tagged-ph-x:hover {
    filter: brightness(1.12);
}

.tagged-ph-x:active {
    transform: translateY(1px);
}

/* ============================
   EVENT ATTENDEES COMPACT
   ============================ */

.event-att-inline {
    margin-top: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
}

.event-att-avatars {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.event-att-avatar {
    width: 30px;
    height: 30px;
    margin-left: -8px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    text-decoration: none;
    font-size: .72rem;
    font-weight: 800;
    color: #201600;
    background: linear-gradient(135deg, #ffe7a3, #ffd266);
    border: 2px solid rgba(18, 18, 26, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
    transition: transform .12s ease;
}

.event-att-avatar:first-child {
    margin-left: 0;
}

.event-att-avatar:hover {
    transform: translateY(-1px);
}

.event-att-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.event-att-text {
    min-width: 0;
    font-size: .78rem;
    line-height: 1.1;
    color: rgba(255, 255, 255, .68);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}

.event-att-live {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, .8);
    vertical-align: middle;
}

.event-att-names {
    min-width: 0;
    font-size: .88rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, .92);
}

.event-att-name {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.event-att-name:hover {
    text-decoration: underline;
}

.event-att-more {
    color: rgba(255, 255, 255, .68);
    font-weight: 600;
}

.btn-dj-offerte-pulse {
    position: relative;
    overflow: hidden;
    border-color: rgba(255, 215, 0, .72) !important;
    background:
        linear-gradient(135deg, rgba(255, 215, 0, .20), rgba(255, 153, 0, .13)),
        rgba(0, 0, 0, .28) !important;
    color: #fff6c7 !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .45);
    box-shadow:
        0 0 0 1px rgba(255, 215, 0, .16) inset,
        0 0 14px rgba(255, 215, 0, .18),
        0 7px 18px rgba(255, 170, 0, .15);
    animation: offerPricePulseMenu 1.55s ease-in-out infinite;
    transform-origin: center;
    will-change: transform, box-shadow;
}

.btn-dj-offerte-pulse::before {
    content: "";
    position: absolute;
    inset: -40% -20%;
    background: linear-gradient(120deg,
            transparent 38%,
            rgba(255, 255, 255, .25) 50%,
            transparent 62%);
    transform: translateX(-140%) skewX(-18deg);
    animation: offerPriceShine 2.8s linear infinite;
    pointer-events: none;
}

.btn-dj-offerte-pulse>* {
    position: relative;
    z-index: 1;
}

@keyframes offerPricePulseMenu {
    0% {
        transform: scale(1) translateY(0);
        box-shadow:
            0 0 0 1px rgba(255, 215, 0, .16) inset,
            0 0 12px rgba(255, 215, 0, .14),
            0 6px 14px rgba(255, 170, 0, .12);
    }
    50% {
        transform: scale(1.035) translateY(-0.5px);
        box-shadow:
            0 0 0 1px rgba(255, 215, 0, .22) inset,
            0 0 18px rgba(255, 215, 0, .24),
            0 8px 18px rgba(255, 170, 0, .18);
    }
    100% {
        transform: scale(1) translateY(0);
        box-shadow:
            0 0 0 1px rgba(255, 215, 0, .16) inset,
            0 0 12px rgba(255, 215, 0, .14),
            0 6px 14px rgba(255, 170, 0, .12);
    }
}

/* Operatori: bottone "Remove access" sempre fisso in basso, uguale ovunque */
.remove-access-btn {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 15px 16px;
    /* più in alto per non finire sotto la home-indicator dell'iPhone */
    padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 14px));
    background: #b0201c;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: .02em;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .35);
}

.remove-access-btn:active {
    background: #911916;
}

/* spazio in fondo così il bottone fisso non copre l'ultimo contenuto */
body:has(.remove-access-btn) {
    padding-bottom: 96px;
}
/* iPhone riconosce da solo i numeri di telefono e li trasforma in link blu
   sottolineati (es. il numero nel menu del profilo). Nel sito non c'e' nessun
   link telefonico voluto: restano testo normale (19 set 2026). */
a[x-apple-data-detectors],
a[href^="tel:"] {
    color: inherit !important;
    text-decoration: none !important;
    font: inherit !important;
}

/* Tasto "Modalita' operatore" in home (21 set 2026): bordato nel colore del
   club invece del verde dei tasti di conferma, che con i temi scuri stonava.
   Margine sopra negativo: il riquadro di benvenuto ha gia' 14px sotto, cosi'
   lo spazio sopra e sotto il tasto e' lo stesso (10px). */
.op-riga {
    margin: -4px 0 0;
}

.btn-operatore {
    width: 100%;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid var(--gold-main, #c9a227);
    background: rgba(255, 255, 255, .05);
    background: color-mix(in srgb, var(--gold-main, #c9a227) 14%, transparent);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
}

.btn-operatore:hover {
    background: color-mix(in srgb, var(--gold-main, #c9a227) 24%, transparent);
}

/* Card del portafoglio semplificata (2 ott 2026): Credito (saldo.php) e ordine bottiglie (bottiglia.php) */
.wallet-card.wallet-semplice { padding: 18px; border-radius: 18px; text-align: left; }
.ws-eti { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.wallet-semplice .ws-totale { margin: 8px 0 6px; font-size: 40px; font-weight: 900; letter-spacing: -.5px; }
.ws-dettaglio { display: flex; align-items: center; gap: 8px; font-size: 14px; opacity: .8; }
.ws-dettaglio strong { font-weight: 800; }
.ws-dettaglio .saldo-badge, .ws-dettaglio .bonus-badge { padding: 0; border: 0; background: none; box-shadow: none; color: inherit; }
.ws-punto { opacity: .5; }
.ws-ricarica {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 16px;
    padding: 13px 16px;
    border: 0;
    border-radius: 14px;
    background: var(--gold-main, #c8a04b);
    color: #000;
    font: inherit;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
}
.ws-ricarica svg { width: 18px; height: 18px; }
