/* ═══════════════════════════════════════════════════════════
   ENEA DIAGNOSIS — stile (ricostruito, pulito)
   ═══════════════════════════════════════════════════════════ */
:root{
  --navy:#0B3D78; --navy-700:#0D4E9A; --navy-600:#1860BE; --b400:#3D8EE8;
  --amber:#F5A623; --amber-600:#D4881A; --amber-50:#FEF6E7;
  --bg:#f1f3f6; --card:#ffffff;
  --ink:#111008; --muted:#7A756E; --line:#E4E1D8;
  --green:#1DB954; --green-50:#E8F8EE;
  --red:#E23535; --red-50:#FEF0F0;
  --blue-50:#EBF5FF;
  --r:14px; --r-sm:10px;
  --sh-sm:0 1px 2px rgba(16,32,55,.06);
  --sh:0 6px 24px rgba(16,32,55,.08);
  --sh-lg:0 18px 48px rgba(16,32,55,.16);
  --sb-w:248px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:"Hanken Grotesk",system-ui,sans-serif;
  color:var(--ink); background:var(--bg);
  -webkit-font-smoothing:antialiased; line-height:1.5;
}
h1,h2,h3,.brand-name{font-family:"Bricolage Grotesque","Hanken Grotesk",sans-serif;font-weight:700;letter-spacing:-.01em}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer}
svg{display:block}
.hidden{display:none!important}

/* ── Scrollbar ── */
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#cdd4de;border-radius:8px;border:2px solid var(--bg)}

