﻿:root {
    --brand-magenta: #ec008c;
    --white: #ffffff;
    --footer-dark1: rgba(20,6,20,0.98);
    --footer-dark2: rgba(9,2,9,1);
    --max-width: 1200px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    font-family: "Gotham", "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    color: #222;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.page {
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(236,0,140,0.98) 0%, rgba(150,15,60,0.95) 70%);
    padding: 28px 0;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: var(--max-width);
    width: 100%;
    padding: 0 28px;
    margin: 0 auto;
}

/* TOPBAR */
header.topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 0 30px;
    margin-bottom: 22px;
    /*border-bottom: 1px solid rgba(255,255,255,0.16);*/
}

.hamburger {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: 18px;
    backdrop-filter: blur(6px);
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 38px 12px 18px;
    text-align: center;
    color: var(--white);
}

    .hero .logo {
        margin-bottom: 6px;
    }

    .hero h1 {
        margin: 0;
        font-size: 42px;
        font-weight: 700;
        max-width: 980px;
        line-height: 1.05;
    }

    .hero p.lead {
        margin: 6px 0 6px;
        font-size: 20px;
        font-weight: 500;
        opacity: 0.95;
        font-style: italic;
    }

.hint {
    opacity: .9;
    font-size: 13px;
    margin-bottom: 100px;
}

/* Composer */
.composer {
    width: min(920px, 100%);
    max-width: 920px;
    min-width: 260px;
    margin-top: 10px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-input {
    width: 100%;
    resize: none;
    min-height: 56px;
    max-height: 240px;
    overflow-y: auto;
    padding: 16px 18px;
    border-radius: 18px;
    border: 2px solid rgba(0,0,0,0.10);
    background: #fff;
    font-size: 16px;
    outline: none;
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
    line-height: 1.45;
}

.send {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand-magenta);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    font-size: 18px;
    flex: 0 0 auto;
}

    .send:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

/* Chat */
.chat {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 6px 0;
}

.chat-card {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.18);
    color: #fff;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
}

.chat-title {
    font-weight: 800;
}

.chat-clear {
    margin-left: auto;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}

/*17_03_26
    .chat-body {
    padding: 14px;
    max-height: 52vh;
    overflow: auto;
}*/

.chat-body {
    padding: 14px;
    overflow: visible;
    max-height: none;
}

.msg {
    display: flex;
    align-items: flex-start;
    margin: 10px 0;
}

    .msg.user {
        justify-content: flex-end;
    }

    .msg.assistant {
        justify-content: flex-start;
    }

.bubble {
    width: min(920px, 100%);
    max-width: min(920px, 100%);
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.94);
    color: #222;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    line-height: 1.45;
    font-size: 15px;
}

.msg.user .bubble {
    background: white;
    color: #333;
    border-radius: 16px;
    border-top-right-radius: 6px;
    max-width: 70%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 10px 14px;
}

.msg.assistant .bubble {
    background: rgba(255,255,255,0.85);
    border-radius: 16px;
    border-top-left-radius: 6px;
    max-width: 85%;
    padding: 12px 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.small {
    display: block;
    margin-top: 8px;
    opacity: .7;
    font-size: 12px;
}

.chat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    flex-wrap: wrap;
}

.code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 12px;
    background: rgba(0,0,0,0.18);
    padding: 3px 6px;
    border-radius: 8px;
}

