/* CRM V68 therapy list redesigned to match All Appointments feel */

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-card-grid{
  display:flex!important;
  flex-direction:column!important;
  gap:14px!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-session-card,
#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-request-card{
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(290px,1.1fr) minmax(520px,1.7fr) auto!important;
  grid-template-areas:
    "head meta actions"
    "note note note"
    "obs obs obs"!important;
  align-items:center!important;
  column-gap:18px!important;
  row-gap:14px!important;
  padding:18px 20px!important;
  margin:0!important;
  border:1px solid #d9e4ef!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 6px 18px rgba(15,23,42,.03)!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-card-head{
  grid-area:head!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin:0!important;
  min-width:0!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-person-wrap{
  min-width:0!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-person-row{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-patient-name{
  font-size:15px!important;
  font-weight:900!important;
  color:#10243f!important;
  line-height:1.25!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-mr-badge{
  display:inline-flex!important;
  align-items:center!important;
  min-height:30px!important;
  padding:0 12px!important;
  border-radius:999px!important;
  background:#f3f6f9!important;
  border:1px solid #e0e7ef!important;
  color:#415772!important;
  font-size:11px!important;
  font-weight:850!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-service-pill{
  display:inline-flex!important;
  align-items:center!important;
  min-height:34px!important;
  padding:0 13px!important;
  margin-top:10px!important;
  border-radius:999px!important;
  background:#eef5ff!important;
  border:1px solid #bcd7ff!important;
  color:#1d4ed8!important;
  font-size:11.5px!important;
  font-weight:850!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-card-head .therapy-chip{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:30px!important;
  padding:0 12px!important;
  border-radius:999px!important;
  font-size:10.5px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-grid{
  grid-area:meta!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:0!important;
  margin:0!important;
  min-width:0!important;
  background:#fff!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-item{
  min-height:auto!important;
  padding:2px 18px!important;
  border:0!important;
  border-left:1px solid #e7edf4!important;
  border-radius:0!important;
  background:transparent!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-item:first-child{
  border-left:0!important;
  padding-left:0!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-item:last-child{
  padding-right:0!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-label{
  display:block!important;
  margin:0 0 6px!important;
  color:#8295ae!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.1em!important;
  text-transform:uppercase!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-item strong{
  display:block!important;
  color:#10243f!important;
  font-size:13px!important;
  font-weight:900!important;
  line-height:1.5!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-actions{
  grid-area:actions!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  white-space:nowrap!important;
  flex-wrap:nowrap!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-actions .btn{
  min-height:40px!important;
  height:40px!important;
  padding:0 16px!important;
  border-radius:12px!important;
  font-size:12px!important;
  font-weight:850!important;
  box-shadow:none!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-note-alert,
#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-request-reason{
  grid-area:note!important;
  margin:0!important;
  padding:16px!important;
  border-radius:14px!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-observation-box{
  grid-area:obs!important;
  margin:0!important;
  padding:16px!important;
  border-radius:14px!important;
  border:1px dashed #d4deea!important;
  background:#fbfdff!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-observation-title{
  margin-bottom:8px!important;
  color:#10243f!important;
  font-size:12px!important;
  font-weight:900!important;
}

#page-therapy.crm-therapy-list-view #therapy-page-body .therapy-observation-text{
  color:#4d627b!important;
  font-size:12.5px!important;
  line-height:1.6!important;
  max-height:none!important;
}

body.crm-night-mode #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-session-card,
body.crm-night-mode #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-request-card{
  background:#2b323a!important;
  border-color:#46515e!important;
}

body.crm-night-mode #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-item{
  border-left-color:#46515e!important;
}

body.crm-night-mode #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-observation-box{
  background:#252c33!important;
  border-color:#46515e!important;
}

@media(max-width:1240px){
  #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-session-card,
  #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-request-card{
    grid-template-columns:minmax(260px,.95fr) minmax(380px,1.3fr)!important;
    grid-template-areas:
      "head actions"
      "meta meta"
      "note note"
      "obs obs"!important;
  }

  #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-actions{
    justify-content:flex-end!important;
  }

  #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-item:first-child{
    padding-left:0!important;
  }
}

@media(max-width:860px){
  #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-session-card,
  #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-request-card{
    grid-template-columns:1fr!important;
    grid-template-areas:
      "head"
      "meta"
      "actions"
      "note"
      "obs"!important;
    padding:16px!important;
  }

  #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-grid{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }

  #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-meta-item{
    padding:0!important;
    border-left:0!important;
  }

  #page-therapy.crm-therapy-list-view #therapy-page-body .therapy-actions{
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
}
