:root {
    --dc-global-color-primary: #0B0347;
    --dc-global-color-secondary: #FF3E06;
    --dc-global-color-text: #000000;
    --dc-global-color-accent: #FF3E06;
    --dc-global-color-16533ab: #F9F9F9;
    --dc-global-color-f832085: #FFD7CB;
    --dc-global-color-4e5ad31: #FF025D;
    --dc-global-color-f5f27a8: #FFE8F0;
    --dc-global-color-e0cd32b: #0029FF;
    --dc-global-color-aabcfd7: #C1D9FF;
    --dc-global-color-abe3fc2: #00FE53;
    --dc-global-color-2c798b2: #C2FFCE;
    --dc-global-color-4f85c19: #FFBB00;
    --dc-global-color-158032e: #EBEAF0;
    --dc-global-color-54fb3a1: #3F7CF6;
    --dc-global-color-139a34a: #EFF4FF;
    --dc-global-color-88cdb8c: #818084;
    --dc-global-color-8f2a077: #FFFFFF;
    --dc-global-color-1e13de2: #FFF3F0;
    --dc-global-color-1241a71: #00000010;
    --dc-global-color-da902f0: #626262;
    --dc-global-color-c74d3c0: #02010100;
    --dc-global-color-271a3b4: #F9FAFB;
    --dc-global-color-7f953a2: #28023E;
    --dc-global-color-c257f1e: #F8ECFF;
    --dc-global-color-acdaff2: #10069F;
    --dc-global-color-59242ec: #F2F6FF;

    --dc-global-typography-primary-font-family: "Inter";
    --dc-global-typography-primary-font-weight: 600;
    --dc-global-typography-secondary-font-family: "Space Grotesk";
    --dc-global-typography-secondary-font-weight: 400;
    --dc-global-typography-text-font-family: "Inter";
    --dc-global-typography-text-font-size: 16px;
    --dc-global-typography-text-font-weight: 400;
    --dc-global-typography-accent-font-family: "Inter";
    --dc-global-typography-accent-font-weight: 600;

    /* --- alias semantici derivati dalla palette --- */
    --navy: var(--dc-global-color-primary);
    --navy-deep: #070230;
    --orange: var(--dc-global-color-accent);
    --magenta: var(--dc-global-color-4e5ad31);
    --blue: var(--dc-global-color-e0cd32b);
    --blue-soft: var(--dc-global-color-54fb3a1);
    --green: var(--dc-global-color-abe3fc2);
    --yellow: var(--dc-global-color-4f85c19);
    --ink: var(--dc-global-color-text);
    --muted: var(--dc-global-color-da902f0);
    --line: var(--dc-global-color-158032e);
    --paper: var(--dc-global-color-8f2a077);
    --cream: var(--dc-global-color-271a3b4);
    --peach: var(--dc-global-color-f832085);
    --peach-bg: var(--dc-global-color-1e13de2);
    --sky-bg: var(--dc-global-color-139a34a);
    --pink-bg: var(--dc-global-color-f5f27a8);

    --radius: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;
    --shadow-sm: 0 2px 10px rgba(11, 3, 71, .06);
    --shadow-md: 0 12px 30px rgba(11, 3, 71, .10);
    --shadow-lg: 0 26px 60px rgba(11, 3, 71, .18);
    --maxw: 1180px;
    --ease: cubic-bezier(.22, .61, .36, 1);

    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

/* ============================ reset ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "Inter", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ============================ layout ============================ */
.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: "Space Grotesk", sans-serif; font-weight: 600;
    font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--orange);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--orange); }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); color: var(--navy); margin: 14px 0 12px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }

/* ============================ buttons ============================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px 24px; border: 2px solid transparent; border-radius: var(--radius-pill);
    font-family: "Inter", sans-serif; font-weight: 600; font-size: .98rem;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, color .18s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 10px 22px rgba(255, 62, 6, .28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(255, 62, 6, .36); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-light:hover { border-color: var(--navy); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }

.form-msg {
    margin: 1rem 0;
    padding: 1rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.error {
    background-color: var(--dc-global-color-accent);
    color: #fff;
}

.success {
    background-color: #04b544;
    color:#fff;
}

/* ============================ header ============================ */
.site-header, .dashboard-site-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(249, 250, 251, .82);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav {
    display: flex; align-items: center; gap: 26px;
    height: 74px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-image {
    display: block;
    width: 200px;
    height: auto;
}
.brand__mark {
    width: 40px; height: 40px; border-radius: 12px; flex: none;
    background: var(--navy); color: var(--orange);
    display: grid; place-items: center; box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
.brand__mark::after {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 30% 30%, var(--orange) 2px, transparent 2.5px),
        radial-gradient(circle at 70% 65%, var(--magenta) 2px, transparent 2.5px),
        radial-gradient(circle at 45% 78%, var(--green) 1.6px, transparent 2px);
    opacity: .9;
}
.brand__mark svg { position: relative; z-index: 1; }
.brand__name { font-family: "Space Grotesk", sans-serif; font-size: 1.22rem; color: var(--navy); letter-spacing: -.02em; }
.brand__name b { color: var(--orange); }
.nav__links { display: flex; gap: 6px; margin-left: 8px; }
.nav__links a {
    padding: 9px 14px; border-radius: var(--radius-pill);
    color: var(--navy); font-weight: 500; font-size: .96rem;
    transition: background .15s, color .15s;
}
.nav__links a:hover { background: var(--sky-bg); color: var(--blue); }
.nav__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cart-btn {
    position: relative; width: 44px; height: 44px; border-radius: 12px;
    background: #fff; border: 1px solid var(--line); color: var(--navy);
    display: grid; place-items: center; transition: border-color .15s, transform .15s;
}
.cart-btn:hover { border-color: var(--navy); transform: translateY(-1px); }
.cart-btn__count {
    position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px;
    background: var(--magenta); color: #fff; border-radius: 999px;
    font-size: .72rem; font-weight: 700; display: grid; place-items: center;
    border: 2px solid var(--cream);
}
/* Il menu a comparsa: il bottone sta sempre lì, a sinistra del carrello, e
   apre un pannello ancorato sotto di sé. Prima era un hamburger da telefono
   che non apriva niente. */
.nav__menu { position: relative; }

.nav__toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px; border: 1px solid var(--line);
    background: #fff; border-radius: 12px; color: var(--navy);
    cursor: pointer; transition: border-color .15s, transform .15s;
}
.nav__toggle:hover { border-color: var(--navy); transform: translateY(-1px); }
.nav__toggle[aria-expanded="true"] { border-color: var(--navy); background: var(--sky-bg); }

.nav__panel {
    position: absolute; right: 0; top: calc(100% + 10px);
    min-width: 232px; padding: 8px; z-index: 60;
    background: #fff; border: 1px solid var(--line);
    border-radius: 16px; box-shadow: 0 18px 40px rgba(20, 20, 45, .14);
    display: grid; gap: 2px;
}
/* `hidden` da solo perderebbe contro il `display: grid` qui sopra. */
.nav__panel[hidden] { display: none; }

.nav__panel a {
    display: block; padding: 10px 12px; border-radius: 10px;
    color: var(--navy); font-weight: 500; font-size: .95rem;
    transition: background .15s, color .15s;
}
.nav__panel a:hover { background: var(--sky-bg); color: var(--blue); }
.nav__panel-primary { font-weight: 700; color: var(--blue); }

.nav__panel-group + .nav__panel-group {
    margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line);
}

/* Per chi non è loggato le voci pubbliche sono già in orizzontale: nel
   pannello servono solo quando quella riga sparisce, sotto i 620px. */
.nav__panel-group--stretta { display: none; }

@media (max-width: 620px) {
    .nav__panel-group--stretta { display: block; }
}