/* Footer */
footer {
    margin-top: 32px;
    background: linear-gradient(180deg, var(--footer-dark1), var(--footer-dark2));
    color: #fff;
    padding: 48px 28px;
    border-radius: 16px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-logo {
    width: 60px;
    flex: 0 0 120px;
    height: auto; /* ← aggiungi questo */
    max-height: 60px; /* ← limita l'altezza */
    object-fit: contain;
}

.footer-copy {
    text-align: center;
    flex: 1;
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.6;
}

.footer-links {
    flex: 0 0 120px; /* ← stessa larghezza del blocco logo */
    display: flex;
    flex-direction: column; /* ← link su due righe come suggerivi */
    gap: 8px;
    align-items: flex-end; /* ← allineati a destra */
    white-space: nowrap;
}

.newsletter {
    max-width: 540px;
}

    .newsletter h3 {
        margin: 0 0 12px;
        font-size: 28px;
        font-weight: 800;
    }

    .newsletter p {
        margin: 0 0 18px;
        opacity: 0.9;
    }

.btn-ghost {
    background: #fff;
    color: var(--brand-magenta);
    padding: 10px 16px;
    border-radius: 8px;
    display: inline-block;
    font-weight: 700;
}

.footer-right {
    min-width: 220px;
}

.footer-strong {
    font-weight: 700;
    margin: 0 0 8px;
}

.footer-muted {
    opacity: .8;
    margin: 0;
}

/* Partner CTA */
.partner-cta {
    position: fixed;
    right: 24px;
    bottom: 60px;
    width: 180px;
    text-align: center;
    color: #fff;
    z-index: 40;
}

.partner-title {
    font-weight: 700;
}

.partner-cta .hand {
    width: 84px;
    margin: 6px auto 10px;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25));
}

.btn-partner {
    display: inline-block;
    background: #fff;
    color: var(--brand-magenta);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    margin-top: 8px;
}

/* Overlay + Drawer */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 90;
}

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 320px;
    max-width: 86vw;
    background: rgba(236,0,140,0.98);
    color: #fff;
    z-index: 100;
    box-shadow: 10px 0 30px rgba(0,0,0,0.25);
    transform: translateX(-105%);
    transition: transform .22s ease;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .drawer.open {
        transform: translateX(0);
    }

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 6px 14px;
}

.drawer-logo {
    width: 80px;
}

.drawer-close {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border-radius: 12px;
    font-weight: 800;
}

    .drawer-item:hover {
        background: rgba(255,255,255,0.12);
    }

.drawer-item--cta {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.20);
}

.drawer-ico {
    width: 18px;
    height: 18px;
    opacity: 0.95;
}

.drawer-sep {
    height: 1px;
    margin: 8px 6px;
    background: rgba(255,255,255,0.25);
}

/* Responsive mobile */
@media (max-width: 800px) {
    .page {
        padding: 14px 0;
    }


    header.topbar {
        position: sticky;
        top: 0;
        z-index: 50;
        padding: calc(10px + var(--safe-top)) 0 10px;
        backdrop-filter: blur(10px);
        background: linear-gradient(180deg, rgba(236,0,140,0.85) 0%, rgba(236,0,140,0.25) 100%);
    }

    .container {
        padding: 0 14px;
    }

    .hero {
        padding: 18px 6px 18px;
        gap: 12px;
    }

        .hero .logo {
            width: clamp(170px, 48vw, 220px);
            padding: 16px;
            border-radius: 22px;
        }

        .hero h1 {
            font-size: 26px;
            line-height: 1.12;
            padding: 0 6px;
        }

        .hero p.lead {
            font-size: 15px;
            margin: 2px 0 6px;
        }

    .composer {
        width: 100%;
        max-width: 520px;
        gap: 8px;
    }

    .chat-input {
        padding: 14px 14px;
        border-width: 3px;
        min-height: 52px;
    }

    .send {
        width: 46px;
        height: 46px;
    }

    .drawer {
        width: min(360px, 92vw);
        padding-top: calc(14px + var(--safe-top));
        padding-bottom: calc(14px + var(--safe-bottom));
    }

    .drawer-item {
        padding: 14px 12px;
        border-radius: 14px;
        font-size: 16px;
    }

    .drawer-ico {
        width: 20px;
        height: 20px;
    }

    /* Partner CTA as bottom bar */
    .partner-cta {
        left: 14px;
        right: 14px;
        bottom: calc(14px + var(--safe-bottom));
        width: auto;
        background: rgba(255,255,255,0.14);
        border: 1px solid rgba(255,255,255,0.18);
        border-radius: 16px;
        padding: 10px 12px;
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.18);
        text-align: left;
        display: none !important;
    }

        .partner-cta .hand {
            display: none;
        }

    .btn-partner {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 14px;
        border-radius: 14px;
        margin-top: 8px;
    }

    footer {
        margin-bottom: 92px;
        padding: 32px 18px;
    }

    .drawer {
        transform: translateX(-105%);
    }

        .drawer.open {
            transform: translateX(0);
        }

    .drawer-menu {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .drawer-bottom {
        margin-top: auto;
        padding-top: 16px;
    }

    .drawer-partner {
        display: flex;
        flex-direction: column;
        align-items: center; /* centra tutto orizzontalmente */
        justify-content: center;
        text-align: center;
    }

    .drawer-partner-title {
        margin-bottom: 10px;
    }

    .drawer-partner .hand {
        max-width: 70px;
        width: 100%;
        height: auto;
    }

    .drawer-partner-btn {
        margin-top: 10px;
    }
}

