/* Pagine utente (accesso, registrazione, profilo, carrello): stessi token e stessa materia della home.
   Si carica dopo fih-shell.css e fih-legacy.css, solo fuori dall'area admin. */
/* Senza Tailwind: reset minimo per queste pagine */
.legacy-skin *, .legacy-skin *::before, .legacy-skin *::after { box-sizing: border-box; }
:where(.legacy-skin) a { color: inherit; }
.auth :where(h1, h2, h3, h4, p, ul, dl, dd, figure) { margin: 0; }
.field, .form__row > *, .panel, .line__body, .cart__main { min-width: 0; }
.hidden { display: none !important; }

.auth { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.auth__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 960px) { .auth__grid { grid-template-columns: 1fr 1.15fr; } .auth__grid--narrow { grid-template-columns: 1fr 1fr; } .auth__aside { position: sticky; top: 7rem; } }
.auth__aside h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-bottom: 1.25rem; }
.auth__aside .lede { margin-bottom: 2rem; }
.auth__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; color: var(--text-muted); }
.auth__facts li { display: grid; grid-template-columns: 1.25rem 1fr; gap: .75rem; align-items: start; }
.auth__facts svg { width: 1.1rem; height: 1.1rem; margin-top: .25rem; color: var(--gold); }
.auth__facts strong { color: var(--text); font-weight: 500; }

.panel { background: var(--glass); border: var(--glass-line); border-radius: 14px; box-shadow: var(--glass-rim); padding: clamp(1.5rem, 4vw, 2.5rem); }
.panel > h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .4rem; }
.panel > .muted { margin: 0 0 1.75rem; }

