/* BellPath final mobile and layout polish */
:root{
  --bp-safe-bottom: max(18px, env(safe-area-inset-bottom));
}
html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body{
  overflow-x: hidden;
  padding-bottom: calc(176px + var(--bp-safe-bottom)) !important;
}
input,select,textarea,button,.btn,a.btn{
  font-size: 16px;
}
input[type="number"],
input[type="date"],
input[type="time"],
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea{
  min-height: 46px;
}
.bp-stacked-info{
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  max-width: min(620px, 100%) !important;
  align-items: stretch !important;
}
.bp-stacked-info > *{
  width: 100% !important;
}
.bp-setup-chip{
  border-color: rgba(81,194,120,.45) !important;
  color: #a7efbd !important;
}
#bellpath-nav-helper{
  position: static !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  max-width: 1240px !important;
  margin: 10px auto 14px !important;
  padding: 0 18px !important;
  z-index: auto !important;
}
#bellpath-nav-helper button,
#bellpath-nav-helper a{
  box-shadow: none !important;
}
#bpSyncMiniStatus{
  position: fixed !important;
  right: 14px !important;
  bottom: calc(78px + var(--bp-safe-bottom)) !important;
  left: auto !important;
  max-width: min(310px, calc(100vw - 28px)) !important;
  white-space: normal !important;
  border-radius: 16px !important;
  text-align: center !important;
}
.ai-fab{
  bottom: calc(18px + var(--bp-safe-bottom)) !important;
}
.ai-panel{
  bottom: calc(84px + var(--bp-safe-bottom)) !important;
}
.time-card,
.bp-clock-card{
  position: sticky;
  top: 86px;
}
.time-card .btnrow,
.bp-clock-card .btnrow{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.time-card .btnrow .btn,
.bp-clock-card .btnrow .btn{
  width: 100% !important;
  min-height: 52px !important;
}
.field-grid{
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
}
.pay-layout{
  grid-template-columns: minmax(0,1.08fr) minmax(310px,.92fr) !important;
  align-items: start !important;
}
.card,.module,.tool-card,.action-card,.chart-card,.kpi-card,.metric-card{
  min-width: 0 !important;
}
h1,h2,h3,p,li,label,.lead,.fine,.btn,.card,.outbox,.ai-output{
  overflow-wrap: anywhere;
}
@media(max-width: 900px){
  .pay-layout{
    grid-template-columns: 1fr !important;
  }
  .time-card,
  .bp-clock-card{
    position: static !important;
  }
}
@media(max-width: 720px){
  body{
    padding-bottom: calc(236px + var(--bp-safe-bottom)) !important;
  }
  .wrap,.shell,.bp-shell-wrap{
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .hero,.grid,.two,.result-grid,.kpi-grid,.metric-row,.module-grid,.tool-grid,.chart-grid{
    grid-template-columns: 1fr !important;
  }
  .btnrow,.row{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .btn,a.btn,button.btn,input[type="button"],input[type="submit"]{
    width: 100% !important;
    min-height: 48px !important;
  }
  .time-card .btnrow,
  .bp-clock-card .btnrow{
    grid-template-columns: 1fr !important;
  }
  #bellpath-nav-helper{
    margin: 8px 0 10px !important;
    padding: 0 12px !important;
  }
  #bellpath-nav-helper button,
  #bellpath-nav-helper a{
    flex: 1 1 calc(50% - 8px) !important;
    min-height: 42px !important;
    text-align: center !important;
  }
  #bpSyncMiniStatus{
    left: 12px !important;
    right: 12px !important;
    bottom: calc(74px + var(--bp-safe-bottom)) !important;
    max-width: none !important;
    padding: 8px 10px !important;
  }
  .ai-fab{
    left: 12px !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    bottom: calc(14px + var(--bp-safe-bottom)) !important;
  }
  .ai-panel{
    left: 12px !important;
    right: 12px !important;
    bottom: calc(74px + var(--bp-safe-bottom)) !important;
    width: auto !important;
  }
}
@media print{
  #bpSyncMiniStatus,#bellpath-nav-helper,.ai-fab,.ai-panel{
    display: none !important;
  }
}