@media (max-width: 380px) {
    .hero h1 {
        font-size: 23px;
    }

    .drawer-logo {
        width: 140px;
    }

    .drawer-item {
        font-size: 15px;
    }
}
/* ===== CHATGPT-LIKE FLOW: landing -> chat ===== */

/* inizio: composer nel hero (già ok) */
.composer--hero {
}

/* dopo prima domanda: il composer diventa sticky in basso */
/*17_03_26
    body.chat-started .composer {
    position: sticky;
    bottom: calc(12px + var(--safe-bottom));
    z-index: 30;
    width: min(900px, calc(100% - 28px));
    margin: 0 auto 12px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.22);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 34px rgba(0,0,0,0.18);
}*/
body.chat-started .composer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: min(900px, calc(100% - 28px));
    margin: 0 auto;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
}

/* in chat mode: riduco un po' l'hero (effetto "compact") */
body.chat-started .hero {
    padding-bottom: 8px;
}

    body.chat-started .hero .lead,
    body.chat-started .hero h1 {
        opacity: 0.95;
    }

/* chat stage: compare solo dopo */
.chat-stage[hidden] {
    display: none;
}

body.chat-started #chatStage {
    display: block;
}


body.chat-started .container {
    display: block;
    min-height: auto;
}

body.chat-started .chat {
    display: block;
    flex: none;
}

/*17_03_26
    body.chat-started .chat-body {
    padding: 6px 0 18px;
    max-height: calc(100vh - 220px);
    min-height: 0;
    overflow-y: auto;
    overflow-x: visible;
}*/

body.chat-started .chat-body {
    padding: 6px 0 120px; /* spazio sotto per input */
    max-height: none;
    overflow: visible;
}

/* su mobile: composer fixed in basso (più solido che sticky) */
@media (max-width: 800px) {

    /*17_03_26
        body.chat-started .composer {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin-top: 10px;
        padding: 10px;
        border-radius: 18px;
        background: rgba(255,255,255,0.16);
        border: 1px solid rgba(255,255,255,0.22);
        backdrop-filter: blur(10px);
    }*/

    body.chat-started .composer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        margin: 0;
        padding: 10px;
    }

    body.chat-started .chat {
        padding-bottom: 20px;
    }
}

/* ===== Typing indicator (3 dots) ===== */
.typing {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 10px 12px;
}

    .typing .dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(34,34,34,0.55);
        animation: bounce 1.1s infinite ease-in-out;
    }

        .typing .dot:nth-child(2) {
            animation-delay: .15s;
        }

        .typing .dot:nth-child(3) {
            animation-delay: .30s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: .55;
    }

    40% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.logo-wrapper {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 34px;
    padding: 0 16px;
}

.logo-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.logo {
    width: clamp(170px, 24vw, 240px);
    padding: clamp(10px, 1.4vw, 16px);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: none;
    transition: all .35s ease;
}

.logo-small {
    transform: scale(0.82);
    opacity: 0;
}

.logo-wrapper {
    transition: margin .30s ease, opacity .30s ease, max-height .30s ease;
    max-height: 240px;
    overflow: hidden;
}

.logo-card {
    transition: opacity .22s ease, transform .22s ease, padding .22s ease;
    transform-origin: center center;
}

.logo {
    transition: transform .22s ease, opacity .22s ease, filter .22s ease;
    transform-origin: center center;
}

.logo-animating {
    transform: scale(0.68);
    opacity: 0;
    filter: blur(2px);
}

.logo-card-hidden {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
}

