/* Menu compatto: lo spazio disponibile resta alla navigazione. */
:root{--staging-content-height:28px}
.sidebar .logo-row{min-height:70px;height:70px;padding:6px 12px;justify-content:space-between;gap:8px}
.sidebar .sidebar-environment-brand{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;padding:0;min-width:0;flex:1;max-width:205px}
.sidebar .brand-logo-sidebar{width:180px;max-width:100%;height:35px;background:#fff;border-radius:8px;padding:3px}
.sidebar .environment-logo-tag{position:static;align-self:flex-start;font-size:.875rem;line-height:1;padding:2px 6px;border-width:1px;letter-spacing:.04em;box-shadow:none}
.sidebar-close{display:block!important;flex:0 0 36px;width:36px;height:40px;border:0;background:transparent;color:#dbe9f4;font-size:24px;border-radius:8px}
.sidebar-close:hover{background:#ffffff18}
.sidebar-navigation-tools{padding:7px 11px}
.nav-function-search{min-height:38px}.nav-function-search input{padding:7px 0}
.nav-favorites{margin-top:7px}.nav-favorites-head{margin-bottom:5px}.nav-favorites-head strong{font-size:.875rem}
.sidebar .nav-favorites-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.sidebar .nav-favorites-list>button{grid-template-columns:17px minmax(0,1fr);min-height:32px;padding:5px 7px;justify-items:stretch}
.sidebar .nav-favorites-list strong{display:block;font-size:.875rem}
.sidebar nav#nav{padding:3px 8px 8px;min-height:80px}
.sidebar .nav-section{padding:1px 0}.sidebar nav .nav-section-toggle{min-height:39px;padding:8px;font-size:.875rem;letter-spacing:.04em}
.sidebar nav .nav-section-items>button{min-height:36px;padding-block:7px}
.sidebar-fixed-footer{padding:0 10px max(3px,env(safe-area-inset-bottom,0px));box-shadow:none}
.sidebar-footer-line{height:43px;display:flex;align-items:center;gap:9px;font-size:.875rem;color:#d9e7f0}
.sidebar-footer-line .status-dot{width:7px;height:7px}.sidebar-footer-line button{margin-left:auto;min-width:38px;min-height:36px;border:1px solid #ffffff22;border-radius:8px;background:transparent;color:#fff;font-weight:bold}
.sidebar-footer-details{position:absolute;bottom:100%;left:8px;right:8px;border:1px solid #ffffff30;border-radius:12px;background:#102f47;padding:8px;box-shadow:0 -8px 30px #05121f55}
.sidebar-footer-details[hidden]{display:none}.sidebar-footer-details .sidebar-actions{padding:3px}.sidebar-footer-details .mobile-quick-edit{display:block;width:100%}
.is-staging .staging-banner{height:calc(28px + var(--safe-top));padding:var(--safe-top) 8px 0;flex-direction:row;gap:8px;line-height:1.1}
.is-staging .staging-banner strong{font-size:.875rem}.is-staging .staging-banner span{font-size:.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mileage-photo-dialog{width:min(1050px,calc(100vw - 20px));height:min(90dvh,1000px);max-height:calc(100dvh - 20px);padding:0;border:0;border-radius:14px;overflow:hidden;background:#f5f8fb}
.mileage-photo-dialog[open]{display:flex;flex-direction:column}.mileage-photo-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:white;border-bottom:1px solid #dbe5ed;flex:none}
.mileage-photo-body{min-height:0;overflow:auto;padding:12px;text-align:center;flex:1}.mileage-photo-body img{max-width:100%;max-height:100%;object-fit:contain}
.mileage-correction-dialog{width:min(520px,calc(100vw - 24px));max-height:90dvh;padding:22px;overflow:auto;border-radius:14px}
.mileage-correction-dialog label{display:grid;gap:6px;margin:16px 0}.mileage-correction-dialog [role=alert]{color:#a62925}
.mileage-photo-dialog::backdrop,.mileage-correction-dialog::backdrop{background:#071c32aa}
.maintenance-dialog{width:min(480px,calc(100vw - 32px));border:0;border-radius:20px;padding:32px;text-align:center;color:#10334d;box-shadow:0 20px 90px #06172b55}
.maintenance-dialog::backdrop{background:#0a243b99;backdrop-filter:blur(4px)}.maintenance-dialog img{width:210px;max-width:100%;margin-bottom:18px}.maintenance-dialog p{line-height:1.6}.maintenance-dialog small{color:#63788a}
@media(max-width:620px){.sidebar .logo-row{min-height:66px;height:66px}.mileage-photo-dialog{width:calc(100vw - 12px);height:calc(100dvh - 20px)}.mileage-photo-dialog header{padding:10px}.mileage-photo-dialog header strong{font-size:14px}}
.payroll-import-dialog{width:min(1100px,calc(100vw - 24px));max-height:90dvh;padding:0;border:0;border-radius:16px;overflow:hidden}.payroll-import-dialog[open]{display:flex;flex-direction:column}.payroll-import-dialog>header,.payroll-import-dialog>footer,.payroll-preview-dialog>header,.payroll-preview-dialog>footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 20px;background:#fff;flex:none}.payroll-import-dialog header{border-bottom:1px solid #dce5ed}.payroll-import-dialog h2{font-size:22px;margin:0}.payroll-import-dialog .eyebrow{margin:0 0 4px}.payroll-import-body{min-height:0;overflow:auto;padding:18px 20px;background:#f5f8fb}.payroll-import-body>label{display:grid;gap:6px;margin:14px 0}.payroll-import-body article{border:1px solid #dce5ed;border-radius:12px;background:white;padding:14px;margin:12px 0}.payroll-import-body article[data-imported=true]{opacity:.65}.payroll-row-head{display:flex;gap:10px;align-items:center}.payroll-row-head>label{margin-right:auto;font-weight:750}.payroll-import-dialog input[type=checkbox]{width:17px;height:17px;margin-right:7px;vertical-align:middle}.payroll-fields{display:grid;grid-template-columns:100px 180px minmax(180px,1fr) 150px;gap:10px}.payroll-fields label{display:grid;gap:5px;font-size:.875rem;color:#4d657a}.payroll-fields input,.payroll-fields select{min-width:0;width:100%;font-size:14px}.payroll-match{display:block;color:#80601f;margin:12px 0;line-height:1.5}.payroll-reviewed{font-size:.875rem}.payroll-import-dialog>footer{border-top:1px solid #dce5ed;font-size:.875rem}.payroll-import-dialog footer>div{display:flex;gap:9px}#payrollImportError{color:#a32924}#payrollImportResult{color:#196245;line-height:1.5}#payrollSavedDrafts>button{display:block;margin-top:8px}.payroll-preview-dialog{width:min(900px,calc(100vw - 12px));height:94dvh;max-height:94dvh;padding:0;border:0;overflow:hidden;border-radius:14px}.payroll-preview-dialog[open]{display:flex;flex-direction:column}.payroll-preview-image{flex:1;min-height:0;overflow:auto;background:#e3eaf0;text-align:center;padding:10px}.payroll-preview-image img{width:100%;height:auto}.payroll-import-dialog::backdrop,.payroll-preview-dialog::backdrop{background:#071c32aa}@media(max-width:760px){.payroll-fields{grid-template-columns:1fr 1fr}.payroll-fields label:nth-child(3){grid-column:1/-1;grid-row:2}.payroll-import-dialog>footer{align-items:stretch;flex-direction:column;padding:10px}.payroll-import-body{padding:12px}.payroll-import-dialog header{padding:12px}.payroll-import-dialog h2{font-size:18px}.payroll-row-head{flex-wrap:wrap}.payroll-import-dialog footer>div{justify-content:space-between}}

@media(max-width:820px){.payroll-fields input,.payroll-fields select,.payroll-import-body>label input,.payroll-import-body>label select,.mileage-correction-dialog input,.mileage-correction-dialog select,.mileage-correction-dialog textarea{font-size:1rem;min-height:44px}.sidebar-close,.sidebar-footer-line button,.payroll-import-dialog button,.payroll-preview-dialog button,.mileage-photo-dialog header button{min-height:44px}.sidebar nav .nav-section-items>button,.sidebar nav .nav-section-toggle{min-height:44px}}
.payroll-import-dialog .payroll-feedback{display:block;min-width:0;flex:1}.payroll-import-dialog .payroll-feedback p{margin:2px 0 0;font-size:.875rem}.payroll-import-dialog .payroll-feedback p:empty{display:none}.payroll-import-dialog .payroll-invalid{border-color:#c74435;box-shadow:0 0 0 2px #c7443530}.payroll-import-dialog>footer{z-index:1}
.payroll-import-dialog .payroll-excluded{border-color:#b6c7d5;background:#f9fbfd}.payroll-import-dialog .payroll-excluded .payroll-match{color:#4f6475}
