
/* Layout: barra demo chiara in alto (ruolo, piano, nome palestra); sotto l'app con un tema per ruolo.
   Ogni funzione è una scheda con la fascia del colore del suo piano. Pagina a tema unico, per scelta. */
:root{
  color-scheme:light;
  --free:#128a48; --pro:#1f5fe0; --prem:#7c3aed; --custom:#c2570a;
  --bar:#f1f1ec; --bar-ink:#141414; --bar-line:#cfcfc6;
  --ok:#5ce08a; --warn:#ffc947; --ko:#ff7a7a;
  --display:"Barlow Condensed","Arial Narrow",sans-serif;
  --body:"Barlow",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
[data-theme="atleta"]{--bg:#f3f3f0;--ink:#151515;--muted:#63635e;--line:#dcdbd4;--surface:#ffffff;--field:#fff;--field-ink:#151515;--on-ink:#fff;--accent:#151515;--accent-ink:#fff}
[data-theme="coach"]{--bg:#fff5c2;--ink:#1c1905;--muted:#6a6122;--line:rgba(28,25,5,.2);--surface:#fffdf0;--field:#fff;--field-ink:#1c1905;--on-ink:#fff5c2;--accent:#ffd400;--accent-ink:#1c1905}
[data-theme="super"]{--bg:#fde4e4;--ink:#2b0609;--muted:#7d3d42;--line:rgba(43,6,9,.2);--surface:#fff8f8;--field:#fff;--field-ink:#2b0609;--on-ink:#fff;--accent:#c1121f;--accent-ink:#fff}
.t-F{--c:var(--free)} .t-P{--c:var(--pro)} .t-M{--c:var(--prem)} .t-S{--c:var(--custom)}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:#e3e3dd;font-family:var(--body);font-size:16px;line-height:1.4;-webkit-tap-highlight-color:transparent}
h1,h2,h3,p,ul{margin:0} ul{padding:0;list-style:none}
h1,h2,h3,.brand{font-family:var(--display);font-weight:700;line-height:1.05;letter-spacing:.01em}
h1{font-size:2.1rem} h3{font-size:1.2rem;font-weight:600}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;touch-action:manipulation}
:focus-visible{outline:3px solid #2a7fff;outline-offset:2px}
.muted{color:var(--muted);font-size:.9rem}

/* barra demo */
.demo{position:sticky;top:0;z-index:20;background:var(--bar);color:var(--bar-ink);border-bottom:1px solid var(--bar-line);padding:8px 14px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;font-size:14px}
.seg{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.seg > span{font-weight:600;margin-right:2px}
.seg button{background:#fff;border:1px solid var(--bar-line);border-radius:999px;padding:4px 11px;font-weight:600;display:inline-flex;align-items:center;gap:6px}
.seg button i{width:10px;height:10px;border-radius:50%;background:var(--c)}
.seg button[aria-pressed="true"]{background:var(--bar-ink);color:#fff;border-color:var(--bar-ink)}
.seg button.t-F[aria-pressed="true"],.seg button.t-P[aria-pressed="true"],.seg button.t-M[aria-pressed="true"],.seg button.t-S[aria-pressed="true"]{background:var(--c);border-color:var(--c)}
.seg button[aria-pressed="true"] i{background:#fff}
.gym{display:flex;align-items:center;gap:6px;font-weight:600}
.gym input{width:150px;background:#fff;border:1px solid var(--bar-line);border-radius:8px;padding:4px 8px;font-weight:500}

/* prezzi */
.pricing{background:var(--bar);color:var(--bar-ink);padding:14px 18px 12px;display:flex;flex-direction:column;gap:10px}
.pricing .logo{font-family:var(--display);font-weight:700;font-size:1.6rem}
.pricing .logo b{color:var(--pro)}
.pricing .head2{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px}
.plans{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.plan{text-align:left;background:#fff;border:1px solid var(--bar-line);border-top:6px solid var(--c);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:1px;min-width:0}
.plan:hover{border-color:var(--c)}
.plan b{font-family:var(--display);font-size:1.25rem;font-weight:700}
.plan .pr{font-weight:600;font-size:1.05rem;font-variant-numeric:tabular-nums}
.plan small{font-size:.8rem;color:#55554e}
.plan[aria-pressed="true"]{background:var(--c);color:#fff;border-color:var(--c)}
.plan[aria-pressed="true"] small{color:#fff}
.all{justify-self:start;grid-column:1/-1;background:#fff;border:1px solid var(--bar-line);border-radius:999px;padding:4px 12px;font-weight:600;font-size:14px}
.all[aria-pressed="true"]{display:none}
.pnote{font-size:13px;color:#4a4a44}
.chat p.ad{align-self:stretch;max-width:none;background:none;border:1.5px dashed var(--muted);font-size:.92rem}
.chat p.ad small{display:block;font-size:.7rem;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}

/* cornice app */
.shell{background:var(--bg);color:var(--ink);min-height:calc(100vh - 90px);display:grid}
.top{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 12px;padding:12px 18px 10px;background:var(--accent);color:var(--accent-ink)}
.brand{font-size:1.6rem;text-transform:uppercase;letter-spacing:.08em;overflow-wrap:anywhere}
.role{border:2px solid currentColor;border-radius:999px;padding:1px 10px;font-size:.8rem;font-weight:600}
.nav{display:flex}
.nav button{background:none;border:0;padding:12px 14px;font-weight:500;white-space:nowrap}
.nav button[aria-current="page"]{background:var(--surface);font-weight:600}
main{padding:18px;display:flex;flex-direction:column;gap:14px;min-width:0}
.sub{max-width:60ch}

.shell{grid-template-columns:200px minmax(0,1fr);grid-template-rows:auto 1fr}
.shell .top{grid-column:1/-1}
.shell .nav{flex-direction:column;border-right:1px solid var(--line);padding-top:14px}
.shell .nav button{text-align:left;padding:12px 18px 12px 32px;border-left:6px solid transparent}
.shell .nav button[aria-current="page"]{border-left-color:var(--ink)}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px;align-items:start}
.shell.mob{max-width:440px;margin:0 auto;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr auto;border-inline:1px solid #cfcfc6}
.shell.mob main{grid-row:2;padding:14px 12px 20px}
.shell.mob h1{font-size:1.8rem}
.shell.mob .nav{grid-row:3;flex-direction:row;overflow-x:auto;border-right:0;border-top:2px solid var(--ink);padding-top:0;position:sticky;bottom:0;background:var(--bg);scrollbar-width:none}
.shell.mob .nav button{flex:1 0 auto;text-align:center;padding:13px 7px;border-left:0;font-size:.84rem}
.shell.mob .nav button[aria-current="page"]{background:var(--ink);color:var(--on-ink)}
.shell.mob .cards{grid-template-columns:1fr}
.shell.mob .rows li{flex-wrap:wrap}
.shell.mob .btns .b{flex:1 1 auto;padding:9px 12px}
@media (max-width:760px){
  .demo{position:static;padding:8px 12px;gap:6px 12px}
  .seg{flex-wrap:nowrap;overflow-x:auto;max-width:100%;scrollbar-width:none}
  .seg button{flex:none}
  #screen{display:none}
  .shell.mob{max-width:none;border:0}
  .pricing{padding:12px}
  .plans{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* scheda funzione */
.card{background:var(--surface);border-radius:14px;overflow:hidden;min-width:0}
.cb{padding:14px;display:flex;flex-direction:column;gap:10px}
.card.off .cb{gap:4px}
.card.off h3{opacity:.6}
.lock{font-size:.9rem;color:var(--muted)}
.head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.big{font-family:var(--display);font-weight:700;font-size:2.1rem;line-height:1;font-variant-numeric:tabular-nums}
.st{background:#000;border-radius:999px;padding:2px 10px;font-size:.8rem;font-weight:600;white-space:nowrap}
.st.ok{color:var(--ok)} .st.warn{color:var(--warn)} .st.ko{color:var(--ko)}
.rows li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:7px 0;border-top:1px solid var(--line)}
.rows li:first-child{border-top:0}
.rows .r{text-align:right;flex:none;font-variant-numeric:tabular-nums}
.btns{display:flex;flex-wrap:wrap;gap:8px}
.b{background:none;border:2px solid var(--ink);color:var(--ink);border-radius:10px;padding:6px 12px;font-weight:600}
.b.pri{background:var(--ink);color:var(--on-ink)}
.b.sm{padding:3px 10px;font-size:.88rem}
.in{width:100%;background:var(--field);color:var(--field-ink);border:1px solid var(--line);border-radius:10px;padding:8px 10px}
textarea.in{resize:vertical;min-height:64px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chips span{border:1.5px solid var(--ink);border-radius:999px;padding:1px 10px;font-size:.86rem;font-weight:500}
.sw{display:flex;align-items:center;gap:8px;padding:3px 0}
.sw input{width:18px;height:18px;accent-color:var(--ink)}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center;font-family:var(--display);font-weight:600}
.cal small{font-family:var(--body);color:var(--muted);font-size:.72rem;padding-bottom:4px}
.cal span,.cal button{aspect-ratio:1;display:grid;place-items:center;border-radius:50%;position:relative;background:none;border:0;padding:0;font:inherit}
.cal button:hover{background:var(--line)}
.cal .tr{border:2px solid var(--ink)} .cal .past{color:var(--muted)} .cal .today,.cal .today:hover{background:var(--ink);color:var(--on-ink)}
.cal .dl::after{content:"";position:absolute;bottom:3px;width:5px;height:5px;border-radius:50%;background:var(--warn)}
.bars{display:flex;align-items:flex-end;gap:6px;height:90px}
.bars div{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:3px}
.bars i{width:100%;background:var(--ink);border-radius:4px 4px 0 0;min-height:3px}
.bars small{font-size:.72rem;color:var(--muted)}
.prog{height:10px;border-radius:999px;background:var(--line);overflow:hidden}
.prog i{display:block;height:100%;background:var(--ink)}
.scale{display:grid;grid-template-columns:repeat(10,1fr);gap:3px}
.scale button{background:none;border:1.5px solid var(--ink);border-radius:8px;padding:5px 0;font-weight:600}
.scale button[aria-pressed="true"]{background:var(--ink);color:var(--on-ink)}
.chat{display:flex;flex-direction:column;gap:6px}
.chat p{max-width:85%;padding:7px 11px;border-radius:12px;background:var(--bg);overflow-wrap:anywhere}
.chat p.me{align-self:flex-end;background:var(--ink);color:var(--on-ink)}
.send{display:flex;gap:6px}
.vid{display:flex;gap:10px;align-items:center}
.vid i{flex:none;width:74px;height:44px;border-radius:8px;background:var(--bg);display:grid;place-items:center;font-style:normal}
.qr{width:120px;height:120px;display:grid;grid-template-columns:repeat(11,1fr);background:#fff;padding:8px;border-radius:8px}
.qr i.on{background:#000}
.out{background:var(--bg);border-radius:10px;padding:10px}
.out[hidden]{display:none}
.avatar{width:54px;height:54px;border-radius:50%;background:var(--ink);color:var(--on-ink);display:grid;place-items:center;font-family:var(--display);font-weight:700;font-size:1.3rem;flex:none}
#toast{position:fixed;left:50%;bottom:70px;transform:translateX(-50%);background:#fff;color:#111;border:2px solid #111;border-radius:12px;padding:9px 16px;font-weight:600;z-index:30;max-width:90vw}
#toast[hidden]{display:none}

@font-face{font-family:Barlow;src:url("/media/barlow.woff2")}@font-face{font-family:"Barlow Condensed";src:url("/media/barlow-condensed.woff2");font-weight:600 800}
.shell.mob{height:100dvh;min-height:0;grid-template-rows:auto minmax(0,1fr) auto;border:0}
.shell.mob main{overflow:auto}.shell.mob .nav{position:static}.top{align-items:center}.role{font-size:.7rem}.bars .h62{height:62%}.avatar-row{justify-content:flex-start}.prog .pct62{width:62%}.bars .height-0{height:0%}.bars .height-1{height:1%}.bars .height-2{height:2%}.bars .height-3{height:3%}.bars .height-4{height:4%}.bars .height-5{height:5%}.bars .height-6{height:6%}.bars .height-7{height:7%}.bars .height-8{height:8%}.bars .height-9{height:9%}.bars .height-10{height:10%}.bars .height-11{height:11%}.bars .height-12{height:12%}.bars .height-13{height:13%}.bars .height-14{height:14%}.bars .height-15{height:15%}.bars .height-16{height:16%}.bars .height-17{height:17%}.bars .height-18{height:18%}.bars .height-19{height:19%}.bars .height-20{height:20%}.bars .height-21{height:21%}.bars .height-22{height:22%}.bars .height-23{height:23%}.bars .height-24{height:24%}.bars .height-25{height:25%}.bars .height-26{height:26%}.bars .height-27{height:27%}.bars .height-28{height:28%}.bars .height-29{height:29%}.bars .height-30{height:30%}.bars .height-31{height:31%}.bars .height-32{height:32%}.bars .height-33{height:33%}.bars .height-34{height:34%}.bars .height-35{height:35%}.bars .height-36{height:36%}.bars .height-37{height:37%}.bars .height-38{height:38%}.bars .height-39{height:39%}.bars .height-40{height:40%}.bars .height-41{height:41%}.bars .height-42{height:42%}.bars .height-43{height:43%}.bars .height-44{height:44%}.bars .height-45{height:45%}.bars .height-46{height:46%}.bars .height-47{height:47%}.bars .height-48{height:48%}.bars .height-49{height:49%}.bars .height-50{height:50%}.bars .height-51{height:51%}.bars .height-52{height:52%}.bars .height-53{height:53%}.bars .height-54{height:54%}.bars .height-55{height:55%}.bars .height-56{height:56%}.bars .height-57{height:57%}.bars .height-58{height:58%}.bars .height-59{height:59%}.bars .height-60{height:60%}.bars .height-61{height:61%}.bars .height-62{height:62%}.bars .height-63{height:63%}.bars .height-64{height:64%}.bars .height-65{height:65%}.bars .height-66{height:66%}.bars .height-67{height:67%}.bars .height-68{height:68%}.bars .height-69{height:69%}.bars .height-70{height:70%}.bars .height-71{height:71%}.bars .height-72{height:72%}.bars .height-73{height:73%}.bars .height-74{height:74%}.bars .height-75{height:75%}.bars .height-76{height:76%}.bars .height-77{height:77%}.bars .height-78{height:78%}.bars .height-79{height:79%}.bars .height-80{height:80%}.bars .height-81{height:81%}.bars .height-82{height:82%}.bars .height-83{height:83%}.bars .height-84{height:84%}.bars .height-85{height:85%}.bars .height-86{height:86%}.bars .height-87{height:87%}.bars .height-88{height:88%}.bars .height-89{height:89%}.bars .height-90{height:90%}.bars .height-91{height:91%}.bars .height-92{height:92%}.bars .height-93{height:93%}.bars .height-94{height:94%}.bars .height-95{height:95%}.bars .height-96{height:96%}.bars .height-97{height:97%}.bars .height-98{height:98%}.bars .height-99{height:99%}.bars .height-100{height:100%}
.cb{position:relative}.cb>h3:first-of-type,.cb>.head:first-of-type{padding-right:26px}
.tier-mark{position:absolute;top:5px;right:5px;display:grid;place-items:center;width:32px;height:32px;background:transparent;border:0;border-radius:6px;padding:0}
.tier-mark span{width:11px;height:11px;background:var(--c);border-radius:3px;box-shadow:inset 0 0 0 1px #0002}
.card.off .tier-mark{opacity:1}.ai-note{color:var(--muted);font-weight:600;font-size:.72rem}
