/* Five Tour 4.4.4 — final device layer. Never hide horizontal overflow on the whole page.
   Two-dimensional document/calculation surfaces retain their own scroll area.
   Original forms, data, IDs, listeners, validation and permissions are unchanged. */
body.ft444-responsive{--ft444-sidebar:254px;--ft444-view-height:100vh;--ft444-view-top:0px;--ft444-topbar-bottom:76px;--ft444-admin-height:0px}
@supports(height:100dvh){body.ft444-responsive{--ft444-view-height:100dvh}}
body.ftaps-app.ft444-responsive .ftaps-app-shell{display:block!important;width:100%;min-width:0}
body.ftaps-app.ft444-responsive main.ftaps-main{width:calc(100% - var(--ft444-sidebar))!important;max-width:none!important;margin-left:var(--ft444-sidebar)!important;min-width:0!important}
body.ftaps-app.ft444-responsive .ftaps-sidebar{width:var(--ft444-sidebar)!important;max-width:100%;top:var(--ft444-admin-height);height:calc(var(--ft444-view-height) - var(--ft444-admin-height));padding-bottom:env(safe-area-inset-bottom,0px);overscroll-behavior:contain}
body.ftaps-app.ft444-responsive.ft440-wide main.ftaps-main{width:100%!important;margin-left:0!important}
body.ftaps-app.ft444-responsive :is(.ftaps-content,.ftaps-topbar,.ft440-row,.ft440-table-filter,.ftaps-search,.ft422-display-tools){min-width:0!important}
body.ftaps-app.ft444-responsive .ftaps-content{padding:clamp(14px,2.2vw,32px)!important}
body.ftaps-app.ft444-responsive .ftaps-topbar{height:auto!important;min-height:72px;flex-wrap:wrap;gap:10px;padding:10px clamp(12px,2vw,28px)!important}
body.ftaps-app.ft444-responsive .ftaps-search{flex:1 1 180px;min-width:80px!important;max-width:620px;height:44px}
body.ftaps-app.ft444-responsive .ftaps-search input{min-width:0!important;max-width:100%;font-size:16px!important}
body.ftaps-app.ft444-responsive .ftaps-topbar :is(.ftaps-icon-button,.ftaps-menu-button,.ftaps-profile-trigger){min-width:44px;min-height:44px;flex-shrink:0}
body.ftaps-app.ft444-responsive .ft422-display-tools{max-width:100%;flex-wrap:wrap}
body.ftaps-app.ft444-responsive .ft440-table-filter{min-width:0;flex:1 1 200px}
body.ftaps-app.ft444-responsive :is(.ft440-table-toolbar,.ft440-table-footer,.ft440-workspace-tools){min-width:0;gap:10px}
body.ftaps-app.ft444-responsive :is(.staff-actions,.ftm-panel-actions,.ftm-row-actions,.form-actions,.ft440-row)>*{min-width:0;max-width:100%}
body.ftaps-app.ft444-responsive :is(.ftaps-content,.ft440-dialog-body) :is(h1,h2,h3,p,legend,label,summary,.message-box,.small-note){overflow-wrap:anywhere;word-break:normal}
body.ftaps-app.ft444-responsive :is(.ftaps-content,.ft440-dialog-body) :is(.btn,.ft440-button,.ftaps-primary,.ftaps-secondary){height:auto!important;white-space:normal!important;line-height:1.4;max-width:100%;text-align:center}
body.ftaps-app.ft444-responsive .ft443-active-editor :is(input,select,textarea){min-width:0!important;scroll-margin-block:100px 120px}
body.ftaps-app.ft444-responsive :is(.ft440-dialog-head,.ft435-page-header)>:first-child{min-width:0!important}
body.ftaps-app.ft444-responsive .ft443-page-actions{scroll-margin-bottom:20px}
body.ftaps-app.ft444-responsive .ft444-scroll-surface{overflow-x:auto!important;max-width:100%!important;min-width:0!important;overscroll-behavior-x:contain;scrollbar-gutter:stable}
body.ftaps-app.ft444-responsive .ft444-scroll-surface:focus-visible{outline:3px solid #00857a;outline-offset:3px}
body.ftaps-app.ft444-responsive .ft444-scroll-hint{margin:8px 0;color:#5c6d80;font-size:13px;line-height:1.5}
body.ftaps-app.ft444-responsive .ft444-scroll-hint[hidden]{display:none!important}
/* Tables switch based on available container space as well as the viewport. */
body.ftaps-app.ft444-responsive table.ft444-card-table:not(.ft443-editor-path){display:block!important;min-width:0!important;max-width:100%!important;width:100%!important;table-layout:auto!important}
body.ftaps-app.ft444-responsive table.ft444-card-table:not(.ft443-editor-path)>colgroup{display:none!important}
body.ftaps-app.ft444-responsive table.ft444-card-table:not(.ft443-editor-path)>thead{position:static!important;display:table!important;width:100%!important;height:auto!important;clip-path:none!important;white-space:normal!important}
body.ftaps-app.ft444-responsive table.ft444-card-table>thead th:not(.ft440-check-cell):not(.ft430-check-cell){display:none!important}
body.ftaps-app.ft444-responsive table.ft444-card-table>thead th:is(.ft440-check-cell,.ft430-check-cell){display:flex!important;align-items:center;gap:10px;position:static;min-height:44px;width:100%!important}
body.ftaps-app.ft444-responsive table.ft444-card-table>thead .ft440-check-cell::after{content:'Seleziona le righe visibili';font-size:13px}
body.ftaps-app.ft444-responsive table.ft444-card-table>tbody{display:block!important;min-width:0;width:100%}
body.ftaps-app.ft444-responsive table.ft444-card-table tr:is(.ft440-record,.ft434-record){display:block!important;width:auto!important;min-width:0!important;margin:0 10px 14px!important;padding:4px!important;border:1px solid #dbe4ed!important;border-radius:12px!important;background:#fff!important;overflow:visible!important}
body.ftaps-app.ft444-responsive table.ft444-card-table tr:is(.ft440-record,.ft434-record)>td{display:grid!important;grid-template-columns:minmax(100px,30%) minmax(0,1fr)!important;align-items:start!important;gap:10px!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:10px!important;border:0!important;border-bottom:1px solid #edf1f6!important;white-space:normal!important;overflow-wrap:anywhere!important;box-sizing:border-box;background:transparent!important}
body.ftaps-app.ft444-responsive table.ft444-card-table tr:is(.ft440-record,.ft434-record)>td::before{content:attr(data-ft444-label)!important;display:block!important;position:static!important;min-width:0!important;width:auto!important;max-width:none!important;color:#5c6d80;font-size:12px;font-weight:650;padding:0!important;white-space:normal!important}
body.ftaps-app.ft444-responsive table.ft444-card-table td:is(.ft440-check-cell,.ft430-check-cell){display:flex!important;align-items:center!important;gap:12px!important;min-height:44px;background:#f4f7fb!important}
body.ftaps-app.ft444-responsive table.ft444-card-table td:last-child{border-bottom:0!important}
body.ftaps-app.ft444-responsive table.ft444-card-table :is(tr.ft440-row-hidden,tr[hidden],tr[style*='display: none'],tr[style*='display:none'],td.ft440-column-hidden,td[hidden]){display:none!important}
/* Widgets should not obscure forms on small screens. Reminders remain accessible in the assistant. */
body.ftaps-app.ft444-responsive .ft-ai-reminder-peek{display:none!important}
body.ftaps-app.ft444-responsive .ft-ai-widget{right:max(14px,env(safe-area-inset-right,0px));bottom:max(14px,env(safe-area-inset-bottom,0px))}
body.ftaps-app.ft444-responsive .ft-ai-panel{max-height:calc(var(--ft444-view-height) - 90px)!important;max-width:calc(100vw - 28px)!important;min-height:0}
body.ftaps-app.ft444-responsive .ft-ai-messages{min-height:0;overscroll-behavior:contain}
body.ftaps-app.ft444-responsive.ft444-keyboard .ft443-page-actions{position:static!important}
/* Final caps cover legacy and modern utility dialogs, including the virtual keyboard. */
body.ftaps-app.ftaps-workspace.ft440-enhanced.ft444-responsive dialog:is(.ft440-dialog,.ft440-legacy-dialog)[open]{max-height:calc(var(--ft444-view-height) - 24px)!important;max-width:calc(100vw - 24px)!important;min-height:0!important}
body.ftaps-app.ftaps-workspace.ft440-enhanced.ft444-responsive dialog.ft440-legacy-dialog>.ftaps-modal{max-height:calc(var(--ft444-view-height) - 26px)!important}
body.ftaps-app.ft444-responsive dialog .ft440-dialog-head h2{font-size:clamp(19px,2vw,24px)!important;min-width:0;overflow-wrap:anywhere}
body.ftaps-app.ft444-responsive .ft440-dialog-controls .ft440-button{min-height:44px!important;min-width:44px!important}
@media(max-width:1100px){
 body.ftaps-app.ft444-responsive .ft422-display-tools{flex:1 1 100%;order:5;justify-content:flex-end}
 body.ftaps-app.ft444-responsive :is(.ftaps-card-grid,.ftaps-feature-grid,.ftaps-register-grid,.ft444-archive-filters .form-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:1024px){
 body.ftaps-app.ft444-responsive main.ftaps-main{margin-left:0!important;width:100%!important;max-width:100%!important}
 body.ftaps-app.ft444-responsive .ftaps-sidebar,body.ftaps-app.ft444-responsive.ft440-wide .ftaps-sidebar{display:flex!important;width:min(300px,calc(100vw - 48px))!important;visibility:hidden;transform:translateX(-105%)}
 body.ftaps-app.ft444-responsive .ftaps-sidebar.ftaps-sidebar-open,body.ftaps-app.ft444-responsive.ft440-wide .ftaps-sidebar.ftaps-sidebar-open{visibility:visible!important;transform:none!important}
 body.ftaps-app.ft444-responsive :is(.ftaps-menu-button,.ftaps-mobile-close){display:grid!important;place-items:center;min-width:44px;min-height:44px}
 body.ftaps-app.ft444-responsive .ftaps-topbar{position:relative!important;top:0!important}
 body.ftaps-app.ft444-responsive .ft422-dashboard-options{position:fixed!important;left:12px!important;right:12px!important;top:var(--ft444-topbar-bottom)!important;width:auto!important;max-width:calc(100vw - 24px)!important;max-height:calc(var(--ft444-view-height) - var(--ft444-topbar-bottom) - 12px)!important;overflow:auto!important;z-index:70}
 body.ftaps-app.ft444-responsive .ft440-workspace-tools>.ft440-row{width:100%;gap:8px}
 body.ftaps-app.ft444-responsive .ft-ai-launch{width:52px!important;min-width:52px!important;height:52px!important;padding:0!important;display:flex!important;justify-content:center!important}
 body.ftaps-app.ft444-responsive .ft-ai-launch>b{display:none!important}
 body.ftaps-app.ft444-responsive .ft-ai-panel{width:min(440px,calc(100vw - 28px))!important}
 body.ftaps-app.ft444-responsive .ft443-active-editor :is(.ft411-fields,.form-grid,.ftm-form-grid){gap:16px!important}
 body.ftaps-app.ft444-responsive :is(button.ft429-row-trigger,button.ft440-action-trigger){min-width:44px!important;min-height:44px!important;width:44px!important;height:44px!important}
}
@media(max-width:760px){
 body.ftaps-app.ft444-responsive .ftaps-topbar{gap:8px!important}
 body.ftaps-app.ft444-responsive .ftaps-search{max-width:none;flex-basis:120px}
 body.ftaps-app.ft444-responsive .ftaps-content{padding:12px!important;padding-bottom:80px!important}
 body.ftaps-app.ft444-responsive :is(.ftaps-stats,.ftaps-card-grid,.ftaps-feature-grid,.ftaps-register-grid,.ft440-stats){grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.ftaps-app.ft444-responsive .ft444-archive-filters .form-grid{grid-template-columns:minmax(0,1fr)!important}
 body.ftaps-app.ft444-responsive .ft440-workspace-tools .ft440-button{flex:1 1 100px;min-height:44px!important}
 body.ftaps-app.ft444-responsive .ft440-table-toolbar>.ft440-row{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body.ftaps-app.ft444-responsive .ft440-table-toolbar .ft440-button{min-height:44px!important;min-width:0}
 body.ftaps-app.ft444-responsive .ft440-table-footer{position:static!important;flex-wrap:wrap}
 body.ftaps-app.ft444-responsive .ft440-table-filter{flex-basis:100%;max-width:100%}
 body.ftaps-app.ft444-responsive :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not(.ftdoc-paper *){font-size:max(16px,var(--ft440-font,16px))!important}
 body.ftaps-app.ft444-responsive .ftag-calendar{gap:3px!important;grid-template-columns:repeat(7,minmax(0,1fr))!important}
 body.ftaps-app.ft444-responsive .ftag-day{padding:6px 2px!important;min-height:52px!important;text-align:center}
 body.ftaps-app.ft444-responsive .ftag-weekday{padding:5px 1px!important;font-size:11px}
 body.ftaps-app.ft444-responsive .ftag-day span{font-size:10px;line-height:1.3;overflow-wrap:anywhere}
 body.ftaps-app.ft444-responsive .ft421-event-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body.ftaps-app.ft444-responsive .ft421-event-tabs>a{min-height:48px;flex:none;font-size:13px;padding:9px 7px}
 body.ftaps-app.ft444-responsive.ft444-keyboard .ft-ai-widget:not(:has(.ft-ai-panel:not([hidden]))){display:none!important}
 body.ftaps-app.ftaps-workspace.ft440-enhanced.ft444-responsive dialog.ft440-dialog[open]:not(.ft440-size-small){top:var(--ft444-view-top)!important;bottom:auto!important;margin:8px auto!important;height:calc(var(--ft444-view-height) - 16px)!important;max-height:calc(var(--ft444-view-height) - 16px)!important}
 body.ftaps-app.ft444-responsive .ft440-dialog-head{padding:12px!important;gap:8px!important}
 body.ftaps-app.ft444-responsive .ft440-dialog-body{padding:16px!important}
 body.ftaps-app.ft444-responsive .ft440-dialog-foot{padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))!important;gap:8px!important}
}
@media(max-width:480px){
 body.ftaps-app.ft444-responsive :is(.ftaps-card-grid,.ftaps-feature-grid,.ftaps-register-grid){grid-template-columns:minmax(0,1fr)!important}
 body.ftaps-app.ft444-responsive table.ft444-card-table tr:is(.ft440-record,.ft434-record)>td:not(.ft440-check-cell):not(.ft430-check-cell){display:block!important}
 body.ftaps-app.ft444-responsive table.ft444-card-table tr:is(.ft440-record,.ft434-record)>td::before{margin-bottom:5px!important;font-size:12px!important}
 body.ftaps-app.ft444-responsive table.ft444-card-table tr:is(.ft440-record,.ft434-record){margin:0 6px 12px!important}
 body.ftaps-app.ft444-responsive .ft422-display-tools{justify-content:space-between}
 body.ftaps-app.ft444-responsive .ft422-size-label{flex:0 1 100px}
 body.ftaps-app.ft444-responsive .ft422-dashboard-menu{flex:1 1 135px}
 body.ftaps-app.ft444-responsive .ft422-dashboard-menu summary{font-size:12px;padding:10px 8px!important}
 body.ftaps-app.ft444-responsive .ft443-page-actions{padding:10px!important;gap:8px!important}
 body.ftaps-app.ft444-responsive .ft443-page-actions :is(a,button){flex:1 1 100px}
}
@media(max-height:520px){
 body.ftaps-app.ft444-responsive .ftaps-topbar{position:relative!important;top:0!important}
 body.ftaps-app.ft444-responsive .ft443-page-actions{position:static!important}
 body.ftaps-app.ft444-responsive .ft440-dialog-head,body.ftaps-app.ft444-responsive .ft440-dialog-foot{padding:8px 12px!important}
 body.ftaps-app.ft444-responsive .ft440-dialog-head h2{font-size:18px!important}
 body.ftaps-app.ft444-responsive .ft440-dialog-head{flex-wrap:nowrap!important}
}
/* Public website: contain navigation and preserve long forms at small widths. */
@media(max-width:980px){
 body:not(.ftaps-app) .main-nav.open{max-height:calc(100dvh - 98px);overflow-y:auto;overscroll-behavior:contain}
 body:not(.ftaps-app) :is(.site-form,.form-grid,.container)>*{min-width:0}
}
@media(max-width:620px){
 body:not(.ftaps-app) :is(.site-form input,.site-form select,.site-form textarea){min-width:0;max-width:100%;font-size:16px;min-height:44px}
 body:not(.ftaps-app) :is(.site-form label,.hero h1,.page-hero h1,.cookie-banner){overflow-wrap:anywhere}
 body:not(.ftaps-app) .cookie-banner{max-height:45dvh;overflow:auto}
 body:not(.ftaps-app) .hero-actions>*{max-width:100%;white-space:normal}
}
@media print{
 body.ftaps-app.ft444-responsive main.ftaps-main{width:100%!important;margin:0!important}
 body.ftaps-app.ft444-responsive :is(.ft444-scroll-hint,.ft-ai-widget){display:none!important}
 body.ftaps-app.ft444-responsive .ft444-scroll-surface{overflow:visible!important}
}
