/* Heliwest APP v16 — design system finale.
   Caricato per ultimo: normalizza shell, componenti e viste ereditate dalle versioni precedenti.
   Le regole di stampa restano in styles.css (questo file agisce solo su schermo, salvo poche eccezioni in fondo). */
:root{
 --hw-font:"Inter","Segoe UI Variable","Segoe UI",system-ui,-apple-system,"Helvetica Neue",Roboto,Arial,sans-serif;
 --hw-bg:#f3f5f8;--hw-card:#ffffff;--hw-ink:#0f1f2e;--hw-ink2:#2b3d4f;--hw-muted:#5c6c7d;--hw-faint:#8494a5;
 --hw-line:#e2e8ef;--hw-line2:#d3dce6;--hw-hover:#f5f8fb;
 --hw-navy:#0c2238;--hw-navy2:#13304d;--hw-primary:#1b5a8e;--hw-primary-h:#164b77;--hw-primary-soft:#e9f1f8;--hw-accent:#0e7c86;
 --hw-ok:#1f7a4d;--hw-ok-soft:#e8f5ee;--hw-warn:#9a5b00;--hw-warn-soft:#fdf3e1;--hw-bad:#b42318;--hw-bad-soft:#fdeceb;
 --hw-r:10px;--hw-r-sm:7px;--hw-shadow:0 1px 2px rgba(16,32,48,.05),0 1px 3px rgba(16,32,48,.06);--hw-shadow-lg:0 18px 50px rgba(9,25,42,.22);
 --hw-top:60px;--hw-side:272px;
}
@media screen{
/* ---------------------------------------------------------------- base */
html{-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--hw-top) + 16px)}
body.hw16,body{font-family:var(--hw-font)!important;background:var(--hw-bg)!important;color:var(--hw-ink)!important;font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body.hw16{padding-top:var(--hw-top)}
h1,h2,h3,h4{color:var(--hw-ink);letter-spacing:-.01em}
::selection{background:#cfe3f4}
a{color:var(--hw-primary)}

/* --------------------------------------------------------------- topbar */
body.hw16 .topbar{position:fixed!important;top:0;left:0;right:0;height:var(--hw-top)!important;min-height:0!important;z-index:900!important;display:flex!important;align-items:center!important;gap:14px!important;padding:0 16px 0 12px!important;background:var(--hw-navy)!important;box-shadow:0 1px 0 rgba(255,255,255,.04),0 2px 10px rgba(0,0,0,.12)!important;border:0!important;flex-wrap:nowrap!important}
body.hw16 .topbar .brand{display:flex;align-items:center;gap:12px;cursor:pointer;min-width:0;flex:0 1 auto;border-radius:8px;padding:4px 6px}
body.hw16 .topbar .brand:hover{background:rgba(255,255,255,.06)}
body.hw16 .topbar .logo-img{width:auto!important;height:36px!important;max-height:36px!important;padding:4px 8px!important;border-radius:6px!important;border:0!important;background:#fff!important}
body.hw16 .topbar h1{font-size:16px!important;font-weight:700;color:#fff!important;margin:0;line-height:1.2;letter-spacing:.01em}
body.hw16 .topbar .brand p{font-size:11.5px!important;color:#9fb6cb!important;margin:1px 0 0!important;white-space:nowrap}
body.hw16 .top-actions{margin-left:auto;display:flex!important;align-items:center;gap:8px!important;flex-wrap:nowrap!important;min-width:0}
.hw16-iconbtn{display:inline-grid!important;place-items:center;width:40px;height:40px;min-height:0!important;padding:0!important;border-radius:8px!important;background:transparent!important;color:#dbe7f2!important;border:0!important}
.hw16-iconbtn:hover{background:rgba(255,255,255,.08)!important}
#hwMenuBtn16{display:none!important}
body.hw16 .topbar button{display:inline-flex;align-items:center;gap:7px;height:36px;min-height:0!important;white-space:nowrap}
body.hw16 .topbar button[hidden]{display:none!important}
body.hw16 #saveBtn{background:#2e7bbf!important;color:#fff!important;border:0!important;padding:0 14px!important;font-weight:600!important}
body.hw16 #saveBtn:hover{background:#3a89cf!important}
body.hw16.hw16-dirty #saveBtn{box-shadow:0 0 0 3px rgba(255,196,77,.55)!important}
body.hw16 .topbar .hw16-ghost-dark,body.hw16 .topbar .ghost{background:transparent!important;color:#dbe7f2!important;border:1px solid rgba(255,255,255,.18)!important;padding:0 12px!important}
body.hw16 .topbar .hw16-ghost-dark:hover,body.hw16 .topbar .ghost:hover{background:rgba(255,255,255,.08)!important}
body.hw16 #roleBadge{background:rgba(255,255,255,.08)!important;color:#e6eef6!important;border:0!important;height:36px;display:inline-flex;align-items:center;padding:0 12px!important;border-radius:8px!important;font-size:12.5px!important;font-weight:600;max-width:240px;overflow:hidden;text-overflow:ellipsis}
.hw16-topslot{display:flex;align-items:center;gap:8px;min-width:0}
/* stato salvataggio */
body.hw16 #hwSave13.hw16-sync{position:static!important;display:inline-flex!important;align-items:center;gap:2px;height:36px;padding:0 4px 0 12px!important;border-radius:999px!important;background:rgba(255,255,255,.08)!important;color:#e6eef6!important;box-shadow:none!important;font-size:12.5px!important;max-width:360px;min-width:0}
body.hw16 #hwSave13.hw16-sync[hidden]{display:none!important}
body.hw16 #hwSave13.hw16-sync span{flex:0 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:16px;position:relative}
body.hw16 #hwSave13.hw16-sync span::before{content:"";position:absolute;left:2px;top:50%;width:8px;height:8px;margin-top:-4px;border-radius:50%;background:#f2b84b;box-shadow:0 0 0 3px rgba(242,184,75,.22)}
body.hw16 #hwSave13.hw16-sync[data-kind=ok] span::before{background:#3ecf8e;box-shadow:0 0 0 3px rgba(62,207,142,.2)}
body.hw16 #hwSave13.hw16-sync[data-kind=error]{background:rgba(220,70,60,.22)!important}
body.hw16 #hwSave13.hw16-sync[data-kind=error] span::before{background:#ff6b5e;box-shadow:0 0 0 3px rgba(255,107,94,.25)}
body.hw16 #hwSave13.hw16-sync button{height:28px!important;min-height:0!important;padding:0 8px!important;margin:0!important;background:transparent!important;color:#cfe0ef!important;border:0!important;border-radius:999px!important;font-size:12px!important;font-weight:500!important}
body.hw16 #hwSave13.hw16-sync button:hover{background:rgba(255,255,255,.1)!important;color:#fff!important}
body.hw16 #hwTask14{position:static!important;background:rgba(255,255,255,.08)!important;color:#e6eef6!important;border:0!important;border-radius:8px!important;padding:0 12px!important;font-size:12.5px!important;box-shadow:none!important;height:36px}
body.hw16 #hwTask14:hover{background:rgba(255,255,255,.14)!important}

/* -------------------------------------------------------------- layout */
body.hw16 .layout{display:block!important;padding:0!important;margin:0!important;max-width:none!important;min-height:calc(100vh - var(--hw-top))!important;gap:0!important}
body.hw16 .sidebar{position:fixed!important;top:var(--hw-top)!important;left:0;bottom:0;width:var(--hw-side)!important;max-height:none!important;height:auto!important;overflow-y:auto!important;overscroll-behavior:contain;padding:14px 12px 0!important;margin:0!important;background:#fff!important;border:0!important;border-right:1px solid var(--hw-line)!important;border-radius:0!important;box-shadow:none!important;z-index:800;display:flex!important;flex-direction:column;scrollbar-width:thin;scrollbar-color:#cbd6e1 transparent}
body.hw16 .content{margin-left:var(--hw-side)!important;padding:28px 36px 64px!important;max-width:none!important;min-width:0;width:auto!important}
body.hw16 .content>.view{max-width:1480px;margin-left:auto;margin-right:auto}
.hw16-backdrop{display:none}

/* --------------------------------------------------------------- sidebar */
body.hw16 #hwMenuHead16,body.hw16 #hwQuick16,body.hw16 .sidebar .status-card,body.hw16 #hwMenuToggle16{display:none!important}
body.hw16 #hwNavSearch15{position:sticky!important;top:-14px!important;z-index:5;margin:0 0 8px!important;height:38px;min-height:0!important;border:1px solid var(--hw-line2)!important;border-radius:8px!important;background:#f7f9fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238494a5' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3 3'/%3E%3C/svg%3E") 11px 50% no-repeat!important;padding:8px 10px 8px 34px!important;font-size:13px!important;box-shadow:0 -14px 0 #fff!important}
body.hw16 #hwNavSearch15:focus{background-color:#fff!important;border-color:var(--hw-primary)!important;outline:0!important;box-shadow:0 0 0 3px rgba(27,90,142,.15),0 -14px 0 #fff!important}
body.hw16 #hwNavResults16{font-size:11.5px;color:var(--hw-faint);margin:0 4px 6px;min-height:0}
body.hw16 #hwNavResults16:not(:empty){display:block}
body.hw16 .sidebar .nav{display:flex!important;align-items:center;width:100%;min-height:34px!important;padding:7px 10px 7px 12px!important;margin:1px 0!important;border-radius:7px!important;font-size:13.25px!important;font-weight:500!important;color:var(--hw-ink2)!important;background:transparent!important;border:0!important;box-shadow:none!important;text-align:left;line-height:1.3!important;white-space:normal!important}
body.hw16 .sidebar .nav:hover{background:var(--hw-hover)!important;color:var(--hw-ink)!important}
body.hw16 .sidebar .nav.active,body.hw16 .sidebar .nav[aria-current=page]{background:var(--hw-primary-soft)!important;color:var(--hw-primary)!important;font-weight:650!important;box-shadow:inset 3px 0 0 var(--hw-primary)!important}
body.hw16 .sidebar .nav.emphasis{color:var(--hw-accent)!important;font-weight:600!important}
body.hw16 .sidebar .nav.emphasis::before{content:"+";display:inline-grid;place-items:center;width:18px;height:18px;margin-right:8px;border-radius:5px;background:#e3f3f4;color:var(--hw-accent);font-weight:700;font-size:13px;flex:0 0 auto}
body.hw16 .sidebar .nav-home{font-weight:600!important;margin-bottom:4px!important}
body.hw16 .sidebar .nav-group{border:0!important;border-top:1px solid var(--hw-line)!important;margin:6px 0 0!important;padding:6px 0 2px!important;background:transparent!important}
body.hw16 .sidebar .nav-section-title{display:flex!important;align-items:center;justify-content:space-between;min-height:32px!important;padding:6px 10px 6px 12px!important;font-size:11px!important;font-weight:700!important;letter-spacing:.06em!important;text-transform:uppercase!important;color:var(--hw-faint)!important;border-radius:7px;cursor:pointer;user-select:none}
body.hw16 .sidebar .nav-section-title:hover{color:var(--hw-ink2)!important;background:var(--hw-hover)!important}
body.hw16 .sidebar .nav-section-title::after{content:""!important;float:none!important;width:7px;height:7px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(45deg);margin:-3px 4px 0 8px;transition:transform .15s}
body.hw16 .sidebar .nav-section-title[aria-expanded=false]::after{transform:rotate(-45deg);margin-top:0}
body.hw16 .sidebar .nav-group:has(.nav.active) .nav-section-title{color:var(--hw-primary)!important}
body.hw16 .sidebar .nav-group.hw-collapsed15>.nav{display:none!important}
body.hw16 .sidebar.hw-menu-closed16 .nav-group,body.hw16 .sidebar.hw-menu-closed16>.nav-home{display:block!important}
.hw16-sidefoot{margin-top:auto;position:sticky;bottom:0;display:flex;justify-content:space-between;gap:8px;padding:12px 12px 14px;background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 35%);font-size:11.5px;color:var(--hw-faint)}

/* -------------------------------------------------------------- headers */
body.hw16 .view>.view-header,body.hw16 .view-header{display:flex!important;align-items:flex-end!important;justify-content:space-between;gap:16px 24px!important;flex-wrap:wrap;border-bottom:1px solid var(--hw-line)!important;padding:0 0 18px!important;margin:0 0 22px!important;background:transparent!important}
body.hw16 .view-header>div:first-child{flex:1 1 380px;min-width:0}
body.hw16 .view-header h2{font-size:24px!important;font-weight:700!important;line-height:1.2;margin:0 0 6px!important;color:var(--hw-ink)!important;letter-spacing:-.02em}
body.hw16 .view-header p{font-size:13.5px!important;color:var(--hw-muted)!important;max-width:820px;margin:0!important;line-height:1.55}
body.hw16 .header-actions,body.hw16 .view-header .actions{display:flex!important;flex-wrap:wrap;gap:8px!important;align-items:center;justify-content:flex-end}
body.hw16 h3{font-size:15.5px;font-weight:650;margin:0 0 12px;color:var(--hw-ink)}

/* -------------------------------------------------------------- buttons */
body.hw16 button,body.hw16 .button,body.hw16 a.button{font-family:inherit;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px!important;padding:7px 14px!important;border-radius:var(--hw-r-sm)!important;font-size:13px!important;font-weight:600!important;line-height:1.2;letter-spacing:0;cursor:pointer;box-shadow:none!important;transition:background-color .12s,border-color .12s,color .12s,box-shadow .12s!important;transform:none!important;filter:none!important}
body.hw16 .content button:not(.ghost):not(.nav):not([class*="card"]):not(.danger):not(.mini-btn):not(.hw16-pill):not([class*="tab"]):not(.hw-shortcut16),body.hw16 dialog button:not(.ghost):not(.danger):not(.hw16-msg-x){background:var(--hw-primary)!important;color:#fff!important;border:1px solid var(--hw-primary)!important}
body.hw16 .content button:not(.ghost):not(.nav):not([class*="card"]):not(.danger):not(.mini-btn):not(.hw16-pill):not([class*="tab"]):not(.hw-shortcut16):hover,body.hw16 dialog button:not(.ghost):not(.danger):not(.hw16-msg-x):hover{background:var(--hw-primary-h)!important;border-color:var(--hw-primary-h)!important}
body.hw16 button.ghost,body.hw16 .content button.ghost,body.hw16 dialog button.ghost{background:#fff!important;color:var(--hw-ink2)!important;border:1px solid var(--hw-line2)!important}
body.hw16 button.ghost:hover{background:var(--hw-hover)!important;border-color:#bfcbd8!important;color:var(--hw-ink)!important}
body.hw16 button.danger{background:#fff!important;color:var(--hw-bad)!important;border:1px solid #f0c7c3!important}
body.hw16 button.danger:hover{background:var(--hw-bad-soft)!important}
body.hw16 button:disabled,body.hw16 button[disabled]{opacity:.45!important;cursor:not-allowed!important}
body.hw16 button.mini-btn,body.hw16 .mini-btn{min-height:28px!important;padding:4px 10px!important;font-size:12px!important}
body.hw16 :focus-visible{outline:2px solid #3b8fd6!important;outline-offset:2px!important}

/* ---------------------------------------------------------------- forms */
body.hw16 input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),body.hw16 select,body.hw16 textarea{font-family:inherit;font-size:14px!important;line-height:1.4!important;color:var(--hw-ink)!important;background:#fff!important;border:1px solid var(--hw-line2)!important;border-radius:var(--hw-r-sm)!important;padding:8px 11px!important;min-height:38px;width:100%;max-width:100%;box-shadow:none!important;transition:border-color .12s,box-shadow .12s}
body.hw16 input:not([type=checkbox]):not([type=radio]):hover,body.hw16 select:hover,body.hw16 textarea:hover{border-color:#b9c6d3!important}
body.hw16 input:not([type=checkbox]):not([type=radio]):focus,body.hw16 select:focus,body.hw16 textarea:focus{outline:0!important;border-color:var(--hw-primary)!important;box-shadow:0 0 0 3px rgba(27,90,142,.14)!important}
body.hw16 input[readonly]:not([type=checkbox]),body.hw16 input:disabled,body.hw16 select:disabled,body.hw16 textarea:disabled,body.hw16 textarea[readonly]{background:#f5f7fa!important;color:#3d4f61!important}
body.hw16 select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%235c6c7d' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 10px center!important;padding-right:30px!important}
body.hw16 select[multiple]{background-image:none!important;padding-right:11px!important;min-height:90px}
body.hw16 textarea{min-height:76px;resize:vertical}
body.hw16 input[type=checkbox],body.hw16 input[type=radio]{width:16px!important;height:16px!important;min-height:0!important;margin:0!important;accent-color:var(--hw-primary);flex:0 0 auto;vertical-align:middle}
body.hw16 label{font-size:12.5px!important;font-weight:600!important;color:var(--hw-ink2)!important;gap:6px!important;min-width:0}
body.hw16 label small,body.hw16 .form-grid small{font-weight:400;color:var(--hw-faint);font-size:11.5px;line-height:1.4}
body.hw16 label:has(>input[type=checkbox]),body.hw16 label:has(>input[type=radio]){flex-direction:row!important;align-items:center!important;gap:8px!important;font-weight:500!important;color:var(--hw-ink)!important;cursor:pointer}
body.hw16 fieldset{border:1px solid var(--hw-line)!important;border-radius:var(--hw-r)!important;padding:12px 14px!important;margin:0;min-width:0;background:#fbfcfd}
body.hw16 legend{font-size:12px;font-weight:700;color:var(--hw-ink2);padding:0 6px;text-transform:none}
body.hw16 .checkbox-card{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px 14px!important}
body.hw16 .form-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important}
body.hw16 .panel .form-grid,body.hw16 .card-panel .form-grid{padding:0!important}
body.hw16 .form-grid>.span2{grid-column:span 2!important}
body.hw16 .form-grid>.span3{grid-column:span 3!important}
body.hw16 .form-grid>.span4,body.hw16 .form-grid>.full{grid-column:1/-1!important}
body.hw16 .form-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}
body.hw16 .form-actions button{min-width:0!important}

/* --------------------------------------------------------------- panels */
body.hw16 .panel,body.hw16 .card-panel,body.hw16 .cards .panel{background:var(--hw-card)!important;border:1px solid var(--hw-line)!important;border-radius:var(--hw-r)!important;box-shadow:var(--hw-shadow)!important;padding:20px 22px!important;min-width:0}
body.hw16 .panel+.panel,body.hw16 .risk-section+.risk-section{margin-top:16px}
body.hw16 .panel h3,body.hw16 .card-panel h3{font-size:15px!important;margin:0 0 14px!important;padding-bottom:10px;border-bottom:1px solid var(--hw-line);color:var(--hw-ink)!important}
body.hw16 .sub-panel{background:#f8fafc!important;border:1px solid var(--hw-line)!important;box-shadow:none!important;border-radius:var(--hw-r)!important}
body.hw16 .panel-grid,body.hw16 .split-grid,body.hw16 .cards{gap:16px!important;align-items:start}
body.hw16 .split-grid{display:grid!important;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)!important}
body.hw16 .panel-grid{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)!important}
body.hw16 .cards{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))!important}

/* ----------------------------------------------------------------- KPIs */
body.hw16 .kpis{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;gap:12px!important;margin:0 0 20px!important}
body.hw16 .kpi{background:var(--hw-card)!important;border:1px solid var(--hw-line)!important;border-radius:var(--hw-r)!important;box-shadow:var(--hw-shadow)!important;padding:14px 16px!important;min-width:0;line-height:1.35!important;position:relative;overflow:hidden}
body.hw16 .kpi>span:first-child,body.hw16 .kpi .label{display:block;font-size:11.5px!important;font-weight:600;color:var(--hw-muted)!important;text-transform:none;letter-spacing:0}
body.hw16 .kpi b{display:block;font-size:26px!important;font-weight:700!important;line-height:1.15!important;margin:6px 0 4px!important;color:var(--hw-ink)!important;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
body.hw16 .kpi span{font-size:12px!important;color:var(--hw-muted)!important}
body.hw16 .kpi.ok b{color:var(--hw-ok)!important}body.hw16 .kpi.warn b{color:var(--hw-warn)!important}body.hw16 .kpi.bad b{color:var(--hw-bad)!important}
body.hw16 .kpi.ok{box-shadow:inset 3px 0 0 var(--hw-ok),var(--hw-shadow)!important}body.hw16 .kpi.warn{box-shadow:inset 3px 0 0 #e0a43a,var(--hw-shadow)!important}body.hw16 .kpi.bad{box-shadow:inset 3px 0 0 var(--hw-bad),var(--hw-shadow)!important}

/* -------------------------------------------------------------- filters */
body.hw16 .filters,body.hw16 .filter-row{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;gap:10px!important;align-items:center;background:var(--hw-card)!important;border:1px solid var(--hw-line)!important;border-radius:var(--hw-r)!important;padding:12px!important;margin:0 0 14px!important;box-shadow:var(--hw-shadow)!important}
body.hw16 .filters>*,body.hw16 .filter-row>*{min-width:0!important;width:100%!important;margin:0!important}
body.hw16 .filters>input:first-child,body.hw16 .filter-row>input:first-child{grid-column:span 2}
body.hw16 .card-panel .filter-row,body.hw16 .panel .filter-row,body.hw16 .panel .filters{box-shadow:none!important;padding:0!important;border:0!important;background:transparent!important}

/* --------------------------------------------------------------- tables */
body.hw16 .table-wrap{background:#fff!important;border:1px solid var(--hw-line)!important;border-radius:var(--hw-r)!important;box-shadow:var(--hw-shadow)!important;overflow:auto!important;max-width:100%;-webkit-overflow-scrolling:touch}
body.hw16 .panel .table-wrap,body.hw16 .card-panel .table-wrap{box-shadow:none!important}
body.hw16 table{width:100%;border-collapse:separate!important;border-spacing:0;font-size:13px!important}
body.hw16 th{position:sticky;top:0;z-index:1;background:#f6f8fa!important;color:var(--hw-muted)!important;font-size:11.5px!important;font-weight:650!important;text-transform:uppercase!important;letter-spacing:.04em!important;text-align:left;padding:10px 12px!important;border-bottom:1px solid var(--hw-line)!important;white-space:nowrap}
body.hw16 td{padding:10px 12px!important;border-bottom:1px solid #edf1f5!important;vertical-align:top;color:var(--hw-ink);overflow-wrap:anywhere}
body.hw16 tbody tr:last-child td{border-bottom:0!important}
body.hw16 tbody tr:hover{background:#f7fafc!important}
body.hw16 tr.selected,body.hw16 tr.selected-row,body.hw16 tr.active{background:#eaf2fa!important;box-shadow:inset 3px 0 0 var(--hw-primary)}
body.hw16 td .pill,body.hw16 td .badge{white-space:nowrap}
body.hw16 .mitigation-editor td{min-width:90px}
body.hw16 .mitigation-editor td:nth-child(3){min-width:260px}
body.hw16 .mitigation-editor input,body.hw16 .mitigation-editor select,body.hw16 .mitigation-editor textarea{min-height:34px!important;padding:6px 8px!important;font-size:13px!important}

/* ------------------------------------------------------- pills / notices */
body.hw16 .pill,.hw16-pill{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:2px 9px;font-size:11.5px;font-weight:650;line-height:1.5;background:#eef2f6;color:#3a4b5c;border:1px solid transparent;white-space:nowrap}
body.hw16 .pill.ok,.hw16-pill.done{background:var(--hw-ok-soft);color:var(--hw-ok)}
body.hw16 .pill.warn,.hw16-pill.draft{background:var(--hw-warn-soft);color:var(--hw-warn)}
body.hw16 .pill.bad{background:var(--hw-bad-soft);color:var(--hw-bad)}
body.hw16 .notice{border:1px solid #f1dcb2!important;background:#fffaf0!important;color:#6d4a07!important;border-radius:var(--hw-r)!important;padding:11px 14px!important;margin:0 0 16px!important;font-size:13px;box-shadow:none!important;border-left-width:1px!important}
body.hw16 .notice[hidden]{display:none!important}
body.hw16 .alert{border-radius:var(--hw-r-sm)!important;font-size:13px}
body.hw16 .empty,body.hw16 .hw-empty15{padding:36px 20px!important;text-align:center;color:var(--hw-muted)!important;font-size:13.5px;background:transparent}

/* ------------------------------------------------------------ home cards */
body.hw16 .landing-hero{display:flex!important;align-items:center;gap:24px!important;padding:26px 28px!important;margin:0 0 22px!important;border-radius:14px!important;border:0!important;background:linear-gradient(135deg,#0c2238 0%,#16406a 60%,#1b5a8e 100%)!important;color:#fff!important;box-shadow:0 10px 30px rgba(12,34,56,.18)!important}
body.hw16 .landing-hero img{width:150px!important;height:auto!important;max-height:80px!important;background:#fff!important;border-radius:10px!important;padding:10px 14px!important;border:0!important;object-fit:contain;flex:0 0 auto}
body.hw16 .landing-hero h2{color:#fff!important;font-size:26px!important;margin:0 0 6px!important}
body.hw16 .landing-hero p{color:#c9d9e8!important;max-width:760px;margin:0 0 12px!important;font-size:14px}
body.hw16 .software-version-badge{display:inline-flex;background:rgba(255,255,255,.12)!important;color:#e6eef6!important;border:1px solid rgba(255,255,255,.2)!important;border-radius:999px!important;padding:3px 10px!important;font-size:12px!important;font-weight:600}
body.hw16 .module-cards{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(260px,1fr))!important;gap:14px!important}
body.hw16 .module-card{display:flex!important;flex-direction:column;align-items:flex-start!important;justify-content:flex-start!important;gap:6px;text-align:left!important;min-height:132px;padding:18px 20px!important;background:#fff!important;border:1px solid var(--hw-line)!important;border-radius:12px!important;box-shadow:var(--hw-shadow)!important;color:var(--hw-ink)!important;white-space:normal!important;transition:border-color .15s,box-shadow .15s,transform .15s!important}
body.hw16 .module-card:hover{border-color:#a9c3da!important;box-shadow:0 6px 18px rgba(16,40,64,.09)!important;transform:translateY(-1px)!important}
body.hw16 .module-card span{font-size:10.5px!important;font-weight:700!important;letter-spacing:.08em!important;text-transform:uppercase;color:var(--hw-accent)!important}
body.hw16 .module-card strong{font-size:16.5px!important;font-weight:700!important;line-height:1.3;color:var(--hw-ink)!important}
body.hw16 .module-card small{font-size:13px!important;font-weight:400!important;line-height:1.5;color:var(--hw-muted)!important}
body.hw16 .module-card.primary-module{background:linear-gradient(180deg,#f2f9fa,#fff 60%)!important;border-color:#bfe0e3!important}
body.hw16 .module-card.primary-module strong::after{content:" →";color:var(--hw-accent)}

/* -------------------------------------------------------------- matrices */
body.hw16 .matrix{gap:4px!important}
body.hw16 .matrix .cell{min-height:52px!important;padding:8px!important;font-size:11.5px!important;border-radius:6px!important;overflow-wrap:anywhere;line-height:1.3}

/* ------------------------------------------------------- modals/dialogs */
body.hw16 .hw-detail-modal95{border-radius:14px!important;box-shadow:var(--hw-shadow-lg)!important}
body.hw16 .hw-detail-backdrop95{background:rgba(9,25,42,.45)!important}
body.hw16 .hw-detail-actions15{bottom:-24px;padding:12px 0!important;gap:8px!important}
body.hw16 dialog{border-radius:14px!important;border:0!important;box-shadow:var(--hw-shadow-lg)!important;color:var(--hw-ink)}
body.hw16 dialog::backdrop{background:rgba(9,25,42,.5)!important}
.hw16-confirm{width:min(460px,calc(100vw - 32px));padding:24px!important}
.hw16-confirm h2{font-size:18px;margin:0 0 8px}
.hw16-confirm p{color:var(--hw-muted);margin:0 0 20px;line-height:1.55}
.hw16-confirm footer{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
body.hw16 .hw-back15{display:none!important}
body.hw16 #publicSafetyReport .hw-back15,body.hw16 #publicIsReport .hw-back15{display:inline-flex!important;margin-bottom:16px!important}

/* --------------------------------------------------------------- toasts */
.hw16-msgs{position:fixed;right:18px;bottom:18px;z-index:3000;display:flex;flex-direction:column;gap:10px;width:min(420px,calc(100vw - 24px));pointer-events:none}
.hw16-msg{pointer-events:auto;display:flex;align-items:flex-start;gap:12px;padding:12px 10px 12px 14px;border-radius:10px;background:#fff;border:1px solid var(--hw-line);box-shadow:0 12px 32px rgba(9,25,42,.18);color:var(--hw-ink);animation:hw16in .18s ease-out;font-size:13.5px}
.hw16-msg.out{opacity:0;transform:translateY(6px);transition:.22s}
.hw16-msg p{margin:0;line-height:1.45}.hw16-msg small{display:block;color:var(--hw-muted);margin-top:3px;line-height:1.4}
.hw16-msg-body{flex:1;min-width:0;overflow-wrap:anywhere}
.hw16-msg-icon{flex:0 0 22px;height:22px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:12px;color:#fff;background:var(--hw-primary);margin-top:1px}
.hw16-msg.ok .hw16-msg-icon{background:var(--hw-ok)}.hw16-msg.warn .hw16-msg-icon{background:#d48a0c}.hw16-msg.error .hw16-msg-icon{background:var(--hw-bad)}
.hw16-msg.error{border-color:#f2c9c5}.hw16-msg.warn{border-color:#f3dfb8}
.hw16-msg-x{flex:0 0 auto;width:26px;height:26px;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;color:var(--hw-faint)!important;font-size:18px!important;line-height:1;border-radius:6px!important}
.hw16-msg-x:hover{background:var(--hw-hover)!important;color:var(--hw-ink)!important}
.hw16-msg-actions{display:flex;gap:8px;margin-top:8px}
.hw16-msg-actions button{min-height:28px!important;padding:3px 10px!important;font-size:12px!important;background:#fff!important;color:var(--hw-primary)!important;border:1px solid var(--hw-line2)!important}
@keyframes hw16in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* --------------------------------------------------------- Risk Assessment */
.hw16-ra-state{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;margin:0 0 16px;border:1px solid var(--hw-line);border-radius:var(--hw-r);background:#fff;font-size:13px;box-shadow:var(--hw-shadow)}
.hw16-ra-state strong{font-size:14px;font-variant-numeric:tabular-nums}
.hw16-ra-state .hw16-ra-dirty{display:none;margin-left:auto;color:var(--hw-warn);font-weight:600;font-size:12px}
.hw16-ra-state.is-dirty .hw16-ra-dirty{display:inline}
.hw16-ra-state.new .hw16-pill{background:var(--hw-primary-soft);color:var(--hw-primary)}
.hw16-muted{color:var(--hw-muted)}
#riskTool{padding-bottom:84px}
.hw16-actionbar{position:sticky;bottom:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:20px -4px 0;padding:12px 16px;background:rgba(255,255,255,.96);backdrop-filter:blur(6px);border:1px solid var(--hw-line);border-radius:12px;box-shadow:0 -6px 24px rgba(9,25,42,.08)}
.hw16-actionbar-info{font-size:13px;color:var(--hw-ink2);min-width:0}
.hw16-actionbar-btns{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}
.hw16-actionbar-btns button[hidden]{display:none!important}
.hw16-risk{display:inline-block;padding:1px 8px;border-radius:6px;font-variant-numeric:tabular-nums}
.hw16-risk.ok{background:var(--hw-ok-soft);color:var(--hw-ok)}.hw16-risk.warn{background:var(--hw-warn-soft);color:var(--hw-warn)}.hw16-risk.bad{background:var(--hw-bad-soft);color:var(--hw-bad)}
.hw16-result{display:flex;gap:16px;align-items:flex-start;padding:18px 20px;margin:0 0 16px;border:1px solid #bfe3cf;background:linear-gradient(180deg,#f0faf4,#fff);border-radius:12px}
.hw16-result[hidden]{display:none}
.hw16-result-icon{flex:0 0 36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--hw-ok);color:#fff;font-weight:800}
.hw16-result h3{margin:2px 0 4px!important;border:0!important;padding:0!important}
.hw16-result p{margin:0 0 12px;color:var(--hw-ink2)}
.hw16-result-actions,.hw16-detail-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.hw16-detail-actions{padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--hw-line)}
body.hw16 .ra-tool-result{display:none}
body.hw16 #raArchivePrintArea{display:none!important}
body.hw16 .risk-tool-form .panel{margin-bottom:16px}
body.hw16 #riskTool .view-header .header-actions #raToolGenerateBtn{display:none}
body.hw16 #raArchiveTable tr[data-ra-archive]{cursor:pointer}
body.hw16 #raArchiveTable .hw16-pill{margin-bottom:4px}

/* -------------------------------------------------------------- misc fixes */
body.hw16 .content img{max-width:100%}
body.hw16 .content{overflow-x:clip}
body.hw16 .view.active{animation:hw16view .14s ease-out}
@keyframes hw16view{from{opacity:.4}to{opacity:1}}
body.hw16 .hw13-conflict{bottom:20px!important;right:20px!important;border-radius:12px!important;box-shadow:var(--hw-shadow-lg)}
body.hw16 #loginGate84{z-index:1000!important}

/* ---------------------------------------------------------- responsive */
@media (max-width:1280px){
 body.hw16 .content{padding:24px 24px 56px!important}
 body.hw16 .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.hw16 .form-grid>.span3{grid-column:1/-1!important}
 body.hw16 #roleBadge{display:none!important}
}
@media (max-width:1100px){
 #hwMenuBtn16{display:inline-grid!important}
 body.hw16 .sidebar{transform:translateX(-102%);transition:transform .22s ease;box-shadow:none!important;width:min(300px,86vw)!important;z-index:950}
 body.hw16.hw16-nav-open .sidebar{transform:none;box-shadow:12px 0 40px rgba(9,25,42,.25)!important}
 body.hw16.hw16-nav-open .hw16-backdrop{display:block;position:fixed;inset:var(--hw-top) 0 0 0;background:rgba(9,25,42,.4);z-index:940}
 body.hw16 .content{margin-left:0!important}
 body.hw16 .split-grid,body.hw16 .panel-grid{grid-template-columns:1fr!important}
 body.hw16 .topbar .brand p{display:none}
}
@media (max-width:760px){
 :root{--hw-top:56px}
 body.hw16 .topbar{gap:6px!important;padding:0 8px!important}
 body.hw16 .topbar .logo-img{height:30px!important}
 body.hw16 .topbar h1{display:none}
 body.hw16 .topbar button span,body.hw16 #hwTask14 span{display:none}
 body.hw16 .topbar button{padding:0 10px!important}
 body.hw16 #hwSave13.hw16-sync{max-width:none;padding:0 2px 0 8px!important}
 body.hw16 #hwSave13.hw16-sync span{width:0;padding-left:10px;overflow:hidden;color:transparent}
 body.hw16 #hwSave13.hw16-sync #hwRecover13{display:none}
 body.hw16 #loginBtn,body.hw16 #installBtn{padding:0 10px!important}
 body.hw16 .content{padding:18px 14px 48px!important}
 body.hw16 .view-header{align-items:flex-start!important}
 body.hw16 .view-header h2{font-size:21px!important}
 body.hw16 .header-actions{justify-content:flex-start;width:100%}
 body.hw16 .form-grid{grid-template-columns:1fr!important}
 body.hw16 .form-grid>*{grid-column:1/-1!important}
 body.hw16 .filters,body.hw16 .filter-row{grid-template-columns:1fr 1fr!important}
 body.hw16 .filters>input:first-child,body.hw16 .filter-row>input:first-child{grid-column:1/-1}
 body.hw16 .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.hw16 .landing-hero{flex-direction:column;align-items:flex-start!important;padding:20px!important}
 body.hw16 .landing-hero h2{font-size:22px!important}
 body.hw16 .module-cards{grid-template-columns:1fr!important}
 body.hw16 .module-card{min-height:0}
 body.hw16 .panel,body.hw16 .card-panel{padding:16px!important}
 .hw16-actionbar{margin:16px 0 0;padding:10px}
 .hw16-actionbar-btns{width:100%}.hw16-actionbar-btns button{flex:1 1 auto}
 .hw16-msgs{left:12px;right:12px;bottom:12px;width:auto}
}
}
@media print{
 .hw16-msgs,.hw16-actionbar,.hw16-ra-state,.hw16-result,.hw16-backdrop,#hwMenuBtn16,.hw16-confirm{display:none!important}
 body.hw16{padding-top:0!important}
 body.hw16 .content{margin-left:0!important}
}
/* --- v16 rifiniture shell --- */
@media screen{
 body.hw16 #saveCompactStatus,body.hw16 .save-compact-status{display:none!important}
 body.hw16 .sidebar{padding:0 12px!important}
 body.hw16 #hwNavSearch15{top:0!important;margin:14px 0 8px!important;box-shadow:0 -14px 0 #fff,0 8px 10px -8px rgba(16,32,48,.12)!important}
 body.hw16 #hwNavSearch15:focus{box-shadow:0 0 0 3px rgba(27,90,142,.15),0 -14px 0 #fff!important}
 body.hw16 #hwNavSearch15:placeholder-shown~#hwNavResults16{display:none!important}
 body.hw16 .sidebar .nav{justify-content:flex-start!important;text-align:left!important}
 body.hw16 .sidebar .nav-group{padding-left:0!important;padding-right:0!important}
 body.hw16 .sidebar .nav-group>*{margin-left:0!important;margin-right:0!important}
 body.hw16 .sidebar .nav-section-title{border:0!important;background:transparent;line-height:1.3!important}
 body.hw16 .sidebar .nav-group>.nav{padding-left:14px!important}
 .hw16-sidefoot{position:static;padding:16px 12px 16px;margin-top:auto}
 /* accettazioni elettroniche compatte */
 body.hw16 .hw-accept-panel87{border:1px solid var(--hw-line)!important;border-radius:var(--hw-r)!important;background:#fff!important;box-shadow:var(--hw-shadow)!important;padding:14px 16px!important;margin:0 0 16px!important}
 body.hw16 .hw-accept-title87{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}
 body.hw16 .hw-accept-title87 h4{margin:0;font-size:14px;color:var(--hw-ink)}
 body.hw16 .hw-accept-title87 small{color:var(--hw-muted)}
 body.hw16 .hw-accept-title87>div:first-child::after{content:"Configura firmatari ▾";display:inline-block;margin-top:4px;font-size:11.5px;font-weight:600;color:var(--hw-primary)}
 body.hw16 .hw-accept-host87:not([data-acc16=open]) .hw-accept-config87{display:none!important}
 body.hw16 [data-acc16=open]>.hw-accept-panel87 .hw-accept-title87>div:first-child::after{content:"Nascondi configurazione ▴"}
 body.hw16 .hw-accept-title-actions87{display:flex;align-items:center;gap:10px;font-size:11.5px;color:var(--hw-faint)}
 body.hw16 .hw-accept-config87{margin-top:12px}
 body.hw16 .hw-accept-cards87{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))!important;gap:10px!important;margin-top:12px!important}
 body.hw16 .hw-accept-card87{display:grid!important;grid-template-columns:1fr auto auto;align-items:center;gap:12px!important;padding:10px 12px!important;border-radius:8px!important;border:1px solid var(--hw-line)!important;background:#fbfcfd!important;box-shadow:none!important;font-size:13px}
 body.hw16 .hw-accept-card87.wait{border-color:#f0dcb6!important;background:#fffaf1!important}
 body.hw16 .hw-accept-card87.ok,body.hw16 .hw-accept-card87.done,body.hw16 .hw-accept-card87.accepted{border-color:#bfe3cf!important;background:#f2faf5!important}
 body.hw16 .hw-accept-card87 strong{font-size:11px;letter-spacing:.04em;color:var(--hw-warn)}
 body.hw16 .hw-accept-card87 small{display:block;color:var(--hw-faint)}
 body.hw16 .hw-accept-card87 button{width:auto!important;margin:0!important;min-height:32px!important}
 body.hw16 .kpis{grid-template-columns:repeat(auto-fit,minmax(132px,1fr))!important}
}
@media screen{
 body.hw16 td{overflow-wrap:break-word!important;word-break:normal!important}
 body.hw16 tr.selected-row,body.hw16 tr.selected{outline:0!important;background:#eef5fb!important}
 body.hw16 .table-wrap tr.selected-row td,body.hw16 .table-wrap tr.selected td{background:#eef5fb!important;box-shadow:none!important}
 body.hw16 .table-wrap tr.selected-row td:first-child,body.hw16 .table-wrap tr.selected td:first-child{box-shadow:inset 3px 0 0 var(--hw-primary)!important}
 body.hw16 .split-grid>*,body.hw16 .panel-grid>*,body.hw16 .cards>*,body.hw16 .kpis>*{margin-top:0!important}
 body.hw16 #riskAssessmentArchive .split-grid{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)!important}
 body.hw16 .report-table th{width:34%;text-transform:none!important;letter-spacing:0!important;font-size:12px!important;color:var(--hw-muted)!important;background:#f8fafc!important;position:static}
}
@media screen{
 body.hw16 .hw-accept-host87:has(.hw-accept-panel87>.empty){display:none!important}
 body.hw16 .kpi-card{background:#fff!important;border:1px solid var(--hw-line)!important;border-radius:var(--hw-r)!important;padding:12px 14px!important;display:flex!important;flex-direction:column;gap:2px;min-width:0;box-shadow:none!important}
 body.hw16 .kpi-card span{font-size:11.5px;font-weight:600;color:var(--hw-muted)}
 body.hw16 .kpi-card strong{font-size:22px;font-weight:700;color:var(--hw-ink);line-height:1.2}
 body.hw16 .kpi-card small{font-size:11.5px;color:var(--hw-faint)}
 /* pulsanti-scheda (EASA, manuali) */
 body.hw16 .easa-link-card,body.hw16 .manual-doc-card{display:flex!important;flex-direction:column;align-items:flex-start!important;justify-content:flex-start!important;text-align:left!important;gap:4px;white-space:normal!important;background:#fff!important;color:var(--hw-ink)!important;border:1px solid var(--hw-line)!important;border-radius:var(--hw-r)!important;padding:12px 14px!important;font-weight:400!important;height:auto!important}
 body.hw16 .easa-link-card:hover,body.hw16 .manual-doc-card:hover{border-color:#a9c3da!important;background:#fbfdff!important}
 body.hw16 .manual-doc-card.selected{border-color:var(--hw-primary)!important;background:var(--hw-primary-soft)!important;box-shadow:inset 3px 0 0 var(--hw-primary)!important}
 body.hw16 .easa-link-card *,body.hw16 .manual-doc-card *{color:inherit}
 body.hw16 .easa-link-card strong,body.hw16 .easa-link-card b,body.hw16 .manual-doc-card strong,body.hw16 .manual-doc-card b{font-weight:650;color:var(--hw-ink)!important}
 body.hw16 .easa-link-card small,body.hw16 .easa-link-card span,body.hw16 .manual-doc-card small,body.hw16 .manual-doc-card span{color:var(--hw-muted)!important;font-size:12px}
}
@media screen{
 body.hw16 .hw-accept-title87>div:first-child::after{display:block}
 body.hw16 .layout>.view{margin-left:var(--hw-side);padding:28px 36px}
}
@media screen{
 body.hw16 .topbar{flex-direction:row!important}
 body.hw16 .topbar .brand{flex-direction:row!important}
 body.hw16 .top-actions{flex-wrap:nowrap!important;width:auto!important;justify-content:flex-end}
}
@media screen and (max-width:760px){
 body.hw16 .view-header{flex-direction:column!important;align-items:stretch!important}
 body.hw16 .view-header>div:first-child{flex:0 0 auto!important}
 body.hw16 .header-actions{justify-content:flex-start!important}
 body.hw16 .top-actions{gap:4px!important}
 body.hw16 .topbar .brand{padding:2px!important}
 body.hw16 #hwTask14,body.hw16 #logoutBtn{padding:0 9px!important}
}
/* --- accesso --- */
@media screen{
 .login-gate84{background:radial-gradient(900px 520px at 15% 0%,rgba(46,123,191,.45),transparent 60%),linear-gradient(160deg,#0c2238 0%,#13304d 100%)!important;padding:24px 16px!important}
 .login-card84{width:min(420px,calc(100vw - 32px))!important;max-width:none!important;padding:34px 32px 28px!important;border-radius:16px!important;border:0!important;box-shadow:0 30px 80px rgba(0,0,0,.35)!important;background:#fff!important}
 .login-brand84{display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;gap:14px!important;margin-bottom:22px!important}
 .login-brand84 img{width:170px!important;max-width:70%!important;height:auto!important;max-height:none!important;border:0!important;padding:0!important;background:transparent!important}
 .login-brand84 h2{font-size:20px!important;color:var(--hw-ink)!important;margin:0 0 4px!important}
 .login-brand84 p{font-size:13.5px!important;color:var(--hw-muted)!important;margin:0!important}
 .login-form84{display:flex!important;flex-direction:column;gap:14px!important}
 .login-form84 label{display:flex!important;flex-direction:column;gap:6px!important;font-size:12.5px!important;font-weight:600!important;color:var(--hw-ink2)!important}
 .login-form84 input{height:44px!important;font-size:15px!important}
 .login-error84:empty{display:none!important}
 .login-error84{color:var(--hw-bad)!important;background:var(--hw-bad-soft)!important;border-radius:8px;padding:8px 12px!important;font-size:13px}
 .login-actions84{display:flex!important;flex-direction:column;gap:8px;margin-top:4px}
 .login-actions84 button{width:100%!important;height:44px!important;font-size:14.5px!important}
 .login-actions84 button.ghost{display:none!important}
 .login-public84{margin-top:22px!important;padding-top:18px!important;border-top:1px solid var(--hw-line)!important;text-align:center}
 .login-public84 p{font-size:12.5px!important;color:var(--hw-muted)!important;margin:0 0 10px!important}
 .public-buttons84{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}
 .public-buttons84 button{width:100%!important;background:#fff!important;color:var(--hw-primary)!important;border:1px solid var(--hw-line2)!important;font-size:12.5px!important}
}
@media screen{
 body.hw16 .risk-tool-form>.panel,body.hw16 .risk-tool-form>.risk-section{margin:0!important}
 body.hw16 .risk-tool-form{display:grid!important;gap:16px!important}
 body.hw16.hw16-anon .sidebar,body.hw16.hw16-anon #hwMenuBtn16{display:none!important}
 body.hw16.hw16-anon .content{margin-left:0!important}
 body.hw16.hw16-anon .content>.view{max-width:1100px}
}
@media screen{
 body.hw16 .table-note,body.hw16 .hw96-more{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;font-size:12.5px;color:var(--hw-muted);border-top:1px solid var(--hw-line);background:#fafbfc}
 body.hw16 .hw96-more{justify-content:flex-end}
}
@media screen{
 body.hw16 .kpi strong{display:block;font-size:26px;font-weight:700;line-height:1.15;margin:6px 0 4px;color:var(--hw-ink);font-variant-numeric:tabular-nums}
 body.hw16 .kpi small{display:block;font-size:12px;color:var(--hw-muted)}
 body.hw16 .regulatory-kpis{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;gap:12px!important;margin-bottom:20px}
 body.hw16 select[multiple]{min-height:0!important;height:auto;max-height:92px;padding:4px 6px!important;font-size:12.5px!important}
 /* le griglie dei moduli si adattano alla larghezza reale del pannello */
 body.hw16 .panel,body.hw16 .card-panel{container-type:inline-size}
 @container (max-width:720px){
  body.hw16 .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.hw16 .form-grid>.span3,body.hw16 .form-grid>.span4{grid-column:1/-1!important}
 }
 @container (max-width:420px){
  body.hw16 .form-grid{grid-template-columns:1fr!important}
  body.hw16 .form-grid>*{grid-column:1/-1!important}
 }
}
@media screen{
 body.hw16 .sidebar{align-items:stretch!important;justify-content:flex-start!important}
 body.hw16 .sidebar>*{width:auto;max-width:100%;flex-shrink:0}
 body.hw16 .sidebar .nav-group,body.hw16 .sidebar .nav-section-title{width:100%!important;box-sizing:border-box}
}
@media screen and (max-width:1100px){
 body.hw16 .sidebar{top:var(--hw-top)!important;height:auto!important;z-index:880!important}
 body.hw16.hw16-nav-open .hw16-backdrop{z-index:870!important}
}
@media screen{
 body.hw16 .sidebar{bottom:auto!important;height:calc(100vh - var(--hw-top))!important;height:calc(100dvh - var(--hw-top))!important}
}
@media screen{
 body.hw16 .sidebar .nav-section-title{margin:0!important;min-height:36px!important}
 body.hw16 .sidebar .nav-group{padding:4px 0!important;margin:0!important}
 body.hw16 .sidebar .nav-group:not(.hw-collapsed15){padding-bottom:8px!important}
 body.hw16 .sidebar .nav-home{margin:0 0 8px!important}
}
@media print{
 body.print-ra-single #raArchivePrintArea table{table-layout:fixed!important;width:100%!important;max-width:100%!important}
 body.print-ra-single #raArchivePrintArea th,body.print-ra-single #raArchivePrintArea td{white-space:normal!important;overflow-wrap:break-word!important;word-break:break-word!important}
 body.print-ra-single #raArchivePrintArea{width:100%!important;max-width:none!important}
 @page{size:A4;margin:12mm}
}
@media print{ .hw16-draft-flag{display:inline-block!important;border:2px solid #b26b00!important;color:#b26b00!important;font-weight:700;letter-spacing:.06em;padding:3pt 8pt;border-radius:3pt;margin:0 0 8pt;font-size:9pt} }
@media screen{
 body.hw16 .dashboard-version-panel88{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px 24px;padding:12px 18px!important;margin-bottom:16px!important}
 body.hw16 .dash-version-grid88{display:flex!important;flex-wrap:wrap;gap:8px 28px!important;flex:1 1 auto}
 body.hw16 .dash-version-grid88>div,body.hw16 .dashboard-legacy91{border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important;margin:0!important;font-size:13px;color:var(--hw-ink)}
 body.hw16 .dash-version-grid88 b,body.hw16 .dashboard-legacy91 b{font-size:11px;font-weight:600;color:var(--hw-muted);text-transform:uppercase;letter-spacing:.04em}
 body.hw16 .dash-version-grid88 br,body.hw16 .dashboard-legacy91 br{display:block;content:"";margin:0}
}

/* v16.4 governance: righe partecipanti (nome, funzione, ruolo, note, togli) */
@media screen{
 body.hw16 .participant-grid.hw-gov-person{display:grid;grid-template-columns:1.3fr 1.3fr 1fr 1.4fr auto;gap:8px;align-items:center;margin:0 0 8px}
 body.hw16 .participant-grid.hw-gov-person input{min-width:0}
}
@media screen and (max-width:760px){
 body.hw16 .participant-grid.hw-gov-person{grid-template-columns:1fr 1fr;padding:8px;border:1px solid var(--hw-line,#d8e2ef);border-radius:10px}
 body.hw16 .participant-grid.hw-gov-person button{grid-column:1 / -1}
}
