/* TV Bro compatibility and visual rhythm: round twelve. */

/* Shared page header contract for every formal dashboard page. */
.dashboard-page-header{
  box-sizing:border-box!important;
  width:100%!important;
  height:74px!important;
  min-height:74px!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
}
.dashboard-page-header>div:first-child{min-width:0!important;}
.dashboard-page-header h2,
.dashboard-page-header .page-title{
  margin:0!important;
  font-size:24px!important;
  font-weight:700!important;
  line-height:30px!important;
  color:var(--dashboard-heading)!important;
}
.dashboard-page-header h2+p,
.dashboard-page-header .page-subtitle{
  margin-top:4px!important;
  font-size:12px!important;
  line-height:16px!important;
  letter-spacing:.08em!important;
}
.dashboard-page-header>div+div,
.dashboard-page-header>.header-status{margin-left:16px!important;}
.dashboard-page-header #updateTime{font-size:12px!important;line-height:18px!important;}

/* Shared card-heading-to-content rhythm. */
.dashboard-card-heading,
html[class*="page-"] body[class*="page-"] .card-header{
  box-sizing:border-box;
  min-height:28px;
  margin-bottom:12px!important;
}
html[class*="page-"] body[class*="page-"] .card-header .card-title,
html[class*="page-"] body[class*="page-"] .card-title{
  line-height:20px;
}
html[class*="page-"] body[class*="page-"] .card-header+.card-body{margin-top:0;}

/* Chronic risk: larger overview figures and resilient spacing between metrics. */
html.page-chronic-risk body.page-chronic-risk .risk-summary-value{
  font-size:22px!important;
  line-height:28px!important;
}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-control-card .control-grid{
  gap:16px!important;
  row-gap:16px!important;
  column-gap:16px!important;
}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-control-card .control-grid>*{
  flex-basis:calc(50% - 8px)!important;
}

/* Executive: move height from Mr Wang to Today Status and avoid flex-gap reliance. */
html.page-executive.page-executive.page-executive body.page-executive.page-executive.page-executive .dashboard-container.page-executive .executive-main-grid>.wang-card{
  grid-template-rows:360px 260px!important;
}
html.page-executive body.page-executive .risk-card>.flex.flex-wrap{
  gap:0!important;
  row-gap:0!important;
  column-gap:0!important;
  margin:0!important;
}
html.page-executive body.page-executive .risk-card>.flex.flex-wrap>span{
  margin:0!important;
}
html.page-executive body.page-executive .risk-card>.flex.flex-wrap>span+span{
  margin-left:16px!important;
}

/* Family: reduce overview row and distribute the released space to both lower cards. */
html.page-family.page-family.page-family body.page-family.page-family.page-family .dashboard-container.page-family{
  grid-template-rows:74px 260px 382px 228px!important;
}
html.page-family.page-family.page-family body.page-family.page-family.page-family .dashboard-container.page-family .family-reminder-card{
  height:228px!important;
  min-height:228px!important;
  max-height:228px!important;
}
html.page-family.page-family.page-family body.page-family.page-family.page-family .family-reminder-card .reminder-list,
html.page-family.page-family.page-family body.page-family.page-family.page-family .family-reminder-card .reminder-list>*{
  height:166px!important;
}
html.page-family body.page-family .plan-card{
  align-self:stretch!important;
}

/* Individual vitals: create physical spacing even when the engine ignores grid/flex gap. */
html.page-individual-vitals body.page-individual-vitals .vitals-third-row>*{
  margin-top:8px!important;
  height:calc(100% - 8px)!important;
}
html.page-individual-vitals body.page-individual-vitals .alert-list{
  gap:0!important;
}
html.page-individual-vitals body.page-individual-vitals .alert-item+.alert-item{
  margin-top:10px!important;
}

/* Center the content of the two four-metric groups. */
html.page-intervention body.page-intervention .intervention-effect-content>*{
  text-align:center!important;
  align-items:center!important;
  justify-content:center!important;
}
html.page-medical body.page-medical .medical-emergency-metrics,
html.page-medical body.page-medical .medical-emergency-content{
  justify-items:stretch!important;
}
html.page-medical body.page-medical .medical-emergency-metrics>*,
html.page-medical body.page-medical .medical-emergency-content>*{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}
html.page-medical.page-medical.page-medical body.page-medical.page-medical.page-medical .medical-row-layout .card-header{
  margin-bottom:12px!important;
}

/* Personal service: physical icon/text spacing fallbacks for TV Bro. */
html.page-personal-service body.page-personal-service .team-item,
html.page-personal-service body.page-personal-service .record-item,
html.page-personal-service body.page-personal-service .personal-annual-exam-record,
html.page-personal-service body.page-personal-service .personal-online-consultation{
  gap:0!important;
}
html.page-personal-service body.page-personal-service .team-avatar-wrap{
  flex:0 0 44px!important;
  width:44px!important;
  margin-right:12px!important;
}
html.page-personal-service body.page-personal-service .record-icon{
  flex:0 0 40px!important;
  width:40px!important;
  margin-right:12px!important;
}
html.page-personal-service body.page-personal-service .team-avatar-wrap+div,
html.page-personal-service body.page-personal-service .record-icon+.record-meta{
  margin-left:0!important;
}
html.page-personal-service body.page-personal-service .personal-annual-exam-record>:first-child,
html.page-personal-service body.page-personal-service .personal-online-consultation>:first-child{
  flex:0 0 36px!important;
  width:36px!important;
  height:36px!important;
  margin-right:12px!important;
}
html.page-personal-service body.page-personal-service .personal-annual-exam-record>:nth-child(2),
html.page-personal-service body.page-personal-service .personal-online-consultation>:nth-child(2){
  min-width:0!important;
  margin-left:0!important;
}

/* Population: two equal stacks with equal combined height. */
html.page-population body.page-population .dashboard-grid{
  grid-template-rows:280px 280px minmax(0,1fr)!important;
}
html.page-population.page-population.page-population body.page-population.page-population.page-population .population-health-indicator-card,
html.page-population.page-population.page-population body.page-population.page-population.page-population .population-activity-card{
  height:252px!important;
  min-height:252px!important;
  max-height:252px!important;
  align-self:stretch!important;
}
