/* ==================================================================
   Olos369 — design system del GUSCIO APP (theme layer del chrome)
   -------------------------------------------------------------------
   Ordine di caricamento nel guscio: bootstrap.min.css → olos-tokens.css
   → questo foglio. Bootstrap fa da fondamenta (Reboot, griglia,
   utilities, componenti); olos-tokens.css porta font e variabili;
   qui stanno gli stili del chrome (body, header, nav, card, bottoni,
   strumenti, store, footer, ecc.). RICHIEDE olos-tokens.css (usa le
   sue variabili). Le pagine immersive standalone NON caricano questo
   foglio: restano bespoke. In fondo: reconciliation con Bootstrap.
   ================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Jakarta', -apple-system, system-ui, "Segoe UI", sans-serif;
    margin: 0; color: var(--ink); -webkit-font-smoothing: antialiased;
    background: radial-gradient(1200px 420px at 72% -12%, rgba(109,40,217,.05), transparent 60%), var(--bg);
    /* Footer sempre in fondo anche con pagine corte */
    min-height: 100vh; display: flex; flex-direction: column;
}
/* Scelta di stile: mai sottolineature, né sui link né sui bottoni. I link
   restano riconoscibili dal colore di brand e, da tastiera, dall'outline di
   focus (che NON va rimosso: è l'unico segnale per chi naviga con Tab). */
a, a:hover, a:focus, a:active { color: var(--brand); text-decoration: none; }
.btn, .btn:hover, .btn:focus, .btn:active { text-decoration: none; }
h1 { font-size: 1.9rem; font-weight: 720; letter-spacing: -.024em; line-height: 1.2; }
h2 { font-size: 1.35rem; font-weight: 680; letter-spacing: -.014em; }
h3 { font-weight: 660; letter-spacing: -.008em; }
::selection { background: rgba(109,40,217,.14); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Nav principale ---- */
.topnav { background: rgba(255,255,255,.86); backdrop-filter: blur(14px) saturate(1.4);
          -webkit-backdrop-filter: blur(14px) saturate(1.4);
          border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topnav-inner { max-width: 1280px; margin: 0 auto; padding: .75rem 1.5rem;
                display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 760; font-size: 1.32rem;
        color: var(--ink); letter-spacing: -.025em; margin-right: 1.1rem; }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo span { color: var(--brand); }
.topnav a.nav { color: var(--muted); padding: .5rem .95rem; border-radius: 9px; font-size: .95rem; font-weight: 550; }
.topnav a.nav:hover { background: #f1f2f7; color: var(--ink); text-decoration: none; }
.topnav a.nav.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 620; }
.topnav .spacer { flex: 1; }

/* ---- Menu utente ---- */
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .6rem; cursor: pointer;
                     padding: .26rem .65rem .26rem .3rem; border-radius: 10px; transition: background .15s; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { background: #f1f2f7; }
.user-menu .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand);
                     color: #fff; display: flex; align-items: center; justify-content: center;
                     font-weight: 680; font-size: .84rem; }
.user-menu .user-txt { display: flex; flex-direction: column; line-height: 1.15; }
.user-menu .user-txt strong { font-size: .92rem; color: var(--ink); font-weight: 620; }
.user-menu .user-txt small { font-size: .73rem; color: var(--muted); text-transform: capitalize; }
.user-menu .chev { color: var(--muted); font-size: .6rem; transition: transform .15s; }
.user-menu[open] .chev { transform: rotate(180deg); }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff;
                   border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift);
                   padding: .4rem; min-width: 190px; z-index: 60; }
.user-menu .menu a { display: block; padding: .5rem .75rem; border-radius: 8px;
                     color: var(--ink); font-size: .89rem; font-weight: 530; }
