:root {
  --blue: #003055;
  --graphite: #2b3437;
  --gray: #929897;
  --mustard: #b18200;
  --red: #b9242d;
  --white: #ffffff;
  --surface: #f4f7f8;
  --line: #dce3e6;
  font-family: Arial, sans-serif;
  color: var(--graphite);
  background: var(--white);
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; background: var(--white); }

.dashboard { max-width: 1520px; margin: 0 auto; padding: 20px 24px 28px; }

.dashboard__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 18px;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 14px;
}

.eyebrow { margin: 0 0 4px; color: var(--gray); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
h1 { margin: 0; color: var(--blue); font-size: clamp(22px, 3vw, 32px); line-height: 1.1; }
.data-state { display: grid; justify-items: end; color: var(--gray); font-size: 12px; line-height: 1.4; text-align: right; white-space: nowrap; }
.data-state--error #data-state-label { color: var(--red); font-weight: 700; }

.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.engine-card { min-width: 0; border: 1px solid var(--line); background: var(--white); box-shadow: 0 2px 8px rgba(0, 48, 85, .06); }
.engine-card__title { margin: 0; padding: 10px 18px 8px; background: var(--mustard); color: var(--white); font-size: clamp(34px, 4.2vw, 50px); line-height: 1; font-weight: 700; }
.engine-card__factory { margin: 0; padding: 7px 18px; border-bottom: 1px solid var(--line); color: var(--blue); font-size: 12px; font-weight: 700; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 8px solid var(--white); }
.metric { min-height: 116px; padding: 13px 8px 8px; background: var(--surface); text-align: center; }
.metric + .metric { border-left: 4px solid var(--white); }
.metric--loaded { background: #f1f5fb; }
.metric--shipped { background: #f1faf5; }
.metric__label { display: block; min-height: 28px; color: var(--blue); font-size: 11px; font-weight: 700; line-height: 1.15; text-transform: uppercase; }
.metric__value { display: block; margin-top: 4px; color: var(--blue); font-size: clamp(27px, 3vw, 38px); font-weight: 700; line-height: 1; }
.metric--plan .metric__value { color: var(--graphite); }
.metric--shipped .metric__value { color: #075b3a; }
.progress { display: block; width: 100%; height: 7px; margin: 10px auto 5px; max-width: 124px; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #d6dce0; }
.progress::-webkit-progress-bar { border-radius: 999px; background: #d6dce0; }
.progress::-webkit-progress-value { border-radius: 999px; background: #00a941; }
.progress::-moz-progress-bar { border-radius: 999px; background: #00a941; }
.metric__percent { color: #087334; font-size: 13px; font-weight: 700; }
.metric__percent--zero { color: var(--gray); }

.details { min-height: 260px; padding: 10px 18px 18px; }
.details__heading, .details__row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.details__heading { padding: 0 0 8px; color: var(--blue); font-size: 13px; font-weight: 700; }
.details__row { min-height: 31px; border-top: 1px solid var(--line); color: var(--blue); font-size: 15px; }
.details__row span:last-child { color: var(--graphite); }
.details__empty { display: grid; min-height: 180px; place-items: center; color: var(--gray); font-size: 15px; text-align: center; }

.empty-message { grid-column: 1 / -1; padding: 36px; border: 1px solid var(--line); color: var(--gray); text-align: center; }

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .engine-card__title { font-size: 44px; }
}

@media (max-width: 540px) {
  .dashboard { padding: 16px 12px 20px; }
  .dashboard__header { align-items: start; flex-direction: column; gap: 8px; }
  .data-state { justify-items: start; text-align: left; white-space: normal; }
}
