/* VideoShared — Fluent / Windows 11, accento indaco */
:root {
  --acc: #5b3fd9; --acc-2: #4a30bb; --acc-chiaro: #ebe6ff; --su-acc: #fff;
  --sfondo: #f1f0f6; --mica: radial-gradient(1100px 650px at 0% 0%, #ebe5ff 0%, rgba(235,229,255,0) 60%), radial-gradient(900px 600px at 100% 100%, #fde7ef 0%, rgba(253,231,239,0) 60%), #f1f0f6;
  --sup: rgba(255,255,255,.8); --sup-2: #f6f5fa; --sup-solida: #fff; --bordo: rgba(30,20,60,.09); --bordo-forte: rgba(30,20,60,.18);
  --testo: #1a1824; --testo-2: #565268; --testo-3: #6f6b82; --ok: #0f7b3f; --err: #c42b1c; --avviso: #8f5700;
  --r: 8px; --ombra-1: 0 1px 2px rgba(20,10,50,.06), 0 2px 6px rgba(20,10,50,.04); --ombra-2: 0 8px 24px rgba(20,10,50,.12), 0 2px 6px rgba(20,10,50,.06); --ombra-3: 0 24px 64px rgba(20,10,50,.28);
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-titoli: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --acc: #a592ff; --acc-2: #bcaeff; --acc-chiaro: #2c2452; --su-acc: #150c40;
    --sfondo: #1b1a22; --mica: radial-gradient(1100px 650px at 0% 0%, #2a2347 0%, rgba(42,35,71,0) 60%), radial-gradient(900px 600px at 100% 100%, #35202c 0%, rgba(53,32,44,0) 60%), #1b1a22;
    --sup: rgba(44,42,56,.8); --sup-2: #2a2833; --sup-solida: #2c2a38; --bordo: rgba(255,255,255,.08); --bordo-forte: rgba(255,255,255,.18);
    --testo: #f3f2f8; --testo-2: #c6c3d4; --testo-3: #a4a0b6; --ok: #6ccb8f; --err: #ff9a8f; --avviso: #f0b45a;
    --ombra-1: 0 1px 2px rgba(0,0,0,.4); --ombra-2: 0 8px 24px rgba(0,0,0,.45); --ombra-3: 0 24px 64px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--testo); background: var(--mica); background-attachment: fixed; -webkit-font-smoothing: antialiased; }
::selection { background: var(--acc); color: var(--su-acc); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: var(--bordo-forte) transparent; }
a { color: var(--acc); text-underline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { font-family: var(--font-titoli); margin: 0; text-wrap: balance; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 600; }
h2.sez { margin: 24px 0 10px; }
h2.sez:first-child { margin-top: 0; }
h3 { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
p { margin: 0 0 8px; }
.nota { color: var(--testo-2); font-size: 13px; }
[hidden] { display: none !important; }
input, select, textarea, button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* struttura */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 14px 8px; overflow-y: auto; }
.marchio { display: flex; align-items: center; gap: 10px; padding: 4px 12px 18px; }
.marchio strong { display: block; font-family: var(--font-titoli); font-size: 15px; line-height: 1.1; }
.marchio span { color: var(--testo-2); font-size: 11.5px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; position: relative; color: var(--testo); transition: background .15s; }
.nav-item:hover { background: var(--bordo); }
.nav-item.on { background: var(--sup); box-shadow: var(--ombra-1); font-weight: 600; }
.nav-item.on::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 2px; background: var(--acc); }
.nav-item.principale svg { color: var(--acc); }
.nav-spazio { flex: 1; min-height: 16px; }
.solo-mobile { display: none; }
.contenuto { padding: 22px 28px 48px; min-width: 0; }
.testata { margin: 4px 0 18px; max-width: 900px; }
.testata p { color: var(--testo-2); margin-top: 6px; max-width: 68ch; }
.riga-testata { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; max-width: none; }
.view { animation: entra .32s cubic-bezier(.16,1,.3,1); }
@keyframes entra { from { opacity: .001; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } * { scroll-behavior: auto !important; } }

.pannello { background: var(--sup); backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3); border: 1px solid var(--bordo); border-radius: var(--r); box-shadow: var(--ombra-1); padding: 18px; min-width: 0; }
.pannello.stretto { max-width: 640px; }
.pannello + .pannello { margin-top: 14px; }

