/* HEXIVIA / NewLifeItaly Portal V3 - faithful implementation of approved 2026-11-02 UI.
   Scoped styles. Authentication, post/feed, permissions and backend logic unchanged. */
body.hx-v3-site{
  --nli-accent:#a847ff;
  --nli-accent-rgb:168,71,255;
  --nli-border:rgba(158,117,255,.40);
  --nli-bg:#0b0e1b;
  --nli-panel:#15182a;
  --nli-panel2:#262a40;
  --nli-text:#f3f1ff;
  --nli-muted:#aab2d0;
  --nli-ring:0 0 0 1px rgba(var(--nli-accent-rgb),.34),0 0 18px rgba(var(--nli-accent-rgb),.10);
  background:radial-gradient(ellipse 900px 600px at 35% 120%,rgba(var(--nli-accent-rgb),.12),transparent 76%),var(--nli-bg);
  color:var(--nli-text);
  min-height:100vh;
  color-scheme:dark;
}
body.hx-v3-site.hx-theme-light{
  --nli-bg:#edf0fb; --nli-panel:#fff; --nli-panel2:#f2f2fc;
  --nli-text:#1c2034; --nli-muted:#606981;
  --nli-border:rgba(90,74,146,.31);
  color-scheme:light;
}
body.hx-v3-site .hx-topbar,
body.hx-v3-site.hx-fb-body .hx-topbar{
  min-height:82px;
  background:linear-gradient(180deg,#12152a,#0b0e1b) !important;
  border-bottom:1px solid rgba(var(--nli-accent-rgb),.31) !important;
  box-shadow:0 6px 25px #05061366;
  padding:3px 0;
  z-index:1050;
}
body.hx-v3-site.hx-theme-light .hx-topbar{background:linear-gradient(180deg,#fff,#f5f6ff)!important;}
body.hx-v3-site .hx-topbar .container-fluid{gap:8px;align-items:center;max-width:2100px;}
body.hx-v3-site .hx-brand{
 display:flex;gap:9px;align-items:center;flex-shrink:0;white-space:nowrap;
 font-size:1.14rem;text-decoration:none!important;color:#f9f8ff!important;
 padding:0;margin:0 8px 0 0;
}
body.hx-v3-site.hx-theme-light .hx-brand{color:#1b2337!important;}
/* Logo ufficiale NLI / NEW LIFE ITALY fornito dall'amministratore. */
body.hx-v3-site .hx-v3-brand-mark{
  display:block;
  width:clamp(88px,7vw,118px);
  height:auto;
  max-height:84px;
  object-fit:contain;
  flex-shrink:0;
}
body.hx-v3-site .hx-v3-nav{flex:1 1 auto;min-width:0;display:flex;align-items:center!important;justify-content:space-around;gap:1px!important;
  background:#16182b;border:1px solid rgba(159,147,255,.26);border-radius:22px;padding:6px!important;margin:0!important;
  box-shadow:inset 0 1px 1px #ffffff0a;}
body.hx-v3-site.hx-theme-light .hx-v3-nav{background:#fff;}
body.hx-v3-site .hx-v3-nav .nav-item{flex:1 1 auto;min-width:0;}
body.hx-v3-site .hx-v3-nav .nav-link{border-radius:16px;min-height:60px;padding:5px 7px;
  display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;
  color:#e5e5f3!important;line-height:1.17;font-weight:600;font-size:.75rem;
  text-align:center;transition:background .2s,transform .2s,box-shadow .2s;white-space:nowrap;
}
body.hx-v3-site.hx-theme-light .hx-v3-nav .nav-link{color:#303550!important;}
body.hx-v3-site .hx-v3-nav .nav-link:hover{background:rgba(var(--nli-accent-rgb),.18);transform:translateY(-1px);}
body.hx-v3-site .hx-v3-nav .nav-link.active{
 color:#fff!important;background:linear-gradient(135deg,rgba(var(--nli-accent-rgb),.56),rgba(var(--nli-accent-rgb),.14));
 box-shadow:inset 0 0 0 1px rgba(var(--nli-accent-rgb),.7),0 0 17px rgba(var(--nli-accent-rgb),.35);
}
body.hx-v3-site .hx-v3-nav-icon{display:block;width:25px;height:25px;flex:none;}
body.hx-v3-site .hx-topbar .navbar-nav:not(.hx-v3-nav){gap:6px!important;}
body.hx-v3-site .hx-topbar .navbar-nav:not(.hx-v3-nav)>.nav-item{display:flex;align-items:center;}
body.hx-v3-site .hx-v3-mode{display:flex;align-items:center;gap:2px;padding:3px;border-radius:24px;background:#181b31;border:1px solid var(--nli-border);white-space:nowrap;}
body.hx-v3-site .hx-v3-mode-choice{border:0;color:#e7e8ff;border-radius:50%;width:31px;height:31px;line-height:1;display:grid;place-items:center;background:transparent;font-size:23px;transition:transform .2s,background .2s;}
body.hx-v3-site .hx-v3-mode-choice[value="light"]{color:#ffe45d;}
body.hx-v3-site .hx-v3-mode-choice[value="dark"]{color:#d9c8ff;}
body.hx-v3-site .hx-v3-mode-choice.selected{background:linear-gradient(135deg,#346dea,#7446e7);box-shadow:0 0 10px rgba(136,118,255,.45);color:#fff;}
body.hx-v3-site .hx-v3-mode-choice:hover{transform:scale(1.07);}
body.hx-v3-site .hx-topbar .hx-notif-btn{border:1px solid var(--nli-border);background:#1a1d31;border-radius:50%;}
body.hx-v3-site.hx-theme-light .hx-topbar .hx-notif-btn{background:#fff;}
body.hx-v3-site .hx-main-fluid{max-width:2100px;margin:auto;padding:12px 14px 26px;}
body.hx-v3-site.hx-fb-body{background:radial-gradient(ellipse 950px 500px at 42% 110%,rgba(var(--nli-accent-rgb),.13),transparent 74%),var(--nli-bg)!important;}
body.hx-v3-site .hx-fb-layout{
 display:grid;grid-template-columns:minmax(225px,265px) minmax(640px,1fr) minmax(245px,300px);
 gap:12px;max-width:1920px;align-items:start;justify-content:center;
}
body.hx-v3-site .hx-fb-left,body.hx-v3-site .hx-fb-right{position:sticky;top:98px;max-height:calc(100vh - 112px);overflow-y:auto;gap:12px;scrollbar-width:none;}
body.hx-v3-site .hx-fb-card{background:var(--nli-panel);border:1px solid var(--nli-border);border-radius:20px;color:var(--nli-text);box-shadow:var(--nli-ring);}
body.hx-v3-site .hx-fb-card-inner{padding:14px;}
body.hx-v3-site .hx-fb-card-title{color:var(--nli-text);font-weight:850;text-transform:none;letter-spacing:0;font-size:.91rem;}
body.hx-v3-site .hx-fb-muted{color:var(--nli-muted)!important;}
body.hx-v3-site .hx-fb-profile-cover{height:78px;background:radial-gradient(circle at 75% 75%,rgba(var(--nli-accent-rgb),.48),transparent 60%),linear-gradient(145deg,#151b31,#101221);}
body.hx-v3-site .hx-fb-profile-head{margin-top:-48px;}
body.hx-v3-site .hx-fb-avatar{width:88px;height:88px;border-color:var(--nli-accent);box-shadow:0 0 0 4px var(--nli-panel),0 0 18px rgba(var(--nli-accent-rgb),.26);}
body.hx-v3-site .hx-fb-profile-name{color:var(--nli-text);font-size:1.1rem;}
body.hx-v3-site .hx-fb-role{background:rgba(var(--nli-accent-rgb),.24);color:var(--nli-text);border-color:var(--nli-border);}
body.hx-v3-site .hx-fb-menu a:hover{background:rgba(var(--nli-accent-rgb),.21);}
body.hx-v3-site .hx-fb-menu a:first-child{background:linear-gradient(95deg,rgba(var(--nli-accent-rgb),.53),rgba(var(--nli-accent-rgb),.17));border:1px solid var(--nli-border);}
body.hx-v3-site .hx-fb-ico{border-radius:11px;background:rgba(var(--nli-accent-rgb),.19)!important;color:var(--nli-text)!important;}
body.hx-v3-site .hx-v3-palettes{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;}
body.hx-v3-site .hx-v3-color{background:var(--swatch);border:1px solid #ffffff99;min-width:0;height:32px;border-radius:8px;box-shadow:inset 0 0 8px #ffffff55,0 0 6px color-mix(in srgb,var(--swatch),transparent 55%);position:relative;}
body.hx-v3-site .hx-v3-color[aria-pressed="true"]{outline:2px solid #f6f3ff;outline-offset:2px;box-shadow:0 0 14px var(--swatch);}
body.hx-v3-site .hx-v3-color[aria-pressed="true"]::after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;color:#fff;text-shadow:0 1px 4px #151520;font-weight:900;}
body.hx-v3-site .hx-v3-color-note{font-size:.7rem;color:var(--nli-muted);margin-top:12px;}
body.hx-v3-site .hx-v3-stage{min-width:0;display:grid;gap:12px;}
body.hx-v3-site .hx-v3-banner{width:100%;height:clamp(215px,22vw,364px);min-height:210px;
 background-image:url('banner.jpg');background-position:center center;background-size:cover;
 border:1px solid var(--nli-border);border-radius:18px;box-shadow:0 8px 25px #06061155;}
body.hx-v3-site .hx-v3-stage-grid{display:grid;grid-template-columns:minmax(190px,245px) minmax(0,1fr);gap:12px;align-items:start;}
body.hx-v3-site .hx-v3-middle{display:grid;gap:12px;min-width:0;}
body.hx-v3-site .hx-v3-middle .hx-fb-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
body.hx-v3-site .hx-fb-stat{background:var(--nli-panel2);border:1px solid var(--nli-border);border-radius:12px;padding:11px 10px;}
body.hx-v3-site .hx-fb-stat b{color:var(--nli-text);}
body.hx-v3-site .hx-fb-stat span{color:var(--nli-muted);}
body.hx-v3-site .hx-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
body.hx-v3-site .hx-gallery-grid img{height:116px;}
body.hx-v3-site .hx-fb-center{min-width:0;}
body.hx-v3-site .hx-composer-text{background:var(--nli-panel2)!important;color:var(--nli-text)!important;border:1px solid var(--nli-border)!important;min-height:66px;}
body.hx-v3-site .hx-composer-text::placeholder{color:var(--nli-muted)!important;}
body.hx-v3-site .hx-fb-btn{background:linear-gradient(135deg,var(--nli-accent),color-mix(in srgb,var(--nli-accent),white 20%));color:#fff;border:1px solid #ffffff55;box-shadow:0 0 18px rgba(var(--nli-accent-rgb),.38);}
body.hx-v3-site .hx-fb-btn:hover{filter:brightness(1.15);}
body.hx-v3-site .hx-fb-btn-muted{background:var(--nli-panel2);color:var(--nli-text);border-color:var(--nli-border);}
body.hx-v3-site .hx-fb-card .hx-friend-name,body.hx-v3-site .hx-fb-card .hx-post-author{color:var(--nli-text);}
body.hx-v3-site .hx-fb-card .hx-grid-meta-row span{color:var(--nli-muted);}
body.hx-v3-site .hx-fb-card .hx-grid-meta-row b{color:var(--nli-text);}
body.hx-v3-site .hx-fb-card .hx-login-code{color:var(--nli-text);}
body.hx-v3-site .hx-fb-card .hx-login-copy{background:var(--nli-panel2);border-color:var(--nli-border);}
body.hx-v3-site .hx-progress-fill{background:linear-gradient(90deg,#c6ff46,#74e8ff);}
body.hx-v3-site .hx-fb-center .hx-post-avatar,body.hx-v3-site .hx-fb-center .hx-fb-avatar-sm{box-shadow:0 0 0 2px var(--nli-accent);}
body.hx-v3-site .hx-fb-card a:not(.btn):hover{color:var(--nli-accent);}
body.hx-v3-site.hx-theme-light .hx-fb-menu a{color:#22293d;}
body.hx-v3-site.hx-theme-light .hx-fb-menu a:first-child{color:#1b2435;}
body.hx-v3-site.hx-theme-light .hx-fb-card-title{color:#1e2540;}
body.hx-v3-site.hx-theme-light .hx-fb-stat b{color:#1e2540;}
body.hx-v3-site.hx-theme-light .hx-fb-profile-name{color:#1e2540;}
body.hx-v3-site.hx-theme-light .hx-fb-role{color:#242c44;}
body.hx-v3-site.hx-theme-light .hx-fb-btn-muted{color:#20253a;}
body.hx-v3-site.hx-theme-light .hx-fb-card .hx-grid-meta-row b{color:#24304a;}
body.hx-v3-site.hx-theme-light .hx-fb-card .hx-login-code{color:#24304a;}
/* NewLifeItaly login / registration shell. The original forms and security controls remain untouched. */
body.hx-v3-site .hx-v3-auth{width:min(1230px,100%);margin:10px auto 32px;display:grid;grid-template-columns:1.15fr .85fr;
 min-height:570px;border:1px solid var(--nli-border);background:var(--nli-panel);border-radius:25px;overflow:hidden;box-shadow:0 22px 70px #04061366;}
body.hx-v3-site .hx-v3-auth-promo{min-height:480px;position:relative;background:linear-gradient(0deg,#090d1ec9,transparent 55%),url('banner.jpg') left center/cover no-repeat;}
body.hx-v3-site .hx-v3-auth-register .hx-v3-auth-promo{background-position:center,right center;}
body.hx-v3-site .hx-v3-auth-caption{position:absolute;bottom:34px;left:28px;right:20px;font:italic 600 clamp(30px,3vw,47px)/1.2 Georgia,serif;color:#fff;text-shadow:0 3px 20px #000;}
body.hx-v3-site .hx-v3-auth-caption small{font:italic 400 18px Georgia,serif;display:block;margin-top:6px;color:#ffe8f2;}
body.hx-v3-site .hx-v3-auth-panel{padding:clamp(22px,3vw,44px);align-self:center;min-width:0;}
body.hx-v3-site .hx-v3-auth-eyebrow{letter-spacing:.22em;color:var(--nli-muted);font-size:.73rem;font-weight:750;margin-bottom:12px;}
body.hx-v3-site .hx-v3-auth-title{font-size:clamp(26px,2.6vw,36px);font-weight:850;color:var(--nli-text);line-height:1.15;}
body.hx-v3-site .hx-v3-auth-subtitle{color:var(--nli-muted);margin:9px 0 24px;}
body.hx-v3-site .hx-v3-auth-panel form.card{padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important;color:var(--nli-text);}
body.hx-v3-site .hx-v3-auth-panel form.card .row>*{width:100%;flex:none;}
body.hx-v3-site .hx-v3-auth-panel .form-label{color:var(--nli-muted);font-size:.83rem;font-weight:650;}
body.hx-v3-site .hx-v3-auth-panel .form-control,body.hx-v3-site .hx-v3-auth-panel .form-select{
 background:var(--nli-panel2);color:var(--nli-text);border:1px solid var(--nli-border);border-radius:13px;
 min-height:47px;padding:10px 13px;}
body.hx-v3-site .hx-v3-auth-panel .form-control:focus,body.hx-v3-site .hx-v3-auth-panel .form-select:focus{box-shadow:0 0 0 3px rgba(var(--nli-accent-rgb),.2);border-color:var(--nli-accent);}
body.hx-v3-site .hx-v3-auth-panel .form-text{color:var(--nli-muted);}
body.hx-v3-site .hx-v3-auth-panel .btn-primary{background:var(--nli-accent);border-color:var(--nli-accent);color:#fff;box-shadow:0 0 16px rgba(var(--nli-accent-rgb),.28);}
body.hx-v3-site .hx-v3-auth-panel .btn-outline-secondary{border-color:var(--nli-border);color:var(--nli-text);}
body.hx-v3-site .hx-v3-auth-panel .btn-link{color:var(--nli-accent);}
body.hx-v3-site.hx-theme-light .hx-v3-auth-panel .form-control,body.hx-v3-site.hx-theme-light .hx-v3-auth-panel .form-select{color:#182038;}
/* Reduced-motion: no essential content depends on transitions. */
@media (prefers-reduced-motion:reduce){body.hx-v3-site *{scroll-behavior:auto!important;transition:none!important;animation:none!important;}}
@media(max-width:1520px){
 body.hx-v3-site .hx-v3-nav .nav-link{font-size:.66rem;padding:5px 4px;}
 body.hx-v3-site .hx-v3-nav-icon{width:22px;height:22px;}
 body.hx-v3-site .hx-fb-layout{grid-template-columns:minmax(202px,232px) minmax(570px,1fr) minmax(220px,270px);}
 body.hx-v3-site .hx-v3-stage-grid{grid-template-columns:minmax(155px,210px) minmax(0,1fr);}
}
@media(max-width:1260px){
 body.hx-v3-site .hx-v3-nav .nav-link{font-size:.61rem;}
 body.hx-v3-site .hx-v3-nav-icon{width:19px;height:19px;}
 body.hx-v3-site .hx-fb-layout{grid-template-columns:minmax(185px,220px) minmax(0,1fr) minmax(190px,240px);}
 body.hx-v3-site .hx-v3-stage-grid{grid-template-columns:minmax(140px,185px) minmax(0,1fr);}
}
@media(max-width:1090px){
 body.hx-v3-site .hx-fb-layout{grid-template-columns:minmax(0,1fr);max-width:790px;margin:auto;}
 body.hx-v3-site .hx-v3-stage{order:1;}
 body.hx-v3-site .hx-fb-left,body.hx-v3-site .hx-fb-right{position:static;max-height:none;overflow:visible;}
 body.hx-v3-site .hx-fb-left{order:2;}
 body.hx-v3-site .hx-fb-right{order:3;}
 body.hx-v3-site .hx-v3-banner{height:clamp(220px,30vw,340px);}
 body.hx-v3-site .hx-v3-nav{display:block;padding:10px!important;}
 body.hx-v3-site .hx-v3-nav .nav-link{flex-direction:row;justify-content:flex-start;gap:10px;font-size:.92rem;min-height:44px;}
}
@media(max-width:991.98px){
 body.hx-v3-site .hx-topbar .navbar-collapse{padding:10px 0 15px;}
 body.hx-v3-site .hx-topbar .navbar-nav:not(.hx-v3-nav){margin-top:12px;align-items:flex-start!important;}
 body.hx-v3-site .hx-topbar .navbar-toggler{background:var(--nli-panel2);border-color:var(--nli-border);}
 body.hx-v3-site .hx-brand{margin-right:auto;}
}
@media(max-width:700px){
 body.hx-v3-site .hx-v3-stage-grid{grid-template-columns:1fr;}
 body.hx-v3-site .hx-v3-middle{grid-template-columns:repeat(2,minmax(0,1fr));}
 body.hx-v3-site .hx-v3-banner{height:clamp(175px,32vw,265px);min-height:175px;}
 body.hx-v3-site .hx-v3-auth{grid-template-columns:1fr;}
 body.hx-v3-site .hx-v3-auth-promo{min-height:190px;max-height:240px;}
 body.hx-v3-site .hx-v3-auth-panel{padding:24px;}
 body.hx-v3-site .hx-v3-auth-caption{font-size:31px;bottom:18px;}
}
@media(max-width:520px){
 body.hx-v3-site .hx-fb-layout{gap:12px;}
 body.hx-v3-site .hx-main-fluid{padding:10px 9px 18px;}
 body.hx-v3-site .hx-v3-middle{grid-template-columns:1fr;}
 body.hx-v3-site .hx-v3-banner{height:190px;}
 body.hx-v3-site .hx-v3-brand-mark{width:84px;max-height:72px;}
 body.hx-v3-site .hx-v3-auth-panel{padding:20px 16px;}
 body.hx-v3-site .hx-v3-auth-panel form.card .mt-3.d-flex{flex-wrap:wrap;}
}
