/* 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(94px + 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;
}
#bpTimeClockDock{
  right: 14px !important;
  bottom: calc(150px + var(--bp-safe-bottom)) !important;
  left: auto !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: min(164px, calc(100vw - 28px)) !important;
  gap: 6px !important;
  align-items: stretch !important;
  z-index: 1800 !important;
}
#bpTimeClockDock .bp-clock-btn{
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.24) !important;
}
#bpTimeClockDock .bp-clock-card{
  min-width: 0 !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.22) !important;
}
#bpTimeClockDock .bp-clock-card strong{
  font-size: 10px !important;
}
#bpTimeClockDock .bp-clock-card span{
  font-size: 11px !important;
}
#bpTimeClockPanel{
  right: 14px !important;
  bottom: calc(238px + var(--bp-safe-bottom)) !important;
  max-height: calc(100vh - 270px) !important;
  z-index: 1799 !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: auto !important;
    right: 12px !important;
    bottom: calc(124px + var(--bp-safe-bottom)) !important;
    max-width: min(170px, calc(100vw - 24px)) !important;
    padding: 8px 10px !important;
  }
  #bpTimeClockDock{
    left: auto !important;
    right: 12px !important;
    bottom: calc(178px + var(--bp-safe-bottom)) !important;
    width: min(150px, calc(100vw - 24px)) !important;
  }
  #bpTimeClockPanel{
    left: 12px !important;
    right: 12px !important;
    bottom: calc(250px + var(--bp-safe-bottom)) !important;
    width: auto !important;
    max-height: calc(100dvh - 286px) !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;
  }
}

/* Business Control deep-link map */
.bp-business-deep-grid{
  align-items: stretch;
}
.bp-deep-module{
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  min-height: 170px;
  text-decoration: none;
}
.bp-deep-module > strong{
  color: var(--gold2,#f1d35f);
  font-size: 18px;
  line-height: 1.15;
}
.bp-deep-links{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.bp-deep-links a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(241,211,95,.28);
  border-radius: 999px;
  background: rgba(241,211,95,.06);
  color: var(--gold2,#f1d35f);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-align: center;
}
.bp-deep-links a:hover{
  border-color: rgba(241,211,95,.58);
  background: rgba(241,211,95,.12);
}
@media(max-width:720px){
  .bp-deep-links{
    display: grid;
    grid-template-columns: 1fr;
  }
  .bp-deep-links a{
    width: 100%;
    min-height: 42px;
  }
}