/* controlli */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 6px 16px; border-radius: 6px; border: 1px solid var(--bordo-forte); background: var(--sup-solida); color: var(--testo); cursor: pointer; font-weight: 500; transition: background .12s, transform .08s, box-shadow .12s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--sup-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn.accento { background: var(--acc); border-color: transparent; color: var(--su-acc); box-shadow: inset 0 -1px 0 rgba(0,0,0,.18); }
.btn.accento:hover { background: var(--acc-2); }
.btn.grande { min-height: 50px; font-size: 16px; font-weight: 600; padding: 8px 26px; }
.btn.piccolo { min-height: 34px; padding: 4px 11px; font-size: 13px; }
.btn.pericolo { color: var(--err); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.azioni { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.azioni.fine { justify-content: flex-end; }
input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=file]), select, textarea { width: 100%; color: var(--testo); min-height: 40px; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--bordo-forte); border-bottom-color: var(--testo-3); background: var(--sup-solida); }
input[type=file] { width: 100%; font-size: 13px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom: 2px solid var(--acc); }
input[type=checkbox] { accent-color: var(--acc); width: 18px; height: 18px; }
input[type=range] { accent-color: var(--acc); width: 100%; }
input[type=color] { width: 44px; height: 40px; border: 1px solid var(--bordo-forte); border-radius: 6px; background: none; padding: 2px; cursor: pointer; }
label { color: var(--testo-2); font-size: 13px; }
.campo { display: block; margin: 10px 0; }
.campo > input, .campo > select, .campo > textarea { margin-top: 4px; }
.campi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 12px; }
.riga { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--testo); font-size: 14px; cursor: pointer; }
.segmenti { display: inline-flex; flex-wrap: wrap; background: var(--sup-2); border: 1px solid var(--bordo); border-radius: 7px; padding: 2px; gap: 2px; }
.segmenti button { border: 0; background: none; min-height: 36px; padding: 5px 12px; border-radius: 5px; cursor: pointer; color: var(--testo-2); }
.segmenti button.on { background: var(--sup-solida); box-shadow: var(--ombra-1); color: var(--testo); font-weight: 600; }
.segmenti.larghi { display: flex; } .segmenti.larghi button { flex: 1; }

/* passi */
.passi { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; }
.passo { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--sup-2); border: 1px solid var(--bordo); color: var(--testo-2); cursor: pointer; font-weight: 500; min-height: 44px; }
.passo b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sup-solida); border: 1px solid var(--bordo-forte); font-size: 13px; }
.passo.on { background: var(--acc); color: var(--su-acc); border-color: transparent; }
.passo.on b { background: rgba(255,255,255,.22); border-color: transparent; color: inherit; }
.passo.fatto b { background: var(--acc-chiaro); color: var(--acc); border-color: transparent; }

.griglia2 { display: grid; grid-template-columns: minmax(0, 6fr) minmax(300px, 4fr); gap: 18px; align-items: start; }
.sticky { position: sticky; top: 14px; }

