
/* Client record: inset visit cards and center the close icon.
   All adjustments are visual, without changing client history behavior. */
#clientDetailModal .client-history-panel .client-history-list{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  padding:8px 14px 16px!important;
}
#clientDetailModal .client-history-panel .client-history-item{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  margin:0 auto 9px!important;
}
#clientDetailModal .client-detail-close.client-detail-close-corner{
  display:grid!important;
  place-items:center!important;
  justify-items:center!important;
  align-items:center!important;
  box-sizing:border-box!important;
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  flex:0 0 36px!important;
  width:36px!important;
  min-width:36px!important;
  height:36px!important;
  min-height:36px!important;
  padding:0!important;
  font-size:0!important;
  line-height:0!important;
  text-indent:0!important;
  color:transparent!important;
}
#clientDetailModal .client-detail-close.client-detail-close-corner::before,
#clientDetailModal .client-detail-close.client-detail-close-corner::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:15px;
  height:1.8px;
  border-radius:1px;
  background:#5d748b;
  pointer-events:none;
}
#clientDetailModal .client-detail-close.client-detail-close-corner::before{
  transform:translate(-50%,-50%) rotate(45deg);
}
#clientDetailModal .client-detail-close.client-detail-close-corner::after{
  transform:translate(-50%,-50%) rotate(-45deg);
}
@media(max-width:620px){
  #clientDetailModal .client-history-panel .client-history-list{
    padding:8px 10px 14px!important;
  }
}

/* Client history: spreadsheet-style rows and header action alignment, 2026-10-14. */
/* The close button shares the action flex row instead of taking a separate slot. */
@media (min-width:761px) {
  #clientDetailModal .client-detail-head {
    padding-right:20px!important;
    align-items:center!important;
  }
  #clientDetailModal .client-detail-head .client-detail-head-actions {
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:8px!important;
    min-width:0!important;
  }
  #clientDetailModal .client-detail-head-actions > .client-detail-close.client-detail-close-corner {
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    transform:none!important;
    flex:0 0 40px!important;
    align-self:center!important;
    justify-self:auto!important;
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    margin:0!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    box-sizing:border-box!important;
  }
}
@media (max-width:760px) {
  /* Keep the narrow-screen close control in the top-right corner rather
     than creating a fifth column in the mobile action grid. */
  #clientDetailModal .client-detail-head .client-detail-head-actions > .client-detail-close.client-detail-close-corner {
    position:absolute!important;
    inset:auto 10px auto auto!important;
    top:10px!important;
    right:10px!important;
    display:grid!important;
    place-items:center!important;
    flex:none!important;
    width:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    padding:0!important;
    margin:0!important;
    z-index:7!important;
  }
}
#clientDetailModal .client-history-panel .client-history-list.client-history-table-scroll,
#clientDetailModal .client-history-panel.active .client-history-list.client-history-table-scroll {
  display:block!important;
  flex:1 1 auto!important;
  box-sizing:border-box!important;
  min-width:0!important;
  width:calc(100% - 28px)!important;
  height:auto!important;
  min-height:0!important;
  max-height:100%!important;
  margin:0 14px 16px!important;
  padding:0!important;
  border:1px solid #dce7f0!important;
  border-radius:10px!important;
  background:#fff!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  /* Horizontal table scrolling stays contained; wheel/touch scrolling can
     continue vertically in the chart when the table reaches its boundary. */
  overscroll-behavior-x:contain;
  overscroll-behavior-y:auto;
  scrollbar-width:thin;
}
#clientDetailModal .client-history-panel.client-patient-panel .client-history-list.client-history-table-scroll{
  width:100%!important;
  margin:0 0 16px!important;
  max-height:none!important;
}
#clientDetailModal .client-history-table {
  display:table!important;
  width:100%!important;
  min-width:680px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:fixed!important;
  background:#fff!important;
  font-family:Inter,system-ui,sans-serif!important;
}
#clientDetailModal .client-history-table .col-date{width:130px!important}
#clientDetailModal .client-history-table .col-time{width:80px!important}
#clientDetailModal .client-history-table .col-service{width:auto!important}
#clientDetailModal .client-history-table .col-person{width:170px!important}
#clientDetailModal .client-history-table .col-status{width:139px!important}
#clientDetailModal .client-history-table th,
#clientDetailModal .client-history-table td {
  display:table-cell!important;
  box-sizing:border-box!important;
  position:static!important;
  grid-column:auto!important;
  grid-row:auto!important;
  height:auto!important;
  border:0!important;
  border-right:1px solid #edf2f6!important;
  border-bottom:1px solid #e6edf3!important;
  border-radius:0!important;
  padding:11px 12px!important;
  margin:0!important;
  text-align:left!important;
  vertical-align:middle!important;
  font-size:11.5px!important;
  line-height:1.4!important;
  min-width:0!important;
}
#clientDetailModal .client-history-table th:last-child,
#clientDetailModal .client-history-table td:last-child{border-right:0!important}
#clientDetailModal .client-history-table thead th {
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  background:#f3f7fb!important;
  color:#667f96!important;
  font-size:10.5px!important;
  font-weight:750!important;
  letter-spacing:.015em!important;
  line-height:1.25!important;
  padding:12px!important;
  white-space:nowrap!important;
}
#clientDetailModal .client-history-table tbody tr {
  display:table-row!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
  cursor:pointer;
}
#clientDetailModal .client-history-table tbody tr:nth-child(even){background:#fafcff!important}
#clientDetailModal .client-history-table tbody tr:hover,
#clientDetailModal .client-history-table tbody tr:focus-within{background:#edf6ff!important}
#clientDetailModal .client-history-table tbody tr:hover td,
#clientDetailModal .client-history-table tbody tr:focus-within td{background:transparent!important}
#clientDetailModal .client-history-table tbody tr:last-child td{border-bottom:0!important}
#clientDetailModal .client-history-table .client-history-date-button {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  color:#215c93!important;
  font-size:11.5px!important;
  font-weight:750!important;
  line-height:1.35!important;
  text-align:left!important;
  white-space:nowrap!important;
  cursor:pointer;
}
#clientDetailModal .client-history-table .client-history-date-button strong{font:inherit!important}
#clientDetailModal .client-history-table .client-history-date-button:hover{text-decoration:underline!important}
#clientDetailModal .client-history-table .client-history-date-button:focus-visible{
  outline:2px solid #3987c5!important;
  outline-offset:3px!important;
  border-radius:3px!important;
}
#clientDetailModal .client-history-table .client-history-table-time{
  color:#4c708d!important;
  font-variant-numeric:tabular-nums!important;
  font-weight:650!important;
  white-space:nowrap!important;
}
#clientDetailModal .client-history-table .client-history-table-service{
  color:#243e57!important;
  font-weight:700!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
