:root {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

.vm-hero,
.vm-goal-panel,
.vm-metric-card,
.vm-list-panel,
.vm-message {
  border: 1px solid #e4e4e7;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
}

.vm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 1.5rem;
}

.vm-eyebrow {
  margin: 0 0 .35rem;
  color: #0f766e;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.vm-hero h1,
.vm-goal-panel h2,
.vm-list-panel h3 {
  margin: 0;
  color: #18181b;
  letter-spacing: 0;
}

.vm-hero h1 {
  font-size: 2rem;
  line-height: 1.1;
}

.vm-hero p,
.vm-goal-subtext,
.vm-metric-card p {
  margin: .5rem 0 0;
  color: #71717a;
  font-size: .9rem;
  line-height: 1.45;
}

.vm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: end;
  justify-content: flex-end;
}

.vm-filters label {
  display: grid;
  gap: .3rem;
  color: #71717a;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vm-filters select,
.vm-filters input,
.vm-filters button {
  min-height: 2.55rem;
  border: 1px solid #d4d4d8;
  border-radius: .65rem;
  background: #fff;
  padding: 0 .8rem;
  color: #18181b;
  font: inherit;
  font-size: .86rem;
  font-weight: 400;
}

.vm-filters button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.vm-message {
  display: grid;
  gap: .25rem;
  margin-top: 1rem;
  padding: 1rem;
}

.vm-message strong {
  color: #18181b;
}

.vm-message span {
  color: #71717a;
  font-size: .9rem;
}

.vm-goal-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10rem;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.25rem;
}

.vm-goal-panel h2 {
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.12;
}

.vm-goal-panel h2 strong {
  font-weight: 800;
}

.vm-goal-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.vm-goal-value-card {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: .85rem;
  padding: .9rem .95rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.vm-goal-value-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: .24rem;
  opacity: .9;
}

.vm-goal-value-card.day {
  border-color: #99f6e4;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
}

.vm-goal-value-card.day::before {
  background: #0f766e;
}

.vm-goal-value-card.month {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.vm-goal-value-card.month::before {
  background: #2563eb;
}

.vm-goal-value-card.target {
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #eef2ff 0%, #fafafa 100%);
}

.vm-goal-value-card.target::before {
  background: #4f46e5;
}

.vm-goal-value-card.missing {
  border-color: #fde68a;
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
}

.vm-goal-value-card.missing::before {
  background: #f59e0b;
}

.vm-goal-values span {
  display: block;
  color: #52525b;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.vm-goal-values strong {
  display: block;
  margin-top: .25rem;
  color: #18181b;
  font-size: 1.05rem;
}

.vm-goal-track {
  position: relative;
  height: .8rem;
  margin-top: 1rem;
  border-radius: 999px;
  background: #e5e7eb;
}

.vm-goal-track .actual {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
}

.vm-goal-track .expected {
  position: absolute;
  top: -.4rem;
  left: 0;
  width: 2px;
  height: 1.6rem;
  border-radius: 999px;
  background: #f59e0b;
}

.vm-goal-status {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-top: .75rem;
  color: #71717a;
  font-size: .78rem;
}

#goalExpectedText {
  font-size: .88rem;
}

#goalExpectedText strong {
  color: #18181b;
  font-weight: 800;
}

.vm-status-pill,
.vm-delta {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  border-radius: 999px;
  padding: 0 .6rem;
  background: #fffbeb;
  color: #b45309;
  font-style: normal;
  font-size: .75rem;
  font-weight: 900;
  white-space: nowrap;
}

.vm-status-pill.good,
.vm-delta.good {
  background: #dcfce7;
  color: #15803d;
}

.vm-status-pill.bad,
.vm-delta.bad {
  background: #fee2e2;
  color: #dc2626;
}

.vm-goal-ring {
  display: grid;
  width: 9.25rem;
  height: 9.25rem;
  place-items: center;
  justify-self: end;
  border-radius: 999px;
  background: conic-gradient(#0f766e 0 0%, #e5e7eb 0 100%);
}

.vm-goal-ring div {
  display: grid;
  width: 6.65rem;
  height: 6.65rem;
  place-items: center;
  border-radius: inherit;
  background: #fff;
  text-align: center;
}

.vm-goal-ring strong {
  color: #0f766e;
  font-size: 1.65rem;
  line-height: 1;
}

.vm-goal-ring span {
  color: #71717a;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.vm-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.vm-metric-card {
  display: grid;
  gap: .7rem;
  min-height: 8.2rem;
  padding: 1rem;
}

.vm-metric-head {
  display: flex;
  justify-content: space-between;
  gap: .65rem;
}

.vm-metric-head span:first-child {
  color: #71717a;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.vm-metric-card > strong {
  color: #18181b;
  font-size: 1.55rem;
  line-height: 1;
}

.vm-lower-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  margin-top: 1rem;
}

.vm-list-panel {
  padding: 1rem;
}

.vm-list-panel h3 {
  font-size: 1rem;
}

.vm-rank-list {
  display: grid;
  gap: .65rem;
  margin-top: .85rem;
}

.vm-rank-row {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
}

.vm-rank-row b {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  border-radius: .5rem;
  background: #e6fffb;
  color: #0f766e;
  font-size: .74rem;
}

.vm-rank-row span {
  overflow: hidden;
  color: #18181b;
  font-size: .86rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vm-rank-row small {
  color: #71717a;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .vm-hero,
  .vm-goal-panel,
  .vm-lower-grid {
    grid-template-columns: 1fr;
  }

  .vm-goal-ring {
    justify-self: start;
  }

  .vm-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vm-filters {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .vm-goal-values,
  .vm-metric-grid {
    grid-template-columns: 1fr;
  }
}