.user-menu .menu a:hover { background: #f3f4f8; text-decoration: none; }
.user-menu .menu a.esci { color: var(--err); }
.user-menu .menu a.esci:hover { background: #fdf1f1; }
.user-menu .menu .sep { height: 1px; background: var(--line); margin: .35rem .4rem; }

/* ---- Sotto-menu admin: tab bar ---- */
.subnav { display: flex; align-items: center; gap: .1rem; flex-wrap: wrap;
          border-bottom: 1px solid var(--line); margin: 0 0 1.6rem; }
.subnav .lbl { font-weight: 700; font-size: .72rem; color: var(--muted); text-transform: uppercase;
               letter-spacing: .1em; padding: 0 .8rem 0 .1rem; }
.subnav a { color: var(--muted); padding: .68rem 1rem .72rem; font-size: .94rem; font-weight: 550;
            border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subnav a:hover { color: var(--ink); text-decoration: none; }
.subnav a.active { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 640; }
.subnav .sep { width: 1px; height: 1.05rem; background: var(--line); margin: 0 .5rem; }

main { max-width: 1340px; margin: 0 auto; padding: 1rem 1.5rem 5rem; width: 100%; box-sizing: border-box; flex: 1 0 auto; }

/* ---- Cards ---- */
/* display:block neutralizza il .card{display:flex} di Bootstrap; le classi
   che estendono .card e vogliono flex (es. .tool-card) lo re-dichiarano dopo. */
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 1.6rem 1.7rem; margin: 1.1rem 0; box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.3rem; }

/* ---- Bottoni ---- */
.btn { display: inline-block; background: var(--brand); color: #fff; padding: .68rem 1.4rem;
       border-radius: 10px; text-decoration: none; border: 0; font-size: .97rem; font-weight: 600;
       font-family: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(16,18,28,.1);
       transition: background .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; color: #fff; background: var(--brand-dark); box-shadow: 0 3px 10px rgba(91,33,182,.25); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid #d6d8e2; box-shadow: 0 1px 2px rgba(16,18,28,.05); }
/* color esplicito: senza, il color:#fff di .btn:hover renderebbe illeggibile
   il testo scuro del bottone secondario (stessa specificità, vince l'ordine). */
.btn.secondary:hover { background: #f6f6fa; color: var(--ink); border-color: #c4c7d4; box-shadow: none; }
.btn.small { padding: .38rem .85rem; font-size: .87rem; border-radius: 9px; }
.btn:focus-visible, a.nav:focus-visible, .subnav a:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

.muted { color: var(--muted); }
.flash { border-radius: 10px; padding: .8rem 1.1rem; margin: 1rem 0; font-size: .93rem; font-weight: 500; border: 1px solid; }
.flash.ok { background: #f0faf6; color: #115e45; border-color: #bce8d7; }
.flash.err { background: #fdf3f3; color: #982626; border-color: #f3cccc; }

/* ---- Tabelle ---- */
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: .72rem .7rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 640; font-size: .71rem; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #f8f8fb; }

/* ---- Form ---- */
label { display: block; margin: 1rem 0 .35rem; font-weight: 620; font-size: .9rem; }
/* Regola UI: gli input riempiono sempre il loro contenitore (w-100).
   La larghezza si limita col contenitore (card/box), non sul campo.
   Un singolo campo può ancora restringersi con uno style max-width locale.

   L'elenco copre TUTTI i campi in cui si scrive del testo, non solo quelli
   che c'erano il giorno in cui è stata scritta la regola: bastava aggiungere
   un type="url" da qualche parte perché quel campo uscisse col bordo grigio
   del browser in mezzo a tutti gli altri. Quando serve un type nuovo, va
   aggiunto qui.

   Restano fuori di proposito:
   - search  → nel progetto è sempre un componente a sé (icona, spaziatura
               diversa: .cerca-box, .mk-cat-filtro, .usearch), e questa regola
               gli darebbe solo fastidio;
   - color, range, file, checkbox, radio → non sono caselle di testo e hanno
               il loro aspetto dove servono;
   - button, submit, reset, image, hidden → non sono campi. */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=tel], input[type=date], input[type=time],
input[type=datetime-local], input[type=month], input[type=week],
textarea, select {
    width: 100%; box-sizing: border-box; padding: .66rem .85rem; border: 1px solid #d6d8e2;
    border-radius: 10px; font-size: .97rem; background: #fff; font-family: inherit; color: var(--ink);
    transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }

/* ---- Badge ---- */
/* color:var(--ink) neutralizza il testo bianco che Bootstrap forza su .badge
   senza modificatore; i modificatori (.ok/.warn/.err/.off) vincono comunque. */
.badge { display: inline-block; padding: .2rem .58rem; border-radius: 7px; font-size: .76rem; font-weight: 620; color: var(--ink); }
.badge.ok { background: #eaf7f2; color: var(--ok); }
.badge.off { background: #f0f1f5; color: var(--muted); }
.badge.warn { background: #fdf4e7; color: var(--warn); }
.badge.err { background: #fdf0f0; color: var(--err); }

/* ---- Copertine strumento ---- */
.tool-card { padding: 0; overflow: hidden; display: flex; flex-direction: column;
             transition: transform .15s, box-shadow .18s, border-color .18s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: #d6d8e2; }
.tool-card img.cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
                       filter: saturate(.78) contrast(.97); }
.tool-card .body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.tool-card h3 { margin: 0; font-size: 1.1rem; }
.tool-card .desc { color: var(--muted); font-size: .92rem; line-height: 1.55; flex: 1; }
.tool-header { display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap; margin: 1rem 0 .4rem; }
.tool-header img { width: 250px; max-width: 100%; border-radius: 10px; box-shadow: var(--shadow);
                   filter: saturate(.78) contrast(.97); }
.tool-header .info { flex: 1; min-width: 260px; }

/* ---- Tab unica degli strumenti: segmenti con sfondo chiaro sull'attiva ---- */
.tool-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 1.5rem 0 1.7rem; }
.tool-tab { border: 0; background: transparent; font-family: inherit; font-size: .96rem; font-weight: 600;
            color: var(--muted); padding: .5rem .95rem; border-radius: 9px; cursor: pointer;
            display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; transition: background .14s, color .14s; }
.tool-tab svg { opacity: .85; }
.tool-tab:hover { background: #f1f2f7; color: var(--ink); }
.tool-tab.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 720; }
.tool-tab.active svg { opacity: 1; }
.tool-tab:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.tool-panel[hidden] { display: none; }
.tool-panel .prose { line-height: 1.72; color: #3a4059; font-size: .97rem; }
.tool-panel .prose > *:first-child { margin-top: 0; }
.tool-panel .prose p { margin: 0 0 .9rem; }
.tool-panel .prose h2, .tool-panel .prose h3 { margin: 1.3rem 0 .5rem; color: var(--ink); }
.tool-panel .prose ul, .tool-panel .prose ol { margin: .4rem 0 1rem 1.2rem; }
.tool-panel .prose li { margin: .25rem 0; }
.tool-panel .prose a { color: var(--brand-dark); font-weight: 600; }

/* ---- Header strumento: card unica (icona a sx + colonna stato + tab integrate) ---- */
.tool-hero { margin: 1rem 0 1.2rem; }
.tool-hero .th-top { display: flex; gap: 1rem 1.3rem; align-items: center; flex-wrap: wrap; }
.tool-hero .th-main { display: flex; gap: 1rem; align-items: flex-start; flex: 1 1 420px; min-width: 260px; }
.tool-hero .th-icon { width: 108px; height: auto; aspect-ratio: 16 / 9; flex: none; border-radius: 11px;
             object-fit: cover; box-shadow: var(--shadow); }
.tool-hero .th-txt { min-width: 0; }
.tool-hero h1 { font-size: 1.5rem; margin: .1rem 0 .4rem; }
.tool-hero .th-desc { color: var(--muted); font-size: .94rem; line-height: 1.5; margin: 0;
             display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-hero .th-side { flex: 0 0 210px; display: flex; flex-direction: column; gap: .5rem;
             border-left: 1px solid var(--line); padding-left: 1.3rem; }
.tool-hero .th-stato { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin: 0 auto 0 0; }
.tool-hero .th-scad { font-size: .8rem; color: var(--muted); }
.tool-hero form { margin: 0; }
.tool-hero .th-renew { display: flex; flex-direction: column; align-items: center; gap: 0; width: auto;
             padding: .5rem 1.15rem; line-height: 1.18; }
.tool-hero .th-renew-big { font-size: 1rem; font-weight: 720; }
.tool-hero .th-renew-sub { font-size: .72rem; font-weight: 500; opacity: .88; }
.tool-hero .th-slot { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tool-hero .th-slot-lbl { font-size: .82rem; color: var(--muted); margin: 0; }
/* Barra comandi chiara in cima alla card (branding + nome sono nell'hero /my). */
.tool-hero .th-top { background: #f6f4fc; color: var(--ink); border-bottom: 1px solid #ece7f9;
             margin: -1.6rem -1.7rem 1.4rem; padding: .95rem 1.4rem; border-radius: 14px 14px 0 0; }
/* input + Compra uniti in un gruppo; il prezzo totale si aggiorna via JS */
/* input + Compra uniti in un gruppo. Non più solo dentro .tool-hero: il
   modulo d'acquisto vive nel componente slot_box, che ogni strumento mette
   dove vuole — e senza queste regole il campo quantità si allargava a tutta
   la riga. */
.th-slot-form { display: flex; margin: 0; }
.th-slot-form input { width: 58px; flex: none; padding: .42rem .4rem; text-align: center;
             border-radius: 9px 0 0 9px; border-right: 0; position: relative; }
.th-slot-form input:focus { z-index: 1; }
.th-slot-form .btn { white-space: nowrap; flex: none; border-radius: 0 9px 9px 0; }
.tool-hero .tool-tabs { margin: 1.3rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); }
/* Le sezioni di primo livello dentro .tool-hero sono box leggeri: bordo
   sottile e padding proprio (niente ombra, per non fare "card dentro card"
   pesanti). Griglie e card annidate restano. */
.tool-hero .tool-panels { margin-top: 1.4rem; }
.tool-hero .tool-panel > .card { border: 1px solid var(--line); box-shadow: none; border-radius: 12px;
             margin: 0 0 1.15rem; padding: 1.35rem 1.5rem; }
.tool-hero .tool-panel > .card:last-child { margin-bottom: 0; }
@media (max-width: 680px) {
    .tool-hero .th-side { flex-basis: 100%; border-left: 0; padding-left: 0;
             border-top: 1px solid var(--line); padding-top: 1rem; }
}

/* ---- "Crea nuovo" in bottone + modal (declutter delle view strumento) ---- */
.tool-create-row { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0 0 1.3rem; }
/* Titolo della sezione con l'azione "＋ Nuovo…" allineata a destra */
.tool-head-actions { display: flex; justify-content: space-between; align-items: center;
             gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem; }
.tool-head-actions > h2, .tool-head-actions > h3 { margin: 0; }
.tool-head-actions .tool-create-row { margin: 0; }
dialog.tool-create-dlg { border: 0; border-radius: 16px; padding: 1.4rem 1.6rem 1.6rem;
             width: min(920px, 95vw); max-height: 90vh; overflow: auto;
             box-shadow: 0 30px 80px -22px rgba(16,18,28,.5); background: #fff; }
dialog.tool-create-dlg::backdrop { background: rgba(20,22,32,.5); backdrop-filter: blur(3px); }
.tool-create-dlg .dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
details.guida { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
                margin: .8rem 0; box-shadow: var(--shadow); }
details.guida summary { cursor: pointer; padding: .95rem 1.25rem; font-weight: 620; color: var(--brand-dark); list-style: none; }
details.guida summary::before { content: '▸ '; color: var(--brand-2); transition: .15s; }
details.guida[open] summary::before { content: '▾ '; }
details.guida .contenuto { padding: 0 1.25rem 1.05rem; color: #3d4152; line-height: 1.62; font-size: .93rem; }
details.guida .contenuto p { margin: 0 0 .8rem; }

/* ---- Link + copia integrato: input readonly con icona di copia agganciata ----
   Markup: <div class="linkbox"><input readonly>...<button class="linkbox-copy"
   onclick="olosCopyLink(this, this.previousElementSibling.value)">svg</button></div>
   olosCopyLink() vive in assets/js/olos-common.js, caricato in ogni layout /my. */
.linkbox { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.linkbox input { flex: 1; min-width: 0; border: 0 !important; border-radius: 0 !important; background: transparent; box-shadow: none !important; }
.linkbox input:focus { outline: none; }
.linkbox-copy { flex: none; display: flex; align-items: center; justify-content: center; width: 2.5rem; border: 0; border-left: 1px solid var(--line);
                background: #faf9fd; color: var(--muted); cursor: pointer; padding: 0; transition: background .15s, color .15s; }
.linkbox-copy:hover { background: var(--brand-soft); color: var(--brand); }
.linkbox-copy.is-copied { background: #eaf7f2; color: var(--ok); }
.linkbox-copy svg { width: 16px; height: 16px; }

/* ---- Lista di elementi interamente cliccabili (apre un modal) ----
   Markup: <ul class="list-rows"><li><button class="list-row" onclick="...">
   <span class="list-row-name">Nome</span><span class="list-row-meta">...</span>
   <span class="list-row-chevron" aria-hidden="true">›</span></button></li></ul> */
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li + li { padding-top: 5px; margin-top: 5px; border-top: 1px dashed var(--line); }
.list-row { display: flex; align-items: center; gap: .8rem; width: 100%; background: none; border: 0;
            padding: .85rem .5rem; margin: 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
            text-decoration: none; border-radius: 8px; transition: background .12s; box-sizing: border-box; }
.list-row:hover, .list-row:focus-visible { background: var(--brand-soft); text-decoration: none; color: inherit; }
/* Riga informativa, non cliccabile: niente cursore né evidenziazione */
.list-row.is-static { cursor: default; }
.list-row.is-static:hover { background: none; }
/* Slot comprato ma non ancora usato: fondino grigio e tratteggio leggero,
   così non si confonde con una riga vera. Il titolo è in corsivo e più
   piccolo: si legge subito come "posto ancora da riempire". */
.list-row-libero { background: #f6f6fa; border: 1px dashed #d9dae4; color: var(--muted); }
.list-row-libero:hover, .list-row-libero:focus-visible { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.list-row-libero .list-row-name { font-style: italic; font-weight: 400; font-size: .88rem; color: var(--muted); }
.list-row-libero:hover .list-row-name { color: var(--brand-dark); }
.list-row-libero .list-row-meta { font-weight: 600; color: var(--brand); }
.list-row-libero.is-static:hover { background: #f6f6fa; border-color: #d9dae4; color: var(--muted); }
/* Queste righe sono già scatolate: niente filo separatore, solo un respiro. */
.list-rows li.riga-libera { border-top: 0; padding-top: 0; margin-top: .45rem; }
.list-row-name { flex: 1; min-width: 0; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-meta { flex: none; color: var(--muted); font-size: .88rem; }
.list-row-badge { flex: none; background: #fef3c7; color: #92400e; border-radius: 99px; padding: .15rem .6rem; font-size: .78rem; font-weight: 700; }
.list-row-chevron { flex: none; color: var(--muted); font-size: 1.2rem; line-height: 1; }

/* ---- Hero full-width uniforme delle pagine pubbliche ----
   Va nel contentHero (fuori da <main>), quindi occupa tutta la larghezza.
   Sfondo animato via olos-hero.js (canvas.hero-bg); ogni pagina sceglie un
   effetto diverso con data-hero e un gradiente scuro proprio (style inline). */
.site-hero { position: relative; width: 100%; overflow: hidden; color: #fff;
             min-height: clamp(230px, 32vh, 360px); display: flex; align-items: center;
             background: linear-gradient(120deg, #1e1b4b, #312e81); }
.site-hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.site-hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
             background: linear-gradient(90deg, rgba(10,8,30,.5), rgba(10,8,30,.18) 58%, transparent 88%); }
.site-hero .site-hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1340px; margin: 0 auto; padding: 2.6rem 1.5rem; }
.site-hero .eyebrow { color: rgba(255,255,255,.82); font-size: .74rem; font-weight: 760; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 .5rem; }
.site-hero h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 820; letter-spacing: -.02em; margin: 0; line-height: 1.08;
             text-shadow: 0 2px 22px rgba(0,0,0,.35); text-wrap: balance; }
.site-hero .lead { color: rgba(255,255,255,.92); font-size: 1.08rem; line-height: 1.6; max-width: 62ch; margin: .7rem 0 0; }
.site-hero .hero-cta { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.site-hero .hero-cta .btn.ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.34); box-shadow: none; }
.site-hero .hero-cta .btn.ghost:hover { background: rgba(255,255,255,.24); }
/* statistiche/azioni nella fascia hero (chip traslucidi) */
.site-hero .hero-stats { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.3rem; }
.site-hero .hero-stats .s { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24);
             border-radius: 14px; padding: .7rem 1.2rem; text-align: center; min-width: 96px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.site-hero .hero-stats .s b { display: block; font-size: 1.5rem; font-weight: 820; letter-spacing: -.02em; line-height: 1; color: #fff; }
.site-hero .hero-stats .s span { font-size: .72rem; color: #ded7f6; }
@media (prefers-reduced-motion: reduce) { .site-hero .hero-bg { opacity: .5; } }

/* ---- Hero di sezione ---- */
.page-hero { position: relative; overflow: hidden; background: #fff;
             border: 1px solid var(--line); border-radius: 18px; padding: 2.2rem 2.4rem;
             margin: 0 0 1.9rem; box-shadow: var(--shadow);
             display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.page-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
             background: radial-gradient(560px 220px at 92% -30%, rgba(109,40,217,.10), transparent 65%),
                         radial-gradient(480px 220px at 70% 130%, rgba(2,132,199,.07), transparent 60%); }
.page-hero > * { position: relative; }
.page-hero h1 { margin: 0 0 .35rem; }
.page-hero .sub { margin: 0; color: var(--muted); font-size: 1.02rem; max-width: 54ch; }
.page-hero .stats { display: flex; gap: .6rem; flex-wrap: wrap; }
.stat-chip { background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: 14px;
             padding: .8rem 1.35rem; text-align: center; min-width: 112px; box-shadow: var(--shadow); }
.stat-chip b { display: block; font-size: 1.5rem; font-weight: 720; letter-spacing: -.015em; }
.stat-chip span { font-size: .76rem; color: var(--muted); letter-spacing: .02em; }

/* ---- Chip PP nell'header ---- */
.credits-chip { display: flex; align-items: center; gap: .55rem; background: var(--brand-soft);
                border: 1px solid #e2d9f8; border-radius: 99px; padding: .26rem .32rem .26rem .95rem;
                font-weight: 660; font-size: .95rem; color: var(--brand-dark); margin-right: .4rem; }
.credits-chip small { font-weight: 550; color: #8b7fb8; }
.credits-chip .plus { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
                      background: var(--brand); color: #fff; font-size: 1.05rem; line-height: 1;
                      display: flex; align-items: center; justify-content: center; transition: background .15s; }
.credits-chip .plus:hover { background: var(--brand-dark); }
.credits-chip .plus:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

/* ---- Area professionista: saldo, ricarica, filtri ---- */
.pro-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem; }
.saldo-card { display: flex; align-items: center; gap: 1.2rem; color: #fff;
              background: linear-gradient(135deg, #311a63, #1e3a5f);
              border-radius: 14px; padding: .85rem 1rem .85rem 1.35rem;
              box-shadow: 0 8px 24px -10px rgba(25,28,40,.45); }
.saldo-card .saldo-n { font-size: 1.55rem; font-weight: 740; letter-spacing: -.015em; line-height: 1; }
.saldo-card .saldo-n span { font-size: .85rem; font-weight: 550; opacity: .8; margin-left: .3rem; }
.saldo-card .saldo-l { font-size: .71rem; opacity: .72; margin-top: .25rem; letter-spacing: .02em; }
.saldo-plus { width: 40px; height: 40px; border-radius: 10px; border: 0; cursor: pointer;
              background: rgba(255,255,255,.14); color: #fff; font-size: 1.4rem; font-weight: 600; line-height: 1;
              display: flex; align-items: center; justify-content: center; transition: background .15s; }
.saldo-plus:hover { background: rgba(255,255,255,.26); }
.saldo-plus:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

dialog.dlg { border: 0; border-radius: 16px; padding: 1.5rem 1.7rem 1.7rem; width: min(820px, 92vw);
             box-shadow: 0 30px 80px -22px rgba(16,18,28,.5); background: #fff; }
dialog.dlg::backdrop { background: rgba(20,22,32,.5); backdrop-filter: blur(3px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { margin: .2rem 0; }
.dlg-x { border: 0; background: #f0f1f5; color: var(--ink); width: 32px; height: 32px;
         border-radius: 8px; cursor: pointer; font-size: .9rem; font-family: inherit; }
.dlg-x:hover { background: #e5e7ee; }

.sec-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .7rem; margin: 1.9rem 0 .9rem; }
.sec-head h2 { margin: 0; }
.filtri { display: flex; gap: 2px; background: #eef0f4; border: 1px solid var(--line);
          border-radius: 9px; padding: 3px; }
.filtro { border: 0; background: transparent; color: var(--muted); font-family: inherit; font-size: .89rem;
          font-weight: 570; padding: .42rem 1rem; border-radius: 7px; cursor: pointer; transition: color .15s; }
.filtro:hover { color: var(--ink); }
.filtro.active { background: #fff; color: var(--ink); font-weight: 640; box-shadow: 0 1px 3px rgba(16,18,28,.14); }
.filtro.active .muted { color: var(--muted); }

/* ---- Hero home ---- */
.hero { text-align: center; padding: 3.6rem 1rem 2.4rem; }
.hero .eyebrow { display: inline-block; background: #fff; color: var(--muted);
                 font-size: .74rem; font-weight: 620; padding: .34rem .95rem; border-radius: 99px;
                 border: 1px solid var(--line); margin-bottom: 1.2rem; letter-spacing: .05em;
                 text-transform: uppercase; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.4rem); margin: .2rem 0 1rem; font-weight: 760; letter-spacing: -.03em; }
.hero p.lead { max-width: 660px; margin: 0 auto 2rem; font-size: 1.16rem; line-height: 1.68; color: var(--muted); }
.section-title { text-align: center; font-size: 1.55rem; margin: 2.8rem 0 1.4rem; }
.step-ico { width: 54px; height: 54px; margin-bottom: .85rem; border-radius: 13px; background: var(--brand-soft);
            display: flex; align-items: center; justify-content: center; color: var(--brand); }
.step-ico svg { width: 26px; height: 26px; }

/* ---- Footer grande (scuro, multi-colonna) ---- */
footer.site { background: linear-gradient(135deg, #1c1436 0%, #241056 55%, #0f2942 100%); color: rgba(255,255,255,.72);
              margin-top: 3rem; position: relative; }
footer.site::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
              background: linear-gradient(90deg, #a78bfa, #38bdf8); }
.foot-top { max-width: 1340px; margin: 0 auto; padding: 3.6rem 1.5rem 2.6rem; display: grid;
            grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 2.6rem; }
.foot-brand .foot-logo { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-weight: 780;
            font-size: 1.5rem; letter-spacing: -.02em; text-decoration: none; }
.foot-brand .foot-logo svg { width: 30px; height: 30px; }
.foot-brand .foot-logo span { color: #a78bfa; }
.foot-brand p { margin: 1rem 0 0; color: rgba(255,255,255,.6); font-size: .94rem; line-height: 1.65; max-width: 42ch; }
.foot-brand .foot-benefit { margin-top: .9rem; color: rgba(255,255,255,.8); font-weight: 600; font-size: .9rem; }
.foot-cols { display: contents; }
.foot-col h4 { color: #fff; font-size: .76rem; font-weight: 780; text-transform: uppercase; letter-spacing: .11em; margin: .25rem 0 1.1rem; }
.foot-col a { display: block; color: rgba(255,255,255,.68); font-size: .95rem; padding: .38rem 0; text-decoration: none; transition: color .14s; }
.foot-col a:hover { color: #fff; text-decoration: none; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.13); }
.foot-bottom { max-width: 1340px; margin: 0 auto; padding: 1.5rem 1.5rem 1.9rem; display: flex;
               justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .84rem; color: rgba(255,255,255,.5); }
.foot-bottom .foot-legal a { color: rgba(255,255,255,.72); font-weight: 600; text-decoration: none; }
.foot-bottom .foot-legal a:hover { color: #fff; }
@media (max-width: 780px) { .foot-top { grid-template-columns: 1fr 1fr; gap: 1.8rem 1.4rem; }
    .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 460px) { .foot-top { grid-template-columns: 1fr; } }

/* ==== Corpo dell'area riservata (/my, /admin): veste "workspace" ==== */
body.area-my { background: linear-gradient(180deg, #f0edfa 0%, var(--bg) 460px); }
/* La riga sotto-menu ("Area personale ›") diventa una barra app più marcata */
body.area-my .head-cats { background: #fff; border-top: 1px solid var(--line); box-shadow: 0 6px 18px -12px rgba(24,16,60,.28); }
body.area-my .cats-row .c-parent { color: var(--brand); }
body.area-my .cats-row a { border-bottom: 0; border-radius: 9px; margin: .45rem .1rem; padding: .5rem .9rem; }
body.area-my .cats-row a:hover { background: #f1eefb; }
body.area-my .cats-row a.active { background: var(--brand-soft); color: var(--brand-dark); }
body.area-my main { position: relative; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d4d6e0; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #bec1cf; }

/* ==== Header stile Udemy (pubblico + professionista) ==== */
.site-head { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.head-main { max-width: 1340px; margin: 0 auto; padding: .7rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
/* gruppo sinistro (logo + nav); l'area azioni/login sta a destra (space-between) */
.head-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.head-main .logo { margin-right: .3rem; }
.u-quick { display: flex; gap: .1rem; flex: none; }
.u-quick a { color: var(--ink); font-size: .95rem; font-weight: 600; padding: 0 1.05rem; min-height: 44px;
           display: inline-flex; align-items: center; border-radius: 99px; white-space: nowrap; box-sizing: border-box;
           transition: background .14s, color .14s; }
.u-quick a:hover { background: #f0eef7; color: var(--brand-dark); text-decoration: none; }
/* "Bundle" in evidenza (i bundle fanno risparmiare) */
.u-quick a.gnav-bundle { color: var(--brand-dark); font-weight: 720; gap: .45rem; }
.u-quick a.gnav-bundle:hover { background: var(--brand-soft); color: var(--brand-dark); }
.u-quick a.gnav-bundle .tag { font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
           background: var(--brand); color: #fff; border-radius: 99px; padding: .12rem .42rem; line-height: 1; }
/* Bottone "La mia area" (torna alla dashboard da qualunque pagina pubblica) */
.u-actions .btn.dash-btn { gap: .45rem; }
.u-actions .btn.dash-btn svg { flex: none; }
/* ---- Mega-menu del sito pubblico (Home · Esplora · Scopri) ---- */
.u-quick .gnav-home { color: var(--ink); }
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; color: var(--ink); font-size: .95rem; font-weight: 600;
           padding: 0 1.05rem; min-height: 44px; display: inline-flex; align-items: center; gap: .4rem;
           border-radius: 99px; white-space: nowrap; box-sizing: border-box; transition: background .14s, color .14s; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover, .nav-menu[open] > summary { background: #f0eef7; color: var(--brand-dark); }
.nav-menu .chev { font-size: .5rem; color: var(--muted); transition: transform .15s; }
.nav-menu[open] .chev { transform: rotate(180deg); }
.nav-menu .panel { position: absolute; left: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line);
           border-radius: 14px; box-shadow: 0 22px 48px -20px rgba(20,22,40,.30); padding: .6rem; z-index: 60; }
.nav-menu .panel.simple { min-width: 210px; }
.nav-menu .panel.mega { display: grid; grid-template-columns: repeat(2, minmax(210px, 250px));
           gap: .1rem .6rem; width: max-content; max-width: min(94vw, 540px); }
.nav-menu .panel.mega .mega-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .3rem; }
.nav-cat { padding: .35rem .3rem; }
.nav-cat .cat-t { display: block; font-weight: 800; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
           color: var(--muted); padding: .25rem .5rem; }
a.cat-t:hover { color: var(--brand-dark); text-decoration: none; }
.nav-menu .panel a.item { display: block; padding: .42rem .55rem; border-radius: 8px; color: var(--ink);
           font-size: .9rem; font-weight: 550; }
.nav-menu .panel a.item:hover { background: #f3f4f8; color: var(--brand-dark); text-decoration: none; }
.nav-menu .panel a.item.all { font-weight: 700; color: var(--brand-dark); }
.usearch { flex: 1 1 auto; display: flex; align-items: center; gap: .7rem; min-width: 0;
           min-height: 44px; box-sizing: border-box;
           background: #fff; border: 1px solid #cbcfda; border-radius: 99px; padding: 0 1.2rem;
           transition: border-color .14s, box-shadow .14s; }
.usearch:hover { border-color: #9aa0b0; }
.usearch:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.us-go { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0;
         border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.us-go:hover { color: var(--brand); }
.usearch input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: .98rem; padding: 0;
           color: var(--ink); font-family: inherit; }
.usearch input:focus { outline: none; border: 0; box-shadow: none; }
.u-actions { display: flex; align-items: center; gap: .55rem; flex: none; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 99px; border: 0; background: transparent;
           color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: #f0eef7; text-decoration: none; }
/* "La mia Libreria": sfondino chiaro sempre visibile (non solo all'hover) */
.icon-btn.icon-lib { background: var(--brand-soft); color: var(--brand-dark); }
.icon-btn.icon-lib:hover { background: #e6ddf9; }
.btn.outline { background: #fff; color: var(--brand-dark); border: 1px solid var(--brand-dark); box-shadow: none; }
.btn.outline:hover { background: var(--brand-soft); border-color: var(--brand-dark); box-shadow: none; }

/* Tutti i controlli dell'header a pill e alti uguali al cerca (44px) */
.u-actions .btn { min-height: 44px; padding: 0 1.35rem; display: inline-flex; align-items: center;
           border-radius: 99px; font-size: .95rem; }
.u-actions .badge { border-radius: 99px; }
.credits-chip { min-height: 44px; box-sizing: border-box; }
.user-menu summary { border-radius: 99px; min-height: 44px; box-sizing: border-box; }

/* Tooltip leggero (attributo data-tip), ancorato a destra per non uscire */
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: calc(100% + 9px); right: 0;
           background: var(--ink); color: #fff; font-size: .74rem; font-weight: 600; white-space: nowrap;
           padding: .38rem .62rem; border-radius: 8px; box-shadow: 0 8px 20px rgba(16,18,28,.28); z-index: 200; }
[data-tip]:hover::before { content: ''; position: absolute; top: calc(100% + 3px); right: 12px;
           border: 6px solid transparent; border-bottom-color: var(--ink); z-index: 200; }

.head-cats { border-top: 1px solid var(--line); }
.cats-row { max-width: 1340px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center;
           gap: .1rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; }
.cats-row::-webkit-scrollbar { display: none; }
.cats-row a { color: var(--ink); font-size: .93rem; font-weight: 600; padding: 1rem .85rem; white-space: nowrap;
           border-bottom: 2px solid transparent; margin-bottom: -1px; flex: none; }
.cats-row a:hover { color: var(--brand-dark); text-decoration: none; }
.cats-row a.active { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 700; }
.cats-row .c-parent { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em;
           color: var(--muted); padding-right: .1rem; white-space: nowrap; flex: none; }
.cats-row .c-sep { color: #c7cad6; padding: 0 .35rem 0 .1rem; flex: none; }

/* Menù dell'amministrazione: gruppi a tendina in una barra sola.
   Niente overflow-x qui: le tendine verrebbero tagliate. */
.cats-row.admin { overflow: visible; flex-wrap: wrap; }
.cats-row .cm { position: relative; flex: none; }
.cats-row .cm > summary { list-style: none; cursor: pointer; color: var(--ink); font-size: .93rem;
           font-weight: 600; padding: 1rem .85rem; white-space: nowrap; border-bottom: 2px solid transparent;
           margin-bottom: -1px; display: flex; align-items: center; gap: .3rem; }
.cats-row .cm > summary::-webkit-details-marker { display: none; }
.cats-row .cm > summary::after { content: '⌄'; font-size: .9rem; line-height: 1; margin-top: -.25rem; color: var(--muted); }
.cats-row .cm > summary:hover { color: var(--brand-dark); }
.cats-row .cm.active > summary { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 700; }
.cats-row .cm[open] > summary { color: var(--brand-dark); }
.cats-row .cm-menu { position: absolute; top: 100%; left: .3rem; z-index: 60; min-width: 190px;
           background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .35rem;
           box-shadow: 0 18px 40px -18px rgba(24,16,60,.45); display: grid; gap: .1rem; }
.cats-row .cm-menu a { padding: .55rem .7rem; border-radius: 8px; border-bottom: 0; margin: 0;
           font-size: .9rem; font-weight: 550; }
.cats-row .cm-menu a:hover { background: var(--brand-soft); }
.cats-row .cm-menu a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }

@media (max-width: 860px) { .u-quick { display: none; } }
@media (max-width: 680px) {
    .head-main { flex-wrap: wrap; gap: .6rem; }
    .usearch { order: 5; flex-basis: 100%; }
    .u-actions .u-hide-sm { display: none; }
    .user-menu .user-txt, .user-menu .chev { display: none; }
}

/* ==== Vetrina stile store (dashboard/market) — look editoriale ==== */
.store-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem;
              flex-wrap: wrap; margin: .3rem 0 1.6rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.store-head .dh-eyebrow { font-size: .72rem; font-weight: 760; text-transform: uppercase; letter-spacing: .13em; color: var(--brand); }
.store-head h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -.033em; margin: .4rem 0 .55rem; }
.store-head p { margin: 0; color: var(--muted); font-size: 1.04rem; line-height: 1.55; max-width: 58ch; }
.store-stats { display: flex; gap: 1.8rem; }
.sstat b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.sstat span { font-size: .73rem; color: var(--muted); }

/* ---- Hero animato "cells" della dashboard ---- */
/* full-width: la dash-hero vive nel contentHero (fuori da main) */
.dash-hero { position: relative; overflow: hidden; width: 100%; border-radius: 0; margin: 0;
             background: linear-gradient(120deg, #2a1065, #4c1d95 45%, #075985); }
.dash-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.dash-hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
             background: linear-gradient(90deg, rgba(18,10,44,.55), rgba(18,10,44,.12) 52%, transparent 78%); }
.dash-hero .dh-inner { position: relative; z-index: 2; max-width: 1340px; margin: 0 auto;
             display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem;
             flex-wrap: wrap; padding: 2.6rem 1.5rem; color: #fff; }
.dash-hero .dh-eyebrow { color: #e9d5ff; font-size: .72rem; font-weight: 760; text-transform: uppercase; letter-spacing: .14em; }
.dash-hero h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; margin: .5rem 0 .55rem; line-height: 1.08;
             color: #fff; text-shadow: 0 2px 24px rgba(10,6,30,.45); }
.dash-hero p { margin: 0; color: #eae5fb; font-size: 1.06rem; line-height: 1.55; max-width: 56ch;
             text-shadow: 0 1px 12px rgba(10,6,30,.3); }
.dash-hero .dh-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.15rem; }
.dash-hero .dh-actions .btn.ghost { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.34); box-shadow: none; }
.dash-hero .dh-actions .btn.ghost:hover { background: rgba(255,255,255,.26); }
.dash-hero .dh-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.dash-hero .dh-stat { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24);
             border-radius: 14px; padding: .85rem 1.25rem; text-align: center; min-width: 104px;
             -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.dash-hero .dh-stat b { display: block; font-size: 1.65rem; font-weight: 820; letter-spacing: -.02em; line-height: 1; color: #fff; }
.dash-hero .dh-stat span { font-size: .72rem; color: #ded7f6; }
@media (max-width: 640px) { .dash-hero h1 { font-size: 1.85rem; } .dash-hero .dh-inner { padding: 1.8rem 1.5rem; } }

.rail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 2.5rem 0 1.15rem; }
.rail-head h2 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.022em; }
.rail-head a { font-size: .9rem; font-weight: 700; white-space: nowrap; }
.rail { display: flex; gap: 1.1rem; overflow-x: auto; padding: .2rem .1rem 1.2rem; scroll-snap-type: x proximity; }
.rail::-webkit-scrollbar { height: 8px; }
.pcard { flex: 0 0 264px; scroll-snap-align: start; background: var(--card); border: 1px solid #d7dbe3;
         border-radius: 9px; overflow: hidden; display: flex; flex-direction: column; color: inherit;
         transition: box-shadow .16s, border-color .16s; }
.pcard:hover { box-shadow: 0 8px 24px -10px rgba(16,18,28,.24); border-color: #b7bdca; text-decoration: none; }
.pcard .thumb-wrap { position: relative; background: #ece9f6; }
.pcard .thumb { aspect-ratio: 16/9; width: 100%; object-fit: cover; display: block; }
.pcard .thumb.ph { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; font-size: 2.2rem;
         background: linear-gradient(135deg, #ece8f8, #e2edf7); color: var(--brand); }
.ptag { position: absolute; top: .6rem; left: .6rem; background: #1c1d1f; color: #fff; font-size: .63rem;
         font-weight: 750; padding: .22rem .5rem; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; }
.ptag.ok { background: var(--ok); }
.pcard .pbody { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; gap: .28rem; flex: 1; }
.pcard h3 { font-size: 1rem; margin: 0; line-height: 1.3; font-weight: 750; color: var(--ink);
         display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .psub { font-size: .81rem; color: var(--muted); line-height: 1.4;
         display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .pmeta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .55rem; }
.pcard .price { font-weight: 820; color: var(--ink); font-size: 1.08rem; letter-spacing: -.01em; }
.pcard .price small { font-weight: 500; color: var(--muted); font-size: .74rem; letter-spacing: 0; }
.pcard .kind { font-size: .71rem; font-weight: 680; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.feat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.7rem;
         margin: 2.8rem 0 .5rem; padding: 2rem 0 .3rem; border-top: 1px solid var(--line); }
.feat { display: flex; gap: .95rem; align-items: flex-start; }
.feat .fi { flex: none; width: 42px; height: 42px; border-radius: 11px; background: var(--brand-soft); color: var(--brand);
         display: flex; align-items: center; justify-content: center; }
.feat b { display: block; font-size: 1rem; margin-bottom: .22rem; color: var(--ink); font-weight: 720; }
.feat p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
@media (max-width: 620px) { .pcard { flex: 0 0 78vw; } .store-head h1 { font-size: 1.75rem; } .rail-head h2 { font-size: 1.3rem; } }

/* ---- Mobile ---- */
@media (max-width: 760px) {
    h1 { font-size: 1.55rem; }
    main { padding-top: 1.1rem; }
    .grid { grid-template-columns: 1fr !important; }
    .card table { display: block; overflow-x: auto; }
    .tool-header img { width: 100%; }
    .hero { padding-top: 2.4rem; }
    .saldo-card { width: 100%; justify-content: space-between; }
}

/* ============================================================
   Upload evoluto — drop-zone + anteprima (olos-upload.js)
   ============================================================ */
.olos-drop { margin: .2rem 0 .7rem; }
.olos-drop-zone { position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 96px; padding: 1.2rem 1.3rem; border: 2px dashed #cdd0dc; border-radius: 12px;
    background: #fafbff; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.olos-drop-zone:hover { border-color: #b9bccb; background: #f6f7fe; }
.olos-drop.dragover .olos-drop-zone { border-color: var(--brand); background: var(--brand-soft); }
.olos-drop.has-files .olos-drop-zone { min-height: 0; padding: .75rem 1rem; }
.olos-drop-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.olos-drop-cta { pointer-events: none; display: inline-flex; align-items: center; gap: .65rem;
    color: var(--muted); font-size: .92rem; }
.olos-drop-ic { font-size: 1.45rem; line-height: 1; }
.olos-drop-cta b { color: var(--brand-dark); font-weight: 700; }
.olos-drop-cta small { display: block; font-size: .74rem; color: var(--muted); margin-top: .18rem; letter-spacing: .03em; }

.olos-drop-preview { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .75rem; }
.olos-drop-preview:empty { display: none; }
.olos-file { display: flex; align-items: center; gap: .55rem; background: #fff; border: 1px solid var(--line);
    border-radius: 10px; padding: .45rem .6rem; box-shadow: var(--shadow); }
.olos-file-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; background: #eef; }
.olos-file-ic { width: 46px; height: 46px; border-radius: 8px; flex: none; display: flex; align-items: center;
    justify-content: center; font-size: 1.35rem; background: var(--brand-soft); }
.olos-file-meta { min-width: 0; display: flex; flex-direction: column; }
.olos-file-meta b { font-size: .84rem; font-weight: 640; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 190px; }
.olos-file-meta small { font-size: .74rem; color: var(--muted); }
.olos-file-more { padding: .6rem .85rem; color: var(--muted); font-size: .82rem; font-weight: 600;
    background: #f4f4f8; border-radius: 10px; box-shadow: none; border: 0; }
.olos-drop-clear { align-self: center; background: none; border: 0; color: var(--err); font-weight: 700;
    font-size: .82rem; cursor: pointer; padding: .35rem .55rem; border-radius: 8px; }
.olos-drop-clear:hover { background: #fdecec; }

/* ============================================================
   Illustrazione (unDraw) a lato di "Come funziona" nella scheda
   ============================================================ */
.hiw-card.has-illus { display: flex; gap: 2.2rem; align-items: center; flex-wrap: wrap; }
.hiw-card.has-illus .hiw-text { flex: 1 1 340px; min-width: 280px; }
.hiw-card.has-illus .hiw-illus { flex: 1 1 250px; min-width: 210px; display: flex; justify-content: center; }
.hiw-card.has-illus .hiw-illus img { width: 100%; max-width: 330px; height: auto; }
@media (max-width: 640px) {
    .hiw-card.has-illus { gap: 1.2rem; }
    .hiw-card.has-illus .hiw-illus { order: -1; }
    .hiw-card.has-illus .hiw-illus img { max-width: 220px; }
}

/* ============================================================
   Login social — bottone "Continua con Google" + separatore
   ============================================================ */
.btn-google { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%;
    background: #fff; color: #3c4043; border: 1px solid #dadce0; border-radius: 10px; padding: .7rem 1rem;
    font-weight: 600; font-size: .95rem; text-decoration: none; box-shadow: var(--shadow);
    transition: background .15s, box-shadow .15s, border-color .15s; }
.btn-google:hover { background: #f7f8fa; border-color: #cfd3d9; box-shadow: var(--shadow-lift); text-decoration: none; }
.btn-google svg { flex: none; }
.auth-or { display: flex; align-items: center; gap: .8rem; margin: 1.1rem 0; color: var(--muted);
    font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-privacy { font-size: .78rem; text-align: center; margin: .55rem 0 0; }
/* Nota di chi arriva dal link di un collega: dice perché il modulo parte
   già su "professionista", senza nominare chi ha invitato. */
.auth-rete { background: var(--brand-soft); border: 1px solid #e4defa; border-radius: 10px;
             padding: .7rem .9rem; font-size: .86rem; color: var(--brand-dark);
             line-height: 1.55; margin: 0 0 1rem; }
/* Campo pre-compilato e non modificabile (es. l'email di un invito):
   deve leggersi come "deciso", non come disabilitato per errore. */
.campo-bloccato { background: #f5f4fa; color: var(--ink); border-color: #d9d7e6; cursor: default; }
.campo-bloccato:focus { outline: none; border-color: #d9d7e6; box-shadow: none; }

/* ------------------------------------------------------------------
   Mini editor (olos-editor.js): <textarea class="rich"> formattabile.
   Con .breve l'area è più bassa e la barra ha solo lo stretto necessario.
   ------------------------------------------------------------------ */
.rich-wrap { border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; margin-bottom: .4rem; }
.rich-bar { display: flex; gap: .1rem; flex-wrap: wrap; padding: .25rem .4rem; border-bottom: 1px solid #eceaf5; background: #faf9fd; }
.rich-bar button { border: 0; background: none; cursor: pointer; padding: .2rem .55rem; border-radius: 6px; font-size: .9rem; line-height: 1; color: var(--ink); }
.rich-bar button:hover { background: #efecfa; }
.rich-area { min-height: 80px; max-height: 340px; overflow: auto; padding: .6rem .8rem; outline: none; font: inherit; line-height: 1.6; }
.rich-area.breve { min-height: 52px; }
.rich-area:focus { box-shadow: inset 0 0 0 2px rgba(109, 40, 217, .12); }

/* Riga "slot finiti": chiude la lista dicendo che non ci sono posti liberi
   e porta l'acquisto dentro di sé, così non serve risalire alla barra. */

/* Righe cliccabili (data-vai, vedi olos-common.js): il puntatore e un velo
   di colore dicono che tutta la riga è un bersaglio, non solo il nome. */
tr[data-vai] { cursor: pointer; transition: background .12s ease; }
tr[data-vai]:hover { background: var(--brand-soft, #f4f1fb); }
tr[data-vai]:active { background: #ece7fa; }

/* «Aggiungi …» (partials/slot_box.php): l'ultima riga di ogni lista, con lo
   stesso tratteggio delle righe da attivare — è la stessa famiglia di cose,
   e si legge come la loro naturale continuazione. */
.slot-aggiungi { margin-top: .45rem; gap: 1rem; flex-wrap: wrap; }
.slot-aggiungi .list-row-name { flex: 1; min-width: 150px; font-style: normal;
            font-weight: 600; color: var(--brand-dark); }
.slot-aggiungi .th-slot-form { flex: none; }
.list-rows + .slot-aggiungi { margin-top: .45rem; }

/* Un tasto che è un link: per le azioni secondarie dentro una frase
   («Modifica questa categoria», «Elimina») dove un bottone vero sarebbe
   troppo. */
.btn-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700;
            color: var(--brand); cursor: pointer; text-decoration: underline; }
.btn-link:hover { color: var(--brand-dark); }