/* ═══ AUTH ═══ */
#auth{
  min-height:100vh;display:grid;grid-template-columns:1.1fr 1fr;
}
.auth-art{
  position:relative;overflow:hidden;
  background:linear-gradient(135deg,#0B3D78 0%,#0D4E9A 50%,#3D8EE8 100%);
  color:#fff;padding:56px;display:flex;flex-direction:column;justify-content:space-between;
}
.auth-art::after{
  content:"";position:absolute;right:-120px;bottom:-120px;width:420px;height:420px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.22),transparent 65%);filter:blur(8px);
}
.auth-art .brand{display:flex;align-items:center;gap:12px;position:relative;z-index:1}
.auth-art .brand .mark{width:42px;height:42px;border-radius:11px;background:rgba(255,255,255,.12);display:grid;place-items:center}
.auth-art .brand .mark svg{width:24px;height:24px;stroke:var(--amber)}
.auth-art .brand-name{font-size:22px;letter-spacing:.18em;color:#fff}
.auth-art .brand-sub{font-size:11px;letter-spacing:.22em;color:rgba(255,255,255,.6);text-transform:uppercase}
.auth-hero{position:relative;z-index:1;max-width:440px}
.auth-hero h1{font-size:42px;line-height:1.05;color:#fff;margin-bottom:18px}
.auth-hero p{color:rgba(255,255,255,.78);font-size:17px}
.auth-points{list-style:none;margin-top:26px;display:grid;gap:12px}
.auth-points li{display:flex;gap:11px;align-items:center;color:rgba(255,255,255,.9);font-size:15px}
.auth-points svg{width:20px;height:20px;stroke:var(--amber);flex:none}
.auth-foot{position:relative;z-index:1;font-size:13px;color:rgba(255,255,255,.55)}

.auth-form-wrap{display:grid;place-items:center;padding:40px}
.auth-card{width:100%;max-width:400px}
.auth-tabs{display:flex;gap:6px;background:#eef1f5;border-radius:12px;padding:5px;margin-bottom:26px}
.auth-tabs button{flex:1;border:0;background:transparent;padding:10px;border-radius:8px;font-weight:600;color:var(--muted);font-size:14px}
.auth-tabs button.on{background:#fff;color:var(--navy);box-shadow:var(--sh-sm)}
.auth-card h2{font-size:26px;margin-bottom:6px}
.auth-card .lead{color:var(--muted);margin-bottom:24px;font-size:15px}

/* ═══ FORM ═══ */
.field{margin-bottom:15px}
.field label{display:block;font-size:13px;font-weight:600;color:var(--ink);margin-bottom:6px}
.input,select,textarea{
  width:100%;border:1.5px solid var(--line);border-radius:var(--r-sm);
  padding:11px 13px;font-size:15px;font-family:inherit;color:var(--ink);background:#fff;transition:border-color .15s,box-shadow .15s;
}
textarea{resize:vertical;min-height:84px}
.input:focus,select:focus,textarea:focus{outline:0;border-color:var(--navy-600);box-shadow:0 0 0 3px rgba(29,74,120,.12)}
.row-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.role-pick{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:15px}
.role-pick .opt{border:1.5px solid var(--line);border-radius:var(--r-sm);padding:12px 8px;text-align:center;font-size:13px;font-weight:600;color:var(--muted);transition:.15s}
.role-pick .opt.on{border-color:var(--amber);background:var(--amber-50);color:var(--amber-600)}
.role-pick .opt svg{width:22px;height:22px;margin:0 auto 6px;stroke:currentColor}

/* ═══ BUTTONS ═══ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:var(--r-sm);
  padding:11px 18px;font-size:14px;font-weight:600;transition:.15s;white-space:nowrap}
.btn svg{width:17px;height:17px;stroke:currentColor}
.btn-primary{background:var(--navy);color:#fff}
.btn-primary:hover{background:var(--navy-700)}
.btn-accent{background:var(--amber);color:#3a2600}
.btn-accent:hover{background:var(--amber-600);color:#fff}
.btn-ghost{background:#eef1f5;color:var(--navy)}
.btn-ghost:hover{background:#e2e7ee}
.btn-danger{background:var(--red-50);color:var(--red)}
.btn-danger:hover{background:#f8d7d7}
.btn-full{width:100%}
.btn-sm{padding:8px 13px;font-size:13px}
.btn-icon{padding:9px;border-radius:9px}
.btn:disabled{opacity:.55;cursor:default}

/* ═══ APP SHELL ═══ */
#shell{display:flex;min-height:100vh}
#sidebar{
  width:var(--sb-w);flex:none;background:var(--navy);color:#fff;
  display:flex;flex-direction:column;position:sticky;top:0;height:100vh;
}
.sb-brand{display:flex;align-items:center;gap:11px;padding:20px 18px;border-bottom:1px solid rgba(255,255,255,.08)}
.sb-brand .mark{width:38px;height:38px;border-radius:10px;background:rgba(255,255,255,.1);display:grid;place-items:center}
.sb-brand .mark svg{width:21px;height:21px;stroke:var(--amber)}
.sb-brand .brand-name{font-size:17px;letter-spacing:.16em;color:#fff}
.sb-brand .brand-sub{font-size:9.5px;letter-spacing:.2em;color:rgba(255,255,255,.55);text-transform:uppercase}
.sb-nav{flex:1;overflow-y:auto;padding:14px 12px}
.sb-label{font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.4);padding:14px 10px 7px}
.nav-item{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:10px;color:rgba(255,255,255,.78);font-size:14.5px;font-weight:500;cursor:pointer;transition:.13s;margin-bottom:2px}
.nav-item svg{width:19px;height:19px;stroke:currentColor;flex:none}
.nav-item:hover{background:rgba(255,255,255,.07);color:#fff}
.nav-item.on{background:var(--navy-600);color:#fff;font-weight:600}
.nav-item .badge{margin-left:auto;background:rgba(255,255,255,.18);color:#fff;font-size:11px;font-weight:700;padding:1px 7px;border-radius:20px}
.nav-item.on .badge{background:rgba(0,0,0,.18);color:#fff}
.sb-user{padding:14px;border-top:1px solid rgba(255,255,255,.08);display:flex;align-items:center;gap:11px}
.avatar{width:38px;height:38px;border-radius:10px;background:var(--amber);color:#3a2600;display:grid;place-items:center;font-weight:700;font-size:14px;flex:none}
.sb-user .who{min-width:0;flex:1}
.sb-user .who .n{font-size:13.5px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-user .who .r{font-size:11px;color:rgba(255,255,255,.55);text-transform:capitalize}

#main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{height:62px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:0 24px;position:sticky;top:0;z-index:20}
.topbar .hamb{display:none;background:#eef1f5;border:0;border-radius:9px;padding:9px}
.topbar .hamb svg{width:20px;height:20px;stroke:var(--navy)}
.topbar .pg-title{font-size:18px}
.topbar .sp{flex:1}
#view{padding:28px 30px;max-width:1180px;width:100%;margin:0 auto;flex:1}

/* ═══ PAGE PRIMITIVES ═══ */
.page-head{margin-bottom:22px}
.page-head h1{font-size:27px;margin-bottom:4px}
.page-head p{color:var(--muted);font-size:15px}
.hstack{display:flex;align-items:center;gap:12px}
.between{justify-content:space-between}
.grid-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:16px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh-sm)}
.card-pad{padding:18px}
.empty{text-align:center;padding:54px 20px;color:var(--muted)}
.empty svg{width:46px;height:46px;stroke:#c2cad6;margin:0 auto 14px}
.empty h3{color:var(--ink);font-size:17px;margin-bottom:5px}
.spinner{width:30px;height:30px;border:3px solid var(--line);border-top-color:var(--navy);border-radius:50%;animation:spin .8s linear infinite;margin:46px auto}
@keyframes spin{to{transform:rotate(360deg)}}

/* hero / dashboard */
.hero{position:relative;overflow:hidden;border-radius:var(--r);color:#fff;
  background:linear-gradient(135deg,#0B3D78 0%,#0D4E9A 55%,#1860BE 100%);padding:30px 32px;margin-bottom:22px}
.hero::after{content:"";position:absolute;right:-60px;top:-60px;width:230px;height:230px;border-radius:50%;
  background:radial-gradient(circle,rgba(61,142,232,.55),transparent 65%)}
.hero .eyebrow{font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--amber);font-weight:700;position:relative}
.hero h2{font-size:30px;line-height:1.1;margin:8px 0 18px;color:#fff;position:relative;max-width:520px}
.hero .btn{position:relative}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin-bottom:22px}
.stat{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:18px;box-shadow:var(--sh-sm)}
.stat .ico{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;margin-bottom:12px}
.stat .ico svg{width:20px;height:20px}
.stat .num{font-size:30px;font-weight:700;font-family:"Bricolage Grotesque",sans-serif;line-height:1}
.stat .lab{font-size:13px;color:var(--muted);margin-top:3px}
.quick{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.quick-card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:18px;cursor:pointer;transition:.15s;box-shadow:var(--sh-sm)}
.quick-card:hover{transform:translateY(-2px);box-shadow:var(--sh);border-color:#d3dae5}
.quick-card .ico{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;margin-bottom:13px}
.quick-card .ico svg{width:22px;height:22px}
.quick-card h3{font-size:16px;margin-bottom:3px}
.quick-card p{font-size:13px;color:var(--muted)}

/* list item card */
.item{display:flex;align-items:center;gap:14px;padding:16px 18px;border-bottom:1px solid var(--line)}
.item:last-child{border-bottom:0}
.item .ic{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;flex:none}
.item .ic svg{width:21px;height:21px}
.item .bd{flex:1;min-width:0}
.item .bd .t{font-weight:600;font-size:15px}
.item .bd .s{font-size:13px;color:var(--muted);margin-top:2px}
.item .act{display:flex;gap:7px}

/* chips & badges */
.chip{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;padding:3px 10px;border-radius:20px}
.chip-blue{background:var(--blue-50);color:var(--navy-600)}
.chip-amber{background:var(--amber-50);color:var(--amber-600)}
.chip-green{background:var(--green-50);color:var(--green)}
.chip-red{background:var(--red-50);color:var(--red)}
.chip-gray{background:#eef1f5;color:var(--muted)}

/* table */
.tbl{width:100%;border-collapse:collapse;font-size:14px}
.tbl th{text-align:left;font-size:11.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);padding:11px 14px;border-bottom:1px solid var(--line)}
.tbl td{padding:13px 14px;border-bottom:1px solid var(--line)}
.tbl tr:last-child td{border-bottom:0}
.tbl tr:hover td{background:#fafbfc}

/* filters */
.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.filters .input,.filters select{width:auto;min-width:160px}
.search-big{position:relative;margin-bottom:8px}
.search-big svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:20px;height:20px;stroke:var(--muted)}
.search-big input{padding-left:44px;height:50px;font-size:16px}

/* detail blocks */
.kv{display:grid;grid-template-columns:140px 1fr;gap:10px 16px;font-size:14px}
.kv dt{color:var(--muted);font-weight:600}
.detail-sec{padding:16px 18px;border-radius:var(--r-sm);margin-top:12px}
.detail-sec h4{font-size:12px;letter-spacing:.05em;text-transform:uppercase;margin-bottom:6px}

/* ═══ MODAL ═══ */
#modal-bg{position:fixed;inset:0;background:rgba(13,26,44,.55);backdrop-filter:blur(2px);display:grid;place-items:center;z-index:60;padding:20px;animation:fade .15s}
@keyframes fade{from{opacity:0}}
.modal{background:#fff;border-radius:16px;width:100%;max-width:520px;max-height:90vh;overflow:auto;box-shadow:var(--sh-lg);animation:pop .18s}
@keyframes pop{from{transform:translateY(12px) scale(.98);opacity:0}}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid var(--line)}
.modal-head h3{font-size:19px}
.modal-head .x{background:#eef1f5;border:0;border-radius:9px;padding:8px;cursor:pointer}
.modal-head .x svg{width:18px;height:18px;stroke:var(--muted)}
.modal-body{padding:22px}
.modal-foot{padding:16px 22px;border-top:1px solid var(--line);display:flex;gap:10px;justify-content:flex-end}

/* ═══ TOAST ═══ */
#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%) translateY(20px);
  background:var(--navy);color:#fff;padding:13px 20px;border-radius:12px;font-size:14px;font-weight:500;
  box-shadow:var(--sh-lg);z-index:90;opacity:0;pointer-events:none;transition:.25s;max-width:90vw}
#toast.on{opacity:1;transform:translateX(-50%) translateY(0)}
#toast.err{background:var(--red)}
#toast.ok{background:var(--green)}

/* ═══ MOBILE ═══ */
#sb-overlay{display:none;position:fixed;inset:0;background:rgba(13,26,44,.5);z-index:39}
@media(max-width:860px){
  #auth{grid-template-columns:1fr}
  .auth-art{display:none}
  #sidebar{position:fixed;left:0;top:0;z-index:40;transform:translateX(-100%);transition:transform .22s;box-shadow:var(--sh-lg)}
  #sidebar.open{transform:translateX(0)}
  #sb-overlay.show{display:block}
  .topbar .hamb{display:grid;place-items:center}
  #view{padding:20px 16px}
  .row-2{grid-template-columns:1fr}
  .kv{grid-template-columns:1fr}
  .kv dt{margin-top:6px}
}
.fade-in{animation:fadeIn .25s ease}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}}

/* ═══ V2 — Come funziona ═══ */
.steps3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:22px}
@media(max-width:768px){.steps3{grid-template-columns:1fr}}
.step3{background:#fff;border-radius:var(--rb);padding:18px;box-shadow:var(--sh);display:flex;gap:13px;align-items:flex-start}
.step3 .n{width:32px;height:32px;border-radius:50%;background:var(--b800);color:#fff;display:grid;place-items:center;font-weight:700;font-size:14px;flex:none}
.step3 h4{font-size:14px;font-weight:600;margin-bottom:2px}
.step3 p{font-size:12px;color:var(--th)}

/* ═══ V2 — Diagnosi guidata ═══ */
.diag-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin:16px 0}
.diag-opt{border:1.5px solid var(--n200);border-radius:12px;padding:18px 12px;text-align:center;cursor:pointer;transition:all .2s;background:#fff}
.diag-opt:hover{border-color:var(--b400);background:var(--b20)}
.diag-opt.on{border-color:var(--b800);background:var(--b20)}
.diag-opt .ic2{width:44px;height:44px;border-radius:12px;background:var(--b50);color:var(--b800);display:grid;place-items:center;margin:0 auto 10px}
.diag-opt .ic2 svg{width:22px;height:22px;stroke:currentColor}
.diag-opt .lb{font-size:13px;font-weight:600;color:var(--tx)}
.diag-ans{display:grid;gap:8px;margin-top:14px}
.diag-ans .opt{border:1.5px solid var(--n200);border-radius:12px;padding:14px 16px;text-align:left;cursor:pointer;background:#fff;font-size:14px;font-weight:500;color:var(--tx);transition:all .15s}
.diag-ans .opt:hover{border-color:var(--b400);background:var(--b20)}
.dprog{height:5px;background:var(--n100);border-radius:99px;margin:6px 0 18px;overflow:hidden}
.dprog i{display:block;height:100%;background:var(--b800);border-radius:99px;transition:width .3s}
.result-card{background:#fff;border-radius:var(--rb);border:1.5px solid var(--n200);padding:24px;margin-bottom:16px}
.result-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:99px;font-size:12px;font-weight:700;margin-bottom:14px}
.rb-high{background:var(--r50);color:var(--rT)}
.rb-med{background:var(--a50);color:var(--aT)}
.rb-low{background:var(--g50);color:var(--gT)}
.cause{display:flex;gap:11px;padding:10px 0;border-bottom:1px solid var(--n100)}
.cause:last-child{border-bottom:0}
.cause .cn{width:24px;height:24px;border-radius:50%;background:var(--b50);color:var(--b800);font-size:12px;font-weight:700;display:grid;place-items:center;flex:none;margin-top:1px}
.cause .ct{font-size:14px;font-weight:600;color:var(--tx)}
.cause .cd{font-size:12.5px;color:var(--th);margin-top:1px}
.rinfo{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:16px}
.rinfo .ri{background:var(--n50);border-radius:10px;padding:12px;display:flex;gap:10px;align-items:center}
.rinfo .ri svg{width:18px;height:18px;stroke:var(--b800);flex:none}
.rinfo .ri b{font-size:14px;display:block}
.rinfo .ri span{font-size:11px;color:var(--th)}

/* ═══ V2 — Brand chips (errori display) ═══ */
.brandrow{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 4px}
.brandchip{--bc:var(--b800);border:1.5px solid var(--bc);color:var(--bc);background:#fff;border-radius:99px;padding:7px 14px;font-size:12px;font-weight:700;cursor:pointer;transition:all .15s}
.brandchip:hover{background:color-mix(in srgb,var(--bc) 8%, #fff)}
.brandchip.on{background:var(--bc);color:#fff}
.ai-card{background:var(--b20);border:1.5px solid var(--b100);border-radius:var(--rb);padding:18px 20px;margin-top:14px}
.ai-card .ai-h{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--b800);margin-bottom:8px}
.ai-card .ai-h svg{width:16px;height:16px;stroke:var(--b800)}
.ai-card .ai-t{font-size:14px;color:var(--ts);white-space:pre-wrap;line-height:1.65}

/* ═══ V2 — Banner piani (tecnici, social, profili) ═══ */
.pbanner{height:50px;display:flex;align-items:center;justify-content:flex-end;padding:0 14px;gap:6px;font-size:10.5px;font-weight:800;letter-spacing:.12em;color:#fff}
.pbanner svg{width:15px;height:15px;stroke:currentColor}
.pl-premium{background:linear-gradient(135deg,#FFD54A,#F5A623);color:#6b4a00}
.pl-avanzato{background:linear-gradient(135deg,var(--b600),var(--b400))}
.pl-base{background:var(--n100);color:transparent}
.chip-gold{background:#FFF3D1;color:#9A6B00}
.tec-card{overflow:hidden}
.tec-body{padding:0 18px 18px}
.tec-body .avatar{width:52px;height:52px;border-radius:14px;font-size:17px;margin-top:-26px;border:3px solid #fff;box-shadow:var(--sh)}
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.avatar{overflow:hidden}

/* ═══ V2 — Social ═══ */
.beta{background:var(--a50);color:var(--aT);font-size:10px;font-weight:800;letter-spacing:.08em;padding:3px 9px;border-radius:99px}
/* Banner BETA in cima a Feed e Chat */
.beta-banner{display:flex;align-items:center;gap:8px;background:linear-gradient(135deg,#fff7ed,#fef3c7);border:1px solid #f59e0b;border-radius:10px;padding:10px 14px;font-size:12.5px;color:#92400e;margin-bottom:14px;flex-wrap:wrap}
.beta-banner svg{width:15px;height:15px;flex-shrink:0;stroke:#f59e0b}
.beta-banner b{color:#78350f}
.beta-banner a{color:#92400e;text-decoration:underline}
.beta-banner a:hover{color:#78350f}
.composer textarea{border:0;resize:none;font-size:14px;padding:6px 0;min-height:52px}
.composer textarea:focus{box-shadow:none;border:0}
.post{margin-bottom:18px;overflow:hidden}
.post-head{display:flex;align-items:center;gap:11px;padding:0 16px 12px}
.post-head .avatar{width:44px;height:44px;border-radius:12px;margin-top:-22px;border:3px solid #fff;box-shadow:var(--sh)}
.post-img{width:100%;max-height:480px;object-fit:cover;display:block;background:var(--n100)}
.post video{width:100%;max-height:480px;display:block;background:#000}
.post-txt{padding:12px 16px;font-size:14px;color:var(--ts);line-height:1.6}
.post-actions{display:flex;align-items:center;gap:6px;padding:4px 10px 12px}
.pa-btn{display:inline-flex;align-items:center;gap:6px;background:none;border:0;border-radius:9px;padding:7px 10px;font-size:13px;font-weight:600;color:var(--ts);cursor:pointer;transition:background .12s}
.pa-btn:hover{background:var(--n50)}
.pa-btn svg{width:19px;height:19px;stroke:currentColor;fill:none}
.pa-btn.liked{color:var(--red)}
.pa-btn.liked svg{fill:var(--red)}
.comments{background:var(--n50);border-top:1px solid var(--n100);padding:12px 16px}
.crow{display:flex;gap:9px;padding:7px 0;align-items:flex-start}
.crow .avatar{width:28px;height:28px;border-radius:8px;font-size:10px}
.crow .cb{font-size:13px;color:var(--ts)}
.crow .cb b{color:var(--tx)}
.crow .ctm{font-size:11px;color:var(--th);margin-left:6px}
.cinput{display:flex;gap:8px;margin-top:8px}
.cinput input{flex:1}
.sprof-banner{position:relative;height:152px;border-radius:var(--rb) var(--rb) 0 0;overflow:hidden;background:center/cover no-repeat var(--n200)}
.sprof-banner.pl-base:not(.has-img){background:linear-gradient(120deg,#1e293b 0%,#334155 55%,#475569 100%)}
.sprof-banner.pl-premium:not(.has-img){background:linear-gradient(120deg,#a86a12 0%,#e8b007 52%,#ffd76a 100%)}
.sprof-banner.has-img::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.04) 45%,rgba(0,0,0,.46) 100%);pointer-events:none}
.sprof-head{padding:0 20px 20px}
.sprof-head .avatar{width:92px;height:92px;border-radius:22px;font-size:28px;margin-top:-46px;border:4px solid #fff;box-shadow:0 6px 18px rgba(15,23,42,.18)}
.scount{display:flex;gap:22px;margin:12px 0}
.scount div{font-size:13px;color:var(--th)}
.scount b{display:block;font-size:18px;color:var(--tx);font-family:"Bricolage Grotesque",sans-serif;font-weight:700}

/* ═══ V2 — Pubblicità (piani Free/Base) ═══ */
.ad-slot{border:1.5px dashed var(--n300);border-radius:var(--rb);padding:16px;text-align:center;font-size:12px;color:var(--th);margin-bottom:16px;background:var(--n50)}

/* ═══ V2 — Piani ═══ */
.tabs{display:flex;border-bottom:2px solid var(--n100);margin-bottom:24px}
.tab-item{padding:10px 20px;font-size:14px;font-weight:500;color:var(--th);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;transition:color .2s;background:none;border-top:0;border-left:0;border-right:0}
.tab-item.on{color:var(--b800);border-bottom-color:var(--b800)}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.grid-2c{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;max-width:760px}
@media(max-width:900px){.grid-3{grid-template-columns:1fr}.grid-2c{grid-template-columns:1fr}}
.plan-card{background:#fff;border-radius:var(--rb);border:2px solid var(--n200);padding:26px;transition:border-color .2s;position:relative}
.plan-card.featured{border-color:var(--b800)}
.plan-card.gold{border-color:#F5A623}
.plan-badge{position:absolute;top:-12px;left:50%;transform:translateX(-50%);background:var(--b800);color:#fff;font-size:11px;font-weight:700;padding:4px 14px;border-radius:99px;white-space:nowrap}
.plan-badge.gold{background:linear-gradient(135deg,#FFD54A,#F5A623);color:#6b4a00}
.plan-name{font-size:15px;font-weight:700;color:var(--tx);display:flex;align-items:center;gap:7px}
.plan-name svg{width:17px;height:17px;stroke:#D4881A}
.plan-price{font-family:"Bricolage Grotesque",sans-serif;font-weight:700;font-size:32px;color:var(--tx);line-height:1;margin-top:10px}
.plan-period{font-size:13px;color:var(--th)}
.plan-features{list-style:none;margin-top:16px;display:flex;flex-direction:column;gap:9px}
.plan-features li{font-size:13px;color:var(--ts);display:flex;align-items:flex-start;gap:8px}
.plan-features li::before{content:'\2713';color:var(--gT);font-weight:700;font-size:13px;flex:none}
.plan-features li.no::before{content:'\2013';color:var(--n300)}
.dev-banner{background:var(--a50);border:1.5px solid #F2D9A6;color:#7a5400;border-radius:var(--rb);padding:13px 18px;font-size:13px;font-weight:600;margin-bottom:20px;display:flex;align-items:center;gap:10px}
.dev-banner svg{width:18px;height:18px;stroke:currentColor;flex:none}

/* ═══ V2 — Topbar utente + dropdown ═══ */
.tb-icon{background:var(--n100);border:0;border-radius:9px;padding:8px;cursor:pointer;display:grid;place-items:center}
.tb-icon svg{width:19px;height:19px;stroke:var(--ts)}
.tb-icon:hover{background:var(--n200)}
.tb-user{display:flex;align-items:center;gap:9px;background:none;border:1.5px solid var(--n200);border-radius:99px;padding:4px 12px 4px 4px;cursor:pointer;transition:border-color .15s}
.tb-user:hover{border-color:var(--b400)}
.tb-user .avatar{width:30px;height:30px;border-radius:50%;font-size:11px}
.tb-user .tn{font-size:13px;font-weight:600;color:var(--tx);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tb-user svg.car{width:14px;height:14px;stroke:var(--th)}
#dd{position:fixed;top:70px;right:20px;background:#fff;border-radius:14px;box-shadow:var(--sh2);border:1px solid var(--n100);min-width:210px;z-index:500;display:none;overflow:hidden}
.dd-head{display:flex;align-items:center;gap:10px;padding:13px 16px;border-bottom:1px solid var(--n100)}
.dd-head .avatar{width:36px;height:36px;border-radius:10px;font-size:12px}
.dd-head .n{font-size:13px;font-weight:700;color:var(--tx)}
.dd-head .e{font-size:11px;color:var(--th)}
.ddi{display:flex;align-items:center;gap:10px;padding:12px 16px;font-size:13px;font-weight:500;color:var(--ts);cursor:pointer;transition:background .1s}
.ddi:hover{background:var(--n50)}
.ddi svg{width:16px;height:16px;stroke:var(--n400);flex:none}
.ddi.danger{color:var(--rT)}.ddi.danger svg{stroke:var(--rT)}
.dd-sep{height:1px;background:var(--n100);margin:4px 0}
.last-chip{display:flex;align-items:center;gap:11px;border:1.5px solid var(--n200);border-radius:12px;padding:10px 12px;cursor:pointer;margin-bottom:16px;transition:all .15s}
.last-chip:hover{border-color:var(--b400);background:var(--b20)}
.last-chip .avatar{width:36px;height:36px;border-radius:10px;font-size:12px}
.last-chip .ln{font-size:13px;font-weight:700;color:var(--tx)}
.last-chip .le{font-size:11px;color:var(--th)}

/* ═══ V2 — Consigli (fisarmonica) ═══ */
.acc{margin-bottom:10px;overflow:hidden}
.acc-h{display:flex;align-items:center;gap:12px;padding:15px 18px;cursor:pointer}
.acc-h .ic2{width:38px;height:38px;border-radius:10px;background:var(--b50);color:var(--b800);display:grid;place-items:center;flex:none}
.acc-h .ic2 svg{width:19px;height:19px;stroke:currentColor}
.acc-h h3{font-size:15px;font-weight:600;flex:1}
.acc-h svg.car{width:18px;height:18px;stroke:var(--th);transition:transform .2s}
.acc.open .acc-h svg.car{transform:rotate(180deg)}
.acc-b{display:none;padding:0 18px 16px}
.acc.open .acc-b{display:block}
.tip{display:flex;gap:10px;padding:8px 0;font-size:13.5px;color:var(--ts);border-bottom:1px solid var(--n50)}
.tip:last-child{border-bottom:0}
.tip svg{width:16px;height:16px;stroke:var(--gT);flex:none;margin-top:2px}

/* ═══ V2 — alias token (mappano i nomi dei nuovi componenti sui token nativi) ═══ */
:root{
  --b800:var(--navy); --b600:var(--navy-600); --b100:#CFE3F8; --b50:var(--blue-50); --b20:#F4F9FF;
  --n50:#F6F7F9; --n100:#ECEEF2; --n200:#DDE1E8; --n300:#C4CAD4; --n400:#9AA3B2;
  --tx:var(--ink); --ts:#3D3A33; --th:var(--muted);
  --g50:var(--green-50); --gT:#0E7A37;
  --a50:var(--amber-50); --aT:#9A6B00;
  --r50:var(--red-50); --rT:#B42323;
  --rb:var(--r); --sh2:var(--sh-lg);
}

/* ═══════ AGGIORNAMENTO v3 — fix icone, badge, feed, direct, agenda, materiali ═══════ */

/* FIX: icone azioni rapide e statistiche invisibili (mancava lo stroke) */
.stat .ico svg,.quick-card .ico svg,.item .ic svg{stroke:currentColor;fill:none}

/* Logo a goccia nel menu */
.sb-brand .mark-drop{background:transparent}
.sb-brand .mark-drop svg{width:30px;height:30px;stroke:none}

/* Badge verificato: gocciolina blu con V bianca */
.vwrap{display:inline-flex;vertical-align:middle;line-height:0}
.vbadge{width:15px;height:15px;display:inline-block}

/* Pallino di notifica */
.bellwrap{position:relative}
.ndot{position:absolute;top:6px;right:6px;width:9px;height:9px;border-radius:50%;background:var(--red);border:2px solid #fff;display:none}
.nav-dot{position:static;margin-left:auto;border-color:transparent;width:8px;height:8px}
.tb-icon{position:relative}

/* Ricerca nella topbar */
.tb-search{position:relative;flex:1;max-width:340px;margin:0 10px;display:flex;align-items:center}
.tb-search svg{position:absolute;left:11px;width:16px;height:16px;stroke:var(--muted);pointer-events:none}
.tb-search input{width:100%;height:36px;border:1px solid var(--line);border-radius:20px;padding:0 12px 0 34px;font-size:13.5px;background:var(--n50,#f5f7fa);outline:none}
.tb-search input:focus{border-color:var(--navy-600);background:#fff}
@media (max-width:760px){ .tb-search{display:none} }

/* Pannello notifiche */
#notifpanel{position:fixed;top:62px;right:14px;width:min(360px,calc(100vw - 28px));max-height:70vh;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--sh2,0 10px 32px rgba(15,30,60,.16));display:none;flex-direction:column;overflow:hidden;z-index:300}
#notifpanel.open{display:flex}
.np-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line);font-size:14.5px}
.np-head .x{background:none;border:0;cursor:pointer;padding:4px}
.np-head .x svg{width:17px;height:17px;stroke:var(--muted)}
.np-list{overflow-y:auto}
.np-item{display:flex;align-items:center;gap:11px;padding:11px 14px;border-bottom:1px solid var(--line);cursor:pointer}
.np-item:hover{background:var(--blue-50)}
.np-item.unread{background:#f0f6ff}
.np-item .bd{flex:1;min-width:0}
.np-item .t{font-size:13.5px}
.np-item .s{font-size:11.5px;color:var(--muted);margin-top:2px}
.np-item>svg{width:17px;height:17px;stroke:var(--muted);flex:none}

/* Tabs del Feed (Seguiti / Esplora) e altre tab a pillola */
.ftabs{display:flex;gap:8px;flex-wrap:wrap}
.ftab{border:1px solid var(--line);background:#fff;border-radius:20px;padding:8px 16px;font-size:13.5px;font-weight:600;color:var(--muted);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.ftab svg{width:16px;height:16px;stroke:currentColor}
.ftab.on{background:var(--navy);border-color:var(--navy);color:#fff}

/* Repost */
.repost-tag{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:var(--muted);font-weight:600;margin-bottom:10px;background:var(--n100,#f1f5f9);padding:4px 10px;border-radius:99px}
.repost-tag svg{width:13px;height:13px;stroke:currentColor;fill:none}
.repost-box{border:1px solid var(--line);border-radius:12px;padding:12px;margin-top:10px;background:var(--n50,#f8fafc)}
.repost-head{display:flex;align-items:center;gap:8px;cursor:pointer;margin-bottom:6px;font-size:13.5px}
.repost-head .rtm,.rtm{font-size:11.5px;color:var(--muted);font-weight:400}
.repost-box img,.repost-box video{max-height:280px;border-radius:8px}

/* Condivisione */
.share-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.share-opt{border:1px solid var(--line);border-radius:12px;padding:16px 10px;text-align:center;cursor:pointer;background:#fff;font-size:13px;font-weight:600;color:var(--ink,#15233c)}
.share-opt:hover{border-color:var(--navy-600);background:var(--blue-50)}
.share-opt svg{width:22px;height:22px;stroke:currentColor;margin:0 auto 8px;display:block}

/* Profilo Feed: seguiti in comune (stile Spotify) */
.incommon{display:flex;align-items:center;gap:10px;margin-top:10px;cursor:pointer;font-size:13px;color:var(--muted)}
.avstack{display:flex}
.avstack .avatar{margin-left:-10px;border:2px solid #fff}
.avstack .avatar:first-child{margin-left:0}
.avatar.sm{width:28px;height:28px;font-size:11px}
.scount .clickable{cursor:pointer}
.scount .clickable:hover b{text-decoration:underline}

/* Card impianti per tipo */
.imp-card{border-top:4px solid var(--impacc,#3b82f6)}
.imp-type{display:inline-block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--impacc,#3b82f6);margin-bottom:4px}

/* Direct */
.dm-wrap{display:grid;grid-template-columns:320px 1fr;gap:16px;align-items:start}
.dm-list{max-height:70vh;overflow-y:auto}
.dm-conv{cursor:pointer}
.dm-conv:hover{background:var(--blue-50)}
.dm-conv.on{background:var(--blue-50)}
.dm-badge{background:var(--red);color:#fff;font-size:11px;font-weight:700;border-radius:10px;min-width:18px;height:18px;display:grid;place-items:center;padding:0 5px}
.dm-thread{display:flex;flex-direction:column;min-height:420px;max-height:70vh}
.dm-head{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line);font-size:14px}
.dm-back{display:none}
.dm-msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px}
.dm-msg{max-width:78%;display:flex;flex-direction:column}
.dm-msg.mine{align-self:flex-end;align-items:flex-end}
.dm-msg.their{align-self:flex-start;align-items:flex-start}
.dm-msg .bubble{padding:9px 13px;border-radius:16px;font-size:14px;line-height:1.4;word-break:break-word}
.dm-msg.mine .bubble{background:var(--navy);color:#fff;border-bottom-right-radius:5px}
.dm-msg.their .bubble{background:var(--n50,#eef1f5);color:var(--ink,#15233c);border-bottom-left-radius:5px}
.dm-msg .tm{font-size:10.5px;color:var(--muted);margin-top:3px}
.dm-input{display:flex;gap:8px;padding:12px;border-top:1px solid var(--line)}
.dm-input .input{flex:1}
.dm-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted);font-size:13.5px;padding:30px;gap:8px}
.dm-empty svg{width:34px;height:34px;stroke:#c2cad6}
@media (max-width:820px){
  .dm-wrap{grid-template-columns:1fr}
  .dm-wrap.has-thread .dm-list{display:none}
  .dm-back{display:inline-flex}
}

/* Agenda */
.ag-day{font-size:13px;font-weight:700;color:var(--muted);text-transform:capitalize;margin:0 2px 8px}
.ag-ev{display:flex;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid var(--line);border-left:4px solid var(--agc,#3b82f6);cursor:pointer}
.ag-ev:last-child{border-bottom:0}
.ag-ev:hover{background:var(--blue-50)}
.ag-time{font-weight:700;font-size:13.5px;color:var(--agc,#3b82f6);min-width:46px}
.ag-ev .bd{flex:1;min-width:0}
.ag-ev .t{font-weight:600;font-size:14.5px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ag-ev .s{font-size:12.5px;color:var(--muted);margin-top:2px}

/* Lista materiale */
.mat-row.done .bd .t{text-decoration:line-through;color:var(--muted)}

/* Sezioni ricerca */
.cerca-sec{display:flex;align-items:center;gap:8px;font-size:15px;margin:0 2px 10px}
.cerca-sec svg{width:18px;height:18px;stroke:var(--navy-600)}

/* ═══════ AGGIORNAMENTO v4 — storie, salvati, banner, hashtag, mobile ═══════ */

/* Hashtag e menzioni */
.hashtag{color:var(--navy-600);font-weight:600;text-decoration:none}
.hashtag:hover{text-decoration:underline}

/* Salva post */
.pa-save{margin-left:auto}
.pa-save.saved svg{fill:var(--navy-600);stroke:var(--navy-600)}

/* Storie */
.stories{display:flex;gap:14px;overflow-x:auto;margin-bottom:16px;padding:14px;scrollbar-width:thin}
.story{display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;flex:none;width:68px}
.story span{font-size:11px;color:var(--muted);max-width:68px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sring{position:relative;width:60px;height:60px;border-radius:50%;padding:3px;background:var(--n200)}
.story.has .sring{background:linear-gradient(45deg,#F5A623,#E23535,#1860BE)}
.savatar,.savatar .avatar{width:100%;height:100%;border-radius:50%}
.savatar .avatar{border:2px solid #fff}
.splus{position:absolute;right:-2px;bottom:-2px;width:20px;height:20px;border-radius:50%;background:var(--navy-600);color:#fff;font-weight:700;font-size:14px;display:grid;place-items:center;border:2px solid #fff;line-height:1}

/* Visualizzatore storie */
#storyview{position:fixed;inset:0;background:#000;z-index:500;display:flex;align-items:center;justify-content:center}
.st-media{max-width:100%;max-height:100%;object-fit:contain}
.st-top{position:absolute;top:0;left:0;right:0;padding:10px 14px;z-index:2;background:linear-gradient(180deg,rgba(0,0,0,.55),transparent)}
.st-bars{display:flex;gap:4px;margin-bottom:10px}
.st-bar{flex:1;height:3px;border-radius:3px;background:rgba(255,255,255,.3);overflow:hidden}
.st-bar.done{background:#fff}
.st-bar.cur i{display:block;height:100%;background:#fff;animation:stfill 5s linear forwards}
@keyframes stfill{from{width:0}to{width:100%}}
.st-user{display:flex;align-items:center;gap:8px;color:#fff;font-size:13.5px}
.st-user span{color:rgba(255,255,255,.75);font-size:12px}
.st-user .st-x{margin-left:auto;background:none;border:0;cursor:pointer;padding:6px}
.st-user .st-x+.st-x{margin-left:0}
.st-user .st-x svg{width:19px;height:19px;stroke:#fff}
.st-cap{position:absolute;bottom:36px;left:0;right:0;text-align:center;color:#fff;font-size:15px;padding:0 24px;text-shadow:0 1px 6px rgba(0,0,0,.7)}
.st-nav{position:absolute;top:0;bottom:0;width:34%;z-index:1;cursor:pointer}
.st-prev{left:0}.st-next{right:0;width:66%}

/* Copertina profilo */
.sprof-banner{position:relative}
.banner-chip{position:absolute;top:12px;left:14px;z-index:2;display:inline-flex;align-items:center;gap:5px;background:rgba(0,0,0,.42);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#fff;font-size:11px;font-weight:700;letter-spacing:.03em;padding:5px 11px;border-radius:99px}
.banner-chip svg{width:13px;height:13px;stroke:#ffd76a;fill:none}
.banner-edit{position:absolute;right:12px;bottom:12px;z-index:2;display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 13px;border-radius:99px;border:0;background:rgba(255,255,255,.92);color:#111;font-size:12.5px;font-weight:600;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.18);transition:background .15s}
.banner-edit span{line-height:1}
.banner-edit svg{width:16px;height:16px;stroke:#111}
.banner-edit:hover{background:#fff}

/* ═══ Mobile / phone responsive ═══ */
@media (max-width:680px){
  .page-head h1{font-size:21px}
  .page-head p{font-size:13px}
  .page-head.hstack.between{flex-direction:column;align-items:stretch}
  .page-head .btn{width:100%;justify-content:center}
  .grid-cards{grid-template-columns:1fr!important}
  .stat-grid{grid-template-columns:repeat(2,1fr)!important;gap:10px}
  .quick-grid{grid-template-columns:repeat(2,1fr)!important;gap:10px}
  .ftabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px;scrollbar-width:none}
  .ftab{flex:none}
  .modal{width:calc(100vw - 20px)!important;max-width:none!important;max-height:88vh}
  .modal-body{max-height:62vh;overflow-y:auto}
  .share-grid{grid-template-columns:repeat(2,1fr)}
  .scount{flex-wrap:wrap;gap:14px}
  .post-actions{flex-wrap:wrap;gap:4px}
  .pa-btn{font-size:12px;padding:7px 9px}
  .item{flex-wrap:wrap;gap:10px;padding:13px 14px}
  .item .act{width:100%;justify-content:flex-end}
  .topbar{gap:6px;padding:0 12px}
  .tb-user .tn{display:none}
  .tb-icon{width:36px}
  #notifpanel{right:8px;left:8px;width:auto}
  .sprof-head .avatar{width:78px;height:78px;margin-top:-40px}
  .composer textarea{min-height:64px}
  .dm-msgs{padding:12px}
  .ag-ev{padding:11px 12px;gap:9px}
  .auth-card{padding:22px 18px}
  #view{padding:16px 12px}
}
@media (max-width:420px){
  .stat-grid{grid-template-columns:1fr 1fr!important}
  .quick-grid{grid-template-columns:1fr!important}
  .stories{gap:10px;padding:12px}
}

/* ═══ Piani e abbonamenti — aggiornamento ═══ */
.plan-compare-note{background:var(--bg2);border:1px solid var(--brd);border-radius:10px;padding:11px 14px;font-size:13.5px;color:var(--ts);margin-bottom:20px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.plan-compare-note svg{width:16px;height:16px;flex-shrink:0;opacity:.7}
.chip-inline{background:var(--acc);color:#fff;border-radius:5px;padding:1px 7px;font-size:12px;font-weight:600}
.plan-features li{display:flex;align-items:flex-start;gap:7px;font-size:13.5px;padding:5px 0;border-bottom:1px solid var(--brd)}
.plan-features li:last-child{border-bottom:none}
.plan-features li svg{width:15px;height:15px;flex-shrink:0;margin-top:2px}
.plan-features li:not(.no) svg{stroke:var(--ok,#22c55e);color:var(--ok,#22c55e)}
.plan-features li.no{color:var(--th)}
.plan-features li.no svg{stroke:var(--rT,#ef4444);color:var(--rT,#ef4444);opacity:.7}
.plan-faq{border-top:1px solid var(--brd);padding-top:24px}
.faq-item{margin-bottom:18px}
.faq-item b{display:block;margin-bottom:4px;font-size:14px}
.faq-item p{font-size:13.5px;color:var(--ts);line-height:1.5}
.plan-contact-box{background:var(--bg2);border:1px solid var(--brd);border-radius:14px;padding:22px 24px;margin-top:32px;text-align:center}
.plan-contact-box h3{font-size:16px;margin-bottom:8px;display:flex;align-items:center;justify-content:center;gap:8px}
.plan-contact-box h3 svg{width:18px;height:18px}
.plan-contact-box p{font-size:13.5px;color:var(--ts)}
.plan-contact-box a{color:var(--acc);font-weight:600}
.btn-full{width:100%;justify-content:center}

/* ═══ Legal pages (Privacy, Cookie, Termini) ═══ */
.legal-doc{font-size:14px;line-height:1.7;color:var(--tx)}
.legal-doc h2{font-size:15.5px;font-weight:700;margin:22px 0 8px;color:var(--tx);border-bottom:1px solid var(--brd);padding-bottom:6px}
.legal-doc p{margin-bottom:10px;color:var(--ts)}
.legal-doc ul{padding-left:20px;margin-bottom:10px}
.legal-doc ul li{margin-bottom:5px;color:var(--ts)}
.legal-doc a{color:var(--acc)}

/* ═══ Sidebar footer (privacy/cookie links) ═══ */
.sb-footer{padding:10px 14px 6px;border-top:1px solid var(--brd);margin-top:auto}
.sb-foot-link{font-size:11.5px;color:var(--th);cursor:pointer;text-decoration:none}
.sb-foot-link:hover{color:var(--acc)}

/* ═══ Auth page footer ═══ */
.auth-footer{text-align:center;padding:16px 0 8px;border-top:1px solid var(--brd);margin-top:12px}
.auth-foot-link{font-size:12px;color:var(--th);cursor:pointer;text-decoration:none}
.auth-foot-link:hover{color:var(--acc)}

/* ═══ Admin badge ═══ */
.admin-badge{width:15px;height:15px;display:inline-block}
.admin-badge path[fill="#e53935"]{filter:drop-shadow(0 0 1px rgba(229,57,53,.3))}

/* ═══ DM: visualizzato + allegati ═══ */
.dm-read{color:var(--acc,#2563eb);font-weight:600;font-size:10px}
.dm-attach-btn{display:inline-flex;align-items:center;padding:0 4px;color:var(--th);cursor:pointer;flex-shrink:0}
.dm-attach-btn svg{width:18px;height:18px;stroke:var(--th)}
.dm-attach-btn:hover svg{stroke:var(--acc)}
.dm-allegato-img{max-width:220px;border-radius:10px;cursor:pointer;margin-bottom:4px;display:block}
.dm-allegato-file{display:inline-flex;align-items:center;gap:6px;background:var(--n50);border:1px solid var(--brd);border-radius:8px;padding:6px 10px;font-size:13px;color:var(--ink);text-decoration:none;margin-bottom:4px}
.dm-allegato-file:hover{background:var(--n100)}
.dm-allegato-file svg{width:15px;height:15px;flex-shrink:0}

/* ═══════════════════════════════════════════════════════════
   PIANI v3 — badge dorati, banner verifica, tutorial, offerte
   ═══════════════════════════════════════════════════════════ */

/* Badge dorati per i piani a pagamento (cornetta / chiave / stura) */
.gwrap{display:inline-flex;vertical-align:middle;margin-left:2px}
.gbadge{width:17px;height:17px;filter:drop-shadow(0 1px 1px rgba(180,130,0,.35))}
.plan-name .gbadge{width:18px;height:18px}

/* Banner promemoria verifica email */
.verify-banner{display:flex;align-items:center;gap:10px;padding:11px 18px;background:var(--amber-50);border-bottom:1px solid #F2D9A6;color:#7a5400;font-size:13.5px;font-weight:600}
.verify-banner svg{width:18px;height:18px;stroke:currentColor;flex:none}
.verify-banner span{flex:1;min-width:0}
.verify-banner .btn-sm{padding:6px 12px;font-size:12.5px}
.vb-x{background:none;border:0;cursor:pointer;color:#9a7400;padding:4px;display:grid;place-items:center;border-radius:6px}
.vb-x svg{width:16px;height:16px;stroke:currentColor}
.vb-x:hover{background:rgba(154,116,0,.12)}

/* Link sotto al login + note registrazione */
.auth-links{display:flex;gap:10px;justify-content:center;align-items:center;margin-top:14px;font-size:13px;flex-wrap:wrap}
.auth-links a{color:var(--amber-600);cursor:pointer;font-weight:600}
.auth-links a:hover{text-decoration:underline}
.auth-links span{color:var(--muted)}
.reg-hint{display:flex;align-items:flex-start;gap:8px;background:var(--blue-50);color:#1c4f7a;border-radius:10px;padding:10px 12px;font-size:12.5px;line-height:1.45;margin-bottom:12px}
.reg-hint svg{width:16px;height:16px;stroke:currentColor;flex:none;margin-top:1px}
.reg-foot{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--th);margin-top:10px}
.reg-foot svg{width:15px;height:15px;stroke:currentColor;flex:none}
.opt-tag{font-weight:500;color:var(--muted);font-size:11px}
.plan-note-small{font-size:12px;color:var(--th);margin-top:12px;display:flex;align-items:flex-start;gap:6px}
.plan-note-small svg{width:14px;height:14px;stroke:currentColor;flex:none;margin-top:1px}

/* Scelta periodo (mensile / annuale) */
.period-pick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.period-opt{border:1.5px solid var(--line);border-radius:12px;padding:14px;cursor:pointer;transition:.15s;background:#fff}
.period-opt.on{border-color:var(--amber);background:var(--amber-50)}
.period-opt .po-t{font-size:13px;font-weight:700;color:var(--tx);display:flex;align-items:center;gap:6px}
.period-opt .po-p{font-family:"Bricolage Grotesque",sans-serif;font-weight:700;font-size:22px;color:var(--tx);margin-top:6px}
.period-opt .po-p span{font-size:12px;font-weight:500;color:var(--th);font-family:inherit}
.po-save{background:var(--green-50,#e8f7ee);color:var(--green,#1a8a4a);font-size:10px;font-weight:700;padding:2px 7px;border-radius:99px}

/* Tutorial iniziale (overlay) */
#tut-bg{position:fixed;inset:0;background:rgba(20,18,10,.55);backdrop-filter:blur(3px);display:grid;place-items:center;z-index:200;padding:20px}
.tut{position:relative;background:#fff;border-radius:20px;max-width:440px;width:100%;padding:34px 30px 26px;box-shadow:0 20px 60px rgba(0,0,0,.28);text-align:center}
.tut-x{position:absolute;top:14px;right:14px;background:none;border:0;cursor:pointer;color:var(--muted);padding:5px;border-radius:8px;display:grid;place-items:center}
.tut-x svg{width:18px;height:18px;stroke:currentColor}
.tut-x:hover{background:var(--n100)}
.tut-ico{width:64px;height:64px;border-radius:18px;margin:0 auto 16px;display:grid;place-items:center;background:linear-gradient(135deg,var(--amber-50),#fff4dc);color:var(--amber-600)}
.tut-ico svg{width:30px;height:30px;stroke:var(--amber-600);fill:none}
.tut-step{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:700}
.tut h2{font-size:20px;font-weight:700;color:var(--tx);margin:6px 0 8px;font-family:"Bricolage Grotesque",sans-serif}
.tut p{font-size:14px;line-height:1.55;color:var(--th)}
.tut-cta{margin-top:16px}
.tut-dots{display:flex;gap:7px;justify-content:center;margin:20px 0 16px}
.tut-dot{width:8px;height:8px;border-radius:50%;background:var(--n200);cursor:pointer;transition:.15s}
.tut-dot.on{background:var(--amber);width:22px;border-radius:99px}
.tut-nav{display:flex;gap:10px;justify-content:space-between}
.tut-nav .btn{flex:1}

/* Lavorazioni offerte */
.off-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;padding:16px}
.off-card{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff;display:flex;flex-direction:column;transition:.15s}
.off-card:hover{box-shadow:var(--sh-sm);border-color:var(--n300)}
.off-card.off-off{opacity:.55}
.off-img{height:140px;background:var(--n100);overflow:hidden}
.off-img img{width:100%;height:100%;object-fit:cover;display:block}
.off-noimg{display:grid;place-items:center}
.off-noimg svg{width:40px;height:40px;stroke:var(--n300)}
.off-body{padding:14px;display:flex;flex-direction:column;gap:8px;flex:1}
.off-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.off-head h3{font-size:15px;font-weight:700;color:var(--tx);line-height:1.3}
.off-desc{font-size:13px;color:var(--th);line-height:1.45}
.off-price{font-size:14px;font-weight:700;color:var(--amber-600);display:flex;align-items:center;gap:6px}
.off-price svg{width:15px;height:15px;stroke:currentColor}
.off-foot{display:flex;flex-wrap:wrap;gap:10px;font-size:12px;color:var(--th);margin-top:auto;padding-top:6px;border-top:1px solid var(--line)}
.off-author,.off-citta{display:inline-flex;align-items:center;gap:5px}
.off-author svg,.off-citta svg{width:14px;height:14px;stroke:currentColor}
.off-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}

/* ── Cifratura end-to-end nella chat ── */
.dm-e2e{margin-left:auto;display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;color:var(--gT,#1a8a4a);background:var(--green-50,#e8f7ee);padding:4px 9px;border-radius:99px;white-space:nowrap}
.dm-e2e svg{width:13px;height:13px;stroke:currentColor;fill:none}
.bubble-locked{font-style:italic;opacity:.75;display:inline-flex;align-items:center;gap:6px}
.bubble-locked svg{width:14px;height:14px;stroke:currentColor;flex:none}
@media(max-width:560px){ .dm-e2e span{display:none} }

/* ── Icona inline piccola (evita SVG giganti nel testo) ── */
.ic-i{display:inline-flex;width:13px;height:13px;vertical-align:-2px;color:var(--muted)}
.ic-i svg{width:100%;height:100%;stroke:currentColor;fill:none}

/* ── Riga badge decorativi accanto al nome ── */
.name-badges{align-items:center}
.name-badges .gbadge,.name-badges svg{flex:none}

/* ── Nota beta (riquadro informativo) ── */
.beta-note{display:flex;gap:10px;align-items:flex-start;background:linear-gradient(135deg,#fff7ed,#fef3c7);border:1px solid #f1c27d;border-radius:12px;padding:12px 14px;font-size:13px;color:#7a4d12;line-height:1.45}
.beta-note svg{width:17px;height:17px;flex:none;stroke:#d4881a;margin-top:1px}
.beta-note b{color:#5c3a0e}

/* ── Badge BETA accanto ai titoli ── */
.beta-badge{display:inline-block;vertical-align:middle;font-size:11px;font-weight:800;letter-spacing:.08em;color:#fff;background:linear-gradient(135deg,#f59e0b,#d4881a);padding:3px 8px;border-radius:7px;margin-left:8px;transform:translateY(-2px)}
