/* HNG Login V2: dedicato al login. Non modifica signin.css o base.html. */
:root{color-scheme:light;--hng-navy:#183a5b;--hng-deep:#142d47;--hng-blue:#245f98;--hng-blue-hover:#1b4f82;--hng-text:#1d2e42;--hng-muted:#66788c;--hng-border:#d9e2ec;--hng-bg:#edf3f9}
*{box-sizing:border-box}
html{height:100%;-webkit-text-size-adjust:100%}
body{min-width:280px;min-height:100%;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--hng-text);background:var(--hng-bg)}
button,input{font:inherit}
.hng-auth{width:min(1120px,calc(100% - 48px));min-height:min(740px,calc(100svh - 48px));margin:24px auto;display:grid;grid-template-columns:minmax(0,0.91fr) minmax(0,1fr);overflow:hidden;background:#fff;border-radius:24px;box-shadow:0 24px 65px rgba(17,44,73,.13)}
.hng-auth-brand{position:relative;display:flex;flex-direction:column;justify-content:space-between;min-width:0;padding:50px 48px 30px;isolation:isolate;background:linear-gradient(145deg,#193f63,#102c48);color:#fff;overflow:hidden}
.hng-auth-brand::before{content:"";position:absolute;z-index:-1;width:330px;height:330px;border:1px solid rgba(255,255,255,.13);border-radius:50%;right:-130px;top:-100px;box-shadow:0 0 0 65px rgba(255,255,255,.028),0 0 0 145px rgba(255,255,255,.018)}
.hng-auth-brand::after{content:"";position:absolute;z-index:-1;width:380px;height:380px;border-radius:50%;left:-235px;bottom:-230px;background:rgba(103,169,209,.11)}
.hng-auth-brand-content{max-width:400px}
.hng-auth-brand-logo{display:block;width:140px;height:140px;max-width:100%;object-fit:contain;object-position:left center;margin:0 0 40px;filter:drop-shadow(0 5px 12px rgba(0,0,0,.12))}
.hng-auth-brand-tag{display:block;color:#bcd8ec;font-size:12px;font-weight:750;letter-spacing:.15em}
.hng-auth-brand h1{font-size:clamp(30px,3.4vw,46px);font-weight:750;letter-spacing:-.045em;line-height:1.16;margin:17px 0 19px}
.hng-auth-brand p{font-size:15px;line-height:1.75;color:#d2e1ee;margin:0;max-width:320px}
.hng-auth-brand-footer{font-size:12px;color:#b3ccdf}
.hng-auth-form-panel{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 54px 22px}
.hng-auth-form-wrap{width:100%;max-width:390px;margin:auto}
.hng-auth-kicker{font-size:12px;letter-spacing:.15em;font-weight:800;color:#527ca1}
.hng-auth-intro h2{font-size:clamp(27px,2.9vw,36px);line-height:1.2;margin:10px 0 9px;letter-spacing:-.04em}
.hng-auth-intro p{color:var(--hng-muted);font-size:14px;line-height:1.6;margin:0 0 32px}
.hng-auth-field{margin-bottom:20px}
.hng-auth-field label{display:block;margin-bottom:8px;font-size:14px;font-weight:700}
.hng-auth-field input{display:block;width:100%;height:54px;border:1px solid var(--hng-border);border-radius:12px;padding:0 15px;background:#fff;color:var(--hng-text);font-size:16px;outline:none;transition:border-color .16s,box-shadow .16s}
.hng-auth-field input:focus{border-color:#447db1;box-shadow:0 0 0 4px rgba(36,95,152,.11)}
.hng-auth-field input::placeholder{color:#91a0af}
.hng-password-wrap{position:relative}
.hng-password-wrap input{padding-right:95px}
.hng-password-toggle{position:absolute;right:6px;top:6px;height:42px;min-width:78px;border:0;border-radius:9px;background:#f0f4f9;color:#285b89;font-weight:650;font-size:13px;cursor:pointer}
.hng-password-toggle:hover{background:#e4edf6}
.hng-password-toggle:focus-visible,.hng-auth-submit:focus-visible{outline:3px solid #79b1dd;outline-offset:3px}
.hng-auth-submit{width:100%;min-height:54px;display:flex;justify-content:center;align-items:center;gap:12px;border:0;border-radius:12px;background:var(--hng-blue);color:#fff;font-size:16px;font-weight:750;cursor:pointer;box-shadow:0 7px 16px rgba(36,95,152,.16);transition:background-color .16s,transform .16s}
.hng-auth-submit:hover:not(:disabled){background:var(--hng-blue-hover)}
.hng-auth-submit:active:not(:disabled){transform:translateY(1px)}
.hng-auth-submit:disabled{opacity:.88;cursor:progress}
.hng-auth-spinner{display:none;width:18px;height:18px;border:2px solid rgba(255,255,255,.37);border-top-color:#fff;border-radius:50%;animation:hng-spin .7s linear infinite}
.hng-auth-submit.is-loading .hng-auth-spinner{display:inline-block}
@keyframes hng-spin{to{transform:rotate(360deg)}}
.hng-auth-help{text-align:center;margin:24px 0 0;color:var(--hng-muted);font-size:12px;line-height:1.5}
.hng-auth-footer{text-align:center;color:#8b98a7;font-size:12px;margin-top:32px}
.hng-auth-alert{padding:13px 15px;border:1px solid #f0b4ab;border-radius:10px;background:#fff4f2;color:#8b3022;font-size:13px;line-height:1.6;margin:-7px 0 22px}
.hng-auth-mobile-heading{display:none}
@media(max-width:780px){
  .hng-auth{width:100%;min-height:100svh;margin:0;display:flex;flex-direction:column;border-radius:0;box-shadow:none}
  .hng-auth-brand{display:none}
  .hng-auth-form-panel{flex:1;justify-content:flex-start;padding:max(34px,env(safe-area-inset-top)) 24px max(20px,env(safe-area-inset-bottom))}
  .hng-auth-form-wrap{max-width:440px;margin:auto}
  .hng-auth-mobile-heading{display:flex;align-items:center;gap:10px;margin-bottom:48px;font-size:13px;color:var(--hng-muted)}
  .hng-auth-mobile-mark{display:grid;place-items:center;min-width:57px;height:42px;padding:0 7px;border-radius:11px;background:var(--hng-navy);color:#fff;font-weight:800;font-size:16px;letter-spacing:.02em}
  .hng-auth-intro h2{font-size:30px}
  .hng-auth-intro p{margin-bottom:28px}
  .hng-auth-footer{margin-top:52px}
}
@media(max-width:360px){.hng-auth-form-panel{padding-left:18px;padding-right:18px}.hng-auth-mobile-heading{margin-bottom:34px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* HNG BRAND FIX 2026 */ .hng-auth-brand-logo{width:min(350px,100%);height:auto;max-height:110px;object-fit:contain;object-position:left center;margin-bottom:40px} @media(max-width:780px){.hng-auth-mobile-heading{background:linear-gradient(135deg,#224c76,#142f4c);min-height:78px;padding:12px 14px;border-radius:14px;gap:12px;margin-bottom:35px;color:white}.hng-auth-mobile-logo{width:52px;height:52px;padding:5px;background:#fff;border-radius:10px;object-fit:contain;flex:none}.hng-auth-mobile-title{display:flex;flex-direction:column;gap:3px;color:#fff}.hng-auth-mobile-title strong{font-size:18px}.hng-auth-mobile-title small{font-size:12px;color:#d7e5f3}}

/* HNG MOBILE WHITE HEADER V2 */ @media(max-width:780px){.hng-auth-mobile-heading{background:transparent!important;min-height:0!important;padding:0!important;border-radius:0!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important;margin-bottom:30px!important;color:#193552!important}.hng-auth-mobile-logo{width:min(290px,100%)!important;height:auto!important;padding:0!important;background:transparent!important;border-radius:0!important;object-fit:contain!important}.hng-auth-mobile-title{display:block!important;color:#64748b!important}.hng-auth-mobile-title strong{display:none!important}.hng-auth-mobile-title small{display:block!important;color:#64748b!important;font-size:12px!important}}

/* HNG MOBILE ATOMO CENTRATO */ @media(max-width:780px){.hng-auth-mobile-heading{align-items:center!important;justify-content:center!important;gap:0!important;margin-bottom:28px!important}.hng-auth-mobile-logo{width:115px!important;height:115px!important;max-width:none!important;padding:0!important;background:transparent!important;border-radius:0!important;object-fit:contain!important;display:block!important}.hng-auth-mobile-title{display:none!important}}

/* HNG MOBILE COMPACT 2026 */ @media(max-width:780px){.hng-auth{min-height:100svh!important}.hng-auth-form-panel{padding:max(12px,env(safe-area-inset-top)) 20px max(12px,env(safe-area-inset-bottom))!important;justify-content:center!important}.hng-auth-form-wrap{margin:auto!important}.hng-auth-mobile-heading{margin-bottom:14px!important}.hng-auth-mobile-logo{width:78px!important;height:78px!important}.hng-auth-kicker{font-size:10px!important}.hng-auth-intro h2{font-size:26px!important;margin:5px 0!important}.hng-auth-intro p{font-size:13px!important;line-height:1.4!important;margin-bottom:16px!important}.hng-auth-field{margin-bottom:12px!important}.hng-auth-field label{font-size:13px!important;margin-bottom:5px!important}.hng-auth-field input{height:48px!important}.hng-password-toggle{height:44px!important;top:2px!important}.hng-auth-submit{min-height:48px!important}.hng-auth-help{font-size:11px!important;margin-top:14px!important}.hng-auth-footer{display:none!important}} @media(max-width:780px) and (max-height:600px){.hng-auth-mobile-logo{width:64px!important;height:64px!important}.hng-auth-mobile-heading{margin-bottom:9px!important}.hng-auth-intro p{margin-bottom:10px!important}.hng-auth-field{margin-bottom:9px!important}.hng-auth-help{margin-top:9px!important}}

/* HNG MOBILE ALIGN TOP 2026 */ @media(max-width:780px){.hng-auth-form-wrap{transform:translateY(-40px)!important}} @media(max-width:780px) and (max-height:600px){.hng-auth-form-wrap{transform:translateY(-16px)!important}}

/* HNG MOBILE POSITION V3 */ @media(max-width:780px){.hng-auth-form-wrap{transform:translateY(-72px)!important}.hng-auth-mobile-logo{width:102px!important;height:102px!important}.hng-auth-mobile-heading{margin-bottom:14px!important}} @media(max-width:780px) and (max-height:600px){.hng-auth-form-wrap{transform:translateY(-24px)!important}.hng-auth-mobile-logo{width:88px!important;height:88px!important}.hng-auth-mobile-heading{margin-bottom:10px!important}}

/* HNG ACCENTI ROSSI V1 */ .hng-auth-kicker::after{content:"";display:inline-block;width:22px;height:3px;background:#d72236;border-radius:4px;margin-left:10px;vertical-align:middle}.hng-password-toggle:hover{color:#c82539!important;background:#fff2f4!important}.hng-auth-submit{box-shadow:0 9px 18px rgba(21,52,85,.14),inset 0 -3px 0 #d72236!important}

/* HNG DECOR ATOMO RED 2026 */ .hng-auth-form-panel{position:relative;overflow:hidden}.hng-auth-form-panel::after{content:"";position:absolute;right:-70px;bottom:-70px;width:280px;height:280px;background:url("../webapp/img/brand/logo_no_scritta.png") no-repeat center/contain;opacity:.07;filter:sepia(1) saturate(7) hue-rotate(310deg) brightness(.95);pointer-events:none;z-index:0}.hng-auth-form-wrap{position:relative;z-index:1}@media(max-width:780px){.hng-auth-form-panel::after{width:120px;height:120px;right:-18px;bottom:-18px;opacity:.045}}

/* HNG MOBILE NO WATERMARK */ @media(max-width:780px){.hng-auth-form-panel::after{display:none!important}}

/* HNG MOBILE WATERMARK V2 */ @media(max-width:780px){.hng-auth-form-panel::after{display:block!important;right:18px!important;bottom:20px!important;width:150px!important;height:150px!important;opacity:.13!important;filter:brightness(0) saturate(100%) invert(20%) sepia(88%) saturate(3300%) hue-rotate(338deg) brightness(95%) contrast(95%)!important}} @media(max-width:780px) and (max-height:600px){.hng-auth-form-panel::after{width:100px!important;height:100px!important;opacity:.09!important}}

/* HNG LOGIN ERROR LAYOUT FIX */ @media(max-width:780px){.hng-auth-form-panel.hng-auth-has-error{justify-content:flex-start!important;overflow-y:auto!important;max-height:100dvh!important}.hng-auth-form-panel.hng-auth-has-error .hng-auth-form-wrap{transform:none!important;margin-top:24px!important;margin-bottom:24px!important}}