.logo-wrapper-collapsed {
    max-height: 0;
    margin-bottom: 0 !important;
    opacity: 0;
}

.msg.assistant img {
    max-width: 240px;
    border-radius: 12px;
    margin-top: 10px;
}

.msg.assistant a {
    color: #ec008c;
    text-decoration: none;
    font-weight: 600;
}

    .msg.assistant a:hover {
        text-decoration: underline;
    }

.msg.assistant .bubble {
    background: rgba(255,255,255,0.90);
    border-top-left-radius: 6px;
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
}

    .msg.assistant .bubble p {
        margin: 0 0 6px;
    }

        .msg.assistant .bubble p:last-child {
            margin-bottom: 0;
        }

    .msg.assistant .bubble br {
        line-height: 1.2;
    }

.msg.assistant img {
    display: block;
    max-width: 240px;
    border-radius: 12px;
    margin: 8px 0;
}

.msg.assistant .bubble ul,
.msg.assistant .bubble ol {
    margin: 8px 0 10px 18px;
    padding: 0;
}

.msg.assistant .bubble li {
    margin: 0 0 4px;
}

body.chat-started .hero h1,
body.chat-started .hero .lead,
body.chat-started .hero .hint,
body.chat-started footer,
body.chat-started .partner-cta {
    display: none !important;
}

body.chat-started .hero {
    padding: 8px 0 4px;
    min-height: auto;
}

body.chat-started .logo-wrapper {
    margin-bottom: 0;
}

body.chat-started .logo-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

body.chat-started .chat {
    width: min(920px, 100%);
    max-width: 920px;
    margin: 0 auto;
    padding-top: 4px;
    padding-bottom: 12px;
}

body.chat-started .chat-card {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

body.chat-started .chat-header,
body.chat-started .chat-footer {
    display: none;
}

.msg.assistant p {
    margin: 6px 0;
}

.msg.user {
    padding-left: 20%;
}

.avatar {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.85);
}

.msg.user .avatar {
    order: 2;
    margin-left: 10px;
    margin-right: 0;
}

.msg.user {
    justify-content: flex-end;
}

.msg.assistant .avatar {
    background: #ffffff;
}

.msg.user .avatar {
    background: #ff2a8b;
    color: white;
}

body.chat-started .hero {
    transition: padding .28s ease;
}

body.chat-started .hero {
    padding: 6px 0 2px;
    min-height: auto;
}


header.topbar {
    transition: background .25s ease, backdrop-filter .25s ease;
}

body.chat-started header.topbar {
    background: linear-gradient(180deg, rgba(236,0,140,0.82) 0%, rgba(236,0,140,0.18) 100%);
    backdrop-filter: blur(10px);
}

.topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 0;
}

.topbar-brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 55;
}

.topbar-logo {
    height: 70px;
    width: auto;
    display: block;
}

body.chat-started .topbar-brand {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 800px) {
    .topbar-logo {
        height: 52px;
    }
}

body.eventi-page .topbar-brand,
body.partner-page .topbar-brand,
body.chisiamo-page .topbar-brand,
body.login-page .topbar-brand {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

body.eventi-page header.topbar,
body.partner-page header.topbar,
body.chisiamo-page .topbar-brand,
body.login-page header.topbar {
    background: linear-gradient(180deg, rgba(236,0,140,0.82) 0%, rgba(236,0,140,0.18) 100%);
    backdrop-filter: blur(10px);
}

.site-footer {
    margin-top: auto;
    padding: 36px 24px;
    /* 🔥 gradiente coerente con il sito */
    background: linear-gradient( 180deg, rgba(236,0,140,0.95) 0%, rgba(150,15,60,0.98) 100% );
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.18);
}


.footer-brand {
    max-width: 280px;
}



.footer-tagline {
    font-size: 13px;
    opacity: .8;
}

.  

