/* =====================================================================
   V2.8.6.2 — PATIENT DATA / GROWTH / CALENDAR CLARITY HOTFIX
   Functional UI patch. No Functions / Firestore rules / clinical model changes.
   ===================================================================== */

/* Parent legacy name preservation: visible but quiet until manually separated. */
.parent-legacy-name{
  padding:8px 10px!important;
  border:1px dashed var(--os-border)!important;
  border-radius:7px!important;
  background:var(--os-elevated)!important;
  color:var(--os-muted)!important;
  font-size:9px!important;
  line-height:1.45!important;
}
.parent-legacy-name strong{color:var(--os-text)!important}
.parent-legacy-name small{display:block!important;margin-top:2px!important;color:var(--os-muted)!important}

/* Growth corrections need an unmistakable destructive action. */
.growth-history-table .growth-delete-btn{
  border:1px solid color-mix(in srgb,var(--os-critical) 30%,var(--os-border))!important;
  border-radius:6px!important;
  padding:5px 8px!important;
  background:var(--os-critical-tint)!important;
  color:var(--os-critical)!important;
  font-weight:700!important;
  text-decoration:none!important;
}

/* Completed calendar entries must never look like plain white scheduled cards. */
.week-event.status-done,
.week-event.status-completed,
.month-event.status-done,
.month-event.status-completed,
.appointment-card.status-done,
.appointment-card.status-completed{
  position:relative!important;
  background:color-mix(in srgb,var(--os-success) 16%,var(--os-surface))!important;
  background-image:none!important;
  border-color:color-mix(in srgb,var(--os-success) 38%,var(--os-border))!important;
  color:var(--os-text)!important;
  box-shadow:none!important;
}
.week-event.status-done,
.week-event.status-completed{padding-right:26px!important}
.week-event.status-done::after,
.week-event.status-completed::after{
  content:"✓";
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  color:var(--os-success);
  font-size:12px;
  font-weight:900;
}

/* A past appointment still stored as scheduled is explicitly distinct from done. */
.week-event.status-past-scheduled,
.month-event.status-past-scheduled,
.appointment-card.status-past-scheduled{
  border-color:color-mix(in srgb,var(--os-warning) 36%,var(--os-border))!important;
  background:color-mix(in srgb,var(--os-warning-tint) 70%,var(--os-surface))!important;
}

@media(max-width:820px){
  .parent-card-grid{grid-template-columns:1fr 1fr!important}
  .growth-history-table .growth-delete-btn{min-height:32px!important}
}
