
/* HG_R218_HOME_ORIGINAL_LOGO_ANIMATION_V2 */
:root{
  --navy:#132033;--navy-2:#182941;--blue:#1677e8;--blue-2:#0e68d8;--blue-soft:#eaf4ff;
  --bg:#f4f7fb;--panel:#fff;--ink:#101a2e;--muted:#68748d;--line:#e4e9f1;
  --green:#12a85a;--red:#ef3340;--orange:#f59e0b;--purple:#9333cc;
  --shadow:0 12px 32px rgba(25,42,72,.08);--radius:16px;--sidebar:278px;--topbar:74px
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg)}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}button,a{transition:.16s ease}button{cursor:pointer}

/* AUTH */
.auth-body{background:#f5f7fb;min-height:100vh}.auth-top{height:74px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 28px}.auth-shell{max-width:520px;margin:0 auto;padding:60px 22px}.brand{display:flex;align-items:center;gap:12px}.brand strong,.brand small{display:block}.brand small{font-size:12px;color:var(--muted)}.brand-light strong{font-size:17px}.portal-logo{position:relative;width:42px;height:42px;display:block;flex:0 0 42px}.portal-logo i{position:absolute;left:7px;width:28px;height:12px;border-radius:4px;transform:skewY(-23deg) rotate(30deg);box-shadow:0 2px 5px rgba(0,0,0,.12)}.portal-logo i:nth-child(1){top:5px;background:#1ba1ff}.portal-logo i:nth-child(2){top:14px;background:#f43f5e}.portal-logo i:nth-child(3){top:23px;background:#f5b400}.auth-wrap{min-height:520px;display:grid;place-items:center}.auth-card{width:100%;background:#fff;border:1px solid var(--line);border-radius:22px;padding:32px;box-shadow:var(--shadow)}.auth-card h1{font-size:32px;margin:6px 0 6px}.auth-card p{color:var(--muted);margin-top:0}

/* APP SHELL */
.portal-body{overflow-x:hidden}.portal-layout{min-height:100vh;display:flex}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);background:linear-gradient(180deg,var(--navy),#102033);color:#eaf0f8;display:flex;flex-direction:column;z-index:30;border-right:1px solid rgba(255,255,255,.05)}.side-brand{height:88px;padding:18px 24px;border-bottom:1px solid rgba(255,255,255,.07);color:#fff}.side-brand strong{font-size:22px;line-height:1.03;letter-spacing:-.02em}.side-nav{padding:14px 12px;display:flex;flex-direction:column;gap:5px;overflow-y:auto}.side-link{min-height:48px;border-radius:8px;padding:0 14px;display:flex;align-items:center;gap:13px;color:#d6deea;font-size:15px;position:relative}.side-link:hover{background:rgba(255,255,255,.07);color:#fff}.side-link.active{background:linear-gradient(90deg,#1677e8,#1789f2);color:#fff;box-shadow:0 6px 16px rgba(0,110,235,.25)}.side-ico{width:24px;text-align:center;font-size:20px;line-height:1}.side-section-label{font-size:11px;letter-spacing:.11em;color:#8ea0b8;padding:24px 16px 8px}.side-badge{margin-left:auto;background:#ff3b48;color:#fff;min-width:25px;height:25px;border-radius:999px;display:grid;place-items:center;font-size:12px;padding:0 7px}.side-count{margin-left:auto;color:#a9b8ca}.side-user{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding:18px 20px 12px;display:flex;align-items:center;gap:12px}.avatar{width:44px;height:44px;border-radius:50%;background:#64728d;color:#fff;display:grid;place-items:center;font-weight:800}.side-user-copy{min-width:0}.side-user-copy strong,.side-user-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-user-copy small{font-size:12px;color:#8fa1b8;margin-top:2px}.side-exit{margin:0 12px 18px}
.main-column{margin-left:var(--sidebar);width:calc(100% - var(--sidebar));min-height:100vh}.main-topbar{height:var(--topbar);position:sticky;top:0;z-index:20;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;gap:20px}.top-search-wrap{width:min(520px,56vw);height:46px;border-radius:10px;background:#f1f4f8;display:flex;align-items:center;padding:0 15px;gap:10px}.search-ico{font-size:27px;line-height:1;color:#34445f;transform:rotate(-20deg)}.top-search-wrap input{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;font-size:16px;width:100%;outline:none;color:#344058}.top-search-wrap input::placeholder{color:#69758b}.top-right{display:flex;align-items:center;gap:24px}.top-bell{position:relative;font-size:20px}.top-badge{position:absolute;top:-8px;right:-11px;min-width:19px;height:19px;padding:0 5px;border-radius:99px;background:#f43f4f;color:#fff;font-size:10px;display:grid;place-items:center}.top-date{text-align:right;min-width:160px}.top-date strong,.top-date small{display:block}.top-date strong{font-size:13px;color:#4c5870}.top-date small{font-size:12px;color:#657089;margin-top:2px}.content-shell{padding:20px 22px 60px;max-width:1500px;margin:0 auto}

/* HOME */
.welcome-panel{min-height:112px;border-radius:14px;background:linear-gradient(105deg,#edf8ff,#dff0ff);display:flex;align-items:center;gap:20px;padding:22px 28px;margin-bottom:12px;border:1px solid #d8ecfb}.sun-mark{font-size:46px;color:#f7b800;line-height:1}.welcome-panel h1{font-size:31px;line-height:1.05;margin:0 0 5px;letter-spacing:-.02em}.welcome-panel p{margin:0;color:#657089;font-size:16px}.hero-admin{margin-left:auto;padding:9px 13px;border-radius:9px;background:rgba(255,255,255,.72);color:#236bb0;font-weight:700;border:1px solid #cce2f8}.hero-admin:hover{background:#fff}.notice-stack{display:grid;gap:8px;margin:10px 0 18px}.notice-banner{min-height:70px;border:1px solid;border-radius:12px;padding:12px 16px;display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:center;background:#eef6ff;border-color:#9ecbff;color:#0657aa}.notice-banner.warning{background:#fff0f1;border-color:#ff9da5;color:#d11f2a}.notice-banner.success{background:#edfbf3;border-color:#98ddb8;color:#137947}.notice-symbol{font-size:26px;text-align:center}.notice-copy{display:grid;gap:2px}.notice-copy strong{font-size:16px}.notice-copy span{color:#4e5b70}.notice-banner.warning .notice-copy span{color:#c3373e}.notice-read{min-width:123px;border:0;border-radius:9px;padding:10px 16px;background:#1578e8;color:#fff;font-weight:800}.notice-banner.warning .notice-read{background:#f4313d}.notice-banner.success .notice-read{background:#12a85a}.apps-section{margin-top:4px}.apps-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0 12px}.apps-title{display:flex;align-items:center;gap:11px}.apps-title h2{font-size:24px;margin:0;letter-spacing:-.02em}.grid-mark{font-size:31px;line-height:1}.filter-pills{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}.filter-pill{height:40px;border:0;border-radius:999px;background:#fff;color:#526078;padding:0 15px;font-weight:650;box-shadow:0 2px 10px rgba(30,45,72,.04)}.filter-pill.active{background:#197ceb;color:#fff}.filter-pill[data-filter="favorites"]{color:#7d5d00}.filter-pill[data-filter="favorites"].active{background:#fff7d9;color:#9f7200}.filter-pill[data-filter="online"]{color:#0f8d4b}.filter-pill[data-filter="online"].active{background:#e7f8ef;color:#087b40}.app-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.app-card{background:#fff;border:1px solid #e5eaf1;border-radius:14px;min-height:250px;padding:20px 20px 18px;box-shadow:0 8px 24px rgba(34,51,80,.06);display:flex;flex-direction:column;position:relative}.app-card:hover{transform:translateY(-2px);box-shadow:0 16px 30px rgba(34,51,80,.1)}.app-card.hidden{display:none}.card-head{display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:14px}.app-icon{width:76px;height:76px;border-radius:17px;display:grid;place-items:center;overflow:hidden;box-shadow:0 10px 22px rgba(26,45,77,.13);background:#e8f1ff}.app-icon img{width:100%;height:100%;object-fit:cover;display:block}.status{justify-self:start;margin-top:4px;display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:#777;padding:3px 0}.status:before{content:"";width:9px;height:9px;border-radius:50%;background:currentColor}.status.pending{color:#7b8496}.status.online{color:#0aaa50}.status.offline{color:#df3341}.status.maintenance{color:#e08a00}.status.disabled{color:#808899}.fav-form{margin:0}.favorite-star{border:0;width:42px;height:42px;border-radius:10px;background:#f7f8fb;color:#73809a;font-size:27px;line-height:1}.favorite-star.is-fav{color:#f4b400;background:#fff8dd}.card-body{margin-top:11px}.card-body h3{margin:0 0 4px;font-size:18px;line-height:1.2}.card-body p{margin:0;color:#68748b;font-size:13px;min-height:39px}.port-chip{display:inline-block;margin-top:9px;border-radius:7px;background:#eef1f6;color:#69748a;padding:5px 9px;font-size:12px}.open-app{margin-top:auto;height:46px;border-radius:9px;background:linear-gradient(90deg,#1378e8,#0f86f3);color:#fff;display:flex;align-items:center;justify-content:center;gap:10px;font-weight:800}.open-app:hover{background:linear-gradient(90deg,#0c6edb,#067aec);box-shadow:0 6px 14px rgba(20,119,232,.25)}.filter-empty{margin-top:12px}

/* COMMON CONTENT / ADMIN */
.hero{background:linear-gradient(135deg,#fff,#eef5ff);border:1px solid #dfe8f5;border-radius:18px;padding:26px;display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:20px}.hero.small{padding:22px}.hero h1{font-size:29px;margin:5px 0 6px}.hero p{margin:0;color:var(--muted)}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:850;color:var(--blue)}.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:18px;box-shadow:0 5px 18px rgba(30,44,84,.03)}.section-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:20px 0 12px}.section-head>div:first-child{display:flex;align-items:baseline;gap:10px}.section-head h2{margin:0;font-size:21px}.section-head span{color:var(--muted);font-size:13px}.stack{display:grid;gap:14px}.stack label,.inline-fields label,.full-label{display:grid;gap:6px;color:#4f5b71;font-size:13px;font-weight:650}input,select,textarea{width:100%;border:1px solid #dce2eb;background:#fff;border-radius:9px;padding:10px 11px;outline:none;color:var(--ink)}input:focus,select:focus,textarea:focus{border-color:#8ebdff;box-shadow:0 0 0 3px #eaf3ff}.primary,.secondary,.ghost,.danger{border:0;border-radius:9px;padding:10px 14px;font-weight:780}.primary{background:var(--blue);color:#fff}.primary:hover{background:var(--blue-2)}.secondary{background:#eaf3ff;color:#1266c4}.ghost{background:#f1f3f7;color:#4a566e}.danger{background:#fff0f1;color:#c92935}.small{padding:7px 10px;font-size:13px}.btnlink{display:inline-block}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.admin-list{display:grid;gap:11px}.admin-item{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}.admin-item-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.admin-item-head strong,.admin-item-head small{display:block}.admin-item-head small{font-size:12px;color:var(--muted);margin-top:2px}.inline-fields{display:grid;grid-template-columns:2fr 1fr auto auto;gap:11px;align-items:end}.app-fields{grid-template-columns:1.2fr .35fr .75fr 1.6fr 1.3fr .45fr}.switch-label{display:flex!important;align-items:center;gap:8px!important;padding:10px 0}.switch-label input,.check input{width:auto}.permissions{margin:12px 0;display:grid;gap:7px}.check-grid{display:flex;gap:7px;flex-wrap:wrap}.check{display:flex;align-items:center;gap:7px;background:#f6f8fa;border:1px solid #e8edf3;padding:7px 9px;border-radius:8px;font-size:12px}.password-row{display:flex;gap:8px;margin-top:10px}.password-row input{max-width:280px}.full-label{margin:12px 0}.badge{display:inline-flex;padding:5px 9px;border-radius:999px;background:#f0f2f6;color:#687186;font-size:11px;font-weight:850}.badge.admin{background:#e9eeff;color:#2d4ab4}.muted{color:var(--muted);font-size:13px}.alert{padding:12px 14px;border-radius:10px;margin-bottom:14px;border:1px solid}.alert.ok{background:#edf9f2;color:#117345;border-color:#cfe9da}.alert.error{background:#fff0f1;color:#bd2f39;border-color:#f1cdd0}.alert.warning{background:#fff7df;color:#996900;border-color:#efd99c}.tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:17px}.tabs a{background:#fff;border:1px solid var(--line);padding:8px 11px;border-radius:9px;color:#4d5870}.tabs a.active{background:var(--blue);border-color:var(--blue);color:#fff}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.stats a{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px}.stats strong,.stats span{display:block}.stats strong{font-size:28px;color:var(--blue)}.stats span{color:var(--muted);font-size:13px}.table-wrap{overflow:auto;background:#fff;border-radius:12px}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:10px 9px;border-bottom:1px solid #edf0f4;white-space:nowrap}th{font-size:12px;color:#67728a}.empty{background:#fff;border:1px dashed #cdd5e5;border-radius:13px;padding:22px;color:var(--muted)}.notice{background:#fff;border:1px solid var(--line);border-left:5px solid #6d7b95;border-radius:12px;padding:12px 14px;margin-bottom:10px;display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center}.notice.warning{border-left-color:#c38a12}.notice.success{border-left-color:#2b9563}.notice-copy small{color:var(--muted);font-size:11px}.notice-list{display:grid;gap:10px;margin-bottom:26px}.read-list .notice-card{opacity:.78}.read-stamp{color:var(--muted);font-size:12px;white-space:nowrap}.target-fields{display:grid;gap:12px}.target-fields [hidden]{display:none!important}.menu-app-icon{width:28px;height:28px;border-radius:8px;overflow:hidden;display:grid;place-items:center}.menu-app-icon img{width:100%;height:100%;object-fit:cover}.search{max-width:300px}.topbar,.shell,.dropdown,.nav-link,.nav-btn,.user-pill{display:none!important}

@media(max-width:1100px){:root{--sidebar:86px}.side-brand{justify-content:center;padding:18px 10px}.side-brand>span:last-child,.side-link>span:not(.side-ico),.side-section-label,.side-count,.side-user-copy{display:none}.side-link{justify-content:center;padding:0}.side-ico{font-size:22px}.side-badge{position:absolute;right:7px;top:5px;min-width:18px;height:18px;font-size:9px}.side-user{justify-content:center;padding:15px 8px}.side-exit{margin:0 10px 16px}.content-shell{padding-left:18px;padding-right:18px}.app-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-grid{grid-template-columns:1fr}.inline-fields,.app-fields{grid-template-columns:1fr 1fr}.stats{grid-template-columns:1fr 1fr}}
@media(max-width:720px){:root{--sidebar:0px}.sidebar{position:static;width:100%;height:auto;min-height:0;display:block}.portal-layout{display:block}.main-column{margin-left:0;width:100%}.side-brand{height:68px;justify-content:flex-start;padding:12px 16px}.side-brand>span:last-child{display:block}.side-brand strong{font-size:17px}.side-nav{display:flex;flex-direction:row;overflow-x:auto;padding:8px;gap:6px}.side-link{min-width:48px;height:44px;padding:0 10px;justify-content:center}.side-link>span:not(.side-ico){display:none}.side-section-label,.side-user,.side-exit{display:none}.main-topbar{position:sticky;height:64px;padding:0 12px}.top-search-wrap{width:100%;height:42px}.top-date{display:none}.top-right{gap:10px}.content-shell{padding:14px 10px 42px}.welcome-panel{padding:18px;gap:12px}.sun-mark{font-size:36px}.welcome-panel h1{font-size:24px}.welcome-panel p{font-size:13px}.hero-admin{display:none}.notice-banner{grid-template-columns:34px 1fr;gap:8px}.notice-banner form{grid-column:2}.notice-read{min-width:100px}.apps-toolbar{display:block}.filter-pills{justify-content:flex-start;margin-top:10px;overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.filter-pill{white-space:nowrap}.app-grid{grid-template-columns:1fr}.admin-grid,.stats{grid-template-columns:1fr}.inline-fields,.app-fields{grid-template-columns:1fr}.hero{display:block}.password-row{display:grid}.section-head{align-items:stretch}.section-head .search{max-width:none}.auth-shell{padding-top:28px}}

/* v2.5 — autorizzazioni Formazione per distretto */
.district-permissions{border-left:3px solid #8bb9e8;padding-left:12px}
.district-item .admin-item-head{align-items:center}
.district-item>label{max-width:180px;margin:10px 0}
@media(max-width:760px){
  .district-permissions{padding-left:9px}
  .district-permissions .check-grid{grid-template-columns:1fr}
}

/* v2.6 — apertura per utente + icona Gestore Mail */
.icon-tone-teal{background:#e4f8f7}.inline-fields select[name="open_mode"]{min-width:190px}


/* v2.7 — amministrazione pulita: Utenti / Accessi / Distretti */
.admin-tabs-v27{position:sticky;top:78px;z-index:12;background:var(--bg);padding:2px 0 10px}
.control-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:22px}
.control-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;display:grid;grid-template-columns:48px 1fr auto;gap:14px;align-items:center;box-shadow:0 5px 18px rgba(30,44,84,.03)}
.control-card:hover{border-color:#b9d6fb;box-shadow:0 10px 24px rgba(30,80,150,.09);transform:translateY(-1px)}
.control-card strong{font-size:17px}.control-card p{margin:3px 0 0;color:var(--muted);font-size:13px}
.control-card>b{font-size:22px;color:var(--blue)}.control-icon{width:46px;height:46px;border-radius:12px;background:var(--blue-soft);display:grid;place-items:center;font-size:22px}
.create-panel>summary,.access-card>summary,.password-reset>summary{cursor:pointer;list-style:none}.create-panel>summary::-webkit-details-marker,.access-card>summary::-webkit-details-marker,.password-reset>summary::-webkit-details-marker{display:none}
.create-panel>summary{display:flex;justify-content:space-between;align-items:center;gap:14px}.create-panel>summary strong{font-size:17px}.create-panel>summary span{color:var(--muted);font-size:13px}.create-panel[open]>summary{padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:16px}
.create-panel-body{padding-top:2px}
.clean-head{align-items:center}.admin-local-search{max-width:300px}
.user-profile-grid{display:grid;grid-template-columns:1.5fr .8fr 1.2fr auto auto;gap:11px;align-items:end}
.clean-actions{display:flex;gap:9px;align-items:center;margin-top:12px;flex-wrap:wrap}
.password-reset{margin-top:10px;border-top:1px solid #edf0f4;padding-top:9px}.password-reset>summary{color:var(--muted);font-size:12px;font-weight:700}.password-reset[open]>summary{margin-bottom:8px}
.access-list{display:grid;gap:10px}.access-card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.access-card>summary{padding:15px 17px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.access-card>summary:hover{background:#fafcff}.access-card[open]>summary{background:#f8fbff;border-bottom:1px solid var(--line)}
.access-card>summary strong,.access-card>summary small{display:block}.access-card>summary small{color:var(--muted);font-size:12px;margin-top:3px}
.access-body{padding:17px}.access-basic-grid{display:grid;grid-template-columns:1fr 1.4fr auto;gap:12px;align-items:end}
.access-section{padding:13px 0;border-top:1px solid #edf0f4;display:grid;gap:8px}.access-section:first-of-type{border-top:0}
.access-section>strong{font-size:13px;color:#35435a}
.access-summary-counts{display:flex;gap:7px;flex-wrap:wrap}.access-summary-counts span{font-size:11px;color:#486079;background:#eef4fa;border-radius:999px;padding:5px 8px}
.effective-box{background:#f7fbff;border:1px solid #dcecff;border-radius:12px;padding:13px;margin:8px 0 14px}
.effective-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:9px}.effective-grid>div>strong,.effective-grid>div>small{display:block;margin-bottom:6px}
.chip-row{display:flex;gap:6px;flex-wrap:wrap}.access-chip{display:inline-flex;border:1px solid #dce5ef;background:#fff;border-radius:999px;padding:5px 8px;font-size:11px;color:#42536b}
.access-full-note{padding:12px;border-radius:10px;background:#edf7ff;color:#245a8e;border:1px solid #d0e9ff}
.access-users-section{margin-top:24px}
.district-clean-grid{display:grid;grid-template-columns:180px auto;gap:14px;align-items:end;margin-bottom:10px}
.admin-item[data-admin-search].is-filtered,.access-card[data-admin-search].is-filtered{display:none}
@media(max-width:1100px){
  .control-grid{grid-template-columns:1fr}
  .user-profile-grid{grid-template-columns:1fr 1fr}
  .effective-grid{grid-template-columns:1fr}
  .access-basic-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:720px){
  .admin-tabs-v27{position:static;overflow-x:auto;flex-wrap:nowrap;padding-bottom:8px}
  .admin-tabs-v27 a{white-space:nowrap}
  .create-panel>summary{align-items:flex-start;flex-direction:column}
  .user-profile-grid,.access-basic-grid,.district-clean-grid{grid-template-columns:1fr}
  .clean-head{display:block}.admin-local-search{max-width:none;margin-top:10px}
  .access-card>summary{align-items:flex-start}
}

/* portal-responsive-20261008-r3: desktop density follows the real viewport.
   The existing <=1100px tablet and <=720px phone layouts stay in control. */
@media screen and (min-width:1101px){
  :root{--sidebar:clamp(224px,18vw,260px);--topbar:64px}
  .sidebar{height:100dvh}
  .side-brand{flex:0 0 76px;height:76px;padding:14px 18px}
  .side-brand strong{font-size:20px}
  .side-nav{flex:1 1 auto;min-height:0;padding:10px;gap:3px;overflow-y:auto;scrollbar-width:thin}
  .side-nav .side-link{flex-shrink:0;min-height:40px;padding:8px 12px;font-size:14px;line-height:1.3;overflow-wrap:anywhere}
  .side-section-label{padding:14px 12px 6px;flex-shrink:0}
  .side-user{flex-shrink:0;margin-top:0;padding:12px 16px 8px}
  .side-exit{flex-shrink:0;min-height:40px;margin:0 10px 10px}
  .main-column,.content-shell,.card,.hero,.admin-item,.app-card{min-width:0}
  .main-topbar{padding:0 22px;gap:16px}
  .top-search-wrap{min-width:0;max-width:520px;flex:1;height:42px}
  .top-right{flex-shrink:0}
  .content-shell{padding:16px 22px 28px}
  .app-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  .app-card{min-height:236px;padding:16px}
  .app-icon{width:60px;height:60px;border-radius:14px}
  .card-head{grid-template-columns:auto minmax(0,1fr) auto;gap:10px}
  .card-body h3,.card-body p,.notice-copy{overflow-wrap:anywhere}
  .open-app{flex-shrink:0;min-height:40px;height:auto;padding:9px 10px}
  .admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inline-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
  .app-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
  .user-profile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .inline-fields>*,.user-profile-grid>*,.access-basic-grid>*,.effective-grid>*,.control-card>*{min-width:0}
  input,select,textarea{min-width:0;max-width:100%}
  .table-wrap{max-width:100%;overflow:auto}
  .admin-tabs-v27{top:var(--topbar);scroll-margin-top:var(--topbar)}
  #apps{scroll-margin-top:calc(var(--topbar) + 12px)}
  dialog{max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto}
}
@media screen and (min-width:1101px) and (max-width:1450px){
  .admin-grid{grid-template-columns:1fr}
  .control-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .effective-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media screen and (min-width:1101px) and (max-height:800px){
  :root{--topbar:56px}
  .side-brand{height:60px;flex-basis:60px;padding:9px 16px}
  .side-brand strong{font-size:18px}
  .side-nav{padding:8px;gap:2px}
  .side-nav .side-link{min-height:32px;padding:6px 12px;font-size:13px}
  .side-section-label{padding:10px 12px 5px;font-size:10px}
  .side-user{padding:8px 14px}
  .avatar{width:36px;height:36px;flex-shrink:0}
  .side-exit{min-height:36px;margin-bottom:8px;font-size:13px}
  .content-shell{padding:12px 18px 20px}
  .welcome-panel{min-height:0;padding:12px 16px;gap:12px}
  .welcome-panel h1{font-size:23px}
  .welcome-panel p{font-size:13px}
  .sun-mark{font-size:32px}
  .apps-toolbar{margin:8px 0 10px;gap:12px;flex-wrap:wrap}
  .apps-title h2{font-size:21px}
  .filter-pill{height:34px;font-size:13px;padding:0 12px}
  .app-grid{gap:12px}
  .app-card{min-height:0;padding:12px 14px;display:grid;grid-template-rows:auto 1fr auto;gap:8px}
  .app-icon{width:44px;height:44px;border-radius:11px}
  .favorite-star{width:32px;height:32px;font-size:23px}
  .card-body{margin-top:0}
  .card-body h3{font-size:16px;line-height:1.2}
  .card-body p{font-size:12px;min-height:0;line-height:1.35}
  .port-chip{margin-top:6px;padding:3px 7px;font-size:11px}
  .open-app{min-height:36px;padding:7px 10px;font-size:14px;margin-top:0}
}

/* portal-elegant-20261008-r4: shared visual hierarchy across all portal pages. */
.top-search-wrap{margin:0}
.filter-pills{max-width:100%}
.home-dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.home-dashboard-grid .card{margin-bottom:0}
.home-dashboard-grid .section-head{margin-top:0}
.home-section-link{color:#235c91;font-size:12px;font-weight:550;white-space:nowrap}
.home-quick-list{display:grid;gap:0}
.home-quick-link{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #edf0f4;min-width:0}
.content-shell .home-dashboard-grid .card{margin-bottom:0}
.content-shell .home-dashboard-grid .section-head{margin-top:0}
.home-dashboard-grid .card>p.muted{margin:8px 0}
.home-quick-link:last-child{border-bottom:0}
.home-quick-link:hover{background:#fafcff}
.home-quick-link>div{flex:1;min-width:0}
.home-quick-link strong,.home-quick-link small{display:block;overflow-wrap:anywhere}
.home-quick-link strong{font-size:14px;font-weight:600}
.home-quick-link small{font-size:12px;color:var(--muted);margin-top:3px}
.home-quick-link .status{flex-shrink:0;font-size:11px}
.home-quick-link>b{color:#738499;font-weight:500}
.home-quick-link .menu-app-icon{width:36px;height:36px;flex:0 0 36px;border-radius:9px}
.home-service-note{display:block;color:var(--muted);font-size:11px;margin-top:14px}
.home-account-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:16px}
.home-account-row p{margin:3px 0 0}
.home-dashboard-grid .notice-stack{margin:12px 0 0}
.home-dashboard-grid .notice-banner{grid-template-columns:24px minmax(0,1fr);gap:10px;padding:12px;font-size:12px;min-height:0}
.home-dashboard-grid .notice-symbol{font-size:18px}
.home-dashboard-grid .notice-banner form{grid-column:2;justify-self:start}
.home-dashboard-grid .notice-read{padding:6px 10px;min-width:0;font-size:12px;font-weight:600}
.home-dashboard-grid .notice-copy strong{font-size:13px}
.content-shell{--panel-radius:12px;--field-radius:7px}
.content-shell :is(.card,.admin-item,.access-card,.control-card){border-radius:var(--panel-radius)}
.content-shell :is(.hero,.welcome-panel){background:#f0f6fc;border-color:#dce7f2}
.content-shell :is(.card,.admin-item,.access-card){box-shadow:0 2px 8px rgba(25,42,72,.025)}
.content-shell :is(.hero,.card,.admin-item,.access-body,.notice-copy,.effective-grid>div){min-width:0}
.content-shell :is(h1,h2,h3,p,small,.access-chip){overflow-wrap:anywhere}
.content-shell :is(h1,h2,h3){font-weight:650;letter-spacing:-.025em;line-height:1.25}
.content-shell :is(input,select,textarea){border-radius:var(--field-radius);min-width:0;max-width:100%;box-sizing:border-box}
.content-shell :is(.primary,.secondary,.ghost,.danger){font-weight:600;border-radius:7px;line-height:1.35}
.content-shell .primary{background:#1976d2}
.content-shell .secondary{background:#eaf2fb;color:#235c91}
.content-shell .ghost{background:#f3f5f8;color:#4f5e72}
.content-shell .badge{font-weight:600;white-space:nowrap;flex-shrink:0}
.content-shell .eyebrow{font-weight:650;color:#5b7390;letter-spacing:.08em}
.content-shell .table-wrap{max-width:100%;overflow:auto;scrollbar-width:thin}
.content-shell table{font-variant-numeric:tabular-nums}
.content-shell th{background:#f7f9fc;font-weight:600}
.content-shell tbody tr:hover{background:#fafcff}
.content-shell :is(th,td){vertical-align:top}
.content-shell td:nth-child(4){white-space:normal;min-width:160px;max-width:440px;overflow-wrap:anywhere}
.content-shell .check{background:#f8fafc;border-color:#e5eaf1;font-weight:500;line-height:1.4;max-width:100%}
.content-shell :is(.check,.switch-label) input{flex:0 0 auto;width:16px;height:16px;accent-color:#1976d2}
.content-shell .check-grid{gap:7px}
.content-shell .check span{min-width:0;overflow-wrap:anywhere}
.content-shell :is(.chip-row,.check-grid,.clean-actions,.password-row){min-width:0}
.content-shell :is(.access-card,.user-disclosure,.app-disclosure){scroll-margin-top:calc(var(--topbar) + 66px)}
.content-shell :is(.user-disclosure,.app-disclosure){padding:0}
.profile-summary{list-style:none;display:flex;align-items:center;gap:14px;padding:14px 16px;cursor:pointer}
.profile-summary::-webkit-details-marker{display:none}
.profile-summary>div:first-child{min-width:0;flex:1}
.profile-summary strong,.profile-summary small{display:block}
.profile-summary small{color:var(--muted);margin-top:3px}
.profile-summary::after,.access-card>summary::after,.create-panel>summary::after{content:'›';font-size:22px;line-height:1;color:#738499;flex-shrink:0;transition:transform .15s ease}
details[open]>.profile-summary::after,.access-card[open]>summary::after,.create-panel[open]>summary::after{transform:rotate(90deg)}
.create-panel>summary>span{margin-left:auto}
.profile-summary:hover{background:#f8fafc}
details[open]>.profile-summary{background:#f8fafc;border-bottom:1px solid var(--line)}
.user-disclosure>form{padding:14px 16px}
.user-disclosure>.password-reset{margin:0 16px 14px;padding-top:10px}
.app-disclosure>form.admin-item{padding:14px 16px;margin:0;border:0;box-shadow:none}
.access-card>summary>div:first-child{min-width:0;flex:1}
.access-card>summary .access-summary-counts{justify-content:flex-end}
.content-shell .access-section{padding:12px 0;gap:8px}
.content-shell .effective-box{background:#f6f9fd;border-color:#dfe8f3}
.content-shell :is(.access-full-note,.notice,.alert,.empty){line-height:1.5}
.content-shell .section-head{flex-wrap:wrap}
.content-shell .section-head>div:first-child{min-width:0;flex-wrap:wrap}
.content-shell .admin-local-search{width:min(280px,100%)}
.content-shell :is(summary,a,button):focus-visible{outline:2px solid #1976d2;outline-offset:3px}
@media screen and (min-width:1101px){
  body{font-size:14px;line-height:1.5}
  .content-shell{max-width:1440px;padding:18px 24px 32px}
  .content-shell .hero,.content-shell .hero.small{padding:18px 20px;margin-bottom:16px;border-radius:12px;align-items:flex-start}
  .content-shell .hero h1{font-size:23px;margin:3px 0 6px}
  .content-shell .hero p{font-size:13px;max-width:78ch;line-height:1.55}
  .content-shell h2,.content-shell .section-head h2{font-size:18px;margin:0 0 12px}
  .content-shell .section-head h2{margin:0}
  .content-shell h3{font-size:16px}
  .content-shell .eyebrow{font-size:10px}
  .content-shell .card{padding:18px;margin-bottom:16px}
  .content-shell .section-head{margin:18px 0 10px;gap:12px}
  .content-shell .admin-list,.content-shell .access-list{gap:10px}
  .content-shell .admin-item:not(.user-disclosure):not(.app-disclosure){padding:16px}
  .content-shell :is(input,select,textarea){font-size:13px;padding:8px 10px;min-height:36px}
  .content-shell textarea{min-height:88px;resize:vertical}
  .content-shell :is(.check,.switch-label) input{min-height:0;padding:0}
  .content-shell :is(label,.stack label,.inline-fields label,.full-label){font-size:12px;font-weight:550;gap:5px}
  .content-shell :is(.primary,.secondary,.ghost,.danger){font-size:13px;padding:8px 12px;min-height:34px}
  .content-shell :is(.admin-item-head strong,.profile-summary strong,.access-card>summary strong,.create-panel>summary strong){font-size:14px;font-weight:600}
  .content-shell :is(.admin-item-head small,.profile-summary small,.access-card>summary small){font-size:12px}
  .content-shell .create-panel>summary{gap:12px}
  .content-shell .create-panel>summary span{font-size:12px;font-weight:400}
  .content-shell .create-panel[open]>summary{padding-bottom:14px;margin-bottom:14px}
  .content-shell .create-panel-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;align-items:start}
  .content-shell .create-panel-body>.access-section,.content-shell .create-panel-body>.target-fields{grid-column:1/-1}
  .content-shell .create-panel-body>button{justify-self:start;grid-column:1/-1}
  .content-shell form[action='/admin/notices/create']>label:has(textarea){grid-column:1/-1}
  .content-shell form[action='/admin/access/group-create']>label:nth-of-type(2){grid-column:1/-1}
  .content-shell .target-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .content-shell .stack{gap:12px}
  .content-shell .user-profile-grid{grid-template-columns:minmax(180px,1.2fr) minmax(130px,.8fr) minmax(180px,1fr);gap:12px 16px}
  .content-shell .user-profile-grid>.switch-label{padding:0;min-height:28px}
  .content-shell .inline-fields.app-fields{grid-template-columns:minmax(0,1.2fr) minmax(70px,.35fr) minmax(0,1fr);gap:12px}
  .content-shell .inline-fields.app-fields>label:has(input[name='url']),.content-shell .inline-fields.app-fields>label:has(input[name='health_url']){grid-column:span 2}
  .content-shell .access-basic-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) auto;gap:14px}
  .content-shell .access-body{padding:16px}
  .content-shell .access-card>summary{padding:13px 16px}
  .content-shell .check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
  .content-shell .check{padding:8px 10px;font-size:12px;min-height:34px;align-items:flex-start}
  .content-shell .check input{margin-top:1px}
  .content-shell .clean-actions{padding-top:12px;border-top:1px solid #edf0f4;margin-top:14px}
  .content-shell .stats{gap:12px;margin-bottom:16px;grid-template-columns:repeat(4,minmax(0,1fr))}
  .content-shell .stats a{padding:14px 16px;border-radius:10px}
  .content-shell .stats strong{font-size:25px;font-weight:650}
  .content-shell .stats span{font-size:12px}
  .content-shell .control-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .content-shell .control-card{padding:16px;grid-template-columns:36px minmax(0,1fr) auto;gap:10px}
  .content-shell .control-card strong{font-size:15px;font-weight:600}
  .content-shell .control-card p{font-size:12px;line-height:1.5}
  .content-shell .control-icon{width:36px;height:36px;font-size:18px;border-radius:9px}
  .content-shell .control-card:hover{transform:none;box-shadow:0 4px 14px rgba(30,80,150,.06)}
  .content-shell .admin-tabs-v27{padding:0 0 12px;margin-bottom:16px;gap:5px}
  .content-shell .tabs a{padding:7px 11px;font-size:12px;font-weight:550;border-radius:7px}
  .content-shell th{font-size:11px}
  .content-shell td{font-size:13px}
  .content-shell :is(th,td){padding:10px 12px}
  .content-shell .notice{padding:14px 16px;gap:16px}
  .content-shell .notice-copy strong{font-size:14px;font-weight:600}
  .content-shell .welcome-panel h1{font-size:25px;font-weight:650}
  .content-shell .welcome-panel p{font-size:13px}
  .content-shell .apps-title h2{font-size:20px}
  .content-shell .app-card{box-shadow:0 3px 12px rgba(34,51,80,.04)}
  .content-shell .app-card:hover{transform:none;box-shadow:0 5px 16px rgba(34,51,80,.07)}
  .content-shell .open-app{font-weight:600}
  .top-search-wrap input{font-size:14px}
  .auth-card{border-radius:14px;padding:26px}
  .auth-card h1{font-size:26px;font-weight:650}
}
@media screen and (min-width:1101px) and (max-height:800px){
  .content-shell{padding:12px 18px 24px}
  .content-shell .welcome-panel h1{font-size:22px}
  .content-shell .hero,.content-shell .hero.small{padding:16px 18px}
}
@media screen and (max-width:1100px){
  .home-dashboard-grid{grid-template-columns:1fr}
  .profile-summary{padding:13px 14px;gap:10px;flex-wrap:wrap}
  .profile-summary>div:first-child{flex-basis:60%}
  .profile-summary strong{font-size:15px}
  .profile-summary small{font-size:12px}
  .content-shell .card h2,.content-shell .section-head h2{font-size:20px}
  .content-shell :is(.user-disclosure,.app-disclosure)>form{min-width:0}
  .content-shell :is(input,select,textarea){min-width:0;max-width:100%}
}
@media screen and (max-width:720px){
  .filter-pills{flex-wrap:wrap;overflow-x:visible;gap:6px}
  .filter-pill{font-size:12px;padding:0 10px}
  .home-hero .btnlink{margin-top:12px}
  .home-account-row{align-items:flex-start;flex-direction:column}
  .home-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .home-quick-link{flex-wrap:wrap;gap:8px}
  .home-quick-link>div{flex-basis:60%}
  .content-shell .hero h1{font-size:24px}
  .content-shell .hero{padding:16px}
  .content-shell .card{padding:16px}
  .content-shell :is(.user-disclosure,.app-disclosure){padding:0}
  .content-shell :is(input,select,textarea):not([type='checkbox']):not([type='hidden']){font-size:16px;min-height:44px}
  .content-shell :is(.primary,.secondary,.ghost,.danger){min-height:42px}
  .content-shell .create-panel>summary>span{margin-left:0}
  .content-shell .create-panel>summary{position:relative;padding-right:24px}
  .content-shell .create-panel>summary::after{position:absolute;right:0;top:0}
  .content-shell .access-summary-counts{width:100%;justify-content:flex-start!important}
  .content-shell .access-card>summary{flex-wrap:wrap;gap:10px}
  .content-shell .access-card>summary::after{margin-left:auto}
}

.portal-footer{margin-top:28px;padding:18px 0 4px;border-top:1px solid #e5e9ef;text-align:center;font-size:13px}
.portal-footer a{color:#47627a;text-decoration:none}
.portal-footer a:hover{text-decoration:underline}
.privacy-document{max-width:920px;margin:0 auto;line-height:1.65}
.privacy-document>section{padding-top:18px;margin-top:18px;border-top:1px solid #e8edf2}
.privacy-document h1{margin-bottom:6px}
.privacy-document h2{font-size:18px;margin:0 0 8px}
.privacy-document p{white-space:pre-line}
.privacy-form textarea{min-height:110px;resize:vertical}
.privacy-form>label{display:grid;gap:7px}
.privacy-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:8px}

/* mobile-ux-20261008-r1 */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:76px}
button,a,input,select,textarea{touch-action:manipulation}
@media(max-width:720px){
  body.portal-body{padding-bottom:calc(68px + env(safe-area-inset-bottom));min-height:100dvh}
  .portal-layout{min-height:100dvh}
  .sidebar{position:fixed!important;inset:auto 0 0 0!important;width:100%!important;height:calc(62px + env(safe-area-inset-bottom))!important;min-height:0!important;padding-bottom:env(safe-area-inset-bottom);display:block!important;z-index:90;background:rgba(16,32,51,.98);backdrop-filter:blur(14px);border:0;border-top:1px solid rgba(255,255,255,.10)}
  .side-brand,.side-section-label,.side-user,.side-exit{display:none!important}
  .side-nav{height:62px;padding:7px 8px;display:flex;flex-direction:row;gap:5px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none}
  .side-nav::-webkit-scrollbar{display:none}
  .side-link{flex:0 0 50px;min-width:50px;height:48px;min-height:48px;padding:0;justify-content:center;scroll-snap-align:center;border-radius:11px}
  .side-link>span:not(.side-ico),.side-link>.side-count{display:none!important}
  .side-ico{font-size:21px;width:24px}
  .side-badge{right:3px;top:2px}
  .main-column{margin-left:0;width:100%;min-height:100dvh}
  .main-topbar{top:0;height:60px;min-height:60px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .top-search-wrap{min-width:0;height:42px}
  .content-shell{padding:12px max(10px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
  .content-shell :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]){font-size:16px;min-height:46px}
  .content-shell :is(button,.primary,.secondary,.ghost,.danger,.btnlink){min-height:44px}
  .content-shell .card{border-radius:13px;padding:15px}
  .content-shell .hero{border-radius:13px;padding:16px}
  .content-shell .table-wrap{margin-inline:-4px;border-radius:10px;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .content-shell table{min-width:680px}
  .content-shell .section-head{flex-direction:column;align-items:stretch;gap:10px}
  .content-shell .section-head>div:first-child{flex-wrap:wrap}
  .content-shell .password-row,.content-shell .privacy-actions{display:grid;grid-template-columns:1fr}
  .content-shell .password-row>* ,.content-shell .privacy-actions>*{width:100%;max-width:none}
  .content-shell .check{min-height:44px;padding:10px 11px}
  .content-shell .admin-tabs-v27,.content-shell .tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;overscroll-behavior-x:contain}
  .content-shell .admin-tabs-v27::-webkit-scrollbar,.content-shell .tabs::-webkit-scrollbar{display:none}
  .content-shell .tabs a{white-space:nowrap;min-height:42px;display:inline-flex;align-items:center}
  .notice{grid-template-columns:1fr;gap:10px}
  .notice form,.notice .read-stamp{justify-self:start}
  .portal-footer{padding-bottom:10px}
}
@media(max-width:390px){
  .top-bell{display:none}
  .content-shell .home-stats{grid-template-columns:1fr}
  .content-shell .stats{grid-template-columns:1fr}
}

/* Aziende per utente */
.company-row{display:grid;grid-template-columns:minmax(220px,1fr) 190px 140px;gap:14px;align-items:center;padding:12px 14px;margin:8px 0;border:1px solid var(--line);border-radius:12px;background:#f8fafc}
.company-enable{display:flex!important;align-items:center;gap:10px!important;margin:0}
.company-enable input,.company-default input{width:auto}
.company-enable span{display:grid;gap:2px}
.company-enable strong{color:var(--ink)}
.company-enable small{color:var(--muted);font-size:11px}
.company-role{display:grid;gap:5px;font-size:12px;color:var(--muted)}
.company-role select{margin:0}
.company-default{display:flex!important;align-items:center;gap:7px!important;margin:0;font-size:12px;font-weight:700;color:var(--muted)}
@media(max-width:760px){.company-row{grid-template-columns:1fr}.company-role{max-width:none}}

/* Aziende utente - versione compatta */
.company-row{grid-template-columns:minmax(180px,1fr) 150px 105px;gap:9px;padding:7px 10px;margin:5px 0;border-radius:9px}
.company-enable{gap:7px!important;font-size:12px}
.company-enable strong{font-size:12px}
.company-enable small{font-size:10px}
.company-role{gap:3px;font-size:10px}
.company-role select{padding:6px 8px;font-size:12px}
.company-default{gap:5px!important;font-size:11px}

/* Assegnazione multipla utenti -> azienda */
.bulk-company-picker{max-width:360px;margin:0 0 14px}
.bulk-company-picker label{display:grid;gap:6px;font-size:12px;font-weight:700;color:var(--muted)}
.bulk-company-list{display:grid;gap:5px}
.bulk-company-row{display:grid;grid-template-columns:minmax(220px,1fr) 155px 115px;gap:10px;align-items:center;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:#f8fafc}
.bulk-user{display:flex!important;align-items:center;gap:9px!important;margin:0}
.bulk-user input,.bulk-default input{width:auto}
.bulk-user span{display:grid;gap:1px}
.bulk-user strong{font-size:12px;color:var(--ink)}
.bulk-user small{font-size:10px;color:var(--muted)}
.bulk-company-row select{padding:6px 8px;font-size:12px}
.bulk-default{display:flex!important;align-items:center;gap:6px!important;margin:0;font-size:11px;font-weight:700;color:var(--muted)}
@media(max-width:760px){.bulk-company-row{grid-template-columns:1fr}}

/* portal-online-20261010-r2 */
.online-stats {
  margin-bottom: 18px;
}

.online-stats > div {
  background: var(--card-bg,#fff);
  border-radius: 18px;
  padding: 20px;
}

.online-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #20a866;
  margin-right: 7px;
  box-shadow: 0 0 0 4px rgba(32,168,102,.12);
}

.online-user-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.online-user-main small {
  opacity: .68;
}

.online-status {
  white-space: nowrap;
  font-weight: 700;
}

.online-super {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 800;
  opacity: .65;
}


/* portal-smartphone-20261010-r1 */
/*
   Ottimizzazione SOLO smartphone.
   PC e tablet > 600px restano invariati.
*/
@media screen and (max-width:600px){

  /* ==============================
     STRUTTURA GENERALE
     ============================== */

  :root{
    --topbar:56px;
  }

  body.portal-body{
    min-width:0;
    overflow-x:hidden;
  }

  .main-column{
    min-width:0;
    width:100%;
  }

  .main-topbar{
    height:56px;
    min-height:56px;
    padding-left:max(8px,env(safe-area-inset-left));
    padding-right:max(8px,env(safe-area-inset-right));
    gap:8px;
  }

  .top-search-wrap{
    min-width:0;
    width:100%;
    height:40px;
    padding:0 11px;
  }

  .top-search-wrap input{
    min-width:0;
    font-size:16px;
  }

  .top-right{
    gap:7px;
    flex:0 0 auto;
  }

  .content-shell{
    width:100%;
    max-width:100%;
    padding:
      10px
      max(8px,env(safe-area-inset-right))
      calc(22px + env(safe-area-inset-bottom))
      max(8px,env(safe-area-inset-left));
  }


  /* ==============================
     NAVIGAZIONE IN BASSO
     ============================== */

  .sidebar{
    height:calc(60px + env(safe-area-inset-bottom))!important;
  }

  .side-nav{
    height:60px;
    padding:6px 7px;
    gap:4px;
    scroll-padding-inline:7px;
  }

  .side-link{
    flex:0 0 48px;
    min-width:48px;
    width:48px;
    height:48px;
    min-height:48px;
    border-radius:11px;
  }

  .side-ico{
    width:23px;
    font-size:20px;
  }


  /* ==============================
     HOME
     ============================== */

  .welcome-panel{
    min-height:0;
    padding:14px;
    gap:10px;
    border-radius:12px;
    align-items:flex-start;
  }

  .sun-mark{
    font-size:30px;
    flex:0 0 auto;
  }

  .welcome-panel h1{
    font-size:21px;
    line-height:1.12;
    margin-bottom:4px;
  }

  .welcome-panel p{
    font-size:12px;
    line-height:1.45;
  }

  .apps-toolbar{
    margin:12px 0 10px;
  }

  .apps-title h2{
    font-size:19px;
  }

  .filter-pills{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    gap:6px;
    padding:2px 0 5px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }

  .filter-pills::-webkit-scrollbar{
    display:none;
  }

  .filter-pill{
    flex:0 0 auto;
    height:38px;
    white-space:nowrap;
    font-size:12px;
    padding:0 11px;
  }


  /* ==============================
     CARD GESTIONALI
     ============================== */

  .app-grid{
    gap:10px;
  }

  .app-card{
    min-height:0;
    padding:14px;
    border-radius:12px;
  }

  .card-head{
    grid-template-columns:auto minmax(0,1fr) auto;
    gap:10px;
  }

  .app-icon{
    width:58px;
    height:58px;
    border-radius:13px;
  }

  .favorite-star{
    width:38px;
    height:38px;
    font-size:23px;
  }

  .card-body{
    margin-top:9px;
  }

  .card-body h3{
    font-size:17px;
  }

  .card-body p{
    min-height:0;
    font-size:12px;
    line-height:1.45;
  }

  .port-chip{
    margin-top:7px;
    font-size:11px;
  }

  .open-app{
    height:44px;
    min-height:44px;
    margin-top:14px;
  }


  /* ==============================
     HERO / CARD / TITOLI
     ============================== */

  .content-shell .hero,
  .content-shell .hero.small{
    display:block;
    padding:14px;
    margin-bottom:12px;
    border-radius:12px;
  }

  .content-shell .hero h1{
    font-size:21px;
    line-height:1.15;
    margin:4px 0 5px;
  }

  .content-shell .hero p{
    font-size:12px;
    line-height:1.5;
  }

  .eyebrow{
    font-size:10px;
  }

  .content-shell .card{
    padding:13px;
    margin-bottom:12px;
    border-radius:12px;
  }

  .content-shell .card h2,
  .content-shell .section-head h2{
    font-size:18px;
  }

  .section-head{
    margin:14px 0 10px;
    gap:8px;
  }

  .section-head>div:first-child{
    align-items:flex-start;
    flex-direction:column;
    gap:3px;
  }


  /* ==============================
     STATISTICHE
     ============================== */

  .content-shell .stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-bottom:12px;
  }

  .content-shell .stats a,
  .online-stats>div{
    padding:12px;
    border-radius:11px;
    min-width:0;
  }

  .content-shell .stats strong{
    font-size:22px;
  }

  .content-shell .stats span{
    font-size:11px;
    line-height:1.3;
  }

  .online-stats{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    margin-bottom:12px;
  }


  /* ==============================
     AMMINISTRAZIONE
     ============================== */

  .admin-grid,
  .control-grid,
  .effective-grid,
  .user-profile-grid,
  .access-basic-grid,
  .district-clean-grid,
  .inline-fields,
  .app-fields{
    grid-template-columns:1fr!important;
    gap:9px;
  }

  .admin-item{
    padding:12px;
    border-radius:11px;
  }

  .admin-item-head{
    align-items:flex-start;
    gap:8px;
  }

  .control-card{
    padding:12px;
    grid-template-columns:36px minmax(0,1fr);
    gap:9px;
  }

  .control-card>*:last-child{
    grid-column:1 / -1;
  }


  /* ==============================
     TAB AMMINISTRAZIONE
     ============================== */

  .content-shell .admin-tabs-v27,
  .content-shell .tabs{
    display:flex;
    overflow-x:auto;
    overflow-y:hidden;
    flex-wrap:nowrap;
    gap:5px;
    padding-bottom:6px;
    margin-bottom:11px;
    scroll-padding-inline:4px;
    -webkit-overflow-scrolling:touch;
  }

  .content-shell .admin-tabs-v27 a,
  .content-shell .tabs a{
    flex:0 0 auto;
    white-space:nowrap;
    min-height:40px;
    padding:8px 10px;
    font-size:12px;
    display:flex;
    align-items:center;
  }


  /* ==============================
     FORM
     ============================== */

  .content-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  .content-shell select,
  .content-shell textarea{
    width:100%;
    max-width:100%;
    min-width:0;
    min-height:46px;
    font-size:16px;
  }

  .content-shell textarea{
    min-height:110px;
  }

  .content-shell :is(
    .primary,
    .secondary,
    .ghost,
    .danger
  ){
    min-height:44px;
  }

  .password-row{
    grid-template-columns:1fr;
  }

  .password-row input{
    max-width:none;
  }

  .check-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px;
  }

  .check{
    min-height:44px;
    width:100%;
  }


  /* ==============================
     AZIENDE / UTENTI
     ============================== */

  .company-row,
  .bulk-company-row{
    grid-template-columns:1fr!important;
    gap:8px;
    padding:10px;
    border-radius:10px;
  }

  .company-enable,
  .bulk-user{
    min-height:40px;
  }

  .company-role,
  .bulk-company-row select{
    width:100%;
    max-width:none;
  }

  .bulk-company-picker{
    max-width:none;
  }


  /* ==============================
     TABELLE
     ============================== */

  .content-shell .table-wrap{
    width:calc(100% + 4px);
    max-width:calc(100% + 4px);
    margin-left:-2px;
    margin-right:-2px;
    overflow-x:auto;
    overflow-y:hidden;
    border-radius:9px;
    -webkit-overflow-scrolling:touch;
  }

  .content-shell table{
    width:max-content;
    min-width:620px;
  }

  .content-shell th,
  .content-shell td{
    padding:9px 8px;
    font-size:12px;
  }


  /* ==============================
     PAGINA ONLINE
     ============================== */

  .online-user-main{
    min-width:120px;
  }

  .online-user-main strong{
    font-size:12px;
  }

  .online-user-main small{
    font-size:10px;
  }

  .online-super{
    display:block;
    margin:3px 0 0;
    font-size:9px;
  }

  .online-status{
    font-size:11px;
  }


  /* ==============================
     AVVISI
     ============================== */

  .notice-banner{
    padding:11px;
    border-radius:10px;
  }

  .notice-symbol{
    font-size:22px;
  }

  .notice-copy strong{
    font-size:14px;
  }

  .notice-copy span{
    font-size:12px;
  }

  .notice-banner form{
    width:100%;
  }

  .notice-read{
    width:100%;
    min-height:42px;
  }


  /* ==============================
     PRIVACY
     ============================== */

  .privacy-document{
    width:100%;
    max-width:100%;
    font-size:13px;
    line-height:1.6;
  }

  .privacy-document h1{
    font-size:22px;
  }

  .privacy-document h2{
    font-size:17px;
  }

  .privacy-actions{
    grid-template-columns:1fr!important;
  }

  .privacy-actions>*{
    width:100%;
  }


  /* ==============================
     FOOTER
     ============================== */

  .portal-footer{
    margin-top:18px;
    padding:14px 6px 8px;
    font-size:11px;
  }
}


/* telefoni molto stretti */
@media screen and (max-width:390px){

  .content-shell{
    padding-left:7px;
    padding-right:7px;
  }

  .content-shell .stats,
  .online-stats{
    grid-template-columns:1fr!important;
  }

  .welcome-panel h1{
    font-size:20px;
  }

  .content-shell .hero h1{
    font-size:20px;
  }

  .app-card{
    padding:12px;
  }
}

/* portal-companies-smartphone-20261010-r1 */
@media screen and (max-width:600px){

  .companies-list-section .section-head{
    flex-direction:row;
    align-items:center;
  }

  .companies-list-section .section-head>div:first-child{
    flex-direction:row;
  }

  .company-admin-card{
    padding:12px;
    overflow:hidden;
  }

  .company-admin-card .admin-item-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
  }

  .company-admin-card .admin-item-head strong{
    font-size:15px;
    line-height:1.3;
  }

  .company-admin-card .admin-item-head small{
    margin-top:4px;
    font-size:10px;
    line-height:1.45;
    white-space:normal;
  }

  .company-admin-card .badge{
    white-space:nowrap;
    font-size:9px;
    padding:5px 7px;
  }

  .company-name-form{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }

  .company-name-form label{
    display:grid;
    gap:5px;
    font-size:12px;
  }

  .company-name-form button{
    width:100%;
  }

  .company-admin-card details{
    width:100%;
  }

  .company-admin-card details>summary{
    min-height:44px;
    display:flex;
    align-items:center;
    cursor:pointer;
  }

  .company-admin-card details .card{
    margin-top:6px!important;
    padding:11px;
  }

  .company-admin-card details label{
    min-height:42px;
    display:flex!important;
    align-items:center;
    gap:8px;
    margin:3px 0!important;
  }

  .company-admin-card details input[type="checkbox"]{
    width:20px;
    height:20px;
    flex:0 0 20px;
  }

  .company-admin-card details button,
  .company-admin-card form[action="/admin/companies/toggle"] button{
    width:100%;
  }

  .company-admin-card form[action="/admin/companies/delete"] label{
    display:grid!important;
    align-items:stretch;
  }

  .company-create-card{
    margin-top:14px!important;
  }

  .company-create-card>h2{
    margin-top:0;
  }

  .company-create-form{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
  }

  .company-create-form>label{
    display:grid;
    gap:5px;
    font-size:12px;
  }

  .company-create-form>h3{
    margin:8px 0 0!important;
    font-size:15px;
  }

  .company-create-form>.muted{
    margin:0;
    line-height:1.5;
  }

  .company-create-form>label:has(input[type="checkbox"]){
    min-height:44px;
    display:flex;
    flex-direction:row;
    align-items:center;
    gap:9px;
    padding:8px 10px;
    background:#f6f8fa;
    border:1px solid #e8edf3;
    border-radius:9px;
  }

  .company-create-form input[type="checkbox"]{
    width:20px;
    height:20px;
    min-height:0!important;
    flex:0 0 20px;
  }

  .company-create-form>button{
    width:100%;
    margin-top:4px;
  }
}

/* portal-data-breach-ui-20261011-r1 */

.db-shell{
  min-width:0;
}

.db-shell .db-tabs{
  margin-bottom:18px;
}

.db-shell>h1{
  margin:4px 0 6px;
  font-size:29px;
  letter-spacing:-.02em;
}

.db-shell>h1+p{
  color:var(--muted);
  margin-top:0;
  margin-bottom:18px;
}

.db-shell form[action^="/admin/data-breach"]{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:22px;
  margin:16px 0 18px;
  box-shadow:0 5px 18px rgba(30,44,84,.03);
  display:grid;
  gap:14px;
}

.db-shell form[action^="/admin/data-breach"]>p{
  margin:0;
}

.db-shell form[action^="/admin/data-breach"] label{
  display:grid;
  gap:6px;
  color:#4f5b71;
  font-size:13px;
  font-weight:650;
}

.db-shell form[action^="/admin/data-breach"] textarea{
  min-height:92px;
  resize:vertical;
}

.db-shell form[action^="/admin/data-breach"] button{
  border:0;
  border-radius:9px;
  padding:10px 14px;
  min-height:42px;
  font-weight:780;
  background:var(--blue);
  color:#fff;
  cursor:pointer;
}

.db-shell form[action^="/admin/data-breach"] button:hover{
  background:var(--blue-2);
}

.db-shell form[action^="/admin/data-breach"] button+a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  margin-left:8px;
  padding:8px 12px;
  border-radius:9px;
  background:#f1f3f7;
  color:#4a566e;
  text-decoration:none;
}

.db-shell .table-wrap{
  border:1px solid var(--line);
  box-shadow:0 5px 18px rgba(30,44,84,.025);
}

.db-shell table td .badge{
  white-space:nowrap;
}

.db-shell a[href="/admin/data-breach/new"].primary{
  margin:4px 0 14px;
}

.db-shell ol{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:20px 26px 20px 46px;
  box-shadow:0 5px 18px rgba(30,44,84,.03);
}

.db-shell ol li{
  padding:6px 0;
  line-height:1.5;
}

.db-shell>div[style*="grid-template-columns"]{
  gap:12px!important;
  margin:18px 0!important;
}

.db-shell>div[style*="grid-template-columns"]>div{
  background:#fff;
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  padding:18px!important;
  box-shadow:0 5px 18px rgba(30,44,84,.03);
}

.db-shell>div[style*="grid-template-columns"]>div b{
  color:var(--blue);
}

@media(max-width:720px){
  .db-shell>h1{
    font-size:24px;
  }

  .db-shell form[action^="/admin/data-breach"]{
    padding:16px;
    border-radius:13px;
  }

  .db-shell .db-tabs{
    overflow-x:auto;
    flex-wrap:nowrap;
    scrollbar-width:none;
  }

  .db-shell .db-tabs::-webkit-scrollbar{
    display:none;
  }

  .db-shell .db-tabs a{
    white-space:nowrap;
    min-height:42px;
    display:inline-flex;
    align-items:center;
  }
}


/* account-open-preferences-compact */
.open-pref-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.open-pref-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:7px 9px;
  border:1px solid var(--border, #e3e7eb);
  border-radius:10px;
  margin:0;
}
.open-pref-name{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  font-weight:600;
}
.open-pref-row select{
  width:auto;
  min-width:125px;
  margin:0;
  padding:6px 8px;
}
@media (max-width:700px){
  .open-pref-grid{grid-template-columns:1fr}
}

.open-software-card{
  grid-column:1/-1;
}
.open-software-card h3{
  margin:10px 0 6px;
}
.open-pref-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.open-pref-row{
  min-height:38px;
}
@media (max-width:1000px){
  .open-pref-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:650px){
  .open-pref-grid{grid-template-columns:1fr}
}

/* tools-compact-secondary */
.tools-section{
  margin-top:28px;
  padding-top:18px;
  border-top:1px solid #e5eaf1;
}
.tools-section .apps-toolbar{
  margin:0 0 10px;
}
.tools-section .apps-title h2{
  font-size:18px;
  font-weight:650;
}
.tools-section .grid-mark{
  font-size:22px;
}

.tools-section .app-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.tools-section .tool-card{
  min-height:138px;
  padding:12px;
  border-radius:11px;
  box-shadow:0 2px 8px rgba(34,51,80,.035);
}

.tools-section .tool-card .app-icon{
  width:42px;
  height:42px;
  border-radius:10px;
  box-shadow:none;
}

.tools-section .tool-card .card-head{
  gap:8px;
}
.tools-section .tool-card .status{
  font-size:11px;
}
.tools-section .tool-card .badge{
  padding:3px 7px;
  font-size:10px;
}

.tools-section .tool-card .card-body{
  margin-top:5px;
}
.tools-section .tool-card .card-body h3{
  font-size:15px;
  margin-bottom:2px;
}
.tools-section .tool-card .card-body p{
  font-size:11px;
  min-height:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tools-section .tool-card .open-app{
  height:32px;
  min-height:32px;
  margin-top:8px;
  padding:5px 9px;
  font-size:12px;
  font-weight:650;
  background:#f1f5f9;
  color:#315b82;
  border:1px solid #dce5ee;
  box-shadow:none;
}
.tools-section .tool-card .open-app:hover{
  background:#e8f1fa;
  box-shadow:none;
}

@media(max-width:1100px){
  .tools-section .app-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:720px){
  .tools-section .app-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* tools-ultra-compact-r2 */
.tools-section .tool-card{
  height:56px!important;
  min-height:56px!important;
  padding:7px 9px!important;
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:9px!important;
  border-radius:9px!important;
}

.tools-section .tool-card .card-head{
  display:block!important;
}

.tools-section .tool-card .app-icon{
  width:36px!important;
  height:36px!important;
  border-radius:8px!important;
}

.tools-section .tool-card .status,
.tools-section .tool-card .badge,
.tools-section .tool-card .card-body p{
  display:none!important;
}

.tools-section .tool-card .card-body{
  margin:0!important;
}

.tools-section .tool-card .card-body h3{
  margin:0!important;
  font-size:13px!important;
  line-height:1.1!important;
}

.tools-section .tool-card .open-app{
  margin:0!important;
  height:30px!important;
  min-height:30px!important;
  padding:4px 10px!important;
  font-size:11px!important;
  border-radius:7px!important;
}

.tools-section .app-grid{
  gap:7px!important;
}

/* tools-horizontal-final */
.tools-section .app-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(260px,320px))!important;
  gap:8px!important;
  justify-content:start!important;
}

.tools-section .tool-card{
  width:100%!important;
  height:52px!important;
  min-height:52px!important;
  padding:6px 8px!important;
  display:grid!important;
  grid-template-columns:36px minmax(0,1fr) 58px!important;
  align-items:center!important;
  gap:8px!important;
}

.tools-section .tool-card .app-icon{
  width:34px!important;
  height:34px!important;
}

.tools-section .tool-card .card-body{
  min-width:0!important;
}

.tools-section .tool-card .card-body h3{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:13px!important;
}

.tools-section .tool-card .open-app{
  width:58px!important;
  min-width:58px!important;
  height:28px!important;
  min-height:28px!important;
  padding:0 6px!important;
  margin:0!important;
  white-space:nowrap!important;
  font-size:11px!important;
}

/* tools-horizontal-r4 */
.tools-section .app-grid{
  grid-template-columns:repeat(auto-fill,minmax(330px,390px))!important;
}

.tools-section .tool-card{
  height:60px!important;
  min-height:60px!important;
  grid-template-columns:42px minmax(150px,1fr) 72px!important;
  gap:10px!important;
  padding:8px 10px!important;
}

.tools-section .tool-card .app-icon{
  width:40px!important;
  height:40px!important;
}

.tools-section .tool-card .card-body h3{
  font-size:14px!important;
}

.tools-section .tool-card .open-app{
  width:72px!important;
  min-width:72px!important;
  height:32px!important;
  min-height:32px!important;
  font-size:12px!important;
}

/* tools-shortcut-final */
.tools-section .app-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(360px,430px))!important;
  gap:10px!important;
  justify-content:start!important;
}

.tool-shortcut{
  height:64px;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:42px minmax(120px,1fr) auto 74px;
  align-items:center;
  gap:10px;
  padding:9px 11px;
  background:#fff;
  border:1px solid #e4e9ef;
  border-radius:10px;
}

.tool-shortcut .app-icon{
  width:40px!important;
  height:40px!important;
  border-radius:9px!important;
  box-shadow:none!important;
}

.tool-shortcut strong{
  min-width:0;
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tool-shortcut .status{
  margin:0;
  font-size:10px;
  white-space:nowrap;
}

.tool-shortcut>a{
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  border-radius:7px;
  background:#edf4fb;
  color:#245c91;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

@media(max-width:720px){
  .tools-section .app-grid{
    grid-template-columns:1fr!important;
  }
  .tool-shortcut{
    grid-template-columns:38px minmax(0,1fr) 66px;
  }
  .tool-shortcut .status{
    display:none;
  }
}

/* tools-shortcut-flex-r6 */
.tools-section .app-grid{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
}

.tool-shortcut{
  width:min(100%,460px)!important;
  height:68px!important;
  min-height:68px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding:10px 12px!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #e4e9ef!important;
  border-radius:11px!important;
}

.tool-shortcut .app-icon,
.tool-shortcut .menu-app-icon{
  flex:0 0 44px!important;
  width:44px!important;
  height:44px!important;
  max-width:44px!important;
  max-height:44px!important;
  border-radius:9px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}

.tool-shortcut .app-icon img,
.tool-shortcut .menu-app-icon img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}

.tool-shortcut>strong{
  flex:1 1 auto!important;
  min-width:100px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:14px!important;
}

.tool-shortcut .status{
  flex:0 0 auto!important;
  margin:0!important;
  white-space:nowrap!important;
}

.tool-shortcut>a{
  flex:0 0 82px!important;
  width:82px!important;
  min-width:82px!important;
  height:34px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 8px!important;
  white-space:nowrap!important;
  overflow:visible!important;
  border-radius:7px!important;
}

@media(max-width:720px){
  .tool-shortcut{
    width:100%!important;
  }
  .tool-shortcut .status{
    display:none!important;
  }
}

/* tools-card-reset-r7 */
#tools .app-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}

#tools .tool-card{
  width:auto!important;
  height:auto!important;
  min-height:170px!important;
  padding:14px!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:visible!important;
  border-radius:12px!important;
}

#tools .tool-card .card-head{
  display:grid!important;
  grid-template-columns:auto 1fr auto!important;
  align-items:start!important;
  gap:10px!important;
}

#tools .tool-card .app-icon{
  width:52px!important;
  height:52px!important;
  max-width:none!important;
  max-height:none!important;
  flex:none!important;
  border-radius:12px!important;
}

#tools .tool-card .status{
  display:inline-flex!important;
  margin-top:3px!important;
  font-size:11px!important;
}

#tools .tool-card .badge{
  display:inline-flex!important;
  font-size:10px!important;
  padding:3px 7px!important;
}

#tools .tool-card .card-body{
  margin-top:8px!important;
  min-width:0!important;
}

#tools .tool-card .card-body h3{
  margin:0 0 3px!important;
  font-size:16px!important;
  white-space:normal!important;
}

#tools .tool-card .card-body p{
  display:block!important;
  margin:0!important;
  min-height:32px!important;
  font-size:12px!important;
  line-height:1.3!important;
  white-space:normal!important;
  overflow:hidden!important;
}

#tools .tool-card .open-app{
  width:100%!important;
  min-width:0!important;
  height:36px!important;
  min-height:36px!important;
  margin-top:auto!important;
  padding:6px 10px!important;
  background:linear-gradient(90deg,#1378e8,#0f86f3)!important;
  color:#fff!important;
  border:0!important;
  border-radius:8px!important;
  font-size:13px!important;
  font-weight:700!important;
}

@media(max-width:1100px){
  #tools .app-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:720px){
  #tools .app-grid{grid-template-columns:1fr!important}
}

/* tools-soft-colors-r8 */
#tools .tool-card:nth-child(6n+1){background:#f2f7ff!important;border-color:#d9e7fb!important}
#tools .tool-card:nth-child(6n+2){background:#f2fbf7!important;border-color:#d7eee3!important}
#tools .tool-card:nth-child(6n+3){background:#fff8ef!important;border-color:#f2e4cf!important}
#tools .tool-card:nth-child(6n+4){background:#f8f4ff!important;border-color:#e7dcf8!important}
#tools .tool-card:nth-child(6n+5){background:#fff4f6!important;border-color:#f2dce1!important}
#tools .tool-card:nth-child(6n+6){background:#f3fafb!important;border-color:#d9ecef!important}

#tools .tool-card:hover{
  filter:brightness(.99);
}


/* ============================================================
   Replica Raspberry RC2 · componenti delle funzioni RC1
   I componenti Portale originali (sidebar, topbar, hero, card,
   menù e responsive) rimangono quelli di static/style.css.
   ============================================================ */
:root { color-scheme: light; }
body.portal-body { min-height:100vh; }
.portal-rc2 .content-shell { max-width:1440px; }
.portal-rc2 .rc2-heading { margin-bottom:16px; }
.portal-rc2 .rc2-heading .heading-actions {display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.portal-rc2 .heading-actions {margin-left:auto;}
.portal-rc2 .rc2-heading h1 {margin:4px 0 7px;}
.portal-rc2 .rc2-heading p {max-width:70ch;}
.portal-rc2 .button,.portal-rc2 .button-outline,.portal-rc2 .button-quiet,
.auth-body .button,.auth-body .button-outline {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:37px;padding:9px 13px;text-align:center;border-radius:8px;font-weight:650;font-size:13px;border:1px solid #1976d2;background:#1976d2;color:#fff;white-space:normal;}
.portal-rc2 .button:hover,.auth-body .button:hover {background:#0e68d8;color:#fff;}
.portal-rc2 .button-outline,.auth-body .button-outline {background:#eaf2fb;color:#235c91;border-color:#d9e7f5;}
.portal-rc2 .button-quiet {background:#f3f5f8;color:#4f5e72;border-color:#eff1f5;}
.portal-rc2 .text-button {background:none;border:none;color:#bfd0e6;text-align:left;cursor:pointer;font-size:14px;}
.portal-rc2 .logout-form {display:block;margin:0 12px 18px;}
.portal-rc2 .mobile-exit {display:none;}
.portal-rc2 .logout-form .side-exit {width:100%;border:0;text-align:left;cursor:pointer;}
.portal-rc2 .company-chip,.portal-rc2 .role-chip {display:inline-flex;align-items:center;gap:6px;font-size:12px;border-radius:8px;padding:6px 10px;background:#eaf2fb;color:#245d91;}
.portal-rc2 .role-chip {background:#f4f6f9;color:#637288;}
.portal-rc2 .grid-2,.portal-rc2 .grid-3 {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;}
.portal-rc2 .grid-3 {grid-template-columns:repeat(3,minmax(0,1fr));}
.portal-rc2 .stat strong {font-size:29px;color:#1976d2;display:block;margin:10px 0 3px;}
.portal-rc2 .stat .caption {font-size:12px;color:#68748d;}
.portal-rc2 .stat small {font-size:12px;color:#68748d;}
.portal-rc2 .banner {background:linear-gradient(105deg,#edf8ff,#dff0ff);border:1px solid #d8ecfb;padding:23px 27px;border-radius:14px;margin-bottom:15px;}
.portal-rc2 .banner h2 {font-size:23px;color:#132033;margin:4px 0 7px;}
.portal-rc2 .banner p {color:#657089;margin:0;max-width:80ch;}
.portal-rc2 .banner .eyebrow {color:#245d91!important;}
.portal-rc2 .field {display:grid;gap:6px;font-size:13px;font-weight:650;color:#4f5b71;min-width:0;}
.portal-rc2 .field span {color:#4f5b71;}
.portal-rc2 .field.wide {grid-column:1/-1;}
.portal-rc2 .form-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.portal-rc2 .form-actions {display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:18px;flex-wrap:wrap;}
.portal-rc2 .section-title {margin:20px 0 10px;font-size:15px;font-weight:650;color:#34445f;}
.portal-rc2 .empty-state {padding:35px 25px;background:white;border:1px dashed #cdd5e5;border-radius:13px;text-align:center;}
.portal-rc2 .empty-state h2 {font-size:18px;margin:7px 0;}
.portal-rc2 .empty-state p {color:#68748d;margin:7px auto 18px;max-width:450px;}
.portal-rc2 .empty-icon {display:inline-flex;justify-content:center;align-items:center;background:#edf5ff;color:#1976d2;border-radius:13px;font-size:28px;width:60px;height:60px;}
.portal-rc2 .tag,.portal-rc2 .chip {display:inline-flex;align-items:center;border-radius:7px;padding:4px 8px;font-size:11px;background:#eaf4ff;color:#236bb0;}
.portal-rc2 .tag.warn {background:#fff2dc;color:#94621a;}
.portal-rc2 .tag.green {background:#e8f9ef;color:#258352;}
.portal-rc2 .pill {display:inline-flex;align-items:center;gap:6px;background:#f8fafc;border:1px solid #e5eaf1;border-radius:9px;padding:9px 10px;}
.portal-rc2 .pill input {width:auto;}
.portal-rc2 .toolbox {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:16px;}
.portal-rc2 .module-card {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;border-bottom:1px solid #edf0f4;padding:15px 0;}
.portal-rc2 .module-card:last-child {border:0;}
.portal-rc2 .module-card[hidden],.portal-rc2 .app-card[hidden] {display:none!important;}
.portal-rc2 .warning {padding:12px;background:#fff7df;color:#996900;border:1px solid #efd99c;border-radius:9px;margin-bottom:16px;}
.portal-rc2 .success {padding:12px;background:#edf9f2;color:#117345;border:1px solid #cfe9da;border-radius:9px;margin-bottom:16px;}
.portal-rc2 .toast {background:#edf9f2;border:1px solid #cfe9da;color:#117345;padding:12px;border-radius:9px;margin-bottom:15px;}
.portal-rc2 .chat-wrap {display:grid;grid-template-columns:285px minmax(0,1fr);border:1px solid var(--line);border-radius:12px;overflow:hidden;min-height:440px;background:#fff;}
.portal-rc2 .chat-aside {background:#f9fbfe;padding:16px;border-right:1px solid var(--line);min-width:0;}
.portal-rc2 .chat-aside h2 {font-size:15px;margin:0 0 14px;}
.portal-rc2 .chat-aside .room {display:flex;gap:9px;align-items:center;padding:10px;border-radius:9px;color:#34445f;min-width:0;}
.portal-rc2 .chat-aside .room.active,.portal-rc2 .chat-aside .room:hover {background:#eaf4ff;color:#235c91;}
.portal-rc2 .room-symbol {flex:0 0 34px;height:34px;border-radius:9px;background:#eaf4ff;display:grid;place-items:center;color:#1976d2;}
.portal-rc2 .chat-main {display:flex;flex-direction:column;min-width:0;}
.portal-rc2 .chat-header {padding:15px;border-bottom:1px solid #edf0f4;}
.portal-rc2 .chat-header strong {display:block;}
.portal-rc2 .chat-header small {display:block;color:#68748d;margin-top:3px;}
.portal-rc2 .chat-search {display:flex;gap:6px;margin-top:10px;}
.portal-rc2 .chat-search input {flex:1;}
.portal-rc2 .chat-timeline {display:flex;flex-direction:column;gap:10px;padding:16px;overflow-y:auto;max-height:470px;min-height:220px;flex:1;}
.portal-rc2 .bubble {max-width:80%;align-self:flex-start;background:#f1f5fa;border-radius:12px;padding:10px 12px;overflow-wrap:anywhere;white-space:pre-wrap;}
.portal-rc2 .bubble.mine {align-self:flex-end;background:#eaf4ff;}
.portal-rc2 .bubble small {display:block;margin-top:6px;font-size:10px;color:#68748d;}
.portal-rc2 .chat-compose {display:flex;gap:9px;padding:14px;border-top:1px solid #edf0f4;align-items:flex-end;}
.portal-rc2 .chat-compose textarea {flex:1;min-height:52px;}
.portal-rc2 .unread {margin-left:auto;background:#1677e8;color:#fff;border-radius:999px;font-size:11px;padding:3px 7px;}
.auth-body .auth-shell .auth-wrap{min-height:0;display:block;}
.auth-body .auth-shell .auth-card{width:100%;max-width:520px;}
.auth-body .auth-shell .field{display:grid;gap:6px;margin:12px 0;font-size:13px;font-weight:650;}
.auth-body .auth-shell .field span{display:block;}
.auth-body .auth-shell .button{width:100%;margin-top:9px;}
.auth-body .auth-shell .warning{font-size:12px;padding:10px 13px;border:1px solid #efd99c;background:#fff7df;color:#996900;border-radius:9px;}
@media(max-width:1100px){ .portal-rc2 .grid-3{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media(max-width:720px){
 .portal-rc2 .grid-2,.portal-rc2 .grid-3,.portal-rc2 .form-grid{grid-template-columns:1fr;}
 .portal-rc2 .rc2-heading{display:block;}
 .portal-rc2 .heading-actions{margin-top:14px;}
 .portal-rc2 .chat-wrap{display:flex;flex-direction:column;}
 .portal-rc2 .chat-aside{border:0;border-bottom:1px solid var(--line);}
 .portal-rc2 .chat-aside .rooms{display:flex;overflow-x:auto;gap:6px;}
 .portal-rc2 .chat-aside .room{flex-shrink:0;}
 .portal-rc2 .chat-compose{flex-wrap:wrap;}
 .portal-rc2 .chat-compose textarea{flex-basis:100%;}
 .portal-rc2 .button,.portal-rc2 .button-outline{min-height:44px;}
 .portal-rc2 .logout-form{display:none;}
 .portal-rc2 .mobile-exit{display:block;margin:0;}
 .portal-rc2 .mobile-exit button{background:#eaf2fb;border:0;border-radius:9px;color:#245d91;min-height:40px;padding:4px 9px;}
}


/* RC2 Aggiornamento 01: gestione distretti nell’amministrazione */
.district-admin-row{display:grid;grid-template-columns:minmax(180px,2fr) minmax(120px,1fr) auto;gap:14px;align-items:end;padding:14px 0;border-bottom:1px solid var(--line)}
.district-admin-row:last-child{border-bottom:0}
.district-admin-row>div:last-child{display:grid;gap:6px;justify-items:start}
.district-admin-row .field{margin:0;min-width:0}
.district-admin-row button{white-space:nowrap}
@media(max-width:720px){.district-admin-row{grid-template-columns:1fr;gap:9px}.district-admin-row>div:last-child{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}}

/* RC2.2 - hub unico privacy e conformita (responsive, riuso stile originale). */
.privacy-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0 22px}
.privacy-tab{border-radius:9px;padding:9px 12px;background:#fff;border:1px solid var(--line);font-size:13px;color:var(--ink)}
.privacy-tab.active{background:#1677e8;color:#fff;border-color:#1677e8}
.privacy-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.privacy-card-grid .card{margin:0;display:flex;flex-direction:column;gap:8px}
.privacy-card-grid .card p{margin:0;color:var(--muted);flex:1}
.privacy-card-grid .card .button-outline{align-self:flex-start}
.privacy-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.privacy-form .field{min-width:0}
.privacy-form .field:has(textarea),.privacy-form .form-actions{grid-column:1/-1}
@media(max-width:720px){.privacy-card-grid,.privacy-form{grid-template-columns:1fr}.privacy-tabs{overflow-x:auto;flex-wrap:nowrap}.privacy-tab{white-space:nowrap}}


/* RC2.3 - Avvisi e Chat nella topbar originale */
.top-alert-link{position:relative;display:inline-flex;align-items:center;justify-content:center;
  width:39px;height:39px;border-radius:10px;color:#263e5d;font-size:19px;
  border:1px solid transparent;text-decoration:none;flex:0 0 auto}
.top-alert-link:hover,.top-alert-link:focus-visible{background:#eaf4ff;border-color:#d3e5f8}
.top-alert-link .top-badge{position:absolute;right:-5px;top:-5px;background:#ef3340;
  color:white;border-radius:999px;min-width:18px;height:18px;padding:1px 4px;font-size:10px;
  line-height:16px;text-align:center;font-weight:700;box-sizing:border-box}
.top-alert-link .top-badge[hidden]{display:none!important}
@media(max-width:720px){.top-alert-link{width:32px;height:38px;font-size:18px}.top-right{gap:6px}.role-chip{display:none}}

/* NEXT RC2 CANDIDATE — HR Central: dashboard con design coerente con il Portale originale */
.portal-rc2 .hr-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:17px 0 22px}
.portal-rc2 .hr-metric{background:white;border:1px solid var(--line);border-radius:13px;padding:18px 19px;box-shadow:0 3px 16px rgba(23,42,75,.035);position:relative;overflow:hidden;min-width:0}
.portal-rc2 .hr-metric:before{content:"";width:4px;position:absolute;inset:0 auto 0 0;background:#1976d2}
.portal-rc2 .hr-metric-active:before{background:#11a466}
.portal-rc2 .hr-metric-calendar:before{background:#f59e0b}
.portal-rc2 .hr-metric-tasks:before{background:#8472d3}
.portal-rc2 .hr-metric span,.portal-rc2 .hr-metric small{display:block;color:#68748d;font-size:12px}
.portal-rc2 .hr-metric span{font-size:13px;font-weight:620;color:#415370}
.portal-rc2 .hr-metric strong{display:block;color:#132033;font-size:31px;font-weight:690;line-height:1.2;letter-spacing:-.035em;margin:8px 0 3px}
.portal-rc2 .hr-directory{padding:0!important;overflow:hidden}
.portal-rc2 .hr-directory-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:21px 23px 4px}
.portal-rc2 .hr-directory-head h2{font-size:21px;margin:5px 0!important}
.portal-rc2 .hr-directory-head p{margin:0}
.portal-rc2 .hr-filter-bar{display:grid;grid-template-columns:minmax(180px,2fr) minmax(130px,1fr) minmax(110px,.75fr) auto auto;align-items:end;gap:10px;padding:18px 23px}
.portal-rc2 .hr-filter-bar label{display:grid;gap:6px;font-size:12px;font-weight:600;color:#53637c;min-width:0}
.portal-rc2 .hr-filter-bar input,.portal-rc2 .hr-filter-bar select{width:100%;min-width:0}
.portal-rc2 .hr-filter-bar>button,.portal-rc2 .hr-filter-bar>a{min-height:36px;display:inline-flex;align-items:center;justify-content:center}
.portal-rc2 .hr-count{padding:0 23px;color:#718097;font-size:12px;margin:0 0 8px}
.portal-rc2 .hr-table th{font-size:11px;background:#f5f8fc;color:#6b7890;padding:12px 18px;white-space:nowrap}
.portal-rc2 .hr-table td{font-size:13px;padding:12px 18px;vertical-align:middle;white-space:nowrap}
.portal-rc2 .hr-person{display:flex;align-items:center;gap:11px;min-width:180px}
.portal-rc2 .hr-person strong,.portal-rc2 .hr-person small{display:block}
.portal-rc2 .hr-person strong{font-size:13px;color:#243653}
.portal-rc2 .hr-person small{font-size:11px;color:#8b97a8;margin-top:3px}
.portal-rc2 .hr-person-avatar{display:grid;place-items:center;flex:0 0 39px;height:39px;border-radius:11px;background:#e5efff;color:#2564ae;font-size:13px;font-weight:700}
.portal-rc2 .hr-status{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#eef2f7;color:#52627b;font-size:11px;font-weight:660;white-space:nowrap}
.portal-rc2 .hr-status-active{background:#e7f9ef;color:#078349}
.portal-rc2 .hr-status-active:before{content:"";width:6px;height:6px;background:#10a05c;border-radius:50%;margin-right:6px}
.portal-rc2 .hr-status-ended{background:#f4f0f0;color:#84505a}
.portal-rc2 .hr-open{color:#1164b6;font-size:12px;font-weight:670;white-space:nowrap}
.portal-rc2 .hr-open:hover{text-decoration:underline}
.portal-rc2 .hr-security-note{font-size:12px;color:#77829a;margin-top:12px}
.portal-rc2 .hr-profile{display:flex;align-items:center;gap:17px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:22px;margin-bottom:19px;box-shadow:0 3px 16px rgba(23,42,75,.035)}
.portal-rc2 .hr-profile-avatar{display:grid;place-items:center;width:72px;height:72px;border-radius:17px;background:linear-gradient(135deg,#e4f0ff,#d5e8fa);font-size:22px;color:#1a65a5;font-weight:740;flex-shrink:0}
.portal-rc2 .hr-profile>div{min-width:0;flex:1}
.portal-rc2 .hr-profile h2{font-size:23px;margin:4px 0!important}
.portal-rc2 .hr-profile p{font-size:13px;color:#68748d;margin:0}

/* NEXT RC2 CANDIDATE — Chat split layout (ispirazione WhatsApp Web, identità Hub) */
.portal-rc2 .chat-shell{display:grid;grid-template-columns:minmax(260px,330px) minmax(0,1fr);height:min(650px,calc(100dvh - 215px));min-height:460px;border-radius:14px;overflow:hidden;border:1px solid #e4eaf2;background:white;box-shadow:0 5px 22px rgba(17,35,63,.055)}
.portal-rc2 .chat-rooms{min-width:0;border-right:1px solid #e5ebf3;display:flex;flex-direction:column;background:#fff}
.portal-rc2 .chat-rooms-head{display:flex;align-items:center;justify-content:space-between;padding:20px 17px 12px;gap:10px}
.portal-rc2 .chat-rooms-head strong,.portal-rc2 .chat-rooms-head small{display:block}
.portal-rc2 .chat-rooms-head strong{font-size:18px;font-weight:680}
.portal-rc2 .chat-rooms-head small{color:#8491a3;font-size:11px;margin-top:2px}
.portal-rc2 .chat-add{background:#eaf4ff;color:#126bc8;display:grid;place-items:center;width:35px;height:35px;border-radius:10px;font-size:25px;line-height:1}
.portal-rc2 .chat-rooms-filter{display:flex;gap:7px;padding:0 13px 13px}
.portal-rc2 .chat-rooms-filter input{background:#f4f7fb;border:0;flex:1;min-width:0}
.portal-rc2 .chat-rooms-filter button{font-size:11px}
.portal-rc2 .chat-room-list{flex:1;overflow-y:auto;padding:3px 8px 12px}
.portal-rc2 .chat-room-card{display:flex;align-items:center;gap:10px;padding:13px 10px;border-radius:10px;min-height:68px;transition:background .15s}
.portal-rc2 .chat-room-card:hover{background:#f4f8fe}
.portal-rc2 .chat-room-card.active{background:#eaf4ff}
.portal-rc2 .chat-room-avatar{display:grid;place-items:center;flex:0 0 43px;height:43px;border-radius:50%;background:#e4eafe;color:#2c63a8;font-size:18px;font-weight:700}
.portal-rc2 .chat-avatar-gruppo{background:#e4f6ef;color:#2b946f}
.portal-rc2 .chat-avatar-canale{background:#f3eafe;color:#8d65bc}
.portal-rc2 .chat-room-detail{display:block;flex:1;min-width:0}
.portal-rc2 .chat-room-detail strong,.portal-rc2 .chat-room-detail small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal-rc2 .chat-room-detail strong{color:#273b57;font-size:13px;font-weight:650}
.portal-rc2 .chat-room-detail small{font-size:11px;color:#8995a7;margin-top:6px}
.portal-rc2 .chat-room-meta{display:flex;flex-direction:column;gap:7px;align-items:flex-end;min-width:0}
.portal-rc2 .chat-room-meta time{font-size:10px;color:#99a3b2;white-space:nowrap}
.portal-rc2 .chat-room-meta .unread{margin:0}
.portal-rc2 .chat-empty-list{color:#8592a5;font-size:12px;text-align:center;margin:20px}
.portal-rc2 .chat-conversation{display:flex;flex-direction:column;min-width:0;min-height:0;background:#fbfcff}
.portal-rc2 .chat-conversation-head{display:flex;align-items:center;gap:11px;background:#fff;padding:12px 20px;border-bottom:1px solid #e9edf3}
.portal-rc2 .chat-conversation-title{flex:1;min-width:0}
.portal-rc2 .chat-conversation-title strong,.portal-rc2 .chat-conversation-title small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal-rc2 .chat-conversation-title strong{font-size:14px;font-weight:700;color:#233952}
.portal-rc2 .chat-conversation-title small{color:#93a0b1;font-size:11px;margin-top:3px}
.portal-rc2 .chat-back{color:#1b70ba;font-size:12px}
.portal-rc2 .chat-message-search{display:flex;gap:8px;padding:9px 20px;border-bottom:1px solid #eaf0f5}
.portal-rc2 .chat-message-search input{flex:1;min-width:0;border:1px solid #e6ecf4;background:white;min-height:32px}
.portal-rc2 .chat-message-search button{font-size:11px}
.portal-rc2 .chat-messages{min-height:0;flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:19px 24px;background:linear-gradient(180deg,#fbfcff,#f3f7fc)}
.portal-rc2 .chat-day{display:flex;justify-content:center;margin:5px 0}
.portal-rc2 .chat-day span{background:#e9eff7;color:#748398;border-radius:999px;font-size:10px;padding:5px 12px}
.portal-rc2 .chat-bubble{position:relative;align-self:flex-start;background:#fff;border:1px solid #e5eaf2;border-radius:13px 13px 13px 3px;padding:10px 13px;max-width:min(77%,570px);box-shadow:0 2px 8px rgba(20,42,78,.035);overflow-wrap:anywhere}
.portal-rc2 .chat-bubble.mine{align-self:flex-end;background:#e3f1ff;border-color:#cee3ff;border-radius:13px 13px 3px 13px}
.portal-rc2 .chat-bubble strong{display:block;font-size:11px;color:#3c6d9d;margin-bottom:5px}
.portal-rc2 .chat-bubble p{font-size:13px;white-space:pre-wrap;line-height:1.5;color:#33455a;margin:0}
.portal-rc2 .chat-bubble time{display:block;color:#8592a6;font-size:10px;text-align:right;margin-top:6px}
.portal-rc2 .chat-messages-empty{margin:auto;text-align:center;color:#8995a4;font-size:13px}
.portal-rc2 .chat-composer{display:flex;align-items:flex-end;gap:10px;padding:14px 17px;border-top:1px solid #eaf0f5;background:#fff}
.portal-rc2 .chat-composer textarea{flex:1;min-width:0;min-height:42px;max-height:120px;resize:vertical;border:1px solid #e2e8f0;background:#f8fafd;border-radius:10px}
.portal-rc2 .chat-composer button{min-height:42px}
.portal-rc2 .chat-no-room{display:grid;place-items:center}
.portal-rc2 .chat-privacy-note{font-size:12px;color:#8592a4;margin-top:11px}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:1250px){.portal-rc2 .hr-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-rc2 .hr-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){
 .portal-rc2 .hr-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.portal-rc2 .hr-metric{padding:13px}.portal-rc2 .hr-metric strong{font-size:25px}
 .portal-rc2 .hr-directory-head{padding:17px 13px 2px}.portal-rc2 .hr-filter-bar{grid-template-columns:1fr;gap:10px;padding:14px}
 .portal-rc2 .hr-filter-bar>*{width:100%}.portal-rc2 .hr-profile{padding:14px;gap:11px;flex-wrap:wrap}.portal-rc2 .hr-profile-avatar{width:50px;height:50px;font-size:17px}
 .portal-rc2 .chat-shell{display:flex;flex-direction:column;min-height:0;height:auto;overflow:visible}
 .portal-rc2 .chat-rooms{max-height:280px;min-height:0;border:0;border-bottom:1px solid #e5ebf3}
 .portal-rc2 .chat-room-list{max-height:190px;overflow-y:auto}.portal-rc2 .chat-conversation{min-height:390px}
 .portal-rc2 .chat-messages{max-height:420px;min-height:230px;padding:13px}.portal-rc2 .chat-bubble{max-width:92%}
 .portal-rc2 .chat-conversation-head,.portal-rc2 .chat-composer{padding:10px 12px}.portal-rc2 .chat-message-search{padding:7px 11px}
}


/* RC2 — Iconografia sobria ed accenti leggeri, senza simboli emoji nella sidebar. */
.portal-rc2 .side-ico{display:inline-flex;align-items:center;justify-content:center;width:23px;height:23px;flex:0 0 23px;color:#b9c8d9}
.portal-rc2 .ui-outline{display:inline-block;width:20px;height:20px;vertical-align:middle;flex-shrink:0}
.portal-rc2 .side-link.active{background:#1b3b60;box-shadow:none;border-left:2px solid #6ab4ff;padding-left:12px}
.portal-rc2 .side-link.active .side-ico{color:#8ec9ff}
.portal-rc2 .side-link:hover .side-ico{color:#eef5fc}
.portal-rc2 .side-link.side-exit{border-left:0}
.portal-rc2 .top-alert-link svg{width:20px;height:20px;stroke-width:1.8}
.portal-rc2 .top-alert-link[href="/chat"]{color:#2477bc}
.portal-rc2 .top-alert-link[href="/notices"]{color:#b68018}
.portal-rc2 .hr-metric-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.portal-rc2 .hr-metric .hr-metric-ico{display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;border-radius:10px;background:#eaf2ff;color:#3279c6}
.portal-rc2 .hr-metric-active .hr-metric-ico{background:#e4f6ec;color:#128254}
.portal-rc2 .hr-metric-calendar .hr-metric-ico{background:#fff3dd;color:#bf7712}
.portal-rc2 .hr-metric-tasks .hr-metric-ico{background:#f0edfa;color:#6f5ca5}
.portal-rc2 .hr-metric .hr-metric-ico svg{width:19px;height:19px;stroke-width:1.8}
.portal-rc2 .hr-metric .hr-metric-top>span:first-child{flex:1}
.portal-rc2 .chat-summary{display:flex;gap:10px;flex-wrap:wrap;margin:4px 0 15px}
.portal-rc2 .chat-summary-item{display:flex;align-items:center;gap:9px;min-width:146px;background:#fff;border:1px solid #e3eaf2;border-radius:10px;padding:10px 13px}
.portal-rc2 .chat-summary-ico{display:flex;align-items:center;justify-content:center;width:35px;height:35px;flex:0 0 35px;border-radius:9px;background:#eaf2ff;color:#2f78bd}
.portal-rc2 .chat-summary-groups .chat-summary-ico{background:#e7f4ec;color:#248258}
.portal-rc2 .chat-summary-unread .chat-summary-ico{background:#fff2de;color:#b8791b}
.portal-rc2 .chat-summary-copy{display:flex;flex-direction:column;line-height:1.25}
.portal-rc2 .chat-summary-copy strong{font-size:19px;color:#253b56;font-weight:700}
.portal-rc2 .chat-summary-copy small{font-size:11px;color:#68748d}
@media(max-width:1100px){.portal-rc2 .side-link.active{padding-left:0;border-left:0;border-bottom:2px solid #6ab4ff}.portal-rc2 .side-ico{flex:0 0 23px}}
@media(max-width:720px){.portal-rc2 .chat-summary{gap:6px}.portal-rc2 .chat-summary-item{flex:1 1 95px;min-width:0;padding:8px;gap:6px}.portal-rc2 .chat-summary-ico{width:30px;height:30px;flex-basis:30px}.portal-rc2 .chat-summary-copy strong{font-size:16px}}


/* RC2: icone principali HR/Chat coerenti con i contorni della navigazione. */
.portal-rc2 .sidebar{background:#132033}
.portal-rc2 .side-link{font-size:14px;min-height:46px}
.portal-rc2 .side-link.active{background:#1b3b60;box-shadow:none}
.portal-rc2 .search-ico{display:inline-flex;transform:none;font-size:18px;color:#687e96}
.portal-rc2 .search-ico svg{width:19px;height:19px}
.portal-rc2 .app-icon{width:62px;height:62px;border-radius:13px;box-shadow:none}
.portal-rc2 .app-icon .ui-outline{width:33px;height:33px;stroke-width:1.7}
.portal-rc2 .app-icon-people{background:#e8f1ff;color:#256bbc;border:1px solid #d8e7ff}
.portal-rc2 .app-icon-chat{background:#e4f7f1;color:#16846f;border:1px solid #cfebe2}
.portal-rc2 .home-dashboard-grid .stats a.home-stat-hr,
.portal-rc2 .home-dashboard-grid .stats a.home-stat-chat{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.portal-rc2 .home-stat-mark{display:inline-flex!important;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;margin-bottom:3px}
.portal-rc2 .home-stat-hr .home-stat-mark{background:#e8f1ff;color:#256bbc}
.portal-rc2 .home-stat-chat .home-stat-mark{background:#e4f7f1;color:#16846f}
.portal-rc2 .stats .home-stat-hr strong{color:#256bbc}
.portal-rc2 .stats .home-stat-chat strong{color:#16846f}
.portal-rc2 .chat-room-avatar .ui-outline{width:20px;height:20px}
.portal-rc2 .chat-room-avatar.chat-avatar-diretta{background:#e7f1ff;color:#266eb8}
.portal-rc2 .chat-room-avatar.chat-avatar-gruppo{background:#e5f7ed;color:#23835a}
.portal-rc2 .chat-room-avatar.chat-avatar-canale{background:#f1edfc;color:#7960ac}

/* Pulsante logout coerente con la sidebar scura. */
.portal-rc2 .logout-form .side-exit{background:transparent;color:#c8d7e8;padding:0 14px;border-radius:8px}
.portal-rc2 .logout-form .side-exit:hover{background:rgba(255,255,255,.07);color:#fff}


/* Chat V1.1 UX: rubrica immediata, un solo compositore, notifiche integrate. */
.portal-rc2 .top-communications{display:flex;align-items:center;gap:3px;border-left:1px solid #e4eaf1;padding-left:13px}
.portal-rc2 .top-communications .top-alert-link{width:38px;height:38px;border:0;border-radius:9px;color:#52677d;background:transparent;transition:background .15s}
.portal-rc2 .top-communications .top-alert-link:hover,.portal-rc2 .top-communications .top-alert-link.current{background:#ecf4fc;color:#236db2}
.portal-rc2 .top-communications .top-alert-link .top-badge{background:#1677e8;color:#fff}
.portal-rc2 .top-communications .top-alert-link[href="/notices"]{color:#52677d}
.portal-rc2 .chat-shell{height:min(760px,calc(100dvh - 165px));min-height:510px}
.portal-rc2 .chat-contact-panel{margin:0 9px 3px;border:1px solid #e4ebf4;border-radius:10px;background:#f9fbfe;flex:0 0 auto;min-height:0}
.portal-rc2 .chat-contact-panel summary{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:11px 12px;cursor:pointer;color:#344c67;font-size:13px;font-weight:650;list-style:none}
.portal-rc2 .chat-contact-panel summary::-webkit-details-marker{display:none}
.portal-rc2 .chat-contact-panel summary::before{content:'›';font-size:19px;color:#7990a7;transition:transform .15s}
.portal-rc2 .chat-contact-panel[open] summary::before{transform:rotate(90deg)}
.portal-rc2 .chat-contact-total{margin-left:auto;background:#e9f2fd;padding:2px 7px;border-radius:999px;color:#2474c4;font-size:11px}
.portal-rc2 .chat-contact-list{overflow-y:auto;max-height:170px;border-top:1px solid #ebf0f6;background:#fff;border-radius:0 0 10px 10px}
.portal-rc2 .chat-contact-form{margin:0}
.portal-rc2 .chat-contact-item{display:flex;align-items:center;text-align:left;gap:10px;width:100%;border:0;border-bottom:1px solid #f1f4f8;background:#fff;padding:8px 12px;cursor:pointer;font-size:13px;color:#233952}
.portal-rc2 .chat-contact-item:hover,.portal-rc2 .chat-contact-item:focus-visible{background:#edf5ff}
.portal-rc2 .chat-contact-avatar{display:grid;place-items:center;flex:0 0 31px;height:31px;border-radius:50%;background:#e7f1ff;color:#276da9;font-size:11px;font-weight:700}
.portal-rc2 .chat-contact-arrow{margin-left:auto;color:#a0aec1}
.portal-rc2 .chat-contacts-empty{font-size:12px;color:#8494a7;padding:10px}
.portal-rc2 .chat-section-caption{font-size:11px;color:#8291a5;font-weight:650;letter-spacing:.02em;padding:10px 16px 4px}
.portal-rc2 .chat-conversation-head{min-height:64px}
.portal-rc2 .chat-compose-box{padding:9px 14px 11px;background:#fff;border-top:1px solid #e5edf5}
.portal-rc2 .chat-compose-toolbar{display:flex;align-items:center;gap:7px;min-width:0}
.portal-rc2 .chat-attachment-form{display:flex;align-items:center;flex:0 0 auto;gap:5px;margin:0}
.portal-rc2 .chat-attachment-form input[type=file]{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.portal-rc2 .chat-compose-icon,.portal-rc2 .chat-send-button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:42px;flex:0 0 40px;border:0;background:transparent;border-radius:10px;color:#55708c;cursor:pointer;padding:0;box-sizing:border-box}
.portal-rc2 .chat-compose-icon:hover,.portal-rc2 .chat-compose-icon:focus-visible{background:#edf5fd;color:#176cba}
.portal-rc2 .chat-send-button{background:#1677e8;color:#fff;border-radius:10px}
.portal-rc2 .chat-send-button:hover{background:#1260be}
.portal-rc2 .chat-compose-icon.is-recording{background:#ffe9e8;color:#b82828;box-shadow:0 0 0 2px rgba(206,55,55,.12)}
.portal-rc2 .chat-composer{display:flex;gap:7px;align-items:center;flex:1;min-width:0;padding:0;border:0;background:transparent;margin:0}
.portal-rc2 .chat-composer textarea{width:100%;height:42px;min-height:42px;padding:10px 12px;margin:0;line-height:1.4;resize:none;border-radius:11px}
.portal-rc2 .chat-file-submit{font-size:11px;border:1px solid #c6d9ef;border-radius:8px;padding:7px;color:#2365a5;background:#eaf3fe;cursor:pointer}
.portal-rc2 .chat-file-submit[hidden]{display:none}
.portal-rc2 .chat-compose-status,.portal-rc2 .chat-reply-indicator{display:block;color:#6b829a;font-size:11px;line-height:1.4}
.portal-rc2 .chat-compose-status:empty,.portal-rc2 .chat-reply-indicator:empty{display:none}
.portal-rc2 .chat-compose-status:not(:empty),.portal-rc2 .chat-reply-indicator:not(:empty){padding:5px 3px 0}
.portal-rc2 .chat-messages-empty{font-size:13px}
@media(max-width:720px){
 .portal-rc2 .top-communications{padding-left:3px;gap:0;border:0}
 .portal-rc2 .top-communications .top-alert-link{width:33px;height:35px}
 .portal-rc2 .chat-shell{min-height:0;height:auto;overflow:hidden}
 .portal-rc2 .chat-rooms{max-height:none;min-height:0}
 .portal-rc2 .chat-contact-list{max-height:154px}
 .portal-rc2 .chat-room-list{max-height:210px}
 .portal-rc2 .chat-compose-box{padding:8px}
 .portal-rc2 .chat-compose-toolbar{gap:3px}
 .portal-rc2 .chat-compose-icon,.portal-rc2 .chat-send-button{width:37px;flex-basis:37px}
 .portal-rc2 .chat-conversation{min-height:410px}
}


/* Menu contestuale Chat V1.1: accessibile da intestazione, elenco e clic destro. */
.portal-rc2 .chat-room-entry{display:flex;align-items:center;position:relative;min-width:0;border-radius:10px}
.portal-rc2 .chat-room-entry:hover,.portal-rc2 .chat-room-entry:focus-within{background:#f3f8fe}
.portal-rc2 .chat-room-entry .chat-room-card{min-width:0;flex:1;padding-right:2px}
.portal-rc2 .chat-context-menu{position:relative;flex:0 0 auto;z-index:2}
.portal-rc2 .chat-context-menu[open]{z-index:25}
.portal-rc2 .chat-list-menu{margin-right:4px}
.portal-rc2 .chat-menu-trigger{display:flex;align-items:center;justify-content:center;width:32px;height:34px;cursor:pointer;border-radius:8px;color:#6d8095;list-style:none}
.portal-rc2 .chat-menu-trigger::-webkit-details-marker{display:none}
.portal-rc2 .chat-menu-trigger::marker{content:''}
.portal-rc2 .chat-list-menu .chat-menu-trigger{opacity:.35}
.portal-rc2 .chat-room-entry:hover .chat-menu-trigger,.portal-rc2 .chat-context-menu[open] .chat-menu-trigger,.portal-rc2 .chat-menu-trigger:focus-visible{opacity:1}
.portal-rc2 .chat-menu-trigger:hover,.portal-rc2 .chat-context-menu[open] .chat-menu-trigger{color:#196fb7;background:#e7f1ff}
.portal-rc2 .chat-header-menu .chat-menu-trigger{width:39px;height:39px}
.portal-rc2 .chat-menu-panel{position:absolute;right:0;top:calc(100% + 4px);z-index:200;width:245px;max-width:calc(100vw - 36px);padding:6px;background:#fff;border:1px solid #d9e4f0;border-radius:12px;box-shadow:0 11px 31px rgba(20,44,77,.17)}
.portal-rc2 .chat-menu-heading{padding:9px 10px;border-bottom:1px solid #ecf0f5;margin-bottom:5px}
.portal-rc2 .chat-menu-heading strong,.portal-rc2 .chat-menu-heading small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal-rc2 .chat-menu-heading strong{color:#233952;font-size:13px}
.portal-rc2 .chat-menu-heading small{color:#8797a8;font-size:11px;margin-top:3px}
.portal-rc2 .chat-menu-form{margin:0}
.portal-rc2 .chat-menu-action{display:flex;align-items:center;gap:10px;width:100%;min-height:39px;background:#fff;border:0;border-radius:7px;padding:7px 10px;text-align:left;color:#344c67;font:inherit;font-size:12px;text-decoration:none;cursor:pointer;white-space:normal}
.portal-rc2 .chat-menu-action .ui-outline{height:17px;width:17px;color:#667c94}
.portal-rc2 .chat-menu-action:hover,.portal-rc2 .chat-menu-action:focus-visible{background:#eff6ff;color:#116ab1}
.portal-rc2 .chat-menu-footer{border-top:1px solid #eef1f5;padding:10px 9px 5px;color:#8292a6;font-size:10px}
@media(max-width:720px){
 .portal-rc2 .chat-list-menu[open] .chat-menu-panel{top:auto;bottom:calc(100% + 3px)}
 .portal-rc2 .chat-menu-panel{width:225px}
 .portal-rc2 .chat-list-menu .chat-menu-trigger{opacity:1}
}

/* Chat: menu anche sulle singole bolle; rimozione dei controlli in linea. */
.portal-rc2 .chat-bubble{position:relative;padding-right:37px}
.portal-rc2 .chat-bubble > .chat-message-menu{position:absolute;top:4px;right:4px;z-index:8}
.portal-rc2 .chat-bubble > .chat-message-menu[open]{z-index:40}
.portal-rc2 .chat-message-action-panel{min-width:240px;max-width:min(320px,94vw)}
.portal-rc2 .chat-message-action-panel .chat-inline-action{display:block;margin:3px 0;padding:2px}
.portal-rc2 .chat-message-action-panel .chat-inline-action button{width:auto;font-size:12px}
.portal-rc2 .chat-message-action-panel input,.portal-rc2 .chat-message-action-panel select{max-width:100%}
.portal-rc2 .chat-menu-danger{color:#a52929!important}
.portal-rc2 .chat-menu-danger:hover{background:#fff0f0!important}

/* Home Personale V1.0 — stessa identità del Portale, schede leggere. */
.portal-rc2 .home-personal-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:4px 0 22px;padding:0 2px}
.portal-rc2 .home-personal-heading .eyebrow{color:#3279c9;font-size:11px;letter-spacing:.11em;font-weight:750}
.portal-rc2 .home-personal-heading h1{margin:6px 0 5px;color:#132033;font-size:clamp(24px,2vw,32px);line-height:1.15;font-weight:700}
.portal-rc2 .home-personal-heading p{margin:0;color:#64748b;font-size:13px}
.portal-rc2 .home-personal-settings{display:inline-flex;align-items:center;gap:8px;border:1px solid #dbe5f1;border-radius:10px;background:#fff;color:#246cb5;padding:10px 14px;font-size:13px;font-weight:650;white-space:nowrap;text-decoration:none}
.portal-rc2 .home-personal-settings:hover{border-color:#91bee9;background:#f4f9ff}
.portal-rc2 .home-personal-settings .ui-outline{width:17px;height:17px}
.portal-rc2 .home-comms{border:1px solid #e3eaf3;border-radius:13px;background:#fff;box-shadow:0 5px 16px rgba(19,32,51,.04);padding:15px 18px 9px;max-width:720px;margin-bottom:26px}
.portal-rc2 .home-comms-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}
.portal-rc2 .home-comms-head h2{font-size:15px;line-height:1.2;margin:0;font-weight:700;color:#203248}
.portal-rc2 .home-comms-head>span{font-size:11px;color:#8592a6}
.portal-rc2 .home-comms-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.portal-rc2 .home-comms-link{display:flex;align-items:center;gap:10px;min-width:0;padding:10px 13px 10px 0;text-decoration:none;color:inherit;border-radius:8px}
.portal-rc2 .home-comms-link+.home-comms-link{border-left:1px solid #e8edf5;padding-left:13px}
.portal-rc2 .home-comms-link:hover{background:#f8fbff}
.portal-rc2 .home-comms-icon,.portal-rc2 .home-widget-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;border-radius:10px}
.portal-rc2 .home-comms-icon.tone-amber{color:#b87816;background:#fff5df}
.portal-rc2 .home-comms-icon.tone-blue,.portal-rc2 .home-widget-icon.tone-blue{color:#246fc4;background:#e9f3ff}
.portal-rc2 .home-widget-icon.tone-green{color:#14866c;background:#e7f7f1}
.portal-rc2 .home-widget-icon.tone-purple{color:#7658b8;background:#f2edfe}
.portal-rc2 .home-comms-icon .ui-outline,.portal-rc2 .home-widget-icon .ui-outline{width:19px;height:19px}
.portal-rc2 .home-comms-copy{display:flex;flex-direction:column;min-width:0;flex:1}
.portal-rc2 .home-comms-copy strong{font-size:12.5px;font-weight:700;color:#23364d}
.portal-rc2 .home-comms-copy small{display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#718096;font-size:11px;margin-top:3px}
.portal-rc2 .home-comms-link>.ui-outline{color:#9bacbe;width:15px;height:15px;flex:none}
.portal-rc2 .home-widgets-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 14px}
.portal-rc2 .home-widgets-heading h2{font-size:17px;color:#203248;font-weight:700;margin:0}
.portal-rc2 .home-widgets-heading>a{color:#2676ce;font-size:12px;font-weight:650}
.portal-rc2 .home-widgets{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px;align-items:stretch}
.portal-rc2 .home-widget{display:flex;flex-direction:column;min-width:0;grid-column:span 6;background:#fff;border:1px solid #e3eaf3;border-radius:13px;padding:17px 19px;box-shadow:0 5px 16px rgba(19,32,51,.035)}
.portal-rc2 .home-widget-small{grid-column:span 3}
.portal-rc2 .home-widget-medium{grid-column:span 6}
.portal-rc2 .home-widget-wide{grid-column:span 12}
.portal-rc2 .home-widget-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.portal-rc2 .home-widget-head h3{font-size:14px;line-height:1.2;color:#23364d;font-weight:700;margin:0}
.portal-rc2 .home-widget-stat{font-size:28px;line-height:1.15;font-weight:750;letter-spacing:-.03em;color:#1f3755}
.portal-rc2 .home-widget p{font-size:12px;color:#697b91;margin:6px 0 12px}
.portal-rc2 .home-widget a{margin-top:auto;font-size:12px;font-weight:700;color:#2877cc}
.portal-rc2 .home-no-widgets{display:flex;align-items:center;gap:16px;background:#fff;border:1px dashed #cadaea;border-radius:13px;padding:20px;max-width:820px;color:#52627a}
.portal-rc2 .home-no-widgets .home-empty-symbol{display:flex;align-items:center;justify-content:center;width:46px;height:46px;flex:0 0 46px;background:#eff6fe;color:#3279c9;border-radius:12px}
.portal-rc2 .home-no-widgets strong{font-size:14px;color:#243a55}
.portal-rc2 .home-no-widgets p{font-size:12px;margin:5px 0 0}
.portal-rc2 .home-no-widgets>a{font-size:12px;font-weight:700;margin-left:auto;white-space:nowrap;color:#2477d2}
.portal-rc2 .home-settings-info{display:flex;align-items:center;gap:9px;color:#576b82;background:#f1f7fd;border:1px solid #dceafa;border-radius:10px;padding:11px 14px;margin:0 0 16px;font-size:12px}
.portal-rc2 .home-settings-info .ui-outline{color:#3279c9;width:17px;height:17px}
.portal-rc2 .home-settings-form{background:#fff;border:1px solid #e0e8f2;border-radius:13px;padding:6px 20px 18px}
.portal-rc2 .home-settings-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 0;border-bottom:1px solid #eaf0f6}
.portal-rc2 .home-settings-title{display:flex;align-items:center;gap:12px;flex:1;min-width:0;cursor:pointer}
.portal-rc2 .home-settings-title>input{width:18px;height:18px;accent-color:#1677e8;flex-shrink:0}
.portal-rc2 .home-settings-title>span:last-child{min-width:0;display:flex;flex-direction:column;gap:3px}
.portal-rc2 .home-settings-title strong{color:#263a54;font-size:13px}
.portal-rc2 .home-settings-title small{font-size:11px;color:#718096}
.portal-rc2 .home-settings-controls{display:flex;gap:12px}
.portal-rc2 .home-settings-controls label{display:flex;align-items:center;gap:7px;color:#68798f;font-size:11px}
.portal-rc2 .home-settings-controls select{appearance:auto;background:#fff;border:1px solid #d9e3ed;border-radius:8px;color:#263a54;font-size:12px;padding:7px 9px}
.portal-rc2 .home-settings-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding-top:17px}
.portal-rc2 .home-settings-future{margin-top:18px;background:#fff;border:1px solid #e3eaf2;border-radius:13px;padding:18px 20px}
.portal-rc2 .home-settings-future h2{font-size:14px;margin:0 0 5px}
.portal-rc2 .home-settings-future p{color:#738199;font-size:12px;line-height:1.6;margin:0}
@media(max-width:1100px){.portal-rc2 .home-widget-small{grid-column:span 6}}
@media(max-width:720px){
  .portal-rc2 .home-personal-heading{align-items:flex-start;gap:10px}
  .portal-rc2 .home-personal-heading h1{font-size:25px}
  .portal-rc2 .home-personal-settings{font-size:0;padding:11px}
  .portal-rc2 .home-personal-settings .ui-outline{width:19px;height:19px}
  .portal-rc2 .home-comms{max-width:none;padding:13px 14px 7px}
  .portal-rc2 .home-comms-items{grid-template-columns:1fr}
  .portal-rc2 .home-comms-link{padding:9px 0}
  .portal-rc2 .home-comms-link+.home-comms-link{border-left:0;border-top:1px solid #e8edf5;padding-left:0}
  .portal-rc2 .home-widgets{grid-template-columns:1fr}
  .portal-rc2 .home-widget,.portal-rc2 .home-widget-small,.portal-rc2 .home-widget-medium,.portal-rc2 .home-widget-wide{grid-column:auto}
  .portal-rc2 .home-no-widgets{align-items:flex-start;flex-wrap:wrap}
  .portal-rc2 .home-no-widgets>a{width:100%;margin-left:62px}
  .portal-rc2 .home-settings-row{align-items:flex-start;flex-direction:column;gap:12px}
  .portal-rc2 .home-settings-controls{padding-left:30px;flex-wrap:wrap}
}

/* Hub Gestionali V1.0 DEV — interfaccia coordinata dark navy/ciano.
   Asset fotografico originale della schermata scelta NON contenuto nello snapshot. */
.auth-body{color:#f6fbff;background:radial-gradient(ellipse at 72% 67%,#214260 0,transparent 42%),linear-gradient(112deg,#071222 0%,#10233a 48%,#081522 100%);min-height:100vh;position:relative}
.auth-body::before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.2;background:linear-gradient(155deg,transparent 35%,#347695 36%,transparent 38%),radial-gradient(ellipse at 36% 75%,#4787a4 0,transparent 36%);filter:blur(18px)}
.auth-body .auth-top{position:relative;z-index:2;height:94px;background:transparent;border:0;padding:0 max(5vw,24px)}
.auth-body .brand-light strong{font-size:20px;color:#fff;letter-spacing:.03em}.auth-body .brand-light small{color:#b4cce3}
.auth-body .portal-logo i{box-shadow:0 0 12px #039ed855}.auth-body .portal-logo i:nth-child(1){background:#5ee3f1}.auth-body .portal-logo i:nth-child(2){background:#159edb}.auth-body .portal-logo i:nth-child(3){background:#1679c2}
.auth-body .auth-shell{max-width:1380px;width:100%;margin:0 auto;padding:6vh max(5vw,24px) 18px;position:relative;z-index:2}
.auth-body .auth-shell .auth-wrap{min-height:68vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,440px);align-items:center;gap:6vw}
.auth-body .auth-pitch{max-width:600px}.auth-body .auth-pitch .auth-kicker{font-size:12px;letter-spacing:.23em;color:#69def7;font-weight:700}
.auth-body .auth-pitch h1{font-size:clamp(36px,4.5vw,70px);line-height:1.12;color:#f9fdff;letter-spacing:-.05em;margin:25px 0}
.auth-body .auth-pitch h1 em{color:#67e5f7;font-style:normal}
.auth-body .auth-pitch p{max-width:480px;color:#c9dbea;font-size:17px;line-height:1.7}
.auth-body .auth-features{display:flex;gap:16px;flex-wrap:wrap;margin-top:34px;color:#bceef9;font-size:13px;font-weight:600}
.auth-body .auth-shell .auth-card{width:100%;max-width:none;background:rgba(12,29,49,.82);border:1px solid rgba(119,208,239,.29);border-radius:22px;padding:clamp(22px,3vw,38px);box-shadow:0 24px 70px #0007;backdrop-filter:blur(16px)}
.auth-body .auth-card h1{color:#f9fdff}.auth-body .auth-card p{color:#bacbdc}.auth-body .auth-card .field{color:#e9f7ff}
.auth-body .auth-card .field input,.auth-body .auth-card .field select,.auth-body .auth-card .field textarea{background:#112941;border:1px solid #41617b;color:#fff;min-height:47px;border-radius:9px}
.auth-body .auth-card .field input:focus{outline:2px solid #50c7ed;outline-offset:1px}
.auth-body .auth-shell .button{background:linear-gradient(90deg,#008ec7,#31bbe8);border-color:#3ed5f5;color:#fff;min-height:48px}
.auth-body .auth-shell .button-outline{background:#1a3552;color:#c8f5ff;border-color:#3a718e}
.auth-body .auth-shell>.portal-footer{color:#a7bdd0;text-align:center}
@media(max-width:880px){.auth-body .auth-shell{padding-top:18px}.auth-body .auth-shell .auth-wrap{grid-template-columns:1fr;gap:24px;min-height:0}.auth-body .auth-pitch h1{font-size:38px;margin:13px 0}.auth-body .auth-pitch p{font-size:14px}.auth-body .auth-features{margin-top:16px}.auth-body .auth-shell .auth-card{max-width:520px;margin:0 auto}}
@media(max-width:500px){.auth-body .auth-top{height:68px}.auth-body .auth-shell .auth-wrap{gap:18px}.auth-body .auth-pitch h1{font-size:32px}.auth-body .auth-features{gap:9px;font-size:11px}.auth-body .auth-shell .auth-card{padding:22px 17px}}


/* Hub Gestionali DEV R2.2 — tema unitario delle pagine interne.
   Allinea dashboard, impostazioni, HR, Chat e moduli al login blu notte/ciano.
   SOLO PRESENTAZIONE: non sostituisce alcuna verifica di autorizzazione. */
.portal-body.portal-rc2.hub-dark{
  color-scheme:dark;
  --navy:#081629;--navy-2:#102840;--blue:#21bedf;--blue-2:#0083dd;
  --blue-soft:#173b55;--bg:#081525;--panel:#12273e;--ink:#edf8ff;
  --muted:#a1b8ce;--line:#29435d;--green:#44d9b0;
  --shadow:0 20px 45px rgba(1,7,18,.25);
  background:radial-gradient(circle at 78% 6%,rgba(18,105,149,.20),transparent 34%),
    radial-gradient(circle at 8% 88%,rgba(10,117,179,.09),transparent 38%),#081525;
  color:#e8f3ff;
  min-height:100vh;
}
.portal-body.portal-rc2.hub-dark .portal-layout{background:transparent}
.portal-body.portal-rc2.hub-dark .main-column{background:transparent}
.portal-body.portal-rc2.hub-dark .sidebar{
  background:linear-gradient(180deg,#061120 0%,#0a2037 52%,#081626 100%);
  border-right:1px solid rgba(93,200,237,.16);
  box-shadow:10px 0 42px rgba(0,5,15,.2);
}
.portal-body.portal-rc2.hub-dark .side-brand{border-bottom:1px solid #1e3951;}
.portal-body.portal-rc2.hub-dark .side-brand strong{color:#f7fdff}
.portal-body.portal-rc2.hub-dark .side-nav{}
.portal-body.portal-rc2.hub-dark .side-link{color:#b4cce0;border:1px solid transparent;}
.portal-body.portal-rc2.hub-dark .side-link:hover{background:#132f4b;color:#ecfaff;border-color:#295879}
.portal-body.portal-rc2.hub-dark .side-link.active{
  background:linear-gradient(94deg,#105483,#143654 80%);color:#f6fdff;
  border:1px solid #2675a2;border-left:3px solid #37d4f0;
  box-shadow:0 8px 24px rgba(0,169,225,.10);
}
.portal-body.portal-rc2.hub-dark .side-link.active .side-ico,
.portal-body.portal-rc2.hub-dark .side-link:hover .side-ico{color:#59ddf5}
.portal-body.portal-rc2.hub-dark .side-user{border-top:1px solid #1f3954;background:rgba(16,45,70,.35)}
.portal-body.portal-rc2.hub-dark .side-user-copy strong{color:#f2faff}
.portal-body.portal-rc2.hub-dark .side-user-copy small{color:#9db6ce}
.portal-body.portal-rc2.hub-dark .avatar{background:linear-gradient(135deg,#1aabd2,#124e8e);border:1px solid #5fe3fa55;color:#fff;box-shadow:0 6px 18px #0004}
.portal-body.portal-rc2.hub-dark .main-topbar{
  background:rgba(10,28,47,.92);border-bottom:1px solid #25445f;
  box-shadow:0 5px 26px rgba(0,5,20,.16);backdrop-filter:blur(18px);
}
.portal-body.portal-rc2.hub-dark .top-search-wrap{background:#132c45;border:1px solid #2a506e;box-shadow:inset 0 1px 0 #ffffff09}
.portal-body.portal-rc2.hub-dark .top-search-wrap input{color:#eaf8ff!important}
.portal-body.portal-rc2.hub-dark .top-search-wrap input::placeholder{color:#99b8ce}
.portal-body.portal-rc2.hub-dark .search-ico,.portal-body.portal-rc2.hub-dark .top-alert-link,
.portal-body.portal-rc2.hub-dark .top-date strong{color:#cae4f3}
.portal-body.portal-rc2.hub-dark .top-date small{color:#8facbf}
.portal-body.portal-rc2.hub-dark .role-chip{background:#183650;color:#c4eafa;border:1px solid #32617a}
.portal-body.portal-rc2.hub-dark .content-shell{color:#edf5ff;max-width:1490px}
.portal-body.portal-rc2.hub-dark .content-shell :is(h1,h2,h3,h4,strong){color:#edf8ff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.muted,small,.caption){color:#9bb4ca}
.portal-body.portal-rc2.hub-dark .content-shell :is(p,span,label){overflow-wrap:anywhere}
.portal-body.portal-rc2.hub-dark .content-shell .eyebrow{color:#57dcf4!important;letter-spacing:.11em}
.portal-body.portal-rc2.hub-dark .content-shell :is(.hero,.hero.small,.welcome-panel,.banner){
  background:linear-gradient(112deg,rgba(23,68,105,.92),rgba(14,40,69,.98) 61%,rgba(9,68,98,.75));
  border:1px solid #295b78;color:#e8f7ff;
  box-shadow:0 12px 36px rgba(0,8,24,.22);
  position:relative;overflow:hidden;
}
.portal-body.portal-rc2.hub-dark .content-shell :is(.hero,.welcome-panel,.banner)::after{
  content:"";position:absolute;right:-100px;top:-140px;width:300px;height:300px;border-radius:100%;
  background:radial-gradient(circle,rgba(60,216,248,.14),transparent 65%);pointer-events:none;
}
.portal-body.portal-rc2.hub-dark .content-shell :is(.hero,.hero.small,.welcome-panel,.banner) :is(h1,h2){color:#fff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.hero,.hero.small,.welcome-panel,.banner) p{color:#b8d6e8}
.portal-body.portal-rc2.hub-dark .sun-mark{color:#62e0f4;text-shadow:0 0 18px #19addd55}
.portal-body.portal-rc2.hub-dark .hero-admin{background:#144868;border:1px solid #4288a8;color:#c2f4ff}
.portal-body.portal-rc2.hub-dark .hero-admin:hover{background:#1e6086;color:#fff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.card,.admin-item,.control-card,.access-card,.company-admin-card,.stat,.app-card,
 .home-widget,.hr-metric,.hr-profile,.chat-summary-item,.home-comms,.home-settings-form,
 .home-settings-future,.privacy-document,.privacy-card,.empty-state,.home-no-widgets){
  background:linear-gradient(148deg,rgba(24,48,74,.96),rgba(15,34,57,.98));
  border:1px solid #294762;color:#edf7ff;box-shadow:0 10px 28px rgba(0,9,25,.17);
}
.portal-body.portal-rc2.hub-dark .content-shell :is(.card,.app-card,.control-card,.home-widget,.hr-metric,.chat-summary-item):hover{
  border-color:#347395;
}
.portal-body.portal-rc2.hub-dark .content-shell :is(.card,.admin-item,.control-card,.access-card,.home-widget,.hr-metric,.empty-state) :is(h2,h3,strong){color:#eaf8ff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.card,.admin-item,.control-card,.access-card,.home-widget,.hr-metric,.empty-state) p{color:#b1c6d9}
.portal-body.portal-rc2.hub-dark .content-shell :is(.section-title,.home-section-link,.home-widgets-heading>a){color:#6edff4}
.portal-body.portal-rc2.hub-dark .app-card{border-radius:17px}
.portal-body.portal-rc2.hub-dark .card-body h3{color:#eefaff}
.portal-body.portal-rc2.hub-dark .card-body p{color:#abc5db}
.portal-body.portal-rc2.hub-dark .port-chip{background:#20425d;color:#afd9ed;border:1px solid #38617b}
.portal-body.portal-rc2.hub-dark .app-icon{box-shadow:0 7px 21px #0004}
.portal-body.portal-rc2.hub-dark .app-icon-people{background:#1c4b76;color:#69caff;border-color:#326f9e}
.portal-body.portal-rc2.hub-dark .app-icon-chat{background:#164944;color:#5deaca;border-color:#357d72}
.portal-body.portal-rc2.hub-dark .favorite-star,.portal-body.portal-rc2.hub-dark .filter-pill{background:#182f4b;color:#bbd4e5;border:1px solid #2b4b6a}
.portal-body.portal-rc2.hub-dark .favorite-star:hover,.portal-body.portal-rc2.hub-dark .filter-pill:hover{border-color:#54bedf;color:#fff}
.portal-body.portal-rc2.hub-dark .filter-pill.active{background:linear-gradient(90deg,#098bc1,#1869c3);border-color:#26bbdd;color:#fff}
.portal-body.portal-rc2.hub-dark .filter-pill[data-filter="favorites"]{color:#fbd36e}
.portal-body.portal-rc2.hub-dark .filter-pill[data-filter="favorites"].active{background:#675021;border-color:#a38438;color:#fff0aa}
.portal-body.portal-rc2.hub-dark .filter-pill[data-filter="online"]{color:#62e9ad}
.portal-body.portal-rc2.hub-dark .filter-pill[data-filter="online"].active{background:#1c5b49;border-color:#368a6f;color:#c5fce2}
.portal-body.portal-rc2.hub-dark :is(.open-app,.button,.primary,.notice-read,.chat-send-button){
  background:linear-gradient(100deg,#009acc,#1466cf);border:1px solid #18b9e5;color:#fff;
  box-shadow:0 5px 18px rgba(0,119,206,.17);
}
.portal-body.portal-rc2.hub-dark :is(.open-app,.button,.primary,.notice-read,.chat-send-button):hover{background:linear-gradient(100deg,#00afe4,#197def);color:#fff}
.portal-body.portal-rc2.hub-dark :is(.button-outline,.button-quiet,.secondary,.ghost,.btnlink){
  background:#183750;color:#afeaf8;border:1px solid #32647f;
}
.portal-body.portal-rc2.hub-dark :is(.button-outline,.button-quiet,.secondary,.ghost,.btnlink):hover{background:#235475;color:#eafcff}
.portal-body.portal-rc2.hub-dark .content-shell :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){
  background:#0c233a;color:#eaf7ff;border:1px solid #355876;
  box-shadow:none;accent-color:#27bada;
}
.portal-body.portal-rc2.hub-dark .content-shell :is(input,textarea)::placeholder{color:#83a0b7}
.portal-body.portal-rc2.hub-dark .content-shell :is(input,select,textarea):focus-visible{outline:2px solid #56d8f3;outline-offset:2px}
.portal-body.portal-rc2.hub-dark .content-shell :is(label,.field,.field span,.full-label,.hr-filter-bar label){color:#c5dbeb}
.portal-body.portal-rc2.hub-dark .content-shell :is(input[type=checkbox],input[type=radio]){accent-color:#1ab9dd}
.portal-body.portal-rc2.hub-dark .content-shell :is(.pill,.check,.switch-label,.effective-box,.effective-grid>div,.access-section,.home-settings-info){
  background:#193752;border:1px solid #315775;color:#d5e9f7;
}
.portal-body.portal-rc2.hub-dark .content-shell :is(.pill,.check,.switch-label,.effective-box) span{color:#d5e9f7}
.portal-body.portal-rc2.hub-dark .content-shell :is(.admin-tabs-v27,.tabs){background:transparent;border-color:#294762}
.portal-body.portal-rc2.hub-dark .content-shell :is(.admin-tabs-v27 a,.tabs a){background:#16324c;color:#bed9eb;border:1px solid #2d4f6a}
.portal-body.portal-rc2.hub-dark .content-shell :is(.admin-tabs-v27 a,.tabs a):hover{background:#225478;color:#eafbff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.admin-tabs-v27 a.active,.tabs a.active){background:#115987;color:#fff;border-color:#36b8df}
.portal-body.portal-rc2.hub-dark .content-shell :is(.profile-summary,.access-card>summary,.create-panel>summary){color:#e5f5ff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.profile-summary:hover,details[open]>.profile-summary){background:#1a3b58;border-color:#2b5872}
.portal-body.portal-rc2.hub-dark .content-shell .profile-summary small{color:#9ebcd0}
.portal-body.portal-rc2.hub-dark .content-shell :is(table,.table){color:#e4f3ff;border-color:#2d4d68}
.portal-body.portal-rc2.hub-dark .content-shell :is(th,.hr-table th){background:#183751;color:#b9d6e8;border-color:#30536e}
.portal-body.portal-rc2.hub-dark .content-shell :is(td,.hr-table td){background:transparent;color:#dbeaf6;border-color:#284961}
.portal-body.portal-rc2.hub-dark .content-shell tbody tr{background:transparent;border-color:#2d4d68}
.portal-body.portal-rc2.hub-dark .content-shell tbody tr:nth-child(even){background:rgba(22,53,77,.32)}
.portal-body.portal-rc2.hub-dark .content-shell tbody tr:hover{background:#21435f}
.portal-body.portal-rc2.hub-dark .content-shell :is(.warning,.notice-banner.warning){background:#4b3923;color:#ffe4ab;border:1px solid #94713f}
.portal-body.portal-rc2.hub-dark .content-shell :is(.warning,.notice-banner.warning) *{color:#ffe4ab}
.portal-body.portal-rc2.hub-dark .content-shell :is(.success,.toast,.notice-banner.success){background:#153c38;color:#b7f7e0;border:1px solid #3b7768}
.portal-body.portal-rc2.hub-dark .content-shell :is(.success,.toast,.notice-banner.success) *{color:#b7f7e0}
.portal-body.portal-rc2.hub-dark .content-shell :is(.notice-banner,.notice,.alert){background:#193850;border:1px solid #366382;color:#d5ecff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.notice-copy span,.notice-copy strong){color:#cfe6f7}
.portal-body.portal-rc2.hub-dark .notice-read{border:1px solid #2eabda}
.portal-body.portal-rc2.hub-dark .content-shell :is(.tag,.chip,.badge,.hr-status,.port-chip){background:#21435d;color:#caeaff;border:1px solid #39708f}
.portal-body.portal-rc2.hub-dark .content-shell :is(.tag.green,.hr-status-active){background:#144a3f;color:#83f3bd;border-color:#337e64}
.portal-body.portal-rc2.hub-dark .content-shell :is(.tag.warn){background:#504026;color:#ffe2a0;border-color:#917037}
.portal-body.portal-rc2.hub-dark .content-shell :is(.stats a,.home-quick-link){background:#172e48;color:#dbf3ff;border:1px solid #2a4964;border-radius:11px}
.portal-body.portal-rc2.hub-dark .content-shell :is(.stats strong,.hr-metric strong,.home-widget-stat,.chat-summary-copy strong){color:#72e0f5}
.portal-body.portal-rc2.hub-dark .content-shell :is(.stats span,.hr-metric span,.hr-metric small,.home-widget p,.home-comms-copy small,.home-quick-link small){color:#a7c1d7}
.portal-body.portal-rc2.hub-dark .content-shell :is(.hr-person strong,.home-comms-copy strong,.home-widget-head h3,.home-settings-title strong){color:#ecfaff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.hr-person small,.home-settings-title small){color:#9ebbd2}
.portal-body.portal-rc2.hub-dark .content-shell :is(.hr-person-avatar,.hr-profile-avatar,.hr-metric-ico,.home-widget-icon,.home-comms-icon,.home-stat-mark,.room-symbol){background:#214c6a;color:#8fdafa;border-color:#357a9c}
.portal-body.portal-rc2.hub-dark .content-shell :is(.hr-filter-bar,.hr-directory-head){border-color:#2c4d68}
.portal-body.portal-rc2.hub-dark .content-shell :is(.module-card,.home-settings-row,.home-quick-link){border-bottom-color:#2b4964}
.portal-body.portal-rc2.hub-dark .content-shell .home-comms-link:hover{background:#234967}
.portal-body.portal-rc2.hub-dark .content-shell :is(.home-comms-link,.home-settings-controls label){color:#d0e5f6}
.portal-body.portal-rc2.hub-dark .content-shell .chat-shell{background:#0c2239;border:1px solid #2d5874;box-shadow:0 16px 38px #010a1b66}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-rooms,.chat-aside,.chat-rooms-head,.chat-header,.chat-conversation-head,.chat-composer,.chat-compose){background:#122b43;border-color:#2d4d68}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-conversation,.chat-main,.chat-messages,.chat-timeline){background:linear-gradient(180deg,#0b2137,#0a1c31)}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-room-card.active,.chat-room-card:hover,.chat-aside .room.active){background:#1e4967;color:#e2faff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-room-detail strong,.chat-conversation-title strong,.chat-header strong){color:#eaf8ff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-room-detail small,.chat-conversation-title small,.chat-header small,.chat-room-meta time,.chat-empty-list){color:#a0bed3}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-room-avatar,.chat-summary-ico){background:#1a5069;color:#b6f5ff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-bubble,.bubble){background:#173a56;border:1px solid #31627e;color:#eaf8ff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-bubble.mine,.bubble.mine){background:#165276;border-color:#2088a7}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-bubble p,.bubble p,.chat-bubble strong,.bubble strong){color:#edfaff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-bubble time,.chat-day span,.bubble small){color:#9ac8d9}
.portal-body.portal-rc2.hub-dark .content-shell .chat-day span{background:#23435b;border:1px solid #32637a}
.portal-body.portal-rc2.hub-dark .content-shell :is(.chat-message-search,.chat-compose,.chat-composer){border-color:#30536e}
.portal-body.portal-rc2.hub-dark .content-shell .chat-privacy-note{color:#8fb1c7}
.portal-body.portal-rc2.hub-dark .content-shell .portal-footer{border-color:#22445c;color:#91aeca}
.portal-body.portal-rc2.hub-dark .content-shell a:not(.button):not(.button-outline):not(.button-quiet):not(.open-app):not(.side-link):not(.filter-pill):not(.favorite-star){text-underline-offset:3px}
.portal-body.portal-rc2.hub-dark .content-shell :is(.menu-app-icon,.app-icon,.tool-shortcut-icon){border-color:#2e6480}
.portal-body.portal-rc2.hub-dark .content-shell :is(.tool-card,.tool-shortcut,.control-card,.privacy-card,.company-admin-card){
  background:linear-gradient(145deg,#17334f,#10253d);border-color:#2b516e;color:#eaf8ff;
}
.portal-body.portal-rc2.hub-dark .content-shell :is(.tool-card,.tool-shortcut,.control-card) :is(h2,h3,strong,p,small){color:#d5eaf8}
.portal-body.portal-rc2.hub-dark .content-shell :is(.tool-card,.tool-shortcut,.control-card) a{color:#89e7f7}
.portal-body.portal-rc2.hub-dark .content-shell :is(.privacy-form,.privacy-actions,.privacy-document){background:#152f49;color:#dbefff;border-color:#2d4f6b}
.portal-body.portal-rc2.hub-dark .content-shell :is(.privacy-document,.privacy-form) :is(h2,h3,p,strong,small){color:#def2ff}
.portal-body.portal-rc2.hub-dark .content-shell :is(.control-icon,.home-comms-icon,.home-widget-icon){box-shadow:inset 0 0 0 1px #386e8999}
.portal-body.portal-rc2.hub-dark .content-shell :is(.create-panel,.access-card,.user-disclosure,.app-disclosure){border-color:#2d536d;background:#16314b}
.portal-body.portal-rc2.hub-dark .content-shell :is(.create-panel>summary,.access-card>summary){background:#193c58;border-color:#38617a}
.portal-body.portal-rc2.hub-dark .content-shell .empty-icon{background:#1c5070;color:#89e2f9}
.portal-body.portal-rc2.hub-dark .content-shell .home-settings-info{color:#c8e5f5}
.portal-body.portal-rc2.hub-dark .content-shell .home-settings-controls select{background:#102b42;color:#d7f1ff;border-color:#39647f}
.portal-body.portal-rc2.hub-dark .content-shell :is(.admin-local-search,.password-reset){background:#123049;border-color:#30526b}
.portal-body.portal-rc2.hub-dark .content-shell :is(.info,.alert-info){background:#1b3d58;color:#cfe8f8;border-color:#396c8b}
.portal-body.portal-rc2.hub-dark .content-shell :is(.status.online,.status.active){color:#5ce0ab}
.portal-body.portal-rc2.hub-dark .content-shell :is(.status.pending,.status.disabled){color:#adbdcb}
.portal-body.portal-rc2.hub-dark .content-shell :is(a,button,summary):focus-visible{outline:2px solid #63dff4;outline-offset:3px}
.portal-body.portal-rc2.hub-dark .content-shell input:disabled,.portal-body.portal-rc2.hub-dark .content-shell button:disabled{opacity:.6;cursor:not-allowed}
@media(max-width:1100px){
  .portal-body.portal-rc2.hub-dark .main-topbar{background:#0a1b2e}
  .portal-body.portal-rc2.hub-dark .content-shell{padding:18px 15px 38px}
  .portal-body.portal-rc2.hub-dark .side-brand{}
}
@media(max-width:720px){
  .portal-body.portal-rc2.hub-dark .side-nav{}
  .portal-body.portal-rc2.hub-dark .side-link.active{border-left:3px solid #2675a2;border-bottom:2px solid #37d4f0;}
  .portal-body.portal-rc2.hub-dark .content-shell{padding:14px 10px 36px}
  .portal-body.portal-rc2.hub-dark .content-shell :is(.hero,.hero.small,.welcome-panel,.banner){padding:17px}
  .portal-body.portal-rc2.hub-dark .content-shell :is(.hero h1,.welcome-panel h1){font-size:24px}
  .portal-body.portal-rc2.hub-dark .content-shell .card{padding:15px}
  .portal-body.portal-rc2.hub-dark .content-shell .chat-shell{border-radius:12px}
}
/* Marchio H nativo nelle schermate di accesso e all'interno del Portale. */
.hub-mark{display:inline-flex;width:46px;height:46px;align-items:center;justify-content:center;flex:0 0 46px;filter:drop-shadow(0 0 11px rgba(24,197,238,.22))}
.hub-mark svg{display:block;max-width:100%;height:auto}
@media(max-width:720px){.hub-mark{width:38px;height:38px;flex-basis:38px}.hub-mark svg{width:38px;height:38px}}
/* Controlli contrasto verificati su desktop, tablet, smartphone (R2.2). */
.portal-body.portal-rc2.hub-dark .content-shell .table-wrap{background:#102b43;border:1px solid #2d506d}
.portal-body.portal-rc2.hub-dark .content-shell :is(table,.table){background:#132d47}
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr,
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr:nth-child(odd),
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr:nth-child(even){background:#152e46;color:#dceeff}
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr:nth-child(even){background:#1b3952}
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr:hover,
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr:nth-child(even):hover{background:#23516f}
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr td,
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr td :is(a,span,strong,small){background:transparent;color:#dceeff}
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr td a.button-outline{background:#1b3d56;color:#bcf1ff;border-color:#3b7795}
.portal-body.portal-rc2.hub-dark .content-shell table tbody tr td a.button-outline:hover{background:#245979}
.portal-body.portal-rc2.hub-dark .chat-contact-panel{background:#15344e;border-color:#345d78}
.portal-body.portal-rc2.hub-dark .chat-contact-panel summary{background:#193a56;color:#e4f5ff}
.portal-body.portal-rc2.hub-dark .chat-contact-panel summary::before{color:#80d9ef}
.portal-body.portal-rc2.hub-dark .chat-contact-list{background:#142e47;border-top-color:#2d5470}
.portal-body.portal-rc2.hub-dark .chat-contact-item{background:#162f49;color:#e2f3ff;border-bottom-color:#2d4c65}
.portal-body.portal-rc2.hub-dark .chat-contact-item:hover,.portal-body.portal-rc2.hub-dark .chat-contact-item:focus-visible{background:#215173;color:#fff}
.portal-body.portal-rc2.hub-dark .chat-contact-avatar{background:#20516b;color:#bceafa}
.portal-body.portal-rc2.hub-dark .chat-contact-total{background:#215c7d;color:#c4f0ff}
.portal-body.portal-rc2.hub-dark .chat-contact-arrow{color:#81aebf}
.portal-body.portal-rc2.hub-dark .chat-add{background:#1c5979;color:#98efff;border:1px solid #417f9c}
.portal-body.portal-rc2.hub-dark .chat-room-entry:hover,.portal-body.portal-rc2.hub-dark .chat-room-entry:focus-within{background:#1c3e57}
.portal-body.portal-rc2.hub-dark .top-communications .top-alert-link:hover,
.portal-body.portal-rc2.hub-dark .top-communications .top-alert-link.current{background:#194968;color:#93e6fa}
.portal-body.portal-rc2.hub-dark .home-personal-settings{background:#1c4868;border:1px solid #3e829f;color:#b7f2ff}
.portal-body.portal-rc2.hub-dark .home-personal-settings:hover{background:#276086;color:#f1fcff}
.portal-body.portal-rc2.hub-dark .content-shell .home-no-widgets :is(a,.home-widget a,.home-settings-info a){color:#7adef4}
.portal-body.portal-rc2.hub-dark .home-personal-heading :is(p,small){color:#b4d0e3}
.portal-body.portal-rc2.hub-dark .home-no-widgets>a,
.portal-body.portal-rc2.hub-dark .home-widget>a,
.portal-body.portal-rc2.hub-dark .home-widgets-heading>a{color:#7be6fa}
.portal-body.portal-rc2.hub-dark .content-shell .home-no-widgets>a:hover,
.portal-body.portal-rc2.hub-dark .content-shell .home-widget>a:hover{text-decoration:underline;color:#c7faff}


/* Hub Gestionali DEV R2.3 — scelta Giorno/Notte per account.
   Il tema Giorno usa la base chiara già presente, migliorata con lo stile H/ciano.
   Gli override Notte sopra sono validi soltanto con .hub-dark. */
.portal-body.portal-rc2.hub-light{
  color-scheme:light;
  --navy:#0b1a2f;--navy-2:#173451;--blue:#047fac;--blue-2:#0a81ce;
  --blue-soft:#e6f5fc;--bg:#f2f7fc;--panel:#ffffff;--ink:#182b43;
  --muted:#536983;--line:#d7e3ed;--green:#067a61;
  --shadow:0 12px 38px rgba(12,42,74,.09);
  background:linear-gradient(150deg,#f6fbff 0%,#eff6fc 60%,#eaf4fa 100%);
  color:#1c314b;
}
.portal-body.portal-rc2.hub-light .sidebar{
  background:linear-gradient(180deg,#071627,#102c45 80%,#0b1d31);
  border-right:1px solid #21536e;
}
.portal-body.portal-rc2.hub-light .sidebar .side-link{color:#d0e7f5}
.portal-body.portal-rc2.hub-light .sidebar .side-link:hover{background:#173b5a;color:#fff}
.portal-body.portal-rc2.hub-light .sidebar .side-link.active{background:#105e8b;color:#fff;border-left:3px solid #3be2f3}
.portal-body.portal-rc2.hub-light .main-topbar{
  background:rgba(252,254,255,.96);border-bottom:1px solid #d3e4ef;
  box-shadow:0 5px 20px rgba(21,54,83,.045);
}
.portal-body.portal-rc2.hub-light .top-search-wrap{background:#eef5f9;border:1px solid #d8e7ef}
.portal-body.portal-rc2.hub-light .top-search-wrap input{color:#193550!important}
.portal-body.portal-rc2.hub-light .top-date strong,
.portal-body.portal-rc2.hub-light .top-alert-link{color:#234966}
.portal-body.portal-rc2.hub-light .role-chip{background:#e8f5fa;color:#21536c;border:1px solid #c6e0ed}
.portal-body.portal-rc2.hub-light .content-shell{color:#1a3148}
.portal-body.portal-rc2.hub-light .content-shell :is(h1,h2,h3,h4,strong){color:#152a42}
.portal-body.portal-rc2.hub-light .content-shell :is(.muted,small,.caption){color:#60748a}
.portal-body.portal-rc2.hub-light .content-shell :is(.hero,.welcome-panel,.banner){background:linear-gradient(105deg,#deeff8,#eef8fd);border:1px solid #cae5f1;color:#163a57;box-shadow:0 8px 28px #122f4b12}
.portal-body.portal-rc2.hub-light .content-shell :is(.card,.home-widget,.app-card,.admin-item,.module-card,.hr-card){background:#fff;border-color:#d5e5ef;color:#1f344d;box-shadow:0 7px 24px rgba(32,67,102,.05)}
.portal-body.portal-rc2.hub-light .content-shell :is(.card,.home-widget,.app-card,.admin-item,.module-card,.hr-card) :is(h2,h3,strong){color:#19304a}
.portal-body.portal-rc2.hub-light .content-shell :is(.button,.open-app){background:linear-gradient(105deg,#067fc4,#06acd1);border-color:#078fbf;color:#fff}
.portal-body.portal-rc2.hub-light .content-shell :is(a,button,summary):focus-visible{outline:2px solid #078cbe;outline-offset:3px}
.portal-body.portal-rc2.hub-light .content-shell .table-wrap{background:#fff;border:1px solid #dae7ef}
.portal-body.portal-rc2.hub-light .content-shell :is(table,.table){background:#fff;color:#253d55}
.portal-body.portal-rc2.hub-light .content-shell :is(th,.hr-table th){background:#eaf3f9;color:#344d65;border-color:#d3e3ed}
.portal-body.portal-rc2.hub-light .content-shell :is(td,.hr-table td){background:transparent;color:#253d55;border-color:#e0ebf2}
.portal-body.portal-rc2.hub-light .content-shell table tbody tr:nth-child(even){background:#f7fbfe}
.portal-body.portal-rc2.hub-light .content-shell table tbody tr:hover{background:#e9f6fc}
.portal-body.portal-rc2.hub-light .content-shell :is(input,select,textarea){background:#fff;color:#213a55;border-color:#c5dae8}
.portal-body.portal-rc2.hub-light .content-shell :is(input,textarea)::placeholder{color:#71889d}
.portal-body.portal-rc2.hub-light .content-shell :is(.chat-shell,.chat-rooms,.chat-aside,.chat-rooms-head,.chat-header,.chat-conversation-head,.chat-composer,.chat-compose){background:#fff;border-color:#d2e4ee;color:#213a55}
.portal-body.portal-rc2.hub-light .content-shell :is(.chat-conversation,.chat-main,.chat-messages,.chat-timeline){background:linear-gradient(180deg,#f7fbff,#edf5fa)}
.portal-body.portal-rc2.hub-light .content-shell :is(.chat-bubble,.bubble){background:#eaf3fa;color:#203951;border:1px solid #cbe0ed}
.portal-body.portal-rc2.hub-light .content-shell :is(.chat-bubble.mine,.bubble.mine){background:#d6edf9;border-color:#a7d4e9}
.portal-body.portal-rc2.hub-light .content-shell :is(.chat-bubble,.bubble) :is(p,strong){color:#18344e}
.portal-body.portal-rc2.hub-light .content-shell :is(.chat-room-card.active,.chat-room-card:hover){background:#e5f5fc;color:#173c58}
.portal-body.portal-rc2.hub-light .content-shell .portal-footer{color:#627b90}
/* Barra di navigazione: controllo comune a tutti i moduli e tutte le aziende. */
.theme-switch-form{margin:0;display:flex;align-items:center}
.theme-switch-top{width:42px;height:42px;display:grid;place-items:center;cursor:pointer;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;transition:background .18s,color .18s}
.theme-switch-top .ui-outline{width:21px;height:21px}
.portal-body.hub-dark .theme-switch-top{color:#8be9fa;border-color:#2c5c79;background:#193c56}
.portal-body.hub-dark .theme-switch-top:hover{background:#245473;color:#fff}
.portal-body.hub-light .theme-switch-top{color:#1672a1;border-color:#c4e3ef;background:#e8f6fa}
.portal-body.hub-light .theme-switch-top:hover{background:#d8edf8;color:#105781}
.portal-body .theme-switch-top:focus-visible{outline:3px solid #39b8d9;outline-offset:2px}
.portal-body.hub-dark .theme-switch-top .theme-moon,
.portal-body.hub-light .theme-switch-top .theme-sun{display:none}
.theme-switch-top:disabled{opacity:.6;cursor:wait}
.theme-settings-card .theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.theme-settings-card .theme-option{display:flex;align-items:center;gap:13px;text-align:left;padding:18px;border:2px solid transparent;border-radius:14px;cursor:pointer;min-width:0;background:var(--panel);color:var(--ink)}
.theme-settings-card .theme-option .ui-outline{width:25px;height:25px;flex:none}
.theme-settings-card .theme-option span{display:flex;flex-direction:column;gap:5px}
.theme-settings-card .theme-option small{font-size:12px;line-height:1.4}
.theme-settings-card .theme-option.selected{border-color:#31b7de}
.theme-settings-card .theme-option:hover{border-color:#41bbdb}
.portal-body.hub-dark .theme-option{background:#1a3751;color:#e8faff}
.portal-body.hub-dark .theme-option.selected{background:#164762;border-color:#55dced}
.portal-body.hub-dark .theme-option small{color:#b2cfe0}
.portal-body.hub-light .theme-option{background:#f5faff;color:#18334e;border-color:#d6e7f1}
.portal-body.hub-light .theme-option.selected{background:#e1f5fd;border-color:#0ca8c9}
.portal-body.hub-light .theme-option small{color:#526e81}
.theme-save-status{min-height:1.4em;margin:10px 0 0;font-size:12px}
.theme-option:focus-visible{outline:3px solid #37adcd;outline-offset:2px}
@media(max-width:720px){
  .theme-settings-card .theme-options{grid-template-columns:1fr}
  .theme-switch-top{width:38px;height:38px}
  .theme-settings-card .theme-option{padding:14px}
}

/* R2.3.1: errore salvataggio tema non distruttivo, accessibile anche su mobile */
.theme-switch-form{position:relative}
.theme-switch-feedback:not([hidden]){position:absolute;right:0;top:calc(100% + 7px);z-index:101;display:block;width:min(300px,75vw);padding:10px 12px;border-radius:9px;background:#fff0dd;color:#60380c;border:1px solid #e9b765;font-size:12px;box-shadow:0 8px 24px #0002}

/* ============================================================
   Hub DEV R2.7 — Home tecnica e menu messaggi coerenti Giorno/Notte
   Le regole sono circoscritte al Portale, senza widget browser nativi.
   ============================================================ */
.portal-body.portal-rc2 .platform-home-hero{
  display:grid;grid-template-columns:minmax(0,1.7fr) minmax(190px,.7fr);align-items:center;
  gap:24px;overflow:hidden;position:relative;isolation:isolate;
  border-radius:22px;padding:clamp(24px,3.2vw,42px);margin:2px 0 27px;
  background:linear-gradient(117deg,#102d4b 4%,#0d3d60 61%,#087d9e 110%);
  border:1px solid rgba(89,216,241,.28);box-shadow:0 17px 42px rgba(15,48,78,.19);color:#ebfaff;
}
.portal-body.portal-rc2 .platform-home-hero:before{
  content:"";position:absolute;pointer-events:none;inset:0;z-index:-1;
  background:radial-gradient(circle at 90% 0%,rgba(70,222,245,.21),transparent 45%),
             radial-gradient(circle at 0% 100%,rgba(27,146,204,.12),transparent 48%);
}
.portal-body.portal-rc2 .platform-home-hero-copy{max-width:720px;z-index:1}
.portal-body.portal-rc2 .platform-home-kicker{font-size:11px;font-weight:800;letter-spacing:.15em;color:#7fe9f6;margin-bottom:16px}
.portal-body.portal-rc2 .platform-home-kicker span{color:#4aa1c0;margin:0 8px}
.portal-body.portal-rc2 .platform-home-hero h1{font-size:clamp(26px,3vw,38px);letter-spacing:-.032em;line-height:1.12;color:#fff;margin:0 0 13px;font-weight:800}
.portal-body.portal-rc2 .platform-home-hero p{line-height:1.65;font-size:14px;color:#c3e2f2;max-width:620px;margin:0}
.portal-body.portal-rc2 .platform-home-hero-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:25px}
.portal-body.portal-rc2 .platform-home-primary,
.portal-body.portal-rc2 .platform-home-secondary{display:inline-flex;justify-content:center;align-items:center;gap:9px;min-height:42px;border-radius:11px;padding:10px 15px;font-weight:700;font-size:12px;text-decoration:none;transition:background .15s,transform .15s}
.portal-body.portal-rc2 .platform-home-primary{color:#0b344b!important;background:#7aebfb;border:1px solid #9cf4ff}
.portal-body.portal-rc2 .platform-home-primary:hover{background:#b1f7ff;transform:translateY(-1px)}
.portal-body.portal-rc2 .platform-home-secondary{color:#e7fbff!important;background:#ffffff10;border:1px solid #7fdbf055}
.portal-body.portal-rc2 .platform-home-secondary:hover{background:#ffffff26}
.portal-body.portal-rc2 .platform-home-hero-actions .ui-outline{width:17px;height:17px}
.portal-body.portal-rc2 .platform-home-hero-visual{height:196px;position:relative;display:grid;place-items:center}
.portal-body.portal-rc2 .platform-home-orbit{position:absolute;border-radius:50%;border:1px solid #82dced53;box-shadow:0 0 30px #41d5ea0d}
.portal-body.portal-rc2 .platform-home-orbit-outer{width:195px;height:195px}
.portal-body.portal-rc2 .platform-home-orbit-inner{width:141px;height:141px;border-style:dashed;border-color:#82dced77}
.portal-body.portal-rc2 .platform-home-symbol{width:91px;height:91px;border-radius:23px;display:grid;place-items:center;color:#dcffff;font-size:54px;font-weight:850;box-shadow:0 15px 40px #0005,0 0 35px #36cde845;background:linear-gradient(145deg,#155d86,#079db5);border:1px solid #7cecffbb;transform:rotate(-5deg)}
.portal-body.portal-rc2 .platform-home-pulse{width:12px;height:12px;border-radius:100%;background:#78eefb;border:3px solid #1d6685;position:absolute;box-shadow:0 0 20px #53e6f6}
.portal-body.portal-rc2 .platform-home-pulse-one{top:10px;right:13%}
.portal-body.portal-rc2 .platform-home-pulse-two{bottom:16px;left:13%;width:9px;height:9px}
.portal-body.portal-rc2 .platform-home-section-head{display:flex;justify-content:space-between;align-items:end;flex-wrap:wrap;gap:10px;margin:27px 0 15px}
.portal-body.portal-rc2 .platform-home-section-label{display:block;color:#1684a9;font-size:10px;font-weight:850;letter-spacing:.16em;margin-bottom:6px}
.portal-body.portal-rc2 .platform-home-section-head h2{font-size:clamp(18px,2.1vw,23px);font-weight:780;letter-spacing:-.025em;margin:0;color:var(--ink)}
.portal-body.portal-rc2 .platform-home-scope{color:var(--muted);font-size:12px}
.portal-body.portal-rc2 .platform-home-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.portal-body.portal-rc2 .platform-home-stat{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;min-height:177px;padding:20px;border:1px solid #d8e6f1;background:#fff;border-radius:17px;text-decoration:none;box-shadow:0 8px 24px #1d3b5411;transition:transform .18s,box-shadow .18s,border-color .18s}
.portal-body.portal-rc2 .platform-home-stat:hover{transform:translateY(-3px);border-color:#2fadc8;box-shadow:0 15px 32px #12476b20}
.portal-body.portal-rc2 .platform-home-stat-icon{display:grid;place-items:center;width:37px;height:37px;border-radius:11px;background:#def5fb;color:#087aab}
.portal-body.portal-rc2 .platform-home-stat-icon .ui-outline{width:19px;height:19px}
.portal-body.portal-rc2 .platform-home-stat-number{color:#132e4a;font-weight:850;letter-spacing:-.04em;font-size:clamp(27px,2.5vw,33px);line-height:1.1}
.portal-body.portal-rc2 .platform-home-stat-label{font-size:12px;color:#4b6179;font-weight:660;line-height:1.35}
.portal-body.portal-rc2 .platform-home-stat-link{margin-top:auto;font-size:11px;font-weight:800;color:#0787ad}
.portal-body.portal-rc2 .platform-home-section-head-bottom{margin-top:31px}
.portal-body.portal-rc2 .platform-home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.portal-body.portal-rc2 .platform-home-action{display:flex;align-items:center;gap:14px;min-width:0;min-height:90px;border-radius:15px;padding:17px;border:1px solid #dce8f0;background:#fff;box-shadow:0 7px 21px #1d3b540c;text-decoration:none;transition:background .15s,border-color .15s}
.portal-body.portal-rc2 .platform-home-action:hover{background:#f0f9fd;border-color:#89cfe2}
.portal-body.portal-rc2 .platform-home-action-icon{width:45px;height:45px;flex:0 0 45px;display:grid;place-items:center;color:#0888b5;border-radius:13px;background:#e7f6fc}
.portal-body.portal-rc2 .platform-home-action-icon .ui-outline{width:22px;height:22px}
.portal-body.portal-rc2 .platform-home-action-copy{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.portal-body.portal-rc2 .platform-home-action-copy strong{font-size:13px;font-weight:750;color:#1c354f}
.portal-body.portal-rc2 .platform-home-action-copy small{font-size:11px;color:#63788e;line-height:1.45}
.portal-body.portal-rc2 .platform-home-action-arrow{font-size:19px;color:#0e99be}
.portal-body.portal-rc2 .platform-home-status{margin-top:22px;display:grid;grid-template-columns:minmax(0,1.8fr) repeat(2,minmax(0,1fr));gap:20px;align-items:center;padding:20px 22px;border:1px solid #cfe2ed;background:linear-gradient(110deg,#e9f7fc,#f4fbff);border-radius:15px}
.portal-body.portal-rc2 .platform-home-status>div{display:flex;flex-direction:column;gap:6px;min-width:0;position:relative}
.portal-body.portal-rc2 .platform-home-status>div:first-child{padding-left:22px}
.portal-body.portal-rc2 .platform-home-live-dot{position:absolute;left:0;top:4px;width:11px;height:11px;border-radius:50%;background:#09b884;box-shadow:0 0 0 4px #09b88426}
.portal-body.portal-rc2 .platform-home-status strong{font-size:12px;color:#1b4154;overflow-wrap:anywhere}
.portal-body.portal-rc2 .platform-home-status small,.portal-body.portal-rc2 .platform-home-status-label{font-size:11px;color:#637f93;line-height:1.4}
.portal-body.portal-rc2 .platform-home-hint{font-size:12px;margin:13px 0;color:var(--muted)}
.portal-body.portal-rc2 .platform-home-hint a{color:#13a5c5}

/* Chat: niente più moduli browser impilati. Pannello, icone e azioni native Portale. */
.portal-body.portal-rc2 .chat-message-action-panel{
  box-sizing:border-box;width:305px;min-width:0;max-width:calc(100vw - 22px);padding:9px;
  border:1px solid #cee1ec;border-radius:17px;background:#fff;color:#19344a;
  box-shadow:0 20px 55px #071d3345,0 2px 8px #071d3316;
  font-family:inherit;font-size:13px;line-height:1.45;
}
.portal-body.portal-rc2 .chat-message-menu-heading{display:flex;align-items:center;gap:11px;padding:10px 10px 13px;border-bottom:1px solid #e3edf3;margin:0 0 7px}
.portal-body.portal-rc2 .chat-message-menu-emblem{flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:linear-gradient(130deg,#ddf7fd,#dceefe);display:grid;place-items:center;color:#0685b2}
.portal-body.portal-rc2 .chat-message-menu-emblem .ui-outline{width:18px;height:18px}
.portal-body.portal-rc2 .chat-message-menu-heading>span:last-child{display:flex;flex-direction:column;gap:2px}
.portal-body.portal-rc2 .chat-message-menu-heading strong{font-size:13px;font-weight:800;color:#203b52}
.portal-body.portal-rc2 .chat-message-menu-heading small{font-size:11px;color:#7c94a7}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-action{
  display:flex;align-items:center;justify-content:flex-start;gap:11px;width:100%;min-width:0;min-height:42px;
  border:0!important;border-radius:10px;margin:1px 0;padding:10px 11px;
  background:transparent!important;color:#25455e!important;box-shadow:none!important;
  font-size:12px;font-family:inherit;font-weight:650;letter-spacing:0;text-decoration:none;text-align:left;
  cursor:pointer;appearance:none;-webkit-appearance:none;white-space:normal;
}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-action .ui-outline{width:18px;height:18px;flex:none;color:#1686ae}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-action:hover,
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-action:focus-visible{background:#e7f6fd!important;color:#056e9a!important}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-action:focus-visible,
.portal-body.portal-rc2 .chat-message-action-panel :is(input,textarea,select,button,summary):focus-visible{outline:2px solid #1faad4;outline-offset:2px}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-form{margin:0}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-divided{border-top:1px solid #e0edf3;margin-top:9px;padding-top:8px}
.portal-body.portal-rc2 .chat-menu-reactions{margin:5px 0;padding:12px 10px;border-radius:12px;background:#f0f8fc}
.portal-body.portal-rc2 .chat-menu-section-title{font-size:10px;color:#5e7f97;font-weight:850;letter-spacing:.1em}
.portal-body.portal-rc2 .chat-reaction-form{display:flex;gap:9px;margin-top:10px}
.portal-body.portal-rc2 .chat-reaction-form button{appearance:none;display:grid;place-items:center;width:43px;height:36px;min-width:0;padding:0;border:1px solid #cfe2ed;background:#fff;color:inherit;border-radius:10px;font-size:18px;cursor:pointer;transition:transform .13s,border-color .13s}
.portal-body.portal-rc2 .chat-reaction-form button:hover{transform:translateY(-2px);border-color:#3da5c6;background:#e3f8ff}
.portal-body.portal-rc2 .chat-menu-editor{display:grid;gap:9px;margin:9px 0 4px;padding:11px;border-radius:12px;background:#f0f8fc;border:1px solid #dcebf4}
.portal-body.portal-rc2 .chat-menu-editor label{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0;color:#44657d;font-weight:750;font-size:11px;line-height:1.3}
.portal-body.portal-rc2 .chat-menu-editor :is(select,textarea){appearance:auto;width:100%;box-sizing:border-box;min-height:38px;border:1px solid #c6dce9;border-radius:9px;background:#fff;color:#23435b;font-family:inherit;font-size:12px;padding:8px 9px;resize:vertical}
.portal-body.portal-rc2 .chat-menu-editor textarea{min-height:75px}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-submit{
  min-height:39px;justify-content:center;margin:0;padding:9px 10px;border:1px solid #058bb9!important;
  background:linear-gradient(115deg,#037cb0,#06a8c6)!important;color:#fff!important;font-weight:770;
}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-submit .ui-outline{color:#fff}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-submit:hover{background:linear-gradient(115deg,#03638c,#058cac)!important;color:#fff!important}
.portal-body.portal-rc2 .chat-message-edit-disclosure{border:0;margin:0}
.portal-body.portal-rc2 .chat-message-edit-disclosure>summary{list-style:none}
.portal-body.portal-rc2 .chat-message-edit-disclosure>summary::-webkit-details-marker{display:none}
.portal-body.portal-rc2 .chat-message-edit-disclosure>summary::marker{content:""}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-danger{color:#ba3d50!important}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-danger .ui-outline{color:#ce4961!important}
.portal-body.portal-rc2 .chat-message-action-panel .chat-menu-danger:hover{color:#a72a40!important;background:#fff0f3!important}
/* Menu fixed via JS: non coprire il pulsante più importante nei contenitori stretti */
.portal-body.portal-rc2 .chat-message-menu>.chat-menu-trigger{width:30px;height:31px;border:1px solid transparent;border-radius:9px;opacity:.8;background:transparent;color:#66859d;transition:background .15s,color .15s}
.portal-body.portal-rc2 .chat-bubble:hover .chat-message-menu>.chat-menu-trigger,
.portal-body.portal-rc2 .chat-message-menu[open]>.chat-menu-trigger{background:#d7f0fb;color:#067faf;opacity:1}
.portal-body.portal-rc2 .chat-message-menu[open]>.chat-menu-trigger{border-color:#a4dce9}

/* Tema notte: stessi materiali della UI Hub, senza riquadri HTML bianchi. */
.portal-body.portal-rc2.hub-dark .platform-home-section-head h2{color:#e8f8ff}
.portal-body.portal-rc2.hub-dark .platform-home-section-label{color:#61d8ef}
.portal-body.portal-rc2.hub-dark .platform-home-stat,
.portal-body.portal-rc2.hub-dark .platform-home-action{background:#14344f;border-color:#315773;box-shadow:0 10px 29px #00000026}
.portal-body.portal-rc2.hub-dark .platform-home-stat:hover,
.portal-body.portal-rc2.hub-dark .platform-home-action:hover{background:#1b435f;border-color:#55b9d7}
.portal-body.portal-rc2.hub-dark .platform-home-stat-icon,
.portal-body.portal-rc2.hub-dark .platform-home-action-icon{background:#1b5273;color:#82eafb}
.portal-body.portal-rc2.hub-dark .platform-home-stat-number,
.portal-body.portal-rc2.hub-dark .platform-home-action-copy strong{color:#effaff}
.portal-body.portal-rc2.hub-dark .platform-home-stat-label,
.portal-body.portal-rc2.hub-dark .platform-home-action-copy small{color:#adc6d8}
.portal-body.portal-rc2.hub-dark .platform-home-stat-link,
.portal-body.portal-rc2.hub-dark .platform-home-action-arrow{color:#78deef}
.portal-body.portal-rc2.hub-dark .platform-home-status{background:#14344f;border-color:#315773}
.portal-body.portal-rc2.hub-dark .platform-home-status strong{color:#eaf8ff}
.portal-body.portal-rc2.hub-dark .platform-home-status small,
.portal-body.portal-rc2.hub-dark .platform-home-status-label{color:#acc8d7}
.portal-body.portal-rc2.hub-dark .chat-message-action-panel{background:#14324b;color:#e3f4ff;border-color:#35617c;box-shadow:0 20px 58px #020e1acc,0 0 0 1px #6bcde01c}
.portal-body.portal-rc2.hub-dark .chat-message-menu-heading{border-bottom-color:#31546b}
.portal-body.portal-rc2.hub-dark .chat-message-menu-emblem{background:#204e6c;color:#8beeff}
.portal-body.portal-rc2.hub-dark .chat-message-menu-heading strong{color:#eaf9ff}
.portal-body.portal-rc2.hub-dark .chat-message-menu-heading small{color:#aac4d7}
.portal-body.portal-rc2.hub-dark .chat-message-action-panel .chat-menu-action{color:#d9ecfa!important}
.portal-body.portal-rc2.hub-dark .chat-message-action-panel .chat-menu-action .ui-outline{color:#7fd9ef}
.portal-body.portal-rc2.hub-dark .chat-message-action-panel .chat-menu-action:hover,
.portal-body.portal-rc2.hub-dark .chat-message-action-panel .chat-menu-action:focus-visible{background:#205376!important;color:#f2fdff!important}
.portal-body.portal-rc2.hub-dark .chat-menu-reactions,
.portal-body.portal-rc2.hub-dark .chat-menu-editor{background:#1a405a;border-color:#39637d}
.portal-body.portal-rc2.hub-dark .chat-menu-section-title,
.portal-body.portal-rc2.hub-dark .chat-menu-editor label{color:#b9d3e5}
.portal-body.portal-rc2.hub-dark .chat-reaction-form button{background:#214b65;border-color:#3b6b86}
.portal-body.portal-rc2.hub-dark .chat-reaction-form button:hover{background:#236286;border-color:#58bedc}
.portal-body.portal-rc2.hub-dark .chat-menu-editor :is(select,textarea){background:#102d44;color:#effaff;border-color:#426d86}
.portal-body.portal-rc2.hub-dark .chat-message-action-panel .chat-menu-divided{border-color:#38627a}
.portal-body.portal-rc2.hub-dark .chat-message-action-panel .chat-menu-danger{color:#ffadb6!important}
.portal-body.portal-rc2.hub-dark .chat-message-action-panel .chat-menu-danger .ui-outline{color:#ff929d!important}
.portal-body.portal-rc2.hub-dark .chat-message-action-panel .chat-menu-danger:hover{background:#6e293f!important;color:#ffe0e5!important}
.portal-body.portal-rc2.hub-dark .chat-message-menu[open]>.chat-menu-trigger{background:#295c7b;color:#9ceefc;border-color:#4e91ae}
@media(max-width:1000px){
 .portal-body.portal-rc2 .platform-home-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .portal-body.portal-rc2 .platform-home-stat{min-height:155px}
}
@media(max-width:720px){
 .portal-body.portal-rc2 .platform-home-hero{grid-template-columns:1fr;padding:25px 20px;gap:8px;border-radius:17px}
 .portal-body.portal-rc2 .platform-home-hero-visual{height:105px;opacity:.65;justify-self:end;width:140px;margin:-8px 8px -23px 0}
 .portal-body.portal-rc2 .platform-home-orbit-outer{width:122px;height:122px}
 .portal-body.portal-rc2 .platform-home-orbit-inner{width:90px;height:90px}
 .portal-body.portal-rc2 .platform-home-symbol{width:59px;height:59px;font-size:38px;border-radius:17px}
 .portal-body.portal-rc2 .platform-home-grid{grid-template-columns:1fr}
 .portal-body.portal-rc2 .platform-home-status{grid-template-columns:1fr;gap:15px}
 .portal-body.portal-rc2 .platform-home-section-head{margin-top:22px}
 .portal-body.portal-rc2 .chat-message-action-panel{width:min(305px,calc(100vw - 22px));max-height:calc(100dvh - 24px);overflow:auto}
}
@media(max-width:380px){
 .portal-body.portal-rc2 .platform-home-stats{gap:9px}
 .portal-body.portal-rc2 .platform-home-stat{padding:15px}
 .portal-body.portal-rc2 .platform-home-stat-number{font-size:27px}
}


/* R2.7 — fotografia originale ufficio nel login; form e pulsanti restano HTML reali. */
.auth-body{background:radial-gradient(ellipse at 77% 55%,#173c5d 0,#071627 65%);isolation:isolate}
.auth-body::before{content:"";position:fixed;inset:0 auto 0 0;width:70%;height:100%;z-index:0;
  background-image:linear-gradient(90deg,rgba(4,17,32,.84) 0%,rgba(5,21,36,.59) 51%,#071626f2 100%),url('/static/login-office.webp');
  background-repeat:no-repeat;background-size:cover;background-position:center center;opacity:1;pointer-events:none}
.auth-body .auth-top,.auth-body .auth-shell{position:relative;z-index:1}
.auth-body .auth-card{box-shadow:0 25px 90px #0008,0 0 0 1px #8be9ff16}
.auth-body .auth-pitch{position:relative;text-shadow:0 2px 18px #05112160}
.auth-body .auth-pitch h1 em{color:#54e9ff}
.auth-body .auth-pitch .auth-kicker{display:inline-flex;padding:8px 11px;border:1px solid #73e6fc69;border-radius:999px;background:#072d435e;letter-spacing:.17em}
/* Conservare l'icona storica del sito e la palette precedente soltanto in Giorno. */
.portal-body.portal-rc2.hub-light{--navy:#132033;--navy-2:#182941;--blue:#1677e8;--blue-2:#0e68d8;--bg:#f4f7fb;--panel:#fff;--ink:#101a2e;--line:#e4e9f1}
.portal-body.portal-rc2.hub-light .hub-mark-modern{display:none}
.portal-body.portal-rc2.hub-light .hub-mark-legacy{display:inline-flex}
.portal-body.portal-rc2.hub-dark .hub-mark-legacy,.auth-body .hub-mark-legacy{display:none}
.portal-body.portal-rc2.hub-dark .hub-mark-modern,.auth-body .hub-mark-modern{display:inline-flex}
.hub-mark-legacy .portal-logo{width:44px;height:44px;flex:0 0 44px}
.hub-mark-legacy .portal-logo i{box-shadow:0 2px 5px #06182930}
/* Vecchie schermate interne con simboli emoji: stessi componenti vettoriali del menu. */
.portal-body.portal-rc2 .empty-icon .ui-outline{height:29px;width:29px}
/* Navigazione coerente da ogni sotto-pagina Impostazioni. */
.portal-body.portal-rc2 .settings-return{display:flex;align-items:center;margin:0 0 13px}
.portal-body.portal-rc2 .settings-return-link{display:inline-flex;align-items:center;gap:9px;min-height:39px;
  font-size:12px;font-weight:750;text-decoration:none;color:#1265a1;background:#e9f4ff;
  border:1px solid #c8dfec;border-radius:10px;padding:9px 13px}
.portal-body.portal-rc2 .settings-return-link .ui-outline{width:16px;height:16px}
.portal-body.portal-rc2 .settings-return-link:hover{background:#dceefb;border-color:#5bb0d2}
.portal-body.portal-rc2.hub-dark .settings-return-link{color:#a1e8f9;background:#153955;border-color:#3c708e}
.portal-body.portal-rc2.hub-dark .settings-return-link:hover{background:#1d506e;border-color:#69c5dd}
.portal-body.portal-rc2 .settings-return-link:focus-visible{outline:2px solid #30aad1;outline-offset:3px}
@media(max-width:880px){.auth-body::before{width:100%;height:58vh;background-position:center 41%;
  background-image:linear-gradient(180deg,rgba(2,15,29,.83),rgba(2,16,32,.77) 70%,#071627),url('/static/login-office.webp')}}
@media(max-width:500px){.auth-body::before{height:420px}.auth-body .auth-pitch h1{font-size:31px}}

/* R2.8 — Il simbolo originale a tre livelli non cambia più geometria tra i temi.
   Solo colore, contrasto e presentazione si adattano al tema. */
.portal-body.portal-rc2 .hub-mark-unified,.auth-body .hub-mark-unified{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.portal-body.portal-rc2.hub-light .hub-mark-unified .portal-logo i:nth-child(1){background:#1677e8}
.portal-body.portal-rc2.hub-light .hub-mark-unified .portal-logo i:nth-child(2){background:#ee5370}
.portal-body.portal-rc2.hub-light .hub-mark-unified .portal-logo i:nth-child(3){background:#f0b42f}
.portal-body.portal-rc2.hub-dark .hub-mark-unified .portal-logo i:nth-child(1),.auth-body .hub-mark-unified .portal-logo i:nth-child(1){background:#83eff9}
.portal-body.portal-rc2.hub-dark .hub-mark-unified .portal-logo i:nth-child(2),.auth-body .hub-mark-unified .portal-logo i:nth-child(2){background:#2abbdc}
.portal-body.portal-rc2.hub-dark .hub-mark-unified .portal-logo i:nth-child(3),.auth-body .hub-mark-unified .portal-logo i:nth-child(3){background:#1783d1}
/* Home Giorno: fondo chiaro dedicato, testo scuro leggibile e contrasto verificabile. */
.portal-body.portal-rc2.hub-light .platform-home-hero{
  background:linear-gradient(122deg,#ecf7ff 0%,#deeffc 60%,#c7e7fb 100%);
  color:#102b48;border-color:#9ac9e8;box-shadow:0 12px 32px #174d751c;
}
.portal-body.portal-rc2.hub-light .platform-home-hero:before{
  background:radial-gradient(circle at 92% 10%,#a8e5ff79,transparent 49%),radial-gradient(circle at 2% 90%,#ffffff8c,transparent 50%);
}
.portal-body.portal-rc2.hub-light .platform-home-hero h1{color:#102b48!important;text-shadow:none}
.portal-body.portal-rc2.hub-light .platform-home-hero p{color:#36566f!important}
.portal-body.portal-rc2.hub-light .platform-home-kicker{color:#11668c!important}
.portal-body.portal-rc2.hub-light .platform-home-kicker span{color:#5a7f93}
.portal-body.portal-rc2.hub-light .platform-home-primary{color:#fff!important;background:#106aaa;border-color:#106aaa}
.portal-body.portal-rc2.hub-light .platform-home-primary:hover{background:#075588}
.portal-body.portal-rc2.hub-light .platform-home-secondary{color:#10507c!important;background:#fff;border-color:#9ebed6}
.portal-body.portal-rc2.hub-light .platform-home-secondary:hover{background:#eaf9ff}
.portal-body.portal-rc2.hub-light .platform-home-orbit{border-color:#3080ab80}
.portal-body.portal-rc2.hub-light .platform-home-symbol{background:linear-gradient(145deg,#e2f6ff,#bfdfff);border-color:#85bdd8;box-shadow:0 14px 35px #235a7a25}
/* Stesso logo fisico al centro dell'animazione; la variante colore dipende dal tema. */
.portal-body.portal-rc2 .platform-home-symbol{transform:none!important;overflow:visible}
.portal-body.portal-rc2 .hub-home-brand{display:grid;place-items:center;width:100%;height:100%}
.portal-body.portal-rc2 .hub-home-brand .portal-logo{transform:scale(1.58);transform-origin:center}
.portal-body.portal-rc2.hub-light .hub-home-brand .portal-logo i:nth-child(1){background:#1677e8}
.portal-body.portal-rc2.hub-light .hub-home-brand .portal-logo i:nth-child(2){background:#ee5370}
.portal-body.portal-rc2.hub-light .hub-home-brand .portal-logo i:nth-child(3){background:#f0b42f}
.portal-body.portal-rc2.hub-dark .hub-home-brand .portal-logo i:nth-child(1){background:#83eff9}
.portal-body.portal-rc2.hub-dark .hub-home-brand .portal-logo i:nth-child(2){background:#2abbdc}
.portal-body.portal-rc2.hub-dark .hub-home-brand .portal-logo i:nth-child(3){background:#1783d1}
@keyframes hub-brand-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes hub-orbit-spin{to{transform:rotate(360deg)}}
.portal-body.portal-rc2 .platform-home-symbol{animation:hub-brand-float 6s ease-in-out infinite}
.portal-body.portal-rc2 .platform-home-orbit-inner{animation:hub-orbit-spin 24s linear infinite}
@media(prefers-reduced-motion:reduce){
  .portal-body.portal-rc2 .platform-home-symbol,.portal-body.portal-rc2 .platform-home-orbit-inner{animation:none!important}
}

/* R2.8 — anteprima testuale di un modulo firmato, senza runtime esterno */
.portal-body.portal-rc2 .module-demo-panel{max-width:820px}
.portal-body.portal-rc2 .module-demo-text{white-space:pre-wrap;overflow-wrap:anywhere;padding:20px;border-radius:12px;background:#eaf4ff;color:#193e60;border:1px solid #bcdae9;font-size:14px;line-height:1.7;font-family:inherit}
.portal-body.portal-rc2.hub-dark .module-demo-text{background:#123c57;color:#e7f7ff;border-color:#286d8a}

/* R2.9 — Gestore Moduli: contrasto/accessibilità in Giorno e Notte */
.module-manager-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:16px;margin:18px 0}
.module-manager-grid form{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin:12px 0}
.module-manager-grid input[type=file]{max-width:100%;padding:12px;border:1px solid var(--border-color,#788ea7);border-radius:12px;background:var(--card-bg,transparent);color:inherit}
.module-manager-warning{border-left:4px solid #0daacb}
.module-manager-release{margin:18px 0}
.module-manager-version-list{display:grid;gap:10px}
.module-manager-version{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:10px 14px;border:1px solid rgba(115,150,178,.3);border-radius:12px}
.module-manager-confirm{border:2px solid #0daacb;margin:18px 0}
.module-manager-confirm form{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.module-manager-shortcut button{max-width:100%;white-space:normal}

/* R2.10: selettore azienda nella barra comune */
.company-jump{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid var(--stroke,#567);border-radius:12px;padding:8px 10px;font-size:12px;font-weight:700;color:var(--ink,#235);text-decoration:none;background:var(--card,transparent)}
.company-jump:hover,.company-jump:focus-visible{outline:2px solid #2b9ff6;outline-offset:2px}
@media(max-width:650px){.company-jump{padding:6px;font-size:11px}}

/* R2.11: pagina Gestionali separata dal Gestore Moduli / Impostazioni */
.gestionali-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:16px;margin:14px 0 24px}
.gestionali-section-title{font-size:1.18rem;margin:24px 0 10px;color:var(--ink)}
.gestionali-card{display:flex;align-items:flex-start;gap:16px;padding:22px;min-height:168px;background:var(--panel,#fff);border:1px solid var(--line);border-radius:18px;box-shadow:0 6px 20px rgba(7,26,52,.055)}
.gestionali-card-icon{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border-radius:14px;background:var(--blue-soft,#dfeeff);color:var(--blue,#1378e8)}
.gestionali-card-icon svg{width:25px;height:25px}
.gestionali-card h3{font-size:1.05rem;margin:3px 0 7px;color:var(--ink)}
.gestionali-card p{margin:0 0 16px;color:var(--muted);font-size:.9rem;line-height:1.5}
.gestionali-open{display:inline-flex;align-items:center;gap:6px;color:var(--blue);font-weight:750;text-decoration:none}
.gestionali-open:hover{text-decoration:underline}
.gestionali-chip{display:inline-flex;font-size:.76rem;font-weight:650;border-radius:999px;padding:6px 9px;background:var(--blue-soft,#dfeeff);color:var(--ink)}
.gestionali-kicker{font-size:.74rem;letter-spacing:.1em;font-weight:850;color:var(--blue)}
.gestionali-intro h2{margin:8px 0}.gestionali-intro .button-outline svg{width:17px;height:17px;vertical-align:middle}
.gestionali-future{margin-top:26px}
@media(max-width:640px){.gestionali-grid{grid-template-columns:1fr}.gestionali-card{padding:17px;min-height:0}}

/* R2.14 — chat context: overlay removed from the scroll container on opening. */
.portal-body.portal-rc2 .chat-menu-panel[data-chat-overlay="1"]{
  position:fixed!important;top:0!important;left:0!important;bottom:auto!important;right:auto!important;
  z-index:2147483000!important;width:min(320px,calc(100vw - 24px));
  max-height:calc(100vh - 28px); /* Safari precedente a 100dvh */
  max-height:calc(100dvh - 28px);
  overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  box-shadow:0 18px 52px #0d23475a;
}
.portal-body.portal-rc2 .platform-home-orbit-outer{
  animation:hub-orbit-gentle 18s ease-in-out infinite;
}
.portal-body.portal-rc2 .platform-home-symbol{animation:hub-brand-float 4.5s ease-in-out infinite!important;will-change:transform}
@keyframes hub-orbit-gentle{0%,100%{opacity:.55;transform:scale(1)}50%{opacity:1;transform:scale(1.07)}}
@media(prefers-reduced-motion:reduce){
 .portal-body.portal-rc2 .platform-home-orbit-outer,
 .portal-body.portal-rc2 .platform-home-symbol{animation:none!important;will-change:auto}
}

/* R2.14 — due tendine autonome, layout per Safari iPad. */
.portal-rc2 .chat-rooms{overflow-y:auto;overflow-x:hidden}
.portal-rc2 .chat-nav-fold{border:1px solid #dfe8f3;border-radius:12px;margin:0 9px 10px;background:#f9fbfe;flex:0 0 auto;min-height:0}
.portal-rc2 .chat-nav-fold>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px;cursor:pointer;font-size:14px;font-weight:750;list-style:none;color:#284767}
.portal-rc2 .chat-nav-fold>summary::before{content:'›';font-size:20px;line-height:1;color:#6483a0;transition:transform .15s}
.portal-rc2 .chat-nav-fold[open]>summary::before{transform:rotate(90deg)}
.portal-rc2 .chat-nav-fold>summary::-webkit-details-marker{display:none}
.portal-rc2 .chat-nav-fold .chat-room-list,.portal-rc2 .chat-nav-fold .chat-contact-list{max-height:275px;overflow-y:auto;overflow-x:hidden}
.portal-rc2 .chat-nav-fold .chat-section-caption{padding:5px 13px;color:#637b91;font-size:11px}
.portal-rc2 .chat-nav-fold .chat-folder-toggle{padding:0 13px 10px}
.portal-rc2 .chat-nav-fold .chat-rooms-filter{padding:1px 10px 10px}
.portal-body.portal-rc2.hub-dark .chat-nav-fold{background:#15344e;border-color:#345d78}
.portal-body.portal-rc2.hub-dark .chat-nav-fold>summary{color:#e4f5ff}
@media(max-width:720px){.portal-rc2 .chat-nav-fold .chat-room-list,.portal-rc2 .chat-nav-fold .chat-contact-list{max-height:220px}}


/* R2.14 — richiesta di contatto: accessibilità iPad / touch */
.portal-rc2 .chat-contact-result{display:flex;flex-wrap:wrap;align-items:center;gap:10px;min-width:0;padding:14px 0;border-bottom:1px solid var(--line,#d9e5ef)}
.portal-rc2 .chat-contact-result:last-child{border-bottom:0}
.portal-rc2 .chat-contact-result>strong{font-size:.94rem;overflow-wrap:anywhere}
.portal-rc2 .chat-contact-result>small{font-size:.82rem;color:var(--muted,#687b91)}
.portal-rc2 .chat-contact-result form{display:inline-flex;flex-wrap:wrap;gap:8px;margin:0}
.portal-rc2 .chat-contact-result button{min-height:42px;min-width:80px}
@media(max-width:720px){.portal-rc2 .chat-contact-result form{width:100%}.portal-rc2 .chat-contact-result form button{flex:1;max-width:100%}}

/* R2.15 LOG-01: filtraggio leggibile anche su iPad, nessuna tabella oltre viewport. */
.audit-filter-form .form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px;align-items:end }
.audit-filter-form .field input,.audit-filter-form .field select { width:100%; min-width:0 }
.audit-filter-form .button,.audit-filter-form .button-outline {margin-top:12px}
@media(max-width:700px){.audit-filter-form .form-grid{grid-template-columns:1fr}.audit-filter-form .button{width:100%}}

/* R2.17: one chat scroller, no chat/directory foldouts. */
.portal-rc2 .chat-r217 .chat-rooms{display:flex;flex-direction:column;max-height:calc(100vh - 170px);min-height:0;overflow:hidden}
.portal-rc2 .chat-r217 .chat-room-list{flex:1 1 auto;max-height:none;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.portal-rc2 .chat-r217 .chat-sidebar-actions{padding:10px;border-top:1px solid #dae4ee;flex:0 0 auto}
.portal-rc2 .chat-r217 .chat-sidebar-actions a{display:block;text-align:center}
@media(max-width:720px){.portal-rc2 .chat-r217 .chat-rooms{min-height:240px;max-height:43vh}.portal-rc2 .chat-r217 .chat-room-list{max-height:none}}

/* R2.17 CHAT-02/03: important messages with manual acknowledgement and safe previews. */
.chat-important-label{margin:.4rem 0;font-weight:700;color:var(--text-primary,#714815)}
.chat-important-status,.chat-important-acknowledged{display:block;margin:.3rem 0;font-size:.81rem}
.chat-important-ack{margin:.3rem 0}
.chat-important-toggle{display:inline-flex;align-items:center;gap:.25rem;white-space:nowrap;font-size:.83rem;cursor:pointer}
.chat-image-preview{display:inline-block;max-width:100%;margin:.3rem 0}
.chat-image-preview img{display:block;max-width:min(250px,100%);max-height:220px;object-fit:contain;border-radius:.65rem}
.chat-pdf-preview{display:inline-block;margin:.25rem 0}

.chat-mentions-hint{font-weight:700;font-size:1rem;color:inherit;opacity:.7;align-self:center}

/* R2.17 CHAT-05 - ricerca & notifiche: nessuna fisarmonica aggiuntiva. */
.portal-rc2 .chat-tools{display:flex;justify-content:space-between;gap:7px;padding:0 14px 12px;font-size:12px}
.portal-rc2 .chat-tools a{color:#1376ac;text-decoration:underline;text-underline-offset:2px}
.portal-rc2 .chat-search-advanced{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;align-items:end}
.portal-rc2 .chat-search-advanced>label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600}
.portal-rc2 .chat-search-advanced input,.portal-rc2 .chat-search-advanced select{width:100%;min-width:0}
.portal-rc2 .chat-search-advanced .chat-search-check{flex-direction:row;align-items:center;gap:8px}
.portal-rc2 .chat-search-advanced .chat-search-check input{width:auto}
.portal-rc2 .chat-search-result{display:flex;flex-direction:column;gap:4px;padding:14px 8px;border-bottom:1px solid #d6e7ef;text-decoration:none;overflow-wrap:anywhere}
.portal-rc2 .chat-search-result time{font-size:11px;color:#6b8391}
.portal-rc2 .chat-search-result span{font-size:13px;color:inherit}
.portal-rc2 .chat-notification-choice{display:flex;align-items:center;gap:10px;padding:10px;border-bottom:1px solid #d6e7ef}
.portal-rc2 .chat-notification-choice input{flex:0 0 auto}
.portal-rc2 .chat-notification-rooms{display:grid;gap:8px}
.portal-rc2 .chat-notification-rooms a{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:36px}
.portal-rc2 .chat-notification-rooms small{color:#708390}
.portal-rc2 .chat-bubble:target{outline:3px solid #2d8ac4;outline-offset:4px;scroll-margin-top:20px}

/* R2.17: riepilogo personale e centro notifiche. */
.activity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
.activity-stat{display:flex;flex-direction:column;gap:8px;text-decoration:none;color:inherit;min-width:0}
.activity-stat strong{font-size:2rem;line-height:1.2}
.activity-entry{margin-block:14px;overflow-wrap:anywhere}
.activity-entry h2{font-size:1.1rem}
.activity-entry p{white-space:pre-wrap}
.activity-pages{display:flex;gap:12px;flex-wrap:wrap;margin-block:20px}
@media(max-width:540px){.activity-grid{grid-template-columns:1fr}.activity-entry form{display:flex;gap:10px;flex-wrap:wrap}}
/* CP5: segnalibri personali e menzioni, con scorrimento locale. */
.chat-pinned-messages{padding:10px 16px;border-bottom:1px solid #64748b55;max-height:170px;overflow:auto}
.chat-pinned-messages ul{list-style:none;padding:0;margin:6px 0}
.chat-pinned-messages li{display:flex;align-items:center;gap:10px;justify-content:space-between;margin:5px 0}
.chat-pinned-messages a{overflow-wrap:anywhere;min-width:0}
.chat-mention-options:not([hidden]){display:flex;flex-direction:column;position:absolute;bottom:100%;left:12px;right:12px;z-index:80;max-height:220px;overflow:auto;background:#fff;color:#152238;border:1px solid #64748b;border-radius:10px;box-shadow:0 8px 24px #0003}
.chat-mention-options button{background:transparent;color:inherit;text-align:left;padding:12px;border:0;cursor:pointer}
.chat-mention-options button[aria-selected="true"]{background:#dbeafe;color:#102c4b}

/* RC1: keyboard focus and important labels remain visible in both themes. */
.portal-body.portal-rc2.hub-dark .chat-important-label{color:#ffe2a8}
.portal-body.portal-rc2.hub-dark .chat-tools a{color:#92d8ff}
.portal-body.portal-rc2.hub-dark .chat-search-result time,
.portal-body.portal-rc2.hub-dark .chat-notification-rooms small{color:#bbd0df}
.portal-body :is(a,button,input,textarea,select,summary):focus-visible{outline:3px solid #1674ac;outline-offset:3px}
.portal-body.hub-dark :is(a,button,input,textarea,select,summary):focus-visible{outline-color:#92d8ff}
.chat-compose-box{position:relative}

/* PWA: il pulsante compare solo quando il browser offre installazione. */
#pwa-install-button[hidden]{display:none!important}

/* K59-UI01C-R1 NAV UNIFORME GIORNO NOTTE */



/* K59-UI04 LOGO ANIMAZIONE RAFFINATA */

/*
   Nessuna variazione di larghezza, altezza, padding,
   font-size o trasformazioni geometriche del simbolo.
*/

.portal-body.portal-rc2 .side-brand .hub-mark-unified {
    transition: filter .28s ease;
}

.portal-body.portal-rc2 .side-brand strong {
    transition: color .3s ease, text-shadow .3s ease;
}

.portal-body.portal-rc2 .side-brand .portal-logo i {
    will-change: opacity, filter;
}

/* Identità cromatica del tema Giorno. */
.portal-body.portal-rc2.hub-light
.side-brand .hub-mark-unified {
    animation: k59-logo-blue .68s ease-out both;
}

/* Identità cromatica del tema Notte. */
.portal-body.portal-rc2.hub-dark
.side-brand .hub-mark-unified {
    animation: k59-logo-cyan .68s ease-out both;
}

/* Le tre barre si accendono in sequenza. */
.portal-body.portal-rc2.hub-light
.side-brand .portal-logo i {
    animation: k59-bar-blue .62s ease-out both;
}

.portal-body.portal-rc2.hub-dark
.side-brand .portal-logo i {
    animation: k59-bar-cyan .62s ease-out both;
}

.portal-body.portal-rc2 .side-brand
.portal-logo i:nth-child(1) {
    animation-delay: .03s;
}

.portal-body.portal-rc2 .side-brand
.portal-logo i:nth-child(2) {
    animation-delay: .11s;
}

.portal-body.portal-rc2 .side-brand
.portal-logo i:nth-child(3) {
    animation-delay: .19s;
}

/* Bagliore discreto al passaggio del mouse. */
.portal-body.portal-rc2.hub-light
.side-brand:hover .hub-mark-unified,
.portal-body.portal-rc2.hub-light
.side-brand:focus-visible .hub-mark-unified {
    filter: drop-shadow(0 0 5px rgba(35,130,215,.42));
}

.portal-body.portal-rc2.hub-dark
.side-brand:hover .hub-mark-unified,
.portal-body.portal-rc2.hub-dark
.side-brand:focus-visible .hub-mark-unified {
    filter: drop-shadow(0 0 7px rgba(45,210,240,.52));
}

@keyframes k59-logo-blue {
    0% {
        opacity: .88;
        filter: drop-shadow(0 0 9px rgba(30,125,230,.45));
    }
    65% {
        opacity: 1;
        filter: drop-shadow(0 0 5px rgba(30,125,230,.28));
    }
    100% {
        opacity: 1;
        filter: none;
    }
}

@keyframes k59-logo-cyan {
    0% {
        opacity: .88;
        filter: drop-shadow(0 0 11px rgba(40,220,245,.60));
    }
    65% {
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(40,220,245,.32));
    }
    100% {
        opacity: 1;
        filter: none;
    }
}

@keyframes k59-bar-blue {
    0% {
        opacity: .70;
        filter: brightness(.88);
    }
    45% {
        opacity: 1;
        filter: brightness(1.35);
    }
    100% {
        opacity: 1;
        filter: none;
    }
}

@keyframes k59-bar-cyan {
    0% {
        opacity: .70;
        filter: brightness(.90);
    }
    45% {
        opacity: 1;
        filter: brightness(1.45);
    }
    100% {
        opacity: 1;
        filter: none;
    }
}

/* Accessibilità: rispetta la riduzione del movimento. */
@media (prefers-reduced-motion: reduce) {
    .portal-body.portal-rc2
    .side-brand .hub-mark-unified,
    .portal-body.portal-rc2
    .side-brand .portal-logo i {
        animation: none !important;
        transition: none !important;
        filter: none !important;
        will-change: auto;
    }

    .portal-body.portal-rc2 .side-brand strong {
        transition: none !important;
    }
}


/* K59-UI06B DESKTOP ADATTIVO START */

/*
 * Solo desktop con puntatore preciso.
 * Tablet touch e smartphone conservano il loro layout.
 * Non viene applicato alcuno zoom globale.
 */

@media screen and (min-width:1101px)
       and (hover:hover) and (pointer:fine) {

  :root {
    --sidebar:clamp(208px,15vw,242px);
    --topbar:56px;
  }

  .portal-body.portal-rc2 {
    font-size:14px;
  }

  /* Navigazione laterale compatta */
  .portal-body.portal-rc2 .side-brand {
    height:64px;
    flex:0 0 64px;
    padding:10px 15px;
  }

  .portal-body.portal-rc2.hub-light .side-brand strong,
  .portal-body.portal-rc2.hub-dark .side-brand strong {
    font-size:18px;
    line-height:1.06;
  }

  .portal-body.portal-rc2 .side-nav {
    padding:7px 8px;
    gap:3px;
  }

  .portal-body.portal-rc2 .side-nav .side-link {
    min-height:36px;
    height:auto;
    padding:6px 10px;
    gap:10px;
    font-size:13px;
    line-height:1.3;
  }

  .portal-body.portal-rc2 .side-nav .side-ico {
    width:20px;
    height:20px;
    flex:0 0 20px;
  }

  .portal-body.portal-rc2 .side-nav .side-ico svg {
    width:18px;
    height:18px;
  }

  .portal-body.portal-rc2 .side-user {
    padding:9px 12px;
  }

  /* Barra superiore */
  .portal-body.portal-rc2 .main-topbar {
    height:56px;
    min-height:56px;
    padding:0 16px;
    gap:12px;
  }

  .portal-body.portal-rc2 .top-search-wrap {
    height:36px;
    max-width:460px;
  }

  /* Area di lavoro più ampia */
  .portal-body.portal-rc2.hub-light .content-shell,
  .portal-body.portal-rc2.hub-dark .content-shell {
    width:100%;
    max-width:2100px;
    margin-inline:auto;
    padding:13px 18px 25px;
    font-size:14px;
  }

  /* Intestazioni compatte, uguali nei due temi */
  .portal-body.portal-rc2.hub-light
  .content-shell :is(.hero,.hero.small,.welcome-panel,.banner),
  .portal-body.portal-rc2.hub-dark
  .content-shell :is(.hero,.hero.small,.welcome-panel,.banner) {
    padding:13px 16px;
    margin-bottom:12px;
  }

  .portal-body.portal-rc2.hub-light
  .content-shell :is(.hero h1,.welcome-panel h1),
  .portal-body.portal-rc2.hub-dark
  .content-shell :is(.hero h1,.welcome-panel h1) {
    font-size:20px;
    line-height:1.2;
  }

  /* Card e sezioni */
  .portal-body.portal-rc2.hub-light .content-shell .card,
  .portal-body.portal-rc2.hub-dark .content-shell .card {
    padding:13px;
  }

  .portal-body.portal-rc2 .content-shell .app-card {
    min-height:190px;
    padding:13px;
  }

  .portal-body.portal-rc2 .content-shell .app-icon {
    width:46px;
    height:46px;
  }

  .portal-body.portal-rc2 .content-shell .app-grid {
    gap:12px;
  }

  /* Pulsanti di azione */
  .portal-body.portal-rc2
  .content-shell :is(.button,.button-outline,.button-quiet) {
    min-height:36px;
    padding:7px 11px;
    font-size:13px;
    line-height:1.3;
  }

  /* Moduli */
  .portal-body.portal-rc2 .content-shell
  :is(input,select,textarea):not([type=checkbox])
  :not([type=radio]):not([type=hidden])
  :not([type=file]):not([type=range]) {
    min-height:36px;
    font-size:13px;
    padding:7px 10px;
  }

  /* Tabelle, senza eliminare lo scorrimento orizzontale */
  .portal-body.portal-rc2 .content-shell
  :is(th,td) {
    padding:8px 10px;
    font-size:13px;
  }

  /* Griglia dei gestionali */
  .portal-body.portal-rc2 .gestionali-grid {
    grid-template-columns:
      repeat(auto-fit,minmax(min(100%,255px),1fr));
    gap:12px;
  }

  /* Evita sovrapposizioni */
  .portal-body.portal-rc2
  :is(.main-column,.content-shell,.app-card,.card) {
    min-width:0;
  }
}

/* Full HD e monitor più grandi: più contenuti per riga */
@media screen and (min-width:1600px)
       and (hover:hover) and (pointer:fine) {

  .portal-body.portal-rc2 .content-shell .app-grid {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .portal-body.portal-rc2 .content-shell .admin-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Monitor molto ampi: non ingrandire inutilmente le card */
@media screen and (min-width:2100px)
       and (hover:hover) and (pointer:fine) {

  .portal-body.portal-rc2 .content-shell .app-grid {
    grid-template-columns:repeat(5,minmax(0,1fr));
  }
}

/* K59-UI06B DESKTOP ADATTIVO END */


/* K59-UI07B CHECKBOX UNIFORMI START */

/*
 * I checkbox non devono ereditare il padding
 * previsto per i campi di testo.
 */
.portal-body.portal-rc2
.content-shell input[type="checkbox"] {
    padding:0 !important;
    box-shadow:none;
    accent-color:#1976d2;
}

/*
 * Checkbox della dichiarazione Termini e
 * Condizioni: dimensioni fisse nei due temi.
 * Il testo e l'intera label rimangono cliccabili.
 */
.portal-body.portal-rc2
.content-shell label.pill input[type="checkbox"] {
    -webkit-appearance:checkbox;
    appearance:auto;
    display:inline-block;
    box-sizing:border-box;
    flex:0 0 18px;
    width:18px !important;
    min-width:18px !important;
    max-width:18px !important;
    height:18px !important;
    min-height:18px !important;
    max-height:18px !important;
    padding:0 !important;
    margin:0 8px 0 0;
    vertical-align:middle;
    border-radius:4px;
    background:transparent !important;
    box-shadow:none !important;
}

/* Tema Giorno */
.portal-body.portal-rc2.hub-light
.content-shell label.pill input[type="checkbox"] {
    color-scheme:light;
    accent-color:#1976d2;
    border-color:#6087a9;
}

/* Tema Notte: checkbox visibile anche da deselezionato */
.portal-body.portal-rc2.hub-dark
.content-shell label.pill input[type="checkbox"] {
    color-scheme:dark;
    accent-color:#31cce5;
    border-color:#8cbad0;
}

/*
 * Il focus da tastiera rimane visibile.
 * Il suo riquadro segue il checkbox da 18px,
 * non un campo di testo ingrandito.
 */
.portal-body.portal-rc2.hub-light
.content-shell label.pill input[type="checkbox"]:focus-visible {
    outline:2px solid #1976d2;
    outline-offset:2px;
}

.portal-body.portal-rc2.hub-dark
.content-shell label.pill input[type="checkbox"]:focus-visible {
    outline:2px solid #81def3;
    outline-offset:2px;
}

/* K59-UI07B CHECKBOX UNIFORMI END */


/* K59-CHAT01C RESTYLING E SPUNTE START */

.portal-body.portal-rc2 .chat-shell .chat-folder-toggle {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px;
    margin:5px 13px 10px;
    padding:4px;
    border:1px solid #dbe5f1;
    border-radius:12px;
    background:#edf3fa;
    box-sizing:border-box;
}

.portal-body.portal-rc2 .chat-shell
.chat-folder-toggle .chat-folder-tab {
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:36px;
    padding:7px 8px;
    border:1px solid transparent;
    border-radius:9px;
    background:transparent;
    color:#526982;
    font-size:12px;
    font-weight:650;
    line-height:1.25;
    text-align:center;
    text-decoration:none;
    box-sizing:border-box;
}

.portal-body.portal-rc2 .chat-shell
.chat-folder-toggle .chat-folder-tab.active {
    background:#fff;
    color:#156cbe;
    border-color:#d7e6f8;
    box-shadow:0 2px 6px rgba(31,78,119,.12);
}

.portal-body.portal-rc2 .chat-shell
.chat-folder-toggle .chat-folder-tab:not(.active):hover {
    background:rgba(255,255,255,.6);
}

.portal-body.portal-rc2 .chat-shell .chat-receipt {
    display:inline-flex;
    align-items:center;
    justify-content:flex-end;
    min-width:20px;
    width:auto;
    padding:2px 0;
    margin-top:3px;
    font-size:16px;
    font-weight:750;
    line-height:1;
    letter-spacing:-3px;
    white-space:nowrap;
}

.portal-body.portal-rc2 .chat-shell
.chat-receipt--sent {
    color:#7e90a4;
}

.portal-body.portal-rc2 .chat-shell
.chat-receipt--read {
    color:#1687d0;
}

/* Tema Notte */
.portal-body.portal-rc2.hub-dark
.chat-shell .chat-folder-toggle {
    background:#132c44;
    border-color:#35536e;
}

.portal-body.portal-rc2.hub-dark
.chat-shell .chat-folder-toggle .chat-folder-tab {
    color:#b7d1e4;
}

.portal-body.portal-rc2.hub-dark
.chat-shell .chat-folder-toggle .chat-folder-tab.active {
    background:#244763;
    color:#75e4ff;
    border-color:#477490;
    box-shadow:0 2px 7px rgba(0,0,0,.2);
}

.portal-body.portal-rc2.hub-dark
.chat-shell .chat-receipt--sent {
    color:#a9c0d3;
}

.portal-body.portal-rc2.hub-dark
.chat-shell .chat-receipt--read {
    color:#6cdef3;
}

/* K59-CHAT01C RESTYLING E SPUNTE END */


/* K59-CHAT01F-2 START */

/* Schede realmente affiancate */
.portal-rc2 .chat-shell .chat-folder-toggle {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    margin: 5px 10px 9px !important;
    padding: 4px !important;
    background: #edf3fa;
    border: 1px solid #dbe5f1;
    border-radius: 11px;
}

.portal-rc2 .chat-shell .chat-folder-toggle
.chat-folder-tab {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 34px;
    padding: 6px 5px !important;
    margin: 0 !important;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #526982;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.portal-rc2 .chat-shell .chat-folder-toggle
.chat-folder-tab.active {
    background: #fff;
    border-color: #ccdfef;
    color: #176cb3;
    box-shadow: 0 1px 4px rgba(25,65,100,.13);
}

/* Evita sovrapposizioni delle vecchie etichette */
.portal-rc2 .chat-shell .chat-receipt {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    position: static !important;
    width: auto !important;
    min-width: 24px;
    height: auto !important;
    margin: 4px 0 0 !important;
    padding: 1px 5px 1px 0 !important;
    font-size: 0 !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    white-space: nowrap !important;
    text-indent: 0 !important;
}

.portal-rc2 .chat-shell .chat-receipt::before,
.portal-rc2 .chat-shell .chat-receipt::after {
    content: none !important;
    display: none !important;
}

.portal-rc2 .chat-shell .chat-receipt > span {
    display: inline-block !important;
    position: static !important;
    font-size: 16px !important;
    font-weight: 750 !important;
    letter-spacing: -3px !important;
    line-height: 1 !important;
}

.portal-rc2 .chat-shell .chat-receipt--sent {
    color: #8292a3 !important;
}

.portal-rc2 .chat-shell .chat-receipt--read {
    color: #1687d0 !important;
}

/* Desktop: poco più larga la lista, meno alte le righe */
@media (min-width: 900px) {
    .portal-rc2 .chat-shell {
        display: grid !important;
        grid-template-columns:
            minmax(310px, 34%) minmax(0, 1fr) !important;
        height: clamp(
            550px,
            calc(100dvh - 300px),
            720px
        ) !important;
        min-height: 550px !important;
    }

    .portal-rc2 .chat-shell > .chat-rooms {
        display: flex !important;
        flex-direction: column !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    .portal-rc2 .chat-shell .chat-room-list {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .portal-rc2 .chat-shell .chat-room-card {
        min-height: 53px !important;
        padding: 7px 9px !important;
        gap: 8px !important;
    }

    .portal-rc2 .chat-shell .chat-room-avatar {
        flex-basis: 36px !important;
        width: 36px !important;
        height: 36px !important;
    }

    .portal-rc2 .chat-shell .chat-room-detail small {
        margin-top: 3px !important;
    }

    .portal-rc2 .chat-shell > .chat-conversation {
        min-width: 0 !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: none !important;
    }

    .portal-rc2 .chat-shell .chat-messages {
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
    }
}

/* Tema Notte */
.portal-rc2.hub-dark .chat-shell .chat-folder-toggle,
.hub-dark .portal-rc2 .chat-shell .chat-folder-toggle {
    background: #17334b;
    border-color: #35546e;
}

.portal-rc2.hub-dark .chat-shell .chat-folder-tab,
.hub-dark .portal-rc2 .chat-shell .chat-folder-tab {
    color: #bdd5e7;
}

.portal-rc2.hub-dark .chat-shell .chat-folder-tab.active,
.hub-dark .portal-rc2 .chat-shell .chat-folder-tab.active {
    background: #254963;
    color: #86dcff;
    border-color: #47748f;
}

.portal-rc2.hub-dark .chat-shell .chat-receipt--sent,
.hub-dark .portal-rc2 .chat-shell .chat-receipt--sent {
    color: #b5c8d7 !important;
}

.portal-rc2.hub-dark .chat-shell .chat-receipt--read,
.hub-dark .portal-rc2 .chat-shell .chat-receipt--read {
    color: #6cdef3 !important;
}

/* K59-CHAT01F-2 END */


/* K59-CHAT01C-FIX1 START */
/* Schede Chat indipendenti dal precedente chat-folder-toggle */
.portal-rc2 .chat-shell .chat-k59-switch {
  display:flex!important;
  flex-direction:row!important;
  gap:5px!important;
  margin:6px 10px 10px!important;
  padding:4px!important;
  border:1px solid #dce5f0;
  border-radius:12px;
  background:#edf3f9;
}
.portal-rc2 .chat-shell .chat-k59-switch__tab {
  display:flex!important;
  flex:1 1 50%!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  min-height:36px;
  margin:0!important;
  padding:6px 8px!important;
  border:1px solid transparent;
  border-radius:9px;
  color:#49657f;
  text-decoration:none!important;
  font-size:12px;
  font-weight:650;
  text-align:center;
  box-sizing:border-box;
}
.portal-rc2 .chat-shell .chat-k59-switch__tab.is-active {
  background:#fff!important;
  border-color:#d1e1ef!important;
  color:#156cb6!important;
  box-shadow:0 1px 5px rgba(30,65,105,.13);
}
.portal-rc2 .chat-shell .chat-k59-status {
  display:inline-flex!important;
  position:static!important;
  align-items:center!important;
  justify-content:flex-end!important;
  width:auto!important;
  height:20px!important;
  margin:3px 0 0!important;
  padding:0 3px!important;
  line-height:1!important;
  vertical-align:middle!important;
}
.portal-rc2 .chat-shell .chat-k59-status__icons {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:0!important;
}
.portal-rc2 .chat-shell .chat-k59-status__icons svg {
  display:block!important;
  width:17px!important;
  height:17px!important;
  flex:0 0 17px!important;
}
.portal-rc2 .chat-shell .chat-k59-status__icons svg+svg {
  margin-left:-8px!important;
}
.portal-rc2 .chat-shell .chat-k59-status--sent {
  color:#8292a3!important;
}
.portal-rc2 .chat-shell .chat-k59-status--read {
  color:#1687d0!important;
}
.hub-dark .portal-rc2 .chat-k59-switch,
.portal-rc2.hub-dark .chat-k59-switch {
  background:#17334b!important;
  border-color:#35546e!important;
}
.hub-dark .portal-rc2 .chat-k59-switch__tab,
.portal-rc2.hub-dark .chat-k59-switch__tab {
  color:#c3d8e8!important;
}
.hub-dark .portal-rc2 .chat-k59-switch__tab.is-active,
.portal-rc2.hub-dark .chat-k59-switch__tab.is-active {
  background:#254963!important;
  color:#86dcff!important;
  border-color:#47748f!important;
}
.hub-dark .portal-rc2 .chat-k59-status--read,
.portal-rc2.hub-dark .chat-k59-status--read {
  color:#6cdef3!important;
}
/* K59-CHAT01C-FIX1 END */


/* K59-CHAT01C-FIX5 START */

/* Due schede orizzontali chiaramente selezionabili */
.portal-body.portal-rc2 .chat-shell .chat-k59-switch {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    grid-auto-flow:row !important;
    gap:5px !important;
    width:auto !important;
    flex-direction:unset !important;
    box-sizing:border-box;
}

.portal-body.portal-rc2 .chat-shell .chat-k59-switch__tab {
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
}

.portal-body.portal-rc2 .chat-shell
.chat-k59-switch__tab.is-active {
    font-weight:750 !important;
}

/* Orario e spunte nello stesso footer */
.portal-body.portal-rc2 .chat-shell .chat-k59-footer {
    display:flex !important;
    position:relative !important;
    width:100% !important;
    height:auto !important;
    align-items:center !important;
    justify-content:flex-end !important;
    flex-wrap:nowrap !important;
    gap:7px !important;
    margin:7px 0 0 !important;
    padding:0 !important;
    clear:both !important;
    box-sizing:border-box !important;
}

.portal-body.portal-rc2 .chat-shell
.chat-k59-footer > time {
    display:inline-block !important;
    position:static !important;
    float:none !important;
    transform:none !important;
    inset:auto !important;
    width:auto !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    font-size:10px !important;
    line-height:18px !important;
    white-space:nowrap !important;
}

.portal-body.portal-rc2 .chat-shell
.chat-k59-footer > .chat-k59-status {
    display:inline-flex !important;
    position:static !important;
    float:none !important;
    transform:none !important;
    inset:auto !important;
    flex:0 0 auto !important;
    margin:0 !important;
    padding:0 !important;
    width:auto !important;
    height:18px !important;
    align-items:center !important;
}

.portal-body.portal-rc2 .chat-shell
.chat-k59-footer .chat-k59-status__icons {
    display:inline-flex !important;
    align-items:center !important;
    line-height:1 !important;
}

.portal-body.portal-rc2 .chat-shell
.chat-k59-footer .chat-k59-status__icons svg {
    display:block !important;
    width:17px !important;
    height:17px !important;
}

/* K59-CHAT01C-FIX5 END */


/* K59-CHAT01G-1 START */

/* Bolle compatte: non modifica l'elenco delle conversazioni */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-messages .chat-bubble {
    display:block !important;
    box-sizing:border-box !important;
    width:fit-content !important;
    min-width:0 !important;
    min-height:0 !important;
    height:auto !important;
    max-width:min(78%, 540px) !important;
    padding:8px 11px 7px !important;
    margin-top:0 !important;
    margin-bottom:0 !important;
    border-radius:12px !important;
    line-height:1.3 !important;
}

/* Prima riga: nome piccolo */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-bubble > strong {
    display:block !important;
    margin:0 24px 3px 0 !important;
    padding:0 !important;
    font-size:11px !important;
    line-height:14px !important;
    font-weight:650 !important;
}

/* Seconda riga: messaggio leggibile */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-bubble > p:first-of-type {
    display:block !important;
    width:auto !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    font-size:14px !important;
    line-height:19px !important;
    font-weight:400 !important;
    overflow-wrap:anywhere !important;
    white-space:pre-wrap;
}

/* Terza riga: orario e spunte piccoli, sulla stessa riga */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-bubble > .chat-k59-footer {
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    flex-wrap:nowrap !important;
    gap:5px !important;
    width:100% !important;
    min-height:0 !important;
    height:15px !important;
    margin:4px 0 0 !important;
    padding:0 !important;
    line-height:15px !important;
}

.portal-body.portal-rc2 .content-shell
.chat-shell .chat-bubble > .chat-k59-footer > time {
    position:static !important;
    display:inline-block !important;
    margin:0 !important;
    padding:0 !important;
    font-size:10px !important;
    line-height:15px !important;
    font-weight:400 !important;
}

.portal-body.portal-rc2 .content-shell
.chat-shell .chat-k59-footer > .chat-k59-status {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:auto !important;
    height:15px !important;
    margin:0 !important;
    padding:0 !important;
}

.portal-body.portal-rc2 .content-shell
.chat-shell .chat-k59-footer
.chat-k59-status__icons svg {
    width:14px !important;
    height:14px !important;
    flex:0 0 14px !important;
}

.portal-body.portal-rc2 .content-shell
.chat-shell .chat-k59-footer
.chat-k59-status__icons svg + svg {
    margin-left:-6px !important;
}

/* Meno distanza verticale, senza cambiare sidebar */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-messages {
    row-gap:8px !important;
}

/* Larghezze adattive sugli schermi stretti */
@media (max-width:600px) {
    .portal-body.portal-rc2 .content-shell
    .chat-shell .chat-messages .chat-bubble {
        max-width:86% !important;
        padding:7px 10px 6px !important;
    }
}

/* K59-CHAT01G-1 END */


/* K59-CHAT01D-2F: spunte basate sulle conferme del server */
.chat-k59-status--sent,
.chat-k59-status--delivered {
    color:#84909d !important;
}
.chat-k59-status--read {
    color:#1687d0 !important;
}
.chat-k59-status__icons {
    display:inline-flex;
    align-items:center;
    justify-content:flex-end;
    white-space:nowrap;
}
.chat-k59-status__icons svg {
    width:14px;
    height:14px;
}
.chat-k59-status__icons svg + svg {
    margin-left:-6px;
}


/* K60-DARK03 START */

/*
 * Tema notte - sola barra composizione Chat.
 * Non interviene sul tema giorno o sugli altri moduli.
 */

.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-compose-box {
    background:#10283d !important;
    background-color:#10283d !important;
    border-top:1px solid #34536c !important;
    color:#e9f4fc !important;
    box-shadow:none !important;
}

.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-compose-toolbar,
.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-composer,
.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-attachment-form {
    background:transparent !important;
    color:#e9f4fc !important;
    border-color:transparent !important;
}

/* Campo di scrittura */
.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell
.chat-composer textarea#chat-draft {
    background:#193b55 !important;
    background-color:#193b55 !important;
    color:#f3faff !important;
    border:1px solid #436984 !important;
    box-shadow:none !important;
    caret-color:#a9efff !important;
}

.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell
.chat-composer textarea#chat-draft::placeholder {
    color:#b6cbda !important;
    opacity:1 !important;
}

.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell
.chat-composer textarea#chat-draft:focus {
    border-color:#6dc9ee !important;
    outline:2px solid rgba(109,201,238,.26) !important;
    outline-offset:0 !important;
}

/* Checkbox Importante: piccola e leggibile */
.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-important-toggle {
    background:transparent !important;
    border-color:transparent !important;
    color:#dbeaf5 !important;
    box-shadow:none !important;
}

.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell
.chat-important-toggle input[type="checkbox"] {
    appearance:auto !important;
    -webkit-appearance:checkbox !important;
    color-scheme:dark !important;
    accent-color:#31cce5 !important;
    width:16px !important;
    min-width:16px !important;
    max-width:16px !important;
    height:16px !important;
    min-height:16px !important;
    max-height:16px !important;
    padding:0 !important;
    margin:0 5px 0 0 !important;
    background:transparent !important;
    box-shadow:none !important;
    vertical-align:middle !important;
}

/* Pulsanti allegati e messaggio vocale */
.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-compose-icon {
    background:transparent !important;
    color:#bfdef0 !important;
    border-color:transparent !important;
}

.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-compose-icon:hover {
    background:#244e6a !important;
    color:#ffffff !important;
}

/* Invia resta un pulsante primario blu */
.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-send-button {
    background:#197fc0 !important;
    color:#ffffff !important;
    border-color:#197fc0 !important;
}

.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-send-button:hover {
    background:#2498d5 !important;
    border-color:#2498d5 !important;
}

/* Risposte, caricamenti, registrazione vocale */
.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell
:is(.chat-compose-status,.chat-reply-indicator) {
    background:transparent !important;
    color:#c0d6e5 !important;
}

/* K60-DARK03 END */


/* K61-NOTIF01B START */

/*
 * Notifiche Chat: layout ordinato e compatto.
 * Selettori limitati ai due form delle notifiche.
 * Nessuna modifica alle altre impostazioni del Portale.
 */

/* Il contenitore non deve imporre altezze inutili. */
.portal-body.portal-rc2 .content-shell
section.card:has(> form[action="/chat/notifications/default"]),
.portal-body.portal-rc2 .content-shell
section.card:has(> form[action="/chat/preferences"]) {
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
}

/* Ogni opzione occupa una vera riga a larghezza piena. */
.portal-body.portal-rc2 .content-shell
form[action="/chat/notifications/default"],
.portal-body.portal-rc2 .content-shell
form[action="/chat/preferences"] {
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    float:none !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    height:auto !important;
    margin:12px 0 0 !important;
    gap:7px !important;
    grid-template-columns:none !important;
}

/* Radio a sinistra, nome impostazione sulla stessa riga. */
.portal-body.portal-rc2 .content-shell
form[action="/chat/notifications/default"]
.chat-notification-choice,
.portal-body.portal-rc2 .content-shell
form[action="/chat/preferences"]
.chat-notification-choice {
    display:grid !important;
    grid-template-columns:20px minmax(0,1fr) !important;
    align-items:center !important;
    justify-content:stretch !important;
    column-gap:12px !important;
    box-sizing:border-box !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    min-height:44px !important;
    height:auto !important;
    padding:10px 12px !important;
    margin:0 !important;
    border:1px solid #d1e1ed !important;
    border-radius:10px !important;
    background:#f4f8fc !important;
    cursor:pointer !important;
    float:none !important;
    white-space:normal !important;
}

/* Dimensioni uniformi, senza l'effetto campo di testo. */
.portal-body.portal-rc2 .content-shell
form[action="/chat/notifications/default"]
.chat-notification-choice input[type="radio"],
.portal-body.portal-rc2 .content-shell
form[action="/chat/preferences"]
.chat-notification-choice input[type="radio"] {
    appearance:auto !important;
    -webkit-appearance:radio !important;
    display:block !important;
    box-sizing:border-box !important;
    position:static !important;
    float:none !important;
    flex:none !important;
    width:18px !important;
    min-width:18px !important;
    max-width:18px !important;
    height:18px !important;
    min-height:18px !important;
    max-height:18px !important;
    margin:0 !important;
    padding:0 !important;
    border-radius:50% !important;
    box-shadow:none !important;
    accent-color:#1677d2 !important;
    color-scheme:light;
}

.portal-body.portal-rc2 .content-shell
.chat-notification-choice > span {
    display:block !important;
    position:static !important;
    float:none !important;
    box-sizing:border-box !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
    color:inherit !important;
    font-size:14px !important;
    font-weight:500 !important;
    line-height:1.45 !important;
    text-align:left !important;
    writing-mode:horizontal-tb !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
}

/* Selezione evidenziata senza alterare la funzionalità. */
.portal-body.portal-rc2 .content-shell
.chat-notification-choice:has(input[type="radio"]:checked) {
    border-color:#3d98d3 !important;
    background:#e7f3fd !important;
}

/* Pulsante Salva sotto le opzioni. */
.portal-body.portal-rc2 .content-shell
form[action="/chat/notifications/default"] > button,
.portal-body.portal-rc2 .content-shell
form[action="/chat/preferences"] > button {
    display:inline-flex !important;
    align-self:flex-start !important;
    justify-self:start !important;
    width:auto !important;
    max-width:100% !important;
    min-height:38px !important;
    margin:9px 0 0 !important;
    white-space:normal !important;
}

/* Tema notte: colori coerenti con i riquadri del Portale. */
.portal-body.portal-rc2.hub-dark .content-shell
.chat-notification-choice {
    background:#173249 !important;
    border-color:#385872 !important;
    color:#e8f5ff !important;
}

.portal-body.portal-rc2.hub-dark .content-shell
.chat-notification-choice:has(input[type="radio"]:checked) {
    background:#244c69 !important;
    border-color:#6ab6de !important;
}

.portal-body.portal-rc2.hub-dark .content-shell
.chat-notification-choice input[type="radio"] {
    color-scheme:dark !important;
    accent-color:#55ccec !important;
}

/* Schermi stretti: mantieni le etichette orizzontali. */
@media(max-width:600px) {
    .portal-body.portal-rc2 .content-shell
    .chat-notification-choice {
        grid-template-columns:18px minmax(0,1fr) !important;
        gap:10px !important;
        padding:9px 10px !important;
    }
}

/* K61-NOTIF01B END */


/* K62-CHATCOL01 START */

/* Colori esclusivamente sulle bolle della conversazione */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-messages
.chat-bubble.chat-k62-colored {
    background:var(--chat-k62-bg) !important;
    background-image:none !important;
    border:1px solid var(--chat-k62-border) !important;
    color:#25384b !important;
    box-shadow:0 1px 3px rgba(18,43,64,.10) !important;
}

/* Nome, testo e orario restano leggibili */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-messages
.chat-bubble.chat-k62-colored > strong {
    color:#39536a !important;
}

.portal-body.portal-rc2 .content-shell
.chat-shell .chat-messages
.chat-bubble.chat-k62-colored > p:first-of-type {
    color:#25384b !important;
}

.portal-body.portal-rc2 .content-shell
.chat-shell .chat-messages
.chat-bubble.chat-k62-colored
.chat-k59-footer > time {
    color:#536779 !important;
}

/* Stato delle spunte: sent e delivered neutri, read blu */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-bubble.chat-k62-colored
.chat-k59-status--sent,
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-bubble.chat-k62-colored
.chat-k59-status--delivered {
    color:#61788a !important;
}

.portal-body.portal-rc2 .content-shell
.chat-shell .chat-bubble.chat-k62-colored
.chat-k59-status--read {
    color:#0878ba !important;
}

/* Etichetta importante leggibile sulle tinte pastello */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-bubble.chat-k62-colored
.chat-important-label {
    color:#85510d !important;
}

/* K62-CHATCOL01 END */


/* K63-UI06 FLEX SHRINK FIX START */

/*
 * Le bolle sono elementi di una colonna Flex.
 * Non devono comprimersi quando aumenta il
 * numero dei messaggi visibili.
 *
 * La cronologia mantiene il proprio scroll.
 * Non cambia altezza, layout o colori.
 */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-messages > .chat-bubble {
    flex-grow:0 !important;
    flex-shrink:0 !important;
    flex-basis:auto !important;
}

/* Anche le date non devono essere schiacciate. */
.portal-body.portal-rc2 .content-shell
.chat-shell .chat-messages > .chat-day {
    flex-grow:0 !important;
    flex-shrink:0 !important;
    flex-basis:auto !important;
}

/* K63-UI06 FLEX SHRINK FIX END */

/* K64-MENU01 START */

body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel),
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel),
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) {

    background:#142e45 !important;
    background-color:#142e45 !important;
    background-image:none !important;
    border:1px solid #426681 !important;
    color:#eaf5ff !important;
    color-scheme:dark;
    box-shadow:0 18px 45px rgba(0,7,20,.45) !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) :is(.chat-menu-heading,.chat-menu-section-title,.chat-message-menu-heading,strong),
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) :is(.chat-menu-heading,.chat-menu-section-title,.chat-message-menu-heading,strong),
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) :is(.chat-menu-heading,.chat-menu-section-title,.chat-message-menu-heading,strong) {

    color:#f0f8ff !important;
    text-shadow:none !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) :is(small,.chat-menu-footer),
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) :is(small,.chat-menu-footer),
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) :is(small,.chat-menu-footer) {

    color:#adcbde !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) form,
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) form,
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) form {

    background:transparent !important;
    color:inherit !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) :is(a,button,.chat-menu-action):not(.chat-menu-danger),
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) :is(a,button,.chat-menu-action):not(.chat-menu-danger),
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) :is(a,button,.chat-menu-action):not(.chat-menu-danger) {

    background:transparent !important;
    color:#dbeaf7 !important;
    border-color:transparent !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) :is(a,button,.chat-menu-action):not(.chat-menu-danger):hover,
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) :is(a,button,.chat-menu-action):not(.chat-menu-danger):hover,
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) :is(a,button,.chat-menu-action):not(.chat-menu-danger):hover {

    background:#28516e !important;
    color:#ffffff !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) :is(a,button,.chat-menu-action):focus-visible,
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) :is(a,button,.chat-menu-action):focus-visible,
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) :is(a,button,.chat-menu-action):focus-visible {

    outline:2px solid #8bdaf2 !important;
    outline-offset:1px !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) svg,
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) svg,
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) svg {

    color:inherit !important;
    stroke:currentColor;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) :is(hr,.chat-menu-divided,.chat-menu-footer),
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) :is(hr,.chat-menu-divided,.chat-menu-footer),
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) :is(hr,.chat-menu-divided,.chat-menu-footer) {

    border-color:#355770 !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) :is(input,select,textarea),
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) :is(input,select,textarea),
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) :is(input,select,textarea) {

    background:#0d263b !important;
    color:#eef8ff !important;
    border-color:#4c728a !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) :is(.chat-menu-danger,button.chat-menu-danger),
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) :is(.chat-menu-danger,button.chat-menu-danger),
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) :is(.chat-menu-danger,button.chat-menu-danger) {

    color:#ffbbc5 !important;

}
body.portal-body.portal-rc2.hub-dark .chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) :is(.chat-menu-danger,button.chat-menu-danger):hover,
body.portal-body.portal-rc2.hub-dark .chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) :is(.chat-menu-danger,button.chat-menu-danger):hover,
body.portal-body.portal-rc2.hub-dark .chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) :is(.chat-menu-danger,button.chat-menu-danger):hover {

    background:#5b2b40 !important;
    color:#ffe8ec !important;

}

/* K64-MENU01 END */


/* K64-MENU02 START */

/* Solo menu delle conversazioni in tema notte. */
body.portal-body.portal-rc2.hub-dark
.chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel) .chat-menu-danger,
body.portal-body.portal-rc2.hub-dark
.chat-room-entry .chat-menu-panel:not(.chat-message-action-panel) .chat-menu-danger,
body.portal-body.portal-rc2.hub-dark
.chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel) .chat-menu-danger {
    background:#43293b !important;
    background-color:#43293b !important;
    background-image:none !important;
    color:#ffd1d8 !important;
    border:1px solid #795267 !important;
    opacity:1 !important;
}

/* Stato hover e focus: rosso scuro, mai bianco. */
body.portal-body.portal-rc2.hub-dark
.chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel)
.chat-menu-danger:is(:hover,:focus-visible),
body.portal-body.portal-rc2.hub-dark
.chat-room-entry .chat-menu-panel:not(.chat-message-action-panel)
.chat-menu-danger:is(:hover,:focus-visible),
body.portal-body.portal-rc2.hub-dark
.chat-conversation-head .chat-menu-panel:not(.chat-message-action-panel)
.chat-menu-danger:is(:hover,:focus-visible) {
    background:#633349 !important;
    color:#fff0f3 !important;
    border-color:#a56c81 !important;
}

/* Icona e testo seguono il colore del pulsante. */
body.portal-body.portal-rc2.hub-dark
.chat-menu-panel[data-chat-overlay="1"]:not(.chat-message-action-panel)
.chat-menu-danger :is(span,svg) {
    color:inherit !important;
}

/* K64-MENU02 END */


/* K65-FWD02 START */

.portal-body.portal-rc2 .chat-forward-dialog {
    box-sizing:border-box;
    width:min(540px,calc(100vw - 28px));
    max-width:calc(100vw - 28px);
    max-height:min(82dvh,760px);
    padding:0;
    border:1px solid #c9dce9;
    border-radius:16px;
    background:#ffffff;
    color:#20384d;
    box-shadow:0 24px 75px rgba(0,20,45,.32);
    overflow:hidden;
}

.portal-body.portal-rc2 .chat-forward-dialog:not([open]){
    display:none!important;
}

.portal-body.portal-rc2 .chat-forward-dialog::backdrop {
    background:rgba(6,20,37,.62);
}

.portal-body.portal-rc2 .chat-forward-panel {
    display:flex;
    flex-direction:column;
    max-height:min(82dvh,760px);
    min-height:0;
    padding:18px;
    box-sizing:border-box;
}

.portal-body.portal-rc2 .chat-forward-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    flex:0 0 auto;
}

.portal-body.portal-rc2 .chat-forward-head h2 {
    font-size:18px;
    line-height:1.3;
    margin:0 0 4px;
}

.portal-body.portal-rc2 .chat-forward-head p {
    font-size:12px;
    color:#647b8e;
    margin:0;
}

.portal-body.portal-rc2 .chat-forward-close {
    width:36px;
    height:36px;
    min-width:36px;
    border:0;
    border-radius:9px;
    background:#edf3f8;
    color:#39546b;
    font-size:24px;
    cursor:pointer;
}

.portal-body.portal-rc2 .chat-forward-dialog form {
    display:flex;
    flex-direction:column;
    min-height:0;
    flex:1 1 auto;
    gap:12px;
    margin:14px 0 0;
}

.portal-body.portal-rc2 .chat-forward-search-wrap {
    flex:0 0 auto;
    display:flex;
    flex-direction:column;
    gap:5px;
}

.portal-body.portal-rc2 .chat-forward-search-wrap label {
    font-size:12px;
    font-weight:650;
}

.portal-body.portal-rc2 .chat-forward-search-wrap input {
    display:block;
    box-sizing:border-box;
    width:100%;
    min-width:0;
    min-height:42px;
    padding:9px 12px;
    background:#f6f9fc;
    color:#233b51;
    border:1px solid #c6d8e5;
    border-radius:10px;
}

.portal-body.portal-rc2 .chat-forward-filters {
    display:flex;
    gap:5px;
    flex-wrap:wrap;
    flex:0 0 auto;
}

.portal-body.portal-rc2 .chat-forward-filters button {
    border:1px solid #d3e0e9;
    background:#f4f8fb;
    color:#426079;
    border-radius:999px;
    padding:7px 11px;
    cursor:pointer;
    font-size:12px;
}

.portal-body.portal-rc2
.chat-forward-filters button[aria-pressed="true"] {
    background:#ddecfa;
    border-color:#7eafdb;
    color:#165b92;
    font-weight:700;
}

.portal-body.portal-rc2 .chat-forward-results {
    display:flex;
    flex-direction:column;
    gap:5px;
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    padding:3px;
}

.portal-body.portal-rc2 .chat-forward-item {
    display:flex;
    align-items:center;
    gap:11px;
    width:100%;
    box-sizing:border-box;
    padding:10px 12px;
    border:1px solid #e0eaf1;
    border-radius:10px;
    cursor:pointer;
    background:#f8fafc;
    min-width:0;
    flex:0 0 auto;
}

.portal-body.portal-rc2 .chat-forward-item[hidden] {
    display:none!important;
}

.portal-body.portal-rc2 .chat-forward-item:has(input:checked) {
    background:#e7f3ff;
    border-color:#6da8d8;
}

.portal-body.portal-rc2
.chat-forward-item input[type="radio"] {
    appearance:auto;
    -webkit-appearance:radio;
    width:17px!important;
    height:17px!important;
    min-width:17px!important;
    margin:0!important;
    padding:0!important;
    flex:0 0 17px;
    accent-color:#1977c8;
}

.portal-body.portal-rc2 .chat-forward-item-text {
    display:flex;
    flex-direction:column;
    gap:3px;
    min-width:0;
}

.portal-body.portal-rc2 .chat-forward-item-text strong {
    font-size:14px;
    line-height:1.35;
    overflow-wrap:anywhere;
}

.portal-body.portal-rc2 .chat-forward-item-text small {
    font-size:11px;
    color:#697e90;
}

.portal-body.portal-rc2 .chat-forward-empty {
    font-size:13px;
    color:#718497;
    text-align:center;
    margin:12px 0;
}

.portal-body.portal-rc2 .chat-forward-empty[hidden] {
    display:none!important;
}

.portal-body.portal-rc2 .chat-forward-actions {
    display:flex;
    justify-content:flex-end;
    gap:8px;
    flex:0 0 auto;
    padding-top:12px;
    border-top:1px solid #dfebf3;
}

.portal-body.portal-rc2 .chat-forward-actions button {
    min-height:38px;
    padding:8px 15px;
    border-radius:9px;
    cursor:pointer;
}

.portal-body.portal-rc2 .chat-forward-cancel {
    background:transparent;
    border:1px solid #bdcfdd;
    color:inherit;
}

.portal-body.portal-rc2 .chat-forward-submit {
    background:#187dc4;
    color:#fff;
    border:1px solid #187dc4;
}

.portal-body.portal-rc2 .chat-forward-submit:disabled {
    opacity:.48;
    cursor:not-allowed;
}

/* Tema notte */
.portal-body.portal-rc2.hub-dark .chat-forward-dialog {
    background:#122b42!important;
    color:#ebf6ff!important;
    border-color:#3e6380!important;
    color-scheme:dark;
}

.portal-body.portal-rc2.hub-dark .chat-forward-head p,
.portal-body.portal-rc2.hub-dark .chat-forward-item-text small,
.portal-body.portal-rc2.hub-dark .chat-forward-empty {
    color:#b7cfe1!important;
}

.portal-body.portal-rc2.hub-dark .chat-forward-close,
.portal-body.portal-rc2.hub-dark
.chat-forward-filters button {
    background:#1c405a!important;
    border-color:#426b87!important;
    color:#e3f2ff!important;
}

.portal-body.portal-rc2.hub-dark
.chat-forward-filters button[aria-pressed="true"] {
    background:#285f80!important;
    border-color:#76c2df!important;
    color:#fff!important;
}

.portal-body.portal-rc2.hub-dark
.chat-forward-search-wrap input {
    background:#0c253a!important;
    border-color:#49708d!important;
    color:#f3faff!important;
}

.portal-body.portal-rc2.hub-dark .chat-forward-item {
    background:#19364e!important;
    border-color:#345772!important;
    color:#eaf6ff!important;
}

.portal-body.portal-rc2.hub-dark
.chat-forward-item:has(input:checked) {
    background:#275575!important;
    border-color:#82d1ef!important;
}

.portal-body.portal-rc2.hub-dark .chat-forward-actions {
    border-color:#375a74!important;
}

.portal-body.portal-rc2.hub-dark .chat-forward-cancel {
    border-color:#54748d!important;
    color:#eaf6ff!important;
}

.portal-body.portal-rc2.hub-dark .chat-forward-submit {
    background:#1689c4!important;
    color:#fff!important;
    border-color:#1689c4!important;
}

/* K65-FWD02 END */


/* K66-CHATBG01 START */

/* Tema giorno: fondo pulito con loghi discreti. */
.portal-body.portal-rc2.hub-light
.content-shell .chat-shell .chat-messages {
    background-color:#f6fbff !important;
    background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2296%22%20height%3D%2296%22%20viewBox%3D%220%200%2096%2096%22%3E%3Cg%20opacity%3D%220.16%22%3E%3Cg%20transform%3D%22translate%286%205%29%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%2369d9f5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%235daffc%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2218%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%238585f5%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2857%2013%29%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%2369d9f5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%235daffc%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2218%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%238585f5%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2817%2056%29%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%2369d9f5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%235daffc%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2218%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%238585f5%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2862%2061%29%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%2369d9f5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%235daffc%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2218%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%238585f5%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E") !important;
    background-repeat:repeat !important;
    background-size:96px 96px !important;
}

/* Tema notte: blu più luminoso e loghi ripetuti. */
.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-messages {
    background-color:#23445e !important;
    background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2296%22%20height%3D%2296%22%20viewBox%3D%220%200%2096%2096%22%3E%3Cg%20opacity%3D%220.20%22%3E%3Cg%20transform%3D%22translate%286%205%29%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%2369d9f5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%235daffc%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2218%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%238585f5%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2857%2013%29%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%2369d9f5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%235daffc%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2218%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%238585f5%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2817%2056%29%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%2369d9f5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%235daffc%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2218%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%238585f5%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2862%2061%29%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%2369d9f5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%235daffc%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2218%22%20width%3D%2223%22%20height%3D%227%22%20rx%3D%223.5%22%20fill%3D%22%238585f5%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E") !important;
    background-repeat:repeat !important;
    background-size:96px 96px !important;
}

/* Avviso integrato nella grafica del Portale. */
.portal-body.portal-rc2
.content-shell .chat-shell .chat-readonly-note {
    display:flex !important;
    flex-direction:column !important;
    flex:0 0 auto !important;
    gap:4px !important;
    margin:12px 16px 16px !important;
    padding:12px 14px !important;
    border:1px solid #d5e5ef !important;
    border-radius:12px !important;
    background:#f4f9fd !important;
    box-shadow:0 2px 8px rgba(15,42,69,.05);
}

.portal-body.portal-rc2
.chat-readonly-note strong {
    font-size:13px !important;
    line-height:1.35 !important;
    color:#284c68 !important;
}

.portal-body.portal-rc2
.chat-readonly-note small {
    font-size:12px !important;
    line-height:1.45 !important;
    color:#667f93 !important;
}

.portal-body.portal-rc2.hub-dark
.content-shell .chat-shell .chat-readonly-note {
    background:#19364d !important;
    border-color:#47718c !important;
}

.portal-body.portal-rc2.hub-dark
.chat-readonly-note strong {
    color:#edf8ff !important;
}

.portal-body.portal-rc2.hub-dark
.chat-readonly-note small {
    color:#bed4e4 !important;
}

/* K66-CHATBG01 END */


/* K67-CHATPLUS02 START */

.portal-body.portal-rc2 .chat-plus-dialog {
    box-sizing:border-box;
    width:min(570px,calc(100vw - 24px));
    max-width:calc(100vw - 24px);
    max-height:84dvh;
    padding:0;
    border:1px solid #c9dce9;
    border-radius:16px;
    background:#fff;
    color:#223c53;
    box-shadow:0 24px 70px rgba(0,20,45,.32);
    overflow:hidden;
}

.portal-body.portal-rc2 .chat-plus-dialog:not([open]),
.portal-body.portal-rc2 .chat-plus-dialog [hidden] {
    display:none!important;
}

.portal-body.portal-rc2 .chat-plus-dialog::backdrop {
    background:rgba(6,20,37,.62);
}

.portal-body.portal-rc2 .chat-plus-panel {
    box-sizing:border-box;
    padding:18px;
    max-height:84dvh;
    display:flex;
    flex-direction:column;
    min-height:0;
}

.portal-body.portal-rc2 .chat-plus-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    flex:0 0 auto;
}

.portal-body.portal-rc2 .chat-plus-head h2 {
    font-size:19px;
    margin:0 0 4px;
}

.portal-body.portal-rc2 .chat-plus-head p {
    font-size:12px;
    margin:0;
    color:#678097;
}

.portal-body.portal-rc2 .chat-plus-close {
    border:0;
    width:36px;
    height:36px;
    border-radius:10px;
    background:#ebf3f9;
    color:#3d5870;
    font-size:23px;
    cursor:pointer;
}

.portal-body.portal-rc2 #chat-plus-browser {
    display:flex;
    flex-direction:column;
    min-height:0;
    flex:1 1 auto;
    margin-top:15px;
    gap:10px;
}

.portal-body.portal-rc2 .chat-plus-search-label,
.portal-body.portal-rc2 .chat-plus-field,
.portal-body.portal-rc2 .chat-plus-member-head strong {
    font-size:12px;
    font-weight:650;
}

.portal-body.portal-rc2 #chat-plus-search,
.portal-body.portal-rc2 #chat-plus-member-search,
.portal-body.portal-rc2 .chat-plus-field input,
.portal-body.portal-rc2 .chat-plus-field select {
    box-sizing:border-box;
    width:100%;
    min-width:0;
    min-height:42px;
    padding:9px 12px;
    border:1px solid #c5d8e6;
    background:#f6f9fc;
    color:#24435b;
    border-radius:10px;
}

.portal-body.portal-rc2 .chat-plus-tabs {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
    flex:0 0 auto;
}

.portal-body.portal-rc2 .chat-plus-tabs button {
    min-width:0;
    padding:9px 4px;
    font-size:12px;
    border:1px solid #d0e0eb;
    border-radius:9px;
    background:#f5f9fc;
    color:#41617b;
    cursor:pointer;
}

.portal-body.portal-rc2 .chat-plus-tabs button[aria-pressed="true"] {
    background:#ddecfa;
    border-color:#7eafdb;
    color:#165b92;
    font-weight:700;
}

.portal-body.portal-rc2 .chat-plus-results {
    display:flex;
    flex-direction:column;
    gap:6px;
    min-height:0;
    flex:1 1 auto;
    overflow-y:auto;
    overflow-x:hidden;
    padding:3px;
}

.portal-body.portal-rc2 .chat-plus-item {
    box-sizing:border-box;
    display:flex;
    align-items:center;
    gap:10px;
    flex:0 0 auto;
    min-width:0;
    padding:11px 12px;
    border:1px solid #dfebf3;
    border-radius:10px;
    background:#f8fbfd;
    color:inherit;
    text-decoration:none;
}

.portal-body.portal-rc2 .chat-plus-item-text {
    display:flex;
    flex-direction:column;
    gap:4px;
    min-width:0;
    flex:1 1 auto;
}

.portal-body.portal-rc2 .chat-plus-item-text strong {
    font-size:13px;
    overflow-wrap:anywhere;
}

.portal-body.portal-rc2 .chat-plus-item-text small,
.portal-body.portal-rc2 .chat-plus-state {
    font-size:11px;
    color:#71879a;
}

.portal-body.portal-rc2 .chat-plus-item form {
    margin:0;
    flex:0 0 auto;
}

.portal-body.portal-rc2 .chat-plus-item form button,
.portal-body.portal-rc2 .chat-plus-actions button,
.portal-body.portal-rc2 .chat-plus-create-actions button {
    border:1px solid #8db9d8;
    background:#e5f2fd;
    color:#185e91;
    border-radius:9px;
    min-height:35px;
    padding:7px 11px;
    font-size:12px;
    cursor:pointer;
}

.portal-body.portal-rc2 .chat-plus-link:hover {
    background:#e6f3fc;
    border-color:#7eb2d4;
}

.portal-body.portal-rc2 .chat-plus-arrow {
    font-size:12px;
    color:#1a709e;
}

.portal-body.portal-rc2 .chat-plus-empty {
    margin:12px 0;
    text-align:center;
    color:#72889a;
    font-size:13px;
}

.portal-body.portal-rc2 .chat-plus-actions {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    border-top:1px solid #dce8f1;
    padding-top:12px;
    flex:0 0 auto;
}

.portal-body.portal-rc2 .chat-plus-actions a {
    color:#196c9d;
    font-size:12px;
}

.portal-body.portal-rc2 .chat-plus-create-panel {
    display:block;
    margin-top:14px;
    min-height:0;
    flex:1 1 auto;
}

.portal-body.portal-rc2 .chat-plus-create-panel form {
    display:flex;
    flex-direction:column;
    gap:11px;
    min-height:0;
    height:100%;
    margin:0;
}

.portal-body.portal-rc2 .chat-plus-field {
    display:flex;
    flex-direction:column;
    gap:5px;
}

.portal-body.portal-rc2 .chat-plus-member-head {
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:center;
}

.portal-body.portal-rc2 .chat-plus-member-head small {
    font-size:11px;
    color:#71879a;
}

.portal-body.portal-rc2 .chat-plus-members {
    display:flex;
    flex-direction:column;
    gap:5px;
    overflow-y:auto;
    flex:1 1 auto;
    min-height:80px;
}

.portal-body.portal-rc2 .chat-plus-member {
    display:flex;
    gap:9px;
    align-items:center;
    padding:9px 10px;
    border:1px solid #dce8f1;
    border-radius:9px;
    font-size:13px;
    cursor:pointer;
}

.portal-body.portal-rc2 .chat-plus-member input[type="checkbox"] {
    width:17px!important;
    height:17px!important;
    min-width:17px!important;
    margin:0!important;
    padding:0!important;
    accent-color:#1977c8;
}

.portal-body.portal-rc2 .chat-plus-create-actions {
    display:flex;
    justify-content:flex-end;
    gap:8px;
    border-top:1px solid #dce8f1;
    padding-top:11px;
}

.portal-body.portal-rc2 .chat-plus-create-actions
button[type="submit"] {
    background:#187dc4;
    border-color:#187dc4;
    color:#fff;
}

/* Tema notte */
.portal-body.portal-rc2.hub-dark .chat-plus-dialog {
    background:#122b42!important;
    border-color:#426780!important;
    color:#ecf7ff!important;
    color-scheme:dark;
}

.portal-body.portal-rc2.hub-dark
:is(.chat-plus-head p,.chat-plus-item-text small,
.chat-plus-state,.chat-plus-member-head small) {
    color:#bbd3e3!important;
}

.portal-body.portal-rc2.hub-dark
:is(.chat-plus-close,.chat-plus-tabs button,
.chat-plus-item form button,.chat-plus-actions button,
.chat-plus-create-actions button) {
    background:#1e435c!important;
    border-color:#47718b!important;
    color:#edf7ff!important;
}

.portal-body.portal-rc2.hub-dark
.chat-plus-tabs button[aria-pressed="true"] {
    background:#29617f!important;
    border-color:#79c7e3!important;
}

.portal-body.portal-rc2.hub-dark
:is(#chat-plus-search,#chat-plus-member-search,
.chat-plus-field input,.chat-plus-field select) {
    background:#0d273c!important;
    border-color:#48708b!important;
    color:#f1faff!important;
}

.portal-body.portal-rc2.hub-dark .chat-plus-item,
.portal-body.portal-rc2.hub-dark .chat-plus-member {
    background:#1a3850!important;
    border-color:#3d5f7b!important;
    color:#ecf7ff!important;
}

.portal-body.portal-rc2.hub-dark .chat-plus-actions a,
.portal-body.portal-rc2.hub-dark .chat-plus-arrow {
    color:#92dffc!important;
}

.portal-body.portal-rc2.hub-dark
.chat-plus-create-actions button[type="submit"] {
    background:#1689c4!important;
    border-color:#1689c4!important;
    color:white!important;
}

/* K67-CHATPLUS02 END */


/* K68-CHATFIT01 START */

/*
 * Modalità Chat: solo cronologia e lista scorrono.
 * Non modifica il layout delle altre pagine.
 */

/* Blocco dello scorrimento esterno nella sola Chat. */
html:has(body.portal-body.portal-rc2 .chat-shell) {
    height:100%;
    overflow:hidden !important;
    overscroll-behavior:none;
}

body.portal-body.portal-rc2:has(.chat-shell) {
    height:100vh !important;
    height:100dvh !important;
    min-height:0 !important;
    max-height:100dvh !important;
    overflow:hidden !important;
    overscroll-behavior:none;
}

/* Il layout principale occupa esattamente il viewport. */
body.portal-body.portal-rc2:has(.chat-shell)
.portal-layout {
    height:100vh !important;
    height:100dvh !important;
    min-height:0 !important;
    max-height:100dvh !important;
    overflow:hidden !important;
}

/* Colonna centrale: header fisso, contenuto adattivo. */
body.portal-body.portal-rc2:has(.chat-shell)
.main-column {
    display:flex !important;
    flex-direction:column !important;
    min-height:0 !important;
    height:100% !important;
    max-height:100% !important;
    overflow:hidden !important;
}

/* Riduzione degli spazi nella barra superiore. */
body.portal-body.portal-rc2:has(.chat-shell)
.main-column > header {
    flex:0 0 auto !important;
    min-height:0 !important;
    padding-top:6px !important;
    padding-bottom:6px !important;
}

/* Contenitore Chat: usa tutto lo spazio restante. */
body.portal-body.portal-rc2:has(.chat-shell)
.main-column > .content-shell {
    display:flex !important;
    flex-direction:column !important;
    flex:1 1 0 !important;
    box-sizing:border-box !important;
    height:auto !important;
    max-height:none !important;
    min-height:0 !important;
    min-width:0 !important;
    overflow:hidden !important;
    padding-top:8px !important;
    padding-bottom:8px !important;
}

/* Intestazione della pagina più compatta. */
body.portal-body.portal-rc2:has(.chat-shell)
.content-shell > :first-child:not(.chat-shell) {
    flex:0 0 auto !important;
    min-height:0 !important;
    margin-top:0 !important;
    margin-bottom:7px !important;
    padding-top:0 !important;
    padding-bottom:0 !important;
}

body.portal-body.portal-rc2:has(.chat-shell)
.content-shell > :first-child:not(.chat-shell) h1 {
    font-size:clamp(19px,2.1vw,25px) !important;
    line-height:1.2 !important;
    margin-top:0 !important;
    margin-bottom:3px !important;
}

body.portal-body.portal-rc2:has(.chat-shell)
.content-shell > :first-child:not(.chat-shell) p {
    margin-top:2px !important;
    margin-bottom:2px !important;
    font-size:12px !important;
}

/*
 * Chat centrale: non più altezza fissa 550px.
 * Si adatta automaticamente allo spazio disponibile.
 */
body.portal-body.portal-rc2:has(.chat-shell)
.content-shell > .chat-shell {
    display:grid !important;
    grid-template-columns:
        minmax(248px,31%) minmax(0,1fr) !important;
    grid-template-rows:minmax(0,1fr) !important;
    flex:1 1 0 !important;
    align-self:stretch !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    min-width:0 !important;
    overflow:hidden !important;
}

/* Lista conversazioni: scorre solo il suo elenco. */
body.portal-body.portal-rc2:has(.chat-shell)
.chat-shell > .chat-rooms {
    display:flex !important;
    flex-direction:column !important;
    height:auto !important;
    max-height:none !important;
    min-height:0 !important;
    min-width:0 !important;
    overflow:hidden !important;
}

body.portal-body.portal-rc2:has(.chat-shell)
.chat-shell > .chat-rooms > :not(.chat-room-list) {
    flex:0 0 auto !important;
}

body.portal-body.portal-rc2:has(.chat-shell)
.chat-shell .chat-room-list {
    flex:1 1 0 !important;
    height:auto !important;
    max-height:none !important;
    min-height:0 !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
}

/* Conversazione: mantiene visibili intestazione e scrittura. */
body.portal-body.portal-rc2:has(.chat-shell)
.chat-shell > .chat-conversation {
    display:flex !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    min-width:0 !important;
    overflow:hidden !important;
}

body.portal-body.portal-rc2:has(.chat-shell)
.chat-conversation > :not(.chat-messages) {
    flex-shrink:0 !important;
}

/* Solo la cronologia scorre: bolle non schiacciate. */
body.portal-body.portal-rc2:has(.chat-shell)
.chat-shell .chat-messages {
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
    flex:1 1 0 !important;
    box-sizing:border-box !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
}

/* Intestazione conversazione leggermente più compatta. */
body.portal-body.portal-rc2:has(.chat-shell)
.chat-conversation-head {
    min-height:49px !important;
    padding:6px 11px !important;
}

/* Piccolo riepilogo privacy, senza perdere il testo. */
body.portal-body.portal-rc2:has(.chat-shell)
.content-shell > .chat-privacy-note {
    flex:0 0 auto !important;
    margin:4px 0 0 !important;
    padding:0 !important;
    line-height:1.25 !important;
    font-size:10px !important;
}

/* Smartphone: elenco o conversazione, mai due aree schiacciate. */
@media(max-width:720px) {
    body.portal-body.portal-rc2:has(.chat-shell)
    .content-shell > .chat-shell {
        display:flex !important;
        flex-direction:column !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell:has(> .chat-conversation:not(.chat-no-room))
    > .chat-rooms {
        display:none !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell:has(> .chat-conversation:not(.chat-no-room))
    > .chat-conversation {
        flex:1 1 0 !important;
        height:auto !important;
        min-height:0 !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell:has(> .chat-no-room)
    > .chat-conversation {
        display:none !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell:has(> .chat-no-room)
    > .chat-rooms {
        display:flex !important;
        flex:1 1 0 !important;
        height:auto !important;
        min-height:0 !important;
        max-height:none !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .content-shell > :first-child:not(.chat-shell) {
        margin-bottom:5px !important;
    }
}

/* K68-CHATFIT01 END */


/* K68-CHATFIT02 START */

/*
 * Solo pagina Chat desktop.
 * Più spazio alle conversazioni senza modificare
 * la logica dei messaggi o il layout delle altre pagine.
 */

@media (min-width:721px) {

    /* Intestazione della pagina più bassa. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .content-shell > :first-child:not(.chat-shell) {
        box-sizing:border-box !important;
        min-height:0 !important;
        padding:7px 13px !important;
        margin:0 0 5px !important;
        gap:4px !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .content-shell > :first-child:not(.chat-shell) h1 {
        font-size:19px !important;
        line-height:1.15 !important;
        margin:1px 0 2px !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .content-shell > :first-child:not(.chat-shell) p {
        font-size:11px !important;
        line-height:1.25 !important;
        margin:0 !important;
    }

    /* Recupera gli spazi fra intestazione e Chat. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .main-column > .content-shell {
        gap:0 !important;
        padding-top:5px !important;
        padding-bottom:3px !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .content-shell > .chat-shell {
        flex:1 1 0 !important;
        min-height:0 !important;
        max-height:none !important;
        height:auto !important;
        margin:0 !important;
    }

    /* Testata della colonna conversazioni. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-rooms-head {
        min-height:0 !important;
        padding:8px 10px !important;
        margin:0 !important;
        gap:8px !important;
        flex:0 0 auto !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-rooms-head strong {
        font-size:16px !important;
        line-height:1.2 !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-rooms-head small {
        font-size:10px !important;
        line-height:1.2 !important;
        margin-top:2px !important;
    }

    /* Ricerca: una barra compatta. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-rooms-filter {
        display:flex !important;
        align-items:center !important;
        gap:5px !important;
        flex:0 0 auto !important;
        min-height:0 !important;
        padding:4px 8px !important;
        margin:0 !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-rooms-filter input,
    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-rooms-filter button {
        box-sizing:border-box !important;
        min-height:34px !important;
        height:34px !important;
        padding-top:5px !important;
        padding-bottom:5px !important;
        font-size:12px !important;
    }

    /* Collegamenti ricerca avanzata e notifiche. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-tools {
        display:flex !important;
        justify-content:space-between !important;
        align-items:center !important;
        gap:8px !important;
        min-height:0 !important;
        padding:3px 10px !important;
        margin:0 !important;
        flex:0 0 auto !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-tools a {
        font-size:11px !important;
        line-height:1.3 !important;
    }

    /* Schede Conversazioni / Archiviate. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-k59-switch {
        margin:4px 8px !important;
        padding:2px !important;
        gap:3px !important;
        flex:0 0 auto !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-k59-switch__tab {
        box-sizing:border-box !important;
        min-height:31px !important;
        height:auto !important;
        padding:5px 6px !important;
        font-size:12px !important;
        line-height:1.2 !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-section-caption {
        padding:3px 10px !important;
        margin:0 !important;
        min-height:0 !important;
        font-size:10px !important;
        line-height:1.25 !important;
        flex:0 0 auto !important;
    }

    /* Qui deve finire lo spazio recuperato:
       nell'elenco delle conversazioni. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell > .chat-rooms {
        display:flex !important;
        flex-direction:column !important;
        min-height:0 !important;
        max-height:none !important;
        overflow:hidden !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-room-list {
        flex:1 1 0 !important;
        min-height:0 !important;
        max-height:none !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        overscroll-behavior:contain;
    }

    /* Righe più compatte, senza restringere il testo. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-room-card {
        min-height:46px !important;
        padding:5px 8px !important;
        gap:7px !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-room-avatar {
        width:32px !important;
        height:32px !important;
        flex-basis:32px !important;
    }

    /* Pulsante rubrica sempre visibile, meno alto. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-sidebar-actions {
        flex:0 0 auto !important;
        padding:5px 8px !important;
        margin:0 !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-sidebar-actions a {
        box-sizing:border-box !important;
        min-height:32px !important;
        padding:6px 8px !important;
        font-size:12px !important;
        line-height:1.3 !important;
    }

    /* Non sottrarre spazio alla cronologia. */
    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-conversation-head {
        min-height:45px !important;
        padding:5px 10px !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-message-search {
        padding:4px 8px !important;
        margin:0 !important;
        flex:0 0 auto !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .chat-shell .chat-messages {
        flex:1 1 0 !important;
        min-height:0 !important;
        max-height:none !important;
        overflow-y:auto !important;
    }

    body.portal-body.portal-rc2:has(.chat-shell)
    .content-shell > .chat-privacy-note {
        margin:2px 0 0 !important;
        font-size:10px !important;
        line-height:1.2 !important;
    }
}

/* K68-CHATFIT02 END */


/* K68-CHATFIT03 START */

/*
 * Solo pagina Chat.
 * Si compattano le fasce informative inferiori,
 * senza modificare la barra di scrittura.
 */

/* Pulsante Rubrica e richieste e relativa fascia. */
body.portal-body.portal-rc2:has(.chat-shell)
.chat-rooms > .chat-room-list ~ * {
    box-sizing:border-box !important;
    flex:0 0 auto !important;
    min-height:0 !important;
    height:auto !important;
    margin-top:0 !important;
    margin-bottom:0 !important;
    padding-top:3px !important;
    padding-bottom:3px !important;
    line-height:1.2 !important;
}

body.portal-body.portal-rc2:has(.chat-shell)
.chat-rooms > .chat-room-list ~ * a {
    box-sizing:border-box !important;
    min-height:0 !important;
    height:auto !important;
    padding:3px 6px !important;
    margin:0 !important;
    font-size:11px !important;
    line-height:1.25 !important;
}

/* Nota privacy sotto la Chat. */
body.portal-body.portal-rc2:has(.chat-shell)
.chat-privacy-note {
    box-sizing:border-box !important;
    flex:0 0 auto !important;
    min-height:0 !important;
    height:auto !important;
    padding:2px 4px !important;
    margin:2px 0 0 !important;
    font-size:9px !important;
    line-height:1.2 !important;
}

/* Piè di pagina della sola schermata Chat. */
body.portal-body.portal-rc2:has(.chat-shell)
.portal-layout footer,
body.portal-body.portal-rc2:has(.chat-shell)
.main-column > .portal-footer,
body.portal-body.portal-rc2:has(.chat-shell)
.main-column > .app-footer,
body.portal-body.portal-rc2:has(.chat-shell)
.main-column > .footer {
    box-sizing:border-box !important;
    flex:0 0 auto !important;
    min-height:0 !important;
    height:auto !important;
    margin-top:0 !important;
    margin-bottom:0 !important;
    padding-top:3px !important;
    padding-bottom:3px !important;
    font-size:10px !important;
    line-height:1.2 !important;
}

/* Tutto lo spazio recuperato torna alla Chat. */
body.portal-body.portal-rc2:has(.chat-shell)
.content-shell > .chat-shell {
    flex:1 1 0 !important;
    min-height:0 !important;
}

body.portal-body.portal-rc2:has(.chat-shell)
.chat-shell .chat-room-list,
body.portal-body.portal-rc2:has(.chat-shell)
.chat-shell .chat-messages {
    flex:1 1 0 !important;
    min-height:0 !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
}

/* Nessuna riduzione ulteriore della composizione. */
body.portal-body.portal-rc2:has(.chat-shell)
.chat-compose-box {
    flex-shrink:0 !important;
}

/* K68-CHATFIT03 END */


/* K70-RUBRICA02R START */

.portal-body.portal-rc2 .chat-directory {
    display:flex;
    flex-direction:column;
    gap:12px;
    min-width:0;
}

.portal-body.portal-rc2 .chat-directory-search {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:8px;
    margin:0;
}

.portal-body.portal-rc2 .chat-directory-search label {
    grid-column:1/-1;
    font-size:12px;
    font-weight:650;
}

.portal-body.portal-rc2 .chat-directory-search input {
    box-sizing:border-box;
    min-width:0;
    width:100%;
    min-height:40px;
}

.portal-body.portal-rc2 .chat-directory-tabs {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
    background:rgba(102,151,190,.1);
    padding:4px;
    border-radius:12px;
}

.portal-body.portal-rc2 .chat-directory-tab {
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:5px;
    border-radius:9px;
    text-align:center;
    text-decoration:none;
    font-size:13px;
    color:var(--muted,#687b91);
}

.portal-body.portal-rc2 .chat-directory-tab.is-active {
    background:rgba(65,151,216,.19);
    color:var(--text,#243a51);
    font-weight:700;
}

.portal-body.portal-rc2 .chat-directory-summary {
    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
}

.portal-body.portal-rc2 .chat-directory-summary small,
.portal-body.portal-rc2 .chat-directory-note {
    font-size:12px;
    color:var(--muted,#687b91);
}

.portal-body.portal-rc2 .chat-directory-results {
    display:flex;
    flex-direction:column;
    overflow-y:auto;
    max-height:min(58vh,640px);
    min-height:75px;
    gap:5px;
    overscroll-behavior:contain;
}

.portal-body.portal-rc2 .chat-directory-row {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
    min-width:0;
    padding:11px 12px;
    border:1px solid var(--line,#d9e5ef);
    border-radius:10px;
}

.portal-body.portal-rc2 .chat-directory-person {
    display:flex;
    flex-direction:column;
    gap:3px;
    flex:1 1 170px;
    min-width:0;
}

.portal-body.portal-rc2 .chat-directory-person strong {
    font-size:13px;
    overflow-wrap:anywhere;
}

.portal-body.portal-rc2 .chat-directory-person small,
.portal-body.portal-rc2 .chat-directory-status {
    font-size:11px;
    color:var(--muted,#687b91);
}

.portal-body.portal-rc2 .chat-directory-row form {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
    margin:0;
}

.portal-body.portal-rc2 .chat-directory-row button {
    min-height:35px;
    border:1px solid #65a7d1;
    border-radius:8px;
    padding:6px 11px;
    background:#dfedf9;
    color:#175f92;
    font-size:12px;
    cursor:pointer;
}

.portal-body.portal-rc2 .chat-directory-row
.chat-directory-secondary {
    background:transparent;
    border-color:var(--line,#d9e5ef);
    color:inherit;
}

.portal-body.portal-rc2 .chat-directory-pages {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    font-size:13px;
}

.portal-body.portal-rc2 .chat-directory-info {
    padding:18px 10px;
    color:var(--muted,#687b91);
    text-align:center;
}

.portal-body.portal-rc2 .chat-directory-note {
    margin:0;
    line-height:1.5;
}

.portal-body.portal-rc2.hub-dark .chat-directory-tabs {
    background:#183951;
}

.portal-body.portal-rc2.hub-dark
.chat-directory-tab.is-active {
    background:#295d7a;
    color:#f3fbff;
}

.portal-body.portal-rc2.hub-dark .chat-directory-row {
    border-color:#3b5e77;
    background:#18354c;
}

.portal-body.portal-rc2.hub-dark
.chat-directory-row button {
    background:#245a7b;
    border-color:#568da9;
    color:#f0faff;
}

@media(max-width:720px) {
    .portal-body.portal-rc2 .chat-directory-tab {
        font-size:11px;
        padding:5px 2px;
    }
    .portal-body.portal-rc2 .chat-directory-row form {
        width:100%;
    }
}

/* K70-RUBRICA02R END */


/* K72-CHATWIDTH01 START */

/*
 * Chat Interna su tablet in visualizzazione ampia.
 * Non modifica sidebar globale, HR o altre pagine.
 */

@media
  (min-width:721px) and
  (max-width:1600px) and
  (any-pointer:coarse) {

  /* Recupera lo spazio vuoto ai lati della pagina. */
  body.portal-body.portal-rc2:has(.chat-shell)
  .main-column > .content-shell {
    box-sizing:border-box !important;
    width:calc(100% - 24px) !important;
    max-width:none !important;
    min-width:0 !important;
    margin-left:12px !important;
    margin-right:12px !important;
    padding-left:0 !important;
    padding-right:0 !important;
    align-self:stretch !important;
  }

  /* Anche la fascia superiore usa la nuova larghezza. */
  body.portal-body.portal-rc2:has(.chat-shell)
  .content-shell > :first-child:not(.chat-shell) {
    box-sizing:border-box !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
  }

  /* La Chat deve occupare tutta l'area disponibile. */
  body.portal-body.portal-rc2:has(.chat-shell)
  .content-shell > .chat-shell {
    box-sizing:border-box !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    grid-template-columns:
      minmax(260px,27%) minmax(0,1fr) !important;
  }

  /* Entrambe le colonne si adattano senza tagliare. */
  body.portal-body.portal-rc2:has(.chat-shell)
  .chat-shell > .chat-rooms,
  body.portal-body.portal-rc2:has(.chat-shell)
  .chat-shell > .chat-conversation {
    min-width:0 !important;
    max-width:none !important;
  }

  /* Cronologia e elenco rimangono indipendenti. */
  body.portal-body.portal-rc2:has(.chat-shell)
  .chat-room-list,
  body.portal-body.portal-rc2:has(.chat-shell)
  .chat-messages {
    min-width:0 !important;
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }
}

/* K72-CHATWIDTH01 END */


/* K79.10F.9 - scheda accessi compatta */
.portal-rc2 .user-access-compact {
  padding: 14px 16px;
}
.portal-rc2 .user-access-compact h2 {
  margin-bottom: 6px;
}
.portal-rc2 .user-access-compact h3 {
  margin: 12px 0 6px;
}
.portal-rc2 .user-access-compact p {
  margin: 5px 0;
}
.portal-rc2 .user-access-compact .user-access-item {
  padding: 10px 12px;
  margin: 7px 0;
}
.portal-rc2 .user-access-compact .field {
  margin: 7px 0;
}
.portal-rc2 .user-access-compact textarea {
  min-height: 70px;
}
.portal-rc2 .user-access-compact .form-actions {
  margin-top: 8px;
}
.portal-rc2 .user-access-compact .pill {
  margin: 7px 0;
}

/* K79.10F.13 - accessi ulteriormente compatti */
.portal-rc2 .user-access-compact {
  padding: 10px 12px;
}
.portal-rc2 .user-access-compact h2 {
  margin: 0 0 4px;
}
.portal-rc2 .user-access-compact h3 {
  margin: 8px 0 3px;
}
.portal-rc2 .user-access-compact p {
  margin: 3px 0;
}
.portal-rc2 .user-access-compact .user-access-item {
  padding: 7px 10px;
  margin: 5px 0;
}
.portal-rc2 .user-access-compact .field {
  margin: 4px 0;
}
.portal-rc2 .user-access-compact textarea {
  min-height: 54px;
}
.portal-rc2 .user-access-compact .form-actions {
  margin-top: 5px;
}
.portal-rc2 .user-access-compact .pill {
  margin: 4px 0;
}


/* CP261-MOBILE-DRAWER START */
/* Desktop invariato: controlli visibili solo su mobile. */
.cp261-nav-checkbox {
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.cp261-menu-button,
.cp261-drawer-close,
.cp261-nav-backdrop {
  display:none;
}

@media (max-width:720px) {
  body.portal-body {
    padding-bottom:env(safe-area-inset-bottom) !important;
  }

  body.portal-body .cp261-menu-button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    flex:0 0 auto;
    min-width:46px;
    min-height:44px;
    padding:7px 10px;
    border-radius:10px;
    cursor:pointer;
    font-size:14px;
    font-weight:650;
    color:inherit;
    background:rgba(125,150,180,.12);
  }
  .cp261-menu-button span:first-child {
    font-size:23px;
    line-height:1;
  }
  .cp261-menu-text {
    font-size:12px;
  }

  body.portal-body .cp261-nav-backdrop {
    display:none;
    position:fixed;
    inset:0;
    z-index:1098;
    background:rgba(9,20,35,.52);
    cursor:pointer;
  }

  body.portal-body .sidebar {
    position:fixed !important;
    inset:0 auto 0 0 !important;
    width:min(310px,86vw) !important;
    height:100dvh !important;
    min-height:0 !important;
    max-height:100dvh !important;
    padding:14px 12px
      calc(16px + env(safe-area-inset-bottom)) !important;
    z-index:1099 !important;
    display:flex !important;
    flex-direction:column !important;
    overflow-y:auto !important;
    transform:translateX(-105%) !important;
    visibility:hidden !important;
    transition:transform .2s ease,visibility .2s;
    box-sizing:border-box;
  }

  body.portal-body .sidebar .side-brand,
  body.portal-body .sidebar .side-user,
  body.portal-body .sidebar .side-exit {
    display:flex !important;
  }

  body.portal-body .sidebar .side-nav {
    display:flex !important;
    flex-direction:column !important;
    flex:1 0 auto !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    padding:8px 0 !important;
    gap:4px !important;
    scroll-snap-type:none !important;
  }

  body.portal-body .sidebar .side-link {
    display:flex !important;
    flex:0 0 auto !important;
    justify-content:flex-start !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:46px !important;
    padding:10px 12px !important;
    gap:11px !important;
    scroll-snap-align:none !important;
  }

  body.portal-body .sidebar .side-link > span:not(.side-ico),
  body.portal-body .sidebar .side-link > .side-count {
    display:inline-flex !important;
  }

  body.portal-body .sidebar .side-section-label {
    display:block !important;
  }

  body.portal-body .sidebar .cp261-drawer-close {
    display:flex !important;
    justify-content:flex-end;
    align-items:center;
    align-self:flex-end;
    min-height:44px;
    padding:8px 12px;
    cursor:pointer;
    font-size:14px;
    font-weight:650;
    color:inherit;
  }

  body.portal-body .cp261-nav-checkbox:checked
  ~ .cp261-nav-backdrop {
    display:block !important;
  }

  body.portal-body .cp261-nav-checkbox:checked
  ~ .sidebar {
    transform:translateX(0) !important;
    visibility:visible !important;
  }

  body.portal-body .main-column {
    margin-left:0 !important;
    width:100% !important;
    min-width:0 !important;
  }

  /* Chat: una schermata alla volta su smartphone. */
  body.portal-body .chat-shell {
    display:flex !important;
    flex-direction:column !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:calc(100dvh - 190px) !important;
    overflow:visible !important;
  }

  body.portal-body .chat-shell:not(.chat-mobile-open)
  > .chat-conversation {
    display:none !important;
  }

  body.portal-body .chat-shell.chat-mobile-open
  > .chat-rooms {
    display:none !important;
  }

  body.portal-body .chat-shell > .chat-rooms,
  body.portal-body .chat-shell > .chat-conversation {
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    min-height:calc(100dvh - 210px) !important;
    max-height:none !important;
    border-right:0 !important;
  }

  body.portal-body .chat-shell > .chat-rooms {
    display:flex !important;
    flex-direction:column !important;
  }

  body.portal-body .chat-shell .chat-room-list {
    flex:1 1 auto !important;
    min-height:220px !important;
    max-height:none !important;
    overflow-y:auto !important;
  }

  body.portal-body .chat-shell.chat-mobile-open
  > .chat-conversation {
    display:flex !important;
    flex-direction:column !important;
  }

  body.portal-body .chat-shell.chat-mobile-open
  .chat-messages {
    flex:1 1 auto !important;
    min-height:260px !important;
    max-height:calc(100dvh - 330px) !important;
    overflow-y:auto !important;
  }

  body.portal-body .chat-shell .chat-back {
    display:inline-flex !important;
    align-items:center;
    min-height:44px;
    padding:5px 9px;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.portal-body .sidebar {
    transition:none !important;
  }
}
/* CP261-MOBILE-DRAWER END */


/* R218-ZIP22: selettore ZIP operativo */
.module-manager-grid .module-zip-file-input {
    display: block !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    cursor: pointer;
    z-index: 1;
}
.module-manager-grid .module-zip-file-input::file-selector-button {
    cursor: pointer;
    padding: 10px 14px;
    margin-right: 12px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: transparent;
    color: inherit;
}

/* Logo animato originale del login VPS — soltanto Home. */

.portal-body.portal-rc2
.platform-home-hero-visual .hub-home-brand {
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
}

.portal-body.portal-rc2
.platform-home-hero-visual .hub-home-brand .portal-logo {
  position:relative;
  display:block;
  width:78px;
  height:78px;
  flex:0 0 78px;
  transform:scale(.88);
  transform-origin:center;
}

.portal-body.portal-rc2
.platform-home-hero-visual .hub-home-brand .portal-logo i {
  position:absolute;
  display:block;
  left:12px;
  width:54px;
  height:18px;
  border-radius:7px;
  transform:skewY(-23deg) rotate(30deg);
  box-shadow:0 7px 15px rgba(0,0,0,.18);
}

.portal-body.portal-rc2
.platform-home-hero-visual .hub-home-brand .portal-logo i:nth-child(1) {
  top:8px;
  background:#1ba1ff;
  animation:portalTileOne 3.2s ease-in-out infinite;
}

.portal-body.portal-rc2
.platform-home-hero-visual .hub-home-brand .portal-logo i:nth-child(2) {
  top:28px;
  background:#f43f5e;
  animation:portalTileTwo 3.2s ease-in-out infinite;
}

.portal-body.portal-rc2
.platform-home-hero-visual .hub-home-brand .portal-logo i:nth-child(3) {
  top:48px;
  background:#f5b400;
  animation:portalTileThree 3.2s ease-in-out infinite;
}

/* Keyframes originali, copiati dal login di produzione. */

@keyframes portalTileOne {
  0%,100%{transform:skewY(-23deg) rotate(30deg) translateX(0)}
  18%{transform:skewY(-23deg) rotate(30deg) translateX(7px)}
  36%{transform:skewY(-23deg) rotate(30deg) translateX(0)}
}

@keyframes portalTileTwo {
  0%,15%,100%{transform:skewY(-23deg) rotate(30deg) translateX(0)}
  34%{transform:skewY(-23deg) rotate(30deg) translateX(7px)}
  52%{transform:skewY(-23deg) rotate(30deg) translateX(0)}
}

@keyframes portalTileThree {
  0%,30%,100%{transform:skewY(-23deg) rotate(30deg) translateX(0)}
  50%{transform:skewY(-23deg) rotate(30deg) translateX(7px)}
  68%{transform:skewY(-23deg) rotate(30deg) translateX(0)}
}

/* Tema Giorno. */

.portal-body.portal-rc2.hub-light
.platform-home-hero-visual .platform-home-symbol {
  background:linear-gradient(145deg,#ffffff,#dceffd);
  border-color:rgba(36,126,178,.42);
  box-shadow:
    0 15px 35px rgba(14,61,105,.15),
    0 0 28px rgba(27,161,255,.12);
}

/* Tema Notte. */

.portal-body.portal-rc2.hub-dark
.platform-home-hero-visual .platform-home-symbol {
  background:linear-gradient(145deg,#164f76,#092c48);
  border-color:rgba(124,236,255,.60);
  box-shadow:
    0 15px 40px rgba(0,0,0,.34),
    0 0 35px rgba(54,205,232,.23);
}

/* Dimensione mobile. */

@media (max-width:720px) {
  .portal-body.portal-rc2
  .platform-home-hero-visual .hub-home-brand .portal-logo {
    transform:scale(.65);
  }
}

/* Accessibilità. */

@media (prefers-reduced-motion:reduce) {
  .portal-body.portal-rc2
  .platform-home-hero-visual .hub-home-brand .portal-logo i {
    animation:none!important;
  }
}

/* HG_R218_HOME_NIGHT_PALETTE_V1 */
/* Solo logo banner Home, solo tema Notte. */

.portal-body.portal-rc2.hub-dark
.platform-home-hero-visual .hub-home-brand
.portal-logo i:nth-child(1) {
  background:var(--blue,#21bedf);
  box-shadow:0 7px 15px rgba(0,0,0,.22),
             0 0 16px rgba(33,190,223,.30);
}

.portal-body.portal-rc2.hub-dark
.platform-home-hero-visual .hub-home-brand
.portal-logo i:nth-child(2) {
  background:var(--blue-2,#0083dd);
  box-shadow:0 7px 15px rgba(0,0,0,.22),
             0 0 16px rgba(0,131,221,.30);
}

.portal-body.portal-rc2.hub-dark
.platform-home-hero-visual .hub-home-brand
.portal-logo i:nth-child(3) {
  background:var(--green,#44d9b0);
  box-shadow:0 7px 15px rgba(0,0,0,.22),
             0 0 16px rgba(68,217,176,.30);
}

/* HG_R218_PAGE_NAV_LOADER_V1 */
/* Caricamento VPS adattato alle pagine R2.18. */

.portal-body.portal-rc2.hub-light {
  --hg-load-one:#1ba1ff;
  --hg-load-two:#f43f5e;
  --hg-load-three:#f5b400;
}

.portal-body.portal-rc2.hub-dark {
  --hg-load-one:var(--blue,#21bedf);
  --hg-load-two:var(--blue-2,#0083dd);
  --hg-load-three:var(--green,#44d9b0);
}

/* Barra superiore originale: 4 pixel. */

.portal-body.portal-rc2 .hg-page-loader-progress {
  position:fixed;
  z-index:10001;
  top:0;
  left:0;
  right:0;
  height:4px;
  opacity:0;
  overflow:hidden;
  pointer-events:none;
  background:rgba(22,119,232,.10);
  transition:opacity .15s ease;
}

.portal-body.portal-rc2 .hg-page-loader-progress::after {
  content:"";
  position:absolute;
  inset:0;
  width:42%;
  background:linear-gradient(
    90deg,
    var(--hg-load-one) 0%,
    var(--hg-load-two) 52%,
    var(--hg-load-three) 100%
  );
  transform:translateX(-120%);
}

.portal-body.portal-rc2.hg-page-navigation-loading
.hg-page-loader-progress {
  opacity:1;
}

.portal-body.portal-rc2.hg-page-navigation-loading
.hg-page-loader-progress::after {
  animation:hgPageNavProgress 1s ease-in-out infinite;
}

@keyframes hgPageNavProgress {
  0%{transform:translateX(-120%)}
  65%{transform:translateX(170%)}
  100%{transform:translateX(270%)}
}

/* Overlay: geometria della schermata VPS. */

.portal-body.portal-rc2 .hg-page-loader-overlay {
  position:fixed;
  z-index:10000;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease;
}

.portal-body.portal-rc2.hg-page-navigation-loading
.hg-page-loader-overlay {
  opacity:1;
  visibility:visible;
}

.portal-body.portal-rc2.hub-light
.hg-page-loader-overlay {
  background:rgba(238,244,250,.78);
}

.portal-body.portal-rc2.hub-dark
.hg-page-loader-overlay {
  background:rgba(4,17,32,.82);
}

.portal-body.portal-rc2 .hg-page-loader-card {
  width:min(330px,90vw);
  padding:30px;
  border-radius:22px;
  text-align:center;
}

.portal-body.portal-rc2.hub-light
.hg-page-loader-card {
  border:1px solid rgba(19,32,51,.09);
  background:rgba(255,255,255,.94);
  box-shadow:0 22px 70px rgba(22,40,65,.16);
}

.portal-body.portal-rc2.hub-dark
.hg-page-loader-card {
  border:1px solid rgba(124,236,255,.18);
  background:rgba(9,35,57,.96);
  box-shadow:
    0 22px 70px rgba(0,0,0,.40),
    0 0 28px rgba(33,190,223,.12);
}

/* Stesso marchio e movimento del login VPS. */

.portal-body.portal-rc2 .hg-page-loader-logo {
  position:relative;
  display:block;
  width:78px;
  height:78px;
  margin:0 auto 18px;
  transform:scale(.72);
  transform-origin:center;
}

.portal-body.portal-rc2 .hg-page-loader-logo i {
  position:absolute;
  display:block;
  left:12px;
  width:54px;
  height:18px;
  border-radius:7px;
  transform:skewY(-23deg) rotate(30deg);
  box-shadow:0 7px 15px rgba(0,0,0,.18);
}

.portal-body.portal-rc2 .hg-page-loader-logo i:nth-child(1) {
  top:8px;
  background:var(--hg-load-one);
  animation:portalTileOne 1.05s ease-in-out infinite;
}

.portal-body.portal-rc2 .hg-page-loader-logo i:nth-child(2) {
  top:28px;
  background:var(--hg-load-two);
  animation:portalTileTwo 1.05s ease-in-out infinite;
}

.portal-body.portal-rc2 .hg-page-loader-logo i:nth-child(3) {
  top:48px;
  background:var(--hg-load-three);
  animation:portalTileThree 1.05s ease-in-out infinite;
}

.portal-body.portal-rc2 .hg-page-loader-title {
  display:block;
  font-size:18px;
  font-weight:700;
  line-height:1.4;
}

.portal-body.portal-rc2 .hg-page-loader-subtitle {
  display:block;
  margin-top:5px;
  font-size:13px;
  line-height:1.5;
}

.portal-body.portal-rc2.hub-light
.hg-page-loader-title {
  color:#17253b;
}

.portal-body.portal-rc2.hub-light
.hg-page-loader-subtitle {
  color:#768297;
}

.portal-body.portal-rc2.hub-dark
.hg-page-loader-title {
  color:#edfaff;
}

.portal-body.portal-rc2.hub-dark
.hg-page-loader-subtitle {
  color:#a8c8dc;
}

/* Accessibilità: nessun movimento forzato. */

@media (prefers-reduced-motion:reduce) {
  .portal-body.portal-rc2 .hg-page-loader-logo i,
  .portal-body.portal-rc2 .hg-page-loader-progress::after {
    animation:none!important;
  }

  .portal-body.portal-rc2 .hg-page-loader-overlay {
    transition:none!important;
  }
}

/* HG_R218_CHAT_FULL_RESTYLE_22552_V4 */
/* Solo grafica: preserva disposizione, scorrimento e funzioni. */
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 {background:#edf5fa!important;border:1px solid #cbdde9!important;border-radius:20px!important;box-shadow:0 16px 40px #23466619!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-rooms {background:#f9fcff!important;border-right:1px solid #d4e4ef!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-rooms-head {background:#f0f7fc!important;border-bottom:1px solid #dce9f1!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-rooms-filter input {border-radius:14px!important;background:#fff!important;border-color:#d3e3ef!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-room-card {background:transparent!important;border:1px solid transparent!important;border-radius:14px!important;transition:background-color .15s,border-color .15s}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-room-card:is(:hover,:focus-visible) {background:#eaf3fa!important;border-color:#d4e6f2!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-room-card.active {background:#deedf9!important;border-color:#b5d8f1!important;box-shadow:inset 3px 0 0 #1685b8!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-room-avatar {border-radius:14px!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-conversation:not(.chat-no-room) {background:linear-gradient(145deg,#edf6fb,#e0edf6)!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-conversation-head {background:#f8fcff!important;border-bottom:1px solid #d5e4ee!important;box-shadow:0 2px 8px #244a680b!important}
/* HG_R218_CHAT_ORGANIC_WALLPAPER_22552_V6 */
/* Curve, petali e anelli sovrapposti: solo sfondo conversazioni. */
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-messages {
  background-color:#e6f2f9!important;
  background-image:
    radial-gradient(ellipse 57px 31px at 68px 67px,transparent 86%,rgba(56,131,174,.22) 89% 93%,transparent 97%),
    radial-gradient(ellipse 29px 55px at 103px 100px,transparent 86%,rgba(70,147,186,.19) 89% 93%,transparent 97%),
    radial-gradient(ellipse 51px 19px at 161px 120px,transparent 84%,rgba(62,137,180,.19) 89% 93%,transparent 97%),
    radial-gradient(ellipse 24px 40px at 196px 68px,rgba(92,167,196,.10) 0 67%,transparent 74%),
    radial-gradient(ellipse 33px 27px at 50px 181px,transparent 82%,rgba(83,149,183,.17) 87% 93%,transparent 97%),
    radial-gradient(ellipse 19px 35px at 215px 181px,rgba(77,148,188,.11) 0 68%,transparent 76%),
    radial-gradient(circle 2px at 130px 28px,rgba(51,130,173,.22) 80%,transparent 100%),
    linear-gradient(145deg,#eef8fc,#dfeef7)!important;
  background-size:293px 221px,267px 269px,334px 277px,315px 244px,279px 263px,361px 289px,147px 173px,100% 100%!important;
  background-position:0 0,42px 13px,75px 44px,16px 86px,109px 31px,36px 52px,18px 22px,0 0!important;
  background-repeat:repeat,repeat,repeat,repeat,repeat,repeat,repeat,no-repeat!important;
}
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-messages {
  background-color:#172d3d!important;
  background-image:
    radial-gradient(ellipse 57px 31px at 68px 67px,transparent 86%,rgba(126,186,220,.16) 89% 93%,transparent 97%),
    radial-gradient(ellipse 29px 55px at 103px 100px,transparent 86%,rgba(121,177,211,.15) 89% 93%,transparent 97%),
    radial-gradient(ellipse 51px 19px at 161px 120px,transparent 84%,rgba(121,186,219,.15) 89% 93%,transparent 97%),
    radial-gradient(ellipse 24px 40px at 196px 68px,rgba(125,188,221,.08) 0 67%,transparent 74%),
    radial-gradient(ellipse 33px 27px at 50px 181px,transparent 82%,rgba(125,188,221,.13) 87% 93%,transparent 97%),
    radial-gradient(ellipse 19px 35px at 215px 181px,rgba(125,188,221,.08) 0 68%,transparent 76%),
    linear-gradient(145deg,#20394a,#162b3b)!important;
  background-size:293px 221px,267px 269px,334px 277px,315px 244px,279px 263px,361px 289px,100% 100%!important;
  background-position:0 0,42px 13px,75px 44px,16px 86px,109px 31px,36px 52px,0 0!important;
  background-repeat:repeat,repeat,repeat,repeat,repeat,repeat,no-repeat!important;
}
/* Le bolle con colorazione personalizzata non vengono alterate. */
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-bubble:not(.chat-k62-colored) {background:#fff!important;border:1px solid #dce8f0!important;border-radius:18px 18px 18px 5px!important;box-shadow:0 3px 12px #26496812!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-bubble.mine:not(.chat-k62-colored) {background:#d6effd!important;border-color:#bddff2!important;border-radius:18px 18px 5px 18px!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-compose-box {background:#f8fbfe!important;border-top:1px solid #d4e4ee!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-composer {background:#fff!important;border:1px solid #cbdfe9!important;border-radius:18px!important;box-shadow:0 3px 12px #2d56780d!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-composer textarea {background:transparent!important;border-color:transparent!important;box-shadow:none!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-send-button {background:#1287b6!important;color:#fff!important;border-radius:13px!important;box-shadow:0 4px 10px #1287b631!important}
body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-send-button:hover {background:#0e719d!important}
/* Tema scuro effettivo del portale. */
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 {background:#152b3a!important;border-color:#34536b!important}
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-rooms,body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-rooms-head,body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-conversation-head,body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-compose-box {background:#1d3547!important;border-color:#365369!important}
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-conversation:not(.chat-no-room) {background:linear-gradient(145deg,#193142,#142838)!important}
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-room-card.active {background:#284c63!important;border-color:#3b7598!important}
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-room-card:is(:hover,:focus-visible) {background:#29485e!important;border-color:#3b607a!important}
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-bubble:not(.chat-k62-colored) {background:#263d50!important;border-color:#38596e!important}
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-bubble.mine:not(.chat-k62-colored) {background:#1d5270!important;border-color:#367595!important}
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-composer {background:#243f52!important;border-color:#45647a!important}
body.portal-body.portal-rc2.hub-dark .content-shell .chat-shell.chat-r217 .chat-composer textarea {color:#f1f7fc!important}
@media(max-width:760px){body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 {border-radius:14px!important}body.portal-body.portal-rc2 .content-shell .chat-shell.chat-r217 .chat-bubble{max-width:88%!important}}

/* HG_R218_CHAT_BANNER_ASSET_FIX_22552_V2 */
/* HG_R218_CHAT_QUICK_BANNER_22552_V1 */
.hg-chat-quick[hidden], .hg-chat-quick-detail[hidden] {display:none!important}
.hg-chat-quick {
  position:fixed;z-index:3500;right:max(14px,env(safe-area-inset-right));
  bottom:calc(14px + env(safe-area-inset-bottom));
  width:min(370px,calc(100vw - 28px));overflow:hidden;
  border:1px solid #bed7e9;border-radius:18px;
  background:#fafdff;color:#203e56;
  box-shadow:0 12px 40px #163a5b3e;
  font:inherit;isolation:isolate;
}
.hg-chat-quick-head {display:flex;align-items:stretch;background:#f0f8fd}
.hg-chat-quick-bar {flex:1;min-width:0;display:flex;align-items:center;
  gap:10px;padding:11px 12px;border:0;background:transparent;
  color:inherit;font:inherit;text-align:left;cursor:pointer}
.hg-chat-quick-icon {display:grid;place-items:center;flex:none;
  width:35px;height:35px;border-radius:12px;background:#d8edf9;
  color:#117eae;font-size:18px}
.hg-chat-quick-intro {min-width:0;display:flex;flex-direction:column;gap:2px}
.hg-chat-quick-intro strong {font-size:13px;font-weight:750}
.hg-chat-quick-intro small {font-size:12px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;color:#5c7890}
.hg-chat-quick-chevron {margin-left:auto;color:#6289a2;font-size:17px}
.hg-chat-quick-close {width:36px;flex:none;border:0;background:transparent;
  color:#6e8799;font-size:24px;cursor:pointer}
.hg-chat-quick-detail {padding:0 13px 13px;border-top:1px solid #d7e8f3}
.hg-chat-quick-message {max-height:180px;overflow:auto;white-space:pre-wrap;
  overflow-wrap:anywhere;line-height:1.5;padding:12px 0;font-size:13px}
.hg-chat-quick-form {display:flex;gap:7px;align-items:flex-end}
.hg-chat-quick-draft {flex:1;min-width:0;max-height:115px;resize:vertical;
  padding:9px 10px;background:#fff;border:1px solid #c8ddea;
  border-radius:12px;color:#233f55;font:inherit;font-size:13px}
.hg-chat-quick-send {flex:none;padding:10px 13px;border:0;border-radius:12px;
  background:#1388b7;color:white;font:inherit;font-size:12px;
  font-weight:700;cursor:pointer}
.hg-chat-quick-send:disabled {opacity:.55;cursor:default}
.hg-chat-quick-status {font-size:12px;color:#875d31;padding-top:5px}
.hg-chat-quick-status:empty {display:none}
body.hub-dark .hg-chat-quick {background:#1a3346;color:#e8f5fb;
  border-color:#46667b;box-shadow:0 14px 35px #0008}
body.hub-dark .hg-chat-quick-head {background:#213e52}
body.hub-dark .hg-chat-quick-icon {background:#30546a;color:#b1e6fa}
body.hub-dark .hg-chat-quick-intro small {color:#b0c9d7}
body.hub-dark .hg-chat-quick-detail {border-color:#426074}
body.hub-dark .hg-chat-quick-draft {background:#193044;color:#f1f9fd;
  border-color:#53758b}
@media(max-width:600px) {
  .hg-chat-quick {right:10px;left:10px;width:auto;
    bottom:calc(10px + env(safe-area-inset-bottom))}
}


/* HG_R218_DIRECTORY_MULTIPAGE_EXPORT_22552_V1 */
.hg-dir-select-controls, .hg-dir-export-actions {display:flex;gap:.55rem;flex-wrap:wrap;align-items:center;margin:.7rem 0}
.hg-dir-select-controls button {font-size:.86rem;padding:.55rem .8rem}
.hg-dir-fields {display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .95rem;margin:.65rem 0 1rem}
.hg-dir-field {display:inline-flex;align-items:center;gap:.35rem;margin:0;padding:.28rem .35rem;font-size:.84rem;line-height:1.35;white-space:nowrap}
.hg-dir-field input {width:15px;height:15px;margin:0;flex:none}
.hg-dir-export .hg-dir-mandatory {margin:.7rem 0 .35rem;font-size:.89rem}
.hg-dir-export .hg-dir-small {font-size:.82rem}
.hg-dir-select-row, #hg-dir-select-page {width:17px;height:17px}
@media(max-width:680px){.hg-dir-select-controls button {flex:1 1 auto}.hg-dir-field{white-space:normal}.hg-dir-export-actions button{flex:1 1 auto}}


/* HG_R218_DIRECTORY_EXPORT_ACCORDION_22552_V1 */
details.hg-dir-export-fold {padding:0; overflow:hidden; margin:.85rem 0 1.2rem}
details.hg-dir-export-fold > summary.hg-dir-export-summary {
  cursor:pointer; display:flex; gap:.4rem 1rem; align-items:center;
  justify-content:space-between; flex-wrap:wrap; padding:1rem 1.2rem;
  list-style:none; font-size:1rem; font-weight:650;
}
details.hg-dir-export-fold > summary.hg-dir-export-summary::-webkit-details-marker {display:none}
details.hg-dir-export-fold > summary.hg-dir-export-summary::after {
  content:'⌄'; font-size:1.4rem; font-weight:400; line-height:1; margin-left:auto;
}
details.hg-dir-export-fold[open] > summary.hg-dir-export-summary::after {content:'⌃'}
details.hg-dir-export-fold > summary.hg-dir-export-summary:focus-visible {
  outline:2px solid currentColor; outline-offset:-3px;
}
.hg-dir-export-summary-text {font-weight:700}
.hg-dir-export-summary-hint {color:inherit; opacity:.72; font-size:.81rem; font-weight:400}
.hg-dir-export-panel {padding:.15rem 1.2rem 1.05rem; border-top:1px solid rgba(128,128,128,.18)}
.hg-dir-export-panel .hg-dir-select-controls {margin-top:.85rem}
@media (max-width:700px) {
  details.hg-dir-export-fold > summary.hg-dir-export-summary {padding:.85rem}
  .hg-dir-export-panel {padding:.15rem .85rem .9rem}
  .hg-dir-export-summary-hint {flex-basis:100%; order:2}
}

/* HG_R218_HR_V2_CSS_MAIN_22552_V2B | Home HR only. */
.hg-hr-v2-panel{box-sizing:border-box;width:100%;margin:18px 0 20px;padding:20px;background:var(--card,var(--surface,#fff));border:1px solid var(--line,rgba(130,150,170,.28));border-radius:16px}
.hg-hr-v2-head h2{margin:0;font-size:1.15rem}
.hg-hr-v2-head p{margin:5px 0 18px;font-size:.89rem;color:var(--muted,#75849a)}
.hg-hr-v2-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.hg-hr-v2-panel .hg-hr-v2-action{box-sizing:border-box;display:flex;position:relative;flex-direction:column;align-items:flex-start;min-height:100px;padding:17px 36px 17px 16px;border-radius:12px;border:1px solid var(--line,rgba(130,150,170,.28));background:var(--surface,var(--bg,#f7fafc));color:inherit;text-decoration:none;white-space:normal;line-height:1.32;box-shadow:none}
.hg-hr-v2-action strong{font-size:.98rem;font-weight:650}
.hg-hr-v2-action small{margin-top:8px;font-size:.82rem;color:var(--muted,#75849a);font-weight:400}
.hg-hr-v2-action span{position:absolute;right:14px;top:13px;font-size:1.12rem}
.hg-hr-v2-action:hover{border-color:var(--primary,#2697bc)}
.hg-hr-v2-action:focus-visible{outline:3px solid var(--primary,#2697bc);outline-offset:2px}
@media(max-width:800px){.hg-hr-v2-panel{padding:14px}.hg-hr-v2-grid{grid-template-columns:1fr}.hg-hr-v2-panel .hg-hr-v2-action{min-height:80px}}


/* HG_R218_SHARED_EMPLOYEE_PHOTO_22552_V1: fascicoli HR + Anagrafica Semplice */
.hg-photo-hr-avatar{width:78px;height:78px;min-width:78px;object-fit:cover;border-radius:50%;border:2px solid var(--line,#dde4ea);background:#e9eef2;display:block}
.hg-employee-photo-block{grid-column:1/-1;display:flex;align-items:center;justify-content:center;flex-direction:column;width:132px;min-height:132px;max-width:100%;gap:7px;padding:8px;margin:2px 0 12px;border-radius:14px;border:1px solid var(--line,#dce3eb)}
.hg-employee-photo-block .hg-photo-portrait{display:block;width:112px;height:112px;border-radius:12px;object-fit:cover;background:#edf2f6}
.hg-employee-photo-block.hg-photo-empty{color:var(--muted,#64748b)}
.hg-photo-empty span{font-size:42px;line-height:1}
.hg-photo-empty small{font-size:.8rem}
.hg-photo-edit{margin:14px 0}.hg-photo-edit summary{font-weight:600;cursor:pointer}.hg-photo-edit input[type=file]{max-width:100%}

/* HG_R218_HR_FASCICOLO_LAYOUT_22552_V1 | Scheda HR: solo layout */
.hg-hr-fascicolo-v1{width:100%;min-width:0}
.hg-hr-fascicolo-v1 .hg-hr-profile-v1{display:grid;grid-template-columns:108px minmax(0,1fr) auto;gap:12px 18px;align-items:center;min-width:0;padding:22px}
.hg-hr-fascicolo-v1 .hg-hr-profile-v1 .hg-photo-hr-avatar,.hg-hr-fascicolo-v1 .hg-hr-profile-v1 .hr-profile-avatar{width:108px;height:108px;min-width:108px;object-fit:cover;border-radius:18px}
.hg-hr-fascicolo-v1 .hg-hr-profile-v1>div:not(.hg-hr-v1-photo-slot){min-width:0}
.hg-hr-v1-unassigned{display:inline-block;padding:7px 11px;border:1px solid var(--line,rgba(130,150,170,.36));border-radius:20px;font-size:.8rem;line-height:1.25;color:var(--muted,#66788a)}
.hg-hr-v1-photo-slot{grid-column:1/-1;min-width:0}
.hg-hr-v1-photo-slot .hg-photo-edit{margin:0;background:transparent;border:0;box-shadow:none;padding:0}
.hg-hr-v1-photo-slot .hg-photo-edit>summary{cursor:pointer;display:inline-flex;align-items:center;min-height:39px;border:1px solid var(--line,rgba(130,150,170,.4));border-radius:10px;padding:9px 12px;font-size:.88rem}
.hg-hr-v1-photo-slot .hg-photo-edit>form{margin-top:12px}
.hg-hr-v1-id{grid-column:1/-1;color:var(--muted,#66788a);font-size:.78rem}
.hg-hr-v1-id summary{cursor:pointer;display:inline-block}
.hg-hr-v1-id code{display:block;margin-top:8px;overflow-wrap:anywhere}
.hg-hr-v1-section{box-sizing:border-box;display:block;border:1px solid var(--line,rgba(130,150,170,.28));border-radius:14px;background:var(--card,var(--surface,#fff));margin:14px 0;overflow:hidden}
.hg-hr-v1-section>summary{list-style:none;display:flex;gap:12px;justify-content:space-between;align-items:center;cursor:pointer;padding:18px 20px;font-weight:650;font-size:1rem;min-height:52px}
.hg-hr-v1-section>summary::-webkit-details-marker,.hg-hr-v1-form-fold>summary::-webkit-details-marker{display:none}
.hg-hr-v1-section>summary:focus-visible,.hg-hr-v1-form-fold>summary:focus-visible{outline:3px solid var(--primary,#1aa5cf);outline-offset:-3px}
.hg-hr-v1-section[open]>summary{border-bottom:1px solid var(--line,rgba(130,150,170,.18))}
.hg-hr-v1-chevron{font-size:1.2rem;color:var(--muted,#748294);transition:transform .15s ease}
.hg-hr-v1-section[open] .hg-hr-v1-chevron{transform:rotate(180deg)}
.hg-hr-v1-section-content>.card{margin:0!important;border:0!important;box-shadow:none!important;border-radius:0!important;background:transparent!important}
.hg-hr-v1-section-content>.card>h2:first-child{display:none}
.hg-hr-v1-section-content{min-width:0}
.hg-hr-v1-form-fold{margin:14px 0;border:1px solid var(--line,rgba(130,150,170,.28));border-radius:12px;overflow:hidden}
.hg-hr-v1-form-fold>summary{cursor:pointer;padding:13px 15px;font-weight:600;list-style:none}
.hg-hr-v1-form-fold[open]>summary{border-bottom:1px solid var(--line,rgba(130,150,170,.18))}
.hg-hr-v1-form-body{padding:14px}
.hg-hr-v1-form-body>form{margin:0}
@media(max-width:700px){.hg-hr-fascicolo-v1 .hg-hr-profile-v1{grid-template-columns:86px minmax(0,1fr);padding:14px;gap:10px}.hg-hr-fascicolo-v1 .hg-hr-profile-v1 .hg-photo-hr-avatar,.hg-hr-fascicolo-v1 .hg-hr-profile-v1 .hr-profile-avatar{width:86px;height:86px;min-width:86px}.hg-hr-profile-v1>.hr-status,.hg-hr-v1-unassigned{grid-column:2}.hg-hr-v1-section>summary{padding:14px}.hg-hr-v1-section-content>.card{padding:14px!important}}

/* HG_R218_INLINE_VALIDATION_22552_V1 */
.hg-inline-error-banner {
  margin: 0 0 16px; padding: 12px 14px;
  border: 1px solid #cb4545; border-left: 4px solid #cb4545;
  border-radius: 8px; background: rgba(203,69,69,.075);
  color: inherit; font-size: .94rem; line-height: 1.45;
}
.hg-inline-invalid { outline: 2px solid #cb4545 !important; outline-offset: 1px; }
.hg-inline-field-error { display:block; color:#ba3333; font-size:.82rem; margin:4px 0 8px; }

/* HG_R218_EMPLOYEE_TURNAZIONI_22552_V1 */
.hg-shift-summary .hg-shift-weeks{margin-top:10px}
.hg-shift-weeks{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,460px),1fr));gap:12px}
.hg-shift-weeks .card{min-width:0}
.hg-shift-weeks td{font-size:.83rem;white-space:normal;vertical-align:top}
form[data-hg-shift-preview] input[type=number]{width:100%;min-height:40px}

/* HG_R218_HR_NIGHT_CONTRAST_22552_V1B | dark-only; HR only; no changes to light theme. */
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-v2-panel,.hg-hr-v2-action,.hr-directory,.hr-profile,.hg-hr-profile-v1,.hg-hr-v1-section,.hg-hr-v1-form-fold,.hg-hr-contract-settings,.hg-shift-summary,.hg-shift-weeks .card,.hg-hr-fascicolo-v1 .card,.hr-directory .card){background:#1b2c3e!important;background-image:none!important;color:#eef5ff!important;border-color:#456078!important;box-shadow:none!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-v2-action,.hg-hr-v2-panel .hg-hr-v2-action){background:#24394e!important;color:#eef5ff!important;border-color:#526f88!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-v2-action:hover,.hg-hr-v2-panel .hg-hr-v2-action:hover,.hg-hr-v1-section>summary:hover,.hg-hr-v1-form-fold>summary:hover){background:#314b63!important;color:#ffffff!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-v1-section-content>.card,.hg-hr-v1-photo-slot .hg-photo-edit){background:transparent!important;background-image:none!important;color:#eef5ff!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-v2-panel h2,.hg-hr-v2-action strong,.hg-hr-v2-action small,.hr-directory h2,.hr-directory h3,.hr-directory strong,.hr-person,.hr-person strong,.hg-hr-fascicolo-v1 h1,.hg-hr-fascicolo-v1 h2,.hg-hr-fascicolo-v1 h3,.hg-hr-fascicolo-v1 strong,.hg-hr-fascicolo-v1 .detail-grid strong,.hg-hr-v1-section>summary,.hg-hr-v1-form-fold>summary,.hg-hr-contract-settings h2,.hg-shift-summary h2,.hg-shift-weeks h3){color:#f4f8ff!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-v2-panel p,.hg-hr-v2-panel small,.hg-hr-v2-head p,.hg-hr-v2-action small,.hr-directory .muted,.hr-filter-bar label,.hg-hr-fascicolo-v1 .muted,.hg-hr-fascicolo-v1 .hint,.hg-hr-fascicolo-v1 small,.hg-hr-fascicolo-v1 .hg-hr-v1-id,.hg-hr-fascicolo-v1 .hg-hr-v1-chevron,.hr-security-note,.hg-shift-summary .muted,.hg-shift-weeks small){color:#bdd0e3!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-filter-bar input,.hr-filter-bar select,.hg-hr-fascicolo-v1 input:not([type="checkbox"]):not([type="radio"]),.hg-hr-fascicolo-v1 select,.hg-hr-fascicolo-v1 textarea,.hg-hr-contract-settings input,.hg-hr-contract-settings select,.hg-shift-summary input,.hg-shift-summary select,form[action="/hr/save"] input,form[action="/hr/save"] select,form[action="/hr/save"] textarea,form[action="/hr/relationship/create"] input,form[action="/hr/relationship/create"] select,form[action="/hr/relationship/create"] textarea,form[action="/hr/relationship/operation"] input,form[action="/hr/relationship/operation"] select,form[action="/employee-turnazione/save"] input,form[action="/employee-turnazione/save"] select){background:#101e2e!important;background-image:none!important;color:#f2f7fd!important;border:1px solid #668198!important;color-scheme:dark;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) .hr-filter-bar input::placeholder,
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) .hg-hr-fascicolo-v1 input::placeholder,
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) .hg-hr-fascicolo-v1 textarea::placeholder,
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) form[action="/hr/save"] input::placeholder,
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) form[action="/hr/relationship/create"] input::placeholder{color:#9cb6cf!important;opacity:1!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-filter-bar input:focus-visible,.hr-filter-bar select:focus-visible,.hg-hr-fascicolo-v1 input:focus-visible,.hg-hr-fascicolo-v1 select:focus-visible,.hg-hr-fascicolo-v1 textarea:focus-visible,.hg-hr-v1-section>summary:focus-visible,.hg-hr-v1-form-fold>summary:focus-visible){outline:3px solid #6cdbfa!important;outline-offset:2px;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-directory .table,.hr-directory table,.hg-hr-fascicolo-v1 .table,.hg-hr-fascicolo-v1 table,.hg-shift-weeks .table,.hg-shift-weeks table){background:#1b2c3e!important;color:#edf5ff!important;border-color:#486077!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-directory th,.hr-directory thead,.hg-hr-fascicolo-v1 th,.hg-hr-fascicolo-v1 thead,.hg-shift-weeks th,.hg-shift-weeks thead){background:#294158!important;color:#f6faff!important;border-color:#54718a!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-directory td,.hr-directory tbody tr,.hg-hr-fascicolo-v1 td,.hg-hr-fascicolo-v1 tbody tr,.hg-shift-weeks td,.hg-shift-weeks tbody tr){background-color:#1c2e40!important;color:#f0f7ff!important;border-color:#415a73!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-directory tbody tr:hover td,.hg-hr-fascicolo-v1 tbody tr:hover td,.hg-shift-weeks tbody tr:hover td){background:#294159!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-shift-weeks td[style*="background"]){background:#304153!important;color:#f4f7fc!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-fascicolo-v1 .detail-grid>div,.hg-hr-fascicolo-v1 .hg-hr-v1-form-body,.hg-hr-fascicolo-v1 .hg-employee-photo-block){background:#203449!important;color:#eff6ff!important;border-color:#4e6880!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-open,.hr-person,.hg-hr-fascicolo-v1 a:not(.button),.hg-shift-summary a:not(.button)){color:#8cddff!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-open:hover,.hr-person:hover,.hg-hr-fascicolo-v1 a:hover){color:#c2f1ff!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-directory .button-outline,.hg-hr-fascicolo-v1 .button-outline,.hg-hr-v1-photo-slot .hg-photo-edit>summary,.hg-shift-summary .button-outline){background:#23394e!important;border-color:#81a4c1!important;color:#e9f6ff!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-directory .button-outline:hover,.hg-hr-fascicolo-v1 .button-outline:hover,.hg-hr-v1-photo-slot .hg-photo-edit>summary:hover){background:#35516a!important;color:#ffffff!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hr-directory .button:not(.button-outline),.hg-hr-fascicolo-v1 .button:not(.button-outline),.hg-shift-summary .button:not(.button-outline)){background:#45c9e8!important;border-color:#45c9e8!important;color:#072436!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-fascicolo-v1 p,.hg-hr-fascicolo-v1 label,.hg-hr-fascicolo-v1 .detail-grid,.hr-directory td strong,.hr-directory label span,.hg-shift-weeks td strong){color:#e7f2ff!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-v1-unassigned,.hg-hr-fascicolo-v1 .hr-status){background:#304153!important;border-color:#668198!important;color:#f0f7ff!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-fascicolo-v1 .hr-status-active){background:#193d36!important;color:#b5f5d7!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-fascicolo-v1 .hr-status-ended){background:#482c35!important;color:#ffccd2!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-v1-section>summary,.hg-hr-v1-form-fold>summary){background:#23384c!important;border-color:#496078!important;}
.portal-body.portal-rc2.hub-dark:has(:is(.hg-hr-v2-panel,.hr-directory,.hg-hr-fascicolo-v1,.hg-hr-contract-settings,.hg-shift-summary,form[action="/hr/save"],form[action="/hr/relationship/create"],form[action="/hr/relationship/operation"],form[action="/employee-turnazione/save"],form[action="/hr/document/upload"])) :is(.hg-hr-v1-section[open]>summary,.hg-hr-v1-form-fold[open]>summary){background:#294158!important;border-bottom:1px solid #56718b!important;}
.portal-body.portal-rc2.hub-dark:has(.hg-hr-v2-panel) :is(.metrics .metric,.metrics>.card,.metrics>*,.metric-card){background:#1b2c3e!important;color:#eef5ff!important;border-color:#456078!important;background-image:none!important;}
.portal-body.portal-rc2.hub-dark:has(.hg-hr-v2-panel) :is(.metrics strong,.metrics .value,.metrics .number,.metrics h3){color:#f6faff!important;}
.portal-body.portal-rc2.hub-dark:has(.hg-hr-v2-panel) :is(.metrics small,.metrics .muted,.metrics p){color:#bfd0e0!important;}

/* HG_R218_TURNAZIONI_NUMERICHE_PER_SETTIMANA_22552_V2 */
.hg-shift-v2-weeks{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,430px),1fr));gap:12px;margin:12px 0}
.hg-shift-v2-week{min-width:0;margin:12px 0;padding:14px}
.hg-shift-v2-week h3{margin:0 0 14px}
.hg-shift-v2-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-top:10px}
.hg-shift-v2-day{display:flex;flex-direction:column;gap:6px;min-width:0;align-items:center;justify-content:center;padding:9px 2px;border:1px solid var(--line,#bcc8d8);border-radius:8px;background:var(--panel,#fff);color:var(--ink,#18243b);text-align:center}
.hg-shift-v2-day strong{font-size:11px;letter-spacing:.03em}
.hg-shift-v2-day span{font-size:10px;overflow-wrap:anywhere}
.hg-shift-v2-day.is-rest{background:rgba(107,121,143,.14)}
.hg-shift-v2-day.is-before{opacity:.65;background:var(--bg,#e4e9f1)}
.hg-shift-v2-day.is-work{background:rgba(25,146,121,.12)}
.hg-shift-v2-editor .hg-shift-v2-grid{grid-template-columns:repeat(7,minmax(70px,1fr));overflow-x:auto}
.hg-shift-v2-editor .hg-shift-v2-day select{width:100%;max-width:100%;min-height:40px;margin:0;padding:3px 0;font-size:11px;color:var(--ink,#18243b);background:var(--panel,#fff);border:1px solid var(--line,#bcc8d8);border-radius:6px}
.hg-shift-v2-error{border-left:4px solid #b91c1c;background:rgba(185,28,28,.12);padding:12px;border-radius:4px;color:var(--ink,#18243b)}
body.portal-body.portal-rc2.hub-dark .hg-shift-v2-day{background:#142940;border-color:#42617b;color:#eff8ff}
body.portal-body.portal-rc2.hub-dark .hg-shift-v2-day.is-work{background:#153d3c}
body.portal-body.portal-rc2.hub-dark .hg-shift-v2-day.is-rest{background:#303750}
body.portal-body.portal-rc2.hub-dark .hg-shift-v2-editor .hg-shift-v2-day select{color:#f1f8ff;background:#0e2338;border-color:#58738d}
body.portal-body.portal-rc2.hub-dark .hg-shift-v2-error{color:#ffe5e5;background:#4b2430}
@media(max-width:700px){.hg-shift-v2-grid{gap:3px}.hg-shift-v2-day{padding:7px 1px}.hg-shift-v2-day span{font-size:9px}.hg-shift-v2-editor .hg-shift-v2-day select{font-size:10px}}

/* HG_R218_SHIFT_HISTORY_ACCORDION_22552_V3D | solo pannelli turnazioni */
.portal-body.portal-rc2 .hg-shift-v3-master > summary,
.portal-body.portal-rc2 .hg-shift-v3-editor-history > summary {
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;
  cursor:pointer;min-height:48px;padding:12px 14px;
  font-weight:650;color:inherit;
}
.portal-body.portal-rc2 .hg-shift-v3-master > summary:focus-visible,
.portal-body.portal-rc2 .hg-shift-v3-editor-history > summary:focus-visible {
  outline:3px solid var(--primary,#20a8d0);outline-offset:-3px;border-radius:8px;
}
.portal-body.portal-rc2 .hg-shift-v3-master > summary .hg-shift-v3-count {
  font-size:.85rem;font-weight:400;opacity:.78;
}
.portal-body.portal-rc2 .hg-shift-v3-master-content {min-width:0;padding:8px 12px 14px;}
.portal-body.portal-rc2 .hg-shift-v3-master-content > .hg-shift-v3-timeline,
.portal-body.portal-rc2 .hg-shift-v3-editor-history > .hg-shift-v3-timeline {margin-top:8px;}
.portal-body.portal-rc2 .hg-shift-v3-editor-history > .hg-shift-v3-timeline {padding:5px 12px 14px;}
.portal-body.portal-rc2 .hg-shift-v3-period > summary {cursor:pointer;}
@media (max-width:700px) {
  .portal-body.portal-rc2 .hg-shift-v3-master-content {padding:8px 7px 12px;}
  .portal-body.portal-rc2 .hg-shift-v3-editor-history > .hg-shift-v3-timeline {padding:5px 7px 12px;}
}


/* HG_R218_HR_RELATION_CARDS_22552_V1 | Solo Gestisci rapporti */
.portal-body.portal-rc2 .hg-contract-entry{
  display:block;margin:14px 0;border:1px solid var(--line,#d8e4ef);
  border-radius:15px;overflow:hidden;background:var(--panel,#fff);
  box-shadow:0 2px 10px rgba(0,25,54,.035);
}
.portal-body.portal-rc2 .hg-contract-entry-head{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:17px 20px;cursor:pointer;list-style:none;
  background:rgba(110,160,190,.10);color:var(--ink,#17314b);
}
.portal-body.portal-rc2 .hg-contract-entry-head::-webkit-details-marker{display:none}
.portal-body.portal-rc2 .hg-contract-entry-head::after{
  content:'⌄';font-size:24px;font-weight:500;margin-left:auto;line-height:1;
}
.portal-body.portal-rc2 .hg-contract-entry[open]>.hg-contract-entry-head::after{content:'⌃'}
.portal-body.portal-rc2 .hg-contract-entry-head:focus-visible,
.portal-body.portal-rc2 .hg-contract-ops>summary:focus-visible{
  outline:3px solid #4fb5db;outline-offset:-3px;
}
.portal-body.portal-rc2 .hg-contract-entry-title{
  font-size:17px;font-weight:700;letter-spacing:.01em;overflow-wrap:anywhere;
}
.portal-body.portal-rc2 .hg-contract-entry-state{
  display:inline-block;padding:5px 11px;border-radius:20px;
  background:rgba(40,145,169,.13);font-size:12px;font-weight:700;
}
.portal-body.portal-rc2 .hg-contract-entry-body{padding:18px 20px 22px}
.portal-body.portal-rc2 .hg-contract-entry-body>.detail-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;margin:8px 0 22px!important;
}
.portal-body.portal-rc2 .hg-contract-entry-body .detail-grid>div{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;
  gap:5px!important;min-width:0;padding:11px 13px!important;
  border:1px solid var(--line,#d9e4ef);border-radius:10px;
  background:rgba(110,160,190,.06);
}
.portal-body.portal-rc2 .hg-contract-entry-body .detail-grid .hint{
  display:block!important;margin:0!important;font-size:12px!important;
  line-height:1.4!important;color:var(--muted,#5c7186)!important;
  font-weight:500!important;
}
.portal-body.portal-rc2 .hg-contract-entry-body .detail-grid strong{
  display:block!important;margin:0!important;line-height:1.5!important;
  font-size:15px!important;font-weight:650!important;
  color:var(--ink,#17314b)!important;overflow-wrap:anywhere;
}
.portal-body.portal-rc2 .hg-contract-entry-body>h3{
  margin:24px 0 12px!important;font-size:16px!important;line-height:1.4!important;
  color:var(--ink,#17314b)!important;
}
.portal-body.portal-rc2 .hg-contract-ops{
  margin:18px 0 12px;border:1px solid var(--line,#d9e4ef);
  border-radius:12px;overflow:hidden;
}
.portal-body.portal-rc2 .hg-contract-ops>summary{
  padding:13px 16px;cursor:pointer;font-weight:700;
  background:rgba(110,160,190,.09);color:var(--ink,#17314b);
}
.portal-body.portal-rc2 .hg-contract-ops-body{padding:13px 16px}
.portal-body.portal-rc2 .hg-contract-ops-body>details{
  margin:9px 0!important;border:1px solid var(--line,#d9e4ef);
  border-radius:9px;overflow:hidden;
}
.portal-body.portal-rc2 .hg-contract-ops-body>details>summary{
  cursor:pointer;padding:12px 14px;font-weight:600;
  background:rgba(110,160,190,.06);color:var(--ink,#17314b);
}
.portal-body.portal-rc2 .hg-contract-ops-body>details>form{
  padding:15px 14px;display:grid;gap:12px;
}
.portal-body.portal-rc2 .hg-contract-ops-body form label{
  display:flex;flex-direction:column;gap:5px;
}
.portal-body.portal-rc2 .hg-contract-ops-body form :is(input,select,textarea){
  max-width:100%;min-width:0;
}
.portal-body.portal-rc2 .hg-contract-entry-body>details:not(.hg-contract-ops){
  margin-top:12px;border-top:1px solid var(--line,#d9e4ef);padding-top:10px;
}
.portal-body.portal-rc2 .hg-contract-entry-body>details:not(.hg-contract-ops)>summary{
  font-weight:650;cursor:pointer;padding:9px 0;
}
.portal-body.portal-rc2.hub-dark .hg-contract-entry{
  background:#172c41!important;color:#eff7ff!important;border-color:#53738f!important;
}
.portal-body.portal-rc2.hub-dark .hg-contract-entry-head{
  background:#203e57!important;color:#f4f9ff!important;
}
.portal-body.portal-rc2.hub-dark .hg-contract-entry-state{
  color:#d6f8ff!important;background:#215b6e!important;
}
.portal-body.portal-rc2.hub-dark .hg-contract-entry-body .detail-grid>div{
  background:#1b354b!important;border-color:#4a6880!important;
}
.portal-body.portal-rc2.hub-dark .hg-contract-entry-body .detail-grid .hint{
  color:#bbd1e4!important;
}
.portal-body.portal-rc2.hub-dark .hg-contract-entry-body .detail-grid strong,
.portal-body.portal-rc2.hub-dark .hg-contract-entry-body>h3{
  color:#f4faff!important;
}
.portal-body.portal-rc2.hub-dark .hg-contract-ops,
.portal-body.portal-rc2.hub-dark .hg-contract-ops-body>details{
  border-color:#4d6b86!important;
}
.portal-body.portal-rc2.hub-dark .hg-contract-ops>summary,
.portal-body.portal-rc2.hub-dark .hg-contract-ops-body>details>summary{
  background:#25445e!important;color:#eff8ff!important;
}
@media (max-width:680px){
  .portal-body.portal-rc2 .hg-contract-entry-head{padding:14px 15px;gap:8px}
  .portal-body.portal-rc2 .hg-contract-entry-body{padding:12px}
  .portal-body.portal-rc2 .hg-contract-entry-body>.detail-grid{
    grid-template-columns:minmax(0,1fr)!important;gap:8px!important;
  }
  .portal-body.portal-rc2 .hg-contract-ops-body{padding:9px}
}
/* HG_R218_HR_EXPORT_COMPLETE_22552_V1 */
.hg-hr-export .hg-hr-export-actions{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin:12px 0}
.hg-hr-export .hg-hr-export-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px 18px;margin:14px 0;padding:14px;border:1px solid var(--line,#c2d0df);border-radius:10px}
.hg-hr-export .hg-hr-export-fields>strong{grid-column:1/-1}
.hg-hr-export .hg-hr-export-fields label{display:flex;gap:9px;align-items:center;min-width:0;overflow-wrap:anywhere}
.hg-hr-export input[type=checkbox]{width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;flex:0 0 18px!important;accent-color:var(--blue,#0f83b9)}
.hg-hr-export details{border:1px solid var(--line,#c2d0df);padding:13px;border-radius:10px}
.hg-hr-export summary{cursor:pointer;font-weight:700}
body.portal-body.portal-rc2.hub-dark .hg-hr-export .hg-hr-export-fields,body.portal-body.portal-rc2.hub-dark .hg-hr-export details{background:#11283f;color:#eaf6ff;border-color:#496781}
body.portal-body.portal-rc2.hub-dark .hg-hr-export .table th,body.portal-body.portal-rc2.hub-dark .hg-hr-export .table td{color:#ebf7ff;border-color:#46627c}

/* HG_R218_HR_ADVANCED_DOCS_22552_V1 - anche nel tema notte */
.hg-doc-models .table td{vertical-align:middle}
.hg-doc-models form{display:inline-block;margin:0}
.hg-doc-form{margin:15px 0}
.hg-doc-form summary{cursor:pointer;padding:6px;font-weight:600}
.hg-doc-form textarea{display:block;width:100%;font:inherit;line-height:1.5;min-height:240px;resize:vertical}
.hg-doc-alert{border:1px solid #b45309;border-left:4px solid #b45309;border-radius:8px;padding:12px;margin:12px 0;color:var(--ink,#263449);background:var(--panel,#fff)}
.portal-body.portal-rc2.hub-dark .hg-doc-alert{border-color:#fbbf24;color:#fff5db;background:#35250f}

/* HG_R218_HR_DOC_DELIVERY_22552_V1 */
.hg-doc-delivery-row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;
 border:1px solid var(--line,#a9bacb);border-radius:10px;padding:13px;margin:10px 0}
.hg-doc-delivery-row>div{min-width:0;max-width:100%;display:grid;gap:8px}
.hg-doc-delivery-row form{display:grid;gap:8px}
.hg-doc-delivery-error{border:1px solid #c4513e;border-left:4px solid #c4513e;padding:12px;border-radius:8px}
.hg-doc-delivery-info{border:1px solid #288268;border-left:4px solid #288268;padding:12px;border-radius:8px}
.portal-body.portal-rc2.hub-dark .hg-doc-delivery-row{border-color:#5e88aa;color:var(--ink,#eef7ff);background:#13283d}
.portal-body.portal-rc2.hub-dark .hg-doc-delivery-error{color:#ffeae4;background:#401c20;border-color:#fc998d}
.portal-body.portal-rc2.hub-dark .hg-doc-delivery-info{color:#e6fff7;background:#103b35;border-color:#74d6bf}

/* HG_R218_CHECKBOX_NATIVE_COMPACT_22552_V1
   Checkbox: 18px; testo di conferma sulla stessa riga, dove possibile.
   Non modificare input testo, e-mail, select, textarea o switch espliciti. */
body input[type="checkbox"]:not([role="switch"]):not(.switch-input) {
  -webkit-appearance: checkbox !important;
  appearance: auto !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  padding: 0 !important;
  margin: 0 7px 0 0 !important;
  flex: 0 0 18px !important;
  transform: none !important;
  vertical-align: middle !important;
  cursor: pointer;
}

/* HG_R218_ADMIN_MAIL_DOMAIN_ROW_22552_V1: schede comunicazioni affiancate */
.hg-admin-communications-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
    margin-block: 14px;
}
.hg-admin-communications-grid > .card {
    margin: 0;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
}
@media (max-width: 640px) {
    .hg-admin-communications-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* HG_CHAT_VISUAL_22552_V3_SERVER_RENDER: solo la vista Chat */
/* HG_CHAT_TOOLBAR_DEDUP_22552_V1: Cerca, Avvisi, Rubrica, Info */
.chat-shell.hub-chat-refined .hub-chat-quicknav {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;
  margin:0;padding:9px 8px 10px;
  border-bottom:1px solid rgba(140,208,236,.22);
}
.chat-shell.hub-chat-refined .hub-chat-quicknav > a,
.chat-shell.hub-chat-refined .hub-chat-quicknav > details > summary {
  box-sizing:border-box;display:flex;min-width:0;min-height:52px;
  flex-direction:column;align-items:center;justify-content:center;gap:4px;
  padding:6px 2px;border-radius:10px;border:1px solid rgba(131,203,236,.20);
  background:rgba(52,136,183,.12);color:inherit;text-align:center;
  font:inherit;font-size:11px;font-weight:650;line-height:1.1;
  text-decoration:none;white-space:nowrap;cursor:pointer;
}
.chat-shell.hub-chat-refined .hub-chat-quicknav svg {
  display:block;width:19px;height:19px;flex:none;stroke:currentColor;
}
.chat-shell.hub-chat-refined .hub-chat-quicknav > details {position:relative;min-width:0}
.chat-shell.hub-chat-refined .hub-chat-quicknav > details > summary {list-style:none}
.chat-shell.hub-chat-refined .hub-chat-quicknav > details > summary::-webkit-details-marker {display:none}
.chat-shell.hub-chat-refined .hub-chat-quicknav > a:hover,
.chat-shell.hub-chat-refined .hub-chat-quicknav > a:focus-visible,
.chat-shell.hub-chat-refined .hub-chat-quicknav > details > summary:hover,
.chat-shell.hub-chat-refined .hub-chat-quicknav > details > summary:focus-visible {
  background:rgba(58,169,211,.20);border-color:rgba(60,163,209,.5);
  outline-offset:2px;
}
.chat-shell.hub-chat-refined .hub-chat-hublink {
  background:rgba(52,166,207,.20)!important;
  border-color:rgba(66,172,208,.36)!important;
}
.chat-shell.hub-chat-refined .hub-chat-info-panel {
  position:fixed;z-index:999;top:clamp(100px,18vh,200px);
  left:clamp(12px,15vw,250px);
  width:min(320px,calc(100vw - 24px));max-height:65vh;overflow:auto;
  box-sizing:border-box;border-radius:13px;padding:15px;
  background:#123653;color:#f0faff;
  border:1px solid rgba(136,211,243,.4);
  box-shadow:0 14px 40px rgba(0,22,42,.35);
  font-size:12px;line-height:1.6;white-space:normal;text-align:left;
}
.chat-shell.hub-chat-refined .hub-chat-info-panel > strong {font-size:13px}
.chat-shell.hub-chat-refined .hub-chat-info-panel .chat-privacy-note {
  display:block!important;position:static!important;margin:9px 0!important;
  padding:0!important;background:none!important;border:0!important;
  color:inherit!important;font:inherit!important;opacity:1!important;
  white-space:normal!important;
}
.chat-shell.hub-chat-refined .hub-chat-info-legal {
  margin-top:10px;padding-top:10px;border-top:1px solid rgba(143,222,241,.25)
}
.chat-shell.hub-chat-refined .hub-chat-info-legal a {
  color:#b8eeff!important;text-decoration:underline;text-underline-offset:2px
}
/* La rubrica resta nella barra; il tasto Elenco serve solo sui display stretti. */
.chat-shell.hub-chat-refined .chat-conversation-head .cp274-rubrica {display:none!important}
@media(min-width:761px){
  .chat-shell.hub-chat-refined .chat-conversation-head .chat-back {display:none!important}
}
@media(max-width:760px){
  .chat-shell.hub-chat-refined .chat-conversation-head .chat-back:not(.cp274-rubrica){
    display:inline-flex;align-items:center;justify-content:center;
    min-height:35px;padding:5px 10px;border-radius:9px;
    background:rgba(110,213,246,.12);border:1px solid rgba(138,218,245,.25);
    color:inherit;text-decoration:none;font-size:12px;
  }
}
/* Footer legale duplicato solo nella pagina Chat, preservato nel menu Info. */
body.portal-body:has(.chat-shell.hub-chat-refined) .portal-footer {display:none!important}
@media(max-width:620px){
  .chat-shell.hub-chat-refined .hub-chat-info-panel {
    left:12px;right:12px;top:100px;width:auto;max-height:65vh;
  }
}
@media(max-width:420px){
  .chat-shell.hub-chat-refined .hub-chat-quicknav {gap:3px;padding-inline:4px}
  .chat-shell.hub-chat-refined .hub-chat-quicknav > a,
  .chat-shell.hub-chat-refined .hub-chat-quicknav > details > summary {
    min-height:47px;font-size:10px;
  }
}
/* HG_PERSONAL_CHAT_TABS_22552_V2B - within Chat views only */
.hub-chat-context-tabs{display:flex;align-items:stretch;gap:4px;
  padding:5px;margin:0 0 14px;border-radius:12px;
  border:1px solid rgba(112,197,235,.20);background:rgba(25,75,112,.16)}
.hub-chat-context-tabs a{display:flex;align-items:center;justify-content:center;
  flex:1;min-width:0;padding:12px 9px;border-radius:9px;min-height:43px;
  box-sizing:border-box;color:inherit;text-align:center;text-decoration:none;
  font-weight:650;font-size:14px;letter-spacing:.005em}
.hub-chat-context-tabs a[aria-current="page"]{
  border:1px solid rgba(110,210,241,.42);background:#145886;color:#f1fcff;
  box-shadow:0 2px 10px rgba(0,35,72,.17)}
.hub-chat-context-tabs a:not([aria-current]):hover,
.hub-chat-context-tabs a:not([aria-current]):focus-visible{background:rgba(90,180,222,.15)}
.hub-personal-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.hub-personal-panels .card{margin:0}
.hub-personal-pending{display:inline-block;margin-top:5px;padding:6px 10px;
  border-radius:999px;border:1px solid rgba(109,186,227,.25);font-size:12px}
.hub-personal-note{font-size:13px;line-height:1.6;opacity:.8;margin:18px 0}
@media(max-width:650px){.hub-chat-context-tabs a{font-size:12px;min-height:44px}
 .hub-personal-panels{grid-template-columns:minmax(0,1fr)}}
