.stock-strategy-container .tabs {
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.stock-strategy-container .forest-batch-add-button {
  flex: 0 0 auto;
  margin-left: 10px;
}

.forest-batch-record-dialog {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
}

.forest-batch-record-dialog .forest-batch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.forest-batch-record-dialog .forest-batch-panel {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.forest-batch-record-dialog .forest-batch-panel-header,
.forest-batch-record-dialog .forest-batch-panel-footer {
  display: flex;
  align-items: center;
  padding: 16px 20px;
}

.forest-batch-record-dialog .forest-batch-panel-header {
  justify-content: space-between;
  border-bottom: 1px solid #e4e7ed;
}

.forest-batch-record-dialog .forest-batch-panel-header h2 {
  margin: 0;
  color: #303133;
  font-size: 18px;
  line-height: 24px;
}

.forest-batch-record-dialog .forest-batch-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  color: #909399;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 32px;
}

.forest-batch-record-dialog .forest-batch-close:hover {
  color: #409eff;
}

.forest-batch-record-dialog .forest-batch-panel-footer {
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e4e7ed;
}

.forest-batch-record-dialog .forest-batch-content {
  display: grid;
  gap: 18px;
  max-height: calc(100vh - 154px);
  padding: 18px 20px;
  overflow-y: auto;
}

.forest-batch-record-dialog .forest-batch-date {
  display: grid;
  grid-template-columns: auto minmax(180px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d9ecff;
  border-radius: 10px;
  background: #f4f9ff;
}

.forest-batch-record-dialog .forest-batch-date label {
  color: #303133;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.forest-batch-record-dialog .forest-batch-date .el-date-editor {
  width: 100%;
}

.forest-batch-record-dialog .forest-batch-date small {
  color: #7b8794;
  font-size: 12px;
}

.forest-batch-record-dialog .forest-batch-cleanup-option {
  min-height: 42px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d9ecff;
  border-radius: 8px;
  background: #f4f9ff;
}

.forest-batch-record-dialog .forest-batch-cleanup-option > span {
  color: #303133;
  font-size: 14px;
  font-weight: 600;
}

.forest-batch-record-dialog .forest-batch-cleanup-switch {
  --el-switch-on-color: #1677ff;
  --el-switch-off-color: #c0c4cc;
}

.forest-batch-record-dialog .forest-batch-strategy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: min(62vh, 620px);
  padding-right: 4px;
  overflow-y: auto;
}

.forest-batch-record-dialog .forest-batch-strategy-row {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4e7ed;
  border-radius: 10px;
  background: #fafcff;
}

.forest-batch-record-dialog .forest-batch-strategy-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.forest-batch-record-dialog .forest-batch-strategy-name {
  min-width: 0;
  overflow: hidden;
  color: #303133;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forest-batch-record-dialog .forest-batch-strategy-count {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 10px;
  color: #1677ff;
  background: #eaf4ff;
  font-size: 12px;
  font-weight: 700;
}

.forest-batch-record-dialog .el-textarea__inner {
  min-height: 170px !important;
  resize: vertical;
}

@media (max-width: 760px) {
  .stock-strategy-container .forest-batch-add-button {
    margin: 6px 0 6px 8px;
  }

  .forest-batch-record-dialog .forest-batch-date {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .forest-batch-record-dialog .forest-batch-strategy-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