/* ============================ hero ============================ */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(680px 380px at 88% -8%, rgba(255, 62, 6, .32), transparent 60%),
        radial-gradient(560px 360px at 5% 108%, rgba(0, 41, 255, .35), transparent 60%);
}
/* filo di bandierine — segno distintivo della sagra */
.bunting { position: absolute; top: 0; left: 0; right: 0; height: 34px; display: flex; z-index: 2; opacity: .95; }
.bunting span {
    flex: 1; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent;
    border-top: 22px solid var(--orange);
    filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .18));
    transform-origin: top;
    animation: sway 4s var(--ease) infinite alternate;
}
.bunting span:nth-child(4n+1) { border-top-color: var(--orange); }
.bunting span:nth-child(4n+2) { border-top-color: var(--magenta); }
.bunting span:nth-child(4n+3) { border-top-color: var(--yellow); }
.bunting span:nth-child(4n+4) { border-top-color: var(--green); }
.bunting span:nth-child(odd) { animation-delay: -1.5s; }
@keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }

.hero__inner {
    position: relative; z-index: 3;
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center;
    padding-top: 84px; padding-bottom: 92px;
}
.hero__badge {
    display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px;
    padding: 7px 15px 7px 9px; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
    font-size: .84rem; color: #fff;
}
.hero__badge b { color: var(--yellow); }
.hero__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(0, 254, 83, .18); }
.hero h1 {
    font-size: clamp(2.5rem, 5.6vw, 4.15rem); letter-spacing: -.03em;
    line-height: 1.02;
}
.hero h1 .mark { color: var(--orange); position: relative; white-space: nowrap; }
.hero h1 .mark::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .12em;
    background: var(--magenta); border-radius: 4px; transform: scaleX(0);
    transform-origin: left; animation: underline .7s .5s var(--ease) forwards;
}
@keyframes underline { to { transform: scaleX(1); } }
.hero__sub { margin: 22px 0 30px; font-size: 1.16rem; color: rgba(255, 255, 255, .82); max-width: 34ch; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 30px; margin-top: 40px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero__stats div b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 1.7rem; color: #fff; }
.hero__stats div span { font-size: .86rem; color: rgba(255, 255, 255, .6); }

/* mock "cassa" nella hero */
.hero__mock {
    background: #fff; color: var(--ink); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); overflow: hidden; transform: rotate(1.4deg);
    transition: transform .4s var(--ease);
}
.hero__mock:hover { transform: rotate(0); }
.mock__bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; background: var(--navy); }
.mock__bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.mock__bar i:first-child { background: var(--orange); }
.mock__bar span { margin-left: auto; color: rgba(255, 255, 255, .7); font-size: .78rem; }
.mock__body { padding: 18px; }
.mock__row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--cream); margin-bottom: 9px; }
.mock__row b { font-size: .95rem; }
.mock__row span { color: var(--muted); font-size: .82rem; }
.mock__row em { font-style: normal; font-weight: 700; color: var(--navy); font-family: "Space Grotesk", sans-serif; }
.mock__chip { padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.chip-green { background: var(--green); color: #033; }
.chip-orange { background: var(--peach); color: #7a2600; }
.mock__total { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; padding: 15px 14px; border-radius: 12px; background: var(--navy); color: #fff; }
.mock__total b { font-family: "Space Grotesk", sans-serif; font-size: 1.4rem; }

/* ============================ loghi / fiducia ============================ */
.trust { padding-block: 30px; border-bottom: 1px solid var(--line); }
.trust__row { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; justify-content: center; }
.trust__row span { color: var(--muted); font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.trust__logo { font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--navy); opacity: .55; font-size: 1.05rem; }

/* ============================ features ============================ */
.features { background: var(--paper); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat {
    padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--line);
    background: var(--cream); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.feat__ico {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    margin-bottom: 16px; color: #fff;
}
.feat:nth-child(1) .feat__ico { background: var(--orange); }
.feat:nth-child(2) .feat__ico { background: var(--blue); }
.feat:nth-child(3) .feat__ico { background: var(--magenta); }
.feat:nth-child(4) .feat__ico { background: var(--navy); }
.feat:nth-child(5) .feat__ico { background: var(--yellow); color: #4a3600; }
.feat:nth-child(6) .feat__ico { background: #04b544; }
.feat h3 { font-size: 1.18rem; color: var(--navy); margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: .96rem; }

/* ============================ pricing / e-commerce ============================ */
.pricing { background: var(--sky-bg); }
.toggle {
    display: inline-flex; gap: 4px; padding: 4px; margin: 0 auto 40px;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
}
.toggle button {
    border: 0; background: transparent; padding: 9px 20px; border-radius: 999px;
    font-weight: 600; color: var(--muted); font-size: .92rem; transition: .18s;
}
.toggle button.is-active { background: var(--navy); color: #fff; }
.toggle .save { color: var(--magenta); font-size: .78rem; margin-left: 5px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan {
    display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--line); padding: 30px 26px; position: relative;
    transition: transform .2s var(--ease), box-shadow .2s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.plan--featured { border: 2px solid var(--orange); box-shadow: var(--shadow-md); }
.plan__flag {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--orange); color: #fff; font-size: .74rem; font-weight: 700;
    padding: 5px 14px; border-radius: 999px; letter-spacing: .04em; white-space: nowrap;
}
.plan__name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.plan__desc { color: var(--muted); font-size: .9rem; margin: 6px 0 18px; min-height: 40px; }
.plan__price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.plan__price b { font-family: "Space Grotesk", sans-serif; font-size: 2.6rem; color: var(--navy); letter-spacing: -.03em; }
.plan__price s { color: var(--muted); font-size: 1rem; }
.plan__per { color: var(--muted); font-size: .85rem; margin-bottom: 22px; }
.plan__list { display: grid; gap: 11px; margin-bottom: 26px; }
.plan__list li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; }
.plan__list li svg { flex: none; margin-top: 2px; color: #04b544; }
.plan__list li.off { color: var(--muted); }
.plan__list li.off svg { color: var(--muted); }
.plan .btn { margin-top: auto; }

/* ============================ come funziona ============================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; padding: 28px 24px; background: var(--cream); border-radius: var(--radius-lg); border: 1px solid var(--line); }
.step__n {
    counter-increment: s; font-family: "Space Grotesk", sans-serif; font-weight: 700;
    font-size: 1rem; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--navy); color: var(--orange); margin-bottom: 16px;
}
.step__n::before { content: counter(s, decimal-leading-zero); }
.step h3 { font-size: 1.12rem; color: var(--navy); margin-bottom: 7px; }
.step p { color: var(--muted); font-size: .95rem; }

/* ============================ CTA finale ============================ */
.cta-band { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.cta-band::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(600px 300px at 80% 120%, rgba(255, 62, 6, .3), transparent 60%);
}
.cta-band__inner { position: relative; text-align: center; max-width: 640px; margin-inline: auto; }
.cta-band h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 14px; }
.cta-band p { color: rgba(255, 255, 255, .78); margin-bottom: 28px; font-size: 1.08rem; }

/* ============================ footer ============================ */
.footer, .dashboard-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .72); padding-block: 56px 30px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; }
.footer .brand__name { color: #fff; }
.footer p { font-size: .92rem; margin-top: 14px; max-width: 34ch; color: rgba(255, 255, 255, .6); }
.footer h4 { color: #fff; font-family: "Space Grotesk", sans-serif; font-size: .95rem; margin-bottom: 14px; }
.footer li { margin-bottom: 9px; }
.footer a { font-size: .92rem; transition: color .15s; }
.footer a:hover { color: var(--orange); }
.footer__bottom, .dashboard-footer__bottom {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .84rem; color: rgba(255, 255, 255, .5);
}

/* ============================ auth (login/registrazione) ============================ */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth__aside { position: relative; background: var(--navy); color: #fff; padding: 54px; overflow: hidden; display: flex; flex-direction: column; }
.auth__aside::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(500px 320px at 90% 10%, rgba(255, 62, 6, .3), transparent 60%),
        radial-gradient(460px 300px at 0% 100%, rgba(0, 41, 255, .38), transparent 60%);
}
.auth__aside > * { position: relative; z-index: 1; }
.auth__quote { margin-top: auto; }
.auth__quote p { font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; line-height: 1.3; margin-bottom: 18px; }
.auth__quote footer { color: rgba(255, 255, 255, .65); font-size: .92rem; }
.auth__facts { display: flex; gap: 26px; margin-top: 30px; }
.auth__facts b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; }
.auth__facts span { font-size: .82rem; color: rgba(255, 255, 255, .6); }

.auth__main { display: grid; place-items: center; padding: 40px 24px; background: var(--cream); }
.auth__card { width: min(100%, 420px); }
.auth__card > .brand { margin-bottom: 30px; }
.auth__card h1 { font-size: 1.9rem; color: var(--navy); margin-bottom: 8px; }
.auth__card .lead { color: var(--muted); margin-bottom: 28px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; color: var(--navy); margin-bottom: 7px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 13px 15px; font: inherit; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
    transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #a6a6ab; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 41, 255, .1); }
.field--icon { position: relative; }
.field--icon input { padding-right: 46px; }
.field__toggle {
    position: absolute; right: 8px; top: 33px; width: 34px; height: 34px; border: 0; background: transparent;
    color: var(--muted); display: grid; place-items: center; border-radius: 8px;
}
.field__toggle:hover { background: var(--line); color: var(--navy); }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.strength { height: 5px; border-radius: 999px; background: var(--line); margin-top: 8px; overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .25s, background .25s; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: 4px 0 20px; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--orange); flex: none; }
.check a { color: var(--blue); font-weight: 600; }
.auth__meta { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 20px; font-size: .9rem; }
.auth__meta a { color: var(--blue); font-weight: 600; }

.divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: var(--muted); font-size: .84rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oauth .btn { border: 1.5px solid var(--line); background: #fff; color: var(--navy); font-weight: 600; }
.oauth .btn:hover { border-color: var(--navy); }
.auth__switch { text-align: center; margin-top: 26px; color: var(--muted); font-size: .94rem; }
.auth__switch a { color: var(--orange); font-weight: 700; }

/* ============================ checkout ============================ */
.shop { padding-block: 48px 90px; }
.shop__head { margin-bottom: 30px; }
.shop__head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--navy); }
.shop__head p { color: var(--muted); margin-top: 8px; }
.checkout { display: grid; grid-template-columns: 1.4fr .85fr; gap: 30px; align-items: start; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; margin-bottom: 20px; }
.panel__title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.panel__title span {
    width: 30px; height: 30px; border-radius: 9px; background: var(--navy); color: var(--orange);
    display: grid; place-items: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: .9rem; flex: none;
}
.panel__title h3 { font-size: 1.18rem; color: var(--navy); }

.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.pay-methods label {
    display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px;
    border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer;
    font-weight: 600; font-size: .9rem; color: var(--navy); transition: .15s;
}
.pay-methods input { display: none; }
.pay-methods input:checked + label { border-color: var(--orange); background: var(--peach-bg); }

/* riepilogo carrello */
.summary { position: sticky; top: 94px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.summary__head { padding: 20px 24px; background: var(--navy); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.summary__head h3 { font-size: 1.1rem; }
.summary__head span { font-size: .82rem; color: rgba(255, 255, 255, .7); }
.summary__body { padding: 20px 24px; }
.line-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-item__ico { width: 46px; height: 46px; border-radius: 12px; background: var(--sky-bg); color: var(--blue); display: grid; place-items: center; flex: none; }
.line-item__ico.o { background: var(--peach-bg); color: var(--orange); }
.line-item__ico.m { background: var(--pink-bg); color: var(--magenta); }
.line-item b { font-size: .95rem; color: var(--navy); }
.line-item span { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.line-item__price { margin-left: auto; font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--navy); white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: 6px; }
.qty button { width: 26px; height: 26px; border: 0; background: transparent; color: var(--navy); font-weight: 700; border-radius: 999px; }
.qty button:hover { background: var(--line); }
.qty b { min-width: 26px; text-align: center; font-family: "Inter", sans-serif; font-size: .88rem; }

.promo { display: flex; gap: 8px; margin: 18px 0; }
.promo input { flex: 1; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; }
.promo input:focus { outline: none; border-color: var(--blue); }
.promo .btn { padding: 11px 18px; }
.totals { display: grid; gap: 10px; margin: 4px 0 18px; }
.totals div { display: flex; justify-content: space-between; font-size: .93rem; color: var(--muted); }
.totals div.discount { color: #04b544; font-weight: 600; }
.totals div.grand { padding-top: 12px; border-top: 1px solid var(--line); color: var(--navy); font-weight: 700; font-size: 1.15rem; align-items: baseline; }
.totals div.grand b { font-family: "Space Grotesk", sans-serif; font-size: 1.6rem; }
.summary__foot { padding: 0 24px 24px; }
.secure { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 14px; color: var(--muted); font-size: .8rem; }

/* ============================ misc ============================ */
.badge-soft { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-green { background: var(--green); color: #044; }

/* ============================ responsive ============================ */
@media (max-width: 960px) {
    .hero__inner { grid-template-columns: 1fr; gap: 40px; }
    .hero__mock { max-width: 460px; }
    .feat-grid, .plans, .steps { grid-template-columns: 1fr 1fr; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .checkout { grid-template-columns: 1fr; }
    .summary { position: static; }
    .auth { grid-template-columns: 1fr; }
    .auth__aside { display: none; }
}
@media (max-width: 620px) {
    .nav__links { display: none; }
    .feat-grid, .plans, .steps, .footer__grid, .field__row, .pay-methods, .oauth { grid-template-columns: 1fr; }
    .hero__stats { flex-wrap: wrap; gap: 20px; }
    .section { padding-block: 52px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
/* ---- shell della pagina ---- */
.account { padding-block: 40px 90px; }
.account__head { margin-bottom: 30px; }
.account__head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--navy); }
.account__head p { color: var(--muted); margin-top: 8px; }

/* riga con avatar + dati utente */
.account__user { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.account__avatar {
  width: 58px; height: 58px; border-radius: 50%; flex: none;
  background: var(--navy); color: var(--orange);
  display: grid; place-items: center; font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 1.4rem; box-shadow: var(--shadow-sm);
}
.account__user b { display: block; color: var(--navy); font-size: 1.05rem; }
.account__user span { color: var(--muted); font-size: .92rem; }

/* ---- tab ---- */
.tabs { border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.tabs__list { display: flex; gap: 4px; }
.tab {
  position: relative; border: 0; background: transparent; cursor: pointer;
  padding: 14px 20px; border-radius: 12px 12px 0 0;
  font-family: "Inter", sans-serif; font-weight: 600; font-size: .98rem;
  color: var(--muted); transition: color .15s, background .15s;
}
.tab:hover { color: var(--navy); background: var(--sky-bg); }
.tab::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px;
  background: var(--orange); border-radius: 3px 3px 0 0;
  transform: scaleX(0); transform-origin: center; transition: transform .2s var(--ease);
}
.tab[aria-selected="true"] { color: var(--navy); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }

.tabpanel { animation: tab-in .25s var(--ease); }
.tabpanel[hidden] { display: none; }
@keyframes tab-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- riquadro generico ---- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; max-width: 620px;
}
.card + .card { margin-top: 20px; }
.card__title { font-size: 1.2rem; color: var(--navy); margin-bottom: 6px; }
.card__desc { color: var(--muted); font-size: .95rem; margin-bottom: 24px; }

/* ---- cambio password: form ---- */
.pwd-form .field:last-of-type { margin-bottom: 8px; }
.pwd-form .btn-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* regole password (checklist) */
.rules { display: grid; gap: 8px; margin: 6px 0 20px; }
.rules li { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--muted); }
.rules li svg { flex: none; color: var(--line); transition: color .15s; }
.rules li.ok { color: var(--navy); }
.rules li.ok svg { color: #04b544; }

/* ---- elenco licenze ---- */
.lic-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.lic-toolbar h2 { font-size: 1.2rem; color: var(--navy); }

.lic-list { --lic-gap: 14px; display: grid; gap: var(--lic-gap); }
.lic {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 22px; transition: box-shadow .2s var(--ease), border-color .2s;
}
.lic:hover { box-shadow: var(--shadow-md); border-color: transparent; }
.lic__ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.lic__ico.p1 { background: var(--orange); }
.lic__ico.p2 { background: var(--blue); }
.lic__ico.p3 { background: var(--magenta); }

.lic__body b { color: var(--navy); font-size: 1.05rem; }
.lic__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 6px; color: var(--muted); font-size: .88rem; }
.lic__meta span { display: inline-flex; align-items: center; gap: 6px; }
.lic__key {
  font-family: "Space Grotesk", monospace; font-size: .82rem; color: var(--navy);
  background: var(--cream); border: 1px dashed var(--line); border-radius: 8px;
  padding: 2px 8px; letter-spacing: .5px;
}

.lic__side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

/* stato licenza (pill) */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--active { background: var(--green); color: #046a2b; }
.status--expiring { background: #FFF3D6; color: #8a6100; }
.status--expired { background: var(--peach); color: #a23300; }

.lic__link { color: var(--blue); font-weight: 600; font-size: .88rem; }
.lic__link:hover { text-decoration: underline; }

/* Le azioni sulle licenze sono <button>, non <a>: cambiano stato, non pagina.
   Qui perdono l'aspetto da bottone e prendono quello dei link accanto a loro. */
button.lic__link {
  appearance: none; background: none; border: 0; padding: 0;
  font-family: inherit; cursor: pointer;
}
button.lic__link[disabled] { opacity: .5; cursor: progress; }
button.lic__link[aria-expanded="true"] { text-decoration: underline; }

/* La scheda con il pannello aperto perde gli angoli in basso: sotto continua. */
.lic:has(+ .lic__installs) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* Elenco delle installazioni, aperto sotto la riga della licenza.
   Deve leggersi come una continuazione di quella scheda, non come un blocco a
   sé: annulla il gap della griglia per attaccarsi, e riprende il raggio degli
   angoli della scheda invece di sceglierne uno suo. */
.lic__installs {
  margin-top: calc(var(--lic-gap, 14px) * -1);
  padding: 14px 22px 16px;
  border: 1px solid var(--line, #EBEAF0);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg, 22px) var(--radius-lg, 22px);
  background: var(--bg-soft, #F5F5F8);
}
.lic__installs > p { margin: 0; color: var(--muted); font-size: .9rem; }
.install {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 0;
}
.install + .install { border-top: 1px solid var(--line, #EBEAF0); }
.install__body b { font-size: .95rem; }
.install__warn { color: #FF3E06; font-weight: 600; }
.lic-empty { color: var(--muted); padding: 18px 0; }

@media (max-width: 720px) {
  .install { flex-wrap: wrap; }
  .install__body { flex: 1 1 100%; }
}

/* stato vuoto */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { color: var(--line); margin-bottom: 14px; }
.empty b { display: block; color: var(--navy); font-size: 1.05rem; margin-bottom: 6px; }

/* ---- responsive ---- */
@media (max-width: 620px) {
  .lic { grid-template-columns: 44px 1fr; }
  .lic__ico { width: 44px; height: 44px; }
  .lic__side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .tab { padding: 12px 14px; font-size: .92rem; }
  .pwd-form .btn-row .btn { width: 100%; }
}

.form-input-error {
    border-color: var(--dc-global-color-accent) !important;
}

/* --- Dashboard -- */

html.dashboard,
body.dashboard {
    height: 100%;
    min-height: 100vh;
}

body.dashboard {
    display: flex;
    flex-direction: column;
}

.dashboard-site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-nav {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.dashboard-nav > a {
    color: var(--dc-global-color-accent);
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 2px solid rgba(255, 255, 255, 0);
    transition: border-bottom-color 400ms ease;
    font-weight: 500;
}

.dashboard-nav > a:hover {
    border-bottom-color: var(--dc-global-color-accent);
}

.dashboard-footer {
    margin-top: auto;
}

.dashboard-brand {
    width: 20%;
}

.dashboard-brand-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.dashboard-section { padding-block: 40px 90px; }
.dashboard-section header { margin-bottom: 30px; }
.dashboard-section header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--navy); }
.dashboard-section header p { color: var(--muted); margin-top: 8px; }

.dashboard-loader {
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: none;
}

.dashboard-loader.show {
    display: flex;
}

.loader {
  width: 50px;
  aspect-ratio: 1;
  display:grid;
  mask: conic-gradient(from 15deg,#0000,#000);
  animation: l26 1s infinite steps(12);
}
.loader,
.loader:before,
.loader:after{
  background:
    radial-gradient(closest-side at 50% 12.5%,
     #f03355 96%,#0000) 50% 0/20% 80% repeat-y,
    radial-gradient(closest-side at 12.5% 50%,
     #f03355 96%,#0000) 0 50%/80% 20% repeat-x;
}
.loader:before,
.loader:after {
  content: "";
  grid-area: 1/1;
  transform: rotate(30deg);
}
.loader:after {
  transform: rotate(60deg);
}

@keyframes l26 {
  100% {transform:rotate(1turn)}
}

.summary__foot_text {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ===================== PRENOTAZIONI PUBBLICHE ===================== */

/* I turni sono radio button travestiti da schede: la scelta deve restare
   accessibile da tastiera e leggibile da uno screen reader, ma sul telefono
   deve essere un bersaglio grande, non un pallino da 12 pixel. */
.slots { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.slot {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border: 1.5px solid var(--line, #EBEAF0);
  border-radius: 12px; cursor: pointer; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.slot:hover { border-color: var(--blue, #3F7CF6); }
.slot input { position: absolute; opacity: 0; width: 0; height: 0; }
.slot:has(input:checked) {
  border-color: var(--blue, #3F7CF6);
  box-shadow: 0 0 0 3px rgba(63, 124, 246, .16);
}
/* Il focus da tastiera deve vedersi anche quando il radio è nascosto. */
.slot:has(input:focus-visible) { outline: 2px solid var(--blue, #3F7CF6); outline-offset: 2px; }

.slot__when { font-weight: 600; font-size: .95rem; text-transform: capitalize; }
.slot__left { color: var(--muted); font-size: .85rem; }

.slot--full { opacity: .55; cursor: not-allowed; }
.slot--full:hover { border-color: var(--line, #EBEAF0); }
.slot--full .slot__left { color: #FF3E06; font-weight: 600; }

.reservation__code {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px; border-radius: 12px; background: var(--bg-soft, #F5F5F8);
}
.reservation__code span {
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.reservation__code b { font-size: 1.9rem; letter-spacing: .12em; }

@media (max-width: 520px) {
  .slots { grid-template-columns: 1fr; }
  .reservation__code b { font-size: 1.5rem; }
}


/* ===================== REPORTING ===================== */

.report__totals {
  display: grid; gap: 12px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.report__tile {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--line, #EBEAF0); background: #fff;
}
.report__label {
  font-size: .75rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
}
.report__value { font-size: 1.5rem; line-height: 1.2; }
.report__hint { font-size: .78rem; color: var(--muted); }

.report__day { padding: 14px 0; }
.report__day + .report__day { border-top: 1px solid var(--line, #EBEAF0); }
.report__dayhead {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  align-items: baseline; justify-content: space-between;
  font-size: .92rem;
}
.report__dayhead span { color: var(--muted); }

/* La barra è un confronto fra serate, non una scala assoluta: senza un asse
   dichiarato non deve suggerire di essere leggibile in valore. */
.report__bar {
  height: 8px; margin: 8px 0; border-radius: 99px;
  background: var(--bg-soft, #F5F5F8); overflow: hidden;
}
.report__barfill { height: 100%; background: var(--blue, #3F7CF6); border-radius: 99px; }

.report__split { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.report__split .report__label { margin-right: 4px; }
.report__chip {
  display: inline-block; padding: 2px 9px; border-radius: 99px;
  background: var(--bg-soft, #F5F5F8); color: var(--muted);
  font-size: .8rem; white-space: nowrap;
}

.report__item {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  font-size: .92rem;
}
.report__item + .report__item { border-top: 1px solid var(--line, #EBEAF0); }
.report__itemname { flex: 1 1 auto; min-width: 0; }
.report__item b { margin-left: auto; white-space: nowrap; }

#reporting-body[aria-busy="true"] { opacity: .55; }

@media (max-width: 560px) {
  .report__value { font-size: 1.25rem; }
  .report__item { flex-wrap: wrap; gap: 6px 10px; }
  .report__itemname { flex: 1 1 100%; }
}