#clientDetailModal .client-history-table .client-history-table-person{
  color:#667f91!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
#clientDetailModal .client-history-table .client-history-table-status{white-space:normal!important}
#clientDetailModal .client-history-table .client-history-table-status .client-history-attendance-status{
  display:inline-flex!important;
  position:static!important;
  box-sizing:border-box!important;
  grid-column:auto!important;
  grid-row:auto!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:25px!important;
  height:auto!important;
  padding:4px 9px!important;
  margin:0!important;
  border:1px solid #d9e4ed!important;
  border-radius:999px!important;
  background:#f2f6fa!important;
  color:#557088!important;
  font-size:10px!important;
  font-weight:750!important;
  line-height:1.3!important;
  white-space:nowrap!important;
  text-align:center!important;
}
#clientDetailModal .client-history-table tr[data-history-state="done"] .client-history-attendance-status{
  border-color:#a7d9bd!important;
  background:#eaf8f0!important;
  color:#1e8050!important;
}
#clientDetailModal .client-history-table tr[data-history-state="noshow"] .client-history-attendance-status{
  border-color:#ecc2c2!important;
  background:#fff0f0!important;
  color:#aa4242!important;
}
#clientDetailModal .client-history-table tr[data-history-state="cancelled"] .client-history-attendance-status{
  border-color:#e1d8d8!important;
  background:#f7f3f3!important;
  color:#896b6b!important;
}
#clientDetailModal .client-history-table .client-history-hidden{
  display:block!important;
  margin-top:3px!important;
  font-size:9px!important;
  line-height:1.2!important;
  color:#8295a7!important;
}
#clientDetailModal .client-history-table .client-history-empty-row td{
  text-align:center!important;
  padding:32px 12px!important;
  color:#7a8c9f!important;
  cursor:default!important;
}
@media (max-width:760px){
  #clientDetailModal .client-history-panel .client-history-list.client-history-table-scroll,
  #clientDetailModal .client-history-panel.active .client-history-list.client-history-table-scroll{
    width:100%!important;
    margin:0 0 12px!important;
    flex:none!important;
    max-height:none!important;
    /* The tab viewport owns vertical scrolling; cards must not trap gestures. */
    overflow:visible!important;
    overscroll-behavior:auto;
    border:0!important;background:transparent!important;
  }
  #clientDetailModal .client-history-table{display:block!important;min-width:0!important;table-layout:auto!important}
  #clientDetailModal .client-history-table colgroup{display:none!important}
  #clientDetailModal .client-history-table thead{
    position:absolute!important;width:1px!important;height:1px!important;
    clip-path:inset(50%)!important;overflow:hidden!important;white-space:nowrap!important;
  }
  #clientDetailModal .client-history-table tbody{display:grid!important;gap:8px!important}
  #clientDetailModal .client-history-table .client-history-table-row{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
    gap:5px 8px!important;padding:10px 12px!important;
    border:1px solid #dce7f0!important;border-radius:10px!important;background:#fff!important;
  }
  #clientDetailModal .client-history-table .client-history-table-row td{
    display:block!important;padding:0!important;border:0!important;font-size:12px!important;
    line-height:1.45!important;overflow-wrap:anywhere!important;
  }
  #clientDetailModal .client-history-table .client-history-table-row .client-history-table-date{grid-column:1!important;grid-row:1!important}
  #clientDetailModal .client-history-table .client-history-table-row .client-history-table-time{grid-column:2!important;grid-row:1!important;text-align:right!important;font-weight:500!important}
  #clientDetailModal .client-history-table .client-history-table-row .client-history-table-service{grid-column:1 / -1!important;grid-row:2!important;font-weight:600!important}
  #clientDetailModal .client-history-table .client-history-table-row .client-history-table-person{grid-column:1!important;grid-row:3!important;align-self:center!important}
  #clientDetailModal .client-history-table .client-history-table-row .client-history-table-status{grid-column:2!important;grid-row:3!important;text-align:right!important}
}

