/* 14.6.82 — hard fix viewport mobile: elimina lo scroll orizzontale e il layout spostato a destra. */
@media (max-width: 960px) {
  html:has(.fcp-app-shell),
  body:has(.fcp-app-shell) {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
    background: #f5f8fc !important;
  }

  body:has(.fcp-app-shell) #page,
  body:has(.fcp-app-shell) .site,
  body:has(.fcp-app-shell) .site-content,
  body:has(.fcp-app-shell) .content-area,
  body:has(.fcp-app-shell) .entry-content,
  body:has(.fcp-app-shell) .elementor,
  body:has(.fcp-app-shell) .elementor-section,
  body:has(.fcp-app-shell) .elementor-container,
  body:has(.fcp-app-shell) .elementor-column,
  body:has(.fcp-app-shell) main {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: hidden !important;
  }

  body .fcp-app-shell[data-fcp-app="1"],
  body.fcp-app-root-page .fcp-app-shell[data-fcp-app="1"] {
    display: block !important;
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    overflow-x: hidden !important;
    background: #f5f8fc !important;
  }

  body .fcp-app-shell[data-fcp-app="1"] > .fcp-app-sidebar,
  body.fcp-app-root-page .fcp-app-shell[data-fcp-app="1"] > .fcp-app-sidebar,
  body .fcp-app-sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    inset: auto !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  body .fcp-app-main,
  body.fcp-app-root-page .fcp-app-main,
  body .fcp-app-shell[data-fcp-app="1"] > .fcp-app-main {
    display: block !important;
    position: relative !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 14px calc(122px + env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    overflow-x: hidden !important;
    background: transparent !important;
    box-sizing: border-box !important;
  }

  body .fcp-app-topbar,
  body .fcp-app-legacy-content {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  body .fcp-native-mobile-header,
  body.fcp-app-root-page .fcp-native-mobile-header {
    display: flex !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9000 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 72px !important;
    margin: 0 !important;
    padding: 12px 18px !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    background: rgba(255,255,255,.96) !important;
    border-bottom: 1px solid #e5edf7 !important;
    box-shadow: 0 10px 26px rgba(15,35,69,.06) !important;
    backdrop-filter: blur(16px) !important;
  }

  body .fcp-mobile-native-screen,
  body.fcp-app-root-page .fcp-mobile-native-screen {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding-top: 14px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  body .fcp-mobile-native-screen *,
  body .fcp-app-main * {
    box-sizing: border-box !important;
    max-width: 100%;
  }

  body .fcp-app-bottom-nav,
  body.fcp-app-root-page .fcp-app-bottom-nav {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 24px) !important;
    max-width: 520px !important;
    min-width: 0 !important;
    margin: 0 !important;
    z-index: 99990 !important;
  }

  body .fcp-mobile-fab,
  body.fcp-app-root-page .fcp-mobile-fab {
    position: fixed !important;
    right: 20px !important;
    left: auto !important;
    bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;
    z-index: 99980 !important;
  }

  body .fcp-mobile-recorder-fab,
  body.fcp-app-root-page .fcp-mobile-recorder-fab {
    position: fixed !important;
    left: 20px !important;
    right: auto !important;
    bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;
    z-index: 99980 !important;
  }

  body .fcp-mobile-native-lead,
  body .fcp-mobile-native-clienti,
  body .fcp-mobile-native-task,
  body .fcp-mobile-native-altro,
  body .fcp-mobile-native-dashboard {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body .fcp-mobile-board,
  body .fcp-mobile-lead-list,
  body .fcp-app-client-list,
  body .fcp-more-app-14661,
  body .fcp-mobile-block,
  body .fcp-mobile-list,
  body .fcp-lead-final-card,
  body .fcp-lead-full-card-14664,
  body .fcp-app-client-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 430px) {
  body .fcp-app-main,
  body.fcp-app-root-page .fcp-app-main,
  body .fcp-app-shell[data-fcp-app="1"] > .fcp-app-main {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body .fcp-native-mobile-header,
  body.fcp-app-root-page .fcp-native-mobile-header {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}



/* FCP 14.7.5 SAFE FRONTEND CALENDAR FIX
   Safe CSS-only cleanup: no PHP/JS/render changes, to avoid blank frontend. */
body.fcp-app-root-page .fcp-mobile-task-note-preview,
body.fcp-app-root-page .fcp-day-main-14640 small,
body.fcp-app-root-page .fcp-day-card-14638 .fcp-mobile-task-note-preview{
  display:none!important;
}

body.fcp-app-root-page .fcp-mobile-task-card,
body.fcp-app-root-page .fcp-mobile-task-card-pro{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) auto 42px!important;
  align-items:center!important;
  gap:10px!important;
  min-height:76px!important;
  padding:12px 14px!important;
  border-radius:22px!important;
  overflow:hidden!important;
}

body.fcp-app-root-page .fcp-mobile-task-body{
  min-width:0!important;
  text-align:left!important;
}
body.fcp-app-root-page .fcp-mobile-task-body strong{
  display:block!important;
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.fcp-app-root-page .fcp-mobile-task-body span{
  display:block!important;
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  opacity:.85!important;
}

body.fcp-app-root-page .fcp-mobile-month-grid{
  gap:8px!important;
}
body.fcp-app-root-page .fcp-mobile-month-day{
  min-height:100px!important;
  border-radius:18px!important;
  padding:8px!important;
}
body.fcp-app-root-page .fcp-mobile-month-day strong{
  font-size:16px!important;
}
body.fcp-app-root-page .fcp-mobile-month-day span{
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
@media (max-width:767px){
  body.fcp-app-root-page .fcp-mobile-task-panel>.fcp-mobile-block{
    padding:10px!important;
  }
  body.fcp-app-root-page .fcp-mobile-month-grid{
    min-width:640px!important;
    overflow:visible!important;
  }
  body.fcp-app-root-page .fcp-mobile-task-card,
  body.fcp-app-root-page .fcp-mobile-task-card-pro{
    grid-template-columns:38px minmax(0,1fr) auto 38px!important;
    min-height:72px!important;
    padding:10px 12px!important;
  }
  body.fcp-app-root-page .fcp-mobile-task-body strong{
    font-size:16px!important;
  }
  body.fcp-app-root-page .fcp-mobile-task-body span{
    font-size:12px!important;
  }
}
@media (min-width:1025px){
  body.fcp-app-root-page .fcp-app-main{
    max-width:1360px!important;
  }
  body.fcp-app-root-page .fcp-mobile-month-day{
    min-height:132px!important;
  }
}