@media (max-width: 800px) {

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

html, body {
    height: 100%;
}

form {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

#MainContent {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== LOGIN PREMIUM ===== */

body.login-page #MainContent {
    display: block;
}

body.login-page .login-hero {
    min-height: calc(100vh - 190px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 20px 56px;
}

body.login-page .login-shell {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

body.login-page .login-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

body.login-page .login-brand-logo {
    width: 170px;
    max-width: 50vw;
    height: auto;
    display: block;
}

body.login-page .login-card {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 24px 60px rgba(0,0,0,0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

    body.login-page .login-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 45%, rgba(255,255,255,0.10) 100%);
        pointer-events: none;
    }

body.login-page .login-card-inner {
    position: relative;
    z-index: 1;
    padding: 36px 34px 32px;
}

body.login-page .login-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
}

body.login-page .login-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: 34px;
    line-height: 1.08;
    font-weight: 800;
}

body.login-page .login-subtitle {
    margin: 0 0 24px;
    color: rgba(255,255,255,0.88);
    font-size: 16px;
    line-height: 1.5;
}

body.login-page .login-form-group {
    margin-bottom: 18px;
}

body.login-page .login-label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

body.login-page input.login-input,
body.login-page textarea.login-input,
body.login-page select.login-input {
    display: block;
    width: 100% !important;
    height: 56px !important;
    padding: 0 16px !important;
    border: 1px solid rgba(255,255,255,0.24) !important;
    border-radius: 15px !important;
    background: rgba(255,255,255,0.96) !important;
    color: #1f1f1f !important;
    font-size: 15px !important;
    line-height: 56px;
    outline: none !important;
    box-sizing: border-box !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 6px 16px rgba(0,0,0,0.08);
    transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

    body.login-page input.login-input:focus,
    body.login-page textarea.login-input:focus,
    body.login-page select.login-input:focus {
        border-color: rgba(255,255,255,0.85) !important;
        box-shadow: 0 0 0 4px rgba(255,255,255,0.12), 0 6px 16px rgba(0,0,0,0.10) !important;
    }

body.login-page input.login-btn,
body.login-page button.login-btn,
body.login-page .login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 56px !important;
    margin-top: 10px;
    border: 0 !important;
    border-radius: 15px !important;
    background: linear-gradient(180deg, #141414 0%, #050505 100%) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(0,0,0,0.22);
    transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}

    body.login-page input.login-btn:hover,
    body.login-page button.login-btn:hover,
    body.login-page .login-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 34px rgba(0,0,0,0.26);
        opacity: .98;
    }

body.login-page .login-error {
    display: block;
    min-height: 22px;
    margin-top: 14px;
    color: #fff4f4;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 767px) {
    body.login-page .login-hero {
        min-height: calc(100vh - 160px);
        padding: 28px 16px 40px;
    }

    body.login-page .login-card-inner {
        padding: 28px 22px 24px;
    }

    body.login-page .login-title {
        font-size: 28px;
    }

    body.login-page .login-brand-logo {
        width: 138px;
    }
}

/* GRID LOGIN */

.login-form-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 14px 18px;
    margin-bottom: 20px;
}

.login-row {
    display: contents;
}

.login-col-label {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #fff;
    font-size: 14px;
}

.login-col-input {
    display: flex;
}

.login-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    border: none;
    outline: none;
    font-size: 14px;
    background: rgba(255,255,255,0.95);
}

/* responsive */

@media (max-width: 600px) {

    .login-form-grid {
        grid-template-columns: 1fr;
    }

    .login-col-label {
        margin-bottom: 4px;
    }
}

.login-actions {
    margin-top: 20px;
    text-align: center;
}

.login-btn-modern {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg,#000000,#333333);
    color: white;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    letter-spacing: .4px;
    transition: all .25s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
}

    .login-btn-modern:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 30px rgba(0,0,0,.35);
        background: linear-gradient(135deg,#111,#444);
    }

