:root{--brand:#1e3b67;--brand-dark:#172d4e;--ink:#0f172a;--muted:#64748b;--line:#dde5e0;--bg:#f4f7fb;--marketplace-page-max:1440px;--marketplace-page-pad:clamp(18px,2.8vw,40px);--marketplace-shell-max:calc(var(--marketplace-page-max) + var(--marketplace-page-pad) + var(--marketplace-page-pad));}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.account-page{min-height:100vh;display:grid;grid-template-rows:auto 1fr;}
.account-page--auth{grid-template-rows:1fr;background:#fbfcfe;}
.account-page--auth .account-header{display:none;}
.account-page--auth .marketplace-topbar{display:none;}
.auth-back{position:fixed;left:24px;top:24px;z-index:20;width:42px;height:42px;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--ink);display:grid;place-items:center;text-decoration:none;font-size:22px;font-weight:600;line-height:1;box-shadow:0 10px 28px rgba(15,23,42,.08);transition:background .18s ease,border-color .18s ease,transform .18s ease;}
.auth-back:hover{background:#f8fafc;border-color:#cbd5e1;transform:translateX(-2px);}
.account-header{height:68px;background:#fff;border-bottom:1px solid #dde5e0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;padding:0 clamp(18px,5vw,72px);position:sticky;top:0;z-index:30;color:#0f172a;}
.brand{height:68px;display:flex;gap:12px;align-items:center;justify-self:start;padding:0;background:transparent;color:inherit;text-decoration:none;font-size:18px;line-height:1;font-weight:600;min-width:0;}
.account-header .brand:hover,.account-header .brand:focus,.account-header .brand:active,.account-header .brand:visited{background:transparent;color:inherit;text-decoration:none;box-shadow:none;}
.account-header .brand:focus-visible{outline:2px solid rgba(54,90,150,.34);outline-offset:4px;border-radius:12px;}
.account-header .brand:hover .brand-mark,.account-header .brand:focus .brand-mark,.account-header .brand:active .brand-mark{background:var(--brand);color:#fff;}
.brand-mark{width:34px;height:34px;border-radius:10px;background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:600;}
.header-actions{display:flex;gap:10px;align-items:center;justify-self:end;min-width:0;}
.marketplace-account-wrap{position:relative;display:flex;min-width:0;}
.marketplace-account-chip{min-height:46px;min-width:220px;max-width:280px;display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:14px;background:#fff;padding:7px 10px;color:var(--ink);text-align:left;font:inherit;cursor:pointer;}
.marketplace-account-chip:hover{border-color:#cbd5e1;background:#f8fafc;}
.marketplace-account-chip__avatar{width:34px;height:34px;border-radius:9px;background:var(--brand);color:#fff;display:grid;place-items:center;font-size:14px;font-weight:600;flex:0 0 auto;}
.marketplace-account-chip__text{min-width:0;display:grid;gap:1px;flex:1 1 auto;}
.marketplace-account-chip__name{font-weight:600;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.marketplace-account-chip__email{font-size:12px;color:var(--muted);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.marketplace-account-chip__chevron{width:8px;height:8px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg);margin-top:-4px;flex:0 0 auto;}
.marketplace-account-menu{position:absolute;right:0;top:calc(100% + 8px);width:190px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 18px 42px rgba(15,23,42,.14);padding:6px;z-index:30;}
.marketplace-account-menu[hidden]{display:none;}
.marketplace-account-menu a{display:flex;align-items:center;min-height:38px;border-radius:9px;padding:0 10px;font-size:13px;font-weight:600;color:var(--ink);text-decoration:none;}
.marketplace-account-menu a:hover{background:#f1f5f9;}
.marketplace-account-menu a.is-active{background:#e7ecf3;color:var(--brand);}
.marketplace-account-menu a.is-danger{color:#dc2626;}
.btn{height:44px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 20px;text-decoration:none;font-weight:600;}
.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff;}
.btn-primary:hover,.auth-submit:hover{background:var(--brand-dark);border-color:var(--brand-dark);}
.account-main{display:grid;grid-template-columns:minmax(340px,520px) minmax(360px,560px);gap:clamp(34px,7vw,92px);align-items:center;justify-content:center;padding:42px clamp(18px,5vw,76px);}
.account-main--auth-flow{min-height:100vh;grid-template-columns:minmax(280px,360px) minmax(520px,550px);gap:clamp(52px,8vw,128px);align-items:stretch;padding:8px clamp(30px,7vw,116px);}
.auth-stack{min-height:calc(100vh - 16px);display:grid;grid-template-rows:auto 1fr;width:min(100%,360px);padding:66px 0 34px;}
.auth-brand{display:inline-flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none;font-size:22px;font-weight:600;}
.auth-brand .brand-mark{width:42px;height:42px;border-radius:11px;}
.auth-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:clamp(24px,4vw,48px);box-shadow:0 22px 60px rgba(15,23,42,.08);}
.account-page--auth .auth-card{align-self:center;background:transparent;border:0;border-radius:0;padding:0;box-shadow:none;}
.account-page--auth .eyebrow{display:none;}
.account-page--auth h1{font-size:22px;line-height:1.25;margin:0 0 4px;font-weight:600;}
.account-page--auth .lead{font-size:13px;line-height:1.45;color:#68746f;margin:0 0 26px;}
.account-page--auth .form{gap:13px;}
.account-page--auth label{gap:7px;font-size:12px;font-weight:600;color:#1f2937;}
.account-page--auth input{height:40px;border-radius:5px;background:#fff;padding:0 12px;font-size:13px;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.account-page--auth .auth-submit{height:42px;border-radius:5px;margin-top:24px;background:#1e3b67;border-color:#1e3b67;font-size:13px;}
.account-page--auth .auth-submit:hover{background:#186a9c;border-color:#186a9c;}
.account-page--auth .links{justify-content:space-between;margin-top:13px;font-size:12px;color:#cbd5e1;}
.account-page--auth .links a{color:#176f9f;font-weight:600;}
.eyebrow{margin:0 0 8px;color:var(--brand);font-size:12px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;}
h1{margin:0 0 8px;font-size:clamp(34px,5vw,54px);line-height:1.02;letter-spacing:0;}
.lead{margin:0 0 28px;color:#42526b;font-size:16px;line-height:1.6;}
.alert{border:1px solid #fecaca;background:#fef2f2;color:#991b1b;border-radius:12px;padding:12px 14px;font-size:13px;line-height:1.5;margin-bottom:14px;}
.alert-success{border-color:#bbf7d0;background:#f0fdf4;color:#166534;}
.form{display:grid;gap:14px;}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
label{display:grid;gap:7px;font-size:12px;font-weight:600;color:#334155;}
input{width:100%;height:46px;border:1px solid #cfd8e6;border-radius:10px;background:#fff;color:var(--ink);padding:0 13px;font:inherit;outline:none;}
input:focus{border-color:var(--brand);box-shadow:0 0 0 4px rgba(54,90,150,.13);}
.auth-submit{height:48px;border:1px solid var(--brand);border-radius:10px;background:var(--brand);color:#fff;font-size:15px;font-weight:600;cursor:pointer;}
.links{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:14px;color:#94a3b8;font-size:14px;}
.links a{color:var(--ink);font-weight:600;text-decoration:none;}
.links a:hover{text-decoration:underline;}
.links--start{justify-content:flex-start;margin-top:0;}
.visual-card{align-self:stretch;min-height:560px;border-radius:26px;background:linear-gradient(135deg,#294f87,#8aabdd);position:relative;overflow:hidden;box-shadow:0 26px 70px rgba(54,90,150,.24);display:flex;flex-direction:column;justify-content:flex-end;color:#fff;padding:30px;}
.account-page--auth .visual-card{min-height:calc(100vh - 16px);border-radius:8px;background:linear-gradient(150deg,#2c5798 0%,#2b5593 48%,#5283cd 100%);justify-content:flex-start;padding:48px;box-shadow:0 24px 70px rgba(25,88,165,.25);}
.visual-card::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 20% 15%,rgba(255,255,255,.26),transparent 34%),linear-gradient(135deg,rgba(15,23,42,.1),rgba(15,23,42,.32));z-index:1;}
.account-page--auth .visual-card::before{background:radial-gradient(circle at 30% 21%,rgba(255,255,255,.12),transparent 30%),linear-gradient(115deg,rgba(255,255,255,.05) 0 40%,rgba(7,34,86,.13) 40% 100%);z-index:1;}
.visual-card.has-cover::after{content:"";position:absolute;inset:0;background-image:var(--cover);background-size:cover;background-position:center;filter:saturate(.95);z-index:0;}
.visual-card.has-cover::before{background:linear-gradient(135deg,rgba(15,23,42,.54),rgba(54,90,150,.76));}
.visual-content{position:relative;z-index:2;display:grid;gap:16px;}
.account-page--auth .visual-content{max-width:360px;gap:14px;}
.tenant-badge{width:76px;height:76px;border-radius:24px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.34);display:grid;place-items:center;overflow:hidden;font-size:32px;font-weight:600;}
.account-page--auth .tenant-badge{width:54px;height:54px;border-radius:15px;font-size:24px;background:rgba(255,255,255,.17);}
.tenant-badge img{width:100%;height:100%;object-fit:cover;}
.visual-card h2{margin:0;font-size:34px;line-height:1.1;}
.account-page--auth .visual-card h2{font-size:27px;line-height:1.14;max-width:330px;}
.visual-card p{margin:0;color:rgba(255,255,255,.86);font-size:15px;line-height:1.65;max-width:440px;}
.account-page--auth .visual-card p{font-size:13px;line-height:1.55;color:rgba(255,255,255,.86);max-width:330px;}
.visual-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px;}
.visual-actions a{border:1px solid rgba(255,255,255,.48);color:#fff;background:rgba(255,255,255,.12);border-radius:999px;height:40px;padding:0 16px;display:inline-flex;align-items:center;text-decoration:none;font-weight:600;}
.visual-actions a.is-light{background:#fff;color:var(--brand);border-color:#fff;}
.account-page--auth .visual-actions a{height:38px;border-radius:5px;font-size:12px;}
.product-device{position:absolute;right:-118px;bottom:-54px;width:520px;height:640px;border-radius:36px;background:#111827;box-shadow:0 32px 76px rgba(4,24,64,.42);transform:rotate(-31deg);z-index:2;padding:14px;}
.product-device::before{content:"";position:absolute;inset:8px;border-radius:30px;border:1px solid rgba(255,255,255,.14);pointer-events:none;}
.product-screen{height:100%;border-radius:26px;background:#f8fafc;overflow:hidden;display:grid;grid-template-columns:118px 1fr;color:#0f172a;}
.product-sidebar{background:#ffffff;border-right:1px solid #e5eaf2;padding:34px 14px;display:grid;align-content:start;gap:13px;}
.product-dot{width:54px;height:10px;border-radius:999px;background:#d9e3f2;}
.product-dot:nth-child(2){width:72px}.product-dot:nth-child(3){width:62px}.product-dot:nth-child(4){width:82px}.product-dot:nth-child(5){width:58px}
.product-area{padding:34px 24px;display:grid;grid-template-rows:auto 1fr;gap:18px;}
.product-top{display:flex;justify-content:space-between;gap:14px;align-items:start;}
.product-title-lines{display:grid;gap:8px;}
.product-title-lines span{height:12px;border-radius:999px;background:#dbe5f5;display:block;}
.product-title-lines span:first-child{width:130px}.product-title-lines span:last-child{width:88px}
.product-kpi{width:72px;height:58px;border-radius:14px;background:#e9f7ff;border:1px solid #d6ecfb;}
.product-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.product-card{border:1px solid #e5eaf2;border-radius:16px;background:#fff;padding:14px;display:grid;align-content:start;gap:10px;}
.product-card span{height:9px;border-radius:999px;background:#dbe5f5;display:block;}
.product-card span:nth-child(2){width:72%}.product-card span:nth-child(3){width:48%}
.product-card.is-tall{grid-row:span 2;}
.code-input{letter-spacing:.35em;text-align:center;font-size:20px;font-weight:600;}
.account-main--wide{display:block;max-width:var(--marketplace-shell-max);width:100%;margin:0 auto;padding:42px var(--marketplace-page-pad);}
.account-panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:clamp(22px,4vw,38px);box-shadow:0 22px 60px rgba(15,23,42,.08);}
.account-panel__head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:22px;}
.account-panel__head h1{font-size:clamp(30px,4vw,46px);}
.account-panel__head p{margin:6px 0 0;color:#475569;line-height:1.55;}
.activity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px;}
.activity-card{border:1px solid var(--line);border-radius:16px;padding:18px;background:#fff;display:grid;gap:14px;min-height:190px;}
.activity-card__top{display:flex;align-items:center;gap:12px;min-width:0;}
.activity-card__copy{min-width:0;}
.activity-logo{width:46px;height:46px;border-radius:12px;background:#e7ecf3;color:var(--brand);display:grid;place-items:center;font-weight:600;overflow:hidden;flex:0 0 auto;}
.activity-logo img{width:100%;height:100%;object-fit:cover;}
.activity-title{font-size:18px;font-weight:600;line-height:1.15;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;}
.activity-meta{color:#64748b;font-size:13px;line-height:1.45;}
.activity-locations{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:8px;color:#64748b;font-size:12px;line-height:1.35;}
.activity-location-chip{border:1px solid #dbe5f3;background:#f7f8fa;color:#31507f;border-radius:999px;padding:4px 8px;font-weight:600;}
.activity-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:auto;}
.favorite-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;}
.favorite-card{border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 16px 36px rgba(15,23,42,.06);}
.favorite-card__media{height:150px;background:#e5ebf3;color:var(--brand);display:grid;place-items:center;text-decoration:none;font-size:34px;font-weight:600;overflow:hidden;}
.favorite-card__media img{width:100%;height:100%;object-fit:cover;}
.favorite-card__body{padding:16px;display:grid;gap:10px;}
.favorite-card__title{margin:0;font-size:18px;line-height:1.15;font-weight:600;}
.favorite-card__meta{color:#64748b;font-size:13px;line-height:1.45;}
.favorite-card__actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.favorite-card__remove-form{display:inline;}
.favorite-card__remove{height:38px;border:1px solid #fecaca;border-radius:999px;background:#fff;color:#dc2626;padding:0 14px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;}
.favorite-card__remove:hover{background:#fef2f2;}
.empty-state{border:1px dashed #cbd5e1;border-radius:16px;padding:28px;background:#f8fafc;text-align:center;color:#475569;}
.profile-form{max-width:760px;}
.readonly-field{background:#f8fafc;color:#64748b;}
.account-section-divider{height:1px;background:var(--line);margin:26px 0;}
.profile-security-head{margin-bottom:14px;}
.profile-security-head h2{margin:0 0 6px;font-size:22px;line-height:1.15;font-weight:600;}
.profile-security-head p{margin:0;color:#475569;line-height:1.45;}
.auth-submit--compact{width:auto;padding:0 24px;}
.form-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:4px;}
.auth-resend-form{margin-top:12px;}
.auth-resend-button{width:100%;}
/* Profilo: consensi, «Scarica i miei dati», «Elimina account» (audit ottobre 2026, S1-28). */
button.btn{font:inherit;font-weight:600;cursor:pointer;}
button.btn:disabled,.auth-submit:disabled{opacity:.6;cursor:default;}
.profile-consent{display:flex;align-items:flex-start;gap:10px;font-size:14px;font-weight:500;line-height:1.5;color:#334155;}
.profile-consent input{width:18px;height:18px;margin-top:2px;padding:0;flex:0 0 auto;accent-color:var(--brand);box-shadow:none;}
.profile-note{margin:0;color:#64748b;font-size:13px;line-height:1.5;}
.profile-delete-box{border:1px solid #fecaca;background:#fef2f2;border-radius:12px;padding:14px 16px;color:#7f1d1d;font-size:13px;line-height:1.55;}
.profile-delete-box p{margin:0 0 8px;}
.profile-delete-box p:last-child,.profile-delete-box ul:last-child{margin-bottom:0;}
.profile-delete-box ul{margin:0 0 8px;padding-left:18px;}
.btn-danger{border-color:#fecaca;color:#dc2626;}
.btn-danger:hover{background:#fef2f2;}
.btn-danger--solid{background:#dc2626;border-color:#dc2626;color:#fff;}
.btn-danger--solid:hover{background:#b91c1c;border-color:#b91c1c;}
@media (max-width:1100px){.product-device{right:-190px;width:500px}.account-main--auth-flow{grid-template-columns:minmax(280px,360px) minmax(420px,1fr);gap:48px}}
@media (max-width:900px){.account-main{grid-template-columns:1fr;}.account-main--auth-flow{padding:22px clamp(18px,5vw,40px);}.auth-stack{min-height:auto;padding:14px 0 0;}.visual-card{min-height:360px;order:-1}.account-page--auth .visual-card{min-height:380px;order:0}.product-device{width:390px;height:470px;right:-138px;bottom:-56px}.account-header{position:static;height:auto;min-height:68px;display:flex;flex-wrap:wrap;gap:12px;padding-top:12px;padding-bottom:12px}.brand{height:auto;padding:0;background:transparent}.header-actions{flex-wrap:wrap;margin-left:auto}.marketplace-account-chip{min-width:0;flex:1 1 210px}.grid-2{grid-template-columns:1fr}}
@media (max-width:560px){.account-main,.account-main--wide{padding:22px 12px}.auth-card,.account-panel{padding:22px 16px}.account-page--auth .auth-card{padding:0}.account-header{padding-top:12px;padding-bottom:12px}.header-actions{width:100%;}.marketplace-account-wrap{flex:1 1 100%;width:100%;}.marketplace-account-menu{left:0;right:auto;width:100%;}.btn{flex:1;padding:0 12px}.auth-back{left:14px;top:14px;width:38px;height:38px;font-size:20px}.visual-card{border-radius:18px;min-height:280px}.account-page--auth .visual-card{display:none}.visual-card h2{font-size:28px}.account-panel__head{display:grid}.activity-grid,.favorite-grid{grid-template-columns:1fr}.auth-brand{font-size:20px}.auth-stack{width:100%;padding-top:58px;}}
