:root {
  --mf-home-ink: #0b2447;
  --mf-home-muted: #55708f;
  --mf-home-border: #cbddec;
  --mf-home-teal: #0697a5;
  --mf-home-blue: #0878d1;
  --mf-home-green: #13a66b;
  --mf-home-amber: #d48912;
  --mf-home-red: #c74848;
  --mf-home-violet: #7662c8;
  --mf-home-surface: #ffffff;
  --mf-home-soft: #f5f9fc;
}

.mf-home-executive-hero .mf-home-welcome-title {
  max-width: 1080px;
  font-size: clamp(2.25rem, 4.2vw, 4.45rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.mf-home-executive-hero .mf-home-welcome-subtitle {
  max-width: 1040px;
  font-size: clamp(1rem, 1.25vw, 1.16rem) !important;
  line-height: 1.55 !important;
  color: var(--mf-home-muted) !important;
}

.mf-home-exec-summary {
  width: 100%;
  margin: 18px 0 25px;
}

.mf-home-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mf-home-kpi-card,
.mf-home-panel {
  min-width: 0;
  border: 1px solid var(--mf-home-border);
  border-radius: 18px;
  background: var(--mf-home-surface);
  box-shadow: 0 10px 28px rgba(19, 54, 88, 0.07);
}

.mf-home-kpi-card {
  position: relative;
  display: flex;
  min-height: 150px;
  padding: 20px 21px;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mf-home-kpi-card:hover,
.mf-home-kpi-card:focus-visible {
  transform: translateY(-2px);
  border-color: #9dc7df;
  box-shadow: 0 14px 32px rgba(19, 54, 88, 0.12);
  outline: none;
}

.mf-home-kpi-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--mf-home-teal), var(--mf-home-blue));
}