.ai-disclaimer {
    max-width: 920px;
    margin: 0 auto 28px auto;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.ai-disclaimer-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.ai-disclaimer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

    .ai-disclaimer-content p {
        margin: 0;
        color: #fff;
        font-size: 15px;
        line-height: 1.5;
        flex: 1;
    }

.btn-feedback {
    border: none;
    border-radius: 14px;
    padding: 12px 22px;
    background: #f2f2f2;
    color: #5a2547;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}

    .btn-feedback:hover {
        transform: translateY(-1px);
        background: #ffffff;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
    }

    .btn-feedback:active {
        transform: translateY(0);
    }

@media (max-width: 768px) {
    .ai-disclaimer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-feedback {
        align-self: flex-end;
    }
}


@media (max-width: 800px) {
    .ai-disclaimer {
        margin: 12px auto 16px;
        padding: 12px 14px;
        border-radius: 14px;
    }

        .ai-disclaimer p {
            font-size: 13px;
        }
}

/* ===== EVENT FILTER ===== */

.event-filter {
    width: min(1100px,100%);
    margin: 20px auto 26px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 26px rgba(0,0,0,.12);
}

.event-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.filter-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    background: rgba(255,255,255,0.95);
}


.filter-input-mess {
    width: 100%;
    padding: 0 12px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    background: rgba(255,255,255,0.95);
}

.filter-btn {
    height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg,#000,#333);
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
    transition: all .2s ease;
}

    .filter-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(0,0,0,.35);
    }

@media (max-width: 800px) {

    .event-filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        margin-top: 8px;
    }
}

.topbar-page-pill {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
    backdrop-filter: blur(8px);
}

.drawer-item.is-active {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.24);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

    .drawer-item.is-active::before {
        content: "";
        width: 4px;
        height: 22px;
        border-radius: 999px;
        background: #fff;
        display: inline-block;
        margin-right: 6px;
    }

@media (max-width: 800px) {
    .topbar-page-pill {
        display: none;
    }
}

html {
    scroll-behavior: smooth;
}

body.chat-started {
    overflow-anchor: none;
}

/* ===== PAGINA IA SOLO WIDGET ===== */

body.ia-page #MainContent {
    display: block;
}

body.ia-page .memori-page {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 8px 28px 28px;
}

body.ia-page .memori-page__inner {
    min-height: calc(100vh - 180px);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 42px rgba(0,0,0,0.18);
}

/* il web component deve occupare tutto */
body.ia-page memori-client {
    display: block;
    width: 100%;
    min-height: calc(100vh - 180px);
}

/* nascondo roba legacy della vecchia chat solo nella pagina IA */
body.ia-page .hero,
body.ia-page .chat,
body.ia-page .composer,
body.ia-page .partner-cta {
    display: none !important;
}

/* footer un po' più vicino */
body.ia-page .site-footer {
    margin-top: 26px;
}

@media (max-width: 800px) {
    body.ia-page .memori-page {
        padding: 6px 14px 18px;
    }

    body.ia-page .memori-page__inner {
        min-height: calc(100vh - 130px);
        border-radius: 18px;
    }

    body.ia-page memori-client {
        min-height: calc(100vh - 130px);
    }
}

body.geolocalizza-page .topbar-brand {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

body.geolocalizza-page header.topbar {
    background: linear-gradient(180deg, rgba(236,0,140,0.82) 0%, rgba(236,0,140,0.18) 100%);
    backdrop-filter: blur(10px);
}

body.contatti-page .topbar-brand {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.contatti-page-wrap {
    color: #fff;
    margin-bottom: 60px;
}

    .contatti-page-wrap .lead {
        color: #fff;
        font-size: 20px;
        font-weight: 500;
        font-style: italic;
        text-align: center;
        opacity: 0.95;
        margin: 0 auto 24px;
        max-width: 780px;
        display: block;
    }

    .contatti-page-wrap .contatti-page {
        max-width: 860px;
        margin: 0 auto;
        padding: 0 0 40px;
    }

.contatti-form label {
    color: #000 !important;
}

/* ===== DESKTOP: menu sinistro sempre aperto ===== */
@media (min-width: 801px) {
    .page {
        margin-left: 320px;
        width: calc(100% - 320px);
    }

    

    .topbar-page-pill {
        display: none !important;
    }

    .drawer {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 320px;
        max-width: 320px;
        transform: none !important;
        padding: 18px 14px 22px;
        display: flex;
        flex-direction: column;
        gap: 0;
        z-index: 120;
    }

    .drawer-head {
        padding-bottom: 18px;
    }

    .drawer-close,
    .overlay {
        display: none !important;
    }

    .drawer-menu {
        display: flex;
        flex-direction: column;
        gap: 6px;
        flex: 1 1 auto;
        min-height: 0;
    }

    .drawer-bottom {
        margin-top: auto;
        padding-top: 18px;
    }

    .drawer-partner {
        padding: 14px 12px;
        border-radius: 16px;
        background: rgba(255,255,255,0.14);
        border: 1px solid rgba(255,255,255,0.20);
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .drawer-partner-title {
        color: #fff;
        font-weight: 800;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .drawer-partner .hand {
        width: 120px;
        max-width: 120px;
        height: auto;
        display: block;
        margin: 8px auto 14px;
        flex: 0 0 auto;
    }

    .drawer-partner-btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 0;
    }

    .topbar {
        padding-left: 0;
    }

    #btnMenu {
        display: none;
    }
}

footer:not(.site-footer) {
    display: none;
}

.btn-pill {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 14px;
    background: #e9e9e9;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-pill:hover {
        background: #f3f3f3;
        transform: translateY(-1px);
    }

    .btn-pill:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }


.admin-social {
    margin-top: auto; /* spinge i link in fondo alla sidebar */
    padding: 1.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12); /* divisore sottile */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-social-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.82rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

    .admin-social-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.08);
    }



