.production-board {
  min-width: 0;
}

.production-board-heading {
  align-items: end;
  gap: 16px;
}

.production-board-picker {
  display: grid;
  gap: 6px;
  min-width: 320px;
  max-width: 520px;
  font-size: 13px;
  color: var(--muted);
}

.production-board-picker select {
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 0 12px;
}

.production-board-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 8px;
}

.production-board-summary > div {
  min-width: 0;
  padding: 8px 12px;
  border-right: 1px solid var(--line);
}

.production-board-summary > div:last-child {
  border-right: 0;
}

.production-board-summary span,
.production-board-item-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.production-board-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-board-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.production-board-item-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-bottom: 3px solid #d9e8f7;
  background: #fff;
  margin-bottom: 8px;
  scrollbar-width: thin;
}

.production-board-item-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  height: 40px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  text-align: left;
  cursor: pointer;
}

.production-board-item-tabs button:hover {
  background: #f4f9ff;
}

.production-board-item-tabs button.active {
  box-shadow: inset 0 -3px 0 var(--blue);
  background: #eaf4ff;
}

.production-board-item-tabs span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.production-board-item-tabs strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-board-item {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.production-board-item-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
}

.production-board-item-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.production-board-item-head strong {
  color: var(--text);
  font-size: 15px;
}

.production-board-item-index {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 24px;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-weight: 900;
}

.production-board-item-meta {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 6px 14px;
  align-content: center;
  text-align: right;
}

.production-board-progress {
  height: 4px;
  background: #e8f1fb;
  overflow: hidden;
}

.production-board-progress span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.production-board-steps {
  display: flex;
  gap: 3px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 5px 8px;
  scrollbar-width: thin;
}

.production-board-step {
  flex: 0 0 82px;
  min-width: 82px;
  height: 42px;
  border: 1px solid var(--line);
  border-top: 2px solid #9db2c9;
  padding: 3px 6px;
  background: #fff;
  overflow: hidden;
}

.production-board-step span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
}

.production-board-step strong {
  display: block;
  margin-top: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-board-step em {
  display: block;
  margin-top: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-board-step.is-done {
  border-top-color: #0f8f5f;
  background: #f3fbf7;
}

.production-board-step.is-active,
.production-board-step.is-worker {
  border-top-color: var(--blue);
  background: #f4f9ff;
}

.production-board-step.is-pending {
  background: #fff;
}

.production-board-table-wrap {
  margin: 0 8px 8px;
}

.production-board-table th,
.production-board-table td {
  height: 28px;
  font-size: 12px;
  white-space: nowrap;
}

.production-board-status {
  display: inline-block;
  min-width: 56px;
  border: 1px solid var(--line);
  padding: 2px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.production-board-status.is-done {
  border-color: #0f8f5f;
  color: #0f8f5f;
}

.production-board-status.is-active,
.production-board-status.is-worker {
  border-color: var(--blue);
  color: var(--blue);
}

@media (max-width: 900px) {
  .production-board-heading,
  .production-board-item-head {
    align-items: stretch;
    flex-direction: column;
  }

  .production-board-picker {
    min-width: 0;
    max-width: none;
  }

  .production-board-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-board-item-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }
}