.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; gap: 1.1rem; align-items: start; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .4rem; }
.field > label, .field__label { font-size: .88rem; color: var(--text-muted); font-weight: 500; }
.field > label small { color: var(--text-muted); opacity: .75; font-weight: 400; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; font-size: 1rem; color: var(--text); background: #0d0d0f; border: 1px solid rgba(237, 232, 221, .2); border-radius: 10px; transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 74, .22); }
.field input.error, .field input.input-validation-error { border-color: #c8463c; }
.field-validation-error, .field__err { color: #f0b8b2; font-size: .85rem; }
.field__hint { font-size: .82rem; color: var(--text-muted); margin: 0; }
.field__hint ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.pwd { position: relative; }
.pwd input { padding-right: 3rem; }
.pwd button { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: none; border: 0; color: var(--text-muted); cursor: pointer; border-radius: 8px; transition: color .18s; }
.pwd button:hover { color: var(--gold-bright); }
.pwd svg { width: 1.2rem; height: 1.2rem; }

.alert { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 10px; background: rgba(200, 70, 60, .14); border: 1px solid rgba(200, 70, 60, .4); color: #f0b8b2; margin-bottom: 1.25rem; font-size: .95rem; }
.alert svg { width: 1.2rem; height: 1.2rem; flex: none; margin-top: .15rem; }
.alert strong { display: block; color: #f7d2cd; font-weight: 500; }
.alert--ok { background: rgba(60, 170, 110, .14); border-color: rgba(60, 170, 110, .4); color: #b6e6cb; }
.alert--ok strong { color: #d6f2e2; }
.note { padding: .9rem 1.1rem; border-radius: 10px; background: rgba(201, 162, 74, .08); border: 1px solid rgba(201, 162, 74, .25); color: var(--text-muted); font-size: .92rem; }

.btn--block { width: 100%; justify-content: center; }
.btn--google { gap: .75rem; }
.btn--google svg { width: 1.15rem; height: 1.15rem; }
.or { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-muted); font-size: .88rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.form__links { display: grid; gap: .6rem; margin-top: 1.5rem; text-align: center; font-size: .92rem; color: var(--text-muted); }
.form__links a { color: var(--gold-bright); text-decoration: none; font-weight: 500; }
.form__links a:hover { text-decoration: underline; }
.crumbs { font-size: .9rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.btn--sm { padding: .45rem 1rem; font-size: .88rem; }
.profile__head { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.5rem; margin-bottom: 2rem; }
.profile__avatar { width: 4.5rem; height: 4.5rem; border-radius: 50%; display: grid; place-items: center; font: 600 1.8rem var(--serif); color: var(--ink); background: var(--gold); flex: none; }
.profile__id { flex: 1 1 14rem; min-width: 0; }
.profile__id h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.profile__id p { margin: .25rem 0 0; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--glass); border: var(--glass-line); border-radius: 14px; box-shadow: var(--glass-rim); padding: 1.1rem 1.4rem; display: grid; gap: .2rem; }
.stat__n { font: 600 1.9rem var(--serif); color: var(--gold-bright); }
.stat__l { font-size: .88rem; color: var(--text-muted); }
.profile__grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 960px) { .profile__grid { grid-template-columns: 1fr 1fr; } }
.profile__grid .panel > h2 { margin-bottom: 1.25rem; }
.dl { margin: 0; display: grid; }
.dl > div { display: grid; gap: .15rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.dl > div:first-child { border-top: 0; padding-top: 0; }
.dl dt { font-size: .82rem; color: var(--text-muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.form--wide { gap: 1.5rem; }
.dl--row { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1.5rem; }
.dl--row > div { border-top: 0; padding: 0; }
.panel .dl { margin-top: 1rem; }
.orders { display: grid; gap: 1rem; max-height: 34rem; overflow: auto; padding-right: .25rem; }
.order { border: 1px solid var(--line-strong); border-radius: 12px; padding: 1.1rem 1.25rem; background: rgba(255, 255, 255, .02); }
.order > header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.order h3 { font: 600 1.05rem var(--sans); }
.order ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .95rem; }
.order li { display: flex; justify-content: space-between; gap: 1rem; color: var(--text-muted); }
.order li span:last-child { color: var(--text); white-space: nowrap; }
.order > footer { display: flex; justify-content: space-between; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.order > footer strong { color: var(--gold-bright); }
.profile__actions { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 2.5rem; }
.strength { display: grid; gap: .35rem; }
.strength__bar { height: 4px; border-radius: 4px; background: var(--line-strong); overflow: hidden; }
.strength__bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s var(--ease-out); }
.reqs { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .88rem; color: var(--text-muted); }
.reqs li { position: relative; padding-left: 1.4rem; }
.reqs li::before { content: ""; position: absolute; left: 0; top: .45em; width: .7rem; height: .7rem; border-radius: 50%; border: 1px solid var(--line-strong); transition: background-color .18s, border-color .18s; }
.reqs li.is-met { color: var(--text); }
.reqs li.is-met::before { background: var(--gold); border-color: var(--gold); }
.progress { height: 3px; border-radius: 3px; background: var(--line-strong); overflow: hidden; margin-bottom: 1.5rem; }
.progress > span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s var(--ease-out); }
.captcha-content { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.captcha-content .text-red-500 { color: #f0b8b2; font-size: .88rem; }
.captcha-content .text-gray-500 { color: var(--text-muted); font-size: .85rem; }

/* ---------- Dettaglio formula, carrello ---------- */
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--text-muted); max-width: 56ch; }
h1 em, h2 em { font-style: normal; color: var(--gold-bright); }
.pg { margin-bottom: clamp(2rem, 4vw, 3rem); display: grid; gap: 1.25rem; }
.pg h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.pg .lede { margin: 0; }
.pricebox { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.pricebox__now { font: 600 clamp(2.4rem, 5vw, 3.4rem) var(--serif); color: var(--gold-bright); letter-spacing: -.02em; }
.pricebox__old { font-size: 1.4rem; color: var(--text-muted); text-decoration: line-through; }
.split { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; } }
.checks { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .9rem; }
.checks li { display: grid; grid-template-columns: 1.25rem 1fr; gap: .75rem; align-items: start; color: var(--text-muted); }
.checks strong { color: var(--text); font-weight: 500; }
.checks svg { width: 1.25rem; height: 1.25rem; color: var(--gold); margin-top: .2rem; }
.qtotal { display: flex; justify-content: space-between; align-items: baseline; padding: .9rem 1rem; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text-muted); }
.qtotal strong { font: 600 1.6rem var(--serif); color: var(--gold-bright); }
.more { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.more > h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.5rem; }
.more__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.more__card { display: grid; gap: .6rem; align-content: start; padding: 1.5rem; border: var(--glass-line); border-radius: 14px; background: var(--glass); box-shadow: var(--glass-rim); text-decoration: none; color: inherit; transition: border-color .2s; }
.more__card h3 { font-size: 1.35rem; transition: color .18s; }
.more__card p { margin: 0; color: var(--text-muted); }
.more__price { font-variant-numeric: tabular-nums; color: var(--gold-bright); font-weight: 500; }
.more__price s { color: var(--text-muted); margin-right: .4rem; }
.more__card:hover { border-color: var(--gold); }
.more__card:hover h3 { color: var(--gold-bright); }
.faq2 { border-top: 1px solid var(--line-strong); max-width: 52rem; }
.faq2 details { border-bottom: 1px solid var(--line-strong); }
.faq2 summary { cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative; font-weight: 500; }
.faq2 summary::-webkit-details-marker { display: none; }
.faq2 summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--gold); transition: transform .2s; }
.faq2 details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq2 summary:hover { color: var(--gold-bright); }
.faq2 p { margin: 0 0 1.2rem; color: var(--text-muted); max-width: 60ch; }

/* ---------- Carrello ---------- */
.cart { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 960px) { .cart { grid-template-columns: 1fr 22rem; } .cart__side { position: sticky; top: 7rem; } }
.cart__main { display: grid; gap: 1.25rem; min-width: 0; }
.cart__side { display: grid; gap: 1rem; }
.tabs { display: flex; gap: .5rem; margin: 1.25rem 0 1.5rem; border-bottom: 1px solid var(--line-strong); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: .7rem 1.1rem; font: inherit; color: var(--text-muted); cursor: pointer; transition: color .18s, border-color .18s; }
.tab:hover { color: var(--gold-bright); }
.tab.is-active { color: var(--text); border-bottom-color: var(--gold); }
[role="tabpanel"][hidden] { display: none; }
.line { display: grid; grid-template-columns: 6rem 1fr auto; gap: 1.25rem; align-items: start; padding: 1.25rem; border: var(--glass-line); border-radius: 14px; background: var(--glass); box-shadow: var(--glass-rim); }
.line img { width: 6rem; height: 6rem; object-fit: cover; border-radius: 10px; background: var(--ink-3); }
.line__body { min-width: 0; }
.line__body h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.line__body p { margin: 0 0 .9rem; }
.line__qty { display: inline-flex; align-items: center; gap: .6rem; }
.qbtn { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; text-decoration: none; font-size: 1.2rem; transition: color .18s, border-color .18s; }
.qbtn:hover { color: var(--gold-bright); border-color: var(--gold); }
.qval { min-width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.line__price { display: grid; gap: .2rem; justify-items: end; text-align: right; }
.line__price strong { font: 600 1.6rem var(--serif); color: var(--gold-bright); }
.line__rm { font-size: .85rem; color: var(--text-muted); }
.line__rm:hover { color: #f0b8b2; }
@media (max-width: 560px) { .line { grid-template-columns: 4.5rem 1fr; } .line img { width: 4.5rem; height: 4.5rem; } .line__price { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; justify-items: start; align-items: baseline; text-align: left; } }
.sum { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .6rem; }
.sum li { display: flex; justify-content: space-between; gap: 1rem; color: var(--text-muted); font-size: .95rem; }
.sum li span:last-child { color: var(--text); white-space: nowrap; }
.sum__total { display: flex; justify-content: space-between; align-items: baseline; margin: 1.1rem 0 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line-strong); }
.sum__total strong { font: 600 1.9rem var(--serif); color: var(--gold-bright); }
.paypal { gap: .6rem; }
.paypal img { height: 1.4rem; width: auto; }
.paypal:disabled { opacity: .45; cursor: not-allowed; }

/* Pulsante WhatsApp, solo fuori dall'area admin */
.tech { flex: none; display: inline-block; width: 1.15rem; height: 1.15rem; background: var(--gold); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.wa-float { position: fixed; right: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 40; width: 3.4rem; height: 3.4rem; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--ink); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .7); transition: background-color .18s, transform .18s; }
.wa-float .tech { width: 1.6rem; height: 1.6rem; }
@media (hover: hover) and (pointer: fine) { .wa-float:hover { background: var(--gold-bright); transform: translateY(-2px); } }