.drawer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin: 8px 16px;
}

.drawer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: inherit;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

    .drawer-social-link:hover,
    .drawer-social-link:focus {
        background: rgba(255,255,255,0.25);
        transform: scale(1.1);
    }

.drawer-item--admin {
    margin-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 16px;
    opacity: 0.75;
    font-size: 0.85em;
    letter-spacing: 0.03em;
}

    .drawer-item--admin:hover {
        opacity: 1;
    }




* --- Icone nel menu drawer --- */
.drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.drawer-item:hover .drawer-icon,
.drawer-item.is-active .drawer-icon {
    opacity: 1;
}

/* --- Separatore "Gestione" prima dell'area admin --- */
.drawer-admin-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 8px;
    padding: 0 4px;
}

    .drawer-admin-separator::before,
    .drawer-admin-separator::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(255, 255, 255, 0.18);
    }

.drawer-admin-separator-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.45;
    white-space: nowrap;
}

/* --- Voce admin (leggermente distinta) --- */
.drawer-item--admin {
    opacity: 0.7;
    font-size: 0.88em;
}

    .drawer-item--admin:hover {
        opacity: 1;
    }

/* --- Social icons centrati --- */
.drawer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin: 12px 16px;
}

.drawer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

    .drawer-social-link:hover,
    .drawer-social-link:focus {
        background: rgba(255, 255, 255, 0.22);
        transform: scale(1.1);
    }

.topbar-brand::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 12px);
    transform: translateX(-50%);
    width: 220px;
    height: 1px;
    background: rgba(255,255,255,0.20);
    border-radius: 999px;
}


@media (min-width: 801px) {
    body.chat-started .composer {
        position: fixed;
        bottom: 12px;
        left: calc(320px + ((100vw - 320px) / 2));
        right: auto;
        transform: translateX(-50%);
        width: min(900px, calc(100vw - 320px - 28px));
        max-width: 900px;
        margin: 0;
    }
}

/* ── Drawer mobile: scroll interno + spazio sicuro in fondo ── */
@media (max-width: 800px) {
    .drawer {
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .drawer-bottom {
        flex-shrink: 0;
        padding-bottom: 16px;
    }

    .drawer-partner .hand {
        width: 80px;
        max-width: 80px;
    }
}

/* ── Blocco partner interamente cliccabile ── */
.drawer-partner--link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    padding: 14px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.20);
    transition: background 0.2s, opacity 0.2s;
    width: 100%;
}

    .drawer-partner--link:hover {
        background: rgba(255,255,255,0.22);
        opacity: 0.92;
    }

    .drawer-partner--link .drawer-partner-title {
        color: #fff;
        font-weight: 800;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .drawer-partner--link .hand {
        width: 80px; /* ← riduci da 120px a 80px */
        max-width: 80px;
        height: auto;
        display: block;
        margin: 6px auto 10px;
    }

    .drawer-partner--link .btn-partner {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 0;
        pointer-events: none; /* il click è gestito dall'<a> padre */
    }