/* logo e foto */
.drop { display: grid; place-items: center; min-height: 130px; border: 1.5px dashed var(--bordo-forte); border-radius: var(--r); cursor: pointer; overflow: hidden; position: relative; background: var(--sup-2); transition: border-color .15s, background .15s; text-align: center; padding: 14px; }
.drop:hover, .drop.sopra { border-color: var(--acc); background: var(--acc-chiaro); }
.drop-vuoto { display: grid; justify-items: center; gap: 4px; color: var(--testo-2); }
.drop-vuoto svg { width: 30px; height: 30px; color: var(--acc); }
.drop-vuoto strong { color: var(--testo); font-size: 15px; }
.logo-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-anteprima { width: 150px; height: 100px; border-radius: 8px; border: 1px solid var(--bordo-forte); display: grid; place-items: center; background: repeating-conic-gradient(#ddd 0% 25%, #fff 0% 50%) 50% / 14px 14px; overflow: hidden; }
.logo-anteprima img { max-width: 92%; max-height: 92%; }
.colori { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.colori label { display: grid; gap: 4px; }
.foto-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 10px; }
.foto-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--sup-2); border: 1px solid var(--bordo); }
.foto-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-item button { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.62); color: #fff; cursor: pointer; display: grid; place-items: center; }
.foto-item small { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.62); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.frasi { display: grid; gap: 8px; }
.frasi .riga-f { display: grid; grid-template-columns: 1fr; }
.avanti { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* template */
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.tpl { text-align: left; border: 1px solid var(--bordo); border-radius: var(--r); background: var(--sup-solida); padding: 0; cursor: pointer; overflow: hidden; transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; }
.tpl:hover { box-shadow: var(--ombra-2); transform: translateY(-1px); }
.tpl.on { box-shadow: 0 0 0 2.5px var(--acc); border-color: var(--acc); }
.tpl canvas { width: 100%; display: block; background: #222; }
.tpl b { display: block; padding: 8px 10px 0; font-size: 13.5px; }
.tpl small { display: block; padding: 0 10px 10px; color: var(--testo-2); font-size: 11.5px; line-height: 1.35; }

/* anteprima */
.pv { background: #0d0c12; border-radius: 14px; padding: 10px; box-shadow: var(--ombra-2); display: grid; gap: 8px; justify-items: center; }
.pv-tela { position: relative; width: 100%; display: grid; place-items: center; }
.pv canvas, .pv video { display: block; max-width: 100%; max-height: min(68vh, 640px); border-radius: 8px; background: #000; }
.pv video { width: auto; }
.pv-barra { display: flex; align-items: center; gap: 8px; width: 100%; color: #fff; }
.pv-barra button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.pv-barra button:hover { background: rgba(255,255,255,.26); }
.pv-barra input[type=range] { flex: 1; }
.pv-barra time { font-size: 12px; font-variant-numeric: tabular-nums; color: #cfcbe0; min-width: 76px; text-align: right; }
.pv-stato { color: #cfcbe0; font-size: 12px; min-height: 18px; }

/* progresso e risultato */
.barra { height: 10px; border-radius: 6px; background: var(--sup-2); overflow: hidden; border: 1px solid var(--bordo); }
.barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), #e0527f); transition: width .2s; }
.esito { margin-top: 16px; }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.testo-post { width: 100%; min-height: 150px; font-size: 13px; }
.hint { color: var(--testo-3); font-size: 12px; }

/* progetti */
.progetti { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.prog { border: 1px solid var(--bordo); border-radius: var(--r); background: var(--sup-solida); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--ombra-1); }
.prog img, .prog video { width: 100%; aspect-ratio: 4/5; object-fit: contain; display: block; background: #111; }
.prog-info { padding: 10px 12px 4px; }
.prog-info b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-info span { color: var(--testo-2); font-size: 12px; }
.prog .azioni { margin: 0; padding: 8px 10px 12px; }
.vuoto { text-align: center; padding: 38px 14px; color: var(--testo-2); border: 1.5px dashed var(--bordo-forte); border-radius: var(--r); }
.vuoto strong { display: block; color: var(--testo); font-size: 16px; margin-bottom: 6px; }

/* varie */
.cosa { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.cosa li { background: var(--sup); border: 1px solid var(--bordo); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 4px; }
.cosa li b { font-family: var(--font-titoli); }
.cosa li span { color: var(--testo-2); font-size: 13px; }
.segnalazioni li { border-top: 1px solid var(--bordo); padding: 8px 0; font-size: 13px; }
.stato { background: var(--acc-chiaro); color: var(--acc); border-radius: 4px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.avviso { background: color-mix(in srgb, var(--avviso) 13%, transparent); border: 1px solid color-mix(in srgb, var(--avviso) 35%, transparent); border-radius: 6px; padding: 9px 14px; margin-bottom: 12px; font-size: 13px; }
.avviso.demo { background: color-mix(in srgb, var(--acc) 12%, transparent); border-color: color-mix(in srgb, var(--acc) 40%, transparent); }
.credit { margin-top: 18px; font-size: 13px; color: var(--testo-2); }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--bordo-forte); vertical-align: middle; }
.kit-riga { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

.modale { position: fixed; inset: 0; background: rgba(10,6,30,.5); display: grid; place-items: center; z-index: 50; padding: 16px; backdrop-filter: blur(4px); }
.modale-in { background: var(--sup-solida); border-radius: 12px; padding: 22px; width: min(560px, 100%); max-height: 88vh; overflow: auto; box-shadow: var(--ombra-3); border: 1px solid var(--bordo); }
.modale-in h2 { margin-bottom: 10px; font-size: 20px; }
.modale-in ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.guida-passo { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 8px 0; }
.guida-passo svg { width: 46px; height: 46px; color: var(--acc); stroke-width: 1.4; }
.guida-nav { display: flex; gap: 6px; justify-content: center; margin: 8px 0; }
.guida-nav i { width: 8px; height: 8px; border-radius: 50%; background: var(--bordo-forte); }
.guida-nav i.on { background: var(--acc); width: 22px; border-radius: 4px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #1d1b27; color: #fff; padding: 10px 18px; border-radius: 8px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 90vw; font-size: 14px; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.foglio { position: fixed; inset: 0; z-index: 40; background: rgba(10,6,30,.4); display: flex; align-items: flex-end; }
.foglio-in { width: 100%; background: var(--sup-solida); border-radius: 16px 16px 0 0; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 4px; }

@media (max-width: 1000px) { .griglia2 { grid-template-columns: 1fr; } .sticky { position: static; order: -1; } .pv canvas, .pv video { max-height: 48vh; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; padding-bottom: 66px; }
  .nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; top: auto; height: auto; flex-direction: row; justify-content: space-around; gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--sup-solida); border-top: 1px solid var(--bordo); overflow: visible; }
  .marchio, .nav-spazio, .nav-item.sec { display: none; }
  .solo-mobile { display: flex; }
  .nav-item { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; min-height: 52px; flex: 1; align-items: center; text-align: center; }
  .nav-item.on::before { left: 50%; top: 0; width: 22px; height: 3px; margin: 0 0 0 -11px; }
  .contenuto { padding: 14px 12px 28px; }
  h1 { font-size: 23px; }
  .pannello { padding: 14px; }
  .pv canvas, .pv video { max-height: 60vh; }
  .templates { grid-template-columns: repeat(2, 1fr); }
}
