/* ==========================================================
   FCP 14.7.28 - Mobile task readability + calls archive
   Scope: frontend app only. No database/API/endpoint changes.
   ========================================================== */

html body.fcp-app-root-page .fcp-app-shell,
html body.fcp-app-root-page .fcp-app-shell *{
  box-sizing:border-box!important;
}

/* Final hard reset for every task card generated in the app. It neutralizes old layers
   that used absolute positioning and produced invisible/overlapped text on mobile. */
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-card,
html body.fcp-app-root-page .fcp-app-shell .fcp-mobile-task-card.fcp-task28-card,
html body.fcp-app-root-page .fcp-app-shell .fcp-task-card-saas.fcp-task28-card{
  position:relative!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  transform:none!important;
  float:none!important;
  clear:both!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-areas:"top" "main" "actions"!important;
  gap:11px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0 0 12px!important;
  padding:14px!important;
  border:1px solid #e2e8f0!important;
  border-radius:20px!important;
  background:#fff!important;
  box-shadow:0 10px 24px rgba(15,23,42,.055)!important;
  overflow:hidden!important;
  color:#0f172a!important;
  opacity:1!important;
  visibility:visible!important;
  isolation:isolate!important;
  contain:none!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-card::before,
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-card::after{
  display:none!important;
  content:none!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-card > *{
  position:static!important;
  transform:none!important;
  min-width:0!important;
  max-width:100%!important;
  opacity:1!important;
  visibility:visible!important;
}

html body.fcp-app-root-page .fcp-app-shell .fcp-task28-top,
html body.fcp-app-root-page .fcp-app-shell .fcp-task-card-saas .fcp-task28-top{
  grid-area:top!important;
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) auto 40px!important;
  align-items:center!important;
  gap:9px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  min-height:40px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-check{
  grid-column:1!important;
  position:static!important;
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  min-height:28px!important;
  max-width:28px!important;
  max-height:28px!important;
  margin:0!important;
  padding:0!important;
  border:2px solid #cbd5e1!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#fff!important;
  cursor:pointer!important;
  flex:none!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-card.is-done .fcp-task28-check,
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-card[data-task-status="done"] .fcp-task28-check{
  background:#16a34a!important;
  border-color:#16a34a!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-card.is-done .fcp-task28-check::after,
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-card[data-task-status="done"] .fcp-task28-check::after{
  content:"✓"!important;
  color:#fff!important;
  font-size:15px!important;
  line-height:1!important;
  font-weight:950!important;
}

html body.fcp-app-root-page .fcp-app-shell .fcp-task28-meta{
  grid-column:2!important;
  display:grid!important;
  grid-template-columns:auto auto!important;
  justify-content:start!important;
  align-items:center!important;
  gap:2px 7px!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  color:#64748b!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
  text-align:left!important;
  white-space:normal!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-meta span,
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-meta strong,
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-meta small{
  position:static!important;
  display:block!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  color:#64748b!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:750!important;
  letter-spacing:0!important;
  text-transform:none!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  opacity:1!important;
  visibility:visible!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-meta strong{
  color:#0f172a!important;
  font-size:13px!important;
  font-weight:950!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-meta small{
  grid-column:1 / -1!important;
  font-size:11px!important;
  color:#64748b!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-meta small::before{content:""!important;}

html body.fcp-app-root-page .fcp-app-shell .fcp-task28-badge,
html body.fcp-app-root-page .fcp-app-shell .fcp-task-card-saas .fcp-task28-badge{
  grid-column:3!important;
  position:static!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  justify-self:end!important;
  align-self:center!important;
  width:auto!important;
  min-width:0!important;
  max-width:110px!important;
  height:28px!important;
  min-height:28px!important;
  max-height:28px!important;
  margin:0!important;
  padding:0 10px!important;
  border:1px solid #e2e8f0!important;
  border-radius:999px!important;
  background:#f1f5f9!important;
  color:#334155!important;
  box-shadow:none!important;
  font-style:normal!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-badge.prio-high,
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-badge.prio-urgent{background:#fef2f2!important;color:#dc2626!important;border-color:#fecaca!important;}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-badge.prio-medium{background:#fffbeb!important;color:#b45309!important;border-color:#fde68a!important;}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-badge.prio-low{background:#ecfdf5!important;color:#047857!important;border-color:#bbf7d0!important;}

html body.fcp-app-root-page .fcp-app-shell .fcp-task28-more{
  grid-column:4!important;
  position:static!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  justify-self:end!important;
  align-self:center!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  max-width:40px!important;
  max-height:40px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #e2e8f0!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#334155!important;
  box-shadow:none!important;
  font-size:16px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.03em!important;
  text-align:center!important;
  cursor:pointer!important;
  z-index:3!important;
}

html body.fcp-app-root-page .fcp-app-shell .fcp-task28-main,
html body.fcp-app-root-page .fcp-app-shell .fcp-task-card-saas .fcp-task28-main,
html body.fcp-app-root-page .fcp-app-shell button.fcp-task28-main{
  grid-area:main!important;
  position:static!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:4px!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#0f172a!important;
  text-align:left!important;
  overflow:visible!important;
  cursor:pointer!important;
  opacity:1!important;
  visibility:visible!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-main strong,
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-main span,
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-main small{
  position:static!important;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  text-align:left!important;
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-main strong{
  color:#0f172a!important;
  font-size:16px!important;
  line-height:1.2!important;
  font-weight:950!important;
  letter-spacing:-.02em!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-main span{
  color:#475569!important;
  font-size:12.5px!important;
  line-height:1.32!important;
  font-weight:760!important;
  white-space:normal!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-main small{
  color:#64748b!important;
  font-size:12px!important;
  line-height:1.35!important;
  font-weight:650!important;
  white-space:normal!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
}

html body.fcp-app-root-page .fcp-app-shell .fcp-task28-actions{
  grid-area:actions!important;
  position:static!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-actions a,
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-actions button{
  position:static!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:112px!important;
  max-width:100%!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
  margin:0!important;
  padding:0 14px!important;
  border-radius:13px!important;
  border:1px solid #cbd5e1!important;
  background:#fff!important;
  color:#0f172a!important;
  text-decoration:none!important;
  box-shadow:none!important;
  font-size:13px!important;
  line-height:1!important;
  font-weight:950!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}
html body.fcp-app-root-page .fcp-app-shell .fcp-task28-actions .fcp-task-action-primary{
  background:#eff6ff!important;
  border-color:#bfdbfe!important;
  color:#2563eb!important;
}

/* Mobile list container safety: no empty vertical blocks. */
@media(max-width:699px){
  html body.fcp-app-root-page .fcp-app-shell .fcp-mobile-native-screen{
    padding-left:14px!important;
    padding-right:14px!important;
    padding-bottom:calc(118px + env(safe-area-inset-bottom,0px))!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-task-list-saas,
  html body.fcp-app-root-page .fcp-app-shell .fcp-mobile-task-bucket-list{
    display:grid!important;
    gap:12px!important;
    width:100%!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-task-list-header-saas{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-task-list-header-saas h3{
    font-size:24px!important;
    line-height:1.05!important;
    margin:0!important;
    color:#0f172a!important;
    letter-spacing:-.04em!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-mobile-task-progress{
    min-height:48px!important;
    padding:6px 14px!important;
    border-radius:999px!important;
    display:inline-grid!important;
    place-items:center!important;
    background:#fff7ed!important;
    border:1px solid #fed7aa!important;
    color:#0f172a!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-mobile-task-progress strong{
    font-size:21px!important;
    line-height:1!important;
    font-weight:950!important;
    color:#0f172a!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-mobile-task-progress small{
    font-size:10px!important;
    line-height:1!important;
    letter-spacing:.08em!important;
    text-transform:uppercase!important;
    font-weight:900!important;
    color:#64748b!important;
  }
}

/* Desktop/tablet: compact horizontal card, readable and not empty. */
@media(min-width:700px){
  html body.fcp-app-root-page .fcp-app-shell .fcp-task28-card{
    grid-template-columns:30px minmax(0,1fr) auto 40px auto!important;
    grid-template-areas:"check main badge more actions"!important;
    align-items:center!important;
    gap:14px!important;
    padding:16px 18px!important;
    min-height:86px!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-task28-top{
    display:contents!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-task28-check{grid-area:check!important;}
  html body.fcp-app-root-page .fcp-app-shell .fcp-task28-meta{display:none!important;}
  html body.fcp-app-root-page .fcp-app-shell .fcp-task28-badge{grid-area:badge!important;}
  html body.fcp-app-root-page .fcp-app-shell .fcp-task28-more{grid-area:more!important;}
  html body.fcp-app-root-page .fcp-app-shell .fcp-task28-main{
    grid-area:main!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-task28-main::before{
    content:attr(data-meta)!important;
    display:block!important;
    margin:0 0 3px!important;
    color:#64748b!important;
    font-size:12px!important;
    line-height:1.15!important;
    font-weight:800!important;
  }
  html body.fcp-app-root-page .fcp-app-shell .fcp-task28-actions{
    grid-area:actions!important;
    justify-content:flex-end!important;
    width:auto!important;
    flex-wrap:nowrap!important;
  }
}

/* Calls archive */
html body.fcp-app-root-page .fcp-more-switcher-14728{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
html body.fcp-app-root-page .fcp-more-switcher-14728 button{
  min-width:0!important;
  font-size:12px!important;
  padding:0 7px!important;
}
html body.fcp-app-root-page .fcp-calls-app-14728{
  display:grid!important;
  gap:12px!important;
}
html body.fcp-app-root-page .fcp-calls-kpi-grid-14728{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
html body.fcp-app-root-page .fcp-calls-kpi-grid-14728 article{
  margin:0!important;
  padding:12px!important;
  border-radius:16px!important;
  background:#f8fafc!important;
  border:1px solid #e2e8f0!important;
}
html body.fcp-app-root-page .fcp-calls-kpi-grid-14728 span{
  display:block!important;
  color:#64748b!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  margin:0 0 6px!important;
}
html body.fcp-app-root-page .fcp-calls-kpi-grid-14728 strong{
  display:block!important;
  color:#0f172a!important;
  font-size:22px!important;
  line-height:1!important;
  font-weight:950!important;
}
html body.fcp-app-root-page .fcp-calls-new-button-14728{
  width:100%!important;
  min-height:44px!important;
  border:0!important;
  border-radius:15px!important;
  background:#2563eb!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font-size:14px!important;
  font-weight:950!important;
  box-shadow:0 12px 24px rgba(37,99,235,.22)!important;
}
html body.fcp-app-root-page .fcp-call-history-list-14728{
  display:grid!important;
  gap:10px!important;
  width:100%!important;
}
html body.fcp-app-root-page .fcp-call-history-card-14719{
  width:100%!important;
  margin:0!important;
  padding:13px!important;
  border-radius:17px!important;
  border:1px solid #e2e8f0!important;
  background:#fff!important;
  box-shadow:0 8px 18px rgba(15,23,42,.045)!important;
  display:grid!important;
  gap:8px!important;
  overflow:hidden!important;
}
html body.fcp-app-root-page .fcp-call-history-card-14719 > div{
  display:grid!important;
  gap:3px!important;
}
html body.fcp-app-root-page .fcp-call-history-card-14719 span{
  color:#2563eb!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.1em!important;
  text-transform:uppercase!important;
}
html body.fcp-app-root-page .fcp-call-history-card-14719 strong{
  color:#0f172a!important;
  font-size:15px!important;
  line-height:1.2!important;
  font-weight:950!important;
  overflow-wrap:anywhere!important;
}
html body.fcp-app-root-page .fcp-call-history-card-14719 small,
html body.fcp-app-root-page .fcp-call-history-card-14719 p,
html body.fcp-app-root-page .fcp-call-history-card-14719 em{
  color:#64748b!important;
  font-size:12px!important;
  line-height:1.35!important;
  font-weight:750!important;
  font-style:normal!important;
}
html body.fcp-app-root-page .fcp-call-history-card-14719 footer{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  margin:0!important;
  padding:0!important;
}
html body.fcp-app-root-page .fcp-call-history-card-14719 footer a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:34px!important;
  padding:0 10px!important;
  border-radius:11px!important;
  border:1px solid #bfdbfe!important;
  background:#eff6ff!important;
  color:#2563eb!important;
  text-decoration:none!important;
  font-size:12px!important;
  font-weight:900!important;
}
@media(max-width:390px){
  html body.fcp-app-root-page .fcp-more-switcher-14728{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html body.fcp-app-root-page .fcp-calls-kpi-grid-14728{grid-template-columns:1fr!important;}
}