.mf-home-kpi-card--people::before { background: linear-gradient(180deg, #1c8adb, #176ab5); }
.mf-home-kpi-card--attendance::before { background: linear-gradient(180deg, #0caf9e, #087e91); }
.mf-home-kpi-card--vacancies::before { background: linear-gradient(180deg, #7763d1, #4f61bd); }
.mf-home-kpi-card--coverage::before { background: linear-gradient(180deg, #28a86c, #108a72); }
.mf-home-kpi-card--risk::before { background: linear-gradient(180deg, #e09a20, #c95a45); }

.mf-home-kpi-label,
.mf-home-panel-title {
  color: #365b78;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.mf-home-kpi-value {
  margin-top: 10px;
  color: var(--mf-home-ink);
  font-size: clamp(2.15rem, 3vw, 3.2rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.05em;
}

.mf-home-kpi-detail {
  margin-top: 10px;
  color: var(--mf-home-muted);
  font-size: .84rem;
  line-height: 1.38;
}

.mf-home-kpi-link {
  margin-top: auto;
  padding-top: 10px;
  color: #087c9f;
  font-size: .72rem;
  font-weight: 800;
}

.mf-home-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}

.mf-home-analysis-grid--equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mf-home-analysis-grid > div,
.mf-home-analysis-grid .mf-home-panel {
  min-width: 0;
  height: 100%;
}

.mf-home-panel {
  min-height: 300px;
  padding: 19px 20px 18px;
  overflow: hidden;
}

.mf-home-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.mf-home-panel-title {
  color: var(--mf-home-ink);
  font-size: .86rem;
}

.mf-home-panel-subtitle {
  margin-top: 5px;
  color: var(--mf-home-muted);
  font-size: .78rem;
  line-height: 1.35;
}

.mf-home-panel-link {
  flex: 0 0 auto;
  color: #087c9f;
  font-size: .72rem;
  font-weight: 800;
  text-decoration: none;
}

.mf-home-panel-link:hover,
.mf-home-panel-link:focus-visible { text-decoration: underline; }

.mf-home-panel-body {
  min-width: 0;
}

.mf-home-chart-legend,
.mf-home-coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 4px;
  color: #55708f;
  font-size: .7rem;
  font-weight: 750;
}

.mf-home-chart-legend span,
.mf-home-coverage-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mf-home-legend-dot,
.mf-home-coverage-legend i {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--mf-home-blue);
}

.mf-home-legend-dot--present { background: var(--mf-home-teal); }
.mf-home-legend-dot--late { background: var(--mf-home-amber); }
.mf-home-legend-dot--absent { background: var(--mf-home-red); }
.mf-home-legend-dot--leave { background: var(--mf-home-violet); }

.mf-home-line-chart {
  display: block;
  width: 100%;
  min-height: 190px;
  overflow: visible;
}

.mf-home-chart-grid {
  stroke: #dfeaf3;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.mf-home-chart-y,
.mf-home-chart-x {
  fill: #70869a;
  font-size: 10px;
  font-weight: 700;
}

.mf-home-chart-x { text-anchor: middle; }
.mf-home-chart-y { text-anchor: end; }

.mf-home-chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mf-home-chart-line--present { stroke: var(--mf-home-teal); }
.mf-home-chart-line--late { stroke: var(--mf-home-amber); }
.mf-home-chart-line--absent { stroke: var(--mf-home-red); }
.mf-home-chart-line--leave { stroke: var(--mf-home-violet); }

.mf-home-chart-point {
  fill: #fff;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}
.mf-home-chart-point--present { stroke: var(--mf-home-teal); }
.mf-home-chart-point--late { stroke: var(--mf-home-amber); }
.mf-home-chart-point--absent { stroke: var(--mf-home-red); }
.mf-home-chart-point--leave { stroke: var(--mf-home-violet); }

.mf-home-bars {
  display: grid;
  gap: 13px;
  padding-top: 5px;
}

.mf-home-bar-row {
  display: grid;
  grid-template-columns: minmax(82px, 1.15fr) minmax(100px, 2fr) 28px;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.mf-home-bar-label {
  min-width: 0;
  color: #25445f;
  font-size: .76rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-home-bar-track,
.mf-home-compliance-track {
  height: 10px;
  border-radius: 99px;
  background: #e9f1f7;
  overflow: hidden;
}

.mf-home-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mf-home-blue), var(--mf-home-teal));
}

.mf-home-bar-row strong {
  color: var(--mf-home-ink);
  font-size: .76rem;
  text-align: right;
}

.mf-home-coverage-legend i.required { background: #bdd0e1; }
.mf-home-coverage-legend i.scheduled { background: var(--mf-home-blue); }
.mf-home-coverage-legend i.present { background: var(--mf-home-teal); }

.mf-home-coverage-list {
  display: grid;
  gap: 12px;
  margin-top: 13px;
}

.mf-home-coverage-name {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: #294a64;
  font-size: .73rem;
  font-weight: 750;
}

.mf-home-coverage-name span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-home-coverage-name strong {
  flex: 0 0 auto;
  color: #b95935;
}

.mf-home-coverage-track {
  position: relative;
  height: 18px;
  border-radius: 6px;
  background: #edf3f8;
  overflow: visible;
}

.mf-home-coverage-bar {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 6px;
  opacity: .62;
}
.mf-home-coverage-bar.required { background: #aebfd0; }
.mf-home-coverage-bar.scheduled { height: 12px; top: 3px; background: var(--mf-home-blue); opacity: .78; }
.mf-home-coverage-bar.present { height: 6px; top: 6px; background: var(--mf-home-teal); opacity: 1; }
.mf-home-coverage-bar em { display: none; }

.mf-home-compliance-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 17px;
}

.mf-home-compliance-total strong {
  color: var(--mf-home-ink);
  font-size: 2rem;
  line-height: 1;
}

.mf-home-compliance-total span {
  color: var(--mf-home-muted);
  font-size: .75rem;
}

.mf-home-compliance-bars {
  display: grid;
  gap: 13px;
}

.mf-home-compliance-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: #365b78;
  font-size: .75rem;
  font-weight: 750;
}

.mf-home-compliance-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.mf-home-compliance-track .expired { background: var(--mf-home-red); }
.mf-home-compliance-track .days30 { background: #df7d2a; }
.mf-home-compliance-track .days60 { background: var(--mf-home-amber); }
.mf-home-compliance-track .days90 { background: #5ca4c7; }

.mf-home-empty,
.mf-home-zero-state {
  display: grid;
  min-height: 190px;
  place-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px dashed #ccdce9;
  border-radius: 14px;
  background: #f8fbfd;
  color: var(--mf-home-muted);
  font-size: .8rem;
  text-align: center;
}

.mf-home-zero-state strong {
  color: var(--mf-home-green);
  font-size: 2.35rem;
  line-height: 1;
}

.mf-home-alerts {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(0, 3.1fr);
  gap: 16px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--mf-home-border);
  border-radius: 18px;
  background: linear-gradient(110deg, #0c3156 0%, #0b4b67 100%);
  box-shadow: 0 10px 28px rgba(19,54,88,.08);
  color: #fff;
}

.mf-home-alerts-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mf-home-alerts-head span {
  color: #67e1df;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.mf-home-alerts-head strong { margin-top: 4px; font-size: 1rem; }
.mf-home-alerts-head small { margin-top: 5px; color: #b9d4e2; font-size: .67rem; }

.mf-home-alerts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 9px;
}

.mf-home-alert-item {
  display: grid;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}
.mf-home-alert-item:hover,
.mf-home-alert-item:focus-visible { background: rgba(255,255,255,.14); outline: none; }
.mf-home-alert-item.is-warning { border-color: rgba(255,191,96,.58); background: rgba(197,105,35,.22); }
.mf-home-alert-label { color: #cce4ed; font-size: .68rem; font-weight: 750; }
.mf-home-alert-item strong { margin-top: 3px; font-size: 1.25rem; line-height: 1; }
.mf-home-alert-item small { margin-top: 5px; color: #b9d4e2; font-size: .62rem; line-height: 1.25; }

.mf-home-exec-status {
  min-height: 18px;
  margin-top: 8px;
  color: #6b8198;
  font-size: .72rem;
  text-align: right;
}

.mf-home-skeleton {
  border-radius: 999px;
  background: linear-gradient(90deg,#edf3f8 25%,#f8fbfd 45%,#edf3f8 65%);
  background-size: 220% 100%;
  animation: mf-home-loading 1.45s ease-in-out infinite;
}
.mf-home-skeleton--value { width: 42%; height: 38px; margin-top: 14px; }
.mf-home-skeleton--line { width: 75%; height: 11px; margin-top: 14px; }
.mf-home-skeleton--chart { width: 100%; height: 170px; margin-top: 18px; border-radius: 12px; }
.mf-home-panel[aria-busy="true"] { min-height: 290px; padding: 20px; }

@keyframes mf-home-loading { 0%{background-position:100% 0}100%{background-position:-100% 0} }

@media (max-width: 1180px) {
  .mf-home-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mf-home-analysis-grid { grid-template-columns: 1fr; }
  .mf-home-analysis-grid--equal { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mf-home-alerts { grid-template-columns: 1fr; }
}

@media (max-width: 850px) {
  .mf-home-analysis-grid--equal { grid-template-columns: 1fr; }
  .mf-home-alerts-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 590px) {
  .mf-home-kpi-grid { grid-template-columns: 1fr; }
  .mf-home-kpi-card { min-height: 135px; padding: 18px; }
  .mf-home-panel { min-height: 0; padding: 17px 15px; }
  .mf-home-panel-head { gap: 8px; }
  .mf-home-panel-link { display: none; }
  .mf-home-alerts-grid { grid-template-columns: 1fr; }
  .mf-home-bar-row { grid-template-columns: minmax(76px,1fr) minmax(70px,1.5fr) 25px; }
  .mf-home-exec-status { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .mf-home-skeleton { animation: none; }
  .mf-home-kpi-card { transition: none; }
}
